@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.
- package/dist/ApplicationManager.js +675 -1044
- package/dist/BasicApp.js +7 -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 +26 -21
|
@@ -4,248 +4,147 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
9
|
-
|
|
10
|
-
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); }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
13
|
-
|
|
14
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
-
|
|
16
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
17
|
-
|
|
18
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
var boundCheck = function boundCheck(pos, mousePos) {
|
|
7
|
+
const boundCheck = (pos, mousePos) => {
|
|
23
8
|
return pos - 8 < mousePos && pos + 8 > mousePos;
|
|
24
9
|
};
|
|
25
|
-
|
|
26
|
-
var parse = function parse(val) {
|
|
10
|
+
const parse = val => {
|
|
27
11
|
return parseFloat(val.replace('px', ''));
|
|
28
12
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var TemplateTable = /*#__PURE__*/function () {
|
|
33
|
-
function TemplateTable(config, parent) {
|
|
34
|
-
var _this2 = this;
|
|
35
|
-
|
|
36
|
-
_classCallCheck(this, TemplateTable);
|
|
37
|
-
|
|
38
|
-
_defineProperty(this, "handleMouseMove", function (event) {
|
|
39
|
-
if (_this2.currentResizeCol && _this2.mouseDown) {}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
_defineProperty(this, "getElementWidth", function (el) {
|
|
43
|
-
return el ? parseFloat(el.style.width.replace("px", "")) : null;
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
_defineProperty(this, "build", function (colResizeHandler, parentSelectionChecker) {
|
|
47
|
-
var tableConfig = _this2.config;
|
|
48
|
-
var tableHeight = tableConfig.defaultRowHeight * tableConfig.defaultNumRows;
|
|
49
|
-
var tableWidth = 0;
|
|
50
|
-
|
|
51
|
-
var _iterator = _createForOfIteratorHelper(tableConfig.columns),
|
|
52
|
-
_step;
|
|
53
|
-
|
|
54
|
-
try {
|
|
55
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
56
|
-
var column = _step.value;
|
|
57
|
-
tableWidth += column.defaultWidth;
|
|
58
|
-
}
|
|
59
|
-
} catch (err) {
|
|
60
|
-
_iterator.e(err);
|
|
61
|
-
} finally {
|
|
62
|
-
_iterator.f();
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
var table = document.createElement("div");
|
|
66
|
-
table['data-num-cols'] = tableConfig.columns.length;
|
|
67
|
-
table.className = '_item_table';
|
|
68
|
-
table.style.border = '1px solid #aaa';
|
|
69
|
-
table.style.width = tableWidth + 'px';
|
|
70
|
-
table.style.height = tableHeight + 'px';
|
|
71
|
-
var sortedCols = tableConfig.columns.sort(function (a, b) {
|
|
72
|
-
return a.id - b.id;
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
for (var i = 0; i < tableConfig.defaultNumRows; i++) {
|
|
76
|
-
table.appendChild(_this2.createRow(tableConfig, sortedCols, tableWidth, i, colResizeHandler, parentSelectionChecker));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return table;
|
|
80
|
-
});
|
|
81
|
-
|
|
13
|
+
const DEFAULT_COL_WIDTH = 32;
|
|
14
|
+
class TemplateTable {
|
|
15
|
+
constructor(config, parent) {
|
|
82
16
|
this.config = config;
|
|
83
17
|
this.parent = parent;
|
|
84
|
-
|
|
85
|
-
var _this = this;
|
|
86
|
-
|
|
18
|
+
const _this = this;
|
|
87
19
|
document.addEventListener("mousemove", this.handleMouseMove);
|
|
88
|
-
document.addEventListener("mousedown",
|
|
89
|
-
return _this2.mouseDown = true;
|
|
90
|
-
});
|
|
20
|
+
document.addEventListener("mousedown", e => this.mouseDown = true);
|
|
91
21
|
document.addEventListener('mouseup', function (e) {
|
|
92
22
|
_this.currentClientX = null;
|
|
93
23
|
_this.curResizeColWidth = null;
|
|
94
24
|
_this.curResizeNxtColWidth = null;
|
|
95
25
|
_this.mouseDown = false;
|
|
96
|
-
|
|
97
26
|
_this.setResizingBorderWidth('1px');
|
|
98
27
|
});
|
|
99
28
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (boundCheck(parentOffset + e.target.offsetLeft + parse(e.target.style.width), e.clientX)) {
|
|
111
|
-
if (parentSelectionChecker(_this3.parent)) {
|
|
112
|
-
e.target.style.cursor = 'ew-resize';
|
|
113
|
-
_this3.currentResizeCol = e.target;
|
|
114
|
-
colResizeHandler(true, last || first);
|
|
115
|
-
}
|
|
116
|
-
} else {
|
|
117
|
-
if (!_this3.mouseDown) {
|
|
118
|
-
e.target.style.cursor = 'default';
|
|
119
|
-
_this3.currentResizeCol = null;
|
|
120
|
-
colResizeHandler(false, last || first);
|
|
121
|
-
}
|
|
122
|
-
} //console.log(this.currentResizeCol + " : " + this.mouseDown + " : " + this.currentClientX + " : " + this.curResizeNxtColWidth);
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (_this3.currentResizeCol && _this3.mouseDown && _this3.currentClientX && _this3.curResizeNxtColWidth) {
|
|
126
|
-
var diffX = e.clientX - _this.currentClientX;
|
|
127
|
-
var width = _this.curResizeColWidth + diffX;
|
|
128
|
-
var nextWidth = _this.curResizeNxtColWidth - diffX;
|
|
129
|
-
var index = _this3.currentResizeCol['data-index'];
|
|
130
|
-
|
|
131
|
-
if (width >= DEFAULT_COL_WIDTH && nextWidth >= DEFAULT_COL_WIDTH) {
|
|
132
|
-
//console.log(width + " : " + nextWidth + " : " + DEFAULT_COL_WIDTH);
|
|
133
|
-
_this3.resizeColumn(index, width);
|
|
134
|
-
|
|
135
|
-
_this3.resizeColumn(index + 1, nextWidth);
|
|
136
|
-
}
|
|
29
|
+
addColMouseMoveEvent(col, colResizeHandler, parentSelectionChecker, first, last) {
|
|
30
|
+
col.addEventListener("mousemove", e => {
|
|
31
|
+
const _this = this;
|
|
32
|
+
let parentOffset = this.parent.offsetLeft + this.parent.parentElement.offsetLeft;
|
|
33
|
+
if (boundCheck(parentOffset + e.target.offsetLeft + parse(e.target.style.width), e.clientX)) {
|
|
34
|
+
if (parentSelectionChecker(this.parent)) {
|
|
35
|
+
e.target.style.cursor = 'ew-resize';
|
|
36
|
+
this.currentResizeCol = e.target;
|
|
37
|
+
colResizeHandler(true, last || first);
|
|
137
38
|
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
if (elements && elements.length > 0) {
|
|
146
|
-
var _iterator2 = _createForOfIteratorHelper(elements),
|
|
147
|
-
_step2;
|
|
39
|
+
} else {
|
|
40
|
+
if (!this.mouseDown) {
|
|
41
|
+
e.target.style.cursor = 'default';
|
|
42
|
+
this.currentResizeCol = null;
|
|
43
|
+
colResizeHandler(false, last || first);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
148
46
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
47
|
+
//console.log(this.currentResizeCol + " : " + this.mouseDown + " : " + this.currentClientX + " : " + this.curResizeNxtColWidth);
|
|
48
|
+
if (this.currentResizeCol && this.mouseDown && this.currentClientX && this.curResizeNxtColWidth) {
|
|
49
|
+
let diffX = e.clientX - _this.currentClientX;
|
|
50
|
+
let width = _this.curResizeColWidth + diffX;
|
|
51
|
+
let nextWidth = _this.curResizeNxtColWidth - diffX;
|
|
52
|
+
let index = this.currentResizeCol['data-index'];
|
|
53
|
+
if (width >= DEFAULT_COL_WIDTH && nextWidth >= DEFAULT_COL_WIDTH) {
|
|
54
|
+
//console.log(width + " : " + nextWidth + " : " + DEFAULT_COL_WIDTH);
|
|
55
|
+
this.resizeColumn(index, width);
|
|
56
|
+
this.resizeColumn(index + 1, nextWidth);
|
|
158
57
|
}
|
|
159
58
|
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
resizeColumn(index, width) {
|
|
62
|
+
let elements = this.currentResizeCol.parentElement.parentElement.getElementsByClassName(`_item_table_col_${index}`);
|
|
63
|
+
if (elements && elements.length > 0) {
|
|
64
|
+
for (const element of elements) {
|
|
65
|
+
element.style.width = width + 'px';
|
|
66
|
+
}
|
|
160
67
|
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
var _iterator3 = _createForOfIteratorHelper(elements),
|
|
171
|
-
_step3;
|
|
172
|
-
|
|
173
|
-
try {
|
|
174
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
175
|
-
var element = _step3.value;
|
|
176
|
-
element.style.borderWidth = width;
|
|
177
|
-
}
|
|
178
|
-
} catch (err) {
|
|
179
|
-
_iterator3.e(err);
|
|
180
|
-
} finally {
|
|
181
|
-
_iterator3.f();
|
|
182
|
-
}
|
|
68
|
+
}
|
|
69
|
+
setResizingBorderWidth(width) {
|
|
70
|
+
if (this.currentResizeCol) {
|
|
71
|
+
this.currentResizeCol.style.borderWidth = width;
|
|
72
|
+
let index = this.currentResizeCol['data-index'];
|
|
73
|
+
let elements = this.currentResizeCol.parentElement.parentElement.getElementsByClassName(`_item_table_col_${index}`);
|
|
74
|
+
if (elements && elements.length > 0) {
|
|
75
|
+
for (const element of elements) {
|
|
76
|
+
element.style.borderWidth = width;
|
|
183
77
|
}
|
|
184
78
|
}
|
|
185
79
|
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
80
|
+
}
|
|
81
|
+
handleMouseMove = event => {
|
|
82
|
+
if (this.currentResizeCol && this.mouseDown) {}
|
|
83
|
+
};
|
|
84
|
+
getElementWidth = el => {
|
|
85
|
+
return el ? parseFloat(el.style.width.replace("px", "")) : null;
|
|
86
|
+
};
|
|
87
|
+
createRow(tableConfig, cols, tableWidth, index, colResizeHandler, parentSelectionChecker) {
|
|
88
|
+
let row = document.createElement("div");
|
|
89
|
+
row.className = '_item_table_tr row';
|
|
90
|
+
row.style.width = '100%';
|
|
91
|
+
row.style.margin = '0';
|
|
92
|
+
row.style.height = tableConfig.defaultRowHeight + 'px';
|
|
93
|
+
let last = tableConfig.defaultNumRows.length - 1 === index;
|
|
94
|
+
if (!last) {
|
|
95
|
+
row.style.borderBottom = '1px solid #aaa';
|
|
96
|
+
}
|
|
97
|
+
for (let i = 0; i < cols.length; i++) {
|
|
98
|
+
let col = cols[i];
|
|
99
|
+
let colEl = document.createElement("div");
|
|
100
|
+
colEl.style.width = col.defaultWidth - 1 + 'px';
|
|
101
|
+
if (i !== cols.length - 1) {
|
|
102
|
+
colEl.style.borderRight = '1px solid #aaa';
|
|
200
103
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
104
|
+
colEl.className = `_item_table_td _item_table_col_${i} col-*-*`;
|
|
105
|
+
colEl['data-index'] = i;
|
|
106
|
+
colEl.style.minWidth = DEFAULT_COL_WIDTH + 'px';
|
|
107
|
+
colEl.style.height = '100%';
|
|
108
|
+
colEl.style.whiteSpace = 'nowrap';
|
|
109
|
+
colEl.style.overflow = 'hidden';
|
|
110
|
+
colEl.style.textOverflow = 'ellipsis';
|
|
111
|
+
colEl.style.display = 'inline-block';
|
|
112
|
+
colEl.style.float = 'none';
|
|
113
|
+
colEl.innerText = col.columnId;
|
|
114
|
+
this.addColMouseMoveEvent(colEl, colResizeHandler, parentSelectionChecker, i === 0, i === cols.length - 1);
|
|
115
|
+
const _this = this;
|
|
116
|
+
colEl.addEventListener('mousedown', function (e) {
|
|
117
|
+
_this.currentClientX = e.clientX;
|
|
118
|
+
_this.curResizeColWidth = _this.getElementWidth(colEl);
|
|
119
|
+
let index = e.target['data-index'];
|
|
120
|
+
let elements = row.parentElement.getElementsByClassName(`_item_table_col_${index + 1}`);
|
|
121
|
+
if (elements && elements.length > 0) {
|
|
122
|
+
_this.curResizeNxtColWidth = _this.getElementWidth(elements[0]);
|
|
209
123
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
colEl.style.minWidth = DEFAULT_COL_WIDTH + 'px';
|
|
214
|
-
colEl.style.height = '100%';
|
|
215
|
-
colEl.style.whiteSpace = 'nowrap';
|
|
216
|
-
colEl.style.overflow = 'hidden';
|
|
217
|
-
colEl.style.textOverflow = 'ellipsis';
|
|
218
|
-
colEl.style.display = 'inline-block';
|
|
219
|
-
colEl.style.float = 'none';
|
|
220
|
-
colEl.innerText = col.columnId;
|
|
221
|
-
|
|
222
|
-
_this4.addColMouseMoveEvent(colEl, colResizeHandler, parentSelectionChecker, i === 0, i === cols.length - 1);
|
|
223
|
-
|
|
224
|
-
var _this = _this4;
|
|
225
|
-
colEl.addEventListener('mousedown', function (e) {
|
|
226
|
-
_this.currentClientX = e.clientX;
|
|
227
|
-
_this.curResizeColWidth = _this.getElementWidth(colEl);
|
|
228
|
-
var index = e.target['data-index'];
|
|
229
|
-
var elements = row.parentElement.getElementsByClassName("_item_table_col_".concat(index + 1));
|
|
230
|
-
|
|
231
|
-
if (elements && elements.length > 0) {
|
|
232
|
-
_this.curResizeNxtColWidth = _this.getElementWidth(elements[0]);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
_this.setResizingBorderWidth('2px');
|
|
236
|
-
});
|
|
237
|
-
row.appendChild(colEl);
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
for (var i = 0; i < cols.length; i++) {
|
|
241
|
-
_loop(i);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
return row;
|
|
124
|
+
_this.setResizingBorderWidth('2px');
|
|
125
|
+
});
|
|
126
|
+
row.appendChild(colEl);
|
|
245
127
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
128
|
+
return row;
|
|
129
|
+
}
|
|
130
|
+
build = (colResizeHandler, parentSelectionChecker) => {
|
|
131
|
+
let tableConfig = this.config;
|
|
132
|
+
let tableHeight = tableConfig.defaultRowHeight * tableConfig.defaultNumRows;
|
|
133
|
+
let tableWidth = 0;
|
|
134
|
+
for (const column of tableConfig.columns) {
|
|
135
|
+
tableWidth += column.defaultWidth;
|
|
136
|
+
}
|
|
137
|
+
let table = document.createElement("div");
|
|
138
|
+
table['data-num-cols'] = tableConfig.columns.length;
|
|
139
|
+
table.className = '_item_table';
|
|
140
|
+
table.style.border = '1px solid #aaa';
|
|
141
|
+
table.style.width = tableWidth + 'px';
|
|
142
|
+
table.style.height = tableHeight + 'px';
|
|
143
|
+
let sortedCols = tableConfig.columns.sort((a, b) => a.id - b.id);
|
|
144
|
+
for (let i = 0; i < tableConfig.defaultNumRows; i++) {
|
|
145
|
+
table.appendChild(this.createRow(tableConfig, sortedCols, tableWidth, i, colResizeHandler, parentSelectionChecker));
|
|
146
|
+
}
|
|
147
|
+
return table;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
251
150
|
exports.default = TemplateTable;
|
|
@@ -4,93 +4,57 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _Utils = _interopRequireDefault(require("../Utils"));
|
|
11
|
-
|
|
12
9
|
var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
|
|
13
|
-
|
|
14
10
|
var _Observable = _interopRequireDefault(require("../event/Observable"));
|
|
15
|
-
|
|
16
11
|
var _EventType = _interopRequireDefault(require("../event/EventType"));
|
|
17
|
-
|
|
18
12
|
var _reactHtmlRenderer = _interopRequireDefault(require("react-html-renderer"));
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
|
|
26
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
-
|
|
34
|
-
var TitleBar = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
35
|
-
var _React$useState = _react.default.useState(''),
|
|
36
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
37
|
-
title = _React$useState2[0],
|
|
38
|
-
setTitle = _React$useState2[1];
|
|
39
|
-
|
|
40
|
-
_react.default.useLayoutEffect(function () {
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const TitleBar = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
15
|
+
const [title, setTitle] = _react.default.useState('');
|
|
16
|
+
_react.default.useLayoutEffect(() => {
|
|
41
17
|
props.handle.api = api();
|
|
42
18
|
}, []);
|
|
43
|
-
|
|
44
|
-
_react.default.useEffect(function () {
|
|
19
|
+
_react.default.useEffect(() => {
|
|
45
20
|
props.handle.api = api();
|
|
46
21
|
});
|
|
47
|
-
|
|
48
|
-
_react.default.useEffect(function () {
|
|
22
|
+
_react.default.useEffect(() => {
|
|
49
23
|
console.log('TITLE BAR RENDERED : ' + props.config.id);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var eventHandlingConfig = _Utils.default.isNull(parsedConfig.eventHandlingConfig) ? {} : parsedConfig.eventHandlingConfig;
|
|
24
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
25
|
+
let eventHandlingConfig = _Utils.default.isNull(parsedConfig.eventHandlingConfig) ? {} : parsedConfig.eventHandlingConfig;
|
|
54
26
|
eventHandlingConfig.subscriptions = _Utils.default.isNull(eventHandlingConfig.subscriptions) ? [] : eventHandlingConfig.subscriptions;
|
|
55
|
-
|
|
56
|
-
var titleValue = _Utils.default.getComponentAttribute(props.config, 'title', null);
|
|
57
|
-
|
|
27
|
+
let titleValue = _Utils.default.getComponentAttribute(props.config, 'title', null);
|
|
58
28
|
if (_Utils.default.isNull(titleValue)) {
|
|
59
|
-
|
|
29
|
+
let subscription = {
|
|
60
30
|
publisher: 'applicationManager',
|
|
61
31
|
eventType: _EventType.default.APPLICATION_CONTEXT_CHANGE,
|
|
62
32
|
actions: [{
|
|
63
33
|
actionType: 'script',
|
|
64
34
|
script: {
|
|
65
|
-
lines: [
|
|
35
|
+
lines: [`if($event.data.name === 'title'){`, ` let component = @#{${props.config.id}};`, ` if(component) {`, ` component.title = $event.data.value`, ` }`, '}']
|
|
66
36
|
}
|
|
67
37
|
}]
|
|
68
38
|
};
|
|
69
39
|
eventHandlingConfig.subscriptions.push(subscription);
|
|
70
|
-
|
|
71
40
|
_Observable.default.addSubscriptions(eventHandlingConfig, props.handle, props.viewId);
|
|
72
41
|
} else {
|
|
73
42
|
setTitle(titleValue);
|
|
74
43
|
}
|
|
75
44
|
}, []);
|
|
76
|
-
|
|
77
|
-
var api = function api() {
|
|
45
|
+
const api = () => {
|
|
78
46
|
return {
|
|
79
47
|
get id() {
|
|
80
48
|
return props.config.id;
|
|
81
49
|
},
|
|
82
|
-
|
|
83
|
-
getChildren: function getChildren() {
|
|
50
|
+
getChildren: () => {
|
|
84
51
|
return [];
|
|
85
52
|
},
|
|
86
|
-
|
|
87
53
|
set title(title) {
|
|
88
54
|
setTitle(title);
|
|
89
55
|
}
|
|
90
|
-
|
|
91
56
|
};
|
|
92
57
|
};
|
|
93
|
-
|
|
94
58
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
95
59
|
ref: ref,
|
|
96
60
|
className: 'title-bar'
|
|
@@ -101,9 +65,7 @@ var TitleBar = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.for
|
|
|
101
65
|
color: '#202124'
|
|
102
66
|
}
|
|
103
67
|
}, /*#__PURE__*/_react.default.createElement(_reactHtmlRenderer.default, {
|
|
104
|
-
html:
|
|
68
|
+
html: `<p>${title}</p>`
|
|
105
69
|
})));
|
|
106
70
|
}));
|
|
107
|
-
|
|
108
|
-
var _default = TitleBar;
|
|
109
|
-
exports.default = _default;
|
|
71
|
+
var _default = exports.default = TitleBar;
|