orc-shared 1.2.2-dev.0 → 1.2.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/actions/applications.js +12 -50
- package/dist/actions/authentication.js +8 -43
- package/dist/actions/countries.js +4 -34
- package/dist/actions/locale.js +12 -52
- package/dist/actions/makeApiAction.js +6 -52
- package/dist/actions/makeOrcApiAction.js +0 -25
- package/dist/actions/metadata.js +60 -171
- package/dist/actions/modules.js +0 -26
- package/dist/actions/navigation.js +0 -32
- package/dist/actions/requestState.js +0 -18
- package/dist/actions/requestsApi.js +0 -17
- package/dist/actions/scopes.js +12 -54
- package/dist/actions/timezones.js +4 -34
- package/dist/actions/toasts.js +3 -23
- package/dist/actions/versionInfo.js +4 -37
- package/dist/actions/view.js +0 -38
- package/dist/buildStore.js +0 -52
- package/dist/components/AppFrame/About.js +3 -67
- package/dist/components/AppFrame/Anchor.js +1 -25
- package/dist/components/AppFrame/AppFrame.js +21 -90
- package/dist/components/AppFrame/ApplicationSelector/ApplicationDialog.js +4 -35
- package/dist/components/AppFrame/ApplicationSelector/Header.js +2 -32
- package/dist/components/AppFrame/ApplicationSelector/index.js +1 -30
- package/dist/components/AppFrame/ConnectedToastList.js +0 -31
- package/dist/components/AppFrame/Help.js +0 -25
- package/dist/components/AppFrame/MenuItem.js +18 -71
- package/dist/components/AppFrame/Preferences.js +12 -76
- package/dist/components/AppFrame/Sidebar.js +9 -54
- package/dist/components/AppFrame/Topbar.js +9 -65
- package/dist/components/AppFrame/index.js +0 -20
- package/dist/components/AppFrame/useApplicationHelpUrl.js +0 -22
- package/dist/components/ApplicationModuleLoader.js +5 -44
- package/dist/components/Authenticate.js +5 -48
- package/dist/components/Button.js +0 -24
- package/dist/components/CategoryList.js +25 -80
- package/dist/components/Checkbox.js +4 -42
- package/dist/components/ColumnWrapper.js +0 -19
- package/dist/components/Culture.js +0 -29
- package/dist/components/DevPages.js +0 -21
- package/dist/components/DropMenu/Menu.js +4 -36
- package/dist/components/DropMenu/index.js +10 -48
- package/dist/components/ErrorPlaceholder.js +3 -31
- package/dist/components/Form/Combination.js +3 -28
- package/dist/components/Form/Field.js +7 -38
- package/dist/components/Form/FieldElements.js +10 -42
- package/dist/components/Form/FieldList.js +23 -89
- package/dist/components/Form/Fieldset.js +1 -27
- package/dist/components/Form/Form.js +6 -37
- package/dist/components/Form/FormElement.js +1 -20
- package/dist/components/Form/InputField.js +16 -65
- package/dist/components/Form/Inputs/Button.js +6 -36
- package/dist/components/Form/Inputs/Date.js +3 -29
- package/dist/components/Form/Inputs/FieldButtons.js +0 -25
- package/dist/components/Form/Inputs/Number.js +8 -47
- package/dist/components/Form/Inputs/ReadOnly.js +0 -29
- package/dist/components/Form/Inputs/SmallButton.js +7 -39
- package/dist/components/Form/Inputs/Text.js +9 -42
- package/dist/components/Form/Inputs/Time.js +5 -34
- package/dist/components/Form/Inputs/Toggles.js +6 -40
- package/dist/components/Form/Inputs/Translation.js +17 -76
- package/dist/components/Form/Inputs/index.js +0 -28
- package/dist/components/Form/index.js +0 -20
- package/dist/components/Head.js +0 -22
- package/dist/components/I18n.js +1 -29
- package/dist/components/Icon.js +1 -27
- package/dist/components/IconButton.js +2 -32
- package/dist/components/Input.js +3 -43
- package/dist/components/InternetExplorerWarningMessage.js +0 -31
- package/dist/components/List/DataCell.js +4 -43
- package/dist/components/List/HeadCell.js +3 -43
- package/dist/components/List/HeadRow.js +2 -25
- package/dist/components/List/List.js +35 -105
- package/dist/components/List/Row.js +7 -38
- package/dist/components/List/enhanceColumnDefs.js +0 -28
- package/dist/components/List/index.js +0 -20
- package/dist/components/Loader.js +3 -46
- package/dist/components/LoadingIcon.js +0 -24
- package/dist/components/MaterialUI/DataDisplay/Badge.js +2 -31
- package/dist/components/MaterialUI/DataDisplay/Chip.js +1 -33
- package/dist/components/MaterialUI/DataDisplay/CollapsableList.js +5 -49
- package/dist/components/MaterialUI/DataDisplay/Divider.js +0 -30
- package/dist/components/MaterialUI/DataDisplay/Icon.js +3 -29
- package/dist/components/MaterialUI/DataDisplay/List.js +16 -55
- package/dist/components/MaterialUI/DataDisplay/Modal.js +1 -36
- package/dist/components/MaterialUI/DataDisplay/Notification.js +12 -66
- package/dist/components/MaterialUI/DataDisplay/NotificationProps.js +1 -34
- package/dist/components/MaterialUI/DataDisplay/PopperedElements/PopperedIcon.js +1 -23
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/ActionModal.js +5 -37
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Address.js +1 -33
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/ConfirmationModal.js +7 -28
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/DiscountedPrice.js +2 -32
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.js +14 -54
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Placeholder.js +4 -33
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/SectionTitle.js +0 -25
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.js +12 -58
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/TableInfoBar.js +0 -29
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Translations.js +11 -57
- package/dist/components/MaterialUI/DataDisplay/SelectionList.js +21 -68
- package/dist/components/MaterialUI/DataDisplay/Table.js +33 -122
- package/dist/components/MaterialUI/DataDisplay/TableHeaderCell.js +0 -35
- package/dist/components/MaterialUI/DataDisplay/TableProps.js +1 -49
- package/dist/components/MaterialUI/DataDisplay/Timeline.js +1 -21
- package/dist/components/MaterialUI/DataDisplay/TimelineItem.js +4 -32
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/MultipleLinesText.js +6 -45
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/TooltippedIcon.js +4 -30
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/TooltippedTypography.js +1 -22
- package/dist/components/MaterialUI/DataDisplay/TransferList.js +28 -95
- package/dist/components/MaterialUI/DataDisplay/chipProps.js +1 -38
- package/dist/components/MaterialUI/DataDisplay/collapsableListProps.js +1 -37
- package/dist/components/MaterialUI/DataDisplay/dividerProps.js +1 -41
- package/dist/components/MaterialUI/DataDisplay/index.js +0 -33
- package/dist/components/MaterialUI/DataDisplay/modalProps.js +1 -36
- package/dist/components/MaterialUI/DataDisplay/tableHelpers.js +3 -66
- package/dist/components/MaterialUI/DataDisplay/useTableSelection.js +6 -45
- package/dist/components/MaterialUI/Feedback/NotificationContext.js +3 -38
- package/dist/components/MaterialUI/Feedback/loadingScreen.js +3 -42
- package/dist/components/MaterialUI/Feedback/useNotification.js +0 -21
- package/dist/components/MaterialUI/Inputs/Autocomplete.js +3 -44
- package/dist/components/MaterialUI/Inputs/AutocompleteProps.js +1 -37
- package/dist/components/MaterialUI/Inputs/Checkbox.js +0 -39
- package/dist/components/MaterialUI/Inputs/CheckboxGroup.js +0 -42
- package/dist/components/MaterialUI/Inputs/CheckboxGroupProps.js +1 -38
- package/dist/components/MaterialUI/Inputs/CheckboxProps.js +1 -39
- package/dist/components/MaterialUI/Inputs/DatePicker.js +14 -52
- package/dist/components/MaterialUI/Inputs/InputBase.js +5 -54
- package/dist/components/MaterialUI/Inputs/InputBaseProps.js +1 -49
- package/dist/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +10 -63
- package/dist/components/MaterialUI/Inputs/PredefinedElements/TitledSelect.js +3 -31
- package/dist/components/MaterialUI/Inputs/Radio.js +8 -54
- package/dist/components/MaterialUI/Inputs/RadioProps.js +1 -41
- package/dist/components/MaterialUI/Inputs/Select.js +6 -70
- package/dist/components/MaterialUI/Inputs/SelectProps.js +1 -46
- package/dist/components/MaterialUI/Inputs/StandaloneRadio.js +0 -34
- package/dist/components/MaterialUI/Inputs/Switch.js +1 -37
- package/dist/components/MaterialUI/Inputs/SwitchProps.js +1 -40
- package/dist/components/MaterialUI/Inputs/TimePicker.js +12 -89
- package/dist/components/MaterialUI/Inputs/createInput.js +3 -30
- package/dist/components/MaterialUI/Inputs/index.js +0 -35
- package/dist/components/MaterialUI/Inputs/standaloneRadioProps.js +1 -41
- package/dist/components/MaterialUI/Navigation/DropDownMenu.js +10 -54
- package/dist/components/MaterialUI/Navigation/DropDownMenuProps.js +1 -33
- package/dist/components/MaterialUI/Navigation/ExternalLink.js +2 -27
- package/dist/components/MaterialUI/Navigation/PredefinedElements/ActionMenu.js +4 -31
- package/dist/components/MaterialUI/Navigation/TabBar.js +21 -102
- package/dist/components/MaterialUI/Navigation/TabLabel.js +5 -39
- package/dist/components/MaterialUI/ScopeSelector/ScopeSelector.js +7 -42
- package/dist/components/MaterialUI/ScopeSelector/ScopeTreeView.js +20 -60
- package/dist/components/MaterialUI/ScopeSelector/TreeItem.js +13 -67
- package/dist/components/MaterialUI/Surfaces/ExpansionPanel.js +13 -53
- package/dist/components/MaterialUI/Surfaces/Paper.js +1 -31
- package/dist/components/MaterialUI/Surfaces/PredefinedElements/TitledPaper.js +3 -28
- package/dist/components/MaterialUI/Surfaces/SectionExpansionPanel.js +17 -60
- package/dist/components/MaterialUI/Surfaces/expansionPanelProps.js +1 -55
- package/dist/components/MaterialUI/Surfaces/paperProps.js +1 -36
- package/dist/components/MaterialUI/componentProps.js +0 -28
- package/dist/components/MaterialUI/hocs/withDeferredPopper.js +9 -58
- package/dist/components/MaterialUI/hocs/withDeferredTooltip.js +7 -43
- package/dist/components/MaterialUI/muiThemes.js +2 -56
- package/dist/components/MaterialUI/textProps.js +1 -33
- package/dist/components/Modal/Background.js +0 -19
- package/dist/components/Modal/Dialog.js +2 -26
- package/dist/components/Modal/Wrapper.js +0 -26
- package/dist/components/Modal/index.js +6 -42
- package/dist/components/Modules.js +18 -90
- package/dist/components/MultiSelector.js +20 -73
- package/dist/components/Navigation/Bar.js +24 -87
- package/dist/components/Navigation/Tab.js +20 -72
- package/dist/components/Navigation/index.js +2 -21
- package/dist/components/Navigation/useNavigationState.js +85 -172
- package/dist/components/Placeholder.js +6 -44
- package/dist/components/Provision.js +4 -36
- package/dist/components/Routing/FullPage.js +14 -37
- package/dist/components/Routing/Page.js +13 -50
- package/dist/components/Routing/Segment.js +5 -30
- package/dist/components/Routing/SegmentPage.js +25 -105
- package/dist/components/Routing/SubPage.js +7 -55
- package/dist/components/Routing/withWaypointing.js +3 -36
- package/dist/components/Scope/ScopeModificationConfirmationDialog.js +3 -30
- package/dist/components/Scope/ScopeNode.js +6 -47
- package/dist/components/Scope/Selector.js +8 -44
- package/dist/components/Scope/index.js +24 -93
- package/dist/components/Scope/useScopeConfirmationModalState.js +11 -74
- package/dist/components/Scope/useScopeData.js +0 -25
- package/dist/components/Scope/useScopeSelect.js +0 -26
- package/dist/components/Selector.js +14 -75
- package/dist/components/Sidepanel.js +0 -28
- package/dist/components/Spritesheet.js +0 -26
- package/dist/components/Switch.js +12 -52
- package/dist/components/Text.js +4 -48
- package/dist/components/ToastList.js +5 -45
- package/dist/components/Toolbar.js +17 -75
- package/dist/components/Tooltip.js +0 -24
- package/dist/components/Treeview/Branch.js +0 -25
- package/dist/components/Treeview/Label.js +0 -29
- package/dist/components/Treeview/Leaf.js +0 -21
- package/dist/components/Treeview/Node.js +15 -55
- package/dist/components/Treeview/index.js +20 -63
- package/dist/components/Treeview/settings.js +0 -17
- package/dist/constants.js +2 -17
- package/dist/getTheme.js +0 -29
- package/dist/getThemeOverrides.js +0 -21
- package/dist/hocs/routingConnector.js +0 -21
- package/dist/hocs/withAuthentication.js +4 -26
- package/dist/hocs/withClickOutside.js +3 -29
- package/dist/hocs/withErrorBoundary.js +4 -39
- package/dist/hocs/withId.js +2 -31
- package/dist/hocs/withInfiniteScroll.js +15 -32
- package/dist/hocs/withInitialLoad.js +0 -20
- package/dist/hocs/withLocaleSwitch.js +0 -19
- package/dist/hocs/withNavigationLink.js +3 -30
- package/dist/hocs/withRequestActivity.js +0 -21
- package/dist/hocs/withScopeData.js +4 -31
- package/dist/hocs/withScrollBox.js +3 -32
- package/dist/hocs/withToggle.js +4 -34
- package/dist/hocs/withUpdateHandler.js +0 -22
- package/dist/hocs/withViewState.js +3 -30
- package/dist/hooks/useDispatchWithModulesData.js +0 -26
- package/dist/hooks/useEditState.js +3 -102
- package/dist/hooks/useEntityLoader.js +13 -64
- package/dist/hooks/useFullEntityEditState.js +4 -53
- package/dist/hooks/useInfiniteScroll.js +3 -31
- package/dist/hooks/useLabelMessage.js +0 -41
- package/dist/hooks/useLoader.js +0 -27
- package/dist/hooks/useMultipleFieldEditState.js +0 -39
- package/dist/hooks/useNavigationHandler.js +3 -28
- package/dist/hooks/useNotificationRequestState.js +14 -46
- package/dist/hooks/usePreviousModified.js +0 -24
- package/dist/hooks/useRequestState.js +8 -38
- package/dist/hooks/useSelectorAndUnwrap.js +0 -23
- package/dist/hooks/useToggle.js +3 -33
- package/dist/hooks/useViewState.js +0 -23
- package/dist/index.js +1 -2
- package/dist/reducers/applications.js +0 -23
- package/dist/reducers/authentication.js +4 -35
- package/dist/reducers/countries.js +0 -25
- package/dist/reducers/localeFactory.js +0 -30
- package/dist/reducers/metadata.js +2 -62
- package/dist/reducers/modules.js +0 -36
- package/dist/reducers/navigation.js +8 -47
- package/dist/reducers/request.js +0 -28
- package/dist/reducers/requestStates.js +0 -42
- package/dist/reducers/scopes.js +0 -28
- package/dist/reducers/settings.js +4 -39
- package/dist/reducers/timezones.js +0 -25
- package/dist/reducers/toasts.js +0 -27
- package/dist/reducers/versionInfo.js +0 -24
- package/dist/reducers/view.js +36 -84
- package/dist/schemas/countries.js +0 -17
- package/dist/schemas/definitions.js +0 -17
- package/dist/schemas/metadata.js +0 -17
- package/dist/schemas/productDefinitions.js +0 -17
- package/dist/schemas/scopes.js +0 -17
- package/dist/schemas/timezones.js +0 -17
- package/dist/selectors/applications.js +0 -20
- package/dist/selectors/authentication.js +0 -40
- package/dist/selectors/countries.js +0 -22
- package/dist/selectors/locale.js +1 -29
- package/dist/selectors/metadata.js +1 -44
- package/dist/selectors/modules.js +0 -21
- package/dist/selectors/navigation.js +9 -39
- package/dist/selectors/requestStates.js +0 -22
- package/dist/selectors/requests.js +2 -22
- package/dist/selectors/route.js +0 -21
- package/dist/selectors/scope.js +0 -32
- package/dist/selectors/settings.js +0 -18
- package/dist/selectors/timezones.js +0 -19
- package/dist/selectors/versionInfo.js +0 -18
- package/dist/selectors/view.js +3 -74
- package/dist/sharedMessages.js +0 -17
- package/dist/spawnerMiddleware.js +0 -24
- package/dist/utils/buildUrl.js +5 -36
- package/dist/utils/countryHelper.js +0 -18
- package/dist/utils/curry.js +0 -19
- package/dist/utils/debounce.js +1 -20
- package/dist/utils/displayModeHelper.js +0 -24
- package/dist/utils/domHelper.js +0 -17
- package/dist/utils/flatten.js +2 -35
- package/dist/utils/index.js +0 -31
- package/dist/utils/insertIcons.js +0 -21
- package/dist/utils/localizationHelper.js +0 -26
- package/dist/utils/logPass.js +1 -22
- package/dist/utils/mapHelper.js +1 -25
- package/dist/utils/memoize.js +0 -23
- package/dist/utils/modelValidationHelper.js +0 -41
- package/dist/utils/normalizeForSearch.js +2 -19
- package/dist/utils/objectHelper.js +0 -22
- package/dist/utils/parseHelper.js +0 -32
- package/dist/utils/profilerHelper.js +0 -18
- package/dist/utils/propertyHelper.js +1 -38
- package/dist/utils/propertyValidator.js +0 -25
- package/dist/utils/requestProcessingHelper.js +0 -24
- package/dist/utils/safeGet.js +0 -18
- package/dist/utils/setTranslation.js +0 -27
- package/dist/utils/setTranslationWithFallback.js +0 -32
- package/dist/utils/stripKey.js +1 -23
- package/dist/utils/styledPropFuncs.js +3 -29
- package/dist/utils/testUtils.js +19 -86
- package/dist/utils/timezoneHelper.js +0 -31
- package/dist/utils/unwrapImmutable.js +0 -19
- package/dist/utils/urlHelper.js +2 -27
- package/dist/whyDidYouRerender.js +0 -5
- package/package.json +1 -1
- package/src/utils/testUtils.js +10 -1
|
@@ -2,59 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.useStyles = exports.getSearchOptionValue = exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
-
|
|
8
6
|
var _styles = require("@material-ui/core/styles");
|
|
9
|
-
|
|
10
7
|
var _SelectProps = _interopRequireDefault(require("../SelectProps"));
|
|
11
|
-
|
|
12
8
|
var _Icon = _interopRequireDefault(require("../../DataDisplay/Icon"));
|
|
13
|
-
|
|
14
9
|
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
15
|
-
|
|
16
10
|
var _InputAdornment = _interopRequireDefault(require("@material-ui/core/InputAdornment"));
|
|
17
|
-
|
|
18
11
|
var _Select = _interopRequireDefault(require("../Select"));
|
|
19
|
-
|
|
20
12
|
var _Input = _interopRequireDefault(require("@material-ui/core/Input"));
|
|
21
|
-
|
|
22
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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
|
-
|
|
28
16
|
(function () {
|
|
29
17
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
30
18
|
enterModule && enterModule(module);
|
|
31
19
|
})();
|
|
32
|
-
|
|
33
20
|
(function () {
|
|
34
21
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
35
22
|
enterModule && enterModule(module);
|
|
36
23
|
})();
|
|
37
|
-
|
|
38
24
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
39
|
-
|
|
40
25
|
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."); }
|
|
41
|
-
|
|
42
26
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
43
|
-
|
|
44
27
|
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; }
|
|
45
|
-
|
|
46
28
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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; }
|
|
47
|
-
|
|
48
29
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
|
-
|
|
50
30
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
51
31
|
return a;
|
|
52
32
|
};
|
|
53
|
-
|
|
54
33
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
55
34
|
return a;
|
|
56
35
|
};
|
|
57
|
-
|
|
58
36
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
59
37
|
return {
|
|
60
38
|
container: {
|
|
@@ -182,53 +160,42 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
182
160
|
};
|
|
183
161
|
});
|
|
184
162
|
exports.useStyles = useStyles;
|
|
185
|
-
|
|
186
163
|
var getSearchOptionValue = function getSearchOptionValue(searchOptions, searchOption) {
|
|
187
164
|
if ((searchOptions == null ? void 0 : searchOptions.length) > 0) {
|
|
188
165
|
var option = searchOptions.find(function (o) {
|
|
189
166
|
return o.value === searchOption;
|
|
190
167
|
});
|
|
191
|
-
|
|
192
168
|
if (option) {
|
|
193
169
|
return option.value;
|
|
194
170
|
}
|
|
195
|
-
|
|
196
171
|
return searchOptions[0].value;
|
|
197
172
|
}
|
|
198
|
-
|
|
199
173
|
return null;
|
|
200
174
|
};
|
|
201
|
-
|
|
202
175
|
exports.getSearchOptionValue = getSearchOptionValue;
|
|
203
|
-
|
|
204
176
|
var SearchControl = function SearchControl(_ref) {
|
|
205
177
|
var _searchOptions;
|
|
206
|
-
|
|
207
178
|
var placeholder = _ref.placeholder,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
179
|
+
_ref$defaultValue = _ref.defaultValue,
|
|
180
|
+
defaultValue = _ref$defaultValue === void 0 ? "" : _ref$defaultValue,
|
|
181
|
+
searchOptions = _ref.searchOptions,
|
|
182
|
+
searchOption = _ref.searchOption,
|
|
183
|
+
_ref$onSearch = _ref.onSearch,
|
|
184
|
+
onSearch = _ref$onSearch === void 0 ? function () {} : _ref$onSearch,
|
|
185
|
+
disabled = _ref.disabled;
|
|
215
186
|
searchOptions = !((_searchOptions = searchOptions) != null && _searchOptions.length) ? null : searchOptions;
|
|
216
187
|
searchOption = getSearchOptionValue(searchOptions, searchOption);
|
|
217
|
-
|
|
218
188
|
var _useState = (0, _react.useState)(false),
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
189
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
190
|
+
inputFocused = _useState2[0],
|
|
191
|
+
setInputFocused = _useState2[1];
|
|
223
192
|
var classes = useStyles({
|
|
224
193
|
focused: inputFocused
|
|
225
194
|
});
|
|
226
195
|
var inputRef = (0, _react.useRef)();
|
|
227
|
-
|
|
228
196
|
var update = function update(value) {
|
|
229
197
|
onSearch(value, defaultValue);
|
|
230
198
|
};
|
|
231
|
-
|
|
232
199
|
var selectProps = new _SelectProps.default();
|
|
233
200
|
selectProps.set(_SelectProps.default.propNames.update, update);
|
|
234
201
|
selectProps.set(_SelectProps.default.propNames.value, searchOption);
|
|
@@ -244,7 +211,6 @@ var SearchControl = function SearchControl(_ref) {
|
|
|
244
211
|
});
|
|
245
212
|
selectProps.setStyle(_SelectProps.default.ruleNames.root, classes.selectRoot);
|
|
246
213
|
selectProps.setStyle(_SelectProps.default.ruleNames.paper, classes.selectPaper);
|
|
247
|
-
|
|
248
214
|
var handleKeyDown = function handleKeyDown(e) {
|
|
249
215
|
if (e.key === "Enter") {
|
|
250
216
|
onSearch(searchOption, e.target.value);
|
|
@@ -252,13 +218,11 @@ var SearchControl = function SearchControl(_ref) {
|
|
|
252
218
|
e.stopPropagation();
|
|
253
219
|
}
|
|
254
220
|
};
|
|
255
|
-
|
|
256
221
|
var onFocusedEvent = function onFocusedEvent(event, focused) {
|
|
257
222
|
setInputFocused(focused);
|
|
258
223
|
event.preventDefault();
|
|
259
224
|
event.stopPropagation();
|
|
260
225
|
};
|
|
261
|
-
|
|
262
226
|
var SelectSection = function SelectSection() {
|
|
263
227
|
if (searchOptions === null) return null;else return /*#__PURE__*/_react.default.createElement(_Select.default, {
|
|
264
228
|
className: classes.selectInput,
|
|
@@ -266,7 +230,6 @@ var SearchControl = function SearchControl(_ref) {
|
|
|
266
230
|
selectProps: selectProps
|
|
267
231
|
});
|
|
268
232
|
};
|
|
269
|
-
|
|
270
233
|
var inputSection = /*#__PURE__*/_react.default.createElement("div", {
|
|
271
234
|
"data-qa": "searchInput",
|
|
272
235
|
"data-qa-is-focused": inputFocused,
|
|
@@ -307,7 +270,6 @@ var SearchControl = function SearchControl(_ref) {
|
|
|
307
270
|
id: "close2"
|
|
308
271
|
})))
|
|
309
272
|
})));
|
|
310
|
-
|
|
311
273
|
var searchSection = /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
312
274
|
"data-qa": "searchButton",
|
|
313
275
|
variant: "contained",
|
|
@@ -321,63 +283,48 @@ var SearchControl = function SearchControl(_ref) {
|
|
|
321
283
|
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
322
284
|
id: "search"
|
|
323
285
|
}));
|
|
324
|
-
|
|
325
286
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
326
287
|
className: classes.container
|
|
327
288
|
}, /*#__PURE__*/_react.default.createElement(SelectSection, null), inputSection, searchSection);
|
|
328
289
|
};
|
|
329
|
-
|
|
330
290
|
__signature__(SearchControl, "useState{[inputFocused, setInputFocused](false)}\nuseStyles{classes}\nuseRef{inputRef}", function () {
|
|
331
291
|
return [useStyles];
|
|
332
292
|
});
|
|
333
|
-
|
|
334
293
|
__signature__(SearchControl, "useState{[inputFocused, setInputFocused](false)}\nuseStyles{classes}\nuseRef{inputRef}", function () {
|
|
335
294
|
return [useStyles];
|
|
336
295
|
});
|
|
337
|
-
|
|
338
296
|
var _default = SearchControl;
|
|
339
297
|
var _default2 = _default;
|
|
340
298
|
var _default3 = _default2;
|
|
341
299
|
exports.default = _default3;
|
|
342
300
|
;
|
|
343
|
-
|
|
344
301
|
(function () {
|
|
345
302
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
346
|
-
|
|
347
303
|
if (!reactHotLoader) {
|
|
348
304
|
return;
|
|
349
305
|
}
|
|
350
|
-
|
|
351
306
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js");
|
|
352
307
|
reactHotLoader.register(getSearchOptionValue, "getSearchOptionValue", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js");
|
|
353
308
|
reactHotLoader.register(SearchControl, "SearchControl", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js");
|
|
354
309
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js");
|
|
355
310
|
})();
|
|
356
|
-
|
|
357
311
|
;
|
|
358
|
-
|
|
359
312
|
(function () {
|
|
360
313
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
361
314
|
leaveModule && leaveModule(module);
|
|
362
315
|
})();
|
|
363
|
-
|
|
364
316
|
;
|
|
365
|
-
|
|
366
317
|
(function () {
|
|
367
318
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
368
|
-
|
|
369
319
|
if (!reactHotLoader) {
|
|
370
320
|
return;
|
|
371
321
|
}
|
|
372
|
-
|
|
373
322
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js");
|
|
374
323
|
reactHotLoader.register(getSearchOptionValue, "getSearchOptionValue", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js");
|
|
375
324
|
reactHotLoader.register(SearchControl, "SearchControl", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js");
|
|
376
325
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js");
|
|
377
326
|
})();
|
|
378
|
-
|
|
379
327
|
;
|
|
380
|
-
|
|
381
328
|
(function () {
|
|
382
329
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
383
330
|
leaveModule && leaveModule(module);
|
|
@@ -2,37 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _Select = _interopRequireDefault(require("./../Select"));
|
|
9
|
-
|
|
10
7
|
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
|
|
11
|
-
|
|
12
8
|
var _styles = require("@material-ui/core/styles");
|
|
13
|
-
|
|
14
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
11
|
(function () {
|
|
19
12
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
20
13
|
enterModule && enterModule(module);
|
|
21
14
|
})();
|
|
22
|
-
|
|
23
15
|
(function () {
|
|
24
16
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
25
17
|
enterModule && enterModule(module);
|
|
26
18
|
})();
|
|
27
|
-
|
|
28
19
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
29
20
|
return a;
|
|
30
21
|
};
|
|
31
|
-
|
|
32
22
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
33
23
|
return a;
|
|
34
24
|
};
|
|
35
|
-
|
|
36
25
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
37
26
|
return {
|
|
38
27
|
container: {
|
|
@@ -46,14 +35,12 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
46
35
|
}
|
|
47
36
|
};
|
|
48
37
|
});
|
|
49
|
-
|
|
50
38
|
var TitledSelect = function TitledSelect(_ref) {
|
|
51
39
|
var options = _ref.options,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
title = _ref.title,
|
|
41
|
+
selectProps = _ref.selectProps,
|
|
42
|
+
textStyle = _ref.textStyle;
|
|
55
43
|
var classes = useStyles();
|
|
56
|
-
|
|
57
44
|
var titledSelect = /*#__PURE__*/_react.default.createElement("div", {
|
|
58
45
|
className: classes.container
|
|
59
46
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
@@ -63,59 +50,44 @@ var TitledSelect = function TitledSelect(_ref) {
|
|
|
63
50
|
options: options,
|
|
64
51
|
selectProps: selectProps
|
|
65
52
|
}));
|
|
66
|
-
|
|
67
53
|
return titledSelect;
|
|
68
54
|
};
|
|
69
|
-
|
|
70
55
|
__signature__(TitledSelect, "useStyles{classes}", function () {
|
|
71
56
|
return [useStyles];
|
|
72
57
|
});
|
|
73
|
-
|
|
74
58
|
__signature__(TitledSelect, "useStyles{classes}", function () {
|
|
75
59
|
return [useStyles];
|
|
76
60
|
});
|
|
77
|
-
|
|
78
61
|
var _default = TitledSelect;
|
|
79
62
|
var _default2 = _default;
|
|
80
63
|
var _default3 = _default2;
|
|
81
64
|
exports.default = _default3;
|
|
82
65
|
;
|
|
83
|
-
|
|
84
66
|
(function () {
|
|
85
67
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
86
|
-
|
|
87
68
|
if (!reactHotLoader) {
|
|
88
69
|
return;
|
|
89
70
|
}
|
|
90
|
-
|
|
91
71
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/TitledSelect.js");
|
|
92
72
|
reactHotLoader.register(TitledSelect, "TitledSelect", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/TitledSelect.js");
|
|
93
73
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/TitledSelect.js");
|
|
94
74
|
})();
|
|
95
|
-
|
|
96
75
|
;
|
|
97
|
-
|
|
98
76
|
(function () {
|
|
99
77
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
100
78
|
leaveModule && leaveModule(module);
|
|
101
79
|
})();
|
|
102
|
-
|
|
103
80
|
;
|
|
104
|
-
|
|
105
81
|
(function () {
|
|
106
82
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
107
|
-
|
|
108
83
|
if (!reactHotLoader) {
|
|
109
84
|
return;
|
|
110
85
|
}
|
|
111
|
-
|
|
112
86
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/TitledSelect.js");
|
|
113
87
|
reactHotLoader.register(TitledSelect, "TitledSelect", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/TitledSelect.js");
|
|
114
88
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/PredefinedElements/TitledSelect.js");
|
|
115
89
|
})();
|
|
116
|
-
|
|
117
90
|
;
|
|
118
|
-
|
|
119
91
|
(function () {
|
|
120
92
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
121
93
|
leaveModule && leaveModule(module);
|
|
@@ -2,49 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
-
|
|
10
7
|
var _RadioGroup = _interopRequireDefault(require("@material-ui/core/RadioGroup"));
|
|
11
|
-
|
|
12
8
|
var _Radio = _interopRequireDefault(require("@material-ui/core/Radio"));
|
|
13
|
-
|
|
14
9
|
var _FormControlLabel = _interopRequireDefault(require("@material-ui/core/FormControlLabel"));
|
|
15
|
-
|
|
16
10
|
var _FormControl = _interopRequireDefault(require("@material-ui/core/FormControl"));
|
|
17
|
-
|
|
18
11
|
var _FormLabel = _interopRequireDefault(require("@material-ui/core/FormLabel"));
|
|
19
|
-
|
|
20
12
|
var _styles = require("@material-ui/core/styles");
|
|
21
|
-
|
|
22
13
|
var _RadioProps = _interopRequireWildcard(require("./RadioProps.js"));
|
|
23
|
-
|
|
24
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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
|
-
|
|
28
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
-
|
|
30
17
|
(function () {
|
|
31
18
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
32
19
|
enterModule && enterModule(module);
|
|
33
20
|
})();
|
|
34
|
-
|
|
35
21
|
(function () {
|
|
36
22
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
37
23
|
enterModule && enterModule(module);
|
|
38
24
|
})();
|
|
39
|
-
|
|
40
25
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
41
26
|
return a;
|
|
42
27
|
};
|
|
43
|
-
|
|
44
28
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
45
29
|
return a;
|
|
46
30
|
};
|
|
47
|
-
|
|
48
31
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
49
32
|
return {
|
|
50
33
|
/* Radio Button */
|
|
@@ -89,14 +72,11 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
89
72
|
}
|
|
90
73
|
};
|
|
91
74
|
});
|
|
92
|
-
|
|
93
75
|
var extractAndValidateProps = function extractAndValidateProps(radioProps) {
|
|
94
76
|
var _radioProps$get, _radioProps$get2, _radioProps$get3, _radioProps$get4;
|
|
95
|
-
|
|
96
77
|
if ((0, _RadioProps.isRadioProps)(radioProps) === false) {
|
|
97
78
|
throw new TypeError("radioProps property is not of type RadioProps");
|
|
98
79
|
}
|
|
99
|
-
|
|
100
80
|
var name = radioProps.get(_RadioProps.default.propNames.name);
|
|
101
81
|
var label = radioProps.get(_RadioProps.default.propNames.label);
|
|
102
82
|
var defaultVal = radioProps.get(_RadioProps.default.propNames.defaultVal);
|
|
@@ -106,31 +86,25 @@ var extractAndValidateProps = function extractAndValidateProps(radioProps) {
|
|
|
106
86
|
var radios = radioProps.get(_RadioProps.default.propNames.radios);
|
|
107
87
|
var disabled = (_radioProps$get3 = radioProps.get(_RadioProps.default.propNames.disabled)) != null ? _radioProps$get3 : false;
|
|
108
88
|
var allowSingleRadio = (_radioProps$get4 = radioProps.get(_RadioProps.default.propNames.allowSingleRadio)) != null ? _radioProps$get4 : false;
|
|
109
|
-
|
|
110
89
|
if (!radios || radios.length < 2 && !allowSingleRadio) {
|
|
111
90
|
throw new Error("Radio component must have at least two options");
|
|
112
91
|
}
|
|
113
|
-
|
|
114
92
|
if (radios.length < 1) {
|
|
115
93
|
throw new Error("Radio component must have at least one option");
|
|
116
94
|
}
|
|
117
|
-
|
|
118
95
|
if (!name || name.length === 0) {
|
|
119
96
|
throw new Error("Radio component name is required and missing");
|
|
120
97
|
}
|
|
121
|
-
|
|
122
98
|
if (value && !radios.some(function (radio) {
|
|
123
99
|
return radio.value === value;
|
|
124
100
|
})) {
|
|
125
101
|
throw new Error("Radio component must have a matching option for it's value");
|
|
126
102
|
}
|
|
127
|
-
|
|
128
103
|
if (defaultVal && !radios.some(function (radio) {
|
|
129
104
|
return radio.value === defaultVal;
|
|
130
105
|
})) {
|
|
131
106
|
throw new Error("Radio component must have a matching option for it's default value");
|
|
132
107
|
}
|
|
133
|
-
|
|
134
108
|
if (radios.some(function (radio) {
|
|
135
109
|
return radios.some(function (x) {
|
|
136
110
|
return x !== radio && x.value === radio.value;
|
|
@@ -138,7 +112,6 @@ var extractAndValidateProps = function extractAndValidateProps(radioProps) {
|
|
|
138
112
|
})) {
|
|
139
113
|
throw new Error("Radio component must not have duplicated radio values");
|
|
140
114
|
}
|
|
141
|
-
|
|
142
115
|
return {
|
|
143
116
|
name: name,
|
|
144
117
|
label: label,
|
|
@@ -150,27 +123,23 @@ var extractAndValidateProps = function extractAndValidateProps(radioProps) {
|
|
|
150
123
|
disabled: disabled
|
|
151
124
|
};
|
|
152
125
|
};
|
|
153
|
-
|
|
154
126
|
var Radio = function Radio(_ref) {
|
|
155
127
|
var radioProps = _ref.radioProps;
|
|
156
128
|
var classes = useStyles();
|
|
157
|
-
|
|
158
129
|
var _extractAndValidatePr = extractAndValidateProps(radioProps),
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
130
|
+
name = _extractAndValidatePr.name,
|
|
131
|
+
label = _extractAndValidatePr.label,
|
|
132
|
+
defaultVal = _extractAndValidatePr.defaultVal,
|
|
133
|
+
value = _extractAndValidatePr.value,
|
|
134
|
+
update = _extractAndValidatePr.update,
|
|
135
|
+
row = _extractAndValidatePr.row,
|
|
136
|
+
radios = _extractAndValidatePr.radios,
|
|
137
|
+
disabled = _extractAndValidatePr.disabled;
|
|
168
138
|
var handleChange = update ? function (event) {
|
|
169
139
|
return update(event.target.value);
|
|
170
140
|
} : null;
|
|
171
141
|
var error = radioProps == null ? void 0 : radioProps.get(_RadioProps.default.propNames.error);
|
|
172
142
|
var hasError = error !== false && !!error;
|
|
173
|
-
|
|
174
143
|
var radio = /*#__PURE__*/_react.default.createElement(_FormControl.default, {
|
|
175
144
|
component: "fieldset",
|
|
176
145
|
className: classes.radioFormControl,
|
|
@@ -205,65 +174,50 @@ var Radio = function Radio(_ref) {
|
|
|
205
174
|
})
|
|
206
175
|
});
|
|
207
176
|
})));
|
|
208
|
-
|
|
209
177
|
return hasError && /*#__PURE__*/_react.default.createElement("div", {
|
|
210
178
|
className: classes.container
|
|
211
179
|
}, radio, /*#__PURE__*/_react.default.createElement("div", {
|
|
212
180
|
className: (0, _classnames.default)(classes.errorText)
|
|
213
181
|
}, error)) || radio;
|
|
214
182
|
};
|
|
215
|
-
|
|
216
183
|
__signature__(Radio, "useStyles{classes}", function () {
|
|
217
184
|
return [useStyles];
|
|
218
185
|
});
|
|
219
|
-
|
|
220
186
|
__signature__(Radio, "useStyles{classes}", function () {
|
|
221
187
|
return [useStyles];
|
|
222
188
|
});
|
|
223
|
-
|
|
224
189
|
var _default = Radio;
|
|
225
190
|
var _default2 = _default;
|
|
226
191
|
var _default3 = _default2;
|
|
227
192
|
exports.default = _default3;
|
|
228
193
|
;
|
|
229
|
-
|
|
230
194
|
(function () {
|
|
231
195
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
232
|
-
|
|
233
196
|
if (!reactHotLoader) {
|
|
234
197
|
return;
|
|
235
198
|
}
|
|
236
|
-
|
|
237
199
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Radio.js");
|
|
238
200
|
reactHotLoader.register(extractAndValidateProps, "extractAndValidateProps", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Radio.js");
|
|
239
201
|
reactHotLoader.register(Radio, "Radio", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Radio.js");
|
|
240
202
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Radio.js");
|
|
241
203
|
})();
|
|
242
|
-
|
|
243
204
|
;
|
|
244
|
-
|
|
245
205
|
(function () {
|
|
246
206
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
247
207
|
leaveModule && leaveModule(module);
|
|
248
208
|
})();
|
|
249
|
-
|
|
250
209
|
;
|
|
251
|
-
|
|
252
210
|
(function () {
|
|
253
211
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
254
|
-
|
|
255
212
|
if (!reactHotLoader) {
|
|
256
213
|
return;
|
|
257
214
|
}
|
|
258
|
-
|
|
259
215
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Radio.js");
|
|
260
216
|
reactHotLoader.register(extractAndValidateProps, "extractAndValidateProps", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Radio.js");
|
|
261
217
|
reactHotLoader.register(Radio, "Radio", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Radio.js");
|
|
262
218
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Radio.js");
|
|
263
219
|
})();
|
|
264
|
-
|
|
265
220
|
;
|
|
266
|
-
|
|
267
221
|
(function () {
|
|
268
222
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
269
223
|
leaveModule && leaveModule(module);
|
|
@@ -2,78 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.isRadioProps = exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
var _componentProps = _interopRequireDefault(require("../componentProps"));
|
|
7
|
-
|
|
8
6
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
|
|
10
7
|
(function () {
|
|
11
8
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
12
9
|
enterModule && enterModule(module);
|
|
13
10
|
})();
|
|
14
|
-
|
|
15
11
|
(function () {
|
|
16
12
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
17
13
|
enterModule && enterModule(module);
|
|
18
14
|
})();
|
|
19
|
-
|
|
20
15
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
21
|
-
|
|
22
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
|
-
|
|
16
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
24
17
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
-
|
|
26
18
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27
19
|
return a;
|
|
28
20
|
};
|
|
29
|
-
|
|
30
21
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
31
22
|
return a;
|
|
32
23
|
};
|
|
33
|
-
|
|
34
24
|
var RadioProps = /*#__PURE__*/function (_ComponentProps) {
|
|
35
25
|
_inheritsLoose(RadioProps, _ComponentProps);
|
|
36
|
-
|
|
37
26
|
function RadioProps() {
|
|
38
27
|
var _this;
|
|
39
|
-
|
|
40
28
|
_this = _ComponentProps.call(this) || this;
|
|
41
|
-
|
|
42
29
|
_this.componentProps.set(_this.constructor.propNames.update, null);
|
|
43
|
-
|
|
44
30
|
_this.componentProps.set(_this.constructor.propNames.value, null);
|
|
45
|
-
|
|
46
31
|
_this.componentProps.set(_this.constructor.propNames.defaultVal, null);
|
|
47
|
-
|
|
48
32
|
_this.componentProps.set(_this.constructor.propNames.label, null);
|
|
49
|
-
|
|
50
33
|
_this.componentProps.set(_this.constructor.propNames.row, null);
|
|
51
|
-
|
|
52
34
|
_this.componentProps.set(_this.constructor.propNames.name, null);
|
|
53
|
-
|
|
54
35
|
_this.componentProps.set(_this.constructor.propNames.radios, null);
|
|
55
|
-
|
|
56
36
|
_this.componentProps.set(_this.constructor.propNames.disabled, null);
|
|
57
|
-
|
|
58
37
|
_this.componentProps.set(_this.constructor.propNames.error, null);
|
|
59
|
-
|
|
60
38
|
_this.componentProps.set(_this.constructor.propNames.allowSingleRadio, null);
|
|
61
|
-
|
|
62
39
|
_this._isRadioProps = true;
|
|
63
40
|
return _this;
|
|
64
41
|
}
|
|
65
|
-
|
|
66
42
|
var _proto = RadioProps.prototype;
|
|
67
|
-
|
|
68
43
|
// @ts-ignore
|
|
69
44
|
_proto.__reactstandin__regenerateByEval = function __reactstandin__regenerateByEval(key, code) {
|
|
70
45
|
// @ts-ignore
|
|
71
46
|
this[key] = eval(code);
|
|
72
47
|
};
|
|
73
|
-
|
|
74
48
|
return RadioProps;
|
|
75
49
|
}(_componentProps.default);
|
|
76
|
-
|
|
77
50
|
_defineProperty(RadioProps, "propNames", {
|
|
78
51
|
update: "update",
|
|
79
52
|
value: "value",
|
|
@@ -86,54 +59,41 @@ _defineProperty(RadioProps, "propNames", {
|
|
|
86
59
|
error: "error",
|
|
87
60
|
allowSingleRadio: "allowSingleRadio"
|
|
88
61
|
});
|
|
89
|
-
|
|
90
62
|
var isRadioProps = function isRadioProps(value) {
|
|
91
63
|
if (value == null) return false;
|
|
92
64
|
return typeof value === "object" && (value instanceof RadioProps || value._isRadioProps === true);
|
|
93
65
|
};
|
|
94
|
-
|
|
95
66
|
exports.isRadioProps = isRadioProps;
|
|
96
67
|
var _default = RadioProps;
|
|
97
68
|
var _default2 = _default;
|
|
98
69
|
var _default3 = _default2;
|
|
99
70
|
exports.default = _default3;
|
|
100
71
|
;
|
|
101
|
-
|
|
102
72
|
(function () {
|
|
103
73
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
104
|
-
|
|
105
74
|
if (!reactHotLoader) {
|
|
106
75
|
return;
|
|
107
76
|
}
|
|
108
|
-
|
|
109
77
|
reactHotLoader.register(RadioProps, "RadioProps", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/RadioProps.js");
|
|
110
78
|
reactHotLoader.register(isRadioProps, "isRadioProps", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/RadioProps.js");
|
|
111
79
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/RadioProps.js");
|
|
112
80
|
})();
|
|
113
|
-
|
|
114
81
|
;
|
|
115
|
-
|
|
116
82
|
(function () {
|
|
117
83
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
118
84
|
leaveModule && leaveModule(module);
|
|
119
85
|
})();
|
|
120
|
-
|
|
121
86
|
;
|
|
122
|
-
|
|
123
87
|
(function () {
|
|
124
88
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
125
|
-
|
|
126
89
|
if (!reactHotLoader) {
|
|
127
90
|
return;
|
|
128
91
|
}
|
|
129
|
-
|
|
130
92
|
reactHotLoader.register(RadioProps, "RadioProps", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/RadioProps.js");
|
|
131
93
|
reactHotLoader.register(isRadioProps, "isRadioProps", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/RadioProps.js");
|
|
132
94
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/RadioProps.js");
|
|
133
95
|
})();
|
|
134
|
-
|
|
135
96
|
;
|
|
136
|
-
|
|
137
97
|
(function () {
|
|
138
98
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
139
99
|
leaveModule && leaveModule(module);
|