@agilemotion/oui-react-js 1.6.0 → 1.6.2
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 +698 -421
- package/dist/BasicApp.js +5 -5
- package/dist/BasicAppHome.js +55 -26
- package/dist/DynamicJS.js +147 -65
- package/dist/InteractionPortalApp.css +1 -1
- package/dist/InteractionPortalApp.js +5 -5
- package/dist/InteractionPortalAppHome.js +65 -18
- package/dist/InteractionPortalApp_old.js +107 -61
- package/dist/RestUtils.js +339 -287
- package/dist/TypedValue.js +18 -15
- package/dist/Utils.js +375 -276
- package/dist/WithRouter.js +6 -6
- package/dist/assets/jss/components/authNavbarStyle.js +166 -164
- package/dist/assets/jss/components/buttonStyle.js +1 -1
- package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
- package/dist/assets/jss/components/cardBodyStyle.js +1 -1
- package/dist/assets/jss/components/cardFooterStyle.js +1 -1
- package/dist/assets/jss/components/cardHeaderStyle.js +13 -13
- package/dist/assets/jss/components/cardIconStyle.js +1 -1
- package/dist/assets/jss/components/cardStyle.js +1 -1
- package/dist/assets/jss/components/cardTextStyle.js +1 -1
- package/dist/assets/jss/components/customDropdownStyle.js +168 -169
- package/dist/assets/jss/components/customInputStyle.js +9 -3
- package/dist/assets/jss/components/dropdownStyle.js +69 -69
- package/dist/assets/jss/components/footerStyle.js +19 -13
- package/dist/assets/jss/components/headerLinksStyle.js +45 -48
- package/dist/assets/jss/components/headerStyle.js +68 -65
- package/dist/assets/jss/components/navbarLinksStyle.js +66 -77
- package/dist/assets/jss/components/navbarStyle.js +79 -76
- package/dist/assets/jss/components/sidebarStyle.js +436 -436
- package/dist/assets/jss/components/typographyStyle.js +9 -3
- package/dist/assets/jss/rootStyle.js +96 -81
- package/dist/assets/jss/views/layoutStyle.js +44 -41
- package/dist/assets/jss/views/loginBasicStyle.js +1 -1
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +1 -1
- package/dist/assets/jss/views/loginStyle.js +82 -77
- package/dist/components/AlertBar.js +50 -17
- package/dist/components/AlertItem.js +35 -12
- package/dist/components/AlertTemplate.js +30 -29
- package/dist/components/Button.js +62 -34
- package/dist/components/Calendar.js +140 -91
- package/dist/components/ConfirmationDialog.js +36 -11
- package/dist/components/DataGrid.js +512 -270
- package/dist/components/DataGridColumn.js +47 -22
- package/dist/components/DataGridFilter.js +186 -105
- package/dist/components/DataGridHeading.js +50 -32
- package/dist/components/Dialog.js +90 -35
- package/dist/components/DocumentTemplateDesigner.js +34 -16
- package/dist/components/DocumentTemplateDesignerComponent.css +0 -157
- package/dist/components/DocumentTemplateDesignerComponent.js +118 -62
- package/dist/components/DocumentTemplatePlaceholderDialog.js +52 -30
- package/dist/components/DocumentViewer.js +34 -18
- package/dist/components/DocumentViewerComponent.js +26 -9
- package/dist/components/ElementResizeHandler.js +229 -207
- package/dist/components/FileThumb.js +32 -10
- package/dist/components/Graph.js +153 -85
- package/dist/components/GraphNode.js +58 -38
- package/dist/components/HtmlPanel.js +67 -39
- package/dist/components/Icon.js +206 -166
- package/dist/components/LoadingIndicator.js +3 -3
- package/dist/components/LottieIcon.js +1 -1
- package/dist/components/PopupView.js +39 -19
- package/dist/components/Portlet.js +35 -19
- package/dist/components/RegularButton.js +28 -32
- package/dist/components/SignaturePanel.js +37 -17
- package/dist/components/SocketManager.js +178 -119
- package/dist/components/StepperTitleBar.js +62 -42
- package/dist/components/TabPage.js +30 -25
- package/dist/components/TabPanel.js +86 -33
- package/dist/components/TableCellContent.js +51 -32
- package/dist/components/TemplateDesigner.js +173 -121
- package/dist/components/TemplateItemEventHandler.js +335 -221
- package/dist/components/TemplateTable.js +183 -118
- package/dist/components/TitleBar.js +26 -11
- package/dist/components/Toolbar.js +67 -38
- package/dist/components/Tooltip.js +43 -35
- package/dist/components/Tree.js +85 -44
- package/dist/components/UseIsVisible.js +25 -4
- package/dist/components/card/Card.js +27 -33
- package/dist/components/card/CardAvatar.js +20 -19
- package/dist/components/card/CardBody.js +24 -27
- package/dist/components/card/CardFooter.js +23 -24
- package/dist/components/card/CardHeader.js +24 -27
- package/dist/components/card/CardIcon.js +17 -13
- package/dist/components/card/CardText.js +17 -13
- package/dist/components/customInput/CustomInput.js +22 -36
- package/dist/components/dashboard/{BasicBusinessAppDashboard.js → FoldingSideTabDashboard.js} +111 -63
- package/dist/components/dashboard/SideMenuModuleDashboard.css +60 -0
- package/dist/components/dashboard/SideMenuModuleDashboard.js +423 -0
- package/dist/components/dashboard/TopMenuModuleDashboard.js +138 -0
- package/dist/components/dashboard/components/Header.js +29 -12
- package/dist/components/dashboard/components/LeftDrawer.js +3 -5
- package/dist/components/dashboard/components/UserIdentity.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +131 -87
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +488 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +64 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.css +65 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +556 -0
- package/dist/components/dashboard/components/portal/Timeline.js +1 -1
- package/dist/components/dashboard/components/portal/Workspace.js +5 -11
- package/dist/components/footer/Footer.js +31 -24
- package/dist/components/footer/HomeFooter.js +68 -34
- package/dist/components/form/AddressSearch.js +78 -42
- package/dist/components/form/AutoComplete.js +136 -55
- package/dist/components/form/BaseField.js +108 -56
- package/dist/components/form/Checkbox.js +10 -8
- package/dist/components/form/DatePicker.js +47 -25
- package/dist/components/form/FieldSet.js +217 -84
- package/dist/components/form/Form.js +334 -200
- package/dist/components/form/GridField.js +185 -82
- package/dist/components/form/IconField.js +9 -7
- package/dist/components/form/ImageEditor.js +141 -92
- package/dist/components/form/LabelField.js +12 -10
- package/dist/components/form/LookupField.js +54 -32
- package/dist/components/form/MultiFileUploadField.js +101 -67
- package/dist/components/form/RadioGroup.js +33 -16
- package/dist/components/form/Section.js +84 -34
- package/dist/components/form/SelectItem.js +55 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +11 -9
- package/dist/components/form/Switch.js +10 -8
- package/dist/components/form/TextField.js +34 -16
- package/dist/components/form/TimePicker.js +19 -15
- package/dist/components/form/TransferList.js +153 -75
- package/dist/components/form/UploadField.js +183 -128
- package/dist/components/grid/GridContainer.js +12 -8
- package/dist/components/grid/GridItem.js +12 -8
- package/dist/components/layout/CollapsiblePanel.js +44 -18
- package/dist/components/layout/Layout.js +81 -40
- package/dist/components/layout/VC.css +1 -1
- package/dist/components/layout/View.js +136 -62
- package/dist/components/layout/ViewContainer.js +13 -11
- package/dist/components/layout/ViewPort.js +25 -10
- package/dist/components/layout/Window.js +87 -53
- package/dist/components/layout/WindowViewPort.js +38 -16
- package/dist/components/media/ClosablePanel.js +7 -7
- package/dist/components/media/LobbyWaitingList.js +7 -9
- package/dist/components/media/MediaSoupHelper.js +379 -187
- package/dist/components/media/SideBarContent.js +22 -14
- package/dist/components/media/SocketRequest.js +5 -1
- package/dist/components/media/SocketResponse.js +5 -1
- package/dist/components/media/Timer.js +35 -15
- package/dist/components/media/Toolbar.css +5 -0
- package/dist/components/media/Toolbar.js +220 -102
- package/dist/components/media/ToolbarButton.js +82 -33
- package/dist/components/media/Toolbar_bck.js +142 -70
- package/dist/components/media/Tracks.js +31 -28
- package/dist/components/media/TrainingRoom.js +284 -121
- package/dist/components/media/Transports.js +27 -24
- package/dist/components/media/VCEventManager.js +95 -31
- package/dist/components/media/VCEventType.js +5 -1
- package/dist/components/media/VCParticipantList.js +40 -14
- package/dist/components/media/VCParticipantListItem.js +92 -41
- package/dist/components/media/VCRoom.js +29 -11
- package/dist/components/media/VCRoomParticipant.js +488 -242
- package/dist/components/media/VCRoomRecorder.js +236 -175
- package/dist/components/media/VCRoomWorkspace.js +505 -245
- package/dist/components/media/Video.js +89 -25
- package/dist/components/media/VideoPlayer.js +56 -22
- package/dist/components/media/chat/ChatRoom.js +255 -132
- package/dist/components/media/chat/ChatRoomItem.js +35 -14
- package/dist/components/media/chat/ChatRoomList.js +43 -13
- package/dist/components/menu/CollapsibleMenu.js +39 -20
- package/dist/components/menu/MenuBars.js +81 -48
- package/dist/components/menu/MenuButton.js +95 -60
- package/dist/components/menu/MenuItem.js +28 -9
- package/dist/components/menu/MenuLink.js +12 -10
- package/dist/components/menu/PopupMenu.js +16 -12
- package/dist/components/navbars/AuthNavbar.js +27 -18
- package/dist/components/navbars/HomeNavbar.js +243 -194
- package/dist/components/navbars/PortalNavbar.js +50 -26
- package/dist/components/signatures/AgilitySignaturePanel.js +96 -39
- package/dist/components/signatures/AlertItem.js +36 -13
- package/dist/components/signatures/Card.js +4 -4
- package/dist/components/signatures/DocumentContainer.js +141 -57
- package/dist/components/signatures/ImageSignatureInput.js +90 -59
- package/dist/components/signatures/MenuButton.js +53 -33
- package/dist/components/signatures/Prompt.js +26 -5
- package/dist/components/signatures/ResponsiveTable.js +302 -197
- package/dist/components/signatures/SearchView.js +77 -36
- package/dist/components/signatures/SignatorySearch.js +30 -10
- package/dist/components/signatures/SignatorySearchForm.js +35 -18
- package/dist/components/signatures/SignatureInput.js +56 -26
- package/dist/components/signatures/SignatureInputProps.js +107 -55
- package/dist/components/signatures/SignatureTemplateDesigner.js +340 -235
- package/dist/components/signatures/Toolbar.js +135 -94
- package/dist/components/signatures/ViewUtils.js +273 -224
- package/dist/components/typography/Danger.js +3 -5
- package/dist/components/typography/Info.js +3 -5
- package/dist/components/typography/Link.js +3 -5
- package/dist/event/ActionHandlers.js +57 -43
- package/dist/event/Event.js +16 -13
- package/dist/event/EventListener.js +39 -36
- package/dist/event/EventType.js +5 -1
- package/dist/event/LoadDataActionHandler.js +20 -8
- package/dist/event/Observable.js +323 -142
- package/dist/event/RouteActionHandler.js +139 -125
- package/dist/event/ScriptActionHandler.js +20 -8
- package/dist/event/ServiceCallActionHandler.js +51 -39
- package/dist/event/SignalGraphActionHandler.js +19 -7
- package/dist/js/Addresses.js +38 -24
- package/dist/js/Calendar.js +168 -161
- package/dist/js/DynamicLib.js +14 -11
- package/dist/js/Media.js +213 -120
- package/dist/js/Validators.js +6 -5
- package/dist/js/Windows.js +48 -47
- package/dist/redux/store/ConfigureStore.js +17 -9
- package/dist/redux/store/DashboardStore.js +110 -43
- package/dist/redux/store/History.js +1 -1
- package/dist/redux/store/SecurityStore.js +59 -20
- package/dist/security/TokenManager.js +44 -30
- package/dist/theme-default.js +1 -1
- package/dist/view/Dashboard.js +230 -137
- package/dist/view/PortalDashboard.js +5 -5
- package/dist/view/Settings.js +4 -2
- package/dist/view/Views.js +27 -14
- package/dist/view/security/ChangePasswordBasic.js +97 -40
- package/dist/view/security/ForgotPassword.js +59 -22
- package/dist/view/security/ForgotPasswordBasic.js +62 -21
- package/dist/view/security/Login.js +64 -24
- package/dist/view/security/LoginBasic.js +65 -26
- package/dist/view/security/LoginInteractionPortal.js +62 -25
- package/dist/view/security/ResetPassword.js +65 -23
- package/dist/view/security/ResetPasswordBasic.js +91 -37
- package/dist/view/security/Security.js +12 -12
- package/package.json +1 -2
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -154
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +0 -447
- /package/dist/components/dashboard/{BusinessPortalAppDashboard.css → TopMenuModuleDashboard.css} +0 -0
- /package/dist/components/dashboard/components/blackDashboard/sidebar/{Sidebar.css → FoldingTabSidebar.css} +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -13,42 +15,74 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}), " by", " ", /*#__PURE__*/_react.default.createElement("a", {
|
|
46
|
-
href: "https://www.creative-tim.com/",
|
|
47
|
-
target: "_blank"
|
|
48
|
-
}, "Creative Tim", " "), " ", "for a better web.", " "), " "), " ");
|
|
18
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
|
+
|
|
20
|
+
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); } }
|
|
21
|
+
|
|
22
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
23
|
+
|
|
24
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
|
+
|
|
26
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
|
+
|
|
28
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
29
|
+
|
|
30
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
31
|
+
|
|
32
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
+
|
|
34
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
|
+
|
|
36
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
+
|
|
38
|
+
var HomeFooter = /*#__PURE__*/function (_React$Component) {
|
|
39
|
+
_inherits(HomeFooter, _React$Component);
|
|
40
|
+
|
|
41
|
+
var _super = _createSuper(HomeFooter);
|
|
42
|
+
|
|
43
|
+
function HomeFooter() {
|
|
44
|
+
_classCallCheck(this, HomeFooter);
|
|
45
|
+
|
|
46
|
+
return _super.apply(this, arguments);
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
_createClass(HomeFooter, [{
|
|
50
|
+
key: "render",
|
|
51
|
+
value: function render() {
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement("footer", {
|
|
53
|
+
className: "footer" + (this.props.default ? " footer-default" : "")
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_reactstrap.Container, {
|
|
55
|
+
fluid: this.props.fluid ? true : false
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
57
|
+
className: "nav"
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement("li", {
|
|
59
|
+
className: "nav-item"
|
|
60
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
61
|
+
className: "nav-link",
|
|
62
|
+
href: "https://www.creative-tim.com"
|
|
63
|
+
}, "Creative Tim", " "), " "), " ", /*#__PURE__*/_react.default.createElement("li", {
|
|
64
|
+
className: "nav-item"
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
66
|
+
className: "nav-link",
|
|
67
|
+
href: "https://www.creative-tim.com/presentation"
|
|
68
|
+
}, "About us", " "), " "), " ", /*#__PURE__*/_react.default.createElement("li", {
|
|
69
|
+
className: "nav-item"
|
|
70
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
71
|
+
className: "nav-link",
|
|
72
|
+
href: "https://blog.creative-tim.com"
|
|
73
|
+
}, "Blog", " "), " "), " "), " ", /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
+
className: "copyright"
|
|
75
|
+
}, " ", "\xA9", new Date().getFullYear(), "made with ", /*#__PURE__*/_react.default.createElement("i", {
|
|
76
|
+
className: "tim-icons icon-heart-2"
|
|
77
|
+
}), " by", " ", /*#__PURE__*/_react.default.createElement("a", {
|
|
78
|
+
href: "https://www.creative-tim.com/",
|
|
79
|
+
target: "_blank"
|
|
80
|
+
}, "Creative Tim", " "), " ", "for a better web.", " "), " "), " ");
|
|
81
|
+
}
|
|
82
|
+
}]);
|
|
83
|
+
|
|
84
|
+
return HomeFooter;
|
|
85
|
+
}(_react.default.Component);
|
|
52
86
|
|
|
53
87
|
HomeFooter.propTypes = {
|
|
54
88
|
default: _propTypes.default.bool,
|
|
@@ -23,16 +23,48 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
23
23
|
|
|
24
24
|
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); }
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
|
+
|
|
30
|
+
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; } } }; }
|
|
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
|
+
var AddressSearchWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
37
|
+
var base = props.base;
|
|
38
|
+
|
|
39
|
+
var getAddressProp = function getAddressProp(components, id) {
|
|
40
|
+
var _iterator = _createForOfIteratorHelper(components),
|
|
41
|
+
_step;
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
45
|
+
var component = _step.value;
|
|
46
|
+
|
|
47
|
+
var _iterator2 = _createForOfIteratorHelper(component.types),
|
|
48
|
+
_step2;
|
|
49
|
+
|
|
50
|
+
try {
|
|
51
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
52
|
+
var type = _step2.value;
|
|
53
|
+
|
|
54
|
+
if (type === id) {
|
|
55
|
+
return component.long_name;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
} catch (err) {
|
|
59
|
+
_iterator2.e(err);
|
|
60
|
+
} finally {
|
|
61
|
+
_iterator2.f();
|
|
34
62
|
}
|
|
35
63
|
}
|
|
64
|
+
} catch (err) {
|
|
65
|
+
_iterator.e(err);
|
|
66
|
+
} finally {
|
|
67
|
+
_iterator.f();
|
|
36
68
|
}
|
|
37
69
|
|
|
38
70
|
return ' ';
|
|
@@ -48,46 +80,48 @@ const AddressSearchWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_rea
|
|
|
48
80
|
style: {
|
|
49
81
|
cursor: "pointer"
|
|
50
82
|
},
|
|
51
|
-
onClick: ()
|
|
83
|
+
onClick: function onClick() {
|
|
52
84
|
base.handleValueChange(null);
|
|
53
85
|
document.getElementById("__address_search__").value = null;
|
|
54
86
|
}
|
|
55
87
|
}, /*#__PURE__*/_react.default.createElement(_Close.default, null)) : null,
|
|
56
|
-
inputComponent: ({
|
|
57
|
-
inputRef,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
inputComponent: function inputComponent(_ref) {
|
|
89
|
+
var inputRef = _ref.inputRef,
|
|
90
|
+
onFocus = _ref.onFocus,
|
|
91
|
+
onBlur = _ref.onBlur,
|
|
92
|
+
props = _objectWithoutProperties(_ref, ["inputRef", "onFocus", "onBlur"]);
|
|
93
|
+
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(_reactGoogleAutocomplete.default, _extends({
|
|
95
|
+
apiKey: 'AIzaSyCocunxfGatXwjt1uASpPxQ0PKcONSi7wY'
|
|
96
|
+
}, props, {
|
|
97
|
+
onPlaceSelected: function onPlaceSelected(place) {
|
|
98
|
+
var data = {};
|
|
99
|
+
data.googleAddress = place.formatted_address;
|
|
100
|
+
data.street = getAddressProp(place.address_components, 'street_number') + " " + getAddressProp(place.address_components, 'route');
|
|
101
|
+
data.suburb = getAddressProp(place.address_components, 'sublocality_level_1');
|
|
102
|
+
data.city = getAddressProp(place.address_components, 'locality');
|
|
103
|
+
data.municipality = getAddressProp(place.address_components, 'administrative_area_level_2');
|
|
104
|
+
data.province = getAddressProp(place.address_components, 'administrative_area_level_1');
|
|
105
|
+
data.country = getAddressProp(place.address_components, 'country');
|
|
106
|
+
data.postalCode = getAddressProp(place.address_components, 'postal_code');
|
|
107
|
+
base.handleValueChange(data);
|
|
108
|
+
document.getElementById("__address_search__").value = data.googleAddress;
|
|
109
|
+
},
|
|
110
|
+
options: {
|
|
111
|
+
types: ["geocode", "establishment"],
|
|
112
|
+
componentRestrictions: {
|
|
113
|
+
"country": "za"
|
|
114
|
+
}
|
|
81
115
|
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
84
118
|
});
|
|
85
119
|
}));
|
|
86
120
|
|
|
87
|
-
|
|
121
|
+
var AddressSearch = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
88
122
|
return /*#__PURE__*/_react.default.createElement(_BaseField.BaseField, _extends({}, props, {
|
|
89
123
|
handle: props.handle,
|
|
90
|
-
valueParser: (value, inbound)
|
|
124
|
+
valueParser: function valueParser(value, inbound) {
|
|
91
125
|
if (!_Utils.default.isNull(value)) {
|
|
92
126
|
if (!inbound) {
|
|
93
127
|
return value.googleAddress;
|
|
@@ -96,10 +130,12 @@ const AddressSearch = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defa
|
|
|
96
130
|
|
|
97
131
|
return value;
|
|
98
132
|
}
|
|
99
|
-
}),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
133
|
+
}), function (base) {
|
|
134
|
+
return /*#__PURE__*/_react.default.createElement(AddressSearchWrapper, _extends({
|
|
135
|
+
ref: ref,
|
|
136
|
+
base: base
|
|
137
|
+
}, props));
|
|
138
|
+
});
|
|
103
139
|
}));
|
|
104
140
|
|
|
105
141
|
var _default = AddressSearch;
|
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -21,55 +23,91 @@ var _ApplicationManager = _interopRequireDefault(require("../../ApplicationManag
|
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
26
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
25
27
|
|
|
26
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
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; }
|
|
27
29
|
|
|
28
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); }
|
|
29
31
|
|
|
30
|
-
|
|
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) {
|
|
31
47
|
if (response.ok) {
|
|
32
48
|
return Promise.resolve(response);
|
|
33
49
|
} else {
|
|
34
|
-
|
|
50
|
+
var error = new Error(response.statusText);
|
|
35
51
|
error.code = response.status;
|
|
36
52
|
return Promise.reject(error);
|
|
37
53
|
}
|
|
38
54
|
};
|
|
39
55
|
|
|
40
|
-
|
|
56
|
+
var json = function json(response) {
|
|
41
57
|
return response.text();
|
|
42
58
|
};
|
|
43
59
|
|
|
44
|
-
|
|
60
|
+
var location = window.location.protocol + "//" + window.location.hostname;
|
|
61
|
+
|
|
62
|
+
var AutoCompleteWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
63
|
+
var base = props.base;
|
|
64
|
+
var value = (0, _react.useRef)([]);
|
|
65
|
+
|
|
66
|
+
var _useState = (0, _react.useState)(''),
|
|
67
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
+
inputValue = _useState2[0],
|
|
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];
|
|
45
77
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const [inputValue, setInputValue] = (0, _react.useState)('');
|
|
50
|
-
const baseValue = (0, _react.useRef)(null);
|
|
51
|
-
const [options, setOptions] = (0, _react.useState)([]);
|
|
52
|
-
const [entityStore] = (0, _react.useState)([]);
|
|
78
|
+
var _useState5 = (0, _react.useState)([]),
|
|
79
|
+
_useState6 = _slicedToArray(_useState5, 1),
|
|
80
|
+
entityStore = _useState6[0];
|
|
53
81
|
|
|
54
|
-
_react.default.useEffect(()
|
|
55
|
-
|
|
82
|
+
_react.default.useEffect(function () {
|
|
83
|
+
var minLen = _Utils.default.getComponentAttribute(props.config, 'minSearchAttributeLength', 1);
|
|
56
84
|
|
|
57
85
|
if (inputValue && inputValue.length >= minLen) {
|
|
58
86
|
fetchOptions();
|
|
59
87
|
}
|
|
60
88
|
}, [inputValue]);
|
|
61
89
|
|
|
62
|
-
_react.default.useEffect(()
|
|
90
|
+
_react.default.useEffect(function () {
|
|
63
91
|
if (!base.value) {
|
|
64
92
|
value.current = [];
|
|
65
93
|
} else if (Array.isArray(base.value)) {
|
|
66
|
-
value.current = base.value.reduce((keys, currValue)
|
|
94
|
+
value.current = base.value.reduce(function (keys, currValue) {
|
|
67
95
|
keys.push(currValue[props.config.attributes.searchAttribute]);
|
|
68
96
|
return keys;
|
|
69
97
|
}, []);
|
|
70
98
|
|
|
71
|
-
|
|
72
|
-
|
|
99
|
+
var _iterator = _createForOfIteratorHelper(base.value),
|
|
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();
|
|
73
111
|
}
|
|
74
112
|
|
|
75
113
|
baseValue.current = base.value;
|
|
@@ -77,7 +115,7 @@ const AutoCompleteWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
77
115
|
}
|
|
78
116
|
}, [base.value]);
|
|
79
117
|
|
|
80
|
-
|
|
118
|
+
var fetchOptions = function fetchOptions() {
|
|
81
119
|
fetch(encodeURI(location + _ApplicationManager.default.getContextRoot() + props.config.attributes.optionsUrlPath), {
|
|
82
120
|
method: 'POST',
|
|
83
121
|
headers: {
|
|
@@ -94,27 +132,46 @@ const AutoCompleteWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
94
132
|
"pageSize": 60,
|
|
95
133
|
"currentPage": 0
|
|
96
134
|
})
|
|
97
|
-
}).then(status).then(json).then(data
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
135
|
+
}).then(status).then(json).then(function (data) {
|
|
136
|
+
var records = JSON.parse(data).records;
|
|
137
|
+
var newOptions = [];
|
|
138
|
+
|
|
139
|
+
var _iterator2 = _createForOfIteratorHelper(records),
|
|
140
|
+
_step2;
|
|
141
|
+
|
|
142
|
+
try {
|
|
143
|
+
var _loop = function _loop() {
|
|
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();
|
|
110
163
|
}
|
|
164
|
+
} catch (err) {
|
|
165
|
+
_iterator2.e(err);
|
|
166
|
+
} finally {
|
|
167
|
+
_iterator2.f();
|
|
111
168
|
}
|
|
112
169
|
|
|
113
170
|
setOptions(newOptions);
|
|
114
|
-
}).catch(ignored
|
|
171
|
+
}).catch(function (ignored) {});
|
|
115
172
|
};
|
|
116
173
|
|
|
117
|
-
|
|
174
|
+
var handleInputChange = function handleInputChange(event, newValue) {
|
|
118
175
|
setInputValue(newValue);
|
|
119
176
|
};
|
|
120
177
|
|
|
@@ -123,13 +180,33 @@ const AutoCompleteWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
123
180
|
multiple: true,
|
|
124
181
|
disabled: base.disabled,
|
|
125
182
|
value: value.current,
|
|
126
|
-
getOptionLabel:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
183
|
+
getOptionLabel: function getOptionLabel(option) {
|
|
184
|
+
return option ? option : '';
|
|
185
|
+
},
|
|
186
|
+
onInputChange: function onInputChange(event, newValue) {
|
|
187
|
+
return handleInputChange(event, newValue);
|
|
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();
|
|
133
210
|
}
|
|
134
211
|
|
|
135
212
|
value.current = newValue;
|
|
@@ -137,24 +214,28 @@ const AutoCompleteWrapper = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_reac
|
|
|
137
214
|
},
|
|
138
215
|
options: options,
|
|
139
216
|
id: props.config.id,
|
|
140
|
-
renderInput:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
217
|
+
renderInput: function renderInput(params) {
|
|
218
|
+
return /*#__PURE__*/_react.default.createElement(_TextField.default, _extends({
|
|
219
|
+
required: base.required,
|
|
220
|
+
error: base.hasError,
|
|
221
|
+
helperText: base.errorMessage,
|
|
222
|
+
variant: props.borderless ? 'standard' : 'outlined'
|
|
223
|
+
}, params, {
|
|
224
|
+
label: _Utils.default.getComponentAttribute(props.config, 'label', '')
|
|
225
|
+
}));
|
|
226
|
+
}
|
|
148
227
|
});
|
|
149
228
|
}));
|
|
150
229
|
|
|
151
|
-
|
|
230
|
+
var AutoComplete = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
152
231
|
return /*#__PURE__*/_react.default.createElement(_BaseField.BaseField, _extends({}, props, {
|
|
153
232
|
handle: props.handle
|
|
154
|
-
}),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
233
|
+
}), function (base) {
|
|
234
|
+
return /*#__PURE__*/_react.default.createElement(AutoCompleteWrapper, _extends({
|
|
235
|
+
ref: ref,
|
|
236
|
+
base: base
|
|
237
|
+
}, props));
|
|
238
|
+
});
|
|
158
239
|
}));
|
|
159
240
|
|
|
160
241
|
var _default = AutoComplete;
|