@sis-cc/dotstatsuite-visions 12.29.0 → 12.31.0
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/es/AdvancedFilterDialog/AdvancedFilterDialog.js +1 -1
- package/es/ChartsConfig/ChartsConfig.js +3 -1
- package/es/ChartsConfig/InputProxy.js +1 -1
- package/es/ChartsConfig/Title.js +2 -1
- package/es/Contact/Contact.js +6 -1
- package/es/DynamicDrawer/AdvancedSelection.js +1 -1
- package/es/DynamicDrawer/DynamicDrawer.js +4 -1
- package/es/DynamicDrawer/SelectionModesMobile.js +3 -1
- package/es/PeriodPicker/PeriodPicker.js +2 -1
- package/es/ScopeList/index.js +94 -0
- package/es/Select/Select.js +1 -1
- package/es/ShortUrls/ShortUrls.js +1 -1
- package/es/TableLayout/index.js +72 -72
- package/es/TablePreview/index.js +41 -41
- package/es/UserRightForm/Permissions.js +2 -1
- package/es/UserRightForm/PermsissionsTabs.js +5 -1
- package/es/UserRightForm/UserRightForm.js +2 -1
- package/es/VirtualizedTree/withSpotlight.js +10 -10
- package/es/utils.js +8 -0
- package/lib/AdvancedFilterDialog/AdvancedFilterDialog.js +4 -2
- package/lib/ChartsConfig/ChartsConfig.js +19 -9
- package/lib/ChartsConfig/InputProxy.js +4 -2
- package/lib/ChartsConfig/Title.js +9 -3
- package/lib/Contact/Contact.js +46 -24
- package/lib/DynamicDrawer/AdvancedSelection.js +4 -2
- package/lib/DynamicDrawer/DynamicDrawer.js +20 -6
- package/lib/DynamicDrawer/SelectionModesMobile.js +14 -4
- package/lib/PeriodPicker/PeriodPicker.js +18 -12
- package/lib/ScopeList/index.js +16 -0
- package/lib/Select/Select.js +5 -3
- package/lib/ShortUrls/ShortUrls.js +4 -2
- package/lib/UserRightForm/Permissions.js +19 -13
- package/lib/UserRightForm/PermsissionsTabs.js +26 -8
- package/lib/UserRightForm/UserRightForm.js +38 -32
- package/lib/VirtualizedTree/withSpotlight.js +11 -10
- package/lib/utils.js +12 -1
- package/package.json +4 -2
- package/umd/@sis-cc/dotstatsuite-visions.js +2098 -1743
- package/umd/@sis-cc/dotstatsuite-visions.min.js +17 -17
- package/umd/@sis-cc/dotstatsuite-visions.min.js.map +1 -1
|
@@ -26,7 +26,7 @@ import singleImg from './images/single-selection.png';
|
|
|
26
26
|
import childrenImg from './images/children-selection.png';
|
|
27
27
|
import branchImg from './images/branch-selection.png';
|
|
28
28
|
import levelImg from './images/level-selection.png';
|
|
29
|
-
import
|
|
29
|
+
import Divider from '@mui/material/Divider';
|
|
30
30
|
|
|
31
31
|
var PaperComponent = function PaperComponent(props) {
|
|
32
32
|
return React.createElement(
|
|
@@ -7,7 +7,9 @@ import Grid from '@mui/material/Grid';
|
|
|
7
7
|
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
|
|
8
8
|
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
|
|
9
9
|
import Title from './Title';
|
|
10
|
-
import
|
|
10
|
+
import Button from '@mui/material/Button';
|
|
11
|
+
import InputAdornment from '@mui/material/InputAdornment';
|
|
12
|
+
import Typography from '@mui/material/Typography';
|
|
11
13
|
import useFocusOptions from './useFocusOptions';
|
|
12
14
|
import Select from '../Select';
|
|
13
15
|
import { extractMultipleValue, getValue } from './utils';
|
|
@@ -3,7 +3,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import * as R from 'ramda';
|
|
6
|
-
import
|
|
6
|
+
import Grid from '@mui/material/Grid';
|
|
7
7
|
import Input from './Input';
|
|
8
8
|
|
|
9
9
|
var InputProxy = function InputProxy(_ref) {
|
package/es/ChartsConfig/Title.js
CHANGED
|
@@ -2,7 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import * as R from 'ramda';
|
|
4
4
|
import makeStyles from '@mui/styles/makeStyles';
|
|
5
|
-
import
|
|
5
|
+
import Grid from '@mui/material/Grid';
|
|
6
|
+
import Typography from '@mui/material/Typography';
|
|
6
7
|
|
|
7
8
|
export var useStyles = makeStyles(function () {
|
|
8
9
|
return {
|
package/es/Contact/Contact.js
CHANGED
|
@@ -2,7 +2,12 @@ import React, { useEffect, useState } from 'react';
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import * as R from 'ramda';
|
|
5
|
-
import
|
|
5
|
+
import Grid from '@mui/material/Grid';
|
|
6
|
+
import Paper from '@mui/material/Paper';
|
|
7
|
+
import TextareaAutosize from '@mui/material/TextareaAutosize';
|
|
8
|
+
import Checkbox from '@mui/material/Checkbox';
|
|
9
|
+
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
10
|
+
import Typography from '@mui/material/Typography';
|
|
6
11
|
import makeStyles from '@mui/styles/makeStyles';
|
|
7
12
|
import { validate as getIsValidEmail } from 'isemail';
|
|
8
13
|
import Mode from './Mode';
|
|
@@ -20,7 +20,7 @@ import singleImg from '../AdvancedFilterDialog/images/single-selection.png';
|
|
|
20
20
|
import childrenImg from '../AdvancedFilterDialog/images/children-selection.png';
|
|
21
21
|
import branchImg from '../AdvancedFilterDialog/images/branch-selection.png';
|
|
22
22
|
import levelImg from '../AdvancedFilterDialog/images/level-selection.png';
|
|
23
|
-
import
|
|
23
|
+
import Divider from '@mui/material/Divider';
|
|
24
24
|
import ButtonCarousel from './SelectionModesMobile';
|
|
25
25
|
|
|
26
26
|
var useStyles = makeStyles(function (theme) {
|
|
@@ -8,7 +8,10 @@ import * as R from 'ramda';
|
|
|
8
8
|
import cx from 'classnames';
|
|
9
9
|
import Box from '@mui/material/Box';
|
|
10
10
|
import AdvancedSelection from './AdvancedSelection';
|
|
11
|
-
import
|
|
11
|
+
import Paper from '@mui/material/Paper';
|
|
12
|
+
import Tab from '@mui/material/Tab';
|
|
13
|
+
import Tabs from '@mui/material/Tabs';
|
|
14
|
+
import Typography from '@mui/material/Typography';
|
|
12
15
|
import makeStyles from '@mui/styles/makeStyles';
|
|
13
16
|
import CloseIcon from '@mui/icons-material/Close';
|
|
14
17
|
import IconButton from '@mui/material/Button';
|
|
@@ -2,7 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import * as R from 'ramda';
|
|
4
4
|
import cx from 'classnames';
|
|
5
|
-
import
|
|
5
|
+
import Box from '@mui/material/Box';
|
|
6
|
+
import Paper from '@mui/material/Paper';
|
|
7
|
+
import Typography from '@mui/material/Typography';
|
|
6
8
|
import { Tooltip, Button } from '..';
|
|
7
9
|
|
|
8
10
|
var mapIndexed = R.addIndex(R.map);
|
|
@@ -2,7 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import * as R from 'ramda';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import dateFns from 'date-fns';
|
|
5
|
-
import
|
|
5
|
+
import Grid from '@mui/material/Grid';
|
|
6
|
+
import Typography from '@mui/material/Typography';
|
|
6
7
|
import { numeralFormat } from './lib';
|
|
7
8
|
import { Button, Select } from '../';
|
|
8
9
|
import useStyles from './styles';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scope List allow a horizontal navigation in a tree
|
|
3
|
+
* (open console to see selection onClick, onKeyPress)
|
|
4
|
+
*
|
|
5
|
+
* limitDisplay: default 0. by default the filter will be blank if items content n of in the list.
|
|
6
|
+
*
|
|
7
|
+
* displayAccessor: if displayAccessor is defined the list will be the items return by displayAccessor,
|
|
8
|
+
* in other word if the prop defined get by displayAccessor is not there, then the scope list will ignore the item and the item will be completely hide
|
|
9
|
+
*
|
|
10
|
+
* disabledAccessor: this accessor allow you to allow disabled items. Contrary to displayAccessor the item will be show but not clikable.
|
|
11
|
+
*
|
|
12
|
+
* bulkselection: allow and show button to selection entire level or current view
|
|
13
|
+
*
|
|
14
|
+
* @memberOf VISIONS
|
|
15
|
+
* @name ScopeList
|
|
16
|
+
* @tag component
|
|
17
|
+
* @api public
|
|
18
|
+
* @props
|
|
19
|
+
* ScopeList.propTypes = {
|
|
20
|
+
* disableAccessor: PropTypes.func,
|
|
21
|
+
* displayAccessor: PropTypes.func,
|
|
22
|
+
* testId: PropTypes.string,
|
|
23
|
+
* term: PropTypes.string,
|
|
24
|
+
* id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
25
|
+
* label: PropTypes.string,
|
|
26
|
+
* accessibility: PropTypes.bool,
|
|
27
|
+
* limitDisplay: PropTypes.number
|
|
28
|
+
* items: {
|
|
29
|
+
* id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
30
|
+
* label: PropTypes.string,
|
|
31
|
+
* parentId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
32
|
+
* isSelected: PropTypes.bool,
|
|
33
|
+
* isDisabled: PropTypes.bool,
|
|
34
|
+
* count: PropTypes.number,
|
|
35
|
+
* path: PropTypes.arrayOf(PropTypes.shape({
|
|
36
|
+
* id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
37
|
+
* label: PropTypes.string,
|
|
38
|
+
* parentId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
39
|
+
* isSelected: PropTypes.bool,
|
|
40
|
+
* })),
|
|
41
|
+
* [yourDisplayAccessorKey]: PropTypes.bool,
|
|
42
|
+
* },
|
|
43
|
+
* spotlight, c.f proptype spotlight
|
|
44
|
+
* mainPlaceholder: PropTypes.string,
|
|
45
|
+
* secondaryPlaceholder: PropTypes.string,
|
|
46
|
+
* activePanelId: PropTypes.string,,
|
|
47
|
+
* hasPath: PropTypes.bool,
|
|
48
|
+
* changeSelection: PropTypes.func,
|
|
49
|
+
* labels: {
|
|
50
|
+
* childrenNavigateDesc: PropTypes.string,
|
|
51
|
+
* navigateBefore: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
52
|
+
* navigateNext: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
53
|
+
* backHelper: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
54
|
+
* disableItemLabel: PropTypes.string,
|
|
55
|
+
* selection: {
|
|
56
|
+
* title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
57
|
+
* currentLevel: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
58
|
+
* level: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
59
|
+
* }
|
|
60
|
+
* },
|
|
61
|
+
* expansionPanelProps: PropTypes.object
|
|
62
|
+
* bulkSelection: PropTypes.bool
|
|
63
|
+
* labelRenderer: PropTypes.func,
|
|
64
|
+
* };
|
|
65
|
+
* @theme
|
|
66
|
+
* // see Accordion too custom open and close scopelist
|
|
67
|
+
* level: a level is the current tree level start from level 1
|
|
68
|
+
* {
|
|
69
|
+
* palette: {
|
|
70
|
+
* primary: {
|
|
71
|
+
* main: // label color and background color of around arrow to see children. global override: outerPalette.primaryMain
|
|
72
|
+
* },
|
|
73
|
+
* common: {
|
|
74
|
+
* white: // color of arrow to see children
|
|
75
|
+
* },
|
|
76
|
+
* action: {
|
|
77
|
+
* hover: // background color of element and header element (from level 2) on hover or selected
|
|
78
|
+
* selected: // background color of focus element (accessibility must be set to true) or hover of selected element
|
|
79
|
+
* },
|
|
80
|
+
* grey: {
|
|
81
|
+
* 100: // color of tough line (line displayed from level 2)
|
|
82
|
+
* 600: // count label (after label element) and path label color (use search to see path)
|
|
83
|
+
* 700: // disabled label
|
|
84
|
+
* 800: // arrow color between header element (displayed from level 3). globale override: outerPalette.textLight
|
|
85
|
+
* }
|
|
86
|
+
* }
|
|
87
|
+
* }
|
|
88
|
+
* @testId
|
|
89
|
+
* @demoReady
|
|
90
|
+
* root: [testId]
|
|
91
|
+
* value: [testId]_value_[props.items.id]
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
export { default } from './ScopeList';
|
package/es/Select/Select.js
CHANGED
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import makeStyles from '@mui/styles/makeStyles';
|
|
7
7
|
import TextField from '@mui/material/TextField';
|
|
8
8
|
import MenuItem from '@mui/material/MenuItem';
|
|
9
|
-
import
|
|
9
|
+
import Typography from '@mui/material/Typography';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
|
|
12
12
|
var useStyles = makeStyles(function (theme) {
|
|
@@ -12,7 +12,7 @@ import IconButton from '@mui/material/IconButton';
|
|
|
12
12
|
import Collapse from '@mui/material/Collapse';
|
|
13
13
|
import CloseIcon from '@mui/icons-material/Close';
|
|
14
14
|
import { Alert, Button } from '../';
|
|
15
|
-
import
|
|
15
|
+
import CircularProgress from '@mui/material/CircularProgress';
|
|
16
16
|
|
|
17
17
|
var useStyles = makeStyles(function (theme) {
|
|
18
18
|
return {
|
package/es/TableLayout/index.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TableLayout it's drag and drop, you can customise and see with the preview the layout of your table
|
|
3
|
-
*
|
|
4
|
-
* @memberOf VISIONS
|
|
5
|
-
* @name TableLayout
|
|
6
|
-
* @tag component
|
|
7
|
-
* @api public
|
|
8
|
-
* @props
|
|
9
|
-
* const itemButtonProps= { id¹: { options, value, onChange }}
|
|
10
|
-
* ¹ - first id in patern
|
|
11
|
-
*
|
|
12
|
-
* values is usefull for tablePreview only
|
|
13
|
-
*
|
|
14
|
-
* const patern = {
|
|
15
|
-
* id: PropTypes.string,
|
|
16
|
-
* label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
17
|
-
* values: PropTypes.arrayOf(
|
|
18
|
-
* PropTypes.shape({
|
|
19
|
-
* id: PropTypes.string,
|
|
20
|
-
* label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
21
|
-
* }),
|
|
22
|
-
* ),
|
|
23
|
-
* };
|
|
24
|
-
*
|
|
25
|
-
* TableLayout.propTypes = {
|
|
26
|
-
* layout: PropTypes.shape({
|
|
27
|
-
* header: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
28
|
-
* sections: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
29
|
-
* rows: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
30
|
-
* }),
|
|
31
|
-
* itemRenderer: PropTypes.func,
|
|
32
|
-
* commit: PropTypes.func,
|
|
33
|
-
* noPreview: PropTypes.bool,
|
|
34
|
-
* itemButtonProps: PropTypes.object,
|
|
35
|
-
* labels: PropTypes.shape({
|
|
36
|
-
* commit: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
37
|
-
* cancel: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
38
|
-
* row: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
39
|
-
* column: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
40
|
-
* section: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
41
|
-
* table: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
42
|
-
* asc: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
43
|
-
* desc: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
44
|
-
* help: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
45
|
-
* one: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
46
|
-
* }),
|
|
47
|
-
* accessibility: PropTypes.bool,
|
|
48
|
-
* };
|
|
49
|
-
* @theme
|
|
50
|
-
* {
|
|
51
|
-
* palette: {
|
|
52
|
-
* primary: {
|
|
53
|
-
* main: // header colors. global override: outerPalette.primaryMain
|
|
54
|
-
* },
|
|
55
|
-
* tertiary: {
|
|
56
|
-
* dark: // sections colors
|
|
57
|
-
* light: // rows colors
|
|
58
|
-
* },
|
|
59
|
-
* secondary: {
|
|
60
|
-
* dark: // used if tertiary dark is null
|
|
61
|
-
* light: // used if tertiary light is null
|
|
62
|
-
* }
|
|
63
|
-
* common: {
|
|
64
|
-
* white: // background color select asc/desc
|
|
65
|
-
* }
|
|
66
|
-
* },
|
|
67
|
-
* typography: {
|
|
68
|
-
* subtitle1: {
|
|
69
|
-
* // description "information DnD"
|
|
70
|
-
* }
|
|
71
|
-
* }
|
|
72
|
-
* }
|
|
1
|
+
/**
|
|
2
|
+
* TableLayout it's drag and drop, you can customise and see with the preview the layout of your table
|
|
3
|
+
*
|
|
4
|
+
* @memberOf VISIONS
|
|
5
|
+
* @name TableLayout
|
|
6
|
+
* @tag component
|
|
7
|
+
* @api public
|
|
8
|
+
* @props
|
|
9
|
+
* const itemButtonProps= { id¹: { options, value, onChange }}
|
|
10
|
+
* ¹ - first id in patern
|
|
11
|
+
*
|
|
12
|
+
* values is usefull for tablePreview only
|
|
13
|
+
*
|
|
14
|
+
* const patern = {
|
|
15
|
+
* id: PropTypes.string,
|
|
16
|
+
* label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
17
|
+
* values: PropTypes.arrayOf(
|
|
18
|
+
* PropTypes.shape({
|
|
19
|
+
* id: PropTypes.string,
|
|
20
|
+
* label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
21
|
+
* }),
|
|
22
|
+
* ),
|
|
23
|
+
* };
|
|
24
|
+
*
|
|
25
|
+
* TableLayout.propTypes = {
|
|
26
|
+
* layout: PropTypes.shape({
|
|
27
|
+
* header: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
28
|
+
* sections: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
29
|
+
* rows: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
30
|
+
* }),
|
|
31
|
+
* itemRenderer: PropTypes.func,
|
|
32
|
+
* commit: PropTypes.func,
|
|
33
|
+
* noPreview: PropTypes.bool,
|
|
34
|
+
* itemButtonProps: PropTypes.object,
|
|
35
|
+
* labels: PropTypes.shape({
|
|
36
|
+
* commit: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
37
|
+
* cancel: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
38
|
+
* row: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
39
|
+
* column: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
40
|
+
* section: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
41
|
+
* table: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
42
|
+
* asc: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
43
|
+
* desc: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
44
|
+
* help: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
45
|
+
* one: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
46
|
+
* }),
|
|
47
|
+
* accessibility: PropTypes.bool,
|
|
48
|
+
* };
|
|
49
|
+
* @theme
|
|
50
|
+
* {
|
|
51
|
+
* palette: {
|
|
52
|
+
* primary: {
|
|
53
|
+
* main: // header colors. global override: outerPalette.primaryMain
|
|
54
|
+
* },
|
|
55
|
+
* tertiary: {
|
|
56
|
+
* dark: // sections colors
|
|
57
|
+
* light: // rows colors
|
|
58
|
+
* },
|
|
59
|
+
* secondary: {
|
|
60
|
+
* dark: // used if tertiary dark is null
|
|
61
|
+
* light: // used if tertiary light is null
|
|
62
|
+
* }
|
|
63
|
+
* common: {
|
|
64
|
+
* white: // background color select asc/desc
|
|
65
|
+
* }
|
|
66
|
+
* },
|
|
67
|
+
* typography: {
|
|
68
|
+
* subtitle1: {
|
|
69
|
+
* // description "information DnD"
|
|
70
|
+
* }
|
|
71
|
+
* }
|
|
72
|
+
* }
|
|
73
73
|
**/
|
|
74
74
|
|
|
75
75
|
export { default } from './TableLayout';
|
package/es/TablePreview/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TablePreview use also by TableLayout. It's a preview of your main rows sections and header
|
|
3
|
-
*
|
|
4
|
-
* @memberOf VISIONS
|
|
5
|
-
* @name TablePreview
|
|
6
|
-
* @tag component
|
|
7
|
-
* @api public
|
|
8
|
-
*
|
|
9
|
-
* const patern = {
|
|
10
|
-
* id: PropTypes.string,
|
|
11
|
-
* label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
12
|
-
* values: PropTypes.arrayOf(
|
|
13
|
-
* PropTypes.shape({
|
|
14
|
-
* id: PropTypes.string,
|
|
15
|
-
* label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
16
|
-
* }),
|
|
17
|
-
* ),
|
|
18
|
-
* };
|
|
19
|
-
*
|
|
20
|
-
* Table.proptypes = {
|
|
21
|
-
* header: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
22
|
-
* sections: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
23
|
-
* rows: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
24
|
-
* labelRenderer: PropTypes.func,
|
|
25
|
-
* }
|
|
26
|
-
* @theme
|
|
27
|
-
* {
|
|
28
|
-
* palette: {
|
|
29
|
-
* primary: {
|
|
30
|
-
* main: // header colors. global override: outerPalette.primaryMain
|
|
31
|
-
* },
|
|
32
|
-
* tertiary: {
|
|
33
|
-
* dark: // sections colors
|
|
34
|
-
* light: // rows colors
|
|
35
|
-
* },
|
|
36
|
-
* secondary: {
|
|
37
|
-
* dark: // used if tertiary dark is null
|
|
38
|
-
* light: // used if tertiary light is null
|
|
39
|
-
* }
|
|
40
|
-
* }
|
|
41
|
-
* }
|
|
1
|
+
/**
|
|
2
|
+
* TablePreview use also by TableLayout. It's a preview of your main rows sections and header
|
|
3
|
+
*
|
|
4
|
+
* @memberOf VISIONS
|
|
5
|
+
* @name TablePreview
|
|
6
|
+
* @tag component
|
|
7
|
+
* @api public
|
|
8
|
+
*
|
|
9
|
+
* const patern = {
|
|
10
|
+
* id: PropTypes.string,
|
|
11
|
+
* label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
12
|
+
* values: PropTypes.arrayOf(
|
|
13
|
+
* PropTypes.shape({
|
|
14
|
+
* id: PropTypes.string,
|
|
15
|
+
* label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
16
|
+
* }),
|
|
17
|
+
* ),
|
|
18
|
+
* };
|
|
19
|
+
*
|
|
20
|
+
* Table.proptypes = {
|
|
21
|
+
* header: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
22
|
+
* sections: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
23
|
+
* rows: PropTypes.arrayOf(PropTypes.shape(patern)),
|
|
24
|
+
* labelRenderer: PropTypes.func,
|
|
25
|
+
* }
|
|
26
|
+
* @theme
|
|
27
|
+
* {
|
|
28
|
+
* palette: {
|
|
29
|
+
* primary: {
|
|
30
|
+
* main: // header colors. global override: outerPalette.primaryMain
|
|
31
|
+
* },
|
|
32
|
+
* tertiary: {
|
|
33
|
+
* dark: // sections colors
|
|
34
|
+
* light: // rows colors
|
|
35
|
+
* },
|
|
36
|
+
* secondary: {
|
|
37
|
+
* dark: // used if tertiary dark is null
|
|
38
|
+
* light: // used if tertiary light is null
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
42
|
**/
|
|
43
43
|
|
|
44
44
|
export { default } from './TablePreview';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Checkbox from '@mui/material/Checkbox';
|
|
3
3
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
4
|
-
import
|
|
4
|
+
import Grid from '@mui/material/Grid';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
5
6
|
import makeStyles from '@mui/styles/makeStyles';
|
|
6
7
|
import * as R from 'ramda';
|
|
7
8
|
import cx from 'classnames';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
3
|
+
import Box from '@mui/material/Box';
|
|
4
|
+
import Grid from '@mui/material/Grid';
|
|
5
|
+
import Tabs from '@mui/material/Tabs';
|
|
6
|
+
import Tab from '@mui/material/Tab';
|
|
7
|
+
import Typography from '@mui/material/Typography';
|
|
4
8
|
import makeStyles from '@mui/styles/makeStyles';
|
|
5
9
|
import * as R from 'ramda';
|
|
6
10
|
import Permissions from './Permissions';
|
|
@@ -3,7 +3,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import * as R from 'ramda';
|
|
6
|
-
import
|
|
6
|
+
import Grid from '@mui/material/Grid';
|
|
7
|
+
import Typography from '@mui/material/Typography';
|
|
7
8
|
import makeStyles from '@mui/styles/makeStyles';
|
|
8
9
|
import Input from './Input';
|
|
9
10
|
import Button from '../Button';
|
|
@@ -6,6 +6,7 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
|
|
|
6
6
|
import * as R from 'ramda';
|
|
7
7
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
8
8
|
import { getDescendants, getHierarchicalId } from './utils';
|
|
9
|
+
import { prepareTerm, searchTerm } from '../utils';
|
|
9
10
|
|
|
10
11
|
export var spotlightFilter = function spotlightFilter(term) {
|
|
11
12
|
var labelRenderer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : R.prop('label');
|
|
@@ -29,23 +30,22 @@ export var spotlightFilter = function spotlightFilter(term) {
|
|
|
29
30
|
}
|
|
30
31
|
return acc;
|
|
31
32
|
};
|
|
32
|
-
var matchRegExp = function matchRegExp(str) {
|
|
33
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
34
|
-
};
|
|
35
33
|
|
|
36
34
|
// Highlight matching terms in the label
|
|
37
35
|
var highlightLabel = function highlightLabel(label) {
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
var i = prepareTerm(label).indexOf(prepareTerm(term));
|
|
37
|
+
var l = R.length(term);
|
|
38
|
+
|
|
39
|
+
var pre = label.slice(0, i);
|
|
40
|
+
var match = label.slice(i, i + l);
|
|
41
|
+
var post = label.slice(i + l);
|
|
42
|
+
|
|
43
|
+
return pre + '<span style=background-color:yellow;border-bottom:2px solid #8CC841>' + match + '</span>' + post;
|
|
42
44
|
};
|
|
43
45
|
|
|
44
46
|
var recurse = function recurse(item) {
|
|
45
47
|
var label = labelRenderer(item);
|
|
46
|
-
var isValidItem =
|
|
47
|
-
return R.includes(R.toLower(term), R.toLower(item));
|
|
48
|
-
};
|
|
48
|
+
var isValidItem = searchTerm(term);
|
|
49
49
|
|
|
50
50
|
var result = [];
|
|
51
51
|
|
package/es/utils.js
CHANGED
|
@@ -3,6 +3,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import * as R from 'ramda';
|
|
5
5
|
import dateFns from 'date-fns';
|
|
6
|
+
import * as diacritics from 'diacritics';
|
|
6
7
|
|
|
7
8
|
var spotlightHandler = function spotlightHandler(_ref) {
|
|
8
9
|
var term = _ref.term,
|
|
@@ -67,4 +68,11 @@ export var getIsRtl = function getIsRtl(theme) {
|
|
|
67
68
|
export var newDate = function newDate(stringDate) {
|
|
68
69
|
var date = new Date(stringDate);
|
|
69
70
|
return dateFns.addMinutes(date, date.getTimezoneOffset());
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export var prepareTerm = R.pipe(diacritics.remove, R.toLower);
|
|
74
|
+
export var searchTerm = function searchTerm(term) {
|
|
75
|
+
return function (label) {
|
|
76
|
+
return R.includes(prepareTerm(term), prepareTerm(label));
|
|
77
|
+
};
|
|
70
78
|
};
|
|
@@ -92,7 +92,9 @@ var _levelSelection = require('./images/level-selection.png');
|
|
|
92
92
|
|
|
93
93
|
var _levelSelection2 = _interopRequireDefault(_levelSelection);
|
|
94
94
|
|
|
95
|
-
var
|
|
95
|
+
var _Divider = require('@mui/material/Divider');
|
|
96
|
+
|
|
97
|
+
var _Divider2 = _interopRequireDefault(_Divider);
|
|
96
98
|
|
|
97
99
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
98
100
|
|
|
@@ -562,7 +564,7 @@ var AdvancedFilterDialog = function AdvancedFilterDialog(props) {
|
|
|
562
564
|
)
|
|
563
565
|
)
|
|
564
566
|
),
|
|
565
|
-
_react2.default.createElement(
|
|
567
|
+
_react2.default.createElement(_Divider2.default, { className: classes.divider })
|
|
566
568
|
),
|
|
567
569
|
_react2.default.createElement(
|
|
568
570
|
_Grid2.default,
|