@agilemotion/oui-react-js 1.6.0 → 1.6.2
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 +65 -18
- 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.css +0 -157
- package/dist/components/DocumentTemplateDesignerComponent.js +118 -62
- 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 +35 -19
- 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 +5 -5
- 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 +1 -2
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -154
- 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
|
@@ -5,228 +5,250 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ElementResizeHandler = void 0;
|
|
7
7
|
|
|
8
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
|
+
|
|
8
10
|
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; }
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
12
|
+
var MIN_WIDTH = 60;
|
|
13
|
+
var MIN_HEIGHT = 40;
|
|
14
|
+
var FULLSCREEN_MARGINS = -10;
|
|
15
|
+
var MARGINS = 4;
|
|
16
|
+
|
|
17
|
+
var ElementResizeHandler = function ElementResizeHandler(pane, ghostPane) {
|
|
18
|
+
var _this = this;
|
|
19
|
+
|
|
20
|
+
_classCallCheck(this, ElementResizeHandler);
|
|
21
|
+
|
|
22
|
+
_defineProperty(this, "setBounds", function (element, x, y, w, h) {
|
|
23
|
+
element.style.left = x + 'px';
|
|
24
|
+
element.style.top = y + 'px';
|
|
25
|
+
element.style.width = w + 'px';
|
|
26
|
+
element.style.height = h + 'px';
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
_defineProperty(this, "hintHide", function () {
|
|
30
|
+
_this.setBounds(_this.ghostPane, _this.b.left, _this.b.top, _this.b.width, _this.b.height);
|
|
31
|
+
|
|
32
|
+
_this.ghostPane.style.opacity = 0;
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
_defineProperty(this, "onTouchDown", function (e) {
|
|
36
|
+
alert(1);
|
|
37
|
+
|
|
38
|
+
_this.onDown(e.touches[0]);
|
|
39
|
+
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
_defineProperty(this, "onTouchMove", function (e) {
|
|
44
|
+
alert(1);
|
|
45
|
+
|
|
46
|
+
_this.onMove(e.touches[0]);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
_defineProperty(this, "onTouchEnd", function (e) {
|
|
50
|
+
alert(1);
|
|
51
|
+
|
|
52
|
+
if (e.touches.length === 0) {
|
|
53
|
+
_this.onUp(e.changedTouches[0]);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
_defineProperty(this, "onMouseDown", function (e) {
|
|
58
|
+
_this.onDown(e);
|
|
59
|
+
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
_defineProperty(this, "onDown", function (e) {
|
|
64
|
+
_this.calc(e);
|
|
65
|
+
|
|
66
|
+
var isResizing = _this.onRightEdge || _this.onBottomEdge || _this.onTopEdge || _this.onLeftEdge;
|
|
67
|
+
_this.clicked = {
|
|
68
|
+
x: _this.x,
|
|
69
|
+
y: _this.y,
|
|
70
|
+
cx: e.clientX,
|
|
71
|
+
cy: e.clientY,
|
|
72
|
+
w: _this.b.width,
|
|
73
|
+
h: _this.b.height,
|
|
74
|
+
isResizing: _this.isResizing,
|
|
75
|
+
isMoving: !_this.isResizing && _this.canMove(),
|
|
76
|
+
onTopEdge: _this.onTopEdge,
|
|
77
|
+
onLeftEdge: _this.onLeftEdge,
|
|
78
|
+
onRightEdge: _this.onRightEdge,
|
|
79
|
+
onBottomEdge: _this.onBottomEdge
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
_defineProperty(this, "canMove", function () {
|
|
84
|
+
return _this.x > 0 && _this.x < _this.b.width && _this.y > 0 && _this.y < _this.b.height && _this.y < 30;
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
_defineProperty(this, "calc", function (e) {
|
|
88
|
+
_this.b = _this.pane.getBoundingClientRect();
|
|
89
|
+
_this.x = e.clientX - _this.b.left;
|
|
90
|
+
_this.y = e.clientY - _this.b.top;
|
|
91
|
+
_this.onTopEdge = _this.y < MARGINS;
|
|
92
|
+
_this.onLeftEdge = _this.x < MARGINS;
|
|
93
|
+
_this.onRightEdge = _this.x >= _this.b.width - MARGINS;
|
|
94
|
+
_this.onBottomEdge = _this.y >= _this.b.height - MARGINS;
|
|
95
|
+
_this.rightScreenEdge = window.innerWidth - MARGINS;
|
|
96
|
+
_this.bottomScreenEdge = window.innerHeight - MARGINS;
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
_defineProperty(this, "onMove", function (ee) {
|
|
100
|
+
_this.calc(ee);
|
|
101
|
+
|
|
102
|
+
_this.e = ee;
|
|
103
|
+
_this.redraw = true;
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
_defineProperty(this, "animate", function () {
|
|
107
|
+
requestAnimationFrame(_this.animate);
|
|
108
|
+
if (!_this.redraw) return;
|
|
109
|
+
_this.redraw = false;
|
|
110
|
+
|
|
111
|
+
if (_this.clicked && _this.clicked.isResizing) {
|
|
112
|
+
if (_this.clicked.onRightEdge) _this.pane.style.width = Math.max(_this.x, MIN_WIDTH) + 'px';
|
|
113
|
+
if (_this.clicked.onBottomEdge) _this.pane.style.height = Math.max(_this.y, MIN_HEIGHT) + 'px';
|
|
114
|
+
|
|
115
|
+
if (_this.clicked.onLeftEdge) {
|
|
116
|
+
var currentWidth = Math.max(_this.clicked.cx - _this.e.clientX + _this.clicked.w, MIN_WIDTH);
|
|
117
|
+
|
|
118
|
+
if (currentWidth > MIN_WIDTH) {
|
|
119
|
+
_this.pane.style.width = currentWidth + 'px';
|
|
120
|
+
_this.pane.style.left = _this.e.clientX + 'px';
|
|
110
121
|
}
|
|
122
|
+
}
|
|
111
123
|
|
|
112
|
-
|
|
113
|
-
|
|
124
|
+
if (_this.clicked.onTopEdge) {
|
|
125
|
+
var currentHeight = Math.max(_this.clicked.cy - _this.e.clientY + _this.clicked.h, MIN_HEIGHT);
|
|
114
126
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
127
|
+
if (currentHeight > MIN_HEIGHT) {
|
|
128
|
+
_this.pane.style.height = currentHeight + 'px';
|
|
129
|
+
_this.pane.style.top = _this.e.clientY + 'px';
|
|
119
130
|
}
|
|
120
|
-
|
|
121
|
-
this.hintHide();
|
|
122
|
-
return;
|
|
123
131
|
}
|
|
124
132
|
|
|
125
|
-
|
|
126
|
-
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) {
|
|
127
|
-
// hintFull();
|
|
128
|
-
this.setBounds(this.ghostPane, 0, 0, window.innerWidth, window.innerHeight);
|
|
129
|
-
this.ghostPane.style.opacity = 0.2;
|
|
130
|
-
} else if (this.b.top < MARGINS) {
|
|
131
|
-
// hintTop();
|
|
132
|
-
this.setBounds(this.ghostPane, 0, 0, window.innerWidth, window.innerHeight / 2);
|
|
133
|
-
this.ghostPane.style.opacity = 0.2;
|
|
134
|
-
} else if (this.b.left < MARGINS) {
|
|
135
|
-
// hintLeft();
|
|
136
|
-
this.setBounds(this.ghostPane, 0, 0, window.innerWidth / 2, window.innerHeight);
|
|
137
|
-
this.ghostPane.style.opacity = 0.2;
|
|
138
|
-
} else if (this.b.right > this.rightScreenEdge) {
|
|
139
|
-
// hintRight();
|
|
140
|
-
this.setBounds(this.ghostPane, window.innerWidth / 2, 0, window.innerWidth / 2, window.innerHeight);
|
|
141
|
-
this.ghostPane.style.opacity = 0.2;
|
|
142
|
-
} else if (this.b.bottom > this.bottomScreenEdge) {
|
|
143
|
-
// hintBottom();
|
|
144
|
-
this.setBounds(this.ghostPane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
|
|
145
|
-
this.ghostPane.style.opacity = 0.2;
|
|
146
|
-
} else {
|
|
147
|
-
this.hintHide();
|
|
148
|
-
}
|
|
133
|
+
_this.hintHide();
|
|
149
134
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
return;
|
|
153
|
-
} // moving
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
154
137
|
|
|
138
|
+
if (_this.clicked && _this.clicked.isMoving) {
|
|
139
|
+
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) {
|
|
140
|
+
// hintFull();
|
|
141
|
+
_this.setBounds(_this.ghostPane, 0, 0, window.innerWidth, window.innerHeight);
|
|
155
142
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
} else if (
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
143
|
+
_this.ghostPane.style.opacity = 0.2;
|
|
144
|
+
} else if (_this.b.top < MARGINS) {
|
|
145
|
+
// hintTop();
|
|
146
|
+
_this.setBounds(_this.ghostPane, 0, 0, window.innerWidth, window.innerHeight / 2);
|
|
147
|
+
|
|
148
|
+
_this.ghostPane.style.opacity = 0.2;
|
|
149
|
+
} else if (_this.b.left < MARGINS) {
|
|
150
|
+
// hintLeft();
|
|
151
|
+
_this.setBounds(_this.ghostPane, 0, 0, window.innerWidth / 2, window.innerHeight);
|
|
152
|
+
|
|
153
|
+
_this.ghostPane.style.opacity = 0.2;
|
|
154
|
+
} else if (_this.b.right > _this.rightScreenEdge) {
|
|
155
|
+
// hintRight();
|
|
156
|
+
_this.setBounds(_this.ghostPane, window.innerWidth / 2, 0, window.innerWidth / 2, window.innerHeight);
|
|
157
|
+
|
|
158
|
+
_this.ghostPane.style.opacity = 0.2;
|
|
159
|
+
} else if (_this.b.bottom > _this.bottomScreenEdge) {
|
|
160
|
+
// hintBottom();
|
|
161
|
+
_this.setBounds(_this.ghostPane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
|
|
162
|
+
|
|
163
|
+
_this.ghostPane.style.opacity = 0.2;
|
|
173
164
|
} else {
|
|
174
|
-
|
|
165
|
+
_this.hintHide();
|
|
175
166
|
}
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
_defineProperty(this, "onUp", e => {
|
|
179
|
-
this.calc(e);
|
|
180
|
-
|
|
181
|
-
if (this.clicked && this.clicked.isMoving) {
|
|
182
|
-
// Snap
|
|
183
|
-
var snapped = {
|
|
184
|
-
width: this.b.width,
|
|
185
|
-
height: this.b.height
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
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) {
|
|
189
|
-
// hintFull();
|
|
190
|
-
this.setBounds(this.pane, 0, 0, window.innerWidth, window.innerHeight);
|
|
191
|
-
this.preSnapped = snapped;
|
|
192
|
-
} else if (this.b.top < MARGINS) {
|
|
193
|
-
// hintTop();
|
|
194
|
-
this.setBounds(this.pane, 0, 0, window.innerWidth, window.innerHeight / 2);
|
|
195
|
-
this.preSnapped = snapped;
|
|
196
|
-
} else if (this.b.left < MARGINS) {
|
|
197
|
-
// hintLeft();
|
|
198
|
-
this.setBounds(this.pane, 0, 0, window.innerWidth / 2, window.innerHeight);
|
|
199
|
-
this.preSnapped = snapped;
|
|
200
|
-
} else if (this.b.right > this.rightScreenEdge) {
|
|
201
|
-
// hintRight();
|
|
202
|
-
this.setBounds(this.pane, window.innerWidth / 2, 0, window.innerWidth / 2, window.innerHeight);
|
|
203
|
-
this.preSnapped = snapped;
|
|
204
|
-
} else if (this.b.bottom > this.bottomScreenEdge) {
|
|
205
|
-
// hintBottom();
|
|
206
|
-
this.setBounds(this.pane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
|
|
207
|
-
this.preSnapped = snapped;
|
|
208
|
-
} else {
|
|
209
|
-
this.preSnapped = null;
|
|
210
|
-
}
|
|
211
167
|
|
|
212
|
-
|
|
168
|
+
if (_this.preSnapped) {
|
|
169
|
+
_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);
|
|
170
|
+
|
|
171
|
+
return;
|
|
172
|
+
} // moving
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
_this.pane.style.top = _this.e.clientY - _this.clicked.y + 'px';
|
|
176
|
+
_this.pane.style.left = _this.e.clientX - _this.clicked.x + 'px';
|
|
177
|
+
return;
|
|
178
|
+
} // This code executes when mouse moves without clicking
|
|
179
|
+
// style cursor
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
if (_this.onRightEdge && _this.onBottomEdge || _this.onLeftEdge && _this.onTopEdge) {
|
|
183
|
+
_this.pane.style.cursor = 'nwse-resize';
|
|
184
|
+
} else if (_this.onRightEdge && _this.onTopEdge || _this.onBottomEdge && _this.onLeftEdge) {
|
|
185
|
+
_this.pane.style.cursor = 'nesw-resize';
|
|
186
|
+
} else if (_this.onRightEdge || _this.onLeftEdge) {
|
|
187
|
+
_this.pane.style.cursor = 'ew-resize';
|
|
188
|
+
} else if (_this.onBottomEdge || _this.onTopEdge) {
|
|
189
|
+
_this.pane.style.cursor = 'ns-resize';
|
|
190
|
+
} else if (_this.canMove()) {
|
|
191
|
+
_this.pane.style.cursor = 'move';
|
|
192
|
+
} else {
|
|
193
|
+
_this.pane.style.cursor = 'default';
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
_defineProperty(this, "onUp", function (e) {
|
|
198
|
+
_this.calc(e);
|
|
199
|
+
|
|
200
|
+
if (_this.clicked && _this.clicked.isMoving) {
|
|
201
|
+
// Snap
|
|
202
|
+
var snapped = {
|
|
203
|
+
width: _this.b.width,
|
|
204
|
+
height: _this.b.height
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
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) {
|
|
208
|
+
// hintFull();
|
|
209
|
+
_this.setBounds(_this.pane, 0, 0, window.innerWidth, window.innerHeight);
|
|
210
|
+
|
|
211
|
+
_this.preSnapped = snapped;
|
|
212
|
+
} else if (_this.b.top < MARGINS) {
|
|
213
|
+
// hintTop();
|
|
214
|
+
_this.setBounds(_this.pane, 0, 0, window.innerWidth, window.innerHeight / 2);
|
|
215
|
+
|
|
216
|
+
_this.preSnapped = snapped;
|
|
217
|
+
} else if (_this.b.left < MARGINS) {
|
|
218
|
+
// hintLeft();
|
|
219
|
+
_this.setBounds(_this.pane, 0, 0, window.innerWidth / 2, window.innerHeight);
|
|
220
|
+
|
|
221
|
+
_this.preSnapped = snapped;
|
|
222
|
+
} else if (_this.b.right > _this.rightScreenEdge) {
|
|
223
|
+
// hintRight();
|
|
224
|
+
_this.setBounds(_this.pane, window.innerWidth / 2, 0, window.innerWidth / 2, window.innerHeight);
|
|
225
|
+
|
|
226
|
+
_this.preSnapped = snapped;
|
|
227
|
+
} else if (_this.b.bottom > _this.bottomScreenEdge) {
|
|
228
|
+
// hintBottom();
|
|
229
|
+
_this.setBounds(_this.pane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
|
|
230
|
+
|
|
231
|
+
_this.preSnapped = snapped;
|
|
232
|
+
} else {
|
|
233
|
+
_this.preSnapped = null;
|
|
213
234
|
}
|
|
214
235
|
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
236
|
+
_this.hintHide();
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
_this.clicked = null;
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
this.clicked = null;
|
|
243
|
+
pane.addEventListener('mousedown', this.onMouseDown);
|
|
244
|
+
document.addEventListener('mousemove', this.onMove);
|
|
245
|
+
document.addEventListener('mouseup', this.onUp);
|
|
246
|
+
pane.addEventListener('touchstart', this.onTouchDown);
|
|
247
|
+
document.addEventListener('touchmove', this.onTouchMove);
|
|
248
|
+
document.addEventListener('touchend', this.onTouchEnd);
|
|
249
|
+
this.pane = pane;
|
|
250
|
+
this.ghostPane = ghostPane;
|
|
251
|
+
this.animate();
|
|
252
|
+
};
|
|
231
253
|
|
|
232
254
|
exports.ElementResizeHandler = ElementResizeHandler;
|
|
@@ -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
|
});
|
|
@@ -17,29 +19,47 @@ var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"
|
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
22
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
+
|
|
28
|
+
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."); }
|
|
29
|
+
|
|
30
|
+
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
31
|
|
|
22
|
-
function
|
|
32
|
+
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
33
|
|
|
24
|
-
|
|
34
|
+
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
35
|
|
|
26
|
-
|
|
27
|
-
const [file] = (0, _react.useState)(props.file);
|
|
28
|
-
const [downloadUrl, setDownloadUrl] = (0, _react.useState)(null);
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
var location = window.location.protocol + '//' + window.location.hostname;
|
|
39
|
+
|
|
40
|
+
var FileThumb = function FileThumb(props) {
|
|
41
|
+
var _useState = (0, _react.useState)(props.file),
|
|
42
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
43
|
+
file = _useState2[0];
|
|
44
|
+
|
|
45
|
+
var _useState3 = (0, _react.useState)(null),
|
|
46
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
47
|
+
downloadUrl = _useState4[0],
|
|
48
|
+
setDownloadUrl = _useState4[1];
|
|
49
|
+
|
|
50
|
+
_react.default.useEffect(function () {
|
|
31
51
|
if (file) {
|
|
32
52
|
setDownloadUrl(location + _ApplicationManager.default.getContextRoot() + '/docs/api/v1/manager/download/' + file.repositoryId + '?access_token=' + sessionStorage.getItem('accessToken') + '&idToken=' + sessionStorage.getItem('idToken'));
|
|
33
53
|
}
|
|
34
54
|
}, [file]);
|
|
35
55
|
|
|
36
|
-
|
|
56
|
+
var isImage = function isImage() {
|
|
37
57
|
var _file$type;
|
|
38
58
|
|
|
39
59
|
return (_file$type = file.type) === null || _file$type === void 0 ? void 0 : _file$type.startsWith('image/');
|
|
40
60
|
};
|
|
41
61
|
|
|
42
|
-
|
|
62
|
+
var getThumbImage = function getThumbImage() {
|
|
43
63
|
if (!file || !file.type) {
|
|
44
64
|
return 'default-file-thumb.png';
|
|
45
65
|
}
|
|
@@ -80,7 +100,9 @@ const FileThumb = props => {
|
|
|
80
100
|
width: '8px',
|
|
81
101
|
height: '8px'
|
|
82
102
|
},
|
|
83
|
-
onClick: ()
|
|
103
|
+
onClick: function onClick() {
|
|
104
|
+
return props.onDelete(file);
|
|
105
|
+
}
|
|
84
106
|
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
85
107
|
id: 'DELETE'
|
|
86
108
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|