orc-shared 1.5.0-dev.1 → 1.5.0-dev.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 +3 -51
- 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 +1 -31
- 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 +17 -70
- package/dist/components/AppFrame/Preferences.js +12 -76
- package/dist/components/AppFrame/Sidebar.js +8 -53
- 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 +3 -41
- 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 +6 -37
- package/dist/components/Form/FieldElements.js +9 -41
- 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 +15 -64
- package/dist/components/Form/Inputs/Button.js +5 -35
- package/dist/components/Form/Inputs/Date.js +2 -28
- package/dist/components/Form/Inputs/FieldButtons.js +0 -25
- package/dist/components/Form/Inputs/Number.js +7 -46
- package/dist/components/Form/Inputs/ReadOnly.js +0 -29
- package/dist/components/Form/Inputs/SmallButton.js +6 -38
- package/dist/components/Form/Inputs/Text.js +8 -41
- package/dist/components/Form/Inputs/Time.js +4 -33
- package/dist/components/Form/Inputs/Toggles.js +5 -39
- package/dist/components/Form/Inputs/Translation.js +16 -75
- 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 +0 -28
- package/dist/components/Icon.js +1 -27
- package/dist/components/IconButton.js +2 -32
- package/dist/components/Input.js +2 -42
- package/dist/components/InternetExplorerWarningMessage.js +0 -31
- package/dist/components/List/DataCell.js +3 -42
- 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 +2 -28
- 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 +0 -33
- package/dist/components/MaterialUI/DataDisplay/PopperedElements/PopperedIcon.js +0 -22
- 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 +17 -57
- 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 +32 -121
- package/dist/components/MaterialUI/DataDisplay/TableHeaderCell.js +0 -35
- package/dist/components/MaterialUI/DataDisplay/TableProps.js +0 -48
- 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 +5 -44
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/TooltippedIcon.js +3 -29
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/TooltippedTypography.js +0 -21
- package/dist/components/MaterialUI/DataDisplay/TransferList.js +27 -94
- package/dist/components/MaterialUI/DataDisplay/chipProps.js +0 -37
- package/dist/components/MaterialUI/DataDisplay/collapsableListProps.js +0 -36
- package/dist/components/MaterialUI/DataDisplay/dividerProps.js +0 -40
- package/dist/components/MaterialUI/DataDisplay/index.js +0 -33
- package/dist/components/MaterialUI/DataDisplay/modalProps.js +0 -35
- 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 +2 -43
- package/dist/components/MaterialUI/Inputs/AutocompleteProps.js +0 -36
- 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 +0 -37
- package/dist/components/MaterialUI/Inputs/CheckboxProps.js +0 -38
- package/dist/components/MaterialUI/Inputs/DatePicker.js +15 -56
- package/dist/components/MaterialUI/Inputs/InputBase.js +5 -54
- package/dist/components/MaterialUI/Inputs/InputBaseProps.js +0 -50
- 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 +0 -40
- package/dist/components/MaterialUI/Inputs/Select.js +5 -69
- package/dist/components/MaterialUI/Inputs/SelectProps.js +0 -45
- 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 +0 -39
- package/dist/components/MaterialUI/Inputs/TimePicker.js +12 -89
- package/dist/components/MaterialUI/Inputs/createInput.js +2 -29
- package/dist/components/MaterialUI/Inputs/index.js +0 -35
- package/dist/components/MaterialUI/Inputs/standaloneRadioProps.js +0 -40
- package/dist/components/MaterialUI/Navigation/DropDownMenu.js +10 -54
- package/dist/components/MaterialUI/Navigation/DropDownMenuProps.js +0 -32
- 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 +20 -101
- 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 +0 -54
- package/dist/components/MaterialUI/Surfaces/paperProps.js +0 -35
- package/dist/components/MaterialUI/componentProps.js +0 -28
- package/dist/components/MaterialUI/hocs/withDeferredPopper.js +8 -57
- package/dist/components/MaterialUI/hocs/withDeferredTooltip.js +6 -42
- package/dist/components/MaterialUI/muiThemes.js +2 -56
- package/dist/components/MaterialUI/textProps.js +0 -32
- 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 +17 -89
- package/dist/components/MultiSelector.js +19 -72
- 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 -170
- package/dist/components/Placeholder.js +5 -43
- package/dist/components/Provision.js +4 -36
- package/dist/components/Routing/FullPage.js +14 -37
- package/dist/components/Routing/Page.js +12 -49
- package/dist/components/Routing/Segment.js +5 -30
- package/dist/components/Routing/SegmentPage.js +24 -104
- package/dist/components/Routing/SubPage.js +6 -57
- package/dist/components/Routing/withWaypointing.js +2 -35
- 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 +8 -73
- package/dist/components/Scope/useScopeData.js +0 -25
- package/dist/components/Scope/useScopeSelect.js +0 -26
- package/dist/components/Selector.js +13 -74
- package/dist/components/Sidepanel.js +0 -28
- package/dist/components/Spritesheet.js +0 -26
- package/dist/components/Switch.js +11 -51
- package/dist/components/Text.js +4 -48
- package/dist/components/ToastList.js +5 -45
- package/dist/components/Toolbar.js +16 -74
- 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 +14 -54
- 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 +2 -28
- package/dist/hocs/withErrorBoundary.js +2 -37
- package/dist/hocs/withId.js +1 -30
- 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 +2 -31
- 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 +7 -104
- 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 +12 -89
- package/dist/utils/timezoneHelper.js +4 -42
- package/dist/utils/unwrapImmutable.js +0 -19
- package/dist/utils/urlHelper.js +2 -27
- package/dist/whyDidYouRerender.js +0 -5
- package/package.json +3 -3
- package/src/hooks/useEditState.js +12 -2
- package/src/hooks/useEditState.test.js +1 -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
16
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
|
-
|
|
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,48 +222,38 @@ 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
|
(0, _react.useEffect)(function () {
|
|
299
246
|
setTime(parseTime(value || "00:00"));
|
|
300
247
|
}, [value, setTime]);
|
|
301
248
|
var userTimeZone = (0, _timezoneHelper.getTimeZoneName)();
|
|
302
249
|
var localizedTimeZoneName = (0, _reactRedux.useSelector)((0, _metadata.namedLookupLocalizedSelector)("customer", "TimeZone", userTimeZone, null));
|
|
303
|
-
|
|
304
250
|
var onTimeChange = function onTimeChange(datetime) {
|
|
305
251
|
if (onChange) {
|
|
306
252
|
// DatePicker expects 24 hour time format, or else things go wonky!
|
|
307
253
|
var _time = "".concat(leftFillNum(datetime.getHours(), 2), ":").concat(leftFillNum(datetime.getMinutes(), 2));
|
|
308
|
-
|
|
309
254
|
onChange(_time);
|
|
310
255
|
}
|
|
311
256
|
};
|
|
312
|
-
|
|
313
257
|
var setHours = function setHours(hours, isAMTime) {
|
|
314
258
|
if (!showAMPM) {
|
|
315
259
|
time.setHours(hours);
|
|
@@ -319,11 +263,9 @@ var TimePicker = function TimePicker(_ref4) {
|
|
|
319
263
|
time.setHours(parseInt(hours) + parseInt(isAMTime ? 0 : 12));
|
|
320
264
|
}
|
|
321
265
|
};
|
|
322
|
-
|
|
323
266
|
var updateTimeOptions = function updateTimeOptions(id) {
|
|
324
267
|
return function (newValue) {
|
|
325
268
|
var value = newValue;
|
|
326
|
-
|
|
327
269
|
if (id === "hours") {
|
|
328
270
|
setHours(value, isAM(time));
|
|
329
271
|
} else if (id === "ampm") {
|
|
@@ -331,23 +273,18 @@ var TimePicker = function TimePicker(_ref4) {
|
|
|
331
273
|
} else {
|
|
332
274
|
time.setMinutes(parseInt(value));
|
|
333
275
|
}
|
|
334
|
-
|
|
335
276
|
setTime(time);
|
|
336
277
|
onTimeChange(time);
|
|
337
278
|
};
|
|
338
279
|
};
|
|
339
|
-
|
|
340
280
|
var getTimeZone = function getTimeZone(requestedTimeZone) {
|
|
341
281
|
if (requestedTimeZone) return requestedTimeZone;
|
|
342
|
-
|
|
343
282
|
if (!localizedTimeZoneName) {
|
|
344
283
|
var timezone = new Date().toString().match(/GMT(\S+) \(([^)]+)\)/i);
|
|
345
284
|
return "".concat(timezone[2], " (GMT").concat(timezone[1], ")");
|
|
346
285
|
}
|
|
347
|
-
|
|
348
286
|
return localizedTimeZoneName;
|
|
349
287
|
};
|
|
350
|
-
|
|
351
288
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
352
289
|
className: classes.timeWrapper
|
|
353
290
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -367,28 +304,22 @@ var TimePicker = function TimePicker(_ref4) {
|
|
|
367
304
|
className: classes.timeZoneWrapper
|
|
368
305
|
}, showTimeZone && getTimeZone(requestedTimeZone)));
|
|
369
306
|
};
|
|
370
|
-
|
|
371
307
|
__signature__(TimePicker, "useStyles{classes}\nuseState{[time, setTime](parseTime(value || \"00:00\"))}\nuseEffect{}\nuseSelector{localizedTimeZoneName}", function () {
|
|
372
308
|
return [useStyles, _reactRedux.useSelector];
|
|
373
309
|
});
|
|
374
|
-
|
|
375
310
|
__signature__(TimePicker, "useStyles{classes}\nuseState{[time, setTime](parseTime(value || \"00:00\"))}\nuseEffect{}\nuseSelector{localizedTimeZoneName}", function () {
|
|
376
311
|
return [useStyles, _reactRedux.useSelector];
|
|
377
312
|
});
|
|
378
|
-
|
|
379
313
|
var _default = TimePicker;
|
|
380
314
|
var _default2 = _default;
|
|
381
315
|
var _default3 = _default2;
|
|
382
316
|
exports.default = _default3;
|
|
383
317
|
;
|
|
384
|
-
|
|
385
318
|
(function () {
|
|
386
319
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
387
|
-
|
|
388
320
|
if (!reactHotLoader) {
|
|
389
321
|
return;
|
|
390
322
|
}
|
|
391
|
-
|
|
392
323
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
393
324
|
reactHotLoader.register(hourOptionsAMPM, "hourOptionsAMPM", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
394
325
|
reactHotLoader.register(i, "i", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
@@ -409,23 +340,17 @@ exports.default = _default3;
|
|
|
409
340
|
reactHotLoader.register(TimePicker, "TimePicker", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
410
341
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
411
342
|
})();
|
|
412
|
-
|
|
413
343
|
;
|
|
414
|
-
|
|
415
344
|
(function () {
|
|
416
345
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
417
346
|
leaveModule && leaveModule(module);
|
|
418
347
|
})();
|
|
419
|
-
|
|
420
348
|
;
|
|
421
|
-
|
|
422
349
|
(function () {
|
|
423
350
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
424
|
-
|
|
425
351
|
if (!reactHotLoader) {
|
|
426
352
|
return;
|
|
427
353
|
}
|
|
428
|
-
|
|
429
354
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
430
355
|
reactHotLoader.register(hourOptionsAMPM, "hourOptionsAMPM", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
431
356
|
reactHotLoader.register(i, "i", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
@@ -446,9 +371,7 @@ exports.default = _default3;
|
|
|
446
371
|
reactHotLoader.register(TimePicker, "TimePicker", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
447
372
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/MaterialUI/Inputs/TimePicker.js");
|
|
448
373
|
})();
|
|
449
|
-
|
|
450
374
|
;
|
|
451
|
-
|
|
452
375
|
(function () {
|
|
453
376
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
454
377
|
leaveModule && leaveModule(module);
|