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,83 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = exports.Wrapper = exports.SegmentItem = exports.List = exports.Item = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
|
|
10
7
|
var _reactRouterDom = require("react-router-dom");
|
|
11
|
-
|
|
12
8
|
var _urlPattern = _interopRequireDefault(require("url-pattern"));
|
|
13
|
-
|
|
14
9
|
var _utils = require("../../utils");
|
|
15
|
-
|
|
16
10
|
var _Text = _interopRequireDefault(require("../Text"));
|
|
17
|
-
|
|
18
11
|
var _FullPage = _interopRequireDefault(require("./FullPage"));
|
|
19
|
-
|
|
20
12
|
var _SubPage = _interopRequireDefault(require("./SubPage"));
|
|
21
|
-
|
|
22
13
|
var _Segment = _interopRequireDefault(require("./Segment"));
|
|
23
|
-
|
|
24
14
|
var _view = require("./../../selectors/view");
|
|
25
|
-
|
|
26
15
|
var _reactRedux = require("react-redux");
|
|
27
|
-
|
|
28
16
|
var _styles = require("@material-ui/core/styles");
|
|
29
|
-
|
|
30
17
|
var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));
|
|
31
|
-
|
|
32
18
|
var _TooltippedTypography = _interopRequireDefault(require("./../MaterialUI/DataDisplay/TooltippedElements/TooltippedTypography"));
|
|
33
|
-
|
|
34
19
|
var _urlHelper = require("./../../utils/urlHelper");
|
|
35
|
-
|
|
36
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
37
|
-
|
|
38
21
|
var _excluded = ["active"];
|
|
39
|
-
|
|
40
22
|
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); }
|
|
41
|
-
|
|
42
23
|
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; }
|
|
43
|
-
|
|
44
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
45
|
-
|
|
46
25
|
(function () {
|
|
47
26
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
48
27
|
enterModule && enterModule(module);
|
|
49
28
|
})();
|
|
50
|
-
|
|
51
29
|
(function () {
|
|
52
30
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
53
31
|
enterModule && enterModule(module);
|
|
54
32
|
})();
|
|
55
|
-
|
|
56
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
57
|
-
|
|
33
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
58
34
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
59
|
-
|
|
60
35
|
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."); }
|
|
61
|
-
|
|
62
36
|
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); }
|
|
63
|
-
|
|
64
37
|
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; }
|
|
65
|
-
|
|
66
38
|
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; }
|
|
67
|
-
|
|
68
39
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
69
|
-
|
|
70
40
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
71
|
-
|
|
72
41
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
73
|
-
|
|
74
42
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
75
43
|
return a;
|
|
76
44
|
};
|
|
77
|
-
|
|
78
45
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
79
46
|
return a;
|
|
80
47
|
};
|
|
81
|
-
|
|
82
48
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
83
49
|
return {
|
|
84
50
|
asterix: {
|
|
@@ -117,60 +83,46 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
117
83
|
}
|
|
118
84
|
};
|
|
119
85
|
});
|
|
120
|
-
|
|
121
86
|
var Wrapper = _styledComponents.default.div.withConfig({
|
|
122
87
|
displayName: "SegmentPage__Wrapper",
|
|
123
88
|
componentId: "sc-1b2lq1m-0"
|
|
124
89
|
})(["box-sizing:border-box;display:flex;border-top:1px solid ", ";flex:0 1 100%;height:calc(100% - 90px);min-height:0;"], (0, _utils.getThemeProp)(["colors", "borderLight"], "#cccccc"));
|
|
125
|
-
|
|
126
90
|
exports.Wrapper = Wrapper;
|
|
127
|
-
|
|
128
91
|
var List = _styledComponents.default.div.withConfig({
|
|
129
92
|
displayName: "SegmentPage__List",
|
|
130
93
|
componentId: "sc-1b2lq1m-1"
|
|
131
94
|
})(["flex:0 0.1 15%;border-right:1px solid ", ";display:flex;flex-direction:column;"], (0, _utils.getThemeProp)(["colors", "borderLight"], "#cccccc"));
|
|
132
|
-
|
|
133
95
|
exports.List = List;
|
|
134
|
-
|
|
135
96
|
var FilteredLink = function FilteredLink(_ref) {
|
|
136
97
|
var active = _ref.active,
|
|
137
|
-
|
|
138
|
-
|
|
98
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
139
99
|
return props.to ? /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, props) : /*#__PURE__*/_react.default.createElement("div", props);
|
|
140
100
|
};
|
|
141
|
-
|
|
142
101
|
var Item = (0, _styledComponents.default)(FilteredLink).withConfig({
|
|
143
102
|
displayName: "SegmentPage__Item",
|
|
144
103
|
componentId: "sc-1b2lq1m-2"
|
|
145
104
|
})(["display:block;white-space:nowrap;min-width:max-content;padding:15px 20px;font-weight:bold;font-size:13px;text-decoration:none;cursor:pointer;color:", ";", ";"], (0, _utils.getThemeProp)(["colors", "text"], "#333333"), (0, _utils.ifFlag)("active", (0, _styledComponents.css)(["background-color:#b4cfe3;"]), (0, _styledComponents.css)(["&:hover{background-color:#f7f7f7;}"])));
|
|
146
105
|
exports.Item = Item;
|
|
147
|
-
|
|
148
106
|
var SegmentItem = function SegmentItem(_ref2) {
|
|
149
107
|
var isModified = _ref2.isModified,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
108
|
+
isError = _ref2.isError,
|
|
109
|
+
isActive = _ref2.isActive,
|
|
110
|
+
segpath = _ref2.segpath,
|
|
111
|
+
config = _ref2.config,
|
|
112
|
+
baseHref = _ref2.baseHref,
|
|
113
|
+
params = _ref2.params;
|
|
156
114
|
var classes = useStyles();
|
|
157
|
-
|
|
158
115
|
var hideSelector = function hideSelector(state) {
|
|
159
116
|
var _config$hide;
|
|
160
|
-
|
|
161
117
|
return typeof config.hide === "function" ? config.hide(params)(state) : (_config$hide = config.hide) != null ? _config$hide : false;
|
|
162
118
|
};
|
|
163
|
-
|
|
164
119
|
var isHide = (0, _reactRedux.useSelector)(hideSelector);
|
|
165
|
-
|
|
166
120
|
var asterix = /*#__PURE__*/_react.default.createElement("span", {
|
|
167
121
|
className: classes.asterix
|
|
168
122
|
}, "*");
|
|
169
|
-
|
|
170
123
|
var text = /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
171
124
|
message: config.label
|
|
172
125
|
});
|
|
173
|
-
|
|
174
126
|
var getSectionLabelClassName = function getSectionLabelClassName(isModified, isError, isDisabled) {
|
|
175
127
|
var className = classes.label;
|
|
176
128
|
if (isModified) className = "".concat(className, " ").concat(classes.modifiedLabel);
|
|
@@ -178,13 +130,10 @@ var SegmentItem = function SegmentItem(_ref2) {
|
|
|
178
130
|
if (isDisabled) className = "".concat(className, " ").concat(classes.disabledLabel);
|
|
179
131
|
return className;
|
|
180
132
|
};
|
|
181
|
-
|
|
182
133
|
var disableSelector = function disableSelector(state) {
|
|
183
134
|
var _config$disabled;
|
|
184
|
-
|
|
185
135
|
return typeof config.disabled === "function" ? config.disabled(params)(state) : (_config$disabled = config.disabled) != null ? _config$disabled : false;
|
|
186
136
|
};
|
|
187
|
-
|
|
188
137
|
var isDisabled = (0, _reactRedux.useSelector)(disableSelector);
|
|
189
138
|
var sectionLabelClassName = getSectionLabelClassName(isModified, isError, isDisabled);
|
|
190
139
|
var basicLabel = config.labelComponent != null ? /*#__PURE__*/_react.default.createElement(_TooltippedTypography.default, {
|
|
@@ -193,7 +142,6 @@ var SegmentItem = function SegmentItem(_ref2) {
|
|
|
193
142
|
noWrap: true,
|
|
194
143
|
className: sectionLabelClassName
|
|
195
144
|
}) : text;
|
|
196
|
-
|
|
197
145
|
var finalLabel = /*#__PURE__*/_react.default.createElement(_Grid.default, {
|
|
198
146
|
container: true,
|
|
199
147
|
alignItems: "center",
|
|
@@ -208,54 +156,46 @@ var SegmentItem = function SegmentItem(_ref2) {
|
|
|
208
156
|
container: true,
|
|
209
157
|
className: classes.labelComponent
|
|
210
158
|
}, config.labelComponent));
|
|
211
|
-
|
|
212
159
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !isHide && isDisabled && /*#__PURE__*/_react.default.createElement(Item, null, finalLabel), !isHide && !isDisabled && /*#__PURE__*/_react.default.createElement(Item, {
|
|
213
160
|
to: baseHref + segpath,
|
|
214
161
|
active: isActive
|
|
215
162
|
}, finalLabel));
|
|
216
163
|
};
|
|
217
|
-
|
|
218
164
|
exports.SegmentItem = SegmentItem;
|
|
219
|
-
|
|
220
165
|
__signature__(SegmentItem, "useStyles{classes}\nuseSelector{isHide}\nuseSelector{isDisabled}", function () {
|
|
221
166
|
return [useStyles, _reactRedux.useSelector, _reactRedux.useSelector];
|
|
222
167
|
});
|
|
223
|
-
|
|
224
168
|
__signature__(SegmentItem, "useStyles{classes}\nuseSelector{isHide}\nuseSelector{isDisabled}", function () {
|
|
225
169
|
return [useStyles, _reactRedux.useSelector, _reactRedux.useSelector];
|
|
226
170
|
});
|
|
227
|
-
|
|
228
171
|
var defaultEntityIdResolver = function defaultEntityIdResolver(_ref3) {
|
|
229
172
|
var match = _ref3.match,
|
|
230
|
-
|
|
173
|
+
baseHref = _ref3.baseHref;
|
|
231
174
|
var entityIdKey = Object.keys(match.params).find(function (p) {
|
|
232
175
|
return p !== "scope";
|
|
233
176
|
});
|
|
234
177
|
var entityId = match.params[entityIdKey];
|
|
235
|
-
|
|
236
178
|
if (!entityId) {
|
|
237
179
|
entityId = (0, _urlHelper.tryGetNewEntityIdKey)(baseHref);
|
|
238
180
|
}
|
|
239
|
-
|
|
240
181
|
return entityId;
|
|
241
182
|
};
|
|
242
|
-
|
|
243
183
|
var SegmentPage = function SegmentPage(_ref4) {
|
|
244
184
|
var path = _ref4.path,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
185
|
+
View = _ref4.component,
|
|
186
|
+
componentProps = _ref4.componentProps,
|
|
187
|
+
segments = _ref4.segments,
|
|
188
|
+
location = _ref4.location,
|
|
189
|
+
match = _ref4.match,
|
|
190
|
+
modulePrependPath = _ref4.modulePrependPath,
|
|
191
|
+
entityIdResolver = _ref4.entityIdResolver;
|
|
252
192
|
var classes = useStyles({
|
|
253
193
|
isComponentNull: !!!View
|
|
254
194
|
});
|
|
255
195
|
var pattern = new _urlPattern.default(path);
|
|
256
196
|
var baseHref = pattern.stringify(match.params);
|
|
257
197
|
var pages = [],
|
|
258
|
-
|
|
198
|
+
subpages = [];
|
|
259
199
|
var entityId = entityIdResolver ? entityIdResolver({
|
|
260
200
|
match: match
|
|
261
201
|
}) : defaultEntityIdResolver({
|
|
@@ -267,15 +207,13 @@ var SegmentPage = function SegmentPage(_ref4) {
|
|
|
267
207
|
var segmentEntries = Object.entries(segments);
|
|
268
208
|
var segmentElements = segmentEntries.map(function (_ref5) {
|
|
269
209
|
var _ref6 = _slicedToArray(_ref5, 2),
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
210
|
+
segpath = _ref6[0],
|
|
211
|
+
config = _ref6[1];
|
|
273
212
|
if (config.pages) {
|
|
274
213
|
pages.push.apply(pages, Object.entries(config.pages).map(function (_ref7) {
|
|
275
214
|
var _ref8 = _slicedToArray(_ref7, 2),
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
215
|
+
subpath = _ref8[0],
|
|
216
|
+
pageConfig = _ref8[1];
|
|
279
217
|
var pagePath = segpath + subpath;
|
|
280
218
|
return /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
281
219
|
key: pagePath,
|
|
@@ -291,13 +229,11 @@ var SegmentPage = function SegmentPage(_ref4) {
|
|
|
291
229
|
});
|
|
292
230
|
}));
|
|
293
231
|
}
|
|
294
|
-
|
|
295
232
|
if (config.subpages) {
|
|
296
233
|
subpages.push.apply(subpages, Object.entries(config.subpages).map(function (_ref9) {
|
|
297
234
|
var _ref10 = _slicedToArray(_ref9, 2),
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
235
|
+
subpath = _ref10[0],
|
|
236
|
+
config = _ref10[1];
|
|
301
237
|
var pagePath = segpath + subpath;
|
|
302
238
|
return /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
303
239
|
key: pagePath,
|
|
@@ -313,7 +249,6 @@ var SegmentPage = function SegmentPage(_ref4) {
|
|
|
313
249
|
});
|
|
314
250
|
}));
|
|
315
251
|
}
|
|
316
|
-
|
|
317
252
|
return /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
|
|
318
253
|
key: segpath,
|
|
319
254
|
path: path + segpath,
|
|
@@ -337,9 +272,8 @@ var SegmentPage = function SegmentPage(_ref4) {
|
|
|
337
272
|
key: "Segments"
|
|
338
273
|
}, /*#__PURE__*/_react.default.createElement(List, null, segmentEntries.map(function (_ref11) {
|
|
339
274
|
var _ref12 = _slicedToArray(_ref11, 2),
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
275
|
+
segpath = _ref12[0],
|
|
276
|
+
config = _ref12[1];
|
|
343
277
|
var isModified = modifiedSections.includes(segpath.replace("/", ""));
|
|
344
278
|
var isError = sectionsWithErrors.includes(segpath.replace("/", ""));
|
|
345
279
|
var isActive = location.pathname === baseHref + segpath;
|
|
@@ -361,28 +295,22 @@ var SegmentPage = function SegmentPage(_ref4) {
|
|
|
361
295
|
}
|
|
362
296
|
}));
|
|
363
297
|
};
|
|
364
|
-
|
|
365
298
|
__signature__(SegmentPage, "useStyles{classes}\nuseSelector{modifiedSections}\nuseSelector{sectionsWithErrors}", function () {
|
|
366
299
|
return [useStyles, _reactRedux.useSelector, _reactRedux.useSelector];
|
|
367
300
|
});
|
|
368
|
-
|
|
369
301
|
__signature__(SegmentPage, "useStyles{classes}\nuseSelector{modifiedSections}\nuseSelector{sectionsWithErrors}", function () {
|
|
370
302
|
return [useStyles, _reactRedux.useSelector, _reactRedux.useSelector];
|
|
371
303
|
});
|
|
372
|
-
|
|
373
304
|
var _default = SegmentPage;
|
|
374
305
|
var _default2 = _default;
|
|
375
306
|
var _default3 = _default2;
|
|
376
307
|
exports.default = _default3;
|
|
377
308
|
;
|
|
378
|
-
|
|
379
309
|
(function () {
|
|
380
310
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
381
|
-
|
|
382
311
|
if (!reactHotLoader) {
|
|
383
312
|
return;
|
|
384
313
|
}
|
|
385
|
-
|
|
386
314
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/Routing/SegmentPage.js");
|
|
387
315
|
reactHotLoader.register(Wrapper, "Wrapper", "/home/vsts/work/1/s/src/components/Routing/SegmentPage.js");
|
|
388
316
|
reactHotLoader.register(List, "List", "/home/vsts/work/1/s/src/components/Routing/SegmentPage.js");
|
|
@@ -393,23 +321,17 @@ exports.default = _default3;
|
|
|
393
321
|
reactHotLoader.register(SegmentPage, "SegmentPage", "/home/vsts/work/1/s/src/components/Routing/SegmentPage.js");
|
|
394
322
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Routing/SegmentPage.js");
|
|
395
323
|
})();
|
|
396
|
-
|
|
397
324
|
;
|
|
398
|
-
|
|
399
325
|
(function () {
|
|
400
326
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
401
327
|
leaveModule && leaveModule(module);
|
|
402
328
|
})();
|
|
403
|
-
|
|
404
329
|
;
|
|
405
|
-
|
|
406
330
|
(function () {
|
|
407
331
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
408
|
-
|
|
409
332
|
if (!reactHotLoader) {
|
|
410
333
|
return;
|
|
411
334
|
}
|
|
412
|
-
|
|
413
335
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/Routing/SegmentPage.js");
|
|
414
336
|
reactHotLoader.register(Wrapper, "Wrapper", "/home/vsts/work/1/s/src/components/Routing/SegmentPage.js");
|
|
415
337
|
reactHotLoader.register(List, "List", "/home/vsts/work/1/s/src/components/Routing/SegmentPage.js");
|
|
@@ -420,9 +342,7 @@ exports.default = _default3;
|
|
|
420
342
|
reactHotLoader.register(SegmentPage, "SegmentPage", "/home/vsts/work/1/s/src/components/Routing/SegmentPage.js");
|
|
421
343
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Routing/SegmentPage.js");
|
|
422
344
|
})();
|
|
423
|
-
|
|
424
345
|
;
|
|
425
|
-
|
|
426
346
|
(function () {
|
|
427
347
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
428
348
|
leaveModule && leaveModule(module);
|
|
@@ -2,63 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = exports.SubPage = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
-
|
|
8
6
|
var _reactRedux = require("react-redux");
|
|
9
|
-
|
|
10
7
|
var _urlPattern = _interopRequireDefault(require("url-pattern"));
|
|
11
|
-
|
|
12
8
|
var _withErrorBoundary = _interopRequireDefault(require("../../hocs/withErrorBoundary"));
|
|
13
|
-
|
|
14
9
|
var _navigation = require("../../actions/navigation");
|
|
15
|
-
|
|
16
10
|
var _withWaypointing = _interopRequireDefault(require("./withWaypointing"));
|
|
17
|
-
|
|
18
11
|
var _Modal = _interopRequireDefault(require("../MaterialUI/DataDisplay/Modal"));
|
|
19
|
-
|
|
20
12
|
var _modalProps = _interopRequireDefault(require("../MaterialUI/DataDisplay/modalProps"));
|
|
21
|
-
|
|
22
13
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
23
|
-
|
|
24
14
|
var _styles = require("@material-ui/core/styles");
|
|
25
|
-
|
|
26
15
|
var _sharedMessages = _interopRequireDefault(require("../../sharedMessages"));
|
|
27
|
-
|
|
28
16
|
var _reactIntl = require("react-intl");
|
|
29
|
-
|
|
30
17
|
var _excluded = ["component"];
|
|
31
|
-
|
|
32
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
-
|
|
34
19
|
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); }
|
|
35
|
-
|
|
36
20
|
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; }
|
|
37
|
-
|
|
38
21
|
(function () {
|
|
39
22
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
40
23
|
enterModule && enterModule(module);
|
|
41
24
|
})();
|
|
42
|
-
|
|
43
25
|
(function () {
|
|
44
26
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
45
27
|
enterModule && enterModule(module);
|
|
46
28
|
})();
|
|
47
|
-
|
|
48
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
49
|
-
|
|
29
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
50
30
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
51
|
-
|
|
52
31
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
53
|
-
|
|
54
32
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
55
33
|
return a;
|
|
56
34
|
};
|
|
57
|
-
|
|
58
35
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
59
36
|
return a;
|
|
60
37
|
};
|
|
61
|
-
|
|
62
38
|
var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
63
39
|
return {
|
|
64
40
|
actionPanel: {
|
|
@@ -69,22 +45,18 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
69
45
|
}
|
|
70
46
|
};
|
|
71
47
|
});
|
|
72
|
-
|
|
73
48
|
var SubPage = function SubPage(_ref) {
|
|
74
49
|
var _props$title, _props$title2, _props$title3;
|
|
75
|
-
|
|
76
50
|
var config = _ref.config,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
51
|
+
match = _ref.match,
|
|
52
|
+
location = _ref.location,
|
|
53
|
+
history = _ref.history,
|
|
54
|
+
root = _ref.root,
|
|
55
|
+
modulePrependPath = _ref.modulePrependPath;
|
|
82
56
|
var classes = useStyles();
|
|
83
57
|
var dispatch = (0, _reactRedux.useDispatch)();
|
|
84
|
-
|
|
85
58
|
var View = config.component,
|
|
86
|
-
|
|
87
|
-
|
|
59
|
+
props = _objectWithoutProperties(config, _excluded);
|
|
88
60
|
var pattern = new _urlPattern.default(root);
|
|
89
61
|
var baseHref = pattern.stringify(match.params);
|
|
90
62
|
var path = location.pathname;
|
|
@@ -94,12 +66,10 @@ var SubPage = function SubPage(_ref) {
|
|
|
94
66
|
var WrappedView = (0, _react.useMemo)(function () {
|
|
95
67
|
return (0, _withErrorBoundary.default)(path)((0, _withWaypointing.default)(View));
|
|
96
68
|
}, [path, View]);
|
|
97
|
-
|
|
98
69
|
var closeSubPage = function closeSubPage() {
|
|
99
70
|
history.push(basePath);
|
|
100
71
|
dispatch((0, _navigation.mapHref)(basePath, basePath));
|
|
101
72
|
};
|
|
102
|
-
|
|
103
73
|
var message = /*#__PURE__*/_react.default.createElement(WrappedView, _extends({
|
|
104
74
|
match: match,
|
|
105
75
|
location: location,
|
|
@@ -107,7 +77,6 @@ var SubPage = function SubPage(_ref) {
|
|
|
107
77
|
}, props, {
|
|
108
78
|
modulePrependPath: modulePrependPath
|
|
109
79
|
}));
|
|
110
|
-
|
|
111
80
|
var modalProps = new _modalProps.default();
|
|
112
81
|
var titleComponent = props != null && (_props$title = props.title) != null && _props$title.id ? /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, {
|
|
113
82
|
id: props == null ? void 0 : (_props$title2 = props.title) == null ? void 0 : _props$title2.id,
|
|
@@ -117,7 +86,6 @@ var SubPage = function SubPage(_ref) {
|
|
|
117
86
|
modalProps.set(_modalProps.default.propNames.open, true);
|
|
118
87
|
modalProps.set(_modalProps.default.propNames.type, "fullwidth");
|
|
119
88
|
modalProps.set(_modalProps.default.propNames.backdropClickCallback, closeSubPage);
|
|
120
|
-
|
|
121
89
|
var actionPanel = /*#__PURE__*/_react.default.createElement("div", {
|
|
122
90
|
className: classes.actionPanel
|
|
123
91
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
@@ -126,24 +94,19 @@ var SubPage = function SubPage(_ref) {
|
|
|
126
94
|
disableElevation: true,
|
|
127
95
|
onClick: closeSubPage
|
|
128
96
|
}, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _sharedMessages.default.close)));
|
|
129
|
-
|
|
130
97
|
modalProps.set(_modalProps.default.propNames.actionPanel, actionPanel);
|
|
131
98
|
return /*#__PURE__*/_react.default.createElement(_Modal.default, {
|
|
132
99
|
message: message,
|
|
133
100
|
modalProps: modalProps
|
|
134
101
|
});
|
|
135
102
|
};
|
|
136
|
-
|
|
137
103
|
exports.SubPage = SubPage;
|
|
138
|
-
|
|
139
104
|
__signature__(SubPage, "useStyles{classes}\nuseDispatch{dispatch}\nuseMemo{WrappedView}", function () {
|
|
140
105
|
return [useStyles, _reactRedux.useDispatch];
|
|
141
106
|
});
|
|
142
|
-
|
|
143
107
|
__signature__(SubPage, "useStyles{classes}\nuseDispatch{dispatch}\nuseMemo{WrappedView}", function () {
|
|
144
108
|
return [useStyles, _reactRedux.useDispatch];
|
|
145
109
|
});
|
|
146
|
-
|
|
147
110
|
SubPage.defaultProps = {
|
|
148
111
|
theme: {
|
|
149
112
|
icons: {
|
|
@@ -156,42 +119,31 @@ var _default2 = _default;
|
|
|
156
119
|
var _default3 = _default2;
|
|
157
120
|
exports.default = _default3;
|
|
158
121
|
;
|
|
159
|
-
|
|
160
122
|
(function () {
|
|
161
123
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
162
|
-
|
|
163
124
|
if (!reactHotLoader) {
|
|
164
125
|
return;
|
|
165
126
|
}
|
|
166
|
-
|
|
167
127
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/Routing/SubPage.js");
|
|
168
128
|
reactHotLoader.register(SubPage, "SubPage", "/home/vsts/work/1/s/src/components/Routing/SubPage.js");
|
|
169
129
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Routing/SubPage.js");
|
|
170
130
|
})();
|
|
171
|
-
|
|
172
131
|
;
|
|
173
|
-
|
|
174
132
|
(function () {
|
|
175
133
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
176
134
|
leaveModule && leaveModule(module);
|
|
177
135
|
})();
|
|
178
|
-
|
|
179
136
|
;
|
|
180
|
-
|
|
181
137
|
(function () {
|
|
182
138
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
183
|
-
|
|
184
139
|
if (!reactHotLoader) {
|
|
185
140
|
return;
|
|
186
141
|
}
|
|
187
|
-
|
|
188
142
|
reactHotLoader.register(useStyles, "useStyles", "/home/vsts/work/1/s/src/components/Routing/SubPage.js");
|
|
189
143
|
reactHotLoader.register(SubPage, "SubPage", "/home/vsts/work/1/s/src/components/Routing/SubPage.js");
|
|
190
144
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Routing/SubPage.js");
|
|
191
145
|
})();
|
|
192
|
-
|
|
193
146
|
;
|
|
194
|
-
|
|
195
147
|
(function () {
|
|
196
148
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
197
149
|
leaveModule && leaveModule(module);
|
|
@@ -2,65 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _reactRouterDom = require("react-router-dom");
|
|
9
|
-
|
|
10
7
|
var _navigation = require("../../selectors/navigation");
|
|
11
|
-
|
|
12
8
|
var _navigation2 = require("../../actions/navigation");
|
|
13
|
-
|
|
14
9
|
var _useLoader = _interopRequireDefault(require("../../hooks/useLoader"));
|
|
15
|
-
|
|
16
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
11
|
(function () {
|
|
19
12
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
20
13
|
enterModule && enterModule(module);
|
|
21
14
|
})();
|
|
22
|
-
|
|
23
15
|
(function () {
|
|
24
16
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
25
17
|
enterModule && enterModule(module);
|
|
26
18
|
})();
|
|
27
|
-
|
|
28
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
-
|
|
19
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
30
20
|
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; }
|
|
31
|
-
|
|
32
21
|
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; }
|
|
33
|
-
|
|
34
22
|
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; }
|
|
35
|
-
|
|
36
23
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
37
24
|
return a;
|
|
38
25
|
};
|
|
39
|
-
|
|
40
26
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
41
27
|
return a;
|
|
42
28
|
};
|
|
43
|
-
|
|
44
29
|
var withWaypointing = function withWaypointing(Comp, isVisible, componentProps) {
|
|
45
30
|
if (isVisible === void 0) {
|
|
46
31
|
isVisible = true;
|
|
47
32
|
}
|
|
48
|
-
|
|
49
33
|
if (componentProps === void 0) {
|
|
50
34
|
componentProps = {};
|
|
51
35
|
}
|
|
52
|
-
|
|
53
36
|
return __signature__(__signature__(function (props) {
|
|
54
37
|
var match = props.match,
|
|
55
|
-
|
|
56
|
-
|
|
38
|
+
mapFrom = props.mapFrom,
|
|
39
|
+
modulePrependPath = props.modulePrependPath;
|
|
57
40
|
var location = (0, _reactRouterDom.useLocation)();
|
|
58
41
|
var loadActions = [];
|
|
59
|
-
|
|
60
42
|
if (modulePrependPath) {
|
|
61
43
|
loadActions.push((0, _navigation2.setCurrentPrependPath)(modulePrependPath));
|
|
62
44
|
}
|
|
63
|
-
|
|
64
45
|
if (match.isExact) {
|
|
65
46
|
if (mapFrom) {
|
|
66
47
|
loadActions.push((0, _navigation2.mapHref)(mapFrom, location.pathname), (0, _navigation2.setRoute)(_objectSpread(_objectSpread({}, location), {}, {
|
|
@@ -70,11 +51,9 @@ var withWaypointing = function withWaypointing(Comp, isVisible, componentProps)
|
|
|
70
51
|
loadActions.push((0, _navigation2.setRoute)(location, match));
|
|
71
52
|
}
|
|
72
53
|
}
|
|
73
|
-
|
|
74
54
|
var cutout = function cutout(state) {
|
|
75
55
|
return (0, _navigation.selectRouteHref)(state) === location.pathname;
|
|
76
56
|
};
|
|
77
|
-
|
|
78
57
|
(0, _useLoader.default)(loadActions, cutout);
|
|
79
58
|
return isVisible ? /*#__PURE__*/_react.default.createElement(Comp, _extends({}, props, componentProps)) : null;
|
|
80
59
|
}, "useLocation{location}\nuseLoader{}", function () {
|
|
@@ -83,46 +62,34 @@ var withWaypointing = function withWaypointing(Comp, isVisible, componentProps)
|
|
|
83
62
|
return [_reactRouterDom.useLocation, _useLoader.default];
|
|
84
63
|
});
|
|
85
64
|
};
|
|
86
|
-
|
|
87
65
|
var _default = withWaypointing;
|
|
88
66
|
var _default2 = _default;
|
|
89
67
|
var _default3 = _default2;
|
|
90
68
|
exports.default = _default3;
|
|
91
69
|
;
|
|
92
|
-
|
|
93
70
|
(function () {
|
|
94
71
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
95
|
-
|
|
96
72
|
if (!reactHotLoader) {
|
|
97
73
|
return;
|
|
98
74
|
}
|
|
99
|
-
|
|
100
75
|
reactHotLoader.register(withWaypointing, "withWaypointing", "/home/vsts/work/1/s/src/components/Routing/withWaypointing.js");
|
|
101
76
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Routing/withWaypointing.js");
|
|
102
77
|
})();
|
|
103
|
-
|
|
104
78
|
;
|
|
105
|
-
|
|
106
79
|
(function () {
|
|
107
80
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
108
81
|
leaveModule && leaveModule(module);
|
|
109
82
|
})();
|
|
110
|
-
|
|
111
83
|
;
|
|
112
|
-
|
|
113
84
|
(function () {
|
|
114
85
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
115
|
-
|
|
116
86
|
if (!reactHotLoader) {
|
|
117
87
|
return;
|
|
118
88
|
}
|
|
119
|
-
|
|
120
89
|
reactHotLoader.register(withWaypointing, "withWaypointing", "/home/vsts/work/1/s/src/components/Routing/withWaypointing.js");
|
|
121
90
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Routing/withWaypointing.js");
|
|
122
91
|
})();
|
|
123
|
-
|
|
124
92
|
;
|
|
125
|
-
|
|
126
93
|
(function () {
|
|
127
94
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
128
95
|
leaveModule && leaveModule(module);
|