@agilemotion/oui-react-js 1.3.8 → 1.4.0
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/README.TXT +1 -0
- package/dist/{ApplicationContext.js → ApplicationManager.js} +334 -335
- package/dist/BasicApp.js +67 -64
- package/dist/BasicAppHome.js +90 -110
- package/dist/BusinessPortalApp.js +1 -1
- package/dist/BusinessPortalAppHome.js +15 -50
- package/dist/DynamicJS.js +24 -52
- package/dist/RestUtils.js +90 -116
- package/dist/Utils.js +49 -37
- package/dist/WithRouter.js +34 -0
- package/dist/assets/jss/components/authNavbarStyle.js +34 -35
- package/dist/assets/jss/components/cardHeaderStyle.js +12 -12
- package/dist/assets/jss/components/customDropdownStyle.js +26 -26
- package/dist/assets/jss/components/customInputStyle.js +2 -8
- package/dist/assets/jss/components/dropdownStyle.js +10 -15
- package/dist/assets/jss/components/footerStyle.js +12 -18
- package/dist/assets/jss/components/headerLinksStyle.js +7 -13
- package/dist/assets/jss/components/headerStyle.js +24 -25
- package/dist/assets/jss/components/navbarLinksStyle.js +7 -13
- package/dist/assets/jss/components/navbarStyle.js +24 -25
- package/dist/assets/jss/components/sidebarStyle.js +41 -43
- package/dist/assets/jss/components/typographyStyle.js +2 -8
- package/dist/assets/jss/rootStyle.js +32 -47
- package/dist/assets/jss/views/layoutStyle.js +6 -11
- package/dist/assets/jss/views/loginStyle.js +4 -10
- package/dist/assets/lotties/call-loading.json +1 -0
- package/dist/assets/lotties/calling-2.json +1 -0
- package/dist/assets/lotties/calling.json +1 -0
- package/dist/assets/lotties/calling2.json +1 -0
- package/dist/assets/lotties/chat.json +1 -0
- package/dist/assets/lotties/join.json +1 -0
- package/dist/assets/lotties/loading.json +1 -0
- package/dist/assets/lotties/msg2.json +1 -0
- package/dist/assets/lotties/recording.json +1 -0
- package/dist/assets/lotties/waiting.json +1 -0
- package/dist/assets/scss/black-dashboard-react/bootstrap/_card.scss +5 -5
- package/dist/assets/scss/black-dashboard-react/bootstrap/_carousel.scss +2 -2
- package/dist/assets/scss/black-dashboard-react/bootstrap/_custom-forms.scss +3 -3
- package/dist/assets/scss/black-dashboard-react/bootstrap/_functions.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/bootstrap/_images.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/bootstrap/_jumbotron.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/bootstrap/_popover.scss +7 -5
- package/dist/assets/scss/black-dashboard-react/bootstrap/_tooltip.scss +4 -4
- package/dist/assets/scss/black-dashboard-react/bootstrap/_variables.scss +5 -5
- package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid-framework.scss +2 -2
- package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid.scss +11 -9
- package/dist/assets/scss/black-dashboard-react/bootstrap/utilities/_embed.scss +6 -4
- package/dist/assets/scss/black-dashboard-react/custom/_sidebar-and-main-panel.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/custom/_variables.scss +1 -1
- package/dist/components/AlertBar.js +39 -80
- package/dist/components/AlertItem.js +4 -26
- package/dist/components/Button.js +49 -52
- package/dist/components/Calendar.js +442 -0
- package/dist/components/Calender.css +244 -0
- package/dist/components/ConfirmationDialog.js +5 -29
- package/dist/components/DataGrid.js +207 -345
- package/dist/components/DataGridColumn.js +6 -29
- package/dist/components/DataGridFilter.js +48 -116
- package/dist/components/DataGridHeading.js +11 -19
- package/dist/components/Dialog.js +27 -121
- package/dist/components/DocumentViewer.js +12 -38
- package/dist/components/DocumentViewerComponent.js +2 -20
- package/dist/components/FileThumb.js +126 -0
- package/dist/components/Graph.js +33 -75
- package/dist/components/GraphNode.js +5 -22
- package/dist/components/HtmlPanel.js +68 -82
- package/dist/components/Icon.js +107 -1
- package/dist/components/LoadingIndicator.js +4 -4
- package/dist/components/LottieIcon.js +134 -0
- package/dist/components/PopupView.js +3 -21
- package/dist/components/Portlet.js +100 -0
- package/dist/components/RegularButton.js +15 -19
- package/dist/components/SignaturePanel.js +9 -40
- package/dist/components/SocketManager.js +170 -0
- package/dist/components/StepperTitleBar.js +33 -59
- package/dist/components/TabPage.js +6 -9
- package/dist/components/TabPanel.js +49 -98
- package/dist/components/TableCellContent.js +31 -39
- package/dist/components/TemplateDesigner.js +114 -158
- package/dist/components/TemplateItemEventHandler.js +33 -100
- package/dist/components/TemplateTable.js +6 -42
- package/dist/components/TitleBar.js +38 -54
- package/dist/components/Toolbar.js +67 -182
- package/dist/components/Tree.js +29 -66
- package/dist/components/card/Card.js +16 -20
- package/dist/components/card/CardAvatar.js +9 -13
- package/dist/components/card/CardBody.js +13 -17
- package/dist/components/card/CardFooter.js +12 -16
- package/dist/components/card/CardHeader.js +13 -17
- package/dist/components/card/CardIcon.js +6 -10
- package/dist/components/card/CardText.js +6 -10
- package/dist/components/customInput/CustomInput.js +12 -10
- package/dist/components/dashboard/BasicBusinessAppDashboard.js +85 -159
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +30 -75
- package/dist/components/dashboard/components/Header.js +9 -26
- package/dist/components/dashboard/components/LeftDrawer.js +3 -1
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +1 -1
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.css +7 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +189 -79
- package/dist/components/footer/Footer.js +6 -18
- package/dist/components/form/AddressSearch.js +32 -66
- package/dist/components/form/AutoComplete.js +161 -0
- package/dist/components/form/BaseField.js +89 -107
- package/dist/components/form/DatePicker.js +8 -23
- package/dist/components/form/FieldSet.js +161 -191
- package/dist/components/form/Form.css +1 -1
- package/dist/components/form/Form.js +153 -479
- package/dist/components/form/GridField.js +46 -146
- package/dist/components/form/IconField.js +35 -0
- package/dist/components/form/ImageEditor.js +22 -60
- package/dist/components/form/LookupField.js +8 -29
- package/dist/components/form/MultiFileUploadField.js +187 -0
- package/dist/components/form/RadioGroup.js +10 -26
- package/dist/components/form/Section.js +40 -91
- package/dist/components/form/SelectItem.js +14 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +0 -1
- package/dist/components/form/Switch.js +53 -0
- package/dist/components/form/TextField.js +10 -17
- package/dist/components/form/TimePicker.js +8 -1
- package/dist/components/form/TransferList.css +2 -2
- package/dist/components/form/TransferList.js +67 -125
- package/dist/components/form/UploadField.js +132 -177
- package/dist/components/form/fieldset.css +8 -0
- package/dist/components/grid/GridContainer.js +5 -9
- package/dist/components/grid/GridItem.js +5 -9
- package/dist/components/layout/CollapsiblePanel.js +11 -33
- package/dist/components/layout/Layout.js +228 -290
- package/dist/components/layout/VC.css +17 -0
- package/dist/components/layout/View.css +18 -1
- package/dist/components/layout/View.js +80 -200
- package/dist/components/layout/ViewContainer.css +3 -0
- package/dist/components/layout/ViewContainer.js +59 -0
- package/dist/components/layout/ViewPort.js +50 -80
- package/dist/components/layout/Window.css +18 -0
- package/dist/components/layout/Window.js +287 -0
- package/dist/components/layout/WindowViewPort.js +71 -0
- package/dist/components/loader.css +1 -1
- package/dist/components/media/ClosablePanel.css +37 -0
- package/dist/components/media/ClosablePanel.js +53 -0
- package/dist/components/media/LobbyWaitingList.js +91 -0
- package/dist/components/media/MediaSoupHelper.js +223 -0
- package/dist/components/media/Recorder.js +235 -0
- package/dist/components/media/SideBarContent.css +54 -0
- package/dist/components/media/SideBarContent.js +46 -0
- package/dist/components/media/SocketRequest.js +20 -0
- package/dist/components/media/SocketResponse.js +16 -0
- package/dist/components/media/Timer.css +30 -0
- package/dist/components/media/Timer.js +88 -0
- package/dist/components/media/Toolbar.css +35 -0
- package/dist/components/media/Toolbar.js +494 -0
- package/dist/components/media/Tracks.js +39 -0
- package/dist/components/media/TrainingRoom.js +608 -0
- package/dist/components/media/Transports.js +35 -0
- package/dist/components/media/VCEventManager.js +74 -0
- package/dist/components/media/VCEventType.js +164 -0
- package/dist/components/media/VCParticipantList.css +72 -0
- package/dist/components/media/VCParticipantList.js +56 -0
- package/dist/components/media/VCParticipantListItem.css +73 -0
- package/dist/components/media/VCParticipantListItem.js +319 -0
- package/dist/components/media/VCRoom.css +42 -0
- package/dist/components/media/VCRoom.js +90 -0
- package/dist/components/media/VCRoomParticipant.css +25 -0
- package/dist/components/media/VCRoomParticipant.js +808 -0
- package/dist/components/media/VCRoomRecorder.js +223 -0
- package/dist/components/media/VCRoomWorkspace.css +86 -0
- package/dist/components/media/VCRoomWorkspace.js +666 -0
- package/dist/components/media/Video.css +4 -0
- package/dist/components/media/Video.js +131 -0
- package/dist/components/media/VideoPlayer.css +10 -0
- package/dist/components/media/VideoPlayer.js +86 -0
- package/dist/components/media/chat/ChatRoom.js +926 -0
- package/dist/components/media/chat/ChatRoomItem.js +83 -0
- package/dist/components/media/chat/ChatRoomList.js +78 -0
- package/dist/components/media/chat/ChatRooms.scss +567 -0
- package/dist/components/menu/CollapsibleMenu.js +2 -19
- package/dist/components/menu/MenuBars.js +6 -33
- package/dist/components/menu/MenuButton.js +27 -39
- package/dist/components/menu/MenuItem.js +3 -20
- package/dist/components/menu/MenuLink.js +22 -13
- package/dist/components/navbars/AuthNavbar.js +5 -18
- package/dist/components/navbars/HomeNavbar.js +5 -7
- package/dist/components/navbars/PortalNavbar.js +7 -25
- package/dist/components/signatures/AgilitySignaturePanel.js +38 -104
- package/dist/components/signatures/AlertItem.js +3 -24
- package/dist/components/signatures/DocumentContainer.js +47 -134
- package/dist/components/signatures/ImageSignatureInput.js +11 -38
- package/dist/components/signatures/MenuButton.js +1 -16
- package/dist/components/signatures/Prompt.js +3 -24
- package/dist/components/signatures/ResponsiveTable.js +42 -83
- package/dist/components/signatures/SearchView.js +13 -50
- package/dist/components/signatures/SignatorySearch.js +83 -99
- package/dist/components/signatures/SignatorySearchForm.js +11 -17
- package/dist/components/signatures/SignatureInput.js +18 -47
- package/dist/components/signatures/SignatureInputProps.js +18 -60
- package/dist/components/signatures/SignatureTemplateDesigner.js +151 -239
- package/dist/components/signatures/Toolbar.js +7 -34
- package/dist/components/signatures/ViewUtils.js +2 -6
- package/dist/components/typography/Danger.js +3 -1
- package/dist/components/typography/Info.js +3 -1
- package/dist/components/typography/Link.js +6 -2
- package/dist/event/ActionHandlers.js +6 -6
- package/dist/event/EventType.js +7 -1
- package/dist/event/LoadDataActionHandler.js +1 -1
- package/dist/event/Observable.js +80 -174
- package/dist/event/RouteActionHandler.js +74 -31
- package/dist/event/ServiceCallActionHandler.js +36 -24
- package/dist/event/SignalGraphActionHandler.js +2 -2
- package/dist/js/Addresses.js +10 -8
- package/dist/js/Calendar.js +220 -0
- package/dist/js/Media.js +157 -0
- package/dist/redux/store/ConfigureStore.js +3 -9
- package/dist/redux/store/DashboardStore.js +42 -94
- package/dist/redux/store/SecurityStore.js +15 -50
- package/dist/view/Dashboard.js +256 -171
- package/dist/view/Views.js +30 -0
- package/dist/view/security/ChangePasswordBasic.js +29 -80
- package/dist/view/security/ForgotPassword.js +13 -46
- package/dist/view/security/ForgotPasswordBasic.js +12 -45
- package/dist/view/security/Login.js +15 -51
- package/dist/view/security/LoginBasic.js +13 -46
- package/dist/view/security/LoginBusinessPortal.js +12 -45
- package/dist/view/security/ResetPassword.js +13 -51
- package/dist/view/security/ResetPasswordBasic.js +27 -75
- package/dist/view/security/Security.js +1 -0
- package/package.json +31 -25
- package/README.md +0 -1623
- package/dist/components/dashboard/BasicApp.js +0 -140
- package/dist/components/navbars/NavbarLinks.js +0 -212
- package/dist/components/signatures/OLD.js +0 -1138
- package/gulpfile.js +0 -77
|
@@ -21,23 +21,13 @@ var _Section = _interopRequireDefault(require("./form/Section"));
|
|
|
21
21
|
|
|
22
22
|
var _Toolbar = _interopRequireDefault(require("./Toolbar"));
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
|
-
|
|
28
|
-
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(_e2) { throw _e2; }, 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(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
29
|
-
|
|
30
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
-
|
|
32
|
-
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."); }
|
|
33
|
-
|
|
34
|
-
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); }
|
|
24
|
+
var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
|
|
35
25
|
|
|
36
|
-
|
|
26
|
+
var _Layout = require("./layout/Layout");
|
|
37
27
|
|
|
38
|
-
function
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
29
|
|
|
40
|
-
function
|
|
30
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
41
31
|
|
|
42
32
|
function a11yProps(index) {
|
|
43
33
|
return {
|
|
@@ -47,29 +37,16 @@ function a11yProps(index) {
|
|
|
47
37
|
}
|
|
48
38
|
|
|
49
39
|
const TabPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
50
|
-
const
|
|
51
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
52
|
-
tabValue = _React$useState2[0],
|
|
53
|
-
setTabValue = _React$useState2[1];
|
|
40
|
+
const [tabValue, setTabValue] = _react.default.useState(0);
|
|
54
41
|
|
|
55
|
-
const
|
|
56
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
57
|
-
errors = _React$useState4[0],
|
|
58
|
-
setErrors = _React$useState4[1];
|
|
42
|
+
const [errors, setErrors] = _react.default.useState({});
|
|
59
43
|
|
|
60
|
-
const
|
|
61
|
-
_React$useState6 = _slicedToArray(_React$useState5, 1),
|
|
62
|
-
componentHandles = _React$useState6[0];
|
|
63
|
-
|
|
64
|
-
let keyCounter = 0;
|
|
44
|
+
const [componentHandles] = _react.default.useState({});
|
|
65
45
|
|
|
66
46
|
const handleTabChange = (event, newValue) => {
|
|
67
47
|
setTabValue(newValue);
|
|
68
48
|
};
|
|
69
49
|
|
|
70
|
-
let tabIndex = 0;
|
|
71
|
-
let tabContentIndex = 0;
|
|
72
|
-
|
|
73
50
|
const createComponentHandle = component => {
|
|
74
51
|
if (_Utils.default.isNull(componentHandles[component.id])) {
|
|
75
52
|
let handle = {};
|
|
@@ -80,73 +57,67 @@ const TabPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
80
57
|
return componentHandles[component.id];
|
|
81
58
|
};
|
|
82
59
|
|
|
60
|
+
_react.default.useEffect(() => {
|
|
61
|
+
props.handle.api = api();
|
|
62
|
+
});
|
|
63
|
+
|
|
83
64
|
_react.default.useEffect(() => {
|
|
84
65
|
if (!_Utils.default.isNull(props.form)) {
|
|
85
66
|
props.form().setContainerErrorHandler(containerErrors => {
|
|
86
67
|
let shouldRefresh = false;
|
|
87
68
|
let properties = Object.getOwnPropertyNames(containerErrors);
|
|
88
69
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
94
|
-
const property = _step.value;
|
|
95
|
-
|
|
96
|
-
if (errors[property] !== containerErrors[property]) {
|
|
97
|
-
shouldRefresh = true;
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
70
|
+
for (const property of properties) {
|
|
71
|
+
if (errors[property] !== containerErrors[property]) {
|
|
72
|
+
shouldRefresh = true;
|
|
73
|
+
break;
|
|
100
74
|
}
|
|
101
|
-
} catch (err) {
|
|
102
|
-
_iterator.e(err);
|
|
103
|
-
} finally {
|
|
104
|
-
_iterator.f();
|
|
105
75
|
}
|
|
106
76
|
|
|
107
|
-
if (shouldRefresh) {
|
|
108
|
-
//Note that this line refreshes the entire tab page
|
|
77
|
+
if (_ApplicationManager.default.isFormMarkersEnabled() && shouldRefresh) {
|
|
109
78
|
setErrors(JSON.parse(JSON.stringify(containerErrors)));
|
|
110
79
|
}
|
|
111
80
|
});
|
|
112
81
|
}
|
|
82
|
+
}, []);
|
|
113
83
|
|
|
114
|
-
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
function renderTabPageComponent(component, tabId) {
|
|
84
|
+
function renderTabPageComponent(component, tabId, index) {
|
|
118
85
|
if (_Utils.default.isNull(component.id)) {
|
|
119
|
-
component.id =
|
|
86
|
+
component.id = index + '-tab-content';
|
|
120
87
|
}
|
|
121
88
|
|
|
122
89
|
return component.type === 'formSection' ? /*#__PURE__*/_react.default.createElement(_Section.default, {
|
|
123
90
|
keyHandler: props.keyHandler,
|
|
124
|
-
key:
|
|
91
|
+
key: index,
|
|
125
92
|
config: component,
|
|
126
93
|
handle: createComponentHandle(component),
|
|
127
94
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
128
95
|
form: props.form,
|
|
129
96
|
parentId: tabId,
|
|
130
|
-
loadCompleteHandler: props.loadCompleteHandler,
|
|
131
97
|
viewId: props.viewId,
|
|
132
98
|
values: props.values
|
|
133
99
|
}) : component.type === 'toolbar' ? /*#__PURE__*/_react.default.createElement(_Toolbar.default, {
|
|
134
100
|
config: component,
|
|
135
101
|
handle: createComponentHandle(component),
|
|
136
|
-
key:
|
|
102
|
+
key: index,
|
|
137
103
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
138
|
-
viewId: props.viewId
|
|
139
|
-
|
|
104
|
+
viewId: props.viewId
|
|
105
|
+
}) : component.type === 'layout' ? /*#__PURE__*/_react.default.createElement(_Layout.Layout, {
|
|
106
|
+
config: component,
|
|
107
|
+
handle: createComponentHandle(component),
|
|
108
|
+
key: index,
|
|
109
|
+
ref: /*#__PURE__*/_react.default.createRef(),
|
|
110
|
+
viewId: props.viewId
|
|
140
111
|
}) : /*#__PURE__*/_react.default.createElement("div", null, 'Unsupported component type ' + component.type);
|
|
141
112
|
}
|
|
142
113
|
|
|
143
|
-
function renderPage(page) {
|
|
114
|
+
function renderPage(page, pageIndex) {
|
|
144
115
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
145
116
|
style: {
|
|
146
117
|
margin: '16px'
|
|
147
118
|
}
|
|
148
|
-
}, page.components.map(component => {
|
|
149
|
-
return renderTabPageComponent(component, page.id);
|
|
119
|
+
}, page.components.map((component, index) => {
|
|
120
|
+
return renderTabPageComponent(component, page.id, pageIndex + index);
|
|
150
121
|
}));
|
|
151
122
|
}
|
|
152
123
|
|
|
@@ -159,35 +130,15 @@ const TabPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
159
130
|
let children = [];
|
|
160
131
|
let properties = Object.getOwnPropertyNames(componentHandles);
|
|
161
132
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
children.push(componentHandle);
|
|
170
|
-
|
|
171
|
-
if (!_Utils.default.isNull(componentHandle.api.getChildren)) {
|
|
172
|
-
var _iterator3 = _createForOfIteratorHelper(componentHandle.api.getChildren()),
|
|
173
|
-
_step3;
|
|
174
|
-
|
|
175
|
-
try {
|
|
176
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
177
|
-
const child = _step3.value;
|
|
178
|
-
children.push(child);
|
|
179
|
-
}
|
|
180
|
-
} catch (err) {
|
|
181
|
-
_iterator3.e(err);
|
|
182
|
-
} finally {
|
|
183
|
-
_iterator3.f();
|
|
184
|
-
}
|
|
133
|
+
for (const property of properties) {
|
|
134
|
+
let componentHandle = componentHandles[property];
|
|
135
|
+
children.push(componentHandle);
|
|
136
|
+
|
|
137
|
+
if (!_Utils.default.isNull(componentHandle.api.getChildren)) {
|
|
138
|
+
for (const child of componentHandle.api.getChildren()) {
|
|
139
|
+
children.push(child);
|
|
185
140
|
}
|
|
186
141
|
}
|
|
187
|
-
} catch (err) {
|
|
188
|
-
_iterator2.e(err);
|
|
189
|
-
} finally {
|
|
190
|
-
_iterator2.f();
|
|
191
142
|
}
|
|
192
143
|
|
|
193
144
|
return children;
|
|
@@ -197,9 +148,9 @@ const TabPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
197
148
|
|
|
198
149
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
199
150
|
ref: ref,
|
|
200
|
-
style: {
|
|
151
|
+
style: _Utils.default.mergeStyles({
|
|
201
152
|
width: '100%'
|
|
202
|
-
}
|
|
153
|
+
}, props.config)
|
|
203
154
|
}, /*#__PURE__*/_react.default.createElement(_AppBar.default, {
|
|
204
155
|
position: "static",
|
|
205
156
|
color: "default",
|
|
@@ -214,25 +165,25 @@ const TabPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
214
165
|
indicatorColor: "primary",
|
|
215
166
|
textColor: "primary",
|
|
216
167
|
"aria-label": "tabs"
|
|
217
|
-
}, !_Utils.default.isNull(props.config) && !_Utils.default.isNull(props.config.tabPages) && props.config.tabPages.length > 0 ? props.config.tabPages.map(page => {
|
|
168
|
+
}, !_Utils.default.isNull(props.config) && !_Utils.default.isNull(props.config.tabPages) && props.config.tabPages.length > 0 ? props.config.tabPages.map((page, index) => {
|
|
218
169
|
return /*#__PURE__*/_react.default.createElement(_Tab.default, _extends({
|
|
219
170
|
label: page.attributes['label']
|
|
220
|
-
}, a11yProps(
|
|
221
|
-
key:
|
|
171
|
+
}, a11yProps(index), {
|
|
172
|
+
key: index,
|
|
222
173
|
style: {
|
|
223
|
-
color: !_Utils.default.isNull(props.form) && errors !== null && errors[page.id] === true ?
|
|
174
|
+
color: _ApplicationManager.default.isFormMarkersEnabled() && !_Utils.default.isNull(props.form) && errors !== null && errors[page.id] === true ? '#ed5249' : null
|
|
224
175
|
}
|
|
225
176
|
}));
|
|
226
|
-
}) : null)), !_Utils.default.isNull(props.config) && !_Utils.default.isNull(props.config.tabPages) && props.config.tabPages.length > 0 ? props.config.tabPages.map(page => {
|
|
177
|
+
}) : null)), !_Utils.default.isNull(props.config) && !_Utils.default.isNull(props.config.tabPages) && props.config.tabPages.length > 0 ? props.config.tabPages.map((page, index) => {
|
|
227
178
|
if (_Utils.default.isNull(page.id)) {
|
|
228
|
-
page.id =
|
|
179
|
+
page.id = index + '-tab-page';
|
|
229
180
|
}
|
|
230
181
|
|
|
231
182
|
return /*#__PURE__*/_react.default.createElement(_TabPage.default, {
|
|
232
183
|
value: tabValue,
|
|
233
|
-
key:
|
|
234
|
-
index:
|
|
235
|
-
}, renderPage(page));
|
|
184
|
+
key: index,
|
|
185
|
+
index: index
|
|
186
|
+
}, renderPage(page, index));
|
|
236
187
|
}) : null);
|
|
237
188
|
}));
|
|
238
189
|
|
|
@@ -21,31 +21,14 @@ var _Error = _interopRequireDefault(require("@material-ui/icons/Error"));
|
|
|
21
21
|
|
|
22
22
|
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _ApplicationManager = _interopRequireDefault(require("../ApplicationManager"));
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
|
-
|
|
30
|
-
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."); }
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
-
|
|
40
28
|
const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
41
|
-
const
|
|
42
|
-
_React$useState2 = _slicedToArray(_React$useState, 1),
|
|
43
|
-
contentType = _React$useState2[0];
|
|
29
|
+
const [contentType] = _react.default.useState(props.contentType);
|
|
44
30
|
|
|
45
|
-
const
|
|
46
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
47
|
-
refresher = _React$useState4[0],
|
|
48
|
-
setRefresher = _React$useState4[1];
|
|
31
|
+
const [refresher, setRefresher] = _react.default.useState(true);
|
|
49
32
|
|
|
50
33
|
const validate = value => {
|
|
51
34
|
let validator = props.validator;
|
|
@@ -94,14 +77,14 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
94
77
|
_react.default.useEffect(() => {
|
|
95
78
|
if (!_Utils.default.isNull(ref.current)) {
|
|
96
79
|
props.refCallback(props.row, props.dataBinding, {
|
|
97
|
-
|
|
80
|
+
'api': api
|
|
98
81
|
});
|
|
99
82
|
}
|
|
100
83
|
}, [ref.current]);
|
|
101
84
|
|
|
102
85
|
_react.default.useEffect(() => {
|
|
103
86
|
if (!_Utils.default.isNull(props.editor)) {
|
|
104
|
-
props.editor.id = props.editor.id.replace(
|
|
87
|
+
props.editor.id = props.editor.id.replace('.', '_');
|
|
105
88
|
|
|
106
89
|
if (_Utils.default.isNull(props.editor.attributes)) {
|
|
107
90
|
props.editor.attributes = {};
|
|
@@ -115,13 +98,32 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
115
98
|
|
|
116
99
|
const getStaticDisplayValue = () => {
|
|
117
100
|
let displayValue;
|
|
118
|
-
let contentValue
|
|
101
|
+
let contentValue;
|
|
102
|
+
let tokens = props.dataBinding.split('.');
|
|
103
|
+
|
|
104
|
+
if (tokens.length === 1) {
|
|
105
|
+
contentValue = props.row[props.dataBinding];
|
|
106
|
+
} else {
|
|
107
|
+
let parent = props.row;
|
|
108
|
+
|
|
109
|
+
for (let i = 0; i < tokens.length - 1; i++) {
|
|
110
|
+
parent = parent[tokens[i]];
|
|
111
|
+
|
|
112
|
+
if (!parent) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (parent) {
|
|
118
|
+
contentValue = parent[tokens[tokens.length - 1]];
|
|
119
|
+
}
|
|
120
|
+
}
|
|
119
121
|
|
|
120
122
|
if (props.columnConfig.cellFormat === 'MONEY' || props.columnConfig.cellFormat === 'NUMBER') {
|
|
121
123
|
return _Utils.default.isNull(contentValue) ? '' : contentValue.toFixed(2);
|
|
122
124
|
} else {
|
|
123
125
|
if (_Utils.default.isNull(contentValue)) {
|
|
124
|
-
displayValue =
|
|
126
|
+
displayValue = '';
|
|
125
127
|
} else if (contentType === 'DATE') {
|
|
126
128
|
displayValue = new Date(contentValue).toLocaleDateString();
|
|
127
129
|
} else if (contentType === 'TIME') {
|
|
@@ -129,11 +131,7 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
129
131
|
} else {
|
|
130
132
|
if (typeof contentValue === 'object') {
|
|
131
133
|
// TODO : First check if the editor has a display template. If it does, use it to get the display value
|
|
132
|
-
|
|
133
|
-
displayValue = contentValue.map.label;
|
|
134
|
-
} else {
|
|
135
|
-
displayValue = contentValue.label;
|
|
136
|
-
}
|
|
134
|
+
displayValue = contentValue.dataRecordDescription;
|
|
137
135
|
} else {
|
|
138
136
|
displayValue = contentValue;
|
|
139
137
|
}
|
|
@@ -150,11 +148,10 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
150
148
|
if (!_Utils.default.isNull(props.editor)) {
|
|
151
149
|
props.formValues[props.editor.id] = props.row[props.dataBinding];
|
|
152
150
|
|
|
153
|
-
if (props.editor.fieldType ===
|
|
151
|
+
if (props.editor.fieldType === 'TEXT_FIELD') {
|
|
154
152
|
return /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
|
155
153
|
valueChangeHandler: valueChangeHandler,
|
|
156
154
|
config: props.editor,
|
|
157
|
-
loadCompleteHandler: props.loadCompleteHandler,
|
|
158
155
|
form: props.form,
|
|
159
156
|
handle: {},
|
|
160
157
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
@@ -162,7 +159,7 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
162
159
|
values: props.formValues,
|
|
163
160
|
viewId: props.viewId
|
|
164
161
|
});
|
|
165
|
-
} else if (props.editor.fieldType ===
|
|
162
|
+
} else if (props.editor.fieldType === 'DATE') {
|
|
166
163
|
return /*#__PURE__*/_react.default.createElement(_DatePicker.default, {
|
|
167
164
|
valueChangeHandler: valueChangeHandler,
|
|
168
165
|
config: props.editor,
|
|
@@ -170,11 +167,10 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
170
167
|
handle: {},
|
|
171
168
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
172
169
|
bindValueToForm: false,
|
|
173
|
-
loadCompleteHandler: props.loadCompleteHandler,
|
|
174
170
|
values: props.formValues,
|
|
175
171
|
viewId: props.viewId
|
|
176
172
|
});
|
|
177
|
-
} else if (props.editor.fieldType ===
|
|
173
|
+
} else if (props.editor.fieldType === 'SELECT') {
|
|
178
174
|
let objectReference = props.row[props.dataBinding];
|
|
179
175
|
|
|
180
176
|
if (!_Utils.default.isNull(objectReference)) {
|
|
@@ -190,12 +186,11 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
190
186
|
handle: {},
|
|
191
187
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
192
188
|
bindValueToForm: false,
|
|
193
|
-
loadCompleteHandler: props.loadCompleteHandler,
|
|
194
189
|
values: props.formValues,
|
|
195
190
|
value: objectReference,
|
|
196
191
|
viewId: props.viewId
|
|
197
192
|
});
|
|
198
|
-
} else if (props.editor.fieldType ===
|
|
193
|
+
} else if (props.editor.fieldType === 'LOOKUP') {
|
|
199
194
|
let data = props.row[props.dataBinding];
|
|
200
195
|
|
|
201
196
|
if (!_Utils.default.isNull(data)) {
|
|
@@ -216,9 +211,6 @@ const TableCellContent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.d
|
|
|
216
211
|
handle: {},
|
|
217
212
|
ref: /*#__PURE__*/_react.default.createRef(),
|
|
218
213
|
bindValueToForm: false,
|
|
219
|
-
loadCompleteHandler: id => {
|
|
220
|
-
_ApplicationContext.default.resolveComponentApi(id).refresh();
|
|
221
|
-
},
|
|
222
214
|
values: props.formValues,
|
|
223
215
|
value: data,
|
|
224
216
|
viewId: props.viewId
|