@gridsuite/commons-ui 0.35.1 → 0.35.3
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/README.md +2 -2
- package/es/components/AuthenticationRouter/AuthenticationRouter.js +102 -0
- package/es/components/AuthenticationRouter/index.js +7 -0
- package/{lib → es}/components/CardErrorBoundary/card-error-boundary.js +35 -42
- package/es/components/CardErrorBoundary/index.js +7 -0
- package/es/components/ElementSearchDialog/element-search-dialog.js +120 -0
- package/{lib → es}/components/ElementSearchDialog/equipment-item.js +26 -32
- package/es/components/ElementSearchDialog/index.js +8 -0
- package/es/components/ElementSearchDialog/tag-renderer.js +29 -0
- package/{lib → es}/components/FlatParameters/FlatParameters.js +42 -49
- package/es/components/FlatParameters/index.js +8 -0
- package/es/components/Login/Login.js +79 -0
- package/es/components/Login/Logout.js +78 -0
- package/es/components/Login/index.js +7 -0
- package/es/components/MuiVirtualizedTable/ColumnHeader.js +125 -0
- package/{lib → es}/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +18 -25
- package/{lib → es}/components/MuiVirtualizedTable/MuiVirtualizedTable.js +88 -99
- package/es/components/MuiVirtualizedTable/index.js +9 -0
- package/es/components/OverflowableText/index.js +7 -0
- package/{lib → es}/components/OverflowableText/overflowable-text.js +20 -29
- package/es/components/ReportViewer/index.js +7 -0
- package/{lib → es}/components/ReportViewer/log-report-item.js +1 -6
- package/{lib → es}/components/ReportViewer/log-report.js +8 -13
- package/{lib → es}/components/ReportViewer/log-table.js +14 -24
- package/{lib → es}/components/ReportViewer/report-item.js +23 -30
- package/{lib → es}/components/ReportViewer/report-tree-view-context.js +3 -9
- package/{lib → es}/components/ReportViewer/report-viewer.js +32 -40
- package/es/components/ReportViewerDialog/index.js +7 -0
- package/es/components/ReportViewerDialog/report-viewer-dialog.js +67 -0
- package/es/components/SignInCallbackHandler/SignInCallbackHandler.js +19 -0
- package/es/components/SignInCallbackHandler/index.js +7 -0
- package/es/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +19 -0
- package/es/components/SilentRenewCallbackHandler/index.js +7 -0
- package/es/components/SnackbarProvider/SnackbarProvider.js +39 -0
- package/es/components/SnackbarProvider/index.js +7 -0
- package/es/components/TopBar/TopBar.js +565 -0
- package/es/components/TopBar/index.js +7 -0
- package/{lib → es}/components/TreeViewFinder/TreeViewFinder.js +59 -66
- package/es/components/TreeViewFinder/index.js +7 -0
- package/es/components/react-hook-form/autocomplete-input.js +110 -0
- package/es/components/react-hook-form/booleans/boolean-input.js +56 -0
- package/es/components/react-hook-form/booleans/checkbox-input.js +28 -0
- package/es/components/react-hook-form/booleans/switch-input.js +28 -0
- package/es/components/react-hook-form/error-management/error-input.js +50 -0
- package/es/components/react-hook-form/error-management/field-error-alert.js +22 -0
- package/es/components/react-hook-form/error-management/mid-form-error.js +25 -0
- package/es/components/react-hook-form/numbers/float-input.js +40 -0
- package/es/components/react-hook-form/numbers/integer-input.js +35 -0
- package/es/components/react-hook-form/numbers/utils.js +6 -0
- package/es/components/react-hook-form/radio-input.js +55 -0
- package/es/components/react-hook-form/select-input.js +40 -0
- package/es/components/react-hook-form/slider-input.js +48 -0
- package/es/components/react-hook-form/text-input.js +100 -0
- package/es/components/react-hook-form/utils/field-label.js +15 -0
- package/es/components/react-hook-form/utils/functions.js +42 -0
- package/es/components/react-hook-form/utils/submit-button.js +25 -0
- package/es/components/react-hook-form/utils/text-field-with-adornment.js +92 -0
- package/{lib → es}/components/translations/card-error-boundary-en.js +1 -7
- package/{lib → es}/components/translations/card-error-boundary-fr.js +1 -7
- package/{lib → es}/components/translations/element-search-en.js +1 -7
- package/{lib → es}/components/translations/element-search-fr.js +1 -7
- package/{lib → es}/components/translations/equipment-search-en.js +1 -7
- package/{lib → es}/components/translations/equipment-search-fr.js +1 -7
- package/es/components/translations/inputs-en.js +25 -0
- package/es/components/translations/inputs-fr.js +25 -0
- package/{lib → es}/components/translations/login-en.js +1 -7
- package/{lib → es}/components/translations/login-fr.js +1 -7
- package/{lib → es}/components/translations/report-viewer-en.js +1 -7
- package/{lib → es}/components/translations/report-viewer-fr.js +1 -7
- package/{lib → es}/components/translations/table-en.js +1 -7
- package/{lib → es}/components/translations/table-fr.js +1 -7
- package/{lib → es}/components/translations/top-bar-en.js +1 -7
- package/{lib → es}/components/translations/top-bar-fr.js +1 -7
- package/{lib → es}/components/translations/treeview-finder-en.js +1 -7
- package/{lib → es}/components/translations/treeview-finder-fr.js +1 -7
- package/{lib → es}/hooks/useDebounce.js +7 -12
- package/{lib → es}/hooks/useIntlRef.js +7 -10
- package/{lib → es}/hooks/useSnackMessage.js +9 -13
- package/es/index.js +62 -0
- package/{lib → es}/utils/AuthService.js +23 -34
- package/es/utils/ElementType.js +37 -0
- package/{lib → es}/utils/EquipmentType.js +8 -18
- package/{lib → es}/utils/UserManagerMock.js +2 -7
- package/es/utils/actions.js +65 -0
- package/{lib → es}/utils/algos.js +1 -5
- package/{lib → es}/utils/styles.js +4 -11
- package/package.json +11 -4
- package/lib/components/AuthenticationRouter/AuthenticationRouter.js +0 -111
- package/lib/components/AuthenticationRouter/index.js +0 -8
- package/lib/components/CardErrorBoundary/index.js +0 -8
- package/lib/components/ElementSearchDialog/element-search-dialog.js +0 -127
- package/lib/components/ElementSearchDialog/index.js +0 -9
- package/lib/components/ElementSearchDialog/tag-renderer.js +0 -36
- package/lib/components/FlatParameters/index.js +0 -8
- package/lib/components/Login/Login.js +0 -86
- package/lib/components/Login/Logout.js +0 -85
- package/lib/components/Login/index.js +0 -8
- package/lib/components/MuiVirtualizedTable/ColumnHeader.js +0 -134
- package/lib/components/MuiVirtualizedTable/index.js +0 -12
- package/lib/components/OverflowableText/index.js +0 -8
- package/lib/components/ReportViewer/index.js +0 -8
- package/lib/components/ReportViewerDialog/index.js +0 -8
- package/lib/components/ReportViewerDialog/report-viewer-dialog.js +0 -75
- package/lib/components/SignInCallbackHandler/SignInCallbackHandler.js +0 -27
- package/lib/components/SignInCallbackHandler/index.js +0 -8
- package/lib/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +0 -27
- package/lib/components/SilentRenewCallbackHandler/index.js +0 -8
- package/lib/components/SnackbarProvider/SnackbarProvider.js +0 -45
- package/lib/components/SnackbarProvider/index.js +0 -8
- package/lib/components/TopBar/TopBar.js +0 -576
- package/lib/components/TopBar/index.js +0 -8
- package/lib/components/TreeViewFinder/index.js +0 -9
- package/lib/index.js +0 -105
- package/lib/utils/ElementType.js +0 -45
- package/lib/utils/actions.js +0 -83
- /package/{lib → es}/components/images/powsybl_logo.svg +0 -0
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports["default"] = exports.FlatParameters = void 0;
|
|
5
|
-
exports.extractDefault = extractDefault;
|
|
6
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
-
var _material = require("@mui/material");
|
|
8
|
-
var _reactIntl = require("react-intl");
|
|
9
|
-
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); }
|
|
10
|
-
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; }
|
|
11
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12
2
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
3
|
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); }
|
|
14
|
-
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; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
4
|
+
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; }
|
|
5
|
+
/**
|
|
6
|
+
* Copyright (c) 2023, RTE (http://www.rte-france.com)
|
|
7
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
8
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
9
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import React, { useCallback, useState } from 'react';
|
|
13
|
+
import { Autocomplete, Chip, List, ListItem, MenuItem, Select, Switch, TextField, Tooltip, Typography, Divider } from '@mui/material';
|
|
14
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
20
15
|
var styles = {
|
|
21
16
|
paramList: {
|
|
22
17
|
width: '100%',
|
|
@@ -41,7 +36,7 @@ var FloatRE = /^-?\d*[.,]?\d*([eE]-?\d*)?$/;
|
|
|
41
36
|
var IntegerRE = /^-?\d*$/;
|
|
42
37
|
var ListRE = /^\[(.*)]$/;
|
|
43
38
|
var sepRE = /[, ]/;
|
|
44
|
-
function extractDefault(paramDescription) {
|
|
39
|
+
export function extractDefault(paramDescription) {
|
|
45
40
|
var d = paramDescription.defaultValue;
|
|
46
41
|
if (paramDescription.type === 'BOOLEAN') {
|
|
47
42
|
return !!d;
|
|
@@ -92,7 +87,7 @@ function longestCommonPrefix(stringList) {
|
|
|
92
87
|
* @param onChange (paramName, newValue, isInEdition)
|
|
93
88
|
* @param variant style variant for TextField, Autocomplete and Select parameter fields
|
|
94
89
|
*/
|
|
95
|
-
var FlatParameters = function FlatParameters(_ref) {
|
|
90
|
+
export var FlatParameters = function FlatParameters(_ref) {
|
|
96
91
|
var paramsAsArray = _ref.paramsAsArray,
|
|
97
92
|
initValues = _ref.initValues,
|
|
98
93
|
onChange = _ref.onChange,
|
|
@@ -100,25 +95,25 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
100
95
|
variant = _ref$variant === void 0 ? 'outlined' : _ref$variant,
|
|
101
96
|
_ref$showSeparator = _ref.showSeparator,
|
|
102
97
|
showSeparator = _ref$showSeparator === void 0 ? false : _ref$showSeparator;
|
|
103
|
-
var intl =
|
|
98
|
+
var intl = useIntl();
|
|
104
99
|
var longestPrefix = longestCommonPrefix(paramsAsArray.map(function (m) {
|
|
105
100
|
return m.name;
|
|
106
101
|
}));
|
|
107
102
|
var lastDotIndex = longestPrefix.lastIndexOf('.');
|
|
108
103
|
var prefix = longestPrefix.slice(0, lastDotIndex + 1);
|
|
109
|
-
var _useState =
|
|
104
|
+
var _useState = useState(null),
|
|
110
105
|
uncommitted = _useState[0],
|
|
111
106
|
setUncommitted = _useState[1];
|
|
112
|
-
var _useState2 =
|
|
107
|
+
var _useState2 = useState(null),
|
|
113
108
|
inEditionParam = _useState2[0],
|
|
114
109
|
setInEditionParam = _useState2[1];
|
|
115
|
-
var getTranslatedValue =
|
|
110
|
+
var getTranslatedValue = useCallback(function (prefix, value) {
|
|
116
111
|
return intl.formatMessage({
|
|
117
112
|
id: prefix + '.' + value,
|
|
118
113
|
defaultMessage: value
|
|
119
114
|
});
|
|
120
115
|
}, [intl]);
|
|
121
|
-
var sortPossibleValues =
|
|
116
|
+
var sortPossibleValues = useCallback(function (prefix, values) {
|
|
122
117
|
if (values == null) {
|
|
123
118
|
return [];
|
|
124
119
|
}
|
|
@@ -132,7 +127,7 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
132
127
|
return a.message.localeCompare(b.message);
|
|
133
128
|
});
|
|
134
129
|
}, [getTranslatedValue]);
|
|
135
|
-
var onFieldChange =
|
|
130
|
+
var onFieldChange = useCallback(function (value, param) {
|
|
136
131
|
var paramName = param.name;
|
|
137
132
|
var isInEdition = inEditionParam === paramName;
|
|
138
133
|
if (isInEdition) {
|
|
@@ -146,7 +141,7 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
146
141
|
}
|
|
147
142
|
}
|
|
148
143
|
}, [inEditionParam, onChange]);
|
|
149
|
-
var onUncommitted =
|
|
144
|
+
var onUncommitted = useCallback(function (param, inEdit) {
|
|
150
145
|
if (inEdit) {
|
|
151
146
|
setInEditionParam(param.name);
|
|
152
147
|
} else {
|
|
@@ -192,7 +187,7 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
192
187
|
var fieldValue = mixInitAndDefault(param);
|
|
193
188
|
switch (param.type) {
|
|
194
189
|
case 'BOOLEAN':
|
|
195
|
-
return /*#__PURE__*/
|
|
190
|
+
return /*#__PURE__*/React.createElement(Switch, {
|
|
196
191
|
checked: !!fieldValue,
|
|
197
192
|
onChange: function onChange(e) {
|
|
198
193
|
return onFieldChange(e.target.checked, param);
|
|
@@ -200,7 +195,7 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
200
195
|
});
|
|
201
196
|
case 'DOUBLE':
|
|
202
197
|
var err = isNaN(fieldValue) || typeof fieldValue !== 'number' && !!fieldValue && isNaN(fieldValue - 0);
|
|
203
|
-
return /*#__PURE__*/
|
|
198
|
+
return /*#__PURE__*/React.createElement(TextField, {
|
|
204
199
|
size: 'small',
|
|
205
200
|
sx: {
|
|
206
201
|
width: '50%'
|
|
@@ -227,7 +222,7 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
227
222
|
variant: variant
|
|
228
223
|
});
|
|
229
224
|
case 'INTEGER':
|
|
230
|
-
return /*#__PURE__*/
|
|
225
|
+
return /*#__PURE__*/React.createElement(TextField, {
|
|
231
226
|
size: 'small',
|
|
232
227
|
sx: {
|
|
233
228
|
width: '50%'
|
|
@@ -254,7 +249,7 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
254
249
|
});
|
|
255
250
|
case 'STRING_LIST':
|
|
256
251
|
if (param.possibleValues) {
|
|
257
|
-
return /*#__PURE__*/
|
|
252
|
+
return /*#__PURE__*/React.createElement(Autocomplete, {
|
|
258
253
|
fullWidth: true,
|
|
259
254
|
multiple: true,
|
|
260
255
|
size: 'small',
|
|
@@ -270,7 +265,7 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
270
265
|
value: fieldValue,
|
|
271
266
|
renderTags: function renderTags(values, getTagProps) {
|
|
272
267
|
return values.map(function (value, index) {
|
|
273
|
-
return /*#__PURE__*/
|
|
268
|
+
return /*#__PURE__*/React.createElement(Chip, _extends({
|
|
274
269
|
label: getTranslatedValue(param.name, value)
|
|
275
270
|
}, getTagProps({
|
|
276
271
|
index: index
|
|
@@ -278,14 +273,14 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
278
273
|
});
|
|
279
274
|
},
|
|
280
275
|
renderInput: function renderInput(inputProps) {
|
|
281
|
-
return /*#__PURE__*/
|
|
276
|
+
return /*#__PURE__*/React.createElement(TextField, _extends({}, inputProps, {
|
|
282
277
|
variant: variant
|
|
283
278
|
}));
|
|
284
279
|
}
|
|
285
280
|
});
|
|
286
281
|
} else {
|
|
287
282
|
// no possible values => free user inputs
|
|
288
|
-
return /*#__PURE__*/
|
|
283
|
+
return /*#__PURE__*/React.createElement(Autocomplete, {
|
|
289
284
|
multiple: true,
|
|
290
285
|
freeSolo: true,
|
|
291
286
|
autoSelect: true,
|
|
@@ -300,7 +295,7 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
300
295
|
value: fieldValue,
|
|
301
296
|
renderTags: function renderTags(values, getTagProps) {
|
|
302
297
|
return values.map(function (value, index) {
|
|
303
|
-
return /*#__PURE__*/
|
|
298
|
+
return /*#__PURE__*/React.createElement(Chip, _extends({
|
|
304
299
|
id: 'chip_' + value,
|
|
305
300
|
size: 'small',
|
|
306
301
|
label: value
|
|
@@ -310,7 +305,7 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
310
305
|
});
|
|
311
306
|
},
|
|
312
307
|
renderInput: function renderInput(inputProps) {
|
|
313
|
-
return /*#__PURE__*/
|
|
308
|
+
return /*#__PURE__*/React.createElement(TextField, _extends({}, inputProps, {
|
|
314
309
|
variant: variant
|
|
315
310
|
}));
|
|
316
311
|
}
|
|
@@ -318,7 +313,7 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
318
313
|
}
|
|
319
314
|
case 'STRING':
|
|
320
315
|
if (param.possibleValues) {
|
|
321
|
-
return /*#__PURE__*/
|
|
316
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
|
|
322
317
|
labelId: param.name,
|
|
323
318
|
value: fieldValue !== null && fieldValue !== void 0 ? fieldValue : '',
|
|
324
319
|
onChange: function onChange(ev) {
|
|
@@ -330,15 +325,15 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
330
325
|
},
|
|
331
326
|
variant: variant
|
|
332
327
|
}, sortPossibleValues(param.name, param.possibleValues).map(function (value) {
|
|
333
|
-
return /*#__PURE__*/
|
|
328
|
+
return /*#__PURE__*/React.createElement(MenuItem, {
|
|
334
329
|
key: value.id,
|
|
335
330
|
value: value.id
|
|
336
|
-
}, /*#__PURE__*/
|
|
331
|
+
}, /*#__PURE__*/React.createElement(Typography, null, value.message));
|
|
337
332
|
})));
|
|
338
333
|
}
|
|
339
334
|
// else fallthrough to default
|
|
340
335
|
default:
|
|
341
|
-
return /*#__PURE__*/
|
|
336
|
+
return /*#__PURE__*/React.createElement(TextField, {
|
|
342
337
|
sx: {
|
|
343
338
|
width: '50%'
|
|
344
339
|
},
|
|
@@ -357,28 +352,26 @@ var FlatParameters = function FlatParameters(_ref) {
|
|
|
357
352
|
});
|
|
358
353
|
}
|
|
359
354
|
};
|
|
360
|
-
return /*#__PURE__*/
|
|
355
|
+
return /*#__PURE__*/React.createElement(List, {
|
|
361
356
|
sx: styles.paramList
|
|
362
357
|
}, paramsAsArray.map(function (param, index) {
|
|
363
|
-
return /*#__PURE__*/
|
|
358
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
364
359
|
key: param.name
|
|
365
|
-
}, /*#__PURE__*/
|
|
360
|
+
}, /*#__PURE__*/React.createElement(ListItem, {
|
|
366
361
|
sx: styles.paramListItem
|
|
367
|
-
}, /*#__PURE__*/
|
|
368
|
-
title: /*#__PURE__*/
|
|
362
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
363
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
369
364
|
id: param.name + '.desc',
|
|
370
365
|
defaultMessage: param.description
|
|
371
366
|
}),
|
|
372
367
|
enterDelay: 1200,
|
|
373
368
|
key: param.name
|
|
374
|
-
}, /*#__PURE__*/
|
|
369
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
375
370
|
sx: styles.paramName
|
|
376
|
-
}, /*#__PURE__*/
|
|
371
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
377
372
|
id: param.name,
|
|
378
373
|
defaultMessage: param.name.slice(prefix.length)
|
|
379
|
-
}))), renderField(param)), showSeparator && index !== paramsAsArray.length - 1 && /*#__PURE__*/
|
|
374
|
+
}))), renderField(param)), showSeparator && index !== paramsAsArray.length - 1 && /*#__PURE__*/React.createElement(Divider, null));
|
|
380
375
|
}));
|
|
381
376
|
};
|
|
382
|
-
|
|
383
|
-
var _default = FlatParameters;
|
|
384
|
-
exports["default"] = _default;
|
|
377
|
+
export default FlatParameters;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export { default } from './FlatParameters';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import Avatar from '@mui/material/Avatar';
|
|
10
|
+
import Button from '@mui/material/Button';
|
|
11
|
+
import Link from '@mui/material/Link';
|
|
12
|
+
import Box from '@mui/material/Box';
|
|
13
|
+
import LockOutlinedIcon from '@mui/icons-material/LockOutlined';
|
|
14
|
+
import Typography from '@mui/material/Typography';
|
|
15
|
+
import Container from '@mui/material/Container';
|
|
16
|
+
import { FormattedMessage } from 'react-intl';
|
|
17
|
+
var styles = {
|
|
18
|
+
paper: function paper(theme) {
|
|
19
|
+
return {
|
|
20
|
+
marginTop: theme.spacing(8),
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'column',
|
|
23
|
+
alignItems: 'center'
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
avatar: function avatar(theme) {
|
|
27
|
+
return {
|
|
28
|
+
margin: theme.spacing(1),
|
|
29
|
+
backgroundColor: theme.palette.secondary.main
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
submit: function submit(theme) {
|
|
33
|
+
return {
|
|
34
|
+
margin: theme.spacing(3, 0, 2),
|
|
35
|
+
borderRadius: '30px'
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
logo: {
|
|
39
|
+
width: 64,
|
|
40
|
+
height: 64
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var Login = function Login(_ref) {
|
|
44
|
+
var onLoginClick = _ref.onLoginClick,
|
|
45
|
+
disabled = _ref.disabled;
|
|
46
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
47
|
+
component: "main",
|
|
48
|
+
maxWidth: "xs"
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
50
|
+
sx: styles.paper
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
52
|
+
sx: styles.avatar
|
|
53
|
+
}, /*#__PURE__*/React.createElement(LockOutlinedIcon, null)), /*#__PURE__*/React.createElement(Typography, {
|
|
54
|
+
component: "h1",
|
|
55
|
+
variant: "h5"
|
|
56
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
57
|
+
id: "login/login",
|
|
58
|
+
defaultMessage: 'login'
|
|
59
|
+
}), ' ', "?"), /*#__PURE__*/React.createElement(Button, {
|
|
60
|
+
disabled: disabled,
|
|
61
|
+
fullWidth: true,
|
|
62
|
+
variant: "contained",
|
|
63
|
+
sx: styles.submit,
|
|
64
|
+
onClick: onLoginClick
|
|
65
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
66
|
+
id: "login/connection",
|
|
67
|
+
defaultMessage: 'connection'
|
|
68
|
+
}))), /*#__PURE__*/React.createElement(Box, {
|
|
69
|
+
mt: 2
|
|
70
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
71
|
+
variant: "body2",
|
|
72
|
+
color: "textSecondary",
|
|
73
|
+
align: "center"
|
|
74
|
+
}, 'Copyright © ', /*#__PURE__*/React.createElement(Link, {
|
|
75
|
+
color: "inherit",
|
|
76
|
+
href: "#"
|
|
77
|
+
}, "GridSuite"), ' ', new Date().getFullYear(), '.')));
|
|
78
|
+
};
|
|
79
|
+
export default Login;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import Avatar from '@mui/material/Avatar';
|
|
10
|
+
import Button from '@mui/material/Button';
|
|
11
|
+
import Link from '@mui/material/Link';
|
|
12
|
+
import Box from '@mui/material/Box';
|
|
13
|
+
import LogoutOutlinedIcon from '@mui/icons-material/LogoutOutlined';
|
|
14
|
+
import Typography from '@mui/material/Typography';
|
|
15
|
+
import Container from '@mui/material/Container';
|
|
16
|
+
import { FormattedMessage } from 'react-intl';
|
|
17
|
+
var styles = {
|
|
18
|
+
paper: function paper(theme) {
|
|
19
|
+
return {
|
|
20
|
+
marginTop: theme.spacing(8),
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'column',
|
|
23
|
+
alignItems: 'center'
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
avatar: function avatar(theme) {
|
|
27
|
+
return {
|
|
28
|
+
margin: theme.spacing(1),
|
|
29
|
+
backgroundColor: theme.palette.error.main
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
submit: function submit(theme) {
|
|
33
|
+
return {
|
|
34
|
+
margin: theme.spacing(3, 0, 2),
|
|
35
|
+
borderRadius: '30px'
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var Logout = function Logout(_ref) {
|
|
40
|
+
var onLogoutClick = _ref.onLogoutClick,
|
|
41
|
+
disabled = _ref.disabled;
|
|
42
|
+
function Copyright() {
|
|
43
|
+
return /*#__PURE__*/React.createElement(Typography, {
|
|
44
|
+
variant: "body2",
|
|
45
|
+
color: "textSecondary",
|
|
46
|
+
align: "center"
|
|
47
|
+
}, 'Copyright © ', /*#__PURE__*/React.createElement(Link, {
|
|
48
|
+
color: "inherit",
|
|
49
|
+
href: "#"
|
|
50
|
+
}, "GridSuite"), ' ', new Date().getFullYear(), '.');
|
|
51
|
+
}
|
|
52
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
53
|
+
component: "main",
|
|
54
|
+
maxWidth: "xs"
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
56
|
+
sx: styles.paper
|
|
57
|
+
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
58
|
+
sx: styles.avatar
|
|
59
|
+
}, /*#__PURE__*/React.createElement(LogoutOutlinedIcon, null)), /*#__PURE__*/React.createElement(Typography, {
|
|
60
|
+
component: "h1",
|
|
61
|
+
variant: "h5"
|
|
62
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
63
|
+
id: "login/logout",
|
|
64
|
+
defaultMessage: 'logout'
|
|
65
|
+
}), ' ', "?"), /*#__PURE__*/React.createElement(Button, {
|
|
66
|
+
disabled: disabled,
|
|
67
|
+
fullWidth: true,
|
|
68
|
+
variant: "contained",
|
|
69
|
+
sx: styles.submit,
|
|
70
|
+
onClick: onLogoutClick
|
|
71
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
72
|
+
id: "login/logout",
|
|
73
|
+
defaultMessage: 'logout'
|
|
74
|
+
}))), /*#__PURE__*/React.createElement(Box, {
|
|
75
|
+
mt: 2
|
|
76
|
+
}, /*#__PURE__*/React.createElement(Copyright, null)));
|
|
77
|
+
};
|
|
78
|
+
export default Logout;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export { default } from './Login';
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React, { useRef } from 'react';
|
|
9
|
+
import FilterAltOutlinedIcon from '@mui/icons-material/FilterAltOutlined';
|
|
10
|
+
import { styled } from '@mui/system';
|
|
11
|
+
import Box from '@mui/material/Box';
|
|
12
|
+
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
|
|
13
|
+
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
|
14
|
+
import { mergeSx } from '../../utils/styles';
|
|
15
|
+
var styles = {
|
|
16
|
+
label: {
|
|
17
|
+
fontWeight: 'bold',
|
|
18
|
+
fontSize: '0.875rem' // to mimic TableCellRoot 'binding'
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
divFlex: {
|
|
22
|
+
display: 'flex',
|
|
23
|
+
flexDirection: 'row',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
height: '100%'
|
|
26
|
+
},
|
|
27
|
+
divNum: {
|
|
28
|
+
flexDirection: 'row-reverse',
|
|
29
|
+
textAlign: 'right'
|
|
30
|
+
},
|
|
31
|
+
sortDiv: {
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flexDirection: 'column',
|
|
34
|
+
alignItems: 'center'
|
|
35
|
+
},
|
|
36
|
+
sortButton: {
|
|
37
|
+
fill: 'currentcolor'
|
|
38
|
+
},
|
|
39
|
+
filterButton: {
|
|
40
|
+
stroke: 'currentcolor'
|
|
41
|
+
},
|
|
42
|
+
filterTooLossy: function filterTooLossy(theme) {
|
|
43
|
+
return {
|
|
44
|
+
stroke: theme.palette.secondary.main
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
transparent: {
|
|
48
|
+
opacity: 0
|
|
49
|
+
},
|
|
50
|
+
hovered: {
|
|
51
|
+
opacity: 0.5
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// Shows an arrow pointing to smaller value when sorting is active.
|
|
56
|
+
// signedRank of 0 means no sorting, we only show the arrow on hovering of the header,
|
|
57
|
+
// in the same direction as it will get if clicked (once).
|
|
58
|
+
// signedRank > 0 means sorted by ascending value from lower indices to higher indices
|
|
59
|
+
// so lesser values are at top, so the upward arrow
|
|
60
|
+
var SortButton = function SortButton(props) {
|
|
61
|
+
var sortRank = Math.abs(props.signedRank);
|
|
62
|
+
var visibilityStyle = (!props.signedRank || undefined) && (props.headerHovered ? styles.hovered : styles.transparent);
|
|
63
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
64
|
+
sx: styles.sortDiv,
|
|
65
|
+
onClick: props.onClick
|
|
66
|
+
}, props.signedRank >= 0 ? /*#__PURE__*/React.createElement(ArrowUpwardIcon, {
|
|
67
|
+
sx: visibilityStyle
|
|
68
|
+
}) : /*#__PURE__*/React.createElement(ArrowDownwardIcon, {
|
|
69
|
+
sx: visibilityStyle
|
|
70
|
+
}), sortRank > 1 && !props.hovered && /*#__PURE__*/React.createElement("sub", null, sortRank));
|
|
71
|
+
};
|
|
72
|
+
var FilterButton = function FilterButton(props) {
|
|
73
|
+
var visibilityStyle = !props.filterLevel && (props.headerHovered ? styles.hovered : styles.transparent);
|
|
74
|
+
return /*#__PURE__*/React.createElement(FilterAltOutlinedIcon, {
|
|
75
|
+
onClick: props.onClick,
|
|
76
|
+
sx: mergeSx(styles.filterButton, props.filterLevel > 1 && styles.filterTooLossy, visibilityStyle)
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
export var ColumnHeader = React.forwardRef(function (props, ref) {
|
|
80
|
+
var className = props.className,
|
|
81
|
+
label = props.label,
|
|
82
|
+
numeric = props.numeric,
|
|
83
|
+
sortSignedRank = props.sortSignedRank,
|
|
84
|
+
filterLevel = props.filterLevel,
|
|
85
|
+
onSortClick = props.onSortClick,
|
|
86
|
+
onFilterClick = props.onFilterClick,
|
|
87
|
+
onContextMenu = props.onContextMenu,
|
|
88
|
+
style = props.style;
|
|
89
|
+
var _React$useState = React.useState(),
|
|
90
|
+
hovered = _React$useState[0],
|
|
91
|
+
setHovered = _React$useState[1];
|
|
92
|
+
var onHover = React.useCallback(function (evt) {
|
|
93
|
+
setHovered(evt.type === 'mouseenter');
|
|
94
|
+
}, []);
|
|
95
|
+
var topmostDiv = useRef();
|
|
96
|
+
var handleFilterClick = React.useMemo(function () {
|
|
97
|
+
if (!onFilterClick) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
return function (evt) {
|
|
101
|
+
onFilterClick(evt, topmostDiv.current);
|
|
102
|
+
};
|
|
103
|
+
}, [onFilterClick]);
|
|
104
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
105
|
+
ref: topmostDiv,
|
|
106
|
+
onMouseEnter: onHover,
|
|
107
|
+
onMouseLeave: onHover,
|
|
108
|
+
sx: mergeSx(styles.divFlex, numeric && styles.divNum),
|
|
109
|
+
className: className,
|
|
110
|
+
style: style,
|
|
111
|
+
onContextMenu: onContextMenu
|
|
112
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
113
|
+
ref: ref,
|
|
114
|
+
sx: styles.label
|
|
115
|
+
}, label), onSortClick && /*#__PURE__*/React.createElement(SortButton, {
|
|
116
|
+
headerHovered: hovered,
|
|
117
|
+
onClick: onSortClick,
|
|
118
|
+
signedRank: sortSignedRank
|
|
119
|
+
}), handleFilterClick && /*#__PURE__*/React.createElement(FilterButton, {
|
|
120
|
+
headerHovered: hovered,
|
|
121
|
+
onClick: handleFilterClick,
|
|
122
|
+
filterLevel: filterLevel
|
|
123
|
+
}));
|
|
124
|
+
});
|
|
125
|
+
export default styled(ColumnHeader)({});
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.noOpHelper = exports.getHelper = exports.forTesting = exports.collectibleHelper = exports.KeyedColumnsRowIndexer = exports.CHANGE_WAYS = void 0;
|
|
5
|
-
var _algos = require("../../utils/algos");
|
|
6
1
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
2
|
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); }
|
|
8
3
|
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; }
|
|
@@ -10,13 +5,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
11
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
13
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
+
/**
|
|
10
|
+
* Copyright (c) 2022, RTE (http://www.rte-france.com)
|
|
11
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
12
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
13
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { equalsArray } from '../../utils/algos';
|
|
17
|
+
export var CHANGE_WAYS = {
|
|
20
18
|
SIMPLE: 'Simple',
|
|
21
19
|
TAIL: 'Tail',
|
|
22
20
|
AMEND: 'Amend',
|
|
@@ -39,8 +37,8 @@ const someTypicalColumns = [
|
|
|
39
37
|
},
|
|
40
38
|
];
|
|
41
39
|
*/
|
|
42
|
-
|
|
43
|
-
var noOpHelper = Object.freeze({
|
|
40
|
+
|
|
41
|
+
export var noOpHelper = Object.freeze({
|
|
44
42
|
debugName: 'noOp',
|
|
45
43
|
maintainsStats: false,
|
|
46
44
|
initStat: function initStat() {
|
|
@@ -51,7 +49,6 @@ var noOpHelper = Object.freeze({
|
|
|
51
49
|
return true;
|
|
52
50
|
}
|
|
53
51
|
});
|
|
54
|
-
exports.noOpHelper = noOpHelper;
|
|
55
52
|
var numericHelper = Object.freeze({
|
|
56
53
|
debugName: 'num',
|
|
57
54
|
maintainsStats: true,
|
|
@@ -73,7 +70,7 @@ var numericHelper = Object.freeze({
|
|
|
73
70
|
return true;
|
|
74
71
|
}
|
|
75
72
|
});
|
|
76
|
-
var collectibleHelper = Object.freeze({
|
|
73
|
+
export var collectibleHelper = Object.freeze({
|
|
77
74
|
debugName: 'collectible',
|
|
78
75
|
maintainsStats: true,
|
|
79
76
|
initStat: function initStat() {
|
|
@@ -96,8 +93,7 @@ var collectibleHelper = Object.freeze({
|
|
|
96
93
|
});
|
|
97
94
|
}
|
|
98
95
|
});
|
|
99
|
-
|
|
100
|
-
var getHelper = function getHelper(column) {
|
|
96
|
+
export var getHelper = function getHelper(column) {
|
|
101
97
|
if (column === null || column === void 0 ? void 0 : column.numeric) {
|
|
102
98
|
return numericHelper;
|
|
103
99
|
} else if (!(column === null || column === void 0 ? void 0 : column.nostat)) {
|
|
@@ -112,8 +108,7 @@ var getHelper = function getHelper(column) {
|
|
|
112
108
|
* for filtering, grouping and multi-column sorting via
|
|
113
109
|
* a view index to model index array.
|
|
114
110
|
*/
|
|
115
|
-
|
|
116
|
-
var KeyedColumnsRowIndexer = /*#__PURE__*/function () {
|
|
111
|
+
export var KeyedColumnsRowIndexer = /*#__PURE__*/function () {
|
|
117
112
|
function KeyedColumnsRowIndexer(isThreeState, singleColumnByDefault, delegatorCallback, versionSetter) {
|
|
118
113
|
var _this = this;
|
|
119
114
|
if (isThreeState === void 0) {
|
|
@@ -466,7 +461,6 @@ var KeyedColumnsRowIndexer = /*#__PURE__*/function () {
|
|
|
466
461
|
}]);
|
|
467
462
|
return KeyedColumnsRowIndexer;
|
|
468
463
|
}();
|
|
469
|
-
exports.KeyedColumnsRowIndexer = KeyedColumnsRowIndexer;
|
|
470
464
|
var giveDirSignFor = function giveDirSignFor(fuzzySign) {
|
|
471
465
|
if (fuzzySign < 0) {
|
|
472
466
|
return -1;
|
|
@@ -574,7 +568,7 @@ var groupRows = function groupRows(groupingColumnsCount, columns, indexedArray)
|
|
|
574
568
|
for (var _iterator4 = _createForOfIteratorHelperLoose(indexedArray), _step4; !(_step4 = _iterator4()).done;) {
|
|
575
569
|
var p = _step4.value;
|
|
576
570
|
var nextSlice = p[0].slice(0, groupingColumnsCount);
|
|
577
|
-
if (prevSlice === null || !
|
|
571
|
+
if (prevSlice === null || !equalsArray(prevSlice, nextSlice)) {
|
|
578
572
|
inBuildGroup = [];
|
|
579
573
|
groups.push(inBuildGroup);
|
|
580
574
|
}
|
|
@@ -619,8 +613,7 @@ var groupAndSort = function groupAndSort(preFilteredRowPairs, codedColumns, grou
|
|
|
619
613
|
}
|
|
620
614
|
return indexedArray;
|
|
621
615
|
};
|
|
622
|
-
var forTesting = {
|
|
616
|
+
export var forTesting = {
|
|
623
617
|
codedColumnsFromKeyAndDirection: codedColumnsFromKeyAndDirection,
|
|
624
618
|
makeCompositeComparatorFromCodedColumns: makeCompositeComparatorFromCodedColumns
|
|
625
|
-
};
|
|
626
|
-
exports.forTesting = forTesting;
|
|
619
|
+
};
|