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,47 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.useStyles = exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _Switch = _interopRequireDefault(require("@material-ui/core/Switch"));
|
|
9
|
-
|
|
10
7
|
var _styles = require("@material-ui/core/styles");
|
|
11
|
-
|
|
12
8
|
var _SwitchProps = _interopRequireWildcard(require("./SwitchProps"));
|
|
13
|
-
|
|
14
9
|
var _reactIntl = require("react-intl");
|
|
15
|
-
|
|
16
10
|
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); }
|
|
17
|
-
|
|
18
11
|
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; }
|
|
19
|
-
|
|
20
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
13
|
(function () {
|
|
23
14
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
24
15
|
enterModule && enterModule(module);
|
|
25
16
|
})();
|
|
26
|
-
|
|
27
17
|
(function () {
|
|
28
18
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
29
19
|
enterModule && enterModule(module);
|
|
30
20
|
})();
|
|
31
|
-
|
|
32
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
-
|
|
34
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
35
|
-
|
|
36
23
|
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; }
|
|
37
|
-
|
|
38
24
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
39
25
|
return a;
|
|
40
26
|
};
|
|
41
|
-
|
|
42
27
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
43
28
|
return a;
|
|
44
29
|
};
|
|
45
|
-
|
|
46
30
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
47
31
|
return {
|
|
48
32
|
root: {
|
|
@@ -129,17 +113,13 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
129
113
|
};
|
|
130
114
|
});
|
|
131
115
|
exports.useStyles = useStyles;
|
|
132
|
-
|
|
133
116
|
var Switch = function Switch(_ref) {
|
|
134
117
|
var switchProps = _ref.switchProps;
|
|
135
|
-
|
|
136
118
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
137
|
-
|
|
138
|
-
|
|
119
|
+
formatMessage = _useIntl.formatMessage;
|
|
139
120
|
if ((0, _SwitchProps.isSwitchProps)(switchProps) === false) {
|
|
140
121
|
throw new TypeError("switchProps property is not of type SwitchProps");
|
|
141
122
|
}
|
|
142
|
-
|
|
143
123
|
var update = switchProps == null ? void 0 : switchProps.get(_SwitchProps.default.propNames.update);
|
|
144
124
|
var value = (switchProps == null ? void 0 : switchProps.get(_SwitchProps.default.propNames.value)) || false;
|
|
145
125
|
var onCaption = switchProps == null ? void 0 : switchProps.get(_SwitchProps.default.propNames.onCaption);
|
|
@@ -155,9 +135,7 @@ var Switch = function Switch(_ref) {
|
|
|
155
135
|
formattedOffCaption: formattedOffCaption,
|
|
156
136
|
readOnly: readOnly
|
|
157
137
|
});
|
|
158
|
-
|
|
159
138
|
var switchClasses = _objectSpread(_objectSpread({}, classes), className);
|
|
160
|
-
|
|
161
139
|
return /*#__PURE__*/_react.default.createElement(_Switch.default, {
|
|
162
140
|
disabled: disabled,
|
|
163
141
|
classes: switchClasses,
|
|
@@ -168,56 +146,42 @@ var Switch = function Switch(_ref) {
|
|
|
168
146
|
color: "primary"
|
|
169
147
|
});
|
|
170
148
|
};
|
|
171
|
-
|
|
172
149
|
__signature__(Switch, "useIntl{{ formatMessage }}\nuseStyles{classes}", function () {
|
|
173
150
|
return [_reactIntl.useIntl, useStyles];
|
|
174
151
|
});
|
|
175
|
-
|
|
176
152
|
__signature__(Switch, "useIntl{{ formatMessage }}\nuseStyles{classes}", function () {
|
|
177
153
|
return [_reactIntl.useIntl, useStyles];
|
|
178
154
|
});
|
|
179
|
-
|
|
180
155
|
var _default = Switch;
|
|
181
156
|
var _default2 = _default;
|
|
182
157
|
var _default3 = _default2;
|
|
183
158
|
exports.default = _default3;
|
|
184
159
|
;
|
|
185
|
-
|
|
186
160
|
(function () {
|
|
187
161
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
188
|
-
|
|
189
162
|
if (!reactHotLoader) {
|
|
190
163
|
return;
|
|
191
164
|
}
|
|
192
|
-
|
|
193
165
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Switch.js");
|
|
194
166
|
reactHotLoader.register(Switch, "Switch", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Switch.js");
|
|
195
167
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Switch.js");
|
|
196
168
|
})();
|
|
197
|
-
|
|
198
169
|
;
|
|
199
|
-
|
|
200
170
|
(function () {
|
|
201
171
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
202
172
|
leaveModule && leaveModule(module);
|
|
203
173
|
})();
|
|
204
|
-
|
|
205
174
|
;
|
|
206
|
-
|
|
207
175
|
(function () {
|
|
208
176
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
209
|
-
|
|
210
177
|
if (!reactHotLoader) {
|
|
211
178
|
return;
|
|
212
179
|
}
|
|
213
|
-
|
|
214
180
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Switch.js");
|
|
215
181
|
reactHotLoader.register(Switch, "Switch", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Switch.js");
|
|
216
182
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/Switch.js");
|
|
217
183
|
})();
|
|
218
|
-
|
|
219
184
|
;
|
|
220
|
-
|
|
221
185
|
(function () {
|
|
222
186
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
223
187
|
leaveModule && leaveModule(module);
|
|
@@ -2,76 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.isSwitchProps = 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 SwitchProps = /*#__PURE__*/function (_ComponentProps) {
|
|
35
25
|
_inheritsLoose(SwitchProps, _ComponentProps);
|
|
36
|
-
|
|
37
26
|
function SwitchProps() {
|
|
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.onCaption, null);
|
|
47
|
-
|
|
48
32
|
_this.componentProps.set(_this.constructor.propNames.offCaption, null);
|
|
49
|
-
|
|
50
33
|
_this.componentProps.set(_this.constructor.propNames.disabled, null);
|
|
51
|
-
|
|
52
34
|
_this.componentProps.set(_this.constructor.propNames.readOnly, null);
|
|
53
|
-
|
|
54
35
|
_this.componentProps.set(_this.constructor.propNames.className, null);
|
|
55
|
-
|
|
56
36
|
_this.componentProps.set(_this.constructor.propNames.id, null);
|
|
57
|
-
|
|
58
37
|
_this.componentProps.set(_this.constructor.propNames.metadata, null);
|
|
59
|
-
|
|
60
38
|
_this._isSwitchProps = true;
|
|
61
39
|
return _this;
|
|
62
40
|
}
|
|
63
|
-
|
|
64
41
|
var _proto = SwitchProps.prototype;
|
|
65
|
-
|
|
66
42
|
// @ts-ignore
|
|
67
43
|
_proto.__reactstandin__regenerateByEval = function __reactstandin__regenerateByEval(key, code) {
|
|
68
44
|
// @ts-ignore
|
|
69
45
|
this[key] = eval(code);
|
|
70
46
|
};
|
|
71
|
-
|
|
72
47
|
return SwitchProps;
|
|
73
48
|
}(_componentProps.default);
|
|
74
|
-
|
|
75
49
|
_defineProperty(SwitchProps, "propNames", {
|
|
76
50
|
update: "update",
|
|
77
51
|
value: "value",
|
|
@@ -83,54 +57,41 @@ _defineProperty(SwitchProps, "propNames", {
|
|
|
83
57
|
id: "id",
|
|
84
58
|
metadata: "metadata"
|
|
85
59
|
});
|
|
86
|
-
|
|
87
60
|
var isSwitchProps = function isSwitchProps(value) {
|
|
88
61
|
if (value == null) return true;
|
|
89
62
|
return typeof value === "object" && (value instanceof SwitchProps || value._isSwitchProps === true);
|
|
90
63
|
};
|
|
91
|
-
|
|
92
64
|
exports.isSwitchProps = isSwitchProps;
|
|
93
65
|
var _default = SwitchProps;
|
|
94
66
|
var _default2 = _default;
|
|
95
67
|
var _default3 = _default2;
|
|
96
68
|
exports.default = _default3;
|
|
97
69
|
;
|
|
98
|
-
|
|
99
70
|
(function () {
|
|
100
71
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
101
|
-
|
|
102
72
|
if (!reactHotLoader) {
|
|
103
73
|
return;
|
|
104
74
|
}
|
|
105
|
-
|
|
106
75
|
reactHotLoader.register(SwitchProps, "SwitchProps", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/SwitchProps.js");
|
|
107
76
|
reactHotLoader.register(isSwitchProps, "isSwitchProps", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/SwitchProps.js");
|
|
108
77
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/SwitchProps.js");
|
|
109
78
|
})();
|
|
110
|
-
|
|
111
79
|
;
|
|
112
|
-
|
|
113
80
|
(function () {
|
|
114
81
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
115
82
|
leaveModule && leaveModule(module);
|
|
116
83
|
})();
|
|
117
|
-
|
|
118
84
|
;
|
|
119
|
-
|
|
120
85
|
(function () {
|
|
121
86
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
122
|
-
|
|
123
87
|
if (!reactHotLoader) {
|
|
124
88
|
return;
|
|
125
89
|
}
|
|
126
|
-
|
|
127
90
|
reactHotLoader.register(SwitchProps, "SwitchProps", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/SwitchProps.js");
|
|
128
91
|
reactHotLoader.register(isSwitchProps, "isSwitchProps", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/SwitchProps.js");
|
|
129
92
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/SwitchProps.js");
|
|
130
93
|
})();
|
|
131
|
-
|
|
132
94
|
;
|
|
133
|
-
|
|
134
95
|
(function () {
|
|
135
96
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
136
97
|
leaveModule && leaveModule(module);
|
|
@@ -2,57 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.parseTime = exports.default = exports.MinsSelect = exports.HoursSelect = exports.AMPMSelect = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
-
|
|
8
6
|
var _styles = require("@material-ui/core/styles");
|
|
9
|
-
|
|
10
7
|
var _Select = _interopRequireDefault(require("./Select"));
|
|
11
|
-
|
|
12
8
|
var _SelectProps = _interopRequireDefault(require("./SelectProps"));
|
|
13
|
-
|
|
14
9
|
var _timezoneHelper = require("../../../utils/timezoneHelper");
|
|
15
|
-
|
|
16
10
|
var _metadata = require("../../../selectors/metadata");
|
|
17
|
-
|
|
18
11
|
var _reactRedux = require("react-redux");
|
|
19
|
-
|
|
20
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
13
|
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); }
|
|
23
|
-
|
|
24
14
|
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; }
|
|
25
|
-
|
|
26
15
|
(function () {
|
|
27
16
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
28
17
|
enterModule && enterModule(module);
|
|
29
18
|
})();
|
|
30
|
-
|
|
31
19
|
(function () {
|
|
32
20
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
33
21
|
enterModule && enterModule(module);
|
|
34
22
|
})();
|
|
35
|
-
|
|
36
23
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
-
|
|
38
24
|
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."); }
|
|
39
|
-
|
|
40
25
|
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); }
|
|
41
|
-
|
|
42
26
|
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; }
|
|
43
|
-
|
|
44
27
|
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; }
|
|
45
|
-
|
|
46
28
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
-
|
|
48
29
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
49
30
|
return a;
|
|
50
31
|
};
|
|
51
|
-
|
|
52
32
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
53
33
|
return a;
|
|
54
34
|
};
|
|
55
|
-
|
|
56
35
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
57
36
|
return {
|
|
58
37
|
timeWrapper: {
|
|
@@ -92,23 +71,19 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
92
71
|
};
|
|
93
72
|
});
|
|
94
73
|
var hourOptionsAMPM = [];
|
|
95
|
-
|
|
96
74
|
for (var i = 1; i <= 12; i++) {
|
|
97
75
|
hourOptionsAMPM.push({
|
|
98
76
|
value: i,
|
|
99
77
|
label: i
|
|
100
78
|
});
|
|
101
79
|
}
|
|
102
|
-
|
|
103
80
|
var hourOptions = [];
|
|
104
|
-
|
|
105
81
|
for (var j = 0; j <= 23; j++) {
|
|
106
82
|
hourOptions.push({
|
|
107
83
|
value: j,
|
|
108
84
|
label: j
|
|
109
85
|
});
|
|
110
86
|
}
|
|
111
|
-
|
|
112
87
|
var minOptions = [{
|
|
113
88
|
value: "00",
|
|
114
89
|
label: "00"
|
|
@@ -129,54 +104,41 @@ var ampmOptions = [{
|
|
|
129
104
|
value: "PM",
|
|
130
105
|
label: "PM"
|
|
131
106
|
}];
|
|
132
|
-
|
|
133
107
|
var isBrowserUsingAMPM = function isBrowserUsingAMPM() {
|
|
134
108
|
return !!new Date(Date.UTC(2020, 7, 30, 3, 0, 0)).toLocaleTimeString().match(/am|a.m|pm|p.m/i);
|
|
135
109
|
};
|
|
136
|
-
|
|
137
110
|
var parseTime = function parseTime(timeStr) {
|
|
138
111
|
var time = timeStr.match(/(\d+)(?::(\d\d))?\s*(p?)/i);
|
|
139
|
-
|
|
140
112
|
if (!time) {
|
|
141
113
|
return new Date();
|
|
142
114
|
}
|
|
143
|
-
|
|
144
115
|
var hours = parseInt(time[1]);
|
|
145
|
-
|
|
146
116
|
if (time[3] === "p" && hours < 12) {
|
|
147
117
|
hours += 12;
|
|
148
118
|
}
|
|
149
|
-
|
|
150
119
|
return new Date(0, 0, 0, hours, parseInt(time[2]) || 0, 0);
|
|
151
120
|
};
|
|
152
|
-
|
|
153
121
|
exports.parseTime = parseTime;
|
|
154
|
-
|
|
155
122
|
var leftFillNum = function leftFillNum(num, targetLength) {
|
|
156
123
|
return num.toString().padStart(targetLength, 0);
|
|
157
124
|
};
|
|
158
|
-
|
|
159
125
|
var isAM = function isAM(time) {
|
|
160
126
|
return time.getHours() < 12;
|
|
161
127
|
};
|
|
162
|
-
|
|
163
128
|
var calculateHours = function calculateHours(time, showAMPM) {
|
|
164
129
|
if (!showAMPM) return time.getHours();
|
|
165
130
|
return time.getHours() === 0 || time.getHours() === 12 ? 12 : time.getHours() % 12;
|
|
166
131
|
};
|
|
167
|
-
|
|
168
132
|
var calculateMins = function calculateMins(time) {
|
|
169
133
|
return time.getMinutes() >= 45 ? "45" : time.getMinutes() >= 30 ? "30" : time.getMinutes() >= 15 ? "15" : "00";
|
|
170
134
|
};
|
|
171
|
-
|
|
172
135
|
var calculateAMPM = function calculateAMPM(time) {
|
|
173
136
|
return isAM(time) ? "AM" : "PM";
|
|
174
137
|
};
|
|
175
|
-
|
|
176
138
|
var AMPMSelect = function AMPMSelect(_ref) {
|
|
177
139
|
var showAMPM = _ref.showAMPM,
|
|
178
|
-
|
|
179
|
-
|
|
140
|
+
updateTimeOptions = _ref.updateTimeOptions,
|
|
141
|
+
time = _ref.time;
|
|
180
142
|
var classes = useStyles();
|
|
181
143
|
if (!showAMPM) return null;
|
|
182
144
|
var selectProps = new _SelectProps.default();
|
|
@@ -198,21 +160,17 @@ var AMPMSelect = function AMPMSelect(_ref) {
|
|
|
198
160
|
}, option.label);
|
|
199
161
|
})));
|
|
200
162
|
};
|
|
201
|
-
|
|
202
163
|
exports.AMPMSelect = AMPMSelect;
|
|
203
|
-
|
|
204
164
|
__signature__(AMPMSelect, "useStyles{classes}", function () {
|
|
205
165
|
return [useStyles];
|
|
206
166
|
});
|
|
207
|
-
|
|
208
167
|
__signature__(AMPMSelect, "useStyles{classes}", function () {
|
|
209
168
|
return [useStyles];
|
|
210
169
|
});
|
|
211
|
-
|
|
212
170
|
var HoursSelect = function HoursSelect(_ref2) {
|
|
213
171
|
var updateTimeOptions = _ref2.updateTimeOptions,
|
|
214
|
-
|
|
215
|
-
|
|
172
|
+
time = _ref2.time,
|
|
173
|
+
showAMPM = _ref2.showAMPM;
|
|
216
174
|
var classes = useStyles();
|
|
217
175
|
var selectProps = new _SelectProps.default();
|
|
218
176
|
var properHourOptions = showAMPM ? hourOptionsAMPM : hourOptions;
|
|
@@ -234,20 +192,16 @@ var HoursSelect = function HoursSelect(_ref2) {
|
|
|
234
192
|
}, option.label);
|
|
235
193
|
})));
|
|
236
194
|
};
|
|
237
|
-
|
|
238
195
|
exports.HoursSelect = HoursSelect;
|
|
239
|
-
|
|
240
196
|
__signature__(HoursSelect, "useStyles{classes}", function () {
|
|
241
197
|
return [useStyles];
|
|
242
198
|
});
|
|
243
|
-
|
|
244
199
|
__signature__(HoursSelect, "useStyles{classes}", function () {
|
|
245
200
|
return [useStyles];
|
|
246
201
|
});
|
|
247
|
-
|
|
248
202
|
var MinsSelect = function MinsSelect(_ref3) {
|
|
249
203
|
var updateTimeOptions = _ref3.updateTimeOptions,
|
|
250
|
-
|
|
204
|
+
time = _ref3.time;
|
|
251
205
|
var classes = useStyles();
|
|
252
206
|
var selectProps = new _SelectProps.default();
|
|
253
207
|
selectProps.set(_SelectProps.default.propNames.update, updateTimeOptions("mins"));
|
|
@@ -268,45 +222,35 @@ var MinsSelect = function MinsSelect(_ref3) {
|
|
|
268
222
|
}, option.label);
|
|
269
223
|
})));
|
|
270
224
|
};
|
|
271
|
-
|
|
272
225
|
exports.MinsSelect = MinsSelect;
|
|
273
|
-
|
|
274
226
|
__signature__(MinsSelect, "useStyles{classes}", function () {
|
|
275
227
|
return [useStyles];
|
|
276
228
|
});
|
|
277
|
-
|
|
278
229
|
__signature__(MinsSelect, "useStyles{classes}", function () {
|
|
279
230
|
return [useStyles];
|
|
280
231
|
});
|
|
281
|
-
|
|
282
232
|
var TimePicker = function TimePicker(_ref4) {
|
|
283
233
|
var _showAMPM;
|
|
284
|
-
|
|
285
234
|
var value = _ref4.value,
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
235
|
+
onChange = _ref4.onChange,
|
|
236
|
+
showTimeZone = _ref4.showTimeZone,
|
|
237
|
+
showAMPM = _ref4.showAMPM,
|
|
238
|
+
requestedTimeZone = _ref4.requestedTimeZone;
|
|
290
239
|
var classes = useStyles();
|
|
291
240
|
showAMPM = (_showAMPM = showAMPM) != null ? _showAMPM : isBrowserUsingAMPM();
|
|
292
|
-
|
|
293
241
|
var _useState = (0, _react.useState)(parseTime(value || "00:00")),
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
242
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
243
|
+
time = _useState2[0],
|
|
244
|
+
setTime = _useState2[1];
|
|
298
245
|
var userTimeZone = (0, _timezoneHelper.getTimeZoneName)();
|
|
299
246
|
var localizedTimeZoneName = (0, _reactRedux.useSelector)((0, _metadata.namedLookupLocalizedSelector)("customer", "TimeZone", userTimeZone, null));
|
|
300
|
-
|
|
301
247
|
var onTimeChange = function onTimeChange(datetime) {
|
|
302
248
|
if (onChange) {
|
|
303
249
|
// DatePicker expects 24 hour time format, or else things go wonky!
|
|
304
250
|
var _time = "".concat(leftFillNum(datetime.getHours(), 2), ":").concat(leftFillNum(datetime.getMinutes(), 2));
|
|
305
|
-
|
|
306
251
|
onChange(_time);
|
|
307
252
|
}
|
|
308
253
|
};
|
|
309
|
-
|
|
310
254
|
var setHours = function setHours(hours, isAMTime) {
|
|
311
255
|
if (!showAMPM) {
|
|
312
256
|
time.setHours(hours);
|
|
@@ -316,11 +260,9 @@ var TimePicker = function TimePicker(_ref4) {
|
|
|
316
260
|
time.setHours(parseInt(hours) + parseInt(isAMTime ? 0 : 12));
|
|
317
261
|
}
|
|
318
262
|
};
|
|
319
|
-
|
|
320
263
|
var updateTimeOptions = function updateTimeOptions(id) {
|
|
321
264
|
return function (newValue) {
|
|
322
265
|
var value = newValue;
|
|
323
|
-
|
|
324
266
|
if (id === "hours") {
|
|
325
267
|
setHours(value, isAM(time));
|
|
326
268
|
} else if (id === "ampm") {
|
|
@@ -328,23 +270,18 @@ var TimePicker = function TimePicker(_ref4) {
|
|
|
328
270
|
} else {
|
|
329
271
|
time.setMinutes(parseInt(value));
|
|
330
272
|
}
|
|
331
|
-
|
|
332
273
|
setTime(time);
|
|
333
274
|
onTimeChange(time);
|
|
334
275
|
};
|
|
335
276
|
};
|
|
336
|
-
|
|
337
277
|
var getTimeZone = function getTimeZone(requestedTimeZone) {
|
|
338
278
|
if (requestedTimeZone) return requestedTimeZone;
|
|
339
|
-
|
|
340
279
|
if (!localizedTimeZoneName) {
|
|
341
280
|
var timezone = new Date().toString().match(/GMT(\S+) \(([^)]+)\)/i);
|
|
342
281
|
return "".concat(timezone[2], " (GMT").concat(timezone[1], ")");
|
|
343
282
|
}
|
|
344
|
-
|
|
345
283
|
return localizedTimeZoneName;
|
|
346
284
|
};
|
|
347
|
-
|
|
348
285
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
349
286
|
className: classes.timeWrapper
|
|
350
287
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -364,28 +301,22 @@ var TimePicker = function TimePicker(_ref4) {
|
|
|
364
301
|
className: classes.timeZoneWrapper
|
|
365
302
|
}, showTimeZone && getTimeZone(requestedTimeZone)));
|
|
366
303
|
};
|
|
367
|
-
|
|
368
304
|
__signature__(TimePicker, "useStyles{classes}\nuseState{[time, setTime](parseTime(value || \"00:00\"))}\nuseSelector{localizedTimeZoneName}", function () {
|
|
369
305
|
return [useStyles, _reactRedux.useSelector];
|
|
370
306
|
});
|
|
371
|
-
|
|
372
307
|
__signature__(TimePicker, "useStyles{classes}\nuseState{[time, setTime](parseTime(value || \"00:00\"))}\nuseSelector{localizedTimeZoneName}", function () {
|
|
373
308
|
return [useStyles, _reactRedux.useSelector];
|
|
374
309
|
});
|
|
375
|
-
|
|
376
310
|
var _default = TimePicker;
|
|
377
311
|
var _default2 = _default;
|
|
378
312
|
var _default3 = _default2;
|
|
379
313
|
exports.default = _default3;
|
|
380
314
|
;
|
|
381
|
-
|
|
382
315
|
(function () {
|
|
383
316
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
384
|
-
|
|
385
317
|
if (!reactHotLoader) {
|
|
386
318
|
return;
|
|
387
319
|
}
|
|
388
|
-
|
|
389
320
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
390
321
|
reactHotLoader.register(hourOptionsAMPM, "hourOptionsAMPM", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
391
322
|
reactHotLoader.register(i, "i", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
@@ -406,23 +337,17 @@ exports.default = _default3;
|
|
|
406
337
|
reactHotLoader.register(TimePicker, "TimePicker", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
407
338
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
408
339
|
})();
|
|
409
|
-
|
|
410
340
|
;
|
|
411
|
-
|
|
412
341
|
(function () {
|
|
413
342
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
414
343
|
leaveModule && leaveModule(module);
|
|
415
344
|
})();
|
|
416
|
-
|
|
417
345
|
;
|
|
418
|
-
|
|
419
346
|
(function () {
|
|
420
347
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
421
|
-
|
|
422
348
|
if (!reactHotLoader) {
|
|
423
349
|
return;
|
|
424
350
|
}
|
|
425
|
-
|
|
426
351
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
427
352
|
reactHotLoader.register(hourOptionsAMPM, "hourOptionsAMPM", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
428
353
|
reactHotLoader.register(i, "i", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
@@ -443,9 +368,7 @@ exports.default = _default3;
|
|
|
443
368
|
reactHotLoader.register(TimePicker, "TimePicker", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
444
369
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
445
370
|
})();
|
|
446
|
-
|
|
447
371
|
;
|
|
448
|
-
|
|
449
372
|
(function () {
|
|
450
373
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
451
374
|
leaveModule && leaveModule(module);
|