orc-shared 1.5.0-dev.1 → 1.5.0-dev.11
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 +14 -52
- package/dist/actions/authentication.js +10 -45
- package/dist/actions/countries.js +6 -36
- package/dist/actions/locale.js +14 -54
- package/dist/actions/makeApiAction.js +31 -79
- package/dist/actions/makeOrcApiAction.js +3 -26
- package/dist/actions/metadata.js +65 -174
- package/dist/actions/modules.js +0 -26
- package/dist/actions/navigation.js +3 -33
- package/dist/actions/requestState.js +0 -18
- package/dist/actions/requestsApi.js +0 -17
- package/dist/actions/scopes.js +14 -56
- package/dist/actions/tasks.js +190 -0
- package/dist/actions/timezones.js +6 -36
- package/dist/actions/toasts.js +3 -23
- package/dist/actions/versionInfo.js +6 -39
- package/dist/actions/view.js +0 -38
- package/dist/buildStore.js +6 -54
- package/dist/components/AppFrame/About.js +8 -70
- package/dist/components/AppFrame/Anchor.js +1 -25
- package/dist/components/AppFrame/AppFrame.js +23 -92
- package/dist/components/AppFrame/ApplicationSelector/ApplicationDialog.js +4 -35
- package/dist/components/AppFrame/ApplicationSelector/Header.js +1 -31
- package/dist/components/AppFrame/ApplicationSelector/index.js +1 -30
- package/dist/components/AppFrame/ConnectedToastList.js +0 -31
- package/dist/components/AppFrame/Help.js +0 -25
- package/dist/components/AppFrame/MenuItem.js +17 -70
- package/dist/components/AppFrame/Preferences.js +17 -79
- package/dist/components/AppFrame/Sidebar.js +12 -61
- 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 +7 -46
- package/dist/components/Authenticate.js +5 -48
- package/dist/components/Button.js +0 -24
- package/dist/components/CategoryList.js +27 -82
- package/dist/components/Checkbox.js +3 -41
- package/dist/components/ColumnWrapper.js +0 -19
- package/dist/components/Culture.js +0 -29
- package/dist/components/DevPages.js +0 -21
- package/dist/components/DropMenu/Menu.js +4 -36
- package/dist/components/DropMenu/index.js +12 -50
- package/dist/components/ErrorPlaceholder.js +3 -31
- package/dist/components/Form/Combination.js +3 -28
- package/dist/components/Form/Field.js +6 -37
- package/dist/components/Form/FieldElements.js +9 -41
- package/dist/components/Form/FieldList.js +28 -92
- 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 +17 -66
- package/dist/components/Form/Inputs/Button.js +5 -35
- package/dist/components/Form/Inputs/Date.js +2 -28
- package/dist/components/Form/Inputs/FieldButtons.js +0 -25
- package/dist/components/Form/Inputs/Number.js +7 -46
- package/dist/components/Form/Inputs/ReadOnly.js +0 -29
- package/dist/components/Form/Inputs/SmallButton.js +6 -38
- package/dist/components/Form/Inputs/Text.js +8 -41
- package/dist/components/Form/Inputs/Time.js +4 -33
- package/dist/components/Form/Inputs/Toggles.js +5 -39
- package/dist/components/Form/Inputs/Translation.js +21 -78
- package/dist/components/Form/Inputs/index.js +0 -28
- package/dist/components/Form/index.js +0 -20
- package/dist/components/Head.js +0 -22
- package/dist/components/I18n.js +0 -28
- package/dist/components/Icon.js +1 -27
- package/dist/components/IconButton.js +2 -32
- package/dist/components/Input.js +2 -42
- package/dist/components/InternetExplorerWarningMessage.js +0 -31
- package/dist/components/List/DataCell.js +3 -42
- package/dist/components/List/HeadCell.js +3 -43
- package/dist/components/List/HeadRow.js +2 -25
- package/dist/components/List/List.js +37 -107
- package/dist/components/List/Row.js +7 -38
- package/dist/components/List/enhanceColumnDefs.js +3 -29
- package/dist/components/List/index.js +0 -20
- package/dist/components/Loader.js +5 -48
- 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 +7 -51
- package/dist/components/MaterialUI/DataDisplay/Divider.js +0 -30
- package/dist/components/MaterialUI/DataDisplay/Icon.js +2 -28
- package/dist/components/MaterialUI/DataDisplay/List.js +16 -55
- package/dist/components/MaterialUI/DataDisplay/Modal.js +4 -37
- package/dist/components/MaterialUI/DataDisplay/Notification.js +17 -69
- package/dist/components/MaterialUI/DataDisplay/NotificationProps.js +3 -34
- package/dist/components/MaterialUI/DataDisplay/PopperedElements/PopperedIcon.js +0 -22
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/ActionModal.js +5 -37
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Address.js +1 -33
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/ConfirmationModal.js +7 -28
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/DiscountedPrice.js +2 -32
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.js +17 -57
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Placeholder.js +4 -33
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/SectionTitle.js +0 -25
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.js +14 -60
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/TableInfoBar.js +0 -29
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Translations.js +15 -59
- package/dist/components/MaterialUI/DataDisplay/SelectionList.js +23 -70
- package/dist/components/MaterialUI/DataDisplay/Table.js +34 -123
- package/dist/components/MaterialUI/DataDisplay/TableHeaderCell.js +0 -35
- package/dist/components/MaterialUI/DataDisplay/TableProps.js +3 -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 +7 -46
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/TooltippedIcon.js +3 -29
- package/dist/components/MaterialUI/DataDisplay/TooltippedElements/TooltippedTypography.js +0 -21
- package/dist/components/MaterialUI/DataDisplay/TransferList.js +32 -97
- package/dist/components/MaterialUI/DataDisplay/chipProps.js +3 -38
- package/dist/components/MaterialUI/DataDisplay/collapsableListProps.js +3 -37
- package/dist/components/MaterialUI/DataDisplay/dividerProps.js +3 -41
- package/dist/components/MaterialUI/DataDisplay/index.js +0 -33
- package/dist/components/MaterialUI/DataDisplay/modalProps.js +3 -36
- package/dist/components/MaterialUI/DataDisplay/tableHelpers.js +5 -68
- package/dist/components/MaterialUI/DataDisplay/useTableSelection.js +11 -48
- package/dist/components/MaterialUI/Feedback/NotificationContext.js +5 -40
- package/dist/components/MaterialUI/Feedback/loadingScreen.js +5 -44
- package/dist/components/MaterialUI/Feedback/useNotification.js +0 -21
- package/dist/components/MaterialUI/Inputs/Autocomplete.js +5 -44
- package/dist/components/MaterialUI/Inputs/AutocompleteProps.js +3 -37
- package/dist/components/MaterialUI/Inputs/Checkbox.js +3 -40
- package/dist/components/MaterialUI/Inputs/CheckboxGroup.js +3 -43
- package/dist/components/MaterialUI/Inputs/CheckboxGroupProps.js +3 -38
- package/dist/components/MaterialUI/Inputs/CheckboxProps.js +3 -39
- package/dist/components/MaterialUI/Inputs/DatePicker.js +18 -57
- package/dist/components/MaterialUI/Inputs/InputBase.js +7 -56
- package/dist/components/MaterialUI/Inputs/InputBaseProps.js +3 -51
- package/dist/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +12 -65
- 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 +3 -41
- package/dist/components/MaterialUI/Inputs/Select.js +10 -72
- package/dist/components/MaterialUI/Inputs/SelectProps.js +3 -46
- package/dist/components/MaterialUI/Inputs/StandaloneRadio.js +3 -35
- package/dist/components/MaterialUI/Inputs/Switch.js +4 -38
- package/dist/components/MaterialUI/Inputs/SwitchProps.js +3 -40
- package/dist/components/MaterialUI/Inputs/TimePicker.js +14 -91
- package/dist/components/MaterialUI/Inputs/createInput.js +5 -30
- package/dist/components/MaterialUI/Inputs/index.js +0 -35
- package/dist/components/MaterialUI/Inputs/standaloneRadioProps.js +3 -41
- package/dist/components/MaterialUI/Navigation/DropDownMenu.js +12 -56
- package/dist/components/MaterialUI/Navigation/DropDownMenuProps.js +3 -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 +22 -103
- package/dist/components/MaterialUI/Navigation/TabLabel.js +7 -41
- package/dist/components/MaterialUI/ScopeSelector/ScopeSelector.js +7 -42
- package/dist/components/MaterialUI/ScopeSelector/ScopeTreeView.js +22 -62
- package/dist/components/MaterialUI/ScopeSelector/TreeItem.js +16 -68
- package/dist/components/MaterialUI/Surfaces/ExpansionPanel.js +15 -55
- 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 +19 -62
- package/dist/components/MaterialUI/Surfaces/expansionPanelProps.js +3 -55
- package/dist/components/MaterialUI/Surfaces/paperProps.js +3 -36
- package/dist/components/MaterialUI/componentProps.js +3 -29
- package/dist/components/MaterialUI/hocs/withDeferredPopper.js +10 -59
- package/dist/components/MaterialUI/hocs/withDeferredTooltip.js +8 -44
- package/dist/components/MaterialUI/muiThemes.js +5 -57
- package/dist/components/MaterialUI/textProps.js +3 -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 +8 -44
- package/dist/components/Modules.js +21 -93
- package/dist/components/MultiSelector.js +21 -74
- package/dist/components/Navigation/Bar.js +29 -90
- package/dist/components/Navigation/Tab.js +22 -74
- package/dist/components/Navigation/index.js +2 -21
- package/dist/components/Navigation/useNavigationState.js +90 -173
- package/dist/components/Placeholder.js +5 -43
- package/dist/components/Provision.js +4 -36
- package/dist/components/Routing/FullPage.js +14 -37
- package/dist/components/Routing/Page.js +14 -51
- package/dist/components/Routing/Segment.js +5 -30
- package/dist/components/Routing/SegmentPage.js +26 -106
- package/dist/components/Routing/SubPage.js +22 -59
- package/dist/components/Routing/withWaypointing.js +5 -36
- package/dist/components/Scope/ScopeModificationConfirmationDialog.js +3 -30
- package/dist/components/Scope/ScopeNode.js +8 -49
- package/dist/components/Scope/Selector.js +8 -44
- package/dist/components/Scope/index.js +29 -96
- package/dist/components/Scope/useScopeConfirmationModalState.js +33 -100
- package/dist/components/Scope/useScopeData.js +0 -25
- package/dist/components/Scope/useScopeSelect.js +0 -26
- package/dist/components/Selector.js +15 -76
- package/dist/components/Sidepanel.js +0 -28
- package/dist/components/Spritesheet.js +0 -26
- package/dist/components/Switch.js +11 -51
- package/dist/components/TaskDetailsModal.js +193 -0
- package/dist/components/Text.js +6 -50
- package/dist/components/ToastList.js +5 -45
- package/dist/components/Toolbar.js +16 -74
- package/dist/components/Tooltip.js +0 -24
- package/dist/components/Treeview/Branch.js +0 -25
- package/dist/components/Treeview/Label.js +0 -29
- package/dist/components/Treeview/Leaf.js +0 -21
- package/dist/components/Treeview/Node.js +17 -55
- package/dist/components/Treeview/index.js +25 -66
- package/dist/components/Treeview/settings.js +0 -17
- package/dist/constants.js +21 -19
- package/dist/content/iconsSheet.svg +22 -0
- package/dist/content/orckestra-logo-white.png +0 -0
- package/dist/getTheme.js +0 -29
- package/dist/getThemeOverrides.js +3 -22
- package/dist/hocs/routingConnector.js +0 -21
- package/dist/hocs/withAuthentication.js +4 -26
- package/dist/hocs/withClickOutside.js +2 -28
- package/dist/hocs/withErrorBoundary.js +2 -37
- package/dist/hocs/withId.js +1 -30
- package/dist/hocs/withInfiniteScroll.js +15 -32
- package/dist/hocs/withInitialLoad.js +0 -20
- package/dist/hocs/withLocaleSwitch.js +0 -19
- package/dist/hocs/withNavigationLink.js +5 -32
- package/dist/hocs/withRequestActivity.js +0 -21
- package/dist/hocs/withScopeData.js +6 -33
- package/dist/hocs/withScrollBox.js +2 -31
- package/dist/hocs/withToggle.js +9 -37
- package/dist/hocs/withUpdateHandler.js +3 -23
- package/dist/hocs/withViewState.js +5 -32
- package/dist/hooks/useDispatchWithModulesData.js +0 -26
- package/dist/hooks/useEditState.js +10 -105
- package/dist/hooks/useEntityLoader.js +18 -67
- package/dist/hooks/useFullEntityEditState.js +9 -56
- package/dist/hooks/useInfiniteScroll.js +5 -33
- package/dist/hooks/useLabelMessage.js +3 -42
- package/dist/hooks/useLoader.js +0 -27
- package/dist/hooks/useMultipleFieldEditState.js +3 -40
- package/dist/hooks/useNavigationHandler.js +3 -28
- package/dist/hooks/useNotificationRequestState.js +17 -47
- 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 +5 -35
- 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 +6 -37
- package/dist/reducers/countries.js +0 -25
- package/dist/reducers/localeFactory.js +0 -30
- package/dist/reducers/metadata.js +3 -63
- package/dist/reducers/modules.js +0 -36
- package/dist/reducers/navigation.js +8 -47
- package/dist/reducers/request.js +4 -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/tasks.js +99 -0
- 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 +17 -41
- package/dist/selectors/countries.js +0 -22
- package/dist/selectors/locale.js +1 -29
- package/dist/selectors/metadata.js +4 -45
- package/dist/selectors/modules.js +3 -22
- 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/tasks.js +66 -0
- 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 +17 -18
- package/dist/spawnerMiddleware.js +0 -24
- package/dist/utils/buildUrl.js +7 -38
- 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 +7 -38
- 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 +3 -42
- package/dist/utils/normalizeForSearch.js +2 -19
- package/dist/utils/objectHelper.js +2 -24
- package/dist/utils/parseHelper.js +0 -32
- package/dist/utils/profilerHelper.js +0 -18
- package/dist/utils/propertyHelper.js +36 -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 +1 -28
- package/dist/utils/setTranslationWithFallback.js +1 -33
- package/dist/utils/stripKey.js +1 -23
- package/dist/utils/styledPropFuncs.js +3 -29
- package/dist/utils/testUtils.js +14 -91
- package/dist/utils/timezoneHelper.js +8 -46
- package/dist/utils/unwrapImmutable.js +0 -19
- package/dist/utils/urlHelper.js +3 -28
- package/dist/whyDidYouRerender.js +0 -5
- package/package.json +3 -3
- package/src/actions/tasks.js +77 -0
- package/src/actions/tasks.test.js +169 -0
- package/src/buildStore.js +2 -0
- package/src/components/AppFrame/About.test.js +3 -3
- package/src/components/AppFrame/Sidebar.js +4 -3
- package/src/components/Routing/SubPage.js +17 -2
- package/src/components/Routing/SubPage.test.js +168 -1
- package/src/components/TaskDetailsModal.js +132 -0
- package/src/components/TaskDetailsModal.test.js +317 -0
- package/src/components/Text.test.js +44 -59
- package/src/constants.js +15 -0
- package/src/content/iconsSheet.svg +22 -0
- package/src/content/orckestra-logo-white.png +0 -0
- package/src/hooks/useEditState.js +12 -2
- package/src/hooks/useEditState.test.js +1 -1
- package/src/hooks/useLabelMessage.test.js +16 -10
- package/src/reducers/request.js +4 -0
- package/src/reducers/request.test.js +11 -0
- package/src/reducers/tasks.js +56 -0
- package/src/reducers/tasks.test.js +404 -0
- package/src/selectors/authentication.js +13 -0
- package/src/selectors/authentication.test.js +322 -0
- package/src/selectors/tasks.js +16 -0
- package/src/selectors/tasks.test.js +60 -0
- package/src/sharedMessages.js +17 -1
- package/src/translations/en-US.json +16 -12
- package/src/translations/fr-CA.json +16 -12
- package/src/utils/propertyHelper.js +38 -0
- package/src/utils/propertyHelper.test.js +160 -0
- package/src/utils/timezoneHelper.test.js +4 -2
|
@@ -2,47 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.useAuthenticationData = exports.default = exports.Wrapper = exports.Loader = exports.Error = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
|
|
10
7
|
var _utils = require("../utils");
|
|
11
|
-
|
|
12
8
|
var _Placeholder = _interopRequireDefault(require("../components/Placeholder"));
|
|
13
|
-
|
|
14
9
|
var _reactRedux = require("react-redux");
|
|
15
|
-
|
|
16
10
|
var _authentication = require("../actions/authentication");
|
|
17
|
-
|
|
18
11
|
var _request = require("../reducers/request");
|
|
19
|
-
|
|
20
12
|
var _ApplicationModuleLoader = _interopRequireDefault(require("./ApplicationModuleLoader"));
|
|
21
|
-
|
|
22
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
-
|
|
28
16
|
(function () {
|
|
29
17
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
30
18
|
enterModule && enterModule(module);
|
|
31
19
|
})();
|
|
32
|
-
|
|
33
20
|
(function () {
|
|
34
21
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
35
22
|
enterModule && enterModule(module);
|
|
36
23
|
})();
|
|
37
|
-
|
|
38
24
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
39
25
|
return a;
|
|
40
26
|
};
|
|
41
|
-
|
|
42
27
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
43
28
|
return a;
|
|
44
29
|
};
|
|
45
|
-
|
|
46
30
|
var useAuthenticationData = function useAuthenticationData() {
|
|
47
31
|
return {
|
|
48
32
|
loading: (0, _reactRedux.useSelector)(function (state) {
|
|
@@ -59,22 +43,17 @@ var useAuthenticationData = function useAuthenticationData() {
|
|
|
59
43
|
})
|
|
60
44
|
};
|
|
61
45
|
};
|
|
62
|
-
|
|
63
46
|
exports.useAuthenticationData = useAuthenticationData;
|
|
64
|
-
|
|
65
47
|
__signature__(useAuthenticationData, "useSelector{}\nuseSelector{}\nuseSelector{}\nuseSelector{}", function () {
|
|
66
48
|
return [_reactRedux.useSelector, _reactRedux.useSelector, _reactRedux.useSelector, _reactRedux.useSelector];
|
|
67
49
|
});
|
|
68
|
-
|
|
69
50
|
__signature__(useAuthenticationData, "useSelector{}\nuseSelector{}\nuseSelector{}\nuseSelector{}", function () {
|
|
70
51
|
return [_reactRedux.useSelector, _reactRedux.useSelector, _reactRedux.useSelector, _reactRedux.useSelector];
|
|
71
52
|
});
|
|
72
|
-
|
|
73
53
|
var Wrapper = _styledComponents.default.div.withConfig({
|
|
74
54
|
displayName: "Authenticate__Wrapper",
|
|
75
55
|
componentId: "sc-cw6rn1-0"
|
|
76
56
|
})(["display:flex;width:60%;height:100%;padding:0 20vw;flex-direction:column;justify-content:center;"]);
|
|
77
|
-
|
|
78
57
|
exports.Wrapper = Wrapper;
|
|
79
58
|
var Loader = (0, _styledComponents.withTheme)(function (props) {
|
|
80
59
|
return /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(_Placeholder.default, {
|
|
@@ -83,33 +62,25 @@ var Loader = (0, _styledComponents.withTheme)(function (props) {
|
|
|
83
62
|
}));
|
|
84
63
|
});
|
|
85
64
|
exports.Loader = Loader;
|
|
86
|
-
|
|
87
65
|
var Error = function Error(_ref) {
|
|
88
66
|
var requestError = _ref.requestError,
|
|
89
|
-
|
|
90
|
-
|
|
67
|
+
needLogin = _ref.needLogin;
|
|
91
68
|
if (needLogin) {
|
|
92
69
|
return /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement("h1", null, "Not logged in"));
|
|
93
70
|
}
|
|
94
|
-
|
|
95
71
|
return /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement("h1", null, (0, _utils.safeGet)(requestError, "payload", "message") || "An error occurred"), "Last failing action: ", /*#__PURE__*/_react.default.createElement("pre", null, JSON.stringify(requestError, null, 2)));
|
|
96
72
|
};
|
|
97
|
-
|
|
98
73
|
exports.Error = Error;
|
|
99
|
-
|
|
100
74
|
var Authenticate = function Authenticate(_ref2) {
|
|
101
75
|
var children = _ref2.children;
|
|
102
|
-
|
|
103
76
|
var _useAuthenticationDat = useAuthenticationData(),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
77
|
+
loading = _useAuthenticationDat.loading,
|
|
78
|
+
authedUser = _useAuthenticationDat.authedUser,
|
|
79
|
+
requestError = _useAuthenticationDat.requestError,
|
|
80
|
+
needLogin = _useAuthenticationDat.needLogin;
|
|
109
81
|
if (loading) {
|
|
110
82
|
return /*#__PURE__*/_react.default.createElement(Loader, null);
|
|
111
83
|
}
|
|
112
|
-
|
|
113
84
|
if (!authedUser) {
|
|
114
85
|
return /*#__PURE__*/_react.default.createElement(Error, {
|
|
115
86
|
requestError: requestError,
|
|
@@ -121,28 +92,22 @@ var Authenticate = function Authenticate(_ref2) {
|
|
|
121
92
|
});
|
|
122
93
|
}
|
|
123
94
|
};
|
|
124
|
-
|
|
125
95
|
__signature__(Authenticate, "useAuthenticationData{{ loading, authedUser, requestError, needLogin }}", function () {
|
|
126
96
|
return [useAuthenticationData];
|
|
127
97
|
});
|
|
128
|
-
|
|
129
98
|
__signature__(Authenticate, "useAuthenticationData{{ loading, authedUser, requestError, needLogin }}", function () {
|
|
130
99
|
return [useAuthenticationData];
|
|
131
100
|
});
|
|
132
|
-
|
|
133
101
|
var _default = Authenticate;
|
|
134
102
|
var _default2 = _default;
|
|
135
103
|
var _default3 = _default2;
|
|
136
104
|
exports.default = _default3;
|
|
137
105
|
;
|
|
138
|
-
|
|
139
106
|
(function () {
|
|
140
107
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
141
|
-
|
|
142
108
|
if (!reactHotLoader) {
|
|
143
109
|
return;
|
|
144
110
|
}
|
|
145
|
-
|
|
146
111
|
reactHotLoader.register(useAuthenticationData, "useAuthenticationData", "/home/vsts/work/1/s/src/components/Authenticate.js");
|
|
147
112
|
reactHotLoader.register(Wrapper, "Wrapper", "/home/vsts/work/1/s/src/components/Authenticate.js");
|
|
148
113
|
reactHotLoader.register(Loader, "Loader", "/home/vsts/work/1/s/src/components/Authenticate.js");
|
|
@@ -150,23 +115,17 @@ exports.default = _default3;
|
|
|
150
115
|
reactHotLoader.register(Authenticate, "Authenticate", "/home/vsts/work/1/s/src/components/Authenticate.js");
|
|
151
116
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Authenticate.js");
|
|
152
117
|
})();
|
|
153
|
-
|
|
154
118
|
;
|
|
155
|
-
|
|
156
119
|
(function () {
|
|
157
120
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
158
121
|
leaveModule && leaveModule(module);
|
|
159
122
|
})();
|
|
160
|
-
|
|
161
123
|
;
|
|
162
|
-
|
|
163
124
|
(function () {
|
|
164
125
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
165
|
-
|
|
166
126
|
if (!reactHotLoader) {
|
|
167
127
|
return;
|
|
168
128
|
}
|
|
169
|
-
|
|
170
129
|
reactHotLoader.register(useAuthenticationData, "useAuthenticationData", "/home/vsts/work/1/s/src/components/Authenticate.js");
|
|
171
130
|
reactHotLoader.register(Wrapper, "Wrapper", "/home/vsts/work/1/s/src/components/Authenticate.js");
|
|
172
131
|
reactHotLoader.register(Loader, "Loader", "/home/vsts/work/1/s/src/components/Authenticate.js");
|
|
@@ -174,9 +133,7 @@ exports.default = _default3;
|
|
|
174
133
|
reactHotLoader.register(Authenticate, "Authenticate", "/home/vsts/work/1/s/src/components/Authenticate.js");
|
|
175
134
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Authenticate.js");
|
|
176
135
|
})();
|
|
177
|
-
|
|
178
136
|
;
|
|
179
|
-
|
|
180
137
|
(function () {
|
|
181
138
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
182
139
|
leaveModule && leaveModule(module);
|
|
@@ -2,93 +2,69 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
-
|
|
6
5
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
7
|
-
|
|
8
6
|
var _utils = require("../utils");
|
|
9
|
-
|
|
10
7
|
var _polished = require("polished");
|
|
11
|
-
|
|
12
8
|
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); }
|
|
13
|
-
|
|
14
9
|
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; }
|
|
15
|
-
|
|
16
10
|
(function () {
|
|
17
11
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
18
12
|
enterModule && enterModule(module);
|
|
19
13
|
})();
|
|
20
|
-
|
|
21
14
|
(function () {
|
|
22
15
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
23
16
|
enterModule && enterModule(module);
|
|
24
17
|
})();
|
|
25
|
-
|
|
26
18
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
27
19
|
return a;
|
|
28
20
|
};
|
|
29
|
-
|
|
30
21
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
31
22
|
return a;
|
|
32
23
|
};
|
|
33
|
-
|
|
34
24
|
var borderColor = function borderColor(base) {
|
|
35
25
|
return (0, _utils.ifFlag)("primary", (0, _utils.getThemeProp)(["colors", "application", "base"], base), base);
|
|
36
26
|
};
|
|
37
|
-
|
|
38
27
|
var background = (0, _utils.ifFlag)("primary", (0, _utils.ifFlag)("active", (0, _styledComponents.css)(["color:#fff;background-image:linear-gradient( ", ",", " );&:enabled:active{background-image:none;background-color:#fff;color:", ";}"], (0, _utils.getThemeProp)(["colors", "application", "base"], "#333", function (color) {
|
|
39
28
|
return (0, _polished.tint)(0.05, color);
|
|
40
29
|
}), (0, _utils.getThemeProp)(["colors", "application", "base"], "#333"), (0, _utils.getThemeProp)(["colors", "application", "base"], "#333")), (0, _styledComponents.css)(["color:", ";background-image:none;background-color:#fff;&:enabled:active{color:#fff;background-image:linear-gradient( ", ",", " );}"], (0, _utils.getThemeProp)(["colors", "application", "base"], "#333"), (0, _utils.getThemeProp)(["colors", "application", "base"], "#333", function (color) {
|
|
41
30
|
return (0, _polished.tint)(0.05, color);
|
|
42
31
|
}), (0, _utils.getThemeProp)(["colors", "application", "base"], "#333"))), (0, _utils.ifFlag)("active", (0, _styledComponents.css)(["background-image:none;background-color:", ";&:enabled:active{background-color:#f7f7f7;}"], (0, _utils.getThemeProp)(["colors", "bgLight"], "#efefef")), (0, _styledComponents.css)(["background-image:none;background-color:#f7f7f7;&:enabled:active{background-color:", ";}"], (0, _utils.getThemeProp)(["colors", "bgLight"], "#efefef"))));
|
|
43
|
-
|
|
44
32
|
var Button = _styledComponents.default.button.withConfig({
|
|
45
33
|
displayName: "Button",
|
|
46
34
|
componentId: "sc-1rffh1n-0"
|
|
47
35
|
})(["display:inline-block;margin:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;white-space:nowrap;padding:6px 10px;font-size:13px;line-height:1.42857;border-radius:4px;user-select:none;height:30px;border:1px solid ", ";outline:none;font-family:", ";text-transform:uppercase;min-width:50px;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);", ";&:enabled:active,&:enabled:focus,&:enabled:hover{border-color:", ";box-shadow:0 0 4px #4fa1f0;outline:none;}&:disabled{opacity:0.6;cursor:default;}"], borderColor((0, _utils.getThemeProp)(["colors", "borderLight"], "#cccccc")), (0, _utils.getThemeProp)(["fonts", "header"], "sans-serif"), background, borderColor("#4fa1f0"));
|
|
48
|
-
|
|
49
36
|
var _default = Button;
|
|
50
37
|
var _default2 = _default;
|
|
51
38
|
var _default3 = _default2;
|
|
52
39
|
exports.default = _default3;
|
|
53
40
|
;
|
|
54
|
-
|
|
55
41
|
(function () {
|
|
56
42
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
57
|
-
|
|
58
43
|
if (!reactHotLoader) {
|
|
59
44
|
return;
|
|
60
45
|
}
|
|
61
|
-
|
|
62
46
|
reactHotLoader.register(borderColor, "borderColor", "/home/vsts/work/1/s/src/components/Button.js");
|
|
63
47
|
reactHotLoader.register(background, "background", "/home/vsts/work/1/s/src/components/Button.js");
|
|
64
48
|
reactHotLoader.register(Button, "Button", "/home/vsts/work/1/s/src/components/Button.js");
|
|
65
49
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Button.js");
|
|
66
50
|
})();
|
|
67
|
-
|
|
68
51
|
;
|
|
69
|
-
|
|
70
52
|
(function () {
|
|
71
53
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
72
54
|
leaveModule && leaveModule(module);
|
|
73
55
|
})();
|
|
74
|
-
|
|
75
56
|
;
|
|
76
|
-
|
|
77
57
|
(function () {
|
|
78
58
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
79
|
-
|
|
80
59
|
if (!reactHotLoader) {
|
|
81
60
|
return;
|
|
82
61
|
}
|
|
83
|
-
|
|
84
62
|
reactHotLoader.register(borderColor, "borderColor", "/home/vsts/work/1/s/src/components/Button.js");
|
|
85
63
|
reactHotLoader.register(background, "background", "/home/vsts/work/1/s/src/components/Button.js");
|
|
86
64
|
reactHotLoader.register(Button, "Button", "/home/vsts/work/1/s/src/components/Button.js");
|
|
87
65
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Button.js");
|
|
88
66
|
})();
|
|
89
|
-
|
|
90
67
|
;
|
|
91
|
-
|
|
92
68
|
(function () {
|
|
93
69
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
94
70
|
leaveModule && leaveModule(module);
|
|
@@ -2,81 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = exports.CategoryRow = exports.CategoryList = exports.CategoryIndicator = exports.CategoryHeader = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
|
|
10
7
|
var _recompose = require("recompose");
|
|
11
|
-
|
|
12
8
|
var _utils = require("../utils");
|
|
13
|
-
|
|
14
9
|
var _withScrollBox = _interopRequireDefault(require("../hocs/withScrollBox"));
|
|
15
|
-
|
|
16
10
|
var _useViewState3 = _interopRequireDefault(require("../hooks/useViewState"));
|
|
17
|
-
|
|
18
11
|
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
19
|
-
|
|
20
12
|
var _Row = _interopRequireDefault(require("./List/Row"));
|
|
21
|
-
|
|
22
13
|
var _HeadRow = _interopRequireDefault(require("./List/HeadRow"));
|
|
23
|
-
|
|
24
14
|
var _List = require("./List/List");
|
|
25
|
-
|
|
26
15
|
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); }
|
|
27
|
-
|
|
28
16
|
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; }
|
|
29
|
-
|
|
30
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
18
|
(function () {
|
|
33
19
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
34
20
|
enterModule && enterModule(module);
|
|
35
21
|
})();
|
|
36
|
-
|
|
37
22
|
(function () {
|
|
38
23
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
39
24
|
enterModule && enterModule(module);
|
|
40
25
|
})();
|
|
41
|
-
|
|
42
26
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
-
|
|
44
27
|
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."); }
|
|
45
|
-
|
|
46
28
|
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); }
|
|
47
|
-
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
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; }
|
|
51
|
-
|
|
29
|
+
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; }
|
|
30
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
52
31
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
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 arrayToggle = function arrayToggle(array, item) {
|
|
63
39
|
return array.includes(item) ? array.filter(function (x) {
|
|
64
40
|
return x !== item;
|
|
65
41
|
}) : array.concat(item);
|
|
66
42
|
};
|
|
67
|
-
|
|
68
43
|
var CategoryRow = _styledComponents.default.tr.withConfig({
|
|
69
44
|
displayName: "CategoryList__CategoryRow",
|
|
70
45
|
componentId: "sc-rh0l6t-0"
|
|
71
46
|
})([""]);
|
|
72
|
-
|
|
73
47
|
exports.CategoryRow = CategoryRow;
|
|
74
|
-
|
|
75
48
|
var CategoryHeader = _styledComponents.default.td.withConfig({
|
|
76
49
|
displayName: "CategoryList__CategoryHeader",
|
|
77
50
|
componentId: "sc-rh0l6t-1"
|
|
78
51
|
})(["border:0 solid ", ";border-top-width:1px;tr:first-child &{border-top-width:0;}tr:last-child &{border-bottom-width:1px;}position:relative;padding:11px 45px;background-color:#f1eae0;", " cursor:pointer;"], (0, _utils.getThemeProp)(["colors", "borderLight"], "#cccccc"), (0, _utils.ifFlag)("closed", (0, _styledComponents.css)(["border-bottom:1px solid ", ";"], (0, _utils.getThemeProp)(["colors", "borderLight"], "#cccccc"))));
|
|
79
|
-
|
|
80
52
|
exports.CategoryHeader = CategoryHeader;
|
|
81
53
|
var CategoryIndicator = (0, _styledComponents.default)(_Icon.default).attrs(function (props) {
|
|
82
54
|
return {
|
|
@@ -87,49 +59,42 @@ var CategoryIndicator = (0, _styledComponents.default)(_Icon.default).attrs(func
|
|
|
87
59
|
componentId: "sc-rh0l6t-2"
|
|
88
60
|
})(["font-size:12px;position:absolute;left:22px;top:15px;"]);
|
|
89
61
|
exports.CategoryIndicator = CategoryIndicator;
|
|
90
|
-
|
|
91
62
|
var CategoryList = function CategoryList(_ref) {
|
|
92
63
|
var name = _ref.name,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
64
|
+
_ref$columnDefs = _ref.columnDefs,
|
|
65
|
+
columnDefs = _ref$columnDefs === void 0 ? [] : _ref$columnDefs,
|
|
66
|
+
_ref$rows = _ref.rows,
|
|
67
|
+
rows = _ref$rows === void 0 ? [] : _ref$rows,
|
|
68
|
+
rowOnClick = _ref.rowOnClick,
|
|
69
|
+
placeholder = _ref.placeholder,
|
|
70
|
+
_ref$keyField = _ref.keyField,
|
|
71
|
+
keyField = _ref$keyField === void 0 ? ["id"] : _ref$keyField,
|
|
72
|
+
_ref$categoryField = _ref.categoryField,
|
|
73
|
+
categoryField = _ref$categoryField === void 0 ? ["category"] : _ref$categoryField,
|
|
74
|
+
_ref$openAll = _ref.openAll,
|
|
75
|
+
openAll = _ref$openAll === void 0 ? false : _ref$openAll,
|
|
76
|
+
height = _ref.height,
|
|
77
|
+
_ref$rowBackgroundGet = _ref.rowBackgroundGetter,
|
|
78
|
+
rowBackgroundGetter = _ref$rowBackgroundGet === void 0 ? function () {} : _ref$rowBackgroundGet;
|
|
109
79
|
var _useListState = (0, _List.useListState)(name, columnDefs),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
80
|
+
_useListState2 = _slicedToArray(_useListState, 2),
|
|
81
|
+
enhancedColumnDefs = _useListState2[0],
|
|
82
|
+
selection = _useListState2[1];
|
|
114
83
|
var _useViewState = (0, _useViewState3.default)(name),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
84
|
+
_useViewState2 = _slicedToArray(_useViewState, 2),
|
|
85
|
+
_useViewState2$0$clos = _useViewState2[0].closedCategories,
|
|
86
|
+
closedCategories = _useViewState2$0$clos === void 0 ? [] : _useViewState2$0$clos,
|
|
87
|
+
updateViewState = _useViewState2[1];
|
|
120
88
|
if (columnDefs.length === 0) return null;
|
|
121
89
|
var rowIds = [],
|
|
122
|
-
|
|
90
|
+
rowCategories = {};
|
|
123
91
|
rows.forEach(function (row, index) {
|
|
124
92
|
var id = _utils.safeGet.apply(void 0, [row].concat(keyField)) + ""; // Ensure rowId is string
|
|
125
|
-
|
|
126
93
|
var category = _utils.safeGet.apply(void 0, [row].concat(categoryField)) || "";
|
|
127
94
|
rowIds.push(id);
|
|
128
|
-
|
|
129
95
|
if (!rowCategories[category]) {
|
|
130
96
|
rowCategories[category] = [];
|
|
131
97
|
}
|
|
132
|
-
|
|
133
98
|
rowCategories[category].push( /*#__PURE__*/_react.default.createElement(_Row.default, {
|
|
134
99
|
columnDefs: enhancedColumnDefs,
|
|
135
100
|
key: id,
|
|
@@ -141,7 +106,6 @@ var CategoryList = function CategoryList(_ref) {
|
|
|
141
106
|
}));
|
|
142
107
|
});
|
|
143
108
|
var rowElements = [];
|
|
144
|
-
|
|
145
109
|
if (Object.keys(rowCategories).length === 0) {
|
|
146
110
|
if (placeholder) {
|
|
147
111
|
rowElements.push( /*#__PURE__*/_react.default.createElement(_List.Placeholder, {
|
|
@@ -153,13 +117,11 @@ var CategoryList = function CategoryList(_ref) {
|
|
|
153
117
|
} else {
|
|
154
118
|
Object.entries(rowCategories).forEach(function (_ref2) {
|
|
155
119
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
120
|
+
key = _ref3[0],
|
|
121
|
+
rows = _ref3[1];
|
|
159
122
|
var clickHandler = function clickHandler() {
|
|
160
123
|
return updateViewState("closedCategories", arrayToggle(closedCategories, key));
|
|
161
124
|
};
|
|
162
|
-
|
|
163
125
|
var closed = !openAll && closedCategories.includes(key);
|
|
164
126
|
rowElements.push( /*#__PURE__*/_react.default.createElement(CategoryRow, {
|
|
165
127
|
key: "category_" + key
|
|
@@ -171,44 +133,35 @@ var CategoryList = function CategoryList(_ref) {
|
|
|
171
133
|
}, /*#__PURE__*/_react.default.createElement(CategoryIndicator, {
|
|
172
134
|
closed: closed
|
|
173
135
|
}), key)));
|
|
174
|
-
|
|
175
136
|
if (!closed) {
|
|
176
137
|
rowElements.push.apply(rowElements, rows);
|
|
177
138
|
}
|
|
178
139
|
});
|
|
179
140
|
}
|
|
180
|
-
|
|
181
141
|
return /*#__PURE__*/_react.default.createElement(_List.Table, null, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement(_HeadRow.default, {
|
|
182
142
|
columnDefs: enhancedColumnDefs,
|
|
183
143
|
rowIds: rowIds,
|
|
184
144
|
allSelected: rows.length === selection.length && rows.length !== 0
|
|
185
145
|
})), /*#__PURE__*/_react.default.createElement("tbody", null, rowElements));
|
|
186
146
|
};
|
|
187
|
-
|
|
188
147
|
exports.CategoryList = CategoryList;
|
|
189
|
-
|
|
190
148
|
__signature__(CategoryList, "useListState{[enhancedColumnDefs, selection]}\nuseViewState{[{ closedCategories = [] }, updateViewState]}", function () {
|
|
191
149
|
return [_List.useListState, _useViewState3.default];
|
|
192
150
|
});
|
|
193
|
-
|
|
194
151
|
__signature__(CategoryList, "useListState{[enhancedColumnDefs, selection]}\nuseViewState{[{ closedCategories = [] }, updateViewState]}", function () {
|
|
195
152
|
return [_List.useListState, _useViewState3.default];
|
|
196
153
|
});
|
|
197
|
-
|
|
198
154
|
var StatefulCategoryList = (0, _recompose.compose)((0, _recompose.setDisplayName)("CategoryList"), _withScrollBox.default)(CategoryList);
|
|
199
155
|
var _default = StatefulCategoryList;
|
|
200
156
|
var _default2 = _default;
|
|
201
157
|
var _default3 = _default2;
|
|
202
158
|
exports.default = _default3;
|
|
203
159
|
;
|
|
204
|
-
|
|
205
160
|
(function () {
|
|
206
161
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
207
|
-
|
|
208
162
|
if (!reactHotLoader) {
|
|
209
163
|
return;
|
|
210
164
|
}
|
|
211
|
-
|
|
212
165
|
reactHotLoader.register(arrayToggle, "arrayToggle", "/home/vsts/work/1/s/src/components/CategoryList.js");
|
|
213
166
|
reactHotLoader.register(CategoryRow, "CategoryRow", "/home/vsts/work/1/s/src/components/CategoryList.js");
|
|
214
167
|
reactHotLoader.register(CategoryHeader, "CategoryHeader", "/home/vsts/work/1/s/src/components/CategoryList.js");
|
|
@@ -217,23 +170,17 @@ exports.default = _default3;
|
|
|
217
170
|
reactHotLoader.register(StatefulCategoryList, "StatefulCategoryList", "/home/vsts/work/1/s/src/components/CategoryList.js");
|
|
218
171
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/CategoryList.js");
|
|
219
172
|
})();
|
|
220
|
-
|
|
221
173
|
;
|
|
222
|
-
|
|
223
174
|
(function () {
|
|
224
175
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
225
176
|
leaveModule && leaveModule(module);
|
|
226
177
|
})();
|
|
227
|
-
|
|
228
178
|
;
|
|
229
|
-
|
|
230
179
|
(function () {
|
|
231
180
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
232
|
-
|
|
233
181
|
if (!reactHotLoader) {
|
|
234
182
|
return;
|
|
235
183
|
}
|
|
236
|
-
|
|
237
184
|
reactHotLoader.register(arrayToggle, "arrayToggle", "/home/vsts/work/1/s/src/components/CategoryList.js");
|
|
238
185
|
reactHotLoader.register(CategoryRow, "CategoryRow", "/home/vsts/work/1/s/src/components/CategoryList.js");
|
|
239
186
|
reactHotLoader.register(CategoryHeader, "CategoryHeader", "/home/vsts/work/1/s/src/components/CategoryList.js");
|
|
@@ -242,9 +189,7 @@ exports.default = _default3;
|
|
|
242
189
|
reactHotLoader.register(StatefulCategoryList, "StatefulCategoryList", "/home/vsts/work/1/s/src/components/CategoryList.js");
|
|
243
190
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/CategoryList.js");
|
|
244
191
|
})();
|
|
245
|
-
|
|
246
192
|
;
|
|
247
|
-
|
|
248
193
|
(function () {
|
|
249
194
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
250
195
|
leaveModule && leaveModule(module);
|