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
package/dist/selectors/view.js
CHANGED
|
@@ -2,87 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.isEntityUnderEditing = exports.hasUnsavedDataSelector = exports.getTabsWithErrors = exports.getSectionsWithErrors = exports.getModifiedTabs = exports.getModifiedSections = exports.getModifiedModels = exports.getModifiedModel = exports.getInstanceKeysWithErrors = void 0;
|
|
5
|
-
|
|
6
5
|
var _reselect = require("reselect");
|
|
7
|
-
|
|
8
6
|
var _navigation = require("./navigation");
|
|
9
|
-
|
|
10
7
|
var _propertyHelper = require("./../utils/propertyHelper");
|
|
11
|
-
|
|
12
8
|
var _urlHelper = require("./../utils/urlHelper");
|
|
13
|
-
|
|
14
9
|
(function () {
|
|
15
10
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
16
11
|
enterModule && enterModule(module);
|
|
17
12
|
})();
|
|
18
|
-
|
|
19
13
|
(function () {
|
|
20
14
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
21
15
|
enterModule && enterModule(module);
|
|
22
16
|
})();
|
|
23
|
-
|
|
24
17
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
25
18
|
return a;
|
|
26
19
|
};
|
|
27
|
-
|
|
28
20
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
29
21
|
return a;
|
|
30
22
|
};
|
|
31
|
-
|
|
32
23
|
var modulesData = function modulesData(state) {
|
|
33
24
|
return state.get("view");
|
|
34
25
|
};
|
|
35
|
-
|
|
36
26
|
var editData = (0, _reselect.createSelector)(modulesData, function (data) {
|
|
37
27
|
return data.get("edit");
|
|
38
28
|
});
|
|
39
|
-
|
|
40
29
|
var isEntityUnderEditing = function isEntityUnderEditing(entityId) {
|
|
41
30
|
return (0, _reselect.createSelector)(editData, _navigation.selectCurrentModuleName, function (data, moduleName) {
|
|
42
31
|
if (data != null) {
|
|
43
32
|
var _dataJS$moduleName;
|
|
44
|
-
|
|
45
33
|
var dataJS = data.toJS();
|
|
46
34
|
var sections = (_dataJS$moduleName = dataJS[moduleName]) == null ? void 0 : _dataJS$moduleName[entityId];
|
|
47
|
-
|
|
48
35
|
if (sections != null) {
|
|
49
36
|
return true;
|
|
50
37
|
}
|
|
51
38
|
}
|
|
52
|
-
|
|
53
39
|
return false;
|
|
54
40
|
});
|
|
55
41
|
};
|
|
56
|
-
|
|
57
42
|
exports.isEntityUnderEditing = isEntityUnderEditing;
|
|
58
|
-
|
|
59
43
|
var getModifiedSections = function getModifiedSections(entityId) {
|
|
60
44
|
return (0, _reselect.createSelector)(editData, _navigation.selectCurrentModuleName, function (data, moduleName) {
|
|
61
45
|
return getModifiedSectionsFromModule(data, moduleName, entityId);
|
|
62
46
|
});
|
|
63
47
|
};
|
|
64
|
-
|
|
65
48
|
exports.getModifiedSections = getModifiedSections;
|
|
66
|
-
|
|
67
49
|
var getModifiedSectionsFromModule = function getModifiedSectionsFromModule(editData, moduleName, entityId) {
|
|
68
50
|
var modifiedSections = [];
|
|
69
|
-
|
|
70
51
|
if (editData != null) {
|
|
71
52
|
var _dataJS$moduleName2;
|
|
72
|
-
|
|
73
53
|
var dataJS = editData.toJS();
|
|
74
54
|
var sections = (_dataJS$moduleName2 = dataJS[moduleName]) == null ? void 0 : _dataJS$moduleName2[entityId];
|
|
75
|
-
|
|
76
55
|
if (sections != null) {
|
|
77
56
|
var sectionsKeys = Object.keys(sections);
|
|
78
|
-
|
|
79
57
|
for (var _i = 0, _sectionsKeys = sectionsKeys; _i < _sectionsKeys.length; _i++) {
|
|
80
58
|
var sectionKey = _sectionsKeys[_i];
|
|
81
59
|
var sectionModel = sections[sectionKey].model;
|
|
82
|
-
|
|
83
60
|
if (sectionModel != null) {
|
|
84
61
|
var wasModified = (0, _propertyHelper.isObjectContainsPropertyWithValue)(sectionModel, "wasModified", true);
|
|
85
|
-
|
|
86
62
|
if (wasModified === true) {
|
|
87
63
|
modifiedSections.push(sectionKey);
|
|
88
64
|
}
|
|
@@ -90,37 +66,27 @@ var getModifiedSectionsFromModule = function getModifiedSectionsFromModule(editD
|
|
|
90
66
|
}
|
|
91
67
|
}
|
|
92
68
|
}
|
|
93
|
-
|
|
94
69
|
return modifiedSections;
|
|
95
70
|
};
|
|
96
|
-
|
|
97
71
|
var getSectionsWithErrors = function getSectionsWithErrors(entityId) {
|
|
98
72
|
return (0, _reselect.createSelector)(editData, _navigation.selectCurrentModuleName, function (data, moduleName) {
|
|
99
73
|
return getSectionsWithErrorsFromModule(data, moduleName, entityId);
|
|
100
74
|
});
|
|
101
75
|
};
|
|
102
|
-
|
|
103
76
|
exports.getSectionsWithErrors = getSectionsWithErrors;
|
|
104
|
-
|
|
105
77
|
var getSectionsWithErrorsFromModule = function getSectionsWithErrorsFromModule(editData, moduleName, entityId) {
|
|
106
78
|
var errorSections = [];
|
|
107
|
-
|
|
108
79
|
if (editData != null) {
|
|
109
80
|
var _dataJS$moduleName3;
|
|
110
|
-
|
|
111
81
|
var dataJS = editData.toJS();
|
|
112
82
|
var sections = (_dataJS$moduleName3 = dataJS[moduleName]) == null ? void 0 : _dataJS$moduleName3[entityId];
|
|
113
|
-
|
|
114
83
|
if (sections != null) {
|
|
115
84
|
var sectionsKeys = Object.keys(sections);
|
|
116
|
-
|
|
117
85
|
for (var _i2 = 0, _sectionsKeys2 = sectionsKeys; _i2 < _sectionsKeys2.length; _i2++) {
|
|
118
86
|
var sectionKey = _sectionsKeys2[_i2];
|
|
119
87
|
var sectionModel = sections[sectionKey].model;
|
|
120
|
-
|
|
121
88
|
if (sectionModel != null) {
|
|
122
89
|
var hasError = (0, _propertyHelper.isObjectContainsPropertyWithAnyValue)(sectionModel, "error");
|
|
123
|
-
|
|
124
90
|
if (hasError === true) {
|
|
125
91
|
errorSections.push(sectionKey);
|
|
126
92
|
}
|
|
@@ -128,43 +94,34 @@ var getSectionsWithErrorsFromModule = function getSectionsWithErrorsFromModule(e
|
|
|
128
94
|
}
|
|
129
95
|
}
|
|
130
96
|
}
|
|
131
|
-
|
|
132
97
|
return errorSections;
|
|
133
98
|
};
|
|
134
|
-
|
|
135
99
|
var getInstanceKeysWithErrors = function getInstanceKeysWithErrors(entityId, sectionName, path) {
|
|
136
100
|
return (0, _reselect.createSelector)(editData, _navigation.selectCurrentModuleName, function (data, moduleName) {
|
|
137
101
|
var errorKeys = [];
|
|
138
102
|
var sectionData = data == null ? void 0 : data.getIn([moduleName, entityId, sectionName, "model"].concat(path));
|
|
139
|
-
|
|
140
103
|
if (sectionData) {
|
|
141
104
|
var section = sectionData.toJS();
|
|
142
105
|
var instanceKeys = Object.keys(section);
|
|
143
106
|
instanceKeys.forEach(function (instanceKey) {
|
|
144
107
|
var hasError = (0, _propertyHelper.isObjectContainsPropertyWithAnyValue)(section[instanceKey], "error");
|
|
145
|
-
|
|
146
108
|
if (hasError === true) {
|
|
147
109
|
errorKeys.push(instanceKey);
|
|
148
110
|
}
|
|
149
111
|
});
|
|
150
112
|
}
|
|
151
|
-
|
|
152
113
|
return errorKeys;
|
|
153
114
|
});
|
|
154
115
|
};
|
|
155
|
-
|
|
156
116
|
exports.getInstanceKeysWithErrors = getInstanceKeysWithErrors;
|
|
157
|
-
|
|
158
117
|
var getModifiedTabs = function getModifiedTabs(tabsParams) {
|
|
159
118
|
return (0, _reselect.createSelector)(editData, _navigation.selectCurrentModuleName, function (data, moduleName) {
|
|
160
119
|
var modifiedTabs = [];
|
|
161
120
|
tabsParams.forEach(function (tabParams) {
|
|
162
121
|
var newEntityId = (0, _urlHelper.tryGetNewEntityIdKey)(tabParams.href);
|
|
163
122
|
if (newEntityId) tabParams.params.push(newEntityId);
|
|
164
|
-
|
|
165
123
|
for (var i = 0; i < tabParams.params.length; i++) {
|
|
166
124
|
var modifiedSections = getModifiedSectionsFromModule(data, moduleName, tabParams.params[i]);
|
|
167
|
-
|
|
168
125
|
if (modifiedSections.length > 0) {
|
|
169
126
|
modifiedTabs.push(tabParams.href);
|
|
170
127
|
break;
|
|
@@ -174,19 +131,15 @@ var getModifiedTabs = function getModifiedTabs(tabsParams) {
|
|
|
174
131
|
return modifiedTabs;
|
|
175
132
|
});
|
|
176
133
|
};
|
|
177
|
-
|
|
178
134
|
exports.getModifiedTabs = getModifiedTabs;
|
|
179
|
-
|
|
180
135
|
var getTabsWithErrors = function getTabsWithErrors(tabsParams) {
|
|
181
136
|
return (0, _reselect.createSelector)(editData, _navigation.selectCurrentModuleName, function (data, moduleName) {
|
|
182
137
|
var tabsWithErrors = [];
|
|
183
138
|
tabsParams.forEach(function (tabParams) {
|
|
184
139
|
var newEntityId = (0, _urlHelper.tryGetNewEntityIdKey)(tabParams.href);
|
|
185
140
|
if (newEntityId) tabParams.params.push(newEntityId);
|
|
186
|
-
|
|
187
141
|
for (var i = 0; i < tabParams.params.length; i++) {
|
|
188
142
|
var sectionsWithErrors = getSectionsWithErrorsFromModule(data, moduleName, tabParams.params[i]);
|
|
189
|
-
|
|
190
143
|
if (sectionsWithErrors.length > 0) {
|
|
191
144
|
tabsWithErrors.push(tabParams.href);
|
|
192
145
|
break;
|
|
@@ -196,19 +149,14 @@ var getTabsWithErrors = function getTabsWithErrors(tabsParams) {
|
|
|
196
149
|
return tabsWithErrors;
|
|
197
150
|
});
|
|
198
151
|
};
|
|
199
|
-
|
|
200
152
|
exports.getTabsWithErrors = getTabsWithErrors;
|
|
201
|
-
|
|
202
153
|
var getModifiedModels = function getModifiedModels(entityId) {
|
|
203
154
|
return (0, _reselect.createSelector)(editData, _navigation.selectCurrentModuleName, function (data, moduleName) {
|
|
204
155
|
var models = {};
|
|
205
|
-
|
|
206
156
|
if (data != null) {
|
|
207
157
|
var _dataJS$moduleName4;
|
|
208
|
-
|
|
209
158
|
var dataJS = data.toJS();
|
|
210
159
|
var sections = (_dataJS$moduleName4 = dataJS[moduleName]) == null ? void 0 : _dataJS$moduleName4[entityId];
|
|
211
|
-
|
|
212
160
|
if (sections != null) {
|
|
213
161
|
var sectionsKeys = Object.keys(sections);
|
|
214
162
|
sectionsKeys.forEach(function (sectionKey) {
|
|
@@ -216,26 +164,21 @@ var getModifiedModels = function getModifiedModels(entityId) {
|
|
|
216
164
|
});
|
|
217
165
|
}
|
|
218
166
|
}
|
|
219
|
-
|
|
220
167
|
return models;
|
|
221
168
|
});
|
|
222
|
-
};
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
// the difference between this one and getModifiedModels (with 's' at the end) is that
|
|
223
172
|
// this selector will retrieve you modified model for all the sections
|
|
224
173
|
// so, the result won't be grouped by sections
|
|
225
|
-
|
|
226
|
-
|
|
227
174
|
exports.getModifiedModels = getModifiedModels;
|
|
228
|
-
|
|
229
175
|
var getModifiedModel = function getModifiedModel(entityId) {
|
|
230
176
|
return (0, _reselect.createSelector)(editData, _navigation.selectCurrentModuleName, function (data, moduleName) {
|
|
231
177
|
var model = {};
|
|
232
|
-
|
|
233
178
|
if (data != null) {
|
|
234
179
|
var _dataJS$moduleName5;
|
|
235
|
-
|
|
236
180
|
var dataJS = data.toJS();
|
|
237
181
|
var sections = (_dataJS$moduleName5 = dataJS[moduleName]) == null ? void 0 : _dataJS$moduleName5[entityId];
|
|
238
|
-
|
|
239
182
|
if (sections != null) {
|
|
240
183
|
var sectionsKeys = Object.keys(sections);
|
|
241
184
|
sectionsKeys.forEach(function (sectionKey) {
|
|
@@ -243,17 +186,14 @@ var getModifiedModel = function getModifiedModel(entityId) {
|
|
|
243
186
|
});
|
|
244
187
|
}
|
|
245
188
|
}
|
|
246
|
-
|
|
247
189
|
return model;
|
|
248
190
|
});
|
|
249
191
|
};
|
|
250
|
-
|
|
251
192
|
exports.getModifiedModel = getModifiedModel;
|
|
252
193
|
var hasUnsavedDataSelector = (0, _reselect.createSelector)(editData, function (data) {
|
|
253
194
|
if (!data) {
|
|
254
195
|
return false;
|
|
255
196
|
}
|
|
256
|
-
|
|
257
197
|
return data.some(function (module, moduleName) {
|
|
258
198
|
return module.some(function (moduleData, entityId) {
|
|
259
199
|
return getModifiedSectionsFromModule(data, moduleName, entityId).length > 0;
|
|
@@ -262,14 +202,11 @@ var hasUnsavedDataSelector = (0, _reselect.createSelector)(editData, function (d
|
|
|
262
202
|
});
|
|
263
203
|
exports.hasUnsavedDataSelector = hasUnsavedDataSelector;
|
|
264
204
|
;
|
|
265
|
-
|
|
266
205
|
(function () {
|
|
267
206
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
268
|
-
|
|
269
207
|
if (!reactHotLoader) {
|
|
270
208
|
return;
|
|
271
209
|
}
|
|
272
|
-
|
|
273
210
|
reactHotLoader.register(modulesData, "modulesData", "/home/vsts/work/1/s/src/selectors/view.js");
|
|
274
211
|
reactHotLoader.register(editData, "editData", "/home/vsts/work/1/s/src/selectors/view.js");
|
|
275
212
|
reactHotLoader.register(isEntityUnderEditing, "isEntityUnderEditing", "/home/vsts/work/1/s/src/selectors/view.js");
|
|
@@ -284,23 +221,17 @@ exports.hasUnsavedDataSelector = hasUnsavedDataSelector;
|
|
|
284
221
|
reactHotLoader.register(getModifiedModel, "getModifiedModel", "/home/vsts/work/1/s/src/selectors/view.js");
|
|
285
222
|
reactHotLoader.register(hasUnsavedDataSelector, "hasUnsavedDataSelector", "/home/vsts/work/1/s/src/selectors/view.js");
|
|
286
223
|
})();
|
|
287
|
-
|
|
288
224
|
;
|
|
289
|
-
|
|
290
225
|
(function () {
|
|
291
226
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
292
227
|
leaveModule && leaveModule(module);
|
|
293
228
|
})();
|
|
294
|
-
|
|
295
229
|
;
|
|
296
|
-
|
|
297
230
|
(function () {
|
|
298
231
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
299
|
-
|
|
300
232
|
if (!reactHotLoader) {
|
|
301
233
|
return;
|
|
302
234
|
}
|
|
303
|
-
|
|
304
235
|
reactHotLoader.register(modulesData, "modulesData", "/home/vsts/work/1/s/src/selectors/view.js");
|
|
305
236
|
reactHotLoader.register(editData, "editData", "/home/vsts/work/1/s/src/selectors/view.js");
|
|
306
237
|
reactHotLoader.register(isEntityUnderEditing, "isEntityUnderEditing", "/home/vsts/work/1/s/src/selectors/view.js");
|
|
@@ -315,9 +246,7 @@ exports.hasUnsavedDataSelector = hasUnsavedDataSelector;
|
|
|
315
246
|
reactHotLoader.register(getModifiedModel, "getModifiedModel", "/home/vsts/work/1/s/src/selectors/view.js");
|
|
316
247
|
reactHotLoader.register(hasUnsavedDataSelector, "hasUnsavedDataSelector", "/home/vsts/work/1/s/src/selectors/view.js");
|
|
317
248
|
})();
|
|
318
|
-
|
|
319
249
|
;
|
|
320
|
-
|
|
321
250
|
(function () {
|
|
322
251
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
323
252
|
leaveModule && leaveModule(module);
|
package/dist/sharedMessages.js
CHANGED
|
@@ -2,27 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
var _reactIntl = require("react-intl");
|
|
7
|
-
|
|
8
6
|
(function () {
|
|
9
7
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
10
8
|
enterModule && enterModule(module);
|
|
11
9
|
})();
|
|
12
|
-
|
|
13
10
|
(function () {
|
|
14
11
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
15
12
|
enterModule && enterModule(module);
|
|
16
13
|
})();
|
|
17
|
-
|
|
18
14
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
19
15
|
return a;
|
|
20
16
|
};
|
|
21
|
-
|
|
22
17
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
23
18
|
return a;
|
|
24
19
|
};
|
|
25
|
-
|
|
26
20
|
var sharedMessages = (0, _reactIntl.defineMessages)({
|
|
27
21
|
appSelectorTitle: {
|
|
28
22
|
id: "orc-shared.appSelectorTitle",
|
|
@@ -282,40 +276,29 @@ var _default2 = _default;
|
|
|
282
276
|
var _default3 = _default2;
|
|
283
277
|
exports.default = _default3;
|
|
284
278
|
;
|
|
285
|
-
|
|
286
279
|
(function () {
|
|
287
280
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
288
|
-
|
|
289
281
|
if (!reactHotLoader) {
|
|
290
282
|
return;
|
|
291
283
|
}
|
|
292
|
-
|
|
293
284
|
reactHotLoader.register(sharedMessages, "sharedMessages", "/home/vsts/work/1/s/src/sharedMessages.js");
|
|
294
285
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/sharedMessages.js");
|
|
295
286
|
})();
|
|
296
|
-
|
|
297
287
|
;
|
|
298
|
-
|
|
299
288
|
(function () {
|
|
300
289
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
301
290
|
leaveModule && leaveModule(module);
|
|
302
291
|
})();
|
|
303
|
-
|
|
304
292
|
;
|
|
305
|
-
|
|
306
293
|
(function () {
|
|
307
294
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
308
|
-
|
|
309
295
|
if (!reactHotLoader) {
|
|
310
296
|
return;
|
|
311
297
|
}
|
|
312
|
-
|
|
313
298
|
reactHotLoader.register(sharedMessages, "sharedMessages", "/home/vsts/work/1/s/src/sharedMessages.js");
|
|
314
299
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/sharedMessages.js");
|
|
315
300
|
})();
|
|
316
|
-
|
|
317
301
|
;
|
|
318
|
-
|
|
319
302
|
(function () {
|
|
320
303
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
321
304
|
leaveModule && leaveModule(module);
|
|
@@ -2,98 +2,74 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.spawnerMiddleware = exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
(function () {
|
|
7
6
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
8
7
|
enterModule && enterModule(module);
|
|
9
8
|
})();
|
|
10
|
-
|
|
11
9
|
(function () {
|
|
12
10
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
13
11
|
enterModule && enterModule(module);
|
|
14
12
|
})();
|
|
15
|
-
|
|
16
13
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
17
14
|
return a;
|
|
18
15
|
};
|
|
19
|
-
|
|
20
16
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
21
17
|
return a;
|
|
22
18
|
};
|
|
23
|
-
|
|
24
19
|
var spawners = {};
|
|
25
|
-
|
|
26
20
|
var spawnerMiddleware = function spawnerMiddleware(store) {
|
|
27
21
|
return function (next) {
|
|
28
22
|
return function (action) {
|
|
29
23
|
var actionSpawner = spawners[action.type];
|
|
30
|
-
|
|
31
24
|
if (actionSpawner) {
|
|
32
25
|
var spawn = actionSpawner(action);
|
|
33
|
-
|
|
34
26
|
if (spawn) {
|
|
35
27
|
next(spawn);
|
|
36
28
|
}
|
|
37
29
|
}
|
|
38
|
-
|
|
39
30
|
return next(action);
|
|
40
31
|
};
|
|
41
32
|
};
|
|
42
33
|
};
|
|
43
|
-
|
|
44
34
|
exports.spawnerMiddleware = spawnerMiddleware;
|
|
45
|
-
|
|
46
35
|
var addSpawner = function addSpawner(type, mapper) {
|
|
47
36
|
if (spawners[type]) {
|
|
48
37
|
throw new Error("Action spawner for type " + type + " was attempted overwritten.");
|
|
49
38
|
}
|
|
50
|
-
|
|
51
39
|
spawners[type] = mapper;
|
|
52
40
|
};
|
|
53
|
-
|
|
54
41
|
var _default = addSpawner;
|
|
55
42
|
var _default2 = _default;
|
|
56
43
|
var _default3 = _default2;
|
|
57
44
|
exports.default = _default3;
|
|
58
45
|
;
|
|
59
|
-
|
|
60
46
|
(function () {
|
|
61
47
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
62
|
-
|
|
63
48
|
if (!reactHotLoader) {
|
|
64
49
|
return;
|
|
65
50
|
}
|
|
66
|
-
|
|
67
51
|
reactHotLoader.register(spawners, "spawners", "/home/vsts/work/1/s/src/spawnerMiddleware.js");
|
|
68
52
|
reactHotLoader.register(spawnerMiddleware, "spawnerMiddleware", "/home/vsts/work/1/s/src/spawnerMiddleware.js");
|
|
69
53
|
reactHotLoader.register(addSpawner, "addSpawner", "/home/vsts/work/1/s/src/spawnerMiddleware.js");
|
|
70
54
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/spawnerMiddleware.js");
|
|
71
55
|
})();
|
|
72
|
-
|
|
73
56
|
;
|
|
74
|
-
|
|
75
57
|
(function () {
|
|
76
58
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
77
59
|
leaveModule && leaveModule(module);
|
|
78
60
|
})();
|
|
79
|
-
|
|
80
61
|
;
|
|
81
|
-
|
|
82
62
|
(function () {
|
|
83
63
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
84
|
-
|
|
85
64
|
if (!reactHotLoader) {
|
|
86
65
|
return;
|
|
87
66
|
}
|
|
88
|
-
|
|
89
67
|
reactHotLoader.register(spawners, "spawners", "/home/vsts/work/1/s/src/spawnerMiddleware.js");
|
|
90
68
|
reactHotLoader.register(spawnerMiddleware, "spawnerMiddleware", "/home/vsts/work/1/s/src/spawnerMiddleware.js");
|
|
91
69
|
reactHotLoader.register(addSpawner, "addSpawner", "/home/vsts/work/1/s/src/spawnerMiddleware.js");
|
|
92
70
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/spawnerMiddleware.js");
|
|
93
71
|
})();
|
|
94
|
-
|
|
95
72
|
;
|
|
96
|
-
|
|
97
73
|
(function () {
|
|
98
74
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
99
75
|
leaveModule && leaveModule(module);
|
package/dist/utils/buildUrl.js
CHANGED
|
@@ -2,60 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.resetConfig = exports.loadConfig = exports.buildUrl = void 0;
|
|
5
|
-
|
|
6
5
|
(function () {
|
|
7
6
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
8
7
|
enterModule && enterModule(module);
|
|
9
8
|
})();
|
|
10
|
-
|
|
11
9
|
(function () {
|
|
12
10
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
13
11
|
enterModule && enterModule(module);
|
|
14
12
|
})();
|
|
15
|
-
|
|
16
13
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
-
|
|
18
14
|
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."); }
|
|
19
|
-
|
|
20
15
|
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); }
|
|
21
|
-
|
|
22
16
|
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; }
|
|
23
|
-
|
|
24
17
|
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; }
|
|
25
|
-
|
|
26
18
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
-
|
|
28
19
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
29
20
|
return a;
|
|
30
21
|
};
|
|
31
|
-
|
|
32
22
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
33
23
|
return a;
|
|
34
24
|
};
|
|
35
|
-
|
|
36
25
|
/* Constructs a URL search string from an object with key value pairs */
|
|
37
26
|
var buildParamString = function buildParamString(params) {
|
|
38
27
|
return Object.entries(params).map(function (_ref) {
|
|
39
28
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
key = _ref2[0],
|
|
30
|
+
value = _ref2[1];
|
|
43
31
|
return Array.isArray(value) ? "".concat(key, "=").concat(JSON.stringify(value)) : "".concat(key, "=").concat(value);
|
|
44
32
|
}).join("&");
|
|
45
33
|
};
|
|
46
|
-
/* Placeholder until config loads */
|
|
47
|
-
|
|
48
34
|
|
|
35
|
+
/* Placeholder until config loads */
|
|
49
36
|
var placeholder = function placeholder() {
|
|
50
37
|
throw new Error("Config not yet loaded. Please call util.js#loadConfig() and await resolution of the returned Promise.");
|
|
51
38
|
};
|
|
52
|
-
|
|
53
39
|
var buildUrl = placeholder;
|
|
40
|
+
|
|
54
41
|
/* Loads the local /config.json and sets up a real buildUrl() function
|
|
55
42
|
from the acquired information */
|
|
56
|
-
|
|
57
43
|
exports.buildUrl = buildUrl;
|
|
58
|
-
|
|
59
44
|
var loadConfig = function loadConfig() {
|
|
60
45
|
return fetch("/config.json").then(function (response) {
|
|
61
46
|
return response.json();
|
|
@@ -68,67 +53,51 @@ var loadConfig = function loadConfig() {
|
|
|
68
53
|
var host = config.serviceApiUrl;
|
|
69
54
|
/* Constructs a URL path with search parameters from a list of
|
|
70
55
|
path segments and a key-value object. */
|
|
71
|
-
|
|
72
56
|
exports.buildUrl = buildUrl = function buildUrl(pathParts, parameters) {
|
|
73
57
|
if (pathParts === void 0) {
|
|
74
58
|
pathParts = [];
|
|
75
59
|
}
|
|
76
|
-
|
|
77
60
|
return "".concat(host, "/").concat(pathParts.join("/")) + (parameters ? "?" + buildParamString(parameters) : "");
|
|
78
61
|
};
|
|
79
62
|
});
|
|
80
63
|
};
|
|
81
|
-
/* Reset function for testing, never use this in actual code */
|
|
82
|
-
|
|
83
64
|
|
|
65
|
+
/* Reset function for testing, never use this in actual code */
|
|
84
66
|
exports.loadConfig = loadConfig;
|
|
85
|
-
|
|
86
67
|
var resetConfig = function resetConfig() {
|
|
87
68
|
exports.buildUrl = buildUrl = placeholder;
|
|
88
69
|
};
|
|
89
|
-
|
|
90
70
|
exports.resetConfig = resetConfig;
|
|
91
71
|
;
|
|
92
|
-
|
|
93
72
|
(function () {
|
|
94
73
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
95
|
-
|
|
96
74
|
if (!reactHotLoader) {
|
|
97
75
|
return;
|
|
98
76
|
}
|
|
99
|
-
|
|
100
77
|
reactHotLoader.register(buildParamString, "buildParamString", "/home/vsts/work/1/s/src/utils/buildUrl.js");
|
|
101
78
|
reactHotLoader.register(placeholder, "placeholder", "/home/vsts/work/1/s/src/utils/buildUrl.js");
|
|
102
79
|
reactHotLoader.register(buildUrl, "buildUrl", "/home/vsts/work/1/s/src/utils/buildUrl.js");
|
|
103
80
|
reactHotLoader.register(loadConfig, "loadConfig", "/home/vsts/work/1/s/src/utils/buildUrl.js");
|
|
104
81
|
reactHotLoader.register(resetConfig, "resetConfig", "/home/vsts/work/1/s/src/utils/buildUrl.js");
|
|
105
82
|
})();
|
|
106
|
-
|
|
107
83
|
;
|
|
108
|
-
|
|
109
84
|
(function () {
|
|
110
85
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
111
86
|
leaveModule && leaveModule(module);
|
|
112
87
|
})();
|
|
113
|
-
|
|
114
88
|
;
|
|
115
|
-
|
|
116
89
|
(function () {
|
|
117
90
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
118
|
-
|
|
119
91
|
if (!reactHotLoader) {
|
|
120
92
|
return;
|
|
121
93
|
}
|
|
122
|
-
|
|
123
94
|
reactHotLoader.register(buildParamString, "buildParamString", "/home/vsts/work/1/s/src/utils/buildUrl.js");
|
|
124
95
|
reactHotLoader.register(placeholder, "placeholder", "/home/vsts/work/1/s/src/utils/buildUrl.js");
|
|
125
96
|
reactHotLoader.register(buildUrl, "buildUrl", "/home/vsts/work/1/s/src/utils/buildUrl.js");
|
|
126
97
|
reactHotLoader.register(loadConfig, "loadConfig", "/home/vsts/work/1/s/src/utils/buildUrl.js");
|
|
127
98
|
reactHotLoader.register(resetConfig, "resetConfig", "/home/vsts/work/1/s/src/utils/buildUrl.js");
|
|
128
99
|
})();
|
|
129
|
-
|
|
130
100
|
;
|
|
131
|
-
|
|
132
101
|
(function () {
|
|
133
102
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
134
103
|
leaveModule && leaveModule(module);
|
|
@@ -2,27 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.getLocalizedCountryByCode = void 0;
|
|
5
|
-
|
|
6
5
|
var _localizationHelper = require("../utils/localizationHelper");
|
|
7
|
-
|
|
8
6
|
(function () {
|
|
9
7
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
10
8
|
enterModule && enterModule(module);
|
|
11
9
|
})();
|
|
12
|
-
|
|
13
10
|
(function () {
|
|
14
11
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
15
12
|
enterModule && enterModule(module);
|
|
16
13
|
})();
|
|
17
|
-
|
|
18
14
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
19
15
|
return a;
|
|
20
16
|
};
|
|
21
|
-
|
|
22
17
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
23
18
|
return a;
|
|
24
19
|
};
|
|
25
|
-
|
|
26
20
|
var getLocalizedCountryByCode = function getLocalizedCountryByCode(countries, countryCode, locale) {
|
|
27
21
|
var country = countries.find(function (value) {
|
|
28
22
|
return value.isoCode === countryCode;
|
|
@@ -31,41 +25,29 @@ var getLocalizedCountryByCode = function getLocalizedCountryByCode(countries, co
|
|
|
31
25
|
var countryLocalized = (0, _localizationHelper.getLocalization)(countryDisplayName, locale, countryCode);
|
|
32
26
|
return countryLocalized;
|
|
33
27
|
};
|
|
34
|
-
|
|
35
28
|
exports.getLocalizedCountryByCode = getLocalizedCountryByCode;
|
|
36
29
|
;
|
|
37
|
-
|
|
38
30
|
(function () {
|
|
39
31
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
40
|
-
|
|
41
32
|
if (!reactHotLoader) {
|
|
42
33
|
return;
|
|
43
34
|
}
|
|
44
|
-
|
|
45
35
|
reactHotLoader.register(getLocalizedCountryByCode, "getLocalizedCountryByCode", "/home/vsts/work/1/s/src/utils/countryHelper.js");
|
|
46
36
|
})();
|
|
47
|
-
|
|
48
37
|
;
|
|
49
|
-
|
|
50
38
|
(function () {
|
|
51
39
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
52
40
|
leaveModule && leaveModule(module);
|
|
53
41
|
})();
|
|
54
|
-
|
|
55
42
|
;
|
|
56
|
-
|
|
57
43
|
(function () {
|
|
58
44
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
59
|
-
|
|
60
45
|
if (!reactHotLoader) {
|
|
61
46
|
return;
|
|
62
47
|
}
|
|
63
|
-
|
|
64
48
|
reactHotLoader.register(getLocalizedCountryByCode, "getLocalizedCountryByCode", "/home/vsts/work/1/s/src/utils/countryHelper.js");
|
|
65
49
|
})();
|
|
66
|
-
|
|
67
50
|
;
|
|
68
|
-
|
|
69
51
|
(function () {
|
|
70
52
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
71
53
|
leaveModule && leaveModule(module);
|