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,100 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = exports.UpMark = exports.TableHeader = exports.SortMark = exports.MarkBox = exports.HeadBox = exports.DownMark = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
-
|
|
10
7
|
var _Text = _interopRequireDefault(require("../Text"));
|
|
11
|
-
|
|
12
8
|
var _Checkbox = _interopRequireDefault(require("../Checkbox"));
|
|
13
|
-
|
|
14
9
|
var _utils = require("../../utils");
|
|
15
|
-
|
|
16
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
|
|
18
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
13
|
(function () {
|
|
23
14
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
24
15
|
enterModule && enterModule(module);
|
|
25
16
|
})();
|
|
26
|
-
|
|
27
17
|
(function () {
|
|
28
18
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
29
19
|
enterModule && enterModule(module);
|
|
30
20
|
})();
|
|
31
|
-
|
|
32
21
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
33
22
|
return a;
|
|
34
23
|
};
|
|
35
|
-
|
|
36
24
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
37
25
|
return a;
|
|
38
26
|
};
|
|
39
|
-
|
|
40
27
|
var UpMark = _styledComponents.default.div.withConfig({
|
|
41
28
|
displayName: "HeadCell__UpMark",
|
|
42
29
|
componentId: "sc-1vadnsc-0"
|
|
43
30
|
})(["display:inline-block;margin:0.05em;margin-left:0.5em;height:0;border:0.25em solid transparent;border-top-width:0;border-bottom-color:", ";"], (0, _utils.getThemeProp)(["colors", "border"], "#999999"));
|
|
44
|
-
|
|
45
31
|
exports.UpMark = UpMark;
|
|
46
|
-
|
|
47
32
|
var DownMark = _styledComponents.default.div.withConfig({
|
|
48
33
|
displayName: "HeadCell__DownMark",
|
|
49
34
|
componentId: "sc-1vadnsc-1"
|
|
50
35
|
})(["display:inline-block;margin:0.05em;margin-left:0.5em;height:0;border:0.25em solid transparent;border-bottom-width:0;border-top-color:", ";"], (0, _utils.getThemeProp)(["colors", "border"], "#999999"));
|
|
51
|
-
|
|
52
36
|
exports.DownMark = DownMark;
|
|
53
|
-
|
|
54
37
|
var MarkBox = _styledComponents.default.div.withConfig({
|
|
55
38
|
displayName: "HeadCell__MarkBox",
|
|
56
39
|
componentId: "sc-1vadnsc-2"
|
|
57
40
|
})(["display:flex;flex-direction:column;justify-content:space-around;"]);
|
|
58
|
-
|
|
59
41
|
exports.MarkBox = MarkBox;
|
|
60
|
-
|
|
61
42
|
var SortMark = function SortMark(_ref) {
|
|
62
43
|
var direction = _ref.direction;
|
|
63
|
-
|
|
64
44
|
switch (direction) {
|
|
65
45
|
case "desc":
|
|
66
46
|
return /*#__PURE__*/_react.default.createElement(DownMark, null);
|
|
67
|
-
|
|
68
47
|
case "asc":
|
|
69
48
|
return /*#__PURE__*/_react.default.createElement(UpMark, null);
|
|
70
|
-
|
|
71
49
|
default:
|
|
72
50
|
return /*#__PURE__*/_react.default.createElement(MarkBox, null, /*#__PURE__*/_react.default.createElement(UpMark, null), /*#__PURE__*/_react.default.createElement(DownMark, null));
|
|
73
51
|
}
|
|
74
52
|
};
|
|
75
|
-
|
|
76
53
|
exports.SortMark = SortMark;
|
|
77
|
-
|
|
78
54
|
var TableHeader = _styledComponents.default.th.withConfig({
|
|
79
55
|
displayName: "HeadCell__TableHeader",
|
|
80
56
|
componentId: "sc-1vadnsc-3"
|
|
81
57
|
})(["background-color:#f7f7f7;position:sticky;top:0;z-index:10;padding:0;", ";", ";"], (0, _utils.ifFlag)("select", (0, _styledComponents.css)(["width:56px;"])), (0, _utils.ifFlag)("width", (0, _styledComponents.css)(["width:", ";"], function (props) {
|
|
82
58
|
return props.width + "";
|
|
83
59
|
})));
|
|
84
|
-
|
|
85
60
|
exports.TableHeader = TableHeader;
|
|
86
|
-
|
|
87
61
|
var HeadBox = _styledComponents.default.div.withConfig({
|
|
88
62
|
displayName: "HeadCell__HeadBox",
|
|
89
63
|
componentId: "sc-1vadnsc-4"
|
|
90
64
|
})(["display:flex;align-items:center;height:20px;width:calc(100% - 40px);padding:10px 20px;border-bottom:1px solid ", ";& > span{overflow-x:hidden;white-space:nowrap;text-overflow:ellipsis;}"], (0, _utils.getThemeProp)(["colors", "borderLight"], "#cccccc"));
|
|
91
|
-
|
|
92
65
|
exports.HeadBox = HeadBox;
|
|
93
|
-
|
|
94
66
|
var HeadCell = function HeadCell(_ref2) {
|
|
95
67
|
var columnDef = _ref2.columnDef,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
68
|
+
_ref2$rowIds = _ref2.rowIds,
|
|
69
|
+
rowIds = _ref2$rowIds === void 0 ? [] : _ref2$rowIds,
|
|
70
|
+
allSelected = _ref2.allSelected;
|
|
99
71
|
return /*#__PURE__*/_react.default.createElement(TableHeader, {
|
|
100
72
|
onClick: columnDef.sort,
|
|
101
73
|
select: columnDef.type === "select",
|
|
@@ -114,20 +86,16 @@ var HeadCell = function HeadCell(_ref2) {
|
|
|
114
86
|
direction: columnDef.sortDirection
|
|
115
87
|
}) : null] : null));
|
|
116
88
|
};
|
|
117
|
-
|
|
118
89
|
var _default = HeadCell;
|
|
119
90
|
var _default2 = _default;
|
|
120
91
|
var _default3 = _default2;
|
|
121
92
|
exports.default = _default3;
|
|
122
93
|
;
|
|
123
|
-
|
|
124
94
|
(function () {
|
|
125
95
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
126
|
-
|
|
127
96
|
if (!reactHotLoader) {
|
|
128
97
|
return;
|
|
129
98
|
}
|
|
130
|
-
|
|
131
99
|
reactHotLoader.register(UpMark, "UpMark", "/home/vsts/work/1/s/src/components/List/HeadCell.js");
|
|
132
100
|
reactHotLoader.register(DownMark, "DownMark", "/home/vsts/work/1/s/src/components/List/HeadCell.js");
|
|
133
101
|
reactHotLoader.register(MarkBox, "MarkBox", "/home/vsts/work/1/s/src/components/List/HeadCell.js");
|
|
@@ -137,23 +105,17 @@ exports.default = _default3;
|
|
|
137
105
|
reactHotLoader.register(HeadCell, "HeadCell", "/home/vsts/work/1/s/src/components/List/HeadCell.js");
|
|
138
106
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/List/HeadCell.js");
|
|
139
107
|
})();
|
|
140
|
-
|
|
141
108
|
;
|
|
142
|
-
|
|
143
109
|
(function () {
|
|
144
110
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
145
111
|
leaveModule && leaveModule(module);
|
|
146
112
|
})();
|
|
147
|
-
|
|
148
113
|
;
|
|
149
|
-
|
|
150
114
|
(function () {
|
|
151
115
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
152
|
-
|
|
153
116
|
if (!reactHotLoader) {
|
|
154
117
|
return;
|
|
155
118
|
}
|
|
156
|
-
|
|
157
119
|
reactHotLoader.register(UpMark, "UpMark", "/home/vsts/work/1/s/src/components/List/HeadCell.js");
|
|
158
120
|
reactHotLoader.register(DownMark, "DownMark", "/home/vsts/work/1/s/src/components/List/HeadCell.js");
|
|
159
121
|
reactHotLoader.register(MarkBox, "MarkBox", "/home/vsts/work/1/s/src/components/List/HeadCell.js");
|
|
@@ -163,9 +125,7 @@ exports.default = _default3;
|
|
|
163
125
|
reactHotLoader.register(HeadCell, "HeadCell", "/home/vsts/work/1/s/src/components/List/HeadCell.js");
|
|
164
126
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/List/HeadCell.js");
|
|
165
127
|
})();
|
|
166
|
-
|
|
167
128
|
;
|
|
168
|
-
|
|
169
129
|
(function () {
|
|
170
130
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
171
131
|
leaveModule && leaveModule(module);
|
|
@@ -2,45 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = exports.HeadTableRow = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
7
|
var _Row = require("./Row");
|
|
11
|
-
|
|
12
8
|
var _HeadCell = _interopRequireDefault(require("./HeadCell"));
|
|
13
|
-
|
|
14
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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 HeadTableRow = (0, _styledComponents.default)(_Row.TableRow).withConfig({
|
|
35
25
|
displayName: "HeadRow__HeadTableRow",
|
|
36
26
|
componentId: "sc-pgk6c-0"
|
|
37
27
|
})(["border-width:0;"]);
|
|
38
28
|
exports.HeadTableRow = HeadTableRow;
|
|
39
|
-
|
|
40
29
|
var HeadRow = function HeadRow(_ref) {
|
|
41
30
|
var columnDefs = _ref.columnDefs,
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
rowIds = _ref.rowIds,
|
|
32
|
+
allSelected = _ref.allSelected;
|
|
44
33
|
return /*#__PURE__*/_react.default.createElement(HeadTableRow, null, columnDefs.map(function (columnDef) {
|
|
45
34
|
return /*#__PURE__*/_react.default.createElement(_HeadCell.default, {
|
|
46
35
|
key: columnDef.type === "select" ? "select" : (0, _Row.stringifyFieldName)(columnDef.fieldName),
|
|
@@ -50,48 +39,36 @@ var HeadRow = function HeadRow(_ref) {
|
|
|
50
39
|
});
|
|
51
40
|
}));
|
|
52
41
|
};
|
|
53
|
-
|
|
54
42
|
var _default = HeadRow;
|
|
55
43
|
var _default2 = _default;
|
|
56
44
|
var _default3 = _default2;
|
|
57
45
|
exports.default = _default3;
|
|
58
46
|
;
|
|
59
|
-
|
|
60
47
|
(function () {
|
|
61
48
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
62
|
-
|
|
63
49
|
if (!reactHotLoader) {
|
|
64
50
|
return;
|
|
65
51
|
}
|
|
66
|
-
|
|
67
52
|
reactHotLoader.register(HeadTableRow, "HeadTableRow", "/home/vsts/work/1/s/src/components/List/HeadRow.js");
|
|
68
53
|
reactHotLoader.register(HeadRow, "HeadRow", "/home/vsts/work/1/s/src/components/List/HeadRow.js");
|
|
69
54
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/List/HeadRow.js");
|
|
70
55
|
})();
|
|
71
|
-
|
|
72
56
|
;
|
|
73
|
-
|
|
74
57
|
(function () {
|
|
75
58
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
76
59
|
leaveModule && leaveModule(module);
|
|
77
60
|
})();
|
|
78
|
-
|
|
79
61
|
;
|
|
80
|
-
|
|
81
62
|
(function () {
|
|
82
63
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
83
|
-
|
|
84
64
|
if (!reactHotLoader) {
|
|
85
65
|
return;
|
|
86
66
|
}
|
|
87
|
-
|
|
88
67
|
reactHotLoader.register(HeadTableRow, "HeadTableRow", "/home/vsts/work/1/s/src/components/List/HeadRow.js");
|
|
89
68
|
reactHotLoader.register(HeadRow, "HeadRow", "/home/vsts/work/1/s/src/components/List/HeadRow.js");
|
|
90
69
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/List/HeadRow.js");
|
|
91
70
|
})();
|
|
92
|
-
|
|
93
71
|
;
|
|
94
|
-
|
|
95
72
|
(function () {
|
|
96
73
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
97
74
|
leaveModule && leaveModule(module);
|
|
@@ -2,83 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.useListState = exports.default = exports.Table = exports.ROW_HEIGHT = exports.PlaceholderCell = exports.PlaceholderBox = exports.Placeholder = exports.List = exports.HEADER_HEIGHT = void 0;
|
|
5
|
-
|
|
6
5
|
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
6
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
|
|
10
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
|
|
12
8
|
var _recompose = require("recompose");
|
|
13
|
-
|
|
14
9
|
var _utils = require("../../utils");
|
|
15
|
-
|
|
16
10
|
var _withScrollBox = _interopRequireDefault(require("../../hocs/withScrollBox"));
|
|
17
|
-
|
|
18
11
|
var _withInfiniteScroll = _interopRequireDefault(require("../../hocs/withInfiniteScroll"));
|
|
19
|
-
|
|
20
12
|
var _Row = _interopRequireDefault(require("./Row"));
|
|
21
|
-
|
|
22
13
|
var _HeadRow = _interopRequireDefault(require("./HeadRow"));
|
|
23
|
-
|
|
24
14
|
var _useViewState3 = _interopRequireDefault(require("../../hooks/useViewState"));
|
|
25
|
-
|
|
26
15
|
var _enhanceColumnDefs = _interopRequireDefault(require("./enhanceColumnDefs"));
|
|
27
|
-
|
|
28
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
-
|
|
30
17
|
(function () {
|
|
31
18
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
32
19
|
enterModule && enterModule(module);
|
|
33
20
|
})();
|
|
34
|
-
|
|
35
21
|
(function () {
|
|
36
22
|
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
37
23
|
enterModule && enterModule(module);
|
|
38
24
|
})();
|
|
39
|
-
|
|
40
25
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
41
|
-
|
|
42
26
|
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."); }
|
|
43
|
-
|
|
44
27
|
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); }
|
|
45
|
-
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
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; }
|
|
49
|
-
|
|
28
|
+
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; }
|
|
29
|
+
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; } }
|
|
50
30
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
51
|
-
|
|
52
31
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
53
32
|
return a;
|
|
54
33
|
};
|
|
55
|
-
|
|
56
34
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
57
35
|
return a;
|
|
58
36
|
};
|
|
59
|
-
|
|
60
37
|
var PlaceholderCell = _styledComponents.default.div.withConfig({
|
|
61
38
|
displayName: "List__PlaceholderCell",
|
|
62
39
|
componentId: "sc-dohdkx-0"
|
|
63
|
-
})(["height:", "px;display:flex;justify-content:center;"],
|
|
64
|
-
/* istanbul ignore next*/
|
|
65
|
-
function (props) {
|
|
40
|
+
})(["height:", "px;display:flex;justify-content:center;"], /* istanbul ignore next*/function (props) {
|
|
66
41
|
return props.cssHeight || 100;
|
|
67
42
|
});
|
|
68
|
-
|
|
69
43
|
exports.PlaceholderCell = PlaceholderCell;
|
|
70
|
-
|
|
71
44
|
var PlaceholderBox = _styledComponents.default.div.withConfig({
|
|
72
45
|
displayName: "List__PlaceholderBox",
|
|
73
46
|
componentId: "sc-dohdkx-1"
|
|
74
47
|
})(["padding-top:30px;width:100%;margin:auto;"]);
|
|
75
|
-
|
|
76
48
|
exports.PlaceholderBox = PlaceholderBox;
|
|
77
|
-
|
|
78
49
|
var Placeholder = function Placeholder(_ref) {
|
|
79
50
|
var width = _ref.width,
|
|
80
|
-
|
|
81
|
-
|
|
51
|
+
height = _ref.height,
|
|
52
|
+
children = _ref.children;
|
|
82
53
|
return /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", {
|
|
83
54
|
colSpan: width,
|
|
84
55
|
style: {
|
|
@@ -88,116 +59,95 @@ var Placeholder = function Placeholder(_ref) {
|
|
|
88
59
|
cssHeight: height
|
|
89
60
|
}, /*#__PURE__*/_react.default.createElement(PlaceholderBox, null, children))));
|
|
90
61
|
};
|
|
91
|
-
|
|
92
62
|
exports.Placeholder = Placeholder;
|
|
93
63
|
Placeholder.displayName = "Placeholder";
|
|
94
|
-
|
|
95
64
|
var Table = _styledComponents.default.table.withConfig({
|
|
96
65
|
displayName: "List__Table",
|
|
97
66
|
componentId: "sc-dohdkx-2"
|
|
98
67
|
})(["border-spacing:0;table-layout:fixed;width:100%;font-size:13px;"]);
|
|
99
|
-
|
|
100
68
|
exports.Table = Table;
|
|
101
69
|
var HEADER_HEIGHT = 41;
|
|
102
70
|
exports.HEADER_HEIGHT = HEADER_HEIGHT;
|
|
103
71
|
var ROW_HEIGHT = 51;
|
|
104
72
|
exports.ROW_HEIGHT = ROW_HEIGHT;
|
|
105
|
-
|
|
106
73
|
var calculateVirtualization = function calculateVirtualization(virtual, scrollTop, scrollBuffer, height, rows) {
|
|
107
74
|
var virtualFilter, heightAbove, heightBelow;
|
|
108
|
-
|
|
109
75
|
if (virtual) {
|
|
110
76
|
var correctedScrollTop = scrollTop - HEADER_HEIGHT; // Subtract header height
|
|
111
|
-
|
|
112
77
|
var firstIn = Math.floor(correctedScrollTop / ROW_HEIGHT);
|
|
113
78
|
var firstShow = Math.max(firstIn - scrollBuffer, 0);
|
|
114
79
|
var lastIn = Math.ceil((correctedScrollTop + height) / ROW_HEIGHT);
|
|
115
80
|
var lastShow = Math.min(lastIn + scrollBuffer, rows.length);
|
|
116
|
-
|
|
117
81
|
virtualFilter = function virtualFilter(index) {
|
|
118
82
|
return index >= firstShow && index < lastShow;
|
|
119
83
|
};
|
|
120
|
-
|
|
121
84
|
heightAbove = firstShow * ROW_HEIGHT;
|
|
122
85
|
heightBelow = (rows.length - lastShow) * ROW_HEIGHT;
|
|
123
86
|
} else {
|
|
124
87
|
virtualFilter = function virtualFilter() {
|
|
125
88
|
return true;
|
|
126
89
|
};
|
|
127
|
-
|
|
128
90
|
heightAbove = 0;
|
|
129
91
|
heightBelow = 0;
|
|
130
92
|
}
|
|
131
|
-
|
|
132
93
|
return {
|
|
133
94
|
virtualFilter: virtualFilter,
|
|
134
95
|
heightAbove: heightAbove,
|
|
135
96
|
heightBelow: heightBelow
|
|
136
97
|
};
|
|
137
98
|
};
|
|
138
|
-
|
|
139
99
|
var useListState = function useListState(name, columnDefs) {
|
|
140
100
|
var _useViewState = (0, _useViewState3.default)(name),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
101
|
+
_useViewState2 = _slicedToArray(_useViewState, 2),
|
|
102
|
+
viewState = _useViewState2[0],
|
|
103
|
+
updateViewState = _useViewState2[1];
|
|
145
104
|
var _viewState$selection = viewState.selection,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
105
|
+
selection = _viewState$selection === void 0 ? [] : _viewState$selection,
|
|
106
|
+
_viewState$sorting = viewState.sorting,
|
|
107
|
+
sorting = _viewState$sorting === void 0 ? {} : _viewState$sorting;
|
|
149
108
|
var enhancedColumnDefs = (0, _enhanceColumnDefs.default)(sorting, selection, updateViewState, columnDefs);
|
|
150
109
|
return [enhancedColumnDefs, selection];
|
|
151
110
|
};
|
|
152
|
-
|
|
153
111
|
exports.useListState = useListState;
|
|
154
|
-
|
|
155
112
|
__signature__(useListState, "useViewState{[viewState, updateViewState]}", function () {
|
|
156
113
|
return [_useViewState3.default];
|
|
157
114
|
});
|
|
158
|
-
|
|
159
115
|
__signature__(useListState, "useViewState{[viewState, updateViewState]}", function () {
|
|
160
116
|
return [_useViewState3.default];
|
|
161
117
|
});
|
|
162
|
-
|
|
163
118
|
var List = function List(_ref2) {
|
|
164
119
|
var name = _ref2.name,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
120
|
+
_ref2$columnDefs = _ref2.columnDefs,
|
|
121
|
+
columnDefs = _ref2$columnDefs === void 0 ? [] : _ref2$columnDefs,
|
|
122
|
+
_ref2$rows = _ref2.rows,
|
|
123
|
+
rows = _ref2$rows === void 0 ? [] : _ref2$rows,
|
|
124
|
+
rowOnClick = _ref2.rowOnClick,
|
|
125
|
+
placeholder = _ref2.placeholder,
|
|
126
|
+
_ref2$keyField = _ref2.keyField,
|
|
127
|
+
keyField = _ref2$keyField === void 0 ? ["id"] : _ref2$keyField,
|
|
128
|
+
_ref2$virtual = _ref2.virtual,
|
|
129
|
+
virtual = _ref2$virtual === void 0 ? false : _ref2$virtual,
|
|
130
|
+
_ref2$scrollTop = _ref2.scrollTop,
|
|
131
|
+
scrollTop = _ref2$scrollTop === void 0 ? 0 : _ref2$scrollTop,
|
|
132
|
+
_ref2$height = _ref2.height,
|
|
133
|
+
height = _ref2$height === void 0 ? 300 : _ref2$height,
|
|
134
|
+
_ref2$scrollBuffer = _ref2.scrollBuffer,
|
|
135
|
+
scrollBuffer = _ref2$scrollBuffer === void 0 ? 10 : _ref2$scrollBuffer,
|
|
136
|
+
_ref2$rowBackgroundGe = _ref2.rowBackgroundGetter,
|
|
137
|
+
rowBackgroundGetter = _ref2$rowBackgroundGe === void 0 ? function () {} : _ref2$rowBackgroundGe;
|
|
184
138
|
var _useListState = useListState(name, columnDefs),
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
139
|
+
_useListState2 = _slicedToArray(_useListState, 2),
|
|
140
|
+
enhancedColumnDefs = _useListState2[0],
|
|
141
|
+
selection = _useListState2[1];
|
|
189
142
|
if (columnDefs.length === 0) return null;
|
|
190
143
|
var rowIds = [],
|
|
191
|
-
|
|
192
|
-
|
|
144
|
+
rowElements = [];
|
|
193
145
|
var _calculateVirtualizat = calculateVirtualization(virtual, scrollTop, scrollBuffer, height, rows),
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
146
|
+
virtualFilter = _calculateVirtualizat.virtualFilter,
|
|
147
|
+
heightAbove = _calculateVirtualizat.heightAbove,
|
|
148
|
+
heightBelow = _calculateVirtualizat.heightBelow;
|
|
198
149
|
rows.forEach(function (row, index) {
|
|
199
150
|
var id = _utils.safeGet.apply(void 0, [row].concat(keyField)) + ""; // Ensure rowId is string
|
|
200
|
-
|
|
201
151
|
rowIds.push(id);
|
|
202
152
|
if (!virtualFilter(index)) return;
|
|
203
153
|
rowElements.push( /*#__PURE__*/_react.default.createElement(_Row.default, {
|
|
@@ -210,7 +160,6 @@ var List = function List(_ref2) {
|
|
|
210
160
|
bgColor: rowBackgroundGetter(row, index)
|
|
211
161
|
}));
|
|
212
162
|
});
|
|
213
|
-
|
|
214
163
|
if (virtual && heightAbove) {
|
|
215
164
|
rowElements.unshift( /*#__PURE__*/_react.default.createElement("tr", {
|
|
216
165
|
key: "virtualAbove",
|
|
@@ -219,7 +168,6 @@ var List = function List(_ref2) {
|
|
|
219
168
|
}
|
|
220
169
|
}));
|
|
221
170
|
}
|
|
222
|
-
|
|
223
171
|
if (virtual && heightBelow) {
|
|
224
172
|
rowElements.push( /*#__PURE__*/_react.default.createElement("tr", {
|
|
225
173
|
key: "virtualBelow",
|
|
@@ -228,7 +176,6 @@ var List = function List(_ref2) {
|
|
|
228
176
|
}
|
|
229
177
|
}));
|
|
230
178
|
}
|
|
231
|
-
|
|
232
179
|
if (rowElements.length === 0 && placeholder) {
|
|
233
180
|
rowElements.push( /*#__PURE__*/_react.default.createElement(Placeholder, {
|
|
234
181
|
key: "placeholder",
|
|
@@ -236,26 +183,21 @@ var List = function List(_ref2) {
|
|
|
236
183
|
height: height - HEADER_HEIGHT
|
|
237
184
|
}, placeholder));
|
|
238
185
|
}
|
|
239
|
-
|
|
240
186
|
return /*#__PURE__*/_react.default.createElement(Table, null, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement(_HeadRow.default, {
|
|
241
187
|
columnDefs: columnDefs,
|
|
242
188
|
rowIds: rowIds,
|
|
243
189
|
allSelected: rows.length === selection.length && rows.length !== 0
|
|
244
190
|
})), /*#__PURE__*/_react.default.createElement("tbody", null, rowElements));
|
|
245
191
|
};
|
|
246
|
-
/* istanbul ignore next */
|
|
247
|
-
|
|
248
192
|
|
|
193
|
+
/* istanbul ignore next */
|
|
249
194
|
exports.List = List;
|
|
250
|
-
|
|
251
195
|
__signature__(List, "useListState{[enhancedColumnDefs, selection]}", function () {
|
|
252
196
|
return [useListState];
|
|
253
197
|
});
|
|
254
|
-
|
|
255
198
|
__signature__(List, "useListState{[enhancedColumnDefs, selection]}", function () {
|
|
256
199
|
return [useListState];
|
|
257
200
|
});
|
|
258
|
-
|
|
259
201
|
var checkInfiniteScroll = (0, _recompose.branch)(function (_ref3) {
|
|
260
202
|
var scrollLoader = _ref3.scrollLoader;
|
|
261
203
|
return !!scrollLoader;
|
|
@@ -286,21 +228,17 @@ StatefulList.propTypes = {
|
|
|
286
228
|
latestPage: _propTypes.default.number,
|
|
287
229
|
// The latest page number loaded
|
|
288
230
|
pageLength: _propTypes.default.number // The length of a page, in row items. Default: 20.
|
|
289
|
-
|
|
290
231
|
};
|
|
291
232
|
var _default = StatefulList;
|
|
292
233
|
var _default2 = _default;
|
|
293
234
|
var _default3 = _default2;
|
|
294
235
|
exports.default = _default3;
|
|
295
236
|
;
|
|
296
|
-
|
|
297
237
|
(function () {
|
|
298
238
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
299
|
-
|
|
300
239
|
if (!reactHotLoader) {
|
|
301
240
|
return;
|
|
302
241
|
}
|
|
303
|
-
|
|
304
242
|
reactHotLoader.register(PlaceholderCell, "PlaceholderCell", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
305
243
|
reactHotLoader.register(PlaceholderBox, "PlaceholderBox", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
306
244
|
reactHotLoader.register(Placeholder, "Placeholder", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
@@ -314,23 +252,17 @@ exports.default = _default3;
|
|
|
314
252
|
reactHotLoader.register(StatefulList, "StatefulList", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
315
253
|
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
316
254
|
})();
|
|
317
|
-
|
|
318
255
|
;
|
|
319
|
-
|
|
320
256
|
(function () {
|
|
321
257
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
322
258
|
leaveModule && leaveModule(module);
|
|
323
259
|
})();
|
|
324
|
-
|
|
325
260
|
;
|
|
326
|
-
|
|
327
261
|
(function () {
|
|
328
262
|
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
329
|
-
|
|
330
263
|
if (!reactHotLoader) {
|
|
331
264
|
return;
|
|
332
265
|
}
|
|
333
|
-
|
|
334
266
|
reactHotLoader.register(PlaceholderCell, "PlaceholderCell", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
335
267
|
reactHotLoader.register(PlaceholderBox, "PlaceholderBox", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
336
268
|
reactHotLoader.register(Placeholder, "Placeholder", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
@@ -344,9 +276,7 @@ exports.default = _default3;
|
|
|
344
276
|
reactHotLoader.register(StatefulList, "StatefulList", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
345
277
|
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
346
278
|
})();
|
|
347
|
-
|
|
348
279
|
;
|
|
349
|
-
|
|
350
280
|
(function () {
|
|
351
281
|
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
352
282
|
leaveModule && leaveModule(module);
|