@agilemotion/oui-react-js 1.6.4 → 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 +25 -20
|
@@ -1,121 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
8
|
var _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
|
|
13
|
-
|
|
14
9
|
var _BaseField = require("./BaseField");
|
|
15
|
-
|
|
16
10
|
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
17
|
-
|
|
18
11
|
var _Autocomplete = _interopRequireDefault(require("@material-ui/lab/Autocomplete"));
|
|
19
|
-
|
|
20
12
|
require("./Form.css");
|
|
21
|
-
|
|
22
13
|
var _ApplicationManager = _interopRequireDefault(require("../../ApplicationManager"));
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
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); }
|
|
31
|
-
|
|
32
|
-
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; } } }; }
|
|
33
|
-
|
|
34
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
-
|
|
36
|
-
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."); }
|
|
37
|
-
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
|
-
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; }
|
|
41
|
-
|
|
42
|
-
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; }
|
|
43
|
-
|
|
44
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
-
|
|
46
|
-
var status = function status(response) {
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
18
|
+
const status = response => {
|
|
47
19
|
if (response.ok) {
|
|
48
20
|
return Promise.resolve(response);
|
|
49
21
|
} else {
|
|
50
|
-
|
|
22
|
+
let error = new Error(response.statusText);
|
|
51
23
|
error.code = response.status;
|
|
52
24
|
return Promise.reject(error);
|
|
53
25
|
}
|
|
54
26
|
};
|
|
55
|
-
|
|
56
|
-
var json = function json(response) {
|
|
27
|
+
const json = response => {
|
|
57
28
|
return response.text();
|
|
58
29
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
setInputValue = _useState2[1];
|
|
70
|
-
|
|
71
|
-
var baseValue = (0, _react.useRef)(null);
|
|
72
|
-
|
|
73
|
-
var _useState3 = (0, _react.useState)([]),
|
|
74
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
75
|
-
options = _useState4[0],
|
|
76
|
-
setOptions = _useState4[1];
|
|
77
|
-
|
|
78
|
-
var _useState5 = (0, _react.useState)([]),
|
|
79
|
-
_useState6 = _slicedToArray(_useState5, 1),
|
|
80
|
-
entityStore = _useState6[0];
|
|
81
|
-
|
|
82
|
-
_react.default.useEffect(function () {
|
|
83
|
-
var minLen = _Utils.default.getComponentAttribute(props.config, 'minSearchAttributeLength', 1);
|
|
84
|
-
|
|
30
|
+
const location = window.location.protocol + "//" + window.location.hostname;
|
|
31
|
+
const AutoCompleteWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
32
|
+
const base = props.base;
|
|
33
|
+
const value = (0, _react.useRef)([]);
|
|
34
|
+
const [inputValue, setInputValue] = (0, _react.useState)('');
|
|
35
|
+
const baseValue = (0, _react.useRef)(null);
|
|
36
|
+
const [options, setOptions] = (0, _react.useState)([]);
|
|
37
|
+
const [entityStore] = (0, _react.useState)([]);
|
|
38
|
+
_react.default.useEffect(() => {
|
|
39
|
+
let minLen = _Utils.default.getComponentAttribute(props.config, 'minSearchAttributeLength', 1);
|
|
85
40
|
if (inputValue && inputValue.length >= minLen) {
|
|
86
41
|
fetchOptions();
|
|
87
42
|
}
|
|
88
43
|
}, [inputValue]);
|
|
89
|
-
|
|
90
|
-
_react.default.useEffect(function () {
|
|
44
|
+
_react.default.useEffect(() => {
|
|
91
45
|
if (!base.value) {
|
|
92
46
|
value.current = [];
|
|
93
47
|
} else if (Array.isArray(base.value)) {
|
|
94
|
-
value.current = base.value.reduce(
|
|
48
|
+
value.current = base.value.reduce((keys, currValue) => {
|
|
95
49
|
keys.push(currValue[props.config.attributes.searchAttribute]);
|
|
96
50
|
return keys;
|
|
97
51
|
}, []);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
_step;
|
|
101
|
-
|
|
102
|
-
try {
|
|
103
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
104
|
-
var valueElement = _step.value;
|
|
105
|
-
entityStore.push(valueElement);
|
|
106
|
-
}
|
|
107
|
-
} catch (err) {
|
|
108
|
-
_iterator.e(err);
|
|
109
|
-
} finally {
|
|
110
|
-
_iterator.f();
|
|
52
|
+
for (const valueElement of base.value) {
|
|
53
|
+
entityStore.push(valueElement);
|
|
111
54
|
}
|
|
112
|
-
|
|
113
55
|
baseValue.current = base.value;
|
|
114
56
|
setOptions(value.current);
|
|
115
57
|
}
|
|
116
58
|
}, [base.value]);
|
|
117
|
-
|
|
118
|
-
var fetchOptions = function fetchOptions() {
|
|
59
|
+
const fetchOptions = () => {
|
|
119
60
|
fetch(encodeURI(location + _ApplicationManager.default.getContextRoot() + props.config.attributes.optionsUrlPath), {
|
|
120
61
|
method: 'POST',
|
|
121
62
|
headers: {
|
|
@@ -126,117 +67,62 @@ var AutoCompleteWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.
|
|
|
126
67
|
},
|
|
127
68
|
body: JSON.stringify({
|
|
128
69
|
"parameters": [{
|
|
129
|
-
"name":
|
|
70
|
+
"name": `${props.config.attributes.searchAttribute}`,
|
|
130
71
|
"value": inputValue
|
|
131
72
|
}],
|
|
132
73
|
"pageSize": 60,
|
|
133
74
|
"currentPage": 0
|
|
134
75
|
})
|
|
135
|
-
}).then(status).then(json).then(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
var _baseValue$current;
|
|
145
|
-
|
|
146
|
-
var record = _step2.value;
|
|
147
|
-
|
|
148
|
-
if (!((_baseValue$current = baseValue.current) !== null && _baseValue$current !== void 0 && _baseValue$current.find(function (o) {
|
|
149
|
-
return o[props.config.attributes.searchAttribute] === record[props.config.attributes.searchAttribute];
|
|
150
|
-
}))) {
|
|
151
|
-
newOptions.push(record[props.config.attributes.searchAttribute]);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
if (!entityStore.find(function (o) {
|
|
155
|
-
return o.username === record.username;
|
|
156
|
-
})) {
|
|
157
|
-
entityStore.push(record);
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
162
|
-
_loop();
|
|
76
|
+
}).then(status).then(json).then(data => {
|
|
77
|
+
let records = JSON.parse(data).records;
|
|
78
|
+
let newOptions = [];
|
|
79
|
+
for (const record of records) {
|
|
80
|
+
if (!baseValue.current?.find(o => o[props.config.attributes.searchAttribute] === record[props.config.attributes.searchAttribute])) {
|
|
81
|
+
newOptions.push(record[props.config.attributes.searchAttribute]);
|
|
82
|
+
}
|
|
83
|
+
if (!entityStore.find(o => o.username === record.username)) {
|
|
84
|
+
entityStore.push(record);
|
|
163
85
|
}
|
|
164
|
-
} catch (err) {
|
|
165
|
-
_iterator2.e(err);
|
|
166
|
-
} finally {
|
|
167
|
-
_iterator2.f();
|
|
168
86
|
}
|
|
169
|
-
|
|
170
87
|
setOptions(newOptions);
|
|
171
|
-
}).catch(
|
|
88
|
+
}).catch(ignored => {});
|
|
172
89
|
};
|
|
173
|
-
|
|
174
|
-
var handleInputChange = function handleInputChange(event, newValue) {
|
|
90
|
+
const handleInputChange = (event, newValue) => {
|
|
175
91
|
setInputValue(newValue);
|
|
176
92
|
};
|
|
177
|
-
|
|
178
93
|
return /*#__PURE__*/_react.default.createElement(_Autocomplete.default, {
|
|
179
94
|
inputValue: inputValue,
|
|
180
95
|
multiple: true,
|
|
181
96
|
disabled: base.disabled,
|
|
182
97
|
value: value.current,
|
|
183
|
-
getOptionLabel:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
onChange: function onChange(e, newValue, reason) {
|
|
190
|
-
var val = [];
|
|
191
|
-
|
|
192
|
-
var _iterator3 = _createForOfIteratorHelper(newValue),
|
|
193
|
-
_step3;
|
|
194
|
-
|
|
195
|
-
try {
|
|
196
|
-
var _loop2 = function _loop2() {
|
|
197
|
-
var newValueElement = _step3.value;
|
|
198
|
-
val.push(entityStore.find(function (e) {
|
|
199
|
-
return e[props.config.attributes.searchAttribute] === newValueElement;
|
|
200
|
-
}));
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
204
|
-
_loop2();
|
|
205
|
-
}
|
|
206
|
-
} catch (err) {
|
|
207
|
-
_iterator3.e(err);
|
|
208
|
-
} finally {
|
|
209
|
-
_iterator3.f();
|
|
98
|
+
getOptionLabel: option => option ? option : '',
|
|
99
|
+
onInputChange: (event, newValue) => handleInputChange(event, newValue),
|
|
100
|
+
onChange: (e, newValue, reason) => {
|
|
101
|
+
let val = [];
|
|
102
|
+
for (const newValueElement of newValue) {
|
|
103
|
+
val.push(entityStore.find(e => e[props.config.attributes.searchAttribute] === newValueElement));
|
|
210
104
|
}
|
|
211
|
-
|
|
212
105
|
value.current = newValue;
|
|
213
106
|
base.handleValueChange(val);
|
|
214
107
|
},
|
|
215
108
|
options: options,
|
|
216
109
|
id: props.config.id,
|
|
217
|
-
renderInput:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}));
|
|
226
|
-
}
|
|
110
|
+
renderInput: params => /*#__PURE__*/_react.default.createElement(_TextField.default, _extends({
|
|
111
|
+
required: base.required,
|
|
112
|
+
error: base.hasError,
|
|
113
|
+
helperText: base.errorMessage,
|
|
114
|
+
variant: props.borderless ? 'standard' : 'outlined'
|
|
115
|
+
}, params, {
|
|
116
|
+
label: _Utils.default.getComponentAttribute(props.config, 'label', '')
|
|
117
|
+
}))
|
|
227
118
|
});
|
|
228
119
|
}));
|
|
229
|
-
|
|
230
|
-
var AutoComplete = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
120
|
+
const AutoComplete = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
231
121
|
return /*#__PURE__*/_react.default.createElement(_BaseField.BaseField, _extends({}, props, {
|
|
232
122
|
handle: props.handle
|
|
233
|
-
}),
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}, props));
|
|
238
|
-
});
|
|
123
|
+
}), base => /*#__PURE__*/_react.default.createElement(AutoCompleteWrapper, _extends({
|
|
124
|
+
ref: ref,
|
|
125
|
+
base: base
|
|
126
|
+
}, props)));
|
|
239
127
|
}));
|
|
240
|
-
|
|
241
|
-
var _default = AutoComplete;
|
|
242
|
-
exports.default = _default;
|
|
128
|
+
var _default = exports.default = AutoComplete;
|