@agilemotion/oui-react-js 1.3.7 → 1.3.9
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 +161 -284
- package/dist/BasicApp.js +1 -1
- package/dist/BasicAppHome.js +17 -4
- package/dist/BusinessPortalApp.js +4 -4
- package/dist/BusinessPortalAppHome.js +10 -39
- package/dist/DynamicJS.js +20 -52
- package/dist/RestUtils.js +86 -111
- package/dist/Utils.js +36 -30
- 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/_variables.scss +1 -1
- package/dist/components/AlertBar.js +39 -80
- package/dist/components/AlertItem.js +4 -26
- package/dist/components/Button.js +24 -36
- package/dist/components/Calendar.js +478 -0
- package/dist/components/Calender.css +244 -0
- package/dist/components/ConfirmationDialog.js +5 -29
- package/dist/components/DataGrid.js +169 -338
- package/dist/components/DataGridColumn.js +5 -28
- package/dist/components/DataGridFilter.js +46 -114
- package/dist/components/DataGridHeading.js +11 -19
- package/dist/components/Dialog.js +27 -121
- package/dist/components/DocumentViewer.js +15 -35
- package/dist/components/DocumentViewerComponent.js +2 -20
- package/dist/components/FileThumb.js +115 -0
- package/dist/components/Graph.js +25 -75
- package/dist/components/GraphNode.js +4 -21
- package/dist/components/HtmlPanel.js +59 -78
- package/dist/components/Icon.js +99 -1
- package/dist/components/LoadingIndicator.js +4 -4
- package/dist/components/LottieIcon.js +134 -0
- package/dist/components/PopupView.js +2 -20
- 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 +30 -56
- package/dist/components/TabPage.js +6 -9
- package/dist/components/TabPanel.js +41 -98
- package/dist/components/TableCellContent.js +30 -38
- package/dist/components/TemplateDesigner.css +0 -1
- package/dist/components/TemplateDesigner.js +107 -151
- package/dist/components/TemplateItemEventHandler.js +33 -100
- package/dist/components/TemplateTable.js +6 -42
- package/dist/components/TitleBar.js +35 -52
- package/dist/components/Toolbar.js +33 -179
- package/dist/components/Tree.js +27 -64
- 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 +81 -158
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +33 -79
- package/dist/components/dashboard/components/Header.js +8 -25
- 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.js +143 -36
- package/dist/components/footer/Footer.js +6 -18
- package/dist/components/form/AddressSearch.js +32 -66
- package/dist/components/form/AutoComplete.js +160 -0
- package/dist/components/form/BaseField.js +66 -96
- package/dist/components/form/DatePicker.js +3 -21
- package/dist/components/form/FieldSet.js +158 -180
- package/dist/components/form/Form.css +1 -1
- package/dist/components/form/Form.js +137 -471
- package/dist/components/form/GridField.js +46 -146
- package/dist/components/form/IconField.js +35 -0
- package/dist/components/form/ImageEditor.js +19 -57
- package/dist/components/form/LookupField.js +8 -29
- package/dist/components/form/MultiFileUploadField.js +186 -0
- package/dist/components/form/RadioGroup.js +1 -16
- package/dist/components/form/Section.js +31 -92
- package/dist/components/form/SelectItem.js +14 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +4 -2
- package/dist/components/form/Switch.js +53 -0
- package/dist/components/form/TextField.js +10 -17
- package/dist/components/form/TimePicker.js +7 -1
- package/dist/components/form/TransferList.css +2 -2
- package/dist/components/form/TransferList.js +67 -125
- package/dist/components/form/UploadField.js +27 -79
- 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 +175 -290
- package/dist/components/layout/VC.css +17 -0
- package/dist/components/layout/View.css +17 -1
- package/dist/components/layout/View.js +77 -194
- 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 +20 -0
- package/dist/components/media/Toolbar.js +470 -0
- package/dist/components/media/Tracks.js +39 -0
- package/dist/components/media/TrainingRoom.js +531 -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 +806 -0
- package/dist/components/media/VCRoomWorkspace.css +86 -0
- package/dist/components/media/VCRoomWorkspace.js +653 -0
- package/dist/components/media/Video.css +4 -0
- package/dist/components/media/Video.js +131 -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 +7 -35
- package/dist/components/menu/MenuItem.js +3 -20
- package/dist/components/menu/MenuLink.js +18 -12
- package/dist/components/navbars/AuthNavbar.js +5 -18
- package/dist/components/navbars/HomeNavbar.js +3 -5
- package/dist/components/navbars/PortalNavbar.js +4 -22
- package/dist/components/signatures/AgilitySignaturePanel.js +35 -101
- package/dist/components/signatures/AlertItem.js +3 -24
- package/dist/components/signatures/DocumentContainer.js +47 -135
- package/dist/components/signatures/ImageSignatureInput.js +8 -35
- package/dist/components/signatures/MenuButton.js +1 -16
- package/dist/components/signatures/Prompt.js +3 -24
- package/dist/components/signatures/ResponsiveTable.js +75 -96
- package/dist/components/signatures/SearchView.js +14 -50
- package/dist/components/signatures/SignatorySearch.js +83 -98
- package/dist/components/signatures/SignatorySearchForm.js +11 -17
- package/dist/components/signatures/SignatureInput.js +15 -44
- package/dist/components/signatures/SignatureInputProps.js +20 -60
- package/dist/components/signatures/SignatureTemplateDesigner.js +148 -235
- 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 +3 -3
- package/dist/event/EventType.js +7 -1
- package/dist/event/LoadDataActionHandler.js +1 -1
- package/dist/event/Observable.js +56 -168
- package/dist/event/RouteActionHandler.js +45 -11
- package/dist/event/ServiceCallActionHandler.js +34 -24
- package/dist/js/Addresses.js +10 -8
- 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 +242 -163
- package/dist/view/security/ChangePasswordBasic.js +23 -76
- package/dist/view/security/ForgotPassword.js +9 -42
- package/dist/view/security/ForgotPasswordBasic.js +8 -41
- package/dist/view/security/Login.js +11 -47
- package/dist/view/security/LoginBasic.js +8 -41
- package/dist/view/security/LoginBusinessPortal.js +8 -41
- package/dist/view/security/ResetPassword.js +9 -47
- package/dist/view/security/ResetPasswordBasic.js +21 -71
- package/dist/view/security/Security.js +1 -0
- package/package.json +29 -13
- 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
|
@@ -21,79 +21,45 @@ var _DynamicJS = _interopRequireDefault(require("../../DynamicJS"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
|
|
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); }
|
|
24
|
+
const BaseField = props => {
|
|
25
|
+
const [hasError, setHasError] = _react.default.useState(false);
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
const [errorMessage, setErrorMessage] = _react.default.useState('');
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
const [valueObject, setValueObject] = _react.default.useState({});
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const BaseField = props => {
|
|
39
|
-
const _React$useState = _react.default.useState(false),
|
|
40
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
41
|
-
hasError = _React$useState2[0],
|
|
42
|
-
setHasError = _React$useState2[1];
|
|
43
|
-
|
|
44
|
-
const _React$useState3 = _react.default.useState(""),
|
|
45
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
46
|
-
errorMessage = _React$useState4[0],
|
|
47
|
-
setErrorMessage = _React$useState4[1];
|
|
48
|
-
|
|
49
|
-
const _React$useState5 = _react.default.useState({}),
|
|
50
|
-
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
51
|
-
valueObject = _React$useState6[0],
|
|
52
|
-
setValueObject = _React$useState6[1];
|
|
53
|
-
|
|
54
|
-
const _React$useState7 = _react.default.useState(null),
|
|
55
|
-
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
56
|
-
valueProperty = _React$useState8[0],
|
|
57
|
-
setValueProperty = _React$useState8[1];
|
|
31
|
+
const [valueProperty, setValueProperty] = _react.default.useState(null);
|
|
58
32
|
|
|
59
33
|
const loadingRef = _react.default.useRef(true);
|
|
60
34
|
|
|
61
|
-
const
|
|
62
|
-
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
63
|
-
config = _React$useState10[0],
|
|
64
|
-
setConfig = _React$useState10[1];
|
|
35
|
+
const [config, setConfig] = _react.default.useState(null);
|
|
65
36
|
|
|
66
|
-
const
|
|
67
|
-
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
68
|
-
value = _React$useState12[0],
|
|
69
|
-
setValue = _React$useState12[1];
|
|
37
|
+
const [value, setValue] = _react.default.useState(!_Utils.default.isNull(props.value) ? props.value : null);
|
|
70
38
|
|
|
71
|
-
const
|
|
72
|
-
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
73
|
-
selectOptions = _React$useState14[0],
|
|
74
|
-
setSelectOptions = _React$useState14[1];
|
|
39
|
+
const [selectOptions, setSelectOptions] = _react.default.useState([]);
|
|
75
40
|
|
|
76
|
-
const
|
|
77
|
-
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
78
|
-
disabled = _React$useState16[0],
|
|
79
|
-
setDisabled = _React$useState16[1];
|
|
41
|
+
const [disabled, setDisabled] = _react.default.useState(false);
|
|
80
42
|
|
|
81
|
-
const
|
|
82
|
-
_React$useState18 = _slicedToArray(_React$useState17, 2),
|
|
83
|
-
visible = _React$useState18[0],
|
|
84
|
-
setVisible = _React$useState18[1];
|
|
43
|
+
const [visible, setVisible] = _react.default.useState(false);
|
|
85
44
|
|
|
86
|
-
const
|
|
87
|
-
_React$useState20 = _slicedToArray(_React$useState19, 2),
|
|
88
|
-
required = _React$useState20[0],
|
|
89
|
-
setRequired = _React$useState20[1];
|
|
45
|
+
const [required, setRequired] = _react.default.useState(null);
|
|
90
46
|
|
|
91
47
|
const validateOnChange = _react.default.useRef();
|
|
92
48
|
|
|
93
49
|
const valid = _react.default.useRef(false);
|
|
94
50
|
|
|
95
51
|
_react.default.useEffect(() => {
|
|
96
|
-
|
|
52
|
+
let value = valueObject[valueProperty];
|
|
53
|
+
|
|
54
|
+
if (props.config.fieldType === 'SELECT' || props.config.fieldType === 'LOOKUP') {
|
|
55
|
+
if (!value || _Utils.default.isNull(value.id)) {
|
|
56
|
+
setValue(null);
|
|
57
|
+
} else {
|
|
58
|
+
setValue(value);
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
setValue(value);
|
|
62
|
+
}
|
|
97
63
|
}, [valueObject[valueProperty]]); // Change the required value and re-validate field if necessary
|
|
98
64
|
|
|
99
65
|
|
|
@@ -123,16 +89,22 @@ const BaseField = props => {
|
|
|
123
89
|
result = _Utils.default.validateField(path.valueProperty, required, path.valueObject, currentValue, config.validator);
|
|
124
90
|
}
|
|
125
91
|
|
|
126
|
-
setErrorMessage(_ApplicationContext.default.isFormMarkersEnabled() ? result.message :
|
|
92
|
+
setErrorMessage(_ApplicationContext.default.isFormMarkersEnabled() ? result.message : '');
|
|
127
93
|
setHasError(!result.valid && _ApplicationContext.default.isFormMarkersEnabled());
|
|
128
94
|
valid.current = result.valid && _ApplicationContext.default.isFormMarkersEnabled();
|
|
129
|
-
|
|
95
|
+
|
|
96
|
+
if (_ApplicationContext.default.isFormMarkersEnabled()) {
|
|
97
|
+
props.form().setFieldError(config.id, typeof result.message === 'undefined' ? null : result.message);
|
|
98
|
+
}
|
|
99
|
+
|
|
130
100
|
return result.valid;
|
|
131
101
|
};
|
|
132
102
|
|
|
133
103
|
_react.default.useEffect(() => {
|
|
134
104
|
props.handle.api = api();
|
|
105
|
+
});
|
|
135
106
|
|
|
107
|
+
_react.default.useEffect(() => {
|
|
136
108
|
if (_Utils.default.isNull(config)) {
|
|
137
109
|
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
138
110
|
|
|
@@ -142,8 +114,9 @@ const BaseField = props => {
|
|
|
142
114
|
|
|
143
115
|
setConfig(parsedConfig);
|
|
144
116
|
setVisible(_Utils.default.evaluateBooleanExpression(parsedConfig.visible, parsedConfig.id, true));
|
|
117
|
+
setDisabled(_Utils.default.evaluateBooleanExpression(parsedConfig.disabled, parsedConfig.id, false));
|
|
145
118
|
}
|
|
146
|
-
});
|
|
119
|
+
}, []);
|
|
147
120
|
|
|
148
121
|
_react.default.useEffect(() => {
|
|
149
122
|
if (!_Utils.default.isNull(props.values) && !_Utils.default.isNull(config)) {
|
|
@@ -177,10 +150,6 @@ const BaseField = props => {
|
|
|
177
150
|
setErrorMessage(field.error);
|
|
178
151
|
}
|
|
179
152
|
}
|
|
180
|
-
|
|
181
|
-
if (!_Utils.default.isNull(props.loadCompleteHandler)) {
|
|
182
|
-
props.loadCompleteHandler(config.id);
|
|
183
|
-
}
|
|
184
153
|
}
|
|
185
154
|
});
|
|
186
155
|
|
|
@@ -198,7 +167,7 @@ const BaseField = props => {
|
|
|
198
167
|
let valueChanged = newValue !== value;
|
|
199
168
|
|
|
200
169
|
if (!_Utils.default.isNull(newValue) && !_Utils.default.isNull(value)) {
|
|
201
|
-
if (config.fieldType === 'SELECT' || config.fieldType === 'LOOKUP') {
|
|
170
|
+
if (props.config.fieldType === 'SELECT' || props.config.fieldType === 'LOOKUP') {
|
|
202
171
|
valueChanged = newValue.id !== value.id;
|
|
203
172
|
} else {
|
|
204
173
|
valueChanged = JSON.stringify(value) !== JSON.stringify(newValue);
|
|
@@ -206,33 +175,22 @@ const BaseField = props => {
|
|
|
206
175
|
}
|
|
207
176
|
|
|
208
177
|
if (valueChanged) {
|
|
209
|
-
let id = config.dataBinding ? config.dataBinding : config.id;
|
|
178
|
+
let id = props.config.dataBinding ? props.config.dataBinding : props.config.id;
|
|
210
179
|
|
|
211
180
|
_ApplicationContext.default.enableFormMarkers(true);
|
|
212
181
|
|
|
213
|
-
if (config.fieldType === 'SELECT') {
|
|
182
|
+
if (props.config.fieldType === 'SELECT') {
|
|
214
183
|
setValue(props.form().handleSelectItemChange(id, selectOptions, newValue));
|
|
215
184
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
221
|
-
const selectOption = _step.value;
|
|
222
|
-
|
|
223
|
-
if (selectOption.id === newValue) {
|
|
224
|
-
newValue = selectOption;
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
185
|
+
for (const selectOption of selectOptions) {
|
|
186
|
+
if (selectOption.id === newValue) {
|
|
187
|
+
newValue = selectOption;
|
|
188
|
+
break;
|
|
227
189
|
}
|
|
228
|
-
} catch (err) {
|
|
229
|
-
_iterator.e(err);
|
|
230
|
-
} finally {
|
|
231
|
-
_iterator.f();
|
|
232
190
|
}
|
|
233
191
|
} else {
|
|
234
192
|
setValue(newValue);
|
|
235
|
-
props.form().handleChange(!_Utils.default.isNull(config.dataBinding) ? config.dataBinding : id, newValue);
|
|
193
|
+
props.form().handleChange(!_Utils.default.isNull(props.config.dataBinding) ? props.config.dataBinding : id, newValue);
|
|
236
194
|
}
|
|
237
195
|
|
|
238
196
|
if (!_Utils.default.isNull(props.valueChangeHandler)) {
|
|
@@ -278,10 +236,18 @@ const BaseField = props => {
|
|
|
278
236
|
},
|
|
279
237
|
|
|
280
238
|
get value() {
|
|
281
|
-
if (!_Utils.default.isNull(valueObject) && !_Utils.default.isNull(valueProperty)) {
|
|
239
|
+
if (!_Utils.default.isNull(valueObject) && !_Utils.default.isNull(valueProperty) && !_Utils.default.isNull(valueObject[valueProperty])) {
|
|
282
240
|
return !_Utils.default.isNull(props.valueParser) ? props.valueParser(valueObject[valueProperty], false) : valueObject[valueProperty];
|
|
283
241
|
}
|
|
284
242
|
|
|
243
|
+
if (value) {
|
|
244
|
+
if (valueObject) {
|
|
245
|
+
valueObject[valueProperty] = value;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
return props.valueParser ? props.valueParser(value, false) : value;
|
|
249
|
+
}
|
|
250
|
+
|
|
285
251
|
return null;
|
|
286
252
|
},
|
|
287
253
|
|
|
@@ -306,23 +272,20 @@ const BaseField = props => {
|
|
|
306
272
|
},
|
|
307
273
|
|
|
308
274
|
refresh() {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
275
|
+
if (config) {
|
|
276
|
+
setVisible(_Utils.default.evaluateBooleanExpression(config.visible, config.id, true));
|
|
277
|
+
setDisabled(_Utils.default.evaluateBooleanExpression(config.disabled, config.id));
|
|
278
|
+
let requiredNewVal = !_Utils.default.isNull(config.validator) ? !_Utils.default.evaluateBooleanExpression(config.validator.nullable, config.id, true) : false;
|
|
279
|
+
validateOnChange.current = required !== null && required !== requiredNewVal && loadingRef.current === false;
|
|
280
|
+
setRequired(requiredNewVal);
|
|
281
|
+
}
|
|
314
282
|
},
|
|
315
283
|
|
|
316
284
|
get required() {
|
|
317
285
|
return required;
|
|
318
286
|
},
|
|
319
287
|
|
|
320
|
-
setFieldRequired(newVal) {
|
|
321
|
-
validateOnChange.current = true;
|
|
322
|
-
setRequired(newVal);
|
|
323
|
-
},
|
|
324
|
-
|
|
325
|
-
setFieldRequired(newVal, validate) {
|
|
288
|
+
setFieldRequired(newVal, validate = true) {
|
|
326
289
|
validateOnChange.current = validate;
|
|
327
290
|
setRequired(newVal);
|
|
328
291
|
},
|
|
@@ -333,18 +296,25 @@ const BaseField = props => {
|
|
|
333
296
|
}
|
|
334
297
|
|
|
335
298
|
return [];
|
|
299
|
+
},
|
|
300
|
+
|
|
301
|
+
loadData() {
|
|
302
|
+
if (props.loadDataHandler) {
|
|
303
|
+
props.loadDataHandler();
|
|
304
|
+
}
|
|
336
305
|
}
|
|
306
|
+
|
|
337
307
|
};
|
|
338
308
|
};
|
|
339
309
|
|
|
340
310
|
return config ? /*#__PURE__*/_react.default.createElement("div", {
|
|
341
311
|
className: "col-*-*",
|
|
342
312
|
key: config.id,
|
|
343
|
-
style: {
|
|
313
|
+
style: _Utils.default.mergeStyles({
|
|
344
314
|
textAlign: 'left',
|
|
345
315
|
marginLeft: '15px',
|
|
346
316
|
display: !visible || _Utils.default.getComponentAttribute(config, 'hidden', false) === true ? 'none' : 'block'
|
|
347
|
-
}
|
|
317
|
+
}, props.config)
|
|
348
318
|
}, /*#__PURE__*/_react.default.createElement("span", null, props.children({
|
|
349
319
|
required: required,
|
|
350
320
|
disabled: disabled,
|
|
@@ -27,28 +27,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
27
27
|
|
|
28
28
|
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); }
|
|
29
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); }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
-
|
|
42
30
|
const CustomDatePickerComponent = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
43
|
-
const
|
|
44
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
45
|
-
minDate = _React$useState2[0],
|
|
46
|
-
setMinDate = _React$useState2[1];
|
|
31
|
+
const [minDate, setMinDate] = _react.default.useState(null);
|
|
47
32
|
|
|
48
|
-
const
|
|
49
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
50
|
-
maxDate = _React$useState4[0],
|
|
51
|
-
setMaxDate = _React$useState4[1];
|
|
33
|
+
const [maxDate, setMaxDate] = _react.default.useState(null);
|
|
52
34
|
|
|
53
35
|
const base = props.base;
|
|
54
36
|
const defaultDate = !_Utils.default.isNull(base.valueObject[base.valueProperty]) ? new Date(base.valueObject[base.valueProperty]) : null;
|
|
@@ -162,7 +144,7 @@ const DatePicker = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default
|
|
|
162
144
|
return /*#__PURE__*/_react.default.createElement(_BaseField.BaseField, _extends({}, props, {
|
|
163
145
|
handle: props.handle,
|
|
164
146
|
valueParser: (value, inbound) => {
|
|
165
|
-
return !_Utils.default.isNull(value) ? inbound ? new Date(
|
|
147
|
+
return !_Utils.default.isNull(value) ? inbound ? new Date(value.toString()) : new Date(value).toLocaleDateString('en-GB').split('/').reverse().join('-') : null;
|
|
166
148
|
}
|
|
167
149
|
}), base => /*#__PURE__*/_react.default.createElement(CustomDatePickerComponent, _extends({
|
|
168
150
|
ref: ref,
|