@agilemotion/oui-react-js 1.6.4 → 1.6.6
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 +675 -1044
- package/dist/BasicApp.js +9 -27
- package/dist/BasicAppHome.js +27 -101
- package/dist/DynamicJS.js +109 -197
- package/dist/InteractionPortalApp.js +7 -27
- package/dist/InteractionPortalAppHome.js +21 -87
- package/dist/InteractionPortalApp_old.js +60 -122
- package/dist/RestUtils.js +269 -410
- package/dist/TypedValue.js +20 -26
- package/dist/Utils.js +295 -481
- package/dist/WithRouter.js +9 -17
- package/dist/assets/jss/components/authNavbarStyle.js +168 -171
- package/dist/assets/jss/components/buttonStyle.js +2 -5
- package/dist/assets/jss/components/cardAvatarStyle.js +2 -5
- package/dist/assets/jss/components/cardBodyStyle.js +2 -5
- package/dist/assets/jss/components/cardFooterStyle.js +2 -5
- package/dist/assets/jss/components/cardHeaderStyle.js +20 -17
- package/dist/assets/jss/components/cardIconStyle.js +2 -5
- package/dist/assets/jss/components/cardStyle.js +2 -5
- package/dist/assets/jss/components/cardTextStyle.js +2 -5
- package/dist/assets/jss/components/customDropdownStyle.js +171 -173
- package/dist/assets/jss/components/customInputStyle.js +5 -13
- package/dist/assets/jss/components/dropdownStyle.js +71 -74
- package/dist/assets/jss/components/footerStyle.js +14 -23
- package/dist/assets/jss/components/headerLinksStyle.js +52 -53
- package/dist/assets/jss/components/headerStyle.js +68 -73
- package/dist/assets/jss/components/navbarLinksStyle.js +81 -74
- package/dist/assets/jss/components/navbarStyle.js +79 -84
- package/dist/assets/jss/components/sidebarStyle.js +438 -441
- package/dist/assets/jss/components/typographyStyle.js +5 -13
- package/dist/assets/jss/rootStyle.js +85 -151
- package/dist/assets/jss/views/layoutStyle.js +45 -51
- package/dist/assets/jss/views/loginBasicStyle.js +2 -5
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +2 -5
- package/dist/assets/jss/views/loginStyle.js +80 -87
- package/dist/components/AlertBar.js +20 -75
- package/dist/components/AlertItem.js +13 -49
- package/dist/components/AlertTemplate.js +12 -18
- package/dist/components/Button.js +41 -112
- package/dist/components/Calendar.js +99 -208
- package/dist/components/ConfirmationDialog.js +13 -54
- package/dist/components/DataGrid.js +271 -695
- package/dist/components/DataGridColumn.js +24 -74
- package/dist/components/DataGridFilter.js +107 -245
- package/dist/components/DataGridHeading.js +34 -78
- package/dist/components/Dialog.js +37 -130
- package/dist/components/DocumentTemplateDesigner.js +16 -57
- package/dist/components/DocumentTemplateDesignerComponent.js +47 -141
- package/dist/components/DocumentTemplatePlaceholderDialog.js +34 -67
- package/dist/components/DocumentViewer.js +25 -65
- package/dist/components/DocumentViewerComponent.js +13 -44
- package/dist/components/ElementResizeHandler.js +148 -200
- package/dist/components/FileThumb.js +15 -56
- package/dist/components/Graph.js +98 -203
- package/dist/components/GraphNode.js +20 -61
- package/dist/components/HtmlPanel.js +38 -105
- package/dist/components/Icon.js +174 -253
- package/dist/components/LoadingIndicator.js +4 -11
- package/dist/components/LottieIcon.js +63 -60
- package/dist/components/PopupView.js +21 -60
- package/dist/components/Portlet.js +18 -60
- package/dist/components/RegularButton.js +34 -42
- package/dist/components/SignaturePanel.js +19 -67
- package/dist/components/SocketManager.js +133 -228
- package/dist/components/StepperTitleBar.js +48 -99
- package/dist/components/TabPage.js +30 -47
- package/dist/components/TabPanel.js +35 -122
- package/dist/components/TableCellContent.js +34 -98
- package/dist/components/TemplateDesigner.js +115 -230
- package/dist/components/TemplateItemEventHandler.js +298 -481
- package/dist/components/TemplateTable.js +117 -218
- package/dist/components/TitleBar.js +15 -53
- package/dist/components/Toolbar.js +44 -110
- package/dist/components/Tooltip.js +37 -56
- package/dist/components/Tree.js +50 -143
- package/dist/components/UseIsVisible.js +5 -25
- package/dist/components/card/Card.js +35 -39
- package/dist/components/card/CardAvatar.js +21 -32
- package/dist/components/card/CardBody.js +29 -36
- package/dist/components/card/CardFooter.js +26 -35
- package/dist/components/card/CardHeader.js +29 -36
- package/dist/components/card/CardIcon.js +15 -29
- package/dist/components/card/CardText.js +15 -29
- package/dist/components/customInput/CustomInput.js +38 -40
- package/dist/components/dashboard/FoldingSideTabDashboard.js +65 -184
- package/dist/components/dashboard/SideMenuModuleDashboard.js +67 -185
- package/dist/components/dashboard/TopMenuModuleDashboard.js +22 -63
- package/dist/components/dashboard/components/Header.js +15 -52
- package/dist/components/dashboard/components/LeftDrawer.js +9 -23
- package/dist/components/dashboard/components/UserIdentity.js +4 -12
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +115 -155
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +344 -419
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +15 -29
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +405 -485
- package/dist/components/dashboard/components/portal/Timeline.js +3 -8
- package/dist/components/dashboard/components/portal/Workspace.js +4 -13
- package/dist/components/footer/Footer.js +23 -45
- package/dist/components/footer/HomeFooter.js +38 -78
- package/dist/components/form/AddressSearch.js +26 -76
- package/dist/components/form/AutoComplete.js +54 -168
- package/dist/components/form/BaseField.js +59 -189
- package/dist/components/form/Checkbox.js +11 -24
- package/dist/components/form/DatePicker.js +28 -82
- package/dist/components/form/FieldSet.js +84 -300
- package/dist/components/form/Form.js +206 -501
- package/dist/components/form/GridField.js +83 -243
- package/dist/components/form/IconField.js +10 -21
- package/dist/components/form/ImageEditor.js +98 -208
- package/dist/components/form/LabelField.js +13 -28
- package/dist/components/form/LookupField.js +36 -102
- package/dist/components/form/MultiFileUploadField.js +67 -134
- package/dist/components/form/RadioGroup.js +20 -57
- package/dist/components/form/Section.js +33 -118
- package/dist/components/form/SelectItem.js +36 -83
- package/dist/components/form/SignatureTemplateDesignerField.js +12 -26
- package/dist/components/form/Switch.js +11 -24
- package/dist/components/form/TextField.js +19 -55
- package/dist/components/form/TimePicker.js +18 -43
- package/dist/components/form/TransferList.js +76 -200
- package/dist/components/form/UploadField.js +134 -256
- package/dist/components/grid/GridContainer.js +10 -23
- package/dist/components/grid/GridItem.js +10 -23
- package/dist/components/layout/CollapsiblePanel.js +20 -59
- package/dist/components/layout/Layout.js +40 -149
- package/dist/components/layout/View.js +65 -195
- package/dist/components/layout/ViewContainer.js +13 -33
- package/dist/components/layout/ViewPort.js +14 -48
- package/dist/components/layout/Window.js +62 -135
- package/dist/components/layout/WindowViewPort.js +18 -63
- package/dist/components/media/ClosablePanel.js +9 -18
- package/dist/components/media/LobbyWaitingList.js +11 -17
- package/dist/components/media/MediaSoupHelper.js +173 -401
- package/dist/components/media/SideBarContent.js +17 -34
- package/dist/components/media/SocketRequest.js +7 -18
- package/dist/components/media/SocketResponse.js +5 -14
- package/dist/components/media/Timer.js +18 -54
- package/dist/components/media/Toolbar.js +97 -254
- package/dist/components/media/ToolbarButton.js +34 -95
- package/dist/components/media/Toolbar_bck.js +70 -186
- package/dist/components/media/Tracks.js +19 -33
- package/dist/components/media/TrainingRoom.js +121 -374
- package/dist/components/media/Transports.js +17 -29
- package/dist/components/media/VCEventManager.js +45 -116
- package/dist/components/media/VCEventType.js +82 -168
- package/dist/components/media/VCParticipantList.js +16 -51
- package/dist/components/media/VCParticipantListItem.js +44 -141
- package/dist/components/media/VCRoom.js +14 -58
- package/dist/components/media/VCRoomParticipant.js +235 -556
- package/dist/components/media/VCRoomRecorder.js +106 -204
- package/dist/components/media/VCRoomWorkspace.js +248 -584
- package/dist/components/media/Video.js +27 -112
- package/dist/components/media/VideoPlayer.js +23 -91
- package/dist/components/media/chat/ChatRoom.js +143 -361
- package/dist/components/media/chat/ChatRoomItem.js +17 -58
- package/dist/components/media/chat/ChatRoomList.js +15 -60
- package/dist/components/menu/CollapsibleMenu.js +22 -52
- package/dist/components/menu/MenuBars.js +50 -116
- package/dist/components/menu/MenuButton.js +53 -130
- package/dist/components/menu/MenuItem.js +11 -51
- package/dist/components/menu/MenuLink.js +13 -41
- package/dist/components/menu/PopupMenu.js +13 -25
- package/dist/components/navbars/AuthNavbar.js +21 -56
- package/dist/components/navbars/HomeNavbar.js +213 -290
- package/dist/components/navbars/PortalNavbar.js +26 -81
- package/dist/components/signatures/AgilitySignaturePanel.js +41 -135
- package/dist/components/signatures/AlertItem.js +14 -50
- package/dist/components/signatures/Card.js +6 -16
- package/dist/components/signatures/DocumentContainer.js +57 -165
- package/dist/components/signatures/ImageSignatureInput.js +64 -124
- package/dist/components/signatures/MenuButton.js +28 -63
- package/dist/components/signatures/Prompt.js +6 -41
- package/dist/components/signatures/ResponsiveTable.js +181 -370
- package/dist/components/signatures/SearchView.js +34 -112
- package/dist/components/signatures/SignatorySearch.js +11 -44
- package/dist/components/signatures/SignatorySearchForm.js +19 -50
- package/dist/components/signatures/SignatureInput.js +28 -91
- package/dist/components/signatures/SignatureInputProps.js +49 -144
- package/dist/components/signatures/SignatureTemplateDesigner.js +230 -430
- package/dist/components/signatures/Toolbar.js +99 -173
- package/dist/components/signatures/ViewUtils.js +207 -313
- package/dist/components/typography/Danger.js +6 -11
- package/dist/components/typography/Info.js +7 -11
- package/dist/components/typography/Link.js +6 -12
- package/dist/event/ActionHandlers.js +48 -87
- package/dist/event/Event.js +21 -25
- package/dist/event/EventListener.js +54 -48
- package/dist/event/EventType.js +18 -40
- package/dist/event/LoadDataActionHandler.js +10 -31
- package/dist/event/Observable.js +204 -396
- package/dist/event/RouteActionHandler.js +119 -171
- package/dist/event/ScriptActionHandler.js +10 -32
- package/dist/event/ServiceCallActionHandler.js +37 -64
- package/dist/event/SignalGraphActionHandler.js +9 -31
- package/dist/js/Addresses.js +23 -42
- package/dist/js/Calendar.js +41 -89
- package/dist/js/DynamicLib.js +11 -23
- package/dist/js/Media.js +80 -174
- package/dist/js/Validators.js +6 -12
- package/dist/js/Windows.js +22 -40
- package/dist/redux/store/ConfigureStore.js +12 -29
- package/dist/redux/store/DashboardStore.js +47 -120
- package/dist/redux/store/History.js +2 -5
- package/dist/redux/store/SecurityStore.js +22 -65
- package/dist/security/TokenManager.js +29 -53
- package/dist/theme-default.js +3 -8
- package/dist/view/Dashboard.js +140 -308
- package/dist/view/PortalDashboard.js +6 -13
- package/dist/view/Settings.js +3 -11
- package/dist/view/Views.js +15 -35
- package/dist/view/security/ChangePasswordBasic.js +41 -147
- package/dist/view/security/ForgotPassword.js +26 -106
- package/dist/view/security/ForgotPasswordBasic.js +22 -96
- package/dist/view/security/Login.js +29 -117
- package/dist/view/security/LoginBasic.js +28 -108
- package/dist/view/security/LoginInteractionPortal.js +28 -106
- package/dist/view/security/ResetPassword.js +25 -110
- package/dist/view/security/ResetPasswordBasic.js +39 -142
- package/dist/view/security/Security.js +14 -26
- package/package.json +25 -20
|
@@ -4,251 +4,199 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ElementResizeHandler = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
const MIN_WIDTH = 60;
|
|
8
|
+
const MIN_HEIGHT = 40;
|
|
9
|
+
const FULLSCREEN_MARGINS = -10;
|
|
10
|
+
const MARGINS = 4;
|
|
11
|
+
class ElementResizeHandler {
|
|
12
|
+
constructor(pane, ghostPane) {
|
|
13
|
+
this.clicked = null;
|
|
14
|
+
pane.addEventListener('mousedown', this.onMouseDown);
|
|
15
|
+
document.addEventListener('mousemove', this.onMove);
|
|
16
|
+
document.addEventListener('mouseup', this.onUp);
|
|
17
|
+
pane.addEventListener('touchstart', this.onTouchDown);
|
|
18
|
+
document.addEventListener('touchmove', this.onTouchMove);
|
|
19
|
+
document.addEventListener('touchend', this.onTouchEnd);
|
|
20
|
+
this.pane = pane;
|
|
21
|
+
this.ghostPane = ghostPane;
|
|
22
|
+
this.animate();
|
|
23
|
+
}
|
|
24
|
+
setBounds = (element, x, y, w, h) => {
|
|
23
25
|
element.style.left = x + 'px';
|
|
24
26
|
element.style.top = y + 'px';
|
|
25
27
|
element.style.width = w + 'px';
|
|
26
28
|
element.style.height = h + 'px';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
_defineProperty(this, "onTouchDown", function (e) {
|
|
29
|
+
};
|
|
30
|
+
hintHide = () => {
|
|
31
|
+
this.setBounds(this.ghostPane, this.b.left, this.b.top, this.b.width, this.b.height);
|
|
32
|
+
this.ghostPane.style.opacity = 0;
|
|
33
|
+
};
|
|
34
|
+
onTouchDown = e => {
|
|
36
35
|
alert(1);
|
|
37
|
-
|
|
38
|
-
_this.onDown(e.touches[0]);
|
|
39
|
-
|
|
36
|
+
this.onDown(e.touches[0]);
|
|
40
37
|
e.preventDefault();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
_defineProperty(this, "onTouchMove", function (e) {
|
|
38
|
+
};
|
|
39
|
+
onTouchMove = e => {
|
|
44
40
|
alert(1);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
_defineProperty(this, "onTouchEnd", function (e) {
|
|
41
|
+
this.onMove(e.touches[0]);
|
|
42
|
+
};
|
|
43
|
+
onTouchEnd = e => {
|
|
50
44
|
alert(1);
|
|
51
|
-
|
|
52
45
|
if (e.touches.length === 0) {
|
|
53
|
-
|
|
46
|
+
this.onUp(e.changedTouches[0]);
|
|
54
47
|
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
_this.onDown(e);
|
|
59
|
-
|
|
48
|
+
};
|
|
49
|
+
onMouseDown = e => {
|
|
50
|
+
this.onDown(e);
|
|
60
51
|
e.preventDefault();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
x: _this.x,
|
|
69
|
-
y: _this.y,
|
|
52
|
+
};
|
|
53
|
+
onDown = e => {
|
|
54
|
+
this.calc(e);
|
|
55
|
+
var isResizing = this.onRightEdge || this.onBottomEdge || this.onTopEdge || this.onLeftEdge;
|
|
56
|
+
this.clicked = {
|
|
57
|
+
x: this.x,
|
|
58
|
+
y: this.y,
|
|
70
59
|
cx: e.clientX,
|
|
71
60
|
cy: e.clientY,
|
|
72
|
-
w:
|
|
73
|
-
h:
|
|
74
|
-
isResizing:
|
|
75
|
-
isMoving: !
|
|
76
|
-
onTopEdge:
|
|
77
|
-
onLeftEdge:
|
|
78
|
-
onRightEdge:
|
|
79
|
-
onBottomEdge:
|
|
61
|
+
w: this.b.width,
|
|
62
|
+
h: this.b.height,
|
|
63
|
+
isResizing: this.isResizing,
|
|
64
|
+
isMoving: !this.isResizing && this.canMove(),
|
|
65
|
+
onTopEdge: this.onTopEdge,
|
|
66
|
+
onLeftEdge: this.onLeftEdge,
|
|
67
|
+
onRightEdge: this.onRightEdge,
|
|
68
|
+
onBottomEdge: this.onBottomEdge
|
|
80
69
|
};
|
|
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
|
-
|
|
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
|
-
|
|
70
|
+
};
|
|
71
|
+
canMove = () => {
|
|
72
|
+
return this.x > 0 && this.x < this.b.width && this.y > 0 && this.y < this.b.height && this.y < 30;
|
|
73
|
+
};
|
|
74
|
+
calc = e => {
|
|
75
|
+
this.b = this.pane.getBoundingClientRect();
|
|
76
|
+
this.x = e.clientX - this.b.left;
|
|
77
|
+
this.y = e.clientY - this.b.top;
|
|
78
|
+
this.onTopEdge = this.y < MARGINS;
|
|
79
|
+
this.onLeftEdge = this.x < MARGINS;
|
|
80
|
+
this.onRightEdge = this.x >= this.b.width - MARGINS;
|
|
81
|
+
this.onBottomEdge = this.y >= this.b.height - MARGINS;
|
|
82
|
+
this.rightScreenEdge = window.innerWidth - MARGINS;
|
|
83
|
+
this.bottomScreenEdge = window.innerHeight - MARGINS;
|
|
84
|
+
};
|
|
85
|
+
onMove = ee => {
|
|
86
|
+
this.calc(ee);
|
|
87
|
+
this.e = ee;
|
|
88
|
+
this.redraw = true;
|
|
89
|
+
};
|
|
90
|
+
animate = () => {
|
|
91
|
+
requestAnimationFrame(this.animate);
|
|
92
|
+
if (!this.redraw) return;
|
|
93
|
+
this.redraw = false;
|
|
94
|
+
if (this.clicked && this.clicked.isResizing) {
|
|
95
|
+
if (this.clicked.onRightEdge) this.pane.style.width = Math.max(this.x, MIN_WIDTH) + 'px';
|
|
96
|
+
if (this.clicked.onBottomEdge) this.pane.style.height = Math.max(this.y, MIN_HEIGHT) + 'px';
|
|
97
|
+
if (this.clicked.onLeftEdge) {
|
|
98
|
+
var currentWidth = Math.max(this.clicked.cx - this.e.clientX + this.clicked.w, MIN_WIDTH);
|
|
118
99
|
if (currentWidth > MIN_WIDTH) {
|
|
119
|
-
|
|
120
|
-
|
|
100
|
+
this.pane.style.width = currentWidth + 'px';
|
|
101
|
+
this.pane.style.left = this.e.clientX + 'px';
|
|
121
102
|
}
|
|
122
103
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
var currentHeight = Math.max(_this.clicked.cy - _this.e.clientY + _this.clicked.h, MIN_HEIGHT);
|
|
126
|
-
|
|
104
|
+
if (this.clicked.onTopEdge) {
|
|
105
|
+
var currentHeight = Math.max(this.clicked.cy - this.e.clientY + this.clicked.h, MIN_HEIGHT);
|
|
127
106
|
if (currentHeight > MIN_HEIGHT) {
|
|
128
|
-
|
|
129
|
-
|
|
107
|
+
this.pane.style.height = currentHeight + 'px';
|
|
108
|
+
this.pane.style.top = this.e.clientY + 'px';
|
|
130
109
|
}
|
|
131
110
|
}
|
|
132
|
-
|
|
133
|
-
_this.hintHide();
|
|
134
|
-
|
|
111
|
+
this.hintHide();
|
|
135
112
|
return;
|
|
136
113
|
}
|
|
137
|
-
|
|
138
|
-
|
|
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) {
|
|
114
|
+
if (this.clicked && this.clicked.isMoving) {
|
|
115
|
+
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
116
|
// hintFull();
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
} else if (_this.b.top < MARGINS) {
|
|
117
|
+
this.setBounds(this.ghostPane, 0, 0, window.innerWidth, window.innerHeight);
|
|
118
|
+
this.ghostPane.style.opacity = 0.2;
|
|
119
|
+
} else if (this.b.top < MARGINS) {
|
|
145
120
|
// hintTop();
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
} else if (_this.b.left < MARGINS) {
|
|
121
|
+
this.setBounds(this.ghostPane, 0, 0, window.innerWidth, window.innerHeight / 2);
|
|
122
|
+
this.ghostPane.style.opacity = 0.2;
|
|
123
|
+
} else if (this.b.left < MARGINS) {
|
|
150
124
|
// hintLeft();
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
} else if (_this.b.right > _this.rightScreenEdge) {
|
|
125
|
+
this.setBounds(this.ghostPane, 0, 0, window.innerWidth / 2, window.innerHeight);
|
|
126
|
+
this.ghostPane.style.opacity = 0.2;
|
|
127
|
+
} else if (this.b.right > this.rightScreenEdge) {
|
|
155
128
|
// hintRight();
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
} else if (_this.b.bottom > _this.bottomScreenEdge) {
|
|
129
|
+
this.setBounds(this.ghostPane, window.innerWidth / 2, 0, window.innerWidth / 2, window.innerHeight);
|
|
130
|
+
this.ghostPane.style.opacity = 0.2;
|
|
131
|
+
} else if (this.b.bottom > this.bottomScreenEdge) {
|
|
160
132
|
// hintBottom();
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
_this.ghostPane.style.opacity = 0.2;
|
|
133
|
+
this.setBounds(this.ghostPane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
|
|
134
|
+
this.ghostPane.style.opacity = 0.2;
|
|
164
135
|
} else {
|
|
165
|
-
|
|
136
|
+
this.hintHide();
|
|
166
137
|
}
|
|
167
|
-
|
|
168
|
-
|
|
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
|
-
|
|
138
|
+
if (this.preSnapped) {
|
|
139
|
+
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);
|
|
171
140
|
return;
|
|
172
|
-
}
|
|
173
|
-
|
|
141
|
+
}
|
|
174
142
|
|
|
175
|
-
|
|
176
|
-
|
|
143
|
+
// moving
|
|
144
|
+
this.pane.style.top = this.e.clientY - this.clicked.y + 'px';
|
|
145
|
+
this.pane.style.left = this.e.clientX - this.clicked.x + 'px';
|
|
177
146
|
return;
|
|
178
|
-
}
|
|
179
|
-
// style cursor
|
|
147
|
+
}
|
|
180
148
|
|
|
149
|
+
// This code executes when mouse moves without clicking
|
|
181
150
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
151
|
+
// style cursor
|
|
152
|
+
if (this.onRightEdge && this.onBottomEdge || this.onLeftEdge && this.onTopEdge) {
|
|
153
|
+
this.pane.style.cursor = 'nwse-resize';
|
|
154
|
+
} else if (this.onRightEdge && this.onTopEdge || this.onBottomEdge && this.onLeftEdge) {
|
|
155
|
+
this.pane.style.cursor = 'nesw-resize';
|
|
156
|
+
} else if (this.onRightEdge || this.onLeftEdge) {
|
|
157
|
+
this.pane.style.cursor = 'ew-resize';
|
|
158
|
+
} else if (this.onBottomEdge || this.onTopEdge) {
|
|
159
|
+
this.pane.style.cursor = 'ns-resize';
|
|
160
|
+
} else if (this.canMove()) {
|
|
161
|
+
this.pane.style.cursor = 'move';
|
|
192
162
|
} else {
|
|
193
|
-
|
|
163
|
+
this.pane.style.cursor = 'default';
|
|
194
164
|
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
if (_this.clicked && _this.clicked.isMoving) {
|
|
165
|
+
};
|
|
166
|
+
onUp = e => {
|
|
167
|
+
this.calc(e);
|
|
168
|
+
if (this.clicked && this.clicked.isMoving) {
|
|
201
169
|
// Snap
|
|
202
170
|
var snapped = {
|
|
203
|
-
width:
|
|
204
|
-
height:
|
|
171
|
+
width: this.b.width,
|
|
172
|
+
height: this.b.height
|
|
205
173
|
};
|
|
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) {
|
|
174
|
+
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
175
|
// hintFull();
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
} else if (_this.b.top < MARGINS) {
|
|
176
|
+
this.setBounds(this.pane, 0, 0, window.innerWidth, window.innerHeight);
|
|
177
|
+
this.preSnapped = snapped;
|
|
178
|
+
} else if (this.b.top < MARGINS) {
|
|
213
179
|
// hintTop();
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
} else if (_this.b.left < MARGINS) {
|
|
180
|
+
this.setBounds(this.pane, 0, 0, window.innerWidth, window.innerHeight / 2);
|
|
181
|
+
this.preSnapped = snapped;
|
|
182
|
+
} else if (this.b.left < MARGINS) {
|
|
218
183
|
// hintLeft();
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
} else if (_this.b.right > _this.rightScreenEdge) {
|
|
184
|
+
this.setBounds(this.pane, 0, 0, window.innerWidth / 2, window.innerHeight);
|
|
185
|
+
this.preSnapped = snapped;
|
|
186
|
+
} else if (this.b.right > this.rightScreenEdge) {
|
|
223
187
|
// hintRight();
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
} else if (_this.b.bottom > _this.bottomScreenEdge) {
|
|
188
|
+
this.setBounds(this.pane, window.innerWidth / 2, 0, window.innerWidth / 2, window.innerHeight);
|
|
189
|
+
this.preSnapped = snapped;
|
|
190
|
+
} else if (this.b.bottom > this.bottomScreenEdge) {
|
|
228
191
|
// hintBottom();
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
_this.preSnapped = snapped;
|
|
192
|
+
this.setBounds(this.pane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
|
|
193
|
+
this.preSnapped = snapped;
|
|
232
194
|
} else {
|
|
233
|
-
|
|
195
|
+
this.preSnapped = null;
|
|
234
196
|
}
|
|
235
|
-
|
|
236
|
-
_this.hintHide();
|
|
197
|
+
this.hintHide();
|
|
237
198
|
}
|
|
238
|
-
|
|
239
|
-
|
|
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
|
-
};
|
|
253
|
-
|
|
199
|
+
this.clicked = null;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
254
202
|
exports.ElementResizeHandler = ElementResizeHandler;
|
|
@@ -1,72 +1,35 @@
|
|
|
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
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
8
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
13
|
-
|
|
14
9
|
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
15
|
-
|
|
16
10
|
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
17
|
-
|
|
18
11
|
var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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); }
|
|
31
|
-
|
|
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; }
|
|
33
|
-
|
|
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; }
|
|
35
|
-
|
|
36
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
-
|
|
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 () {
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
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; }
|
|
15
|
+
const location = window.location.protocol + '//' + window.location.hostname;
|
|
16
|
+
const FileThumb = props => {
|
|
17
|
+
const [file] = (0, _react.useState)(props.file);
|
|
18
|
+
const [downloadUrl, setDownloadUrl] = (0, _react.useState)(null);
|
|
19
|
+
_react.default.useEffect(() => {
|
|
51
20
|
if (file) {
|
|
52
21
|
setDownloadUrl(location + _ApplicationManager.default.getContextRoot() + '/docs/api/v1/manager/download/' + file.repositoryId + '?access_token=' + sessionStorage.getItem('accessToken') + '&idToken=' + sessionStorage.getItem('idToken'));
|
|
53
22
|
}
|
|
54
23
|
}, [file]);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var _file$type;
|
|
58
|
-
|
|
59
|
-
return (_file$type = file.type) === null || _file$type === void 0 ? void 0 : _file$type.startsWith('image/');
|
|
24
|
+
const isImage = () => {
|
|
25
|
+
return file.type?.startsWith('image/');
|
|
60
26
|
};
|
|
61
|
-
|
|
62
|
-
var getThumbImage = function getThumbImage() {
|
|
27
|
+
const getThumbImage = () => {
|
|
63
28
|
if (!file || !file.type) {
|
|
64
29
|
return 'default-file-thumb.png';
|
|
65
30
|
}
|
|
66
|
-
|
|
67
31
|
return file.type === 'application/pdf' ? 'pdf-icon.png' : file.type === 'application/msword' ? 'doc.png' : file.type.startsWith('video/') ? 'media.png' : file.type.startsWith('audio/') ? 'media.png' : file.type === 'application/zip' ? 'zip.png' : file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ? 'doc.png' : file.type === 'application/vnd.ms-excel' ? 'excel.png' : file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ? 'excel.png' : file.type === 'application/vnd.ms-powerpoint' ? 'powerpoint.png' : 'default-file-thumb.png';
|
|
68
32
|
};
|
|
69
|
-
|
|
70
33
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
71
34
|
className: 'row',
|
|
72
35
|
style: {
|
|
@@ -100,9 +63,7 @@ var FileThumb = function FileThumb(props) {
|
|
|
100
63
|
width: '8px',
|
|
101
64
|
height: '8px'
|
|
102
65
|
},
|
|
103
|
-
onClick:
|
|
104
|
-
return props.onDelete(file);
|
|
105
|
-
}
|
|
66
|
+
onClick: () => props.onDelete(file)
|
|
106
67
|
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
107
68
|
id: 'DELETE'
|
|
108
69
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -119,7 +80,7 @@ var FileThumb = function FileThumb(props) {
|
|
|
119
80
|
cursor: 'pointer'
|
|
120
81
|
},
|
|
121
82
|
target: "_blank",
|
|
122
|
-
href:
|
|
83
|
+
href: `${downloadUrl}`
|
|
123
84
|
}, file.name) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, file.name))), /*#__PURE__*/_react.default.createElement("div", {
|
|
124
85
|
className: 'row',
|
|
125
86
|
style: {
|
|
@@ -139,10 +100,8 @@ var FileThumb = function FileThumb(props) {
|
|
|
139
100
|
backgroundSize: 'contain',
|
|
140
101
|
backgroundPosition: 'center',
|
|
141
102
|
backgroundColor: 'transparent',
|
|
142
|
-
backgroundImage: isImage() ?
|
|
103
|
+
backgroundImage: isImage() ? `url(${file.repositoryId ? downloadUrl : file.payload})` : `url(${require('../assets/img/' + getThumbImage())})`
|
|
143
104
|
}
|
|
144
105
|
})));
|
|
145
106
|
};
|
|
146
|
-
|
|
147
|
-
var _default = FileThumb;
|
|
148
|
-
exports.default = _default;
|
|
107
|
+
var _default = exports.default = FileThumb;
|