orc-shared 5.10.2-dev.4 → 5.99.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AppFrame/About.js +13 -13
- package/dist/components/AppFrame/Anchor.js +7 -7
- package/dist/components/AppFrame/AppFrame.js +3 -3
- package/dist/components/AppFrame/Help.js +4 -4
- package/dist/components/AppFrame/MenuItem.js +17 -26
- package/dist/components/AppFrame/Preferences.js +14 -14
- package/dist/components/AppFrame/Sidebar.js +6 -6
- package/dist/components/AppFrame/Topbar.js +6 -6
- package/dist/components/ApplicationModuleLoader.js +3 -2
- package/dist/components/Authenticate.js +29 -22
- package/dist/components/DropMenu/Menu.js +9 -9
- package/dist/components/ErrorPlaceholder.js +8 -24
- package/dist/components/Form/Field.js +4 -4
- package/dist/components/Form/Inputs/Button.js +2 -2
- package/dist/components/{IconButton.js → Form/Inputs/MultiSelector.js} +33 -31
- package/dist/components/Form/Inputs/index.js +1 -1
- package/dist/components/InternetExplorerWarningMessage.js +15 -15
- package/dist/components/LoadingIcon.js +38 -17
- package/dist/components/MaterialUI/DataDisplay/Modal.js +3 -3
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Placeholder.js +6 -6
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.js +4 -4
- package/dist/components/MaterialUI/DataDisplay/SelectionList.js +1 -1
- package/dist/components/MaterialUI/DataDisplay/Table.js +2 -1
- package/dist/components/MaterialUI/DataDisplay/TableProps.js +3 -1
- package/dist/components/MaterialUI/DataDisplay/TransferList.js +1 -1
- package/dist/components/MaterialUI/Inputs/CheckboxGroup.js +1 -1
- package/dist/components/MaterialUI/Inputs/DatePicker.js +1 -1
- package/dist/components/MaterialUI/Inputs/InputBase.js +20 -188
- package/dist/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +1 -1
- package/dist/components/MaterialUI/Inputs/Select.js +10 -0
- package/dist/components/MaterialUI/Inputs/SelectProps.js +3 -1
- package/dist/components/MaterialUI/Inputs/Switch.js +1 -1
- package/dist/components/MaterialUI/Navigation/DropDownMenu.js +2 -4
- package/dist/components/MaterialUI/ScopeSelector/ScopeSelector.js +1 -1
- package/dist/components/MaterialUI/ScopeSelector/TreeItem.js +27 -42
- package/dist/components/MaterialUI/Surfaces/Paper.js +1 -1
- package/dist/components/MaterialUI/Surfaces/SectionExpansionPanel.js +3 -2
- package/dist/components/MaterialUI/muiThemes.js +2 -0
- package/dist/components/Provision.js +30 -13
- package/dist/components/Routing/SegmentPage.js +115 -56
- package/dist/components/Scope/ScopeNode.js +62 -57
- package/dist/components/Sidepanel.js +59 -23
- package/dist/components/Spritesheet.js +35 -17
- package/dist/components/Text.js +1 -60
- package/dist/components/ToastList.js +95 -64
- package/dist/components/Treeview/Branch.js +82 -20
- package/dist/components/Treeview/Label.js +108 -31
- package/dist/components/Treeview/Leaf.js +56 -12
- package/dist/components/Treeview/Node.js +22 -9
- package/dist/components/Treeview/index.js +7 -1
- package/dist/components/Treeview/settings.js +17 -6
- package/dist/utils/index.js +0 -4
- package/dist/utils/testUtils.js +1 -12
- package/dist/{components/Modal/Background.js → utils/toastHelper.js} +11 -14
- package/package.json +2 -2
- package/src/components/AppFrame/About.js +13 -13
- package/src/components/AppFrame/Anchor.js +7 -7
- package/src/components/AppFrame/AppFrame.js +3 -3
- package/src/components/AppFrame/Help.js +4 -4
- package/src/components/AppFrame/MenuItem.js +15 -23
- package/src/components/AppFrame/Preferences.js +14 -14
- package/src/components/AppFrame/Sidebar.js +6 -6
- package/src/components/AppFrame/Topbar.js +6 -6
- package/src/components/ApplicationModuleLoader.js +2 -2
- package/src/components/ApplicationModuleLoader.test.js +15 -28
- package/src/components/Authenticate.js +21 -23
- package/src/components/Authenticate.test.js +19 -27
- package/src/components/DropMenu/Menu.js +9 -9
- package/src/components/ErrorPlaceholder.js +4 -21
- package/src/components/ErrorPlaceholder.test.js +7 -14
- package/src/components/Form/Field.js +4 -4
- package/src/components/Form/InputField.test.js +2 -1
- package/src/components/Form/Inputs/Button.js +2 -2
- package/src/components/Form/Inputs/MultiSelector.js +23 -0
- package/src/components/Form/Inputs/MultiSelector.test.js +112 -0
- package/src/components/Form/Inputs/index.js +1 -1
- package/src/components/InternetExplorerWarningMessage.js +15 -15
- package/src/components/Loader.test.js +50 -59
- package/src/components/LoadingIcon.js +27 -14
- package/src/components/LoadingIcon.test.js +11 -15
- package/src/components/MaterialUI/DataDisplay/Modal.js +3 -3
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/Placeholder.js +6 -6
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.js +3 -3
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/StepperModal.test.js +0 -74
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/Translations.test.js +6 -18
- package/src/components/MaterialUI/DataDisplay/SelectionList.js +1 -1
- package/src/components/MaterialUI/DataDisplay/Table.js +6 -1
- package/src/components/MaterialUI/DataDisplay/Table.test.js +21 -1
- package/src/components/MaterialUI/DataDisplay/TableProps.js +2 -0
- package/src/components/MaterialUI/DataDisplay/TableProps.test.js +20 -2
- package/src/components/MaterialUI/DataDisplay/TransferList.js +1 -1
- package/src/components/MaterialUI/Inputs/CheckboxGroup.js +1 -1
- package/src/components/MaterialUI/Inputs/DatePicker.js +1 -1
- package/src/components/MaterialUI/Inputs/InputBase.js +31 -214
- package/src/components/MaterialUI/Inputs/InputBase.test.js +1 -460
- package/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +1 -1
- package/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.test.js +1 -1
- package/src/components/MaterialUI/Inputs/Select.js +7 -0
- package/src/components/MaterialUI/Inputs/Select.test.js +45 -0
- package/src/components/MaterialUI/Inputs/SelectProps.js +2 -0
- package/src/components/MaterialUI/Inputs/SelectProps.test.js +2 -0
- package/src/components/MaterialUI/Inputs/Switch.js +1 -1
- package/src/components/MaterialUI/Navigation/DropDownMenu.js +2 -2
- package/src/components/MaterialUI/Navigation/DropDownMenu.test.js +5 -6
- package/src/components/MaterialUI/ScopeSelector/ScopeSelector.js +1 -2
- package/src/components/MaterialUI/ScopeSelector/TreeItem.js +8 -31
- package/src/components/MaterialUI/Surfaces/Paper.js +1 -1
- package/src/components/MaterialUI/Surfaces/SectionExpansionPanel.js +2 -1
- package/src/components/MaterialUI/muiThemes.js +3 -0
- package/src/components/Navigation/Navigation.test.js +0 -5
- package/src/components/Navigation/useNavigationState.test.js +79 -222
- package/src/components/Provision.js +36 -42
- package/src/components/Provision.test.js +10 -26
- package/src/components/Routing/SegmentPage.js +68 -52
- package/src/components/Routing/SegmentPage.test.js +4 -12
- package/src/components/Scope/ScopeNode.js +44 -55
- package/src/components/Scope/ScopeNode.test.js +84 -163
- package/src/components/ScopeExtendedConfigurationLoader.test.js +1 -4
- package/src/components/Sidepanel.js +38 -32
- package/src/components/Sidepanel.test.js +54 -27
- package/src/components/Spritesheet.js +23 -21
- package/src/components/Spritesheet.test.js +10 -10
- package/src/components/Text.js +0 -49
- package/src/components/ToastList.js +79 -90
- package/src/components/ToastList.test.js +29 -103
- package/src/components/Treeview/Branch.js +65 -47
- package/src/components/Treeview/Branch.test.js +2 -43
- package/src/components/Treeview/Label.js +68 -54
- package/src/components/Treeview/Label.test.js +55 -63
- package/src/components/Treeview/Leaf.js +41 -22
- package/src/components/Treeview/Leaf.test.js +1 -15
- package/src/components/Treeview/Node.js +16 -9
- package/src/components/Treeview/Node.test.js +269 -200
- package/src/components/Treeview/Treeview.test.js +248 -248
- package/src/components/Treeview/index.js +6 -0
- package/src/components/Treeview/settings.js +10 -6
- package/src/utils/index.js +0 -4
- package/src/utils/testUtils.js +0 -10
- package/src/utils/testUtils.test.js +0 -68
- package/src/utils/toastHelper.js +8 -0
- package/src/utils/toastHelper.test.js +41 -0
- package/dist/components/Button.js +0 -70
- package/dist/components/CategoryList.js +0 -197
- package/dist/components/Checkbox.js +0 -103
- package/dist/components/Icon.js +0 -69
- package/dist/components/Input.js +0 -101
- package/dist/components/List/DataCell.js +0 -129
- package/dist/components/List/HeadCell.js +0 -125
- package/dist/components/List/HeadRow.js +0 -73
- package/dist/components/List/List.js +0 -274
- package/dist/components/List/Row.js +0 -109
- package/dist/components/List/enhanceColumnDefs.js +0 -111
- package/dist/components/List/index.js +0 -59
- package/dist/components/Modal/Dialog.js +0 -75
- package/dist/components/Modal/Wrapper.js +0 -69
- package/dist/components/Modal/index.js +0 -86
- package/dist/components/MultiSelector.js +0 -187
- package/dist/components/Navigation/Bar.js +0 -293
- package/dist/components/Navigation/Tab.js +0 -182
- package/dist/components/Placeholder.js +0 -114
- package/dist/components/Scope/Selector.js +0 -123
- package/dist/components/Selector.js +0 -185
- package/dist/components/Switch.js +0 -128
- package/dist/components/Toolbar.js +0 -227
- package/dist/components/Tooltip.js +0 -66
- package/dist/getTheme.js +0 -158
- package/dist/getThemeOverrides.js +0 -93
- package/dist/hocs/withAuthentication.js +0 -72
- package/dist/utils/styledPropFuncs.js +0 -88
- package/src/components/Button.js +0 -90
- package/src/components/Button.test.js +0 -49
- package/src/components/CategoryList.js +0 -140
- package/src/components/CategoryList.test.js +0 -667
- package/src/components/Checkbox.js +0 -63
- package/src/components/Checkbox.test.js +0 -122
- package/src/components/Icon.js +0 -18
- package/src/components/IconButton.js +0 -30
- package/src/components/IconButton.test.js +0 -61
- package/src/components/Input.js +0 -35
- package/src/components/Input.test.js +0 -34
- package/src/components/List/DataCell.js +0 -77
- package/src/components/List/DataCell.test.js +0 -357
- package/src/components/List/HeadCell.js +0 -105
- package/src/components/List/HeadCell.test.js +0 -331
- package/src/components/List/HeadRow.js +0 -21
- package/src/components/List/HeadRow.test.js +0 -27
- package/src/components/List/List.js +0 -162
- package/src/components/List/List.test.js +0 -705
- package/src/components/List/Row.js +0 -72
- package/src/components/List/Row.test.js +0 -194
- package/src/components/List/enhanceColumnDefs.js +0 -54
- package/src/components/List/enhanceColumnDefs.test.js +0 -179
- package/src/components/List/index.js +0 -6
- package/src/components/Modal/Background.js +0 -10
- package/src/components/Modal/Dialog.js +0 -27
- package/src/components/Modal/Dialog.test.js +0 -20
- package/src/components/Modal/Modal.test.js +0 -52
- package/src/components/Modal/Wrapper.js +0 -32
- package/src/components/Modal/Wrapper.test.js +0 -55
- package/src/components/Modal/index.js +0 -22
- package/src/components/MultiSelector.js +0 -104
- package/src/components/MultiSelector.test.js +0 -348
- package/src/components/Navigation/Bar.js +0 -212
- package/src/components/Navigation/Bar.test.js +0 -552
- package/src/components/Navigation/Tab.js +0 -156
- package/src/components/Navigation/Tab.test.js +0 -404
- package/src/components/Placeholder.js +0 -61
- package/src/components/Placeholder.test.js +0 -106
- package/src/components/Scope/Selector.js +0 -70
- package/src/components/Scope/Selector.test.js +0 -138
- package/src/components/Selector.js +0 -191
- package/src/components/Selector.test.js +0 -157
- package/src/components/Switch.js +0 -112
- package/src/components/Switch.test.js +0 -130
- package/src/components/Text.test.js +0 -132
- package/src/components/Toolbar.js +0 -178
- package/src/components/Toolbar.test.js +0 -478
- package/src/components/Tooltip.js +0 -51
- package/src/components/Tooltip.test.js +0 -21
- package/src/getTheme.js +0 -103
- package/src/getTheme.test.js +0 -92
- package/src/getThemeOverrides.js +0 -27
- package/src/hocs/withAuthentication.js +0 -18
- package/src/hocs/withAuthentication.test.js +0 -120
- package/src/utils/styledPropFuncs.js +0 -20
- package/src/utils/styledPropFuncs.test.js +0 -166
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.useListState = exports.default = exports.Table = exports.ROW_HEIGHT = exports.PlaceholderCell = exports.PlaceholderBox = exports.Placeholder = exports.List = exports.HEADER_HEIGHT = void 0;
|
|
5
|
-
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _recompose = require("recompose");
|
|
9
|
-
var _utils = require("../../utils");
|
|
10
|
-
var _withScrollBox = _interopRequireDefault(require("../../hocs/withScrollBox"));
|
|
11
|
-
var _withInfiniteScroll = _interopRequireDefault(require("../../hocs/withInfiniteScroll"));
|
|
12
|
-
var _Row = _interopRequireDefault(require("./Row"));
|
|
13
|
-
var _HeadRow = _interopRequireDefault(require("./HeadRow"));
|
|
14
|
-
var _useViewState3 = _interopRequireDefault(require("../../hooks/useViewState"));
|
|
15
|
-
var _enhanceColumnDefs = _interopRequireDefault(require("./enhanceColumnDefs"));
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
(function () {
|
|
18
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
19
|
-
enterModule && enterModule(module);
|
|
20
|
-
})();
|
|
21
|
-
(function () {
|
|
22
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
23
|
-
enterModule && enterModule(module);
|
|
24
|
-
})();
|
|
25
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
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."); }
|
|
27
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
28
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
29
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
30
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
31
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
32
|
-
return a;
|
|
33
|
-
};
|
|
34
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
35
|
-
return a;
|
|
36
|
-
};
|
|
37
|
-
var PlaceholderCell = exports.PlaceholderCell = _styledComponents.default.div.withConfig({
|
|
38
|
-
displayName: "List__PlaceholderCell",
|
|
39
|
-
componentId: "sc-dohdkx-0"
|
|
40
|
-
})(["height:", "px;display:flex;justify-content:center;"], /* istanbul ignore next*/function (props) {
|
|
41
|
-
return props.cssHeight || 100;
|
|
42
|
-
});
|
|
43
|
-
var PlaceholderBox = exports.PlaceholderBox = _styledComponents.default.div.withConfig({
|
|
44
|
-
displayName: "List__PlaceholderBox",
|
|
45
|
-
componentId: "sc-dohdkx-1"
|
|
46
|
-
})(["padding-top:30px;width:100%;margin:auto;"]);
|
|
47
|
-
var Placeholder = exports.Placeholder = function Placeholder(_ref) {
|
|
48
|
-
var width = _ref.width,
|
|
49
|
-
height = _ref.height,
|
|
50
|
-
children = _ref.children;
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", {
|
|
52
|
-
colSpan: width,
|
|
53
|
-
style: {
|
|
54
|
-
padding: 0
|
|
55
|
-
}
|
|
56
|
-
}, /*#__PURE__*/_react.default.createElement(PlaceholderCell, {
|
|
57
|
-
cssHeight: height
|
|
58
|
-
}, /*#__PURE__*/_react.default.createElement(PlaceholderBox, null, children))));
|
|
59
|
-
};
|
|
60
|
-
Placeholder.displayName = "Placeholder";
|
|
61
|
-
var Table = exports.Table = _styledComponents.default.table.withConfig({
|
|
62
|
-
displayName: "List__Table",
|
|
63
|
-
componentId: "sc-dohdkx-2"
|
|
64
|
-
})(["border-spacing:0;table-layout:fixed;width:100%;font-size:13px;"]);
|
|
65
|
-
var HEADER_HEIGHT = exports.HEADER_HEIGHT = 41;
|
|
66
|
-
var ROW_HEIGHT = exports.ROW_HEIGHT = 51;
|
|
67
|
-
var calculateVirtualization = function calculateVirtualization(virtual, scrollTop, scrollBuffer, height, rows) {
|
|
68
|
-
var virtualFilter, heightAbove, heightBelow;
|
|
69
|
-
if (virtual) {
|
|
70
|
-
var correctedScrollTop = scrollTop - HEADER_HEIGHT; // Subtract header height
|
|
71
|
-
var firstIn = Math.floor(correctedScrollTop / ROW_HEIGHT);
|
|
72
|
-
var firstShow = Math.max(firstIn - scrollBuffer, 0);
|
|
73
|
-
var lastIn = Math.ceil((correctedScrollTop + height) / ROW_HEIGHT);
|
|
74
|
-
var lastShow = Math.min(lastIn + scrollBuffer, rows.length);
|
|
75
|
-
virtualFilter = function virtualFilter(index) {
|
|
76
|
-
return index >= firstShow && index < lastShow;
|
|
77
|
-
};
|
|
78
|
-
heightAbove = firstShow * ROW_HEIGHT;
|
|
79
|
-
heightBelow = (rows.length - lastShow) * ROW_HEIGHT;
|
|
80
|
-
} else {
|
|
81
|
-
virtualFilter = function virtualFilter() {
|
|
82
|
-
return true;
|
|
83
|
-
};
|
|
84
|
-
heightAbove = 0;
|
|
85
|
-
heightBelow = 0;
|
|
86
|
-
}
|
|
87
|
-
return {
|
|
88
|
-
virtualFilter: virtualFilter,
|
|
89
|
-
heightAbove: heightAbove,
|
|
90
|
-
heightBelow: heightBelow
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
var useListState = exports.useListState = function useListState(name, columnDefs) {
|
|
94
|
-
var _useViewState = (0, _useViewState3.default)(name),
|
|
95
|
-
_useViewState2 = _slicedToArray(_useViewState, 2),
|
|
96
|
-
viewState = _useViewState2[0],
|
|
97
|
-
updateViewState = _useViewState2[1];
|
|
98
|
-
var _viewState$selection = viewState.selection,
|
|
99
|
-
selection = _viewState$selection === void 0 ? [] : _viewState$selection,
|
|
100
|
-
_viewState$sorting = viewState.sorting,
|
|
101
|
-
sorting = _viewState$sorting === void 0 ? {} : _viewState$sorting;
|
|
102
|
-
var enhancedColumnDefs = (0, _enhanceColumnDefs.default)(sorting, selection, updateViewState, columnDefs);
|
|
103
|
-
return [enhancedColumnDefs, selection];
|
|
104
|
-
};
|
|
105
|
-
__signature__(useListState, "useViewState{[viewState, updateViewState]}", function () {
|
|
106
|
-
return [_useViewState3.default];
|
|
107
|
-
});
|
|
108
|
-
__signature__(useListState, "useViewState{[viewState, updateViewState]}", function () {
|
|
109
|
-
return [_useViewState3.default];
|
|
110
|
-
});
|
|
111
|
-
var List = exports.List = function List(_ref2) {
|
|
112
|
-
var name = _ref2.name,
|
|
113
|
-
_ref2$columnDefs = _ref2.columnDefs,
|
|
114
|
-
columnDefs = _ref2$columnDefs === void 0 ? [] : _ref2$columnDefs,
|
|
115
|
-
_ref2$rows = _ref2.rows,
|
|
116
|
-
rows = _ref2$rows === void 0 ? [] : _ref2$rows,
|
|
117
|
-
rowOnClick = _ref2.rowOnClick,
|
|
118
|
-
placeholder = _ref2.placeholder,
|
|
119
|
-
_ref2$keyField = _ref2.keyField,
|
|
120
|
-
keyField = _ref2$keyField === void 0 ? ["id"] : _ref2$keyField,
|
|
121
|
-
_ref2$virtual = _ref2.virtual,
|
|
122
|
-
virtual = _ref2$virtual === void 0 ? false : _ref2$virtual,
|
|
123
|
-
_ref2$scrollTop = _ref2.scrollTop,
|
|
124
|
-
scrollTop = _ref2$scrollTop === void 0 ? 0 : _ref2$scrollTop,
|
|
125
|
-
_ref2$height = _ref2.height,
|
|
126
|
-
height = _ref2$height === void 0 ? 300 : _ref2$height,
|
|
127
|
-
_ref2$scrollBuffer = _ref2.scrollBuffer,
|
|
128
|
-
scrollBuffer = _ref2$scrollBuffer === void 0 ? 10 : _ref2$scrollBuffer,
|
|
129
|
-
_ref2$rowBackgroundGe = _ref2.rowBackgroundGetter,
|
|
130
|
-
rowBackgroundGetter = _ref2$rowBackgroundGe === void 0 ? function () {} : _ref2$rowBackgroundGe;
|
|
131
|
-
var _useListState = useListState(name, columnDefs),
|
|
132
|
-
_useListState2 = _slicedToArray(_useListState, 2),
|
|
133
|
-
enhancedColumnDefs = _useListState2[0],
|
|
134
|
-
selection = _useListState2[1];
|
|
135
|
-
if (columnDefs.length === 0) return null;
|
|
136
|
-
var rowIds = [],
|
|
137
|
-
rowElements = [];
|
|
138
|
-
var _calculateVirtualizat = calculateVirtualization(virtual, scrollTop, scrollBuffer, height, rows),
|
|
139
|
-
virtualFilter = _calculateVirtualizat.virtualFilter,
|
|
140
|
-
heightAbove = _calculateVirtualizat.heightAbove,
|
|
141
|
-
heightBelow = _calculateVirtualizat.heightBelow;
|
|
142
|
-
rows.forEach(function (row, index) {
|
|
143
|
-
var id = _utils.safeGet.apply(void 0, [row].concat(keyField)) + ""; // Ensure rowId is string
|
|
144
|
-
rowIds.push(id);
|
|
145
|
-
if (!virtualFilter(index)) return;
|
|
146
|
-
rowElements.push(/*#__PURE__*/_react.default.createElement(_Row.default, {
|
|
147
|
-
columnDefs: enhancedColumnDefs,
|
|
148
|
-
key: id,
|
|
149
|
-
rowId: id,
|
|
150
|
-
row: row,
|
|
151
|
-
rowOnClick: rowOnClick,
|
|
152
|
-
selected: selection.indexOf(id) !== -1,
|
|
153
|
-
bgColor: rowBackgroundGetter(row, index)
|
|
154
|
-
}));
|
|
155
|
-
});
|
|
156
|
-
if (virtual && heightAbove) {
|
|
157
|
-
rowElements.unshift(/*#__PURE__*/_react.default.createElement("tr", {
|
|
158
|
-
key: "virtualAbove",
|
|
159
|
-
style: {
|
|
160
|
-
height: heightAbove
|
|
161
|
-
}
|
|
162
|
-
}));
|
|
163
|
-
}
|
|
164
|
-
if (virtual && heightBelow) {
|
|
165
|
-
rowElements.push(/*#__PURE__*/_react.default.createElement("tr", {
|
|
166
|
-
key: "virtualBelow",
|
|
167
|
-
style: {
|
|
168
|
-
height: heightBelow
|
|
169
|
-
}
|
|
170
|
-
}));
|
|
171
|
-
}
|
|
172
|
-
if (rowElements.length === 0 && placeholder) {
|
|
173
|
-
rowElements.push(/*#__PURE__*/_react.default.createElement(Placeholder, {
|
|
174
|
-
key: "placeholder",
|
|
175
|
-
width: columnDefs.length,
|
|
176
|
-
height: height - HEADER_HEIGHT
|
|
177
|
-
}, placeholder));
|
|
178
|
-
}
|
|
179
|
-
return /*#__PURE__*/_react.default.createElement(Table, null, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement(_HeadRow.default, {
|
|
180
|
-
columnDefs: columnDefs,
|
|
181
|
-
rowIds: rowIds,
|
|
182
|
-
allSelected: rows.length === selection.length && rows.length !== 0
|
|
183
|
-
})), /*#__PURE__*/_react.default.createElement("tbody", null, rowElements));
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
/* istanbul ignore next */
|
|
187
|
-
__signature__(List, "useListState{[enhancedColumnDefs, selection]}", function () {
|
|
188
|
-
return [useListState];
|
|
189
|
-
});
|
|
190
|
-
__signature__(List, "useListState{[enhancedColumnDefs, selection]}", function () {
|
|
191
|
-
return [useListState];
|
|
192
|
-
});
|
|
193
|
-
var checkInfiniteScroll = (0, _recompose.branch)(function (_ref3) {
|
|
194
|
-
var scrollLoader = _ref3.scrollLoader;
|
|
195
|
-
return !!scrollLoader;
|
|
196
|
-
}, _withInfiniteScroll.default);
|
|
197
|
-
var StatefulList = (0, _recompose.compose)((0, _recompose.setDisplayName)("List"), checkInfiniteScroll, _withScrollBox.default)(List);
|
|
198
|
-
StatefulList.propTypes = {
|
|
199
|
-
columnDefs: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
200
|
-
// Each object must be a valid column definition
|
|
201
|
-
rows: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
202
|
-
rowOnClick: _propTypes.default.func,
|
|
203
|
-
// Click handler for row.
|
|
204
|
-
// Fires when row is clicked, excluding select or switch columns
|
|
205
|
-
// Event target will have a 'rowId' data value which identifies the clicked row.
|
|
206
|
-
placeholder: _propTypes.default.node,
|
|
207
|
-
// A React element to render as placeholder.
|
|
208
|
-
keyField: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
209
|
-
// Path to identifying data field on each row.
|
|
210
|
-
// Infinite/virtual scroll
|
|
211
|
-
// If scrollLoader is present, below props will control the scrolling
|
|
212
|
-
scrollLoader: _propTypes.default.func,
|
|
213
|
-
// Loader function. Called with page number to be loaded.
|
|
214
|
-
onScroll: _propTypes.default.func,
|
|
215
|
-
// Optional scroll event handler
|
|
216
|
-
loadTrigger: _propTypes.default.number,
|
|
217
|
-
// How many pixels from the bottom should the load be triggered. Default: 200
|
|
218
|
-
length: _propTypes.default.number,
|
|
219
|
-
// How many elements are loaded, should equal rows.length
|
|
220
|
-
latestPage: _propTypes.default.number,
|
|
221
|
-
// The latest page number loaded
|
|
222
|
-
pageLength: _propTypes.default.number // The length of a page, in row items. Default: 20.
|
|
223
|
-
};
|
|
224
|
-
var _default = StatefulList;
|
|
225
|
-
var _default2 = _default;
|
|
226
|
-
var _default3 = exports.default = _default2;
|
|
227
|
-
;
|
|
228
|
-
(function () {
|
|
229
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
230
|
-
if (!reactHotLoader) {
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
reactHotLoader.register(PlaceholderCell, "PlaceholderCell", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
234
|
-
reactHotLoader.register(PlaceholderBox, "PlaceholderBox", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
235
|
-
reactHotLoader.register(Placeholder, "Placeholder", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
236
|
-
reactHotLoader.register(Table, "Table", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
237
|
-
reactHotLoader.register(HEADER_HEIGHT, "HEADER_HEIGHT", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
238
|
-
reactHotLoader.register(ROW_HEIGHT, "ROW_HEIGHT", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
239
|
-
reactHotLoader.register(calculateVirtualization, "calculateVirtualization", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
240
|
-
reactHotLoader.register(useListState, "useListState", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
241
|
-
reactHotLoader.register(List, "List", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
242
|
-
reactHotLoader.register(checkInfiniteScroll, "checkInfiniteScroll", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
243
|
-
reactHotLoader.register(StatefulList, "StatefulList", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
244
|
-
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
245
|
-
})();
|
|
246
|
-
;
|
|
247
|
-
(function () {
|
|
248
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
249
|
-
leaveModule && leaveModule(module);
|
|
250
|
-
})();
|
|
251
|
-
;
|
|
252
|
-
(function () {
|
|
253
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
254
|
-
if (!reactHotLoader) {
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
reactHotLoader.register(PlaceholderCell, "PlaceholderCell", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
258
|
-
reactHotLoader.register(PlaceholderBox, "PlaceholderBox", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
259
|
-
reactHotLoader.register(Placeholder, "Placeholder", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
260
|
-
reactHotLoader.register(Table, "Table", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
261
|
-
reactHotLoader.register(HEADER_HEIGHT, "HEADER_HEIGHT", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
262
|
-
reactHotLoader.register(ROW_HEIGHT, "ROW_HEIGHT", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
263
|
-
reactHotLoader.register(calculateVirtualization, "calculateVirtualization", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
264
|
-
reactHotLoader.register(useListState, "useListState", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
265
|
-
reactHotLoader.register(List, "List", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
266
|
-
reactHotLoader.register(checkInfiniteScroll, "checkInfiniteScroll", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
267
|
-
reactHotLoader.register(StatefulList, "StatefulList", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
268
|
-
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/List/List.js");
|
|
269
|
-
})();
|
|
270
|
-
;
|
|
271
|
-
(function () {
|
|
272
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
273
|
-
leaveModule && leaveModule(module);
|
|
274
|
-
})();
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.stringifyFieldName = exports.default = exports.TableRow = exports.Row = void 0;
|
|
5
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
7
|
-
var _utils = require("../../utils");
|
|
8
|
-
var _DataCell = _interopRequireDefault(require("./DataCell"));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
-
(function () {
|
|
13
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
14
|
-
enterModule && enterModule(module);
|
|
15
|
-
})();
|
|
16
|
-
(function () {
|
|
17
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
18
|
-
enterModule && enterModule(module);
|
|
19
|
-
})();
|
|
20
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
24
|
-
return a;
|
|
25
|
-
};
|
|
26
|
-
var stringifyFieldName = exports.stringifyFieldName = function stringifyFieldName(name) {
|
|
27
|
-
if (Array.isArray(name)) {
|
|
28
|
-
return name.join("_");
|
|
29
|
-
} else {
|
|
30
|
-
return name && name.toString();
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
var TableRow = exports.TableRow = _styledComponents.default.tr.withConfig({
|
|
34
|
-
displayName: "Row__TableRow",
|
|
35
|
-
componentId: "sc-fh6oyu-0"
|
|
36
|
-
})(["", " ", ""], (0, _utils.ifFlag)("bgColor", function (props) {
|
|
37
|
-
return (0, _styledComponents.css)(["background-color:", ";"], props.bgColor);
|
|
38
|
-
}, (0, _styledComponents.css)(["transition:background-color 0.2s ease-in;&:hover{background-color:#f3f3f3;}"])), (0, _utils.ifFlag)("onClick", (0, _styledComponents.css)(["& td{cursor:pointer;}"])));
|
|
39
|
-
|
|
40
|
-
// Clicks on these elements will not be handled by the row onClick
|
|
41
|
-
var formTags = ["INPUT", "SELECT", "LABEL"];
|
|
42
|
-
var Row = exports.Row = function Row(_ref) {
|
|
43
|
-
var columnDefs = _ref.columnDefs,
|
|
44
|
-
row = _ref.row,
|
|
45
|
-
rowId = _ref.rowId,
|
|
46
|
-
selected = _ref.selected,
|
|
47
|
-
rowOnClick = _ref.rowOnClick,
|
|
48
|
-
bgColor = _ref.bgColor;
|
|
49
|
-
var onClick = (0, _react.useCallback)(function (event) {
|
|
50
|
-
if (formTags.indexOf(event.target.tagName) === -1) {
|
|
51
|
-
/* istanbul ignore else */
|
|
52
|
-
if (!event.target.dataset["rowId"]) {
|
|
53
|
-
event.target.dataset["rowId"] = rowId;
|
|
54
|
-
}
|
|
55
|
-
rowOnClick(event);
|
|
56
|
-
}
|
|
57
|
-
}, [rowOnClick, rowId]);
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement(TableRow, {
|
|
59
|
-
onClick: rowOnClick ? onClick : undefined,
|
|
60
|
-
bgColor: bgColor
|
|
61
|
-
}, columnDefs.map(function (columnDef) {
|
|
62
|
-
return /*#__PURE__*/_react.default.createElement(_DataCell.default, {
|
|
63
|
-
key: stringifyFieldName(columnDef.fieldName),
|
|
64
|
-
rowId: rowId,
|
|
65
|
-
row: row,
|
|
66
|
-
columnDef: columnDef,
|
|
67
|
-
selected: selected
|
|
68
|
-
});
|
|
69
|
-
}));
|
|
70
|
-
};
|
|
71
|
-
__signature__(Row, "useCallback{onClick}");
|
|
72
|
-
__signature__(Row, "useCallback{onClick}");
|
|
73
|
-
var _default = Row;
|
|
74
|
-
var _default2 = _default;
|
|
75
|
-
var _default3 = exports.default = _default2;
|
|
76
|
-
;
|
|
77
|
-
(function () {
|
|
78
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
79
|
-
if (!reactHotLoader) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
reactHotLoader.register(stringifyFieldName, "stringifyFieldName", "/home/vsts/work/1/s/src/components/List/Row.js");
|
|
83
|
-
reactHotLoader.register(TableRow, "TableRow", "/home/vsts/work/1/s/src/components/List/Row.js");
|
|
84
|
-
reactHotLoader.register(formTags, "formTags", "/home/vsts/work/1/s/src/components/List/Row.js");
|
|
85
|
-
reactHotLoader.register(Row, "Row", "/home/vsts/work/1/s/src/components/List/Row.js");
|
|
86
|
-
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/List/Row.js");
|
|
87
|
-
})();
|
|
88
|
-
;
|
|
89
|
-
(function () {
|
|
90
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
91
|
-
leaveModule && leaveModule(module);
|
|
92
|
-
})();
|
|
93
|
-
;
|
|
94
|
-
(function () {
|
|
95
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
96
|
-
if (!reactHotLoader) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
reactHotLoader.register(stringifyFieldName, "stringifyFieldName", "/home/vsts/work/1/s/src/components/List/Row.js");
|
|
100
|
-
reactHotLoader.register(TableRow, "TableRow", "/home/vsts/work/1/s/src/components/List/Row.js");
|
|
101
|
-
reactHotLoader.register(formTags, "formTags", "/home/vsts/work/1/s/src/components/List/Row.js");
|
|
102
|
-
reactHotLoader.register(Row, "Row", "/home/vsts/work/1/s/src/components/List/Row.js");
|
|
103
|
-
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/List/Row.js");
|
|
104
|
-
})();
|
|
105
|
-
;
|
|
106
|
-
(function () {
|
|
107
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
108
|
-
leaveModule && leaveModule(module);
|
|
109
|
-
})();
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
|
-
(function () {
|
|
6
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
7
|
-
enterModule && enterModule(module);
|
|
8
|
-
})();
|
|
9
|
-
(function () {
|
|
10
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
11
|
-
enterModule && enterModule(module);
|
|
12
|
-
})();
|
|
13
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
17
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var toggleInArray = function toggleInArray(nameList, name) {
|
|
25
|
-
if (nameList.indexOf(name) !== -1) {
|
|
26
|
-
return nameList.filter(function (n) {
|
|
27
|
-
return n !== name;
|
|
28
|
-
});
|
|
29
|
-
} else {
|
|
30
|
-
return nameList.concat(name);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
var enhanceSelectColumn = function enhanceSelectColumn(selection, updateViewState, def) {
|
|
34
|
-
return _objectSpread(_objectSpread({
|
|
35
|
-
fieldName: "selection"
|
|
36
|
-
}, def), {}, {
|
|
37
|
-
onChange: function onChange(eventOrSelection) {
|
|
38
|
-
if (Array.isArray(eventOrSelection)) {
|
|
39
|
-
updateViewState("selection", eventOrSelection);
|
|
40
|
-
} else {
|
|
41
|
-
updateViewState("selection", toggleInArray(selection, eventOrSelection.target.dataset.rowId));
|
|
42
|
-
eventOrSelection.stopPropagation();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
var enhanceSortableColumn = function enhanceSortableColumn(sorting, updateViewState, def) {
|
|
48
|
-
var isSortColumn = sorting.column && def.fieldName && sorting.column.toString() === def.fieldName.toString();
|
|
49
|
-
var isAscending = isSortColumn && sorting.direction === "asc";
|
|
50
|
-
var newDef = _objectSpread(_objectSpread({}, def), {}, {
|
|
51
|
-
sort: function sort() {
|
|
52
|
-
updateViewState("sorting", {
|
|
53
|
-
column: def.fieldName,
|
|
54
|
-
direction: isAscending ? "desc" : "asc"
|
|
55
|
-
});
|
|
56
|
-
def.sort(isAscending, def.fieldName, def.type);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
if (isSortColumn) {
|
|
60
|
-
newDef.sortDirection = sorting.direction;
|
|
61
|
-
}
|
|
62
|
-
return newDef;
|
|
63
|
-
};
|
|
64
|
-
var enhanceColumnDef = function enhanceColumnDef(sorting, selection, updateViewState, columnDefs) {
|
|
65
|
-
return columnDefs.map(function (def) {
|
|
66
|
-
if (def.type === "select") {
|
|
67
|
-
return enhanceSelectColumn(selection, updateViewState, def);
|
|
68
|
-
}
|
|
69
|
-
if (def.sort) {
|
|
70
|
-
return enhanceSortableColumn(sorting, updateViewState, def);
|
|
71
|
-
}
|
|
72
|
-
return def;
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
var _default = enhanceColumnDef;
|
|
76
|
-
var _default2 = _default;
|
|
77
|
-
var _default3 = exports.default = _default2;
|
|
78
|
-
;
|
|
79
|
-
(function () {
|
|
80
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
81
|
-
if (!reactHotLoader) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
reactHotLoader.register(toggleInArray, "toggleInArray", "/home/vsts/work/1/s/src/components/List/enhanceColumnDefs.js");
|
|
85
|
-
reactHotLoader.register(enhanceSelectColumn, "enhanceSelectColumn", "/home/vsts/work/1/s/src/components/List/enhanceColumnDefs.js");
|
|
86
|
-
reactHotLoader.register(enhanceSortableColumn, "enhanceSortableColumn", "/home/vsts/work/1/s/src/components/List/enhanceColumnDefs.js");
|
|
87
|
-
reactHotLoader.register(enhanceColumnDef, "enhanceColumnDef", "/home/vsts/work/1/s/src/components/List/enhanceColumnDefs.js");
|
|
88
|
-
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/List/enhanceColumnDefs.js");
|
|
89
|
-
})();
|
|
90
|
-
;
|
|
91
|
-
(function () {
|
|
92
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
93
|
-
leaveModule && leaveModule(module);
|
|
94
|
-
})();
|
|
95
|
-
;
|
|
96
|
-
(function () {
|
|
97
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
98
|
-
if (!reactHotLoader) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
reactHotLoader.register(toggleInArray, "toggleInArray", "/home/vsts/work/1/s/src/components/List/enhanceColumnDefs.js");
|
|
102
|
-
reactHotLoader.register(enhanceSelectColumn, "enhanceSelectColumn", "/home/vsts/work/1/s/src/components/List/enhanceColumnDefs.js");
|
|
103
|
-
reactHotLoader.register(enhanceSortableColumn, "enhanceSortableColumn", "/home/vsts/work/1/s/src/components/List/enhanceColumnDefs.js");
|
|
104
|
-
reactHotLoader.register(enhanceColumnDef, "enhanceColumnDef", "/home/vsts/work/1/s/src/components/List/enhanceColumnDefs.js");
|
|
105
|
-
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/List/enhanceColumnDefs.js");
|
|
106
|
-
})();
|
|
107
|
-
;
|
|
108
|
-
(function () {
|
|
109
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
110
|
-
leaveModule && leaveModule(module);
|
|
111
|
-
})();
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
|
-
var _Loader = _interopRequireDefault(require("../Loader"));
|
|
6
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
-
(function () {
|
|
8
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
9
|
-
enterModule && enterModule(module);
|
|
10
|
-
})();
|
|
11
|
-
(function () {
|
|
12
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
13
|
-
enterModule && enterModule(module);
|
|
14
|
-
})();
|
|
15
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
/* istanbul ignore next */
|
|
24
|
-
var LoadableList = (0, _Loader.default)(function () {
|
|
25
|
-
return Promise.resolve().then(function () {
|
|
26
|
-
return _interopRequireWildcard(require("./List"));
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
var _default = LoadableList;
|
|
30
|
-
var _default2 = _default;
|
|
31
|
-
var _default3 = exports.default = _default2;
|
|
32
|
-
;
|
|
33
|
-
(function () {
|
|
34
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
35
|
-
if (!reactHotLoader) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
reactHotLoader.register(LoadableList, "LoadableList", "/home/vsts/work/1/s/src/components/List/index.js");
|
|
39
|
-
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/List/index.js");
|
|
40
|
-
})();
|
|
41
|
-
;
|
|
42
|
-
(function () {
|
|
43
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
44
|
-
leaveModule && leaveModule(module);
|
|
45
|
-
})();
|
|
46
|
-
;
|
|
47
|
-
(function () {
|
|
48
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
49
|
-
if (!reactHotLoader) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
reactHotLoader.register(LoadableList, "LoadableList", "/home/vsts/work/1/s/src/components/List/index.js");
|
|
53
|
-
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/List/index.js");
|
|
54
|
-
})();
|
|
55
|
-
;
|
|
56
|
-
(function () {
|
|
57
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
58
|
-
leaveModule && leaveModule(module);
|
|
59
|
-
})();
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = exports.Dialog = void 0;
|
|
5
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
6
|
-
var _utils = require("../../utils");
|
|
7
|
-
var _withClickOutside = _interopRequireDefault(require("../../hocs/withClickOutside"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
10
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
-
(function () {
|
|
12
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
13
|
-
enterModule && enterModule(module);
|
|
14
|
-
})();
|
|
15
|
-
(function () {
|
|
16
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
17
|
-
enterModule && enterModule(module);
|
|
18
|
-
})();
|
|
19
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
23
|
-
return a;
|
|
24
|
-
};
|
|
25
|
-
var darkDialogStyle = (0, _styledComponents.css)(["background-color:", ";border-radius:15px;"], (0, _utils.getThemeProp)(["colors", "bgDark"], "#333333"));
|
|
26
|
-
var dialogLook = {
|
|
27
|
-
default: (0, _styledComponents.css)(["background-color:white;"]),
|
|
28
|
-
dark: darkDialogStyle
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// TODO: Add light dialog style for other dialogs, switching mechanism
|
|
32
|
-
var Dialog = exports.Dialog = _styledComponents.default.div.withConfig({
|
|
33
|
-
displayName: "Dialog",
|
|
34
|
-
componentId: "sc-7ohuah-0"
|
|
35
|
-
})(["flex:0 0 auto;margin:auto;align-self:center;z-index:10000;", ";"], function (props) {
|
|
36
|
-
return dialogLook[props.look];
|
|
37
|
-
});
|
|
38
|
-
Dialog.defaultProps = {
|
|
39
|
-
look: "default"
|
|
40
|
-
};
|
|
41
|
-
var _default = (0, _withClickOutside.default)(Dialog);
|
|
42
|
-
var _default2 = _default;
|
|
43
|
-
var _default3 = exports.default = _default2;
|
|
44
|
-
;
|
|
45
|
-
(function () {
|
|
46
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
47
|
-
if (!reactHotLoader) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
reactHotLoader.register(darkDialogStyle, "darkDialogStyle", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
|
|
51
|
-
reactHotLoader.register(dialogLook, "dialogLook", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
|
|
52
|
-
reactHotLoader.register(Dialog, "Dialog", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
|
|
53
|
-
reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
|
|
54
|
-
})();
|
|
55
|
-
;
|
|
56
|
-
(function () {
|
|
57
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
58
|
-
leaveModule && leaveModule(module);
|
|
59
|
-
})();
|
|
60
|
-
;
|
|
61
|
-
(function () {
|
|
62
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
63
|
-
if (!reactHotLoader) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
reactHotLoader.register(darkDialogStyle, "darkDialogStyle", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
|
|
67
|
-
reactHotLoader.register(dialogLook, "dialogLook", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
|
|
68
|
-
reactHotLoader.register(Dialog, "Dialog", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
|
|
69
|
-
reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Modal/Dialog.js");
|
|
70
|
-
})();
|
|
71
|
-
;
|
|
72
|
-
(function () {
|
|
73
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
74
|
-
leaveModule && leaveModule(module);
|
|
75
|
-
})();
|