@agilemotion/oui-react-js 1.6.3 → 1.6.5

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.
Files changed (219) hide show
  1. package/dist/ApplicationManager.js +675 -1044
  2. package/dist/BasicApp.js +7 -27
  3. package/dist/BasicAppHome.js +27 -101
  4. package/dist/DynamicJS.js +109 -197
  5. package/dist/InteractionPortalApp.js +7 -27
  6. package/dist/InteractionPortalAppHome.js +21 -87
  7. package/dist/InteractionPortalApp_old.js +60 -122
  8. package/dist/RestUtils.js +269 -410
  9. package/dist/TypedValue.js +20 -26
  10. package/dist/Utils.js +295 -481
  11. package/dist/WithRouter.js +9 -17
  12. package/dist/assets/jss/components/authNavbarStyle.js +168 -171
  13. package/dist/assets/jss/components/buttonStyle.js +2 -5
  14. package/dist/assets/jss/components/cardAvatarStyle.js +2 -5
  15. package/dist/assets/jss/components/cardBodyStyle.js +2 -5
  16. package/dist/assets/jss/components/cardFooterStyle.js +2 -5
  17. package/dist/assets/jss/components/cardHeaderStyle.js +20 -17
  18. package/dist/assets/jss/components/cardIconStyle.js +2 -5
  19. package/dist/assets/jss/components/cardStyle.js +2 -5
  20. package/dist/assets/jss/components/cardTextStyle.js +2 -5
  21. package/dist/assets/jss/components/customDropdownStyle.js +171 -173
  22. package/dist/assets/jss/components/customInputStyle.js +5 -13
  23. package/dist/assets/jss/components/dropdownStyle.js +71 -74
  24. package/dist/assets/jss/components/footerStyle.js +14 -23
  25. package/dist/assets/jss/components/headerLinksStyle.js +52 -53
  26. package/dist/assets/jss/components/headerStyle.js +68 -73
  27. package/dist/assets/jss/components/navbarLinksStyle.js +81 -74
  28. package/dist/assets/jss/components/navbarStyle.js +79 -84
  29. package/dist/assets/jss/components/sidebarStyle.js +438 -441
  30. package/dist/assets/jss/components/typographyStyle.js +5 -13
  31. package/dist/assets/jss/rootStyle.js +85 -151
  32. package/dist/assets/jss/views/layoutStyle.js +45 -51
  33. package/dist/assets/jss/views/loginBasicStyle.js +2 -5
  34. package/dist/assets/jss/views/loginBusinessPortalStyle.js +2 -5
  35. package/dist/assets/jss/views/loginStyle.js +80 -87
  36. package/dist/components/AlertBar.js +20 -75
  37. package/dist/components/AlertItem.js +13 -49
  38. package/dist/components/AlertTemplate.js +12 -18
  39. package/dist/components/Button.js +41 -112
  40. package/dist/components/Calendar.js +99 -208
  41. package/dist/components/ConfirmationDialog.js +13 -54
  42. package/dist/components/DataGrid.js +271 -695
  43. package/dist/components/DataGridColumn.js +24 -74
  44. package/dist/components/DataGridFilter.js +107 -245
  45. package/dist/components/DataGridHeading.js +34 -78
  46. package/dist/components/Dialog.js +37 -130
  47. package/dist/components/DocumentTemplateDesigner.js +16 -57
  48. package/dist/components/DocumentTemplateDesignerComponent.js +47 -141
  49. package/dist/components/DocumentTemplatePlaceholderDialog.js +34 -67
  50. package/dist/components/DocumentViewer.js +25 -65
  51. package/dist/components/DocumentViewerComponent.js +13 -44
  52. package/dist/components/ElementResizeHandler.js +148 -200
  53. package/dist/components/FileThumb.js +15 -56
  54. package/dist/components/Graph.js +98 -203
  55. package/dist/components/GraphNode.js +20 -61
  56. package/dist/components/HtmlPanel.js +38 -105
  57. package/dist/components/Icon.js +174 -253
  58. package/dist/components/LoadingIndicator.js +4 -11
  59. package/dist/components/LottieIcon.js +63 -60
  60. package/dist/components/PopupView.js +21 -60
  61. package/dist/components/Portlet.js +18 -60
  62. package/dist/components/RegularButton.js +34 -42
  63. package/dist/components/SignaturePanel.js +19 -67
  64. package/dist/components/SocketManager.js +133 -228
  65. package/dist/components/StepperTitleBar.js +48 -99
  66. package/dist/components/TabPage.js +30 -47
  67. package/dist/components/TabPanel.js +35 -122
  68. package/dist/components/TableCellContent.js +34 -98
  69. package/dist/components/TemplateDesigner.js +115 -230
  70. package/dist/components/TemplateItemEventHandler.js +298 -481
  71. package/dist/components/TemplateTable.js +117 -218
  72. package/dist/components/TitleBar.js +15 -53
  73. package/dist/components/Toolbar.js +44 -110
  74. package/dist/components/Tooltip.js +37 -56
  75. package/dist/components/Tree.js +50 -143
  76. package/dist/components/UseIsVisible.js +5 -25
  77. package/dist/components/card/Card.js +35 -39
  78. package/dist/components/card/CardAvatar.js +21 -32
  79. package/dist/components/card/CardBody.js +29 -36
  80. package/dist/components/card/CardFooter.js +26 -35
  81. package/dist/components/card/CardHeader.js +29 -36
  82. package/dist/components/card/CardIcon.js +15 -29
  83. package/dist/components/card/CardText.js +15 -29
  84. package/dist/components/customInput/CustomInput.js +38 -40
  85. package/dist/components/dashboard/FoldingSideTabDashboard.js +65 -184
  86. package/dist/components/dashboard/SideMenuModuleDashboard.js +67 -185
  87. package/dist/components/dashboard/TopMenuModuleDashboard.js +22 -63
  88. package/dist/components/dashboard/components/Header.js +15 -52
  89. package/dist/components/dashboard/components/LeftDrawer.js +9 -23
  90. package/dist/components/dashboard/components/UserIdentity.js +4 -12
  91. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +115 -155
  92. package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +344 -419
  93. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +15 -29
  94. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +405 -485
  95. package/dist/components/dashboard/components/portal/Timeline.js +3 -8
  96. package/dist/components/dashboard/components/portal/Workspace.js +4 -13
  97. package/dist/components/footer/Footer.js +23 -45
  98. package/dist/components/footer/HomeFooter.js +38 -78
  99. package/dist/components/form/AddressSearch.js +26 -76
  100. package/dist/components/form/AutoComplete.js +54 -168
  101. package/dist/components/form/BaseField.js +59 -189
  102. package/dist/components/form/Checkbox.js +11 -24
  103. package/dist/components/form/DatePicker.js +28 -82
  104. package/dist/components/form/FieldSet.js +84 -300
  105. package/dist/components/form/Form.js +206 -501
  106. package/dist/components/form/GridField.js +83 -243
  107. package/dist/components/form/IconField.js +10 -21
  108. package/dist/components/form/ImageEditor.js +98 -208
  109. package/dist/components/form/LabelField.js +13 -28
  110. package/dist/components/form/LookupField.js +36 -102
  111. package/dist/components/form/MultiFileUploadField.js +67 -134
  112. package/dist/components/form/RadioGroup.js +20 -57
  113. package/dist/components/form/Section.js +33 -118
  114. package/dist/components/form/SelectItem.js +36 -83
  115. package/dist/components/form/SignatureTemplateDesignerField.js +12 -26
  116. package/dist/components/form/Switch.js +11 -24
  117. package/dist/components/form/TextField.js +19 -55
  118. package/dist/components/form/TimePicker.js +18 -43
  119. package/dist/components/form/TransferList.js +76 -200
  120. package/dist/components/form/UploadField.js +134 -256
  121. package/dist/components/grid/GridContainer.js +10 -23
  122. package/dist/components/grid/GridItem.js +10 -23
  123. package/dist/components/layout/CollapsiblePanel.js +20 -59
  124. package/dist/components/layout/Layout.js +40 -149
  125. package/dist/components/layout/View.js +65 -195
  126. package/dist/components/layout/ViewContainer.js +13 -33
  127. package/dist/components/layout/ViewPort.js +14 -48
  128. package/dist/components/layout/Window.js +62 -135
  129. package/dist/components/layout/WindowViewPort.js +18 -63
  130. package/dist/components/media/ClosablePanel.js +9 -18
  131. package/dist/components/media/LobbyWaitingList.js +11 -17
  132. package/dist/components/media/MediaSoupHelper.js +173 -401
  133. package/dist/components/media/SideBarContent.js +17 -34
  134. package/dist/components/media/SocketRequest.js +7 -18
  135. package/dist/components/media/SocketResponse.js +5 -14
  136. package/dist/components/media/Timer.js +18 -54
  137. package/dist/components/media/Toolbar.js +97 -254
  138. package/dist/components/media/ToolbarButton.js +34 -95
  139. package/dist/components/media/Toolbar_bck.js +70 -186
  140. package/dist/components/media/Tracks.js +19 -33
  141. package/dist/components/media/TrainingRoom.js +121 -374
  142. package/dist/components/media/Transports.js +17 -29
  143. package/dist/components/media/VCEventManager.js +45 -116
  144. package/dist/components/media/VCEventType.js +82 -168
  145. package/dist/components/media/VCParticipantList.js +16 -51
  146. package/dist/components/media/VCParticipantListItem.js +44 -141
  147. package/dist/components/media/VCRoom.js +14 -58
  148. package/dist/components/media/VCRoomParticipant.js +235 -556
  149. package/dist/components/media/VCRoomRecorder.js +106 -204
  150. package/dist/components/media/VCRoomWorkspace.js +248 -584
  151. package/dist/components/media/Video.js +27 -112
  152. package/dist/components/media/VideoPlayer.js +23 -91
  153. package/dist/components/media/chat/ChatRoom.js +143 -361
  154. package/dist/components/media/chat/ChatRoomItem.js +17 -58
  155. package/dist/components/media/chat/ChatRoomList.js +15 -60
  156. package/dist/components/menu/CollapsibleMenu.js +22 -52
  157. package/dist/components/menu/MenuBars.js +50 -116
  158. package/dist/components/menu/MenuButton.js +53 -130
  159. package/dist/components/menu/MenuItem.js +11 -51
  160. package/dist/components/menu/MenuLink.js +13 -41
  161. package/dist/components/menu/PopupMenu.js +13 -25
  162. package/dist/components/navbars/AuthNavbar.js +21 -56
  163. package/dist/components/navbars/HomeNavbar.js +213 -290
  164. package/dist/components/navbars/PortalNavbar.js +26 -81
  165. package/dist/components/signatures/AgilitySignaturePanel.js +41 -135
  166. package/dist/components/signatures/AlertItem.js +14 -50
  167. package/dist/components/signatures/Card.js +6 -16
  168. package/dist/components/signatures/DocumentContainer.js +57 -165
  169. package/dist/components/signatures/ImageSignatureInput.js +64 -124
  170. package/dist/components/signatures/MenuButton.js +28 -63
  171. package/dist/components/signatures/Prompt.js +6 -41
  172. package/dist/components/signatures/ResponsiveTable.js +181 -370
  173. package/dist/components/signatures/SearchView.js +34 -112
  174. package/dist/components/signatures/SignatorySearch.js +11 -44
  175. package/dist/components/signatures/SignatorySearchForm.js +19 -50
  176. package/dist/components/signatures/SignatureInput.js +28 -91
  177. package/dist/components/signatures/SignatureInputProps.js +49 -144
  178. package/dist/components/signatures/SignatureTemplateDesigner.js +230 -430
  179. package/dist/components/signatures/Toolbar.js +99 -173
  180. package/dist/components/signatures/ViewUtils.js +207 -313
  181. package/dist/components/typography/Danger.js +6 -11
  182. package/dist/components/typography/Info.js +7 -11
  183. package/dist/components/typography/Link.js +6 -12
  184. package/dist/event/ActionHandlers.js +48 -87
  185. package/dist/event/Event.js +21 -25
  186. package/dist/event/EventListener.js +54 -48
  187. package/dist/event/EventType.js +18 -40
  188. package/dist/event/LoadDataActionHandler.js +10 -31
  189. package/dist/event/Observable.js +204 -396
  190. package/dist/event/RouteActionHandler.js +119 -171
  191. package/dist/event/ScriptActionHandler.js +10 -32
  192. package/dist/event/ServiceCallActionHandler.js +37 -64
  193. package/dist/event/SignalGraphActionHandler.js +9 -31
  194. package/dist/js/Addresses.js +23 -42
  195. package/dist/js/Calendar.js +41 -89
  196. package/dist/js/DynamicLib.js +11 -23
  197. package/dist/js/Media.js +80 -174
  198. package/dist/js/Validators.js +6 -12
  199. package/dist/js/Windows.js +22 -40
  200. package/dist/redux/store/ConfigureStore.js +12 -29
  201. package/dist/redux/store/DashboardStore.js +47 -120
  202. package/dist/redux/store/History.js +2 -5
  203. package/dist/redux/store/SecurityStore.js +22 -65
  204. package/dist/security/TokenManager.js +29 -53
  205. package/dist/theme-default.js +3 -8
  206. package/dist/view/Dashboard.js +140 -308
  207. package/dist/view/PortalDashboard.js +6 -13
  208. package/dist/view/Settings.js +3 -11
  209. package/dist/view/Views.js +15 -35
  210. package/dist/view/security/ChangePasswordBasic.js +41 -147
  211. package/dist/view/security/ForgotPassword.js +26 -106
  212. package/dist/view/security/ForgotPasswordBasic.js +22 -96
  213. package/dist/view/security/Login.js +29 -117
  214. package/dist/view/security/LoginBasic.js +28 -108
  215. package/dist/view/security/LoginInteractionPortal.js +28 -106
  216. package/dist/view/security/ResetPassword.js +25 -110
  217. package/dist/view/security/ResetPasswordBasic.js +39 -142
  218. package/dist/view/security/Security.js +14 -26
  219. package/package.json +26 -21
@@ -4,251 +4,199 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ElementResizeHandler = void 0;
7
-
8
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9
-
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; }
11
-
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) {
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
- _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) {
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
- _this.onMove(e.touches[0]);
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
- _this.onUp(e.changedTouches[0]);
46
+ this.onUp(e.changedTouches[0]);
54
47
  }
55
- });
56
-
57
- _defineProperty(this, "onMouseDown", function (e) {
58
- _this.onDown(e);
59
-
48
+ };
49
+ onMouseDown = e => {
50
+ this.onDown(e);
60
51
  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,
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: _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
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
- _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
-
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
- _this.pane.style.width = currentWidth + 'px';
120
- _this.pane.style.left = _this.e.clientX + 'px';
100
+ this.pane.style.width = currentWidth + 'px';
101
+ this.pane.style.left = this.e.clientX + 'px';
121
102
  }
122
103
  }
123
-
124
- if (_this.clicked.onTopEdge) {
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
- _this.pane.style.height = currentHeight + 'px';
129
- _this.pane.style.top = _this.e.clientY + 'px';
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
- 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) {
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
- _this.setBounds(_this.ghostPane, 0, 0, window.innerWidth, window.innerHeight);
142
-
143
- _this.ghostPane.style.opacity = 0.2;
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
- _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) {
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
- _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) {
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
- _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) {
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
- _this.setBounds(_this.ghostPane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
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
- _this.hintHide();
136
+ this.hintHide();
166
137
  }
167
-
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
-
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
- } // moving
173
-
141
+ }
174
142
 
175
- _this.pane.style.top = _this.e.clientY - _this.clicked.y + 'px';
176
- _this.pane.style.left = _this.e.clientX - _this.clicked.x + 'px';
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
- } // This code executes when mouse moves without clicking
179
- // style cursor
147
+ }
180
148
 
149
+ // This code executes when mouse moves without clicking
181
150
 
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';
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
- _this.pane.style.cursor = 'default';
163
+ this.pane.style.cursor = 'default';
194
164
  }
195
- });
196
-
197
- _defineProperty(this, "onUp", function (e) {
198
- _this.calc(e);
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: _this.b.width,
204
- height: _this.b.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
- _this.setBounds(_this.pane, 0, 0, window.innerWidth, window.innerHeight);
210
-
211
- _this.preSnapped = snapped;
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
- _this.setBounds(_this.pane, 0, 0, window.innerWidth, window.innerHeight / 2);
215
-
216
- _this.preSnapped = snapped;
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
- _this.setBounds(_this.pane, 0, 0, window.innerWidth / 2, window.innerHeight);
220
-
221
- _this.preSnapped = snapped;
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
- _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) {
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
- _this.setBounds(_this.pane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
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
- _this.preSnapped = null;
195
+ this.preSnapped = null;
234
196
  }
235
-
236
- _this.hintHide();
197
+ this.hintHide();
237
198
  }
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
- };
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
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); }
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
- var isImage = function isImage() {
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: function 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: "".concat(downloadUrl)
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() ? "url(".concat(file.repositoryId ? downloadUrl : file.payload, ")") : "url(".concat(require('../assets/img/' + getThumbImage()), ")")
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;