@sis-cc/dotstatsuite-visions 6.3.2 → 6.4.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/es/Icons/CopyContent.js +12 -0
- package/es/Icons/index.js +2 -1
- package/es/TableHtml5/section.js +17 -9
- package/es/TableLayout/lib.js +1 -11
- package/lib/Icons/CopyContent.js +25 -0
- package/lib/Icons/index.js +9 -0
- package/lib/TableHtml5/section.js +16 -8
- package/lib/TableLayout/lib.js +2 -12
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var _extends = Object.assign || 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; };
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import SvgIcon from '@material-ui/core/SvgIcon';
|
|
5
|
+
|
|
6
|
+
export default (function (props) {
|
|
7
|
+
return React.createElement(
|
|
8
|
+
SvgIcon,
|
|
9
|
+
_extends({ viewBox: '0 0 24 24' }, props),
|
|
10
|
+
React.createElement('path', { d: 'M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z' })
|
|
11
|
+
);
|
|
12
|
+
});
|
package/es/Icons/index.js
CHANGED
|
@@ -24,4 +24,5 @@ export { default as AccessibilityFilled } from './AccessibilityFilled';
|
|
|
24
24
|
export { default as AccessibilityOutlined } from './AccessibilityOutlined';
|
|
25
25
|
export { default as AccountFilled } from './AccountFilled';
|
|
26
26
|
export { default as AccountOutlined } from './AccountOutlined';
|
|
27
|
-
export { default as Warning } from './Warning';
|
|
27
|
+
export { default as Warning } from './Warning';
|
|
28
|
+
export { default as CopyContent } from './CopyContent';
|
package/es/TableHtml5/section.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _extends = Object.assign || 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; };
|
|
2
2
|
|
|
3
|
-
import React
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import * as R from 'ramda';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import cx from 'classnames';
|
|
@@ -46,6 +46,9 @@ var useStyles = makeStyles(function (theme) {
|
|
|
46
46
|
topCell: {
|
|
47
47
|
paddingTop: 0
|
|
48
48
|
},
|
|
49
|
+
hierarchySpace: {
|
|
50
|
+
marginBottom: 'auto'
|
|
51
|
+
},
|
|
49
52
|
highlight: theme.mixins.table.cellHighlight
|
|
50
53
|
};
|
|
51
54
|
});
|
|
@@ -93,7 +96,14 @@ var Section = function Section(_ref) {
|
|
|
93
96
|
|
|
94
97
|
var flags = R.path(['value', 'flags'], cell);
|
|
95
98
|
var id = rowId + '_' + index;
|
|
96
|
-
|
|
99
|
+
|
|
100
|
+
// special space is used for hierarchy U+2007    
|
|
101
|
+
var hierarchySpace = R.pipe(R.pathOr([], ['value', 'parents']), R.when(R.isNil, R.always([])), R.length,
|
|
102
|
+
// eslint-disable-next-line no-irregular-whitespace
|
|
103
|
+
R.times(function () {
|
|
104
|
+
return '· ';
|
|
105
|
+
}))(cell);
|
|
106
|
+
|
|
97
107
|
return React.createElement(
|
|
98
108
|
TableCell,
|
|
99
109
|
{
|
|
@@ -106,16 +116,14 @@ var Section = function Section(_ref) {
|
|
|
106
116
|
React.createElement(
|
|
107
117
|
'div',
|
|
108
118
|
{ className: classes.cellContent },
|
|
119
|
+
!R.isEmpty(hierarchySpace) && React.createElement(
|
|
120
|
+
'div',
|
|
121
|
+
{ className: classes.hierarchySpace },
|
|
122
|
+
hierarchySpace
|
|
123
|
+
),
|
|
109
124
|
React.createElement(
|
|
110
125
|
Typography,
|
|
111
126
|
{ variant: 'body1', tabIndex: 0 },
|
|
112
|
-
R.times(function (n) {
|
|
113
|
-
return React.createElement(
|
|
114
|
-
Fragment,
|
|
115
|
-
{ key: id + '-' + n },
|
|
116
|
-
'\u2003'
|
|
117
|
-
);
|
|
118
|
-
}, hierarchyLength),
|
|
119
127
|
R.path(['value', 'label'], cell),
|
|
120
128
|
React.createElement(Flags, { flags: flags })
|
|
121
129
|
)
|
package/es/TableLayout/lib.js
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import * as R from 'ramda';
|
|
2
2
|
|
|
3
|
-
export var swap = R.curry(function (index1, index2, list) {
|
|
4
|
-
if (index1 < 0 || index2 < 0 || index1 > list.length - 1 || index2 > list.length - 1) {
|
|
5
|
-
return list; // index out of bound
|
|
6
|
-
}
|
|
7
|
-
var value1 = list[index1];
|
|
8
|
-
var value2 = list[index2];
|
|
9
|
-
return R.pipe(R.set(R.lensIndex(index1), value2), R.set(R.lensIndex(index2), value1))(list);
|
|
10
|
-
});
|
|
11
|
-
|
|
12
3
|
export var changeLayout = function changeLayout(_ref) {
|
|
13
4
|
var dragIndex = _ref.dragIndex,
|
|
14
5
|
hoverIndex = _ref.hoverIndex,
|
|
@@ -17,8 +8,7 @@ export var changeLayout = function changeLayout(_ref) {
|
|
|
17
8
|
currentLayout = _ref.currentLayout;
|
|
18
9
|
|
|
19
10
|
if (R.equals(dragZone, dropZone)) {
|
|
20
|
-
|
|
21
|
-
return R.over(R.lensProp(dropZone), swap(dragIndex, hoverIndex), currentLayout);
|
|
11
|
+
return R.over(R.lensProp(dropZone), R.move(dragIndex, hoverIndex), currentLayout);
|
|
22
12
|
}
|
|
23
13
|
var item = R.pipe(R.prop(dragZone), R.nth(dragIndex))(currentLayout);
|
|
24
14
|
return R.pipe(R.over(R.lensProp(dragZone), R.without([item])), R.over(R.lensProp(dropZone), R.insert(hoverIndex, item)))(currentLayout);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _extends = Object.assign || 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; };
|
|
6
|
+
|
|
7
|
+
var _react = require('react');
|
|
8
|
+
|
|
9
|
+
var _react2 = _interopRequireDefault(_react);
|
|
10
|
+
|
|
11
|
+
var _SvgIcon = require('@material-ui/core/SvgIcon');
|
|
12
|
+
|
|
13
|
+
var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
17
|
+
exports.default = function (props) {
|
|
18
|
+
return _react2.default.createElement(
|
|
19
|
+
_SvgIcon2.default,
|
|
20
|
+
_extends({ viewBox: '0 0 24 24' }, props),
|
|
21
|
+
_react2.default.createElement('path', { d: 'M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z' })
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
module.exports = exports['default'];
|
package/lib/Icons/index.js
CHANGED
|
@@ -143,4 +143,13 @@ Object.defineProperty(exports, 'Warning', {
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
+
var _CopyContent = require('./CopyContent');
|
|
147
|
+
|
|
148
|
+
Object.defineProperty(exports, 'CopyContent', {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
get: function get() {
|
|
151
|
+
return _interopRequireDefault(_CopyContent).default;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
146
155
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -88,6 +88,9 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
88
88
|
topCell: {
|
|
89
89
|
paddingTop: 0
|
|
90
90
|
},
|
|
91
|
+
hierarchySpace: {
|
|
92
|
+
marginBottom: 'auto'
|
|
93
|
+
},
|
|
91
94
|
highlight: theme.mixins.table.cellHighlight
|
|
92
95
|
};
|
|
93
96
|
});
|
|
@@ -135,7 +138,14 @@ var Section = function Section(_ref) {
|
|
|
135
138
|
|
|
136
139
|
var flags = R.path(['value', 'flags'], cell);
|
|
137
140
|
var id = rowId + '_' + index;
|
|
138
|
-
|
|
141
|
+
|
|
142
|
+
// special space is used for hierarchy U+2007    
|
|
143
|
+
var hierarchySpace = R.pipe(R.pathOr([], ['value', 'parents']), R.when(R.isNil, R.always([])), R.length,
|
|
144
|
+
// eslint-disable-next-line no-irregular-whitespace
|
|
145
|
+
R.times(function () {
|
|
146
|
+
return '· ';
|
|
147
|
+
}))(cell);
|
|
148
|
+
|
|
139
149
|
return _react2.default.createElement(
|
|
140
150
|
_TableCell2.default,
|
|
141
151
|
{
|
|
@@ -148,16 +158,14 @@ var Section = function Section(_ref) {
|
|
|
148
158
|
_react2.default.createElement(
|
|
149
159
|
'div',
|
|
150
160
|
{ className: classes.cellContent },
|
|
161
|
+
!R.isEmpty(hierarchySpace) && _react2.default.createElement(
|
|
162
|
+
'div',
|
|
163
|
+
{ className: classes.hierarchySpace },
|
|
164
|
+
hierarchySpace
|
|
165
|
+
),
|
|
151
166
|
_react2.default.createElement(
|
|
152
167
|
_Typography2.default,
|
|
153
168
|
{ variant: 'body1', tabIndex: 0 },
|
|
154
|
-
R.times(function (n) {
|
|
155
|
-
return _react2.default.createElement(
|
|
156
|
-
_react.Fragment,
|
|
157
|
-
{ key: id + '-' + n },
|
|
158
|
-
'\u2003'
|
|
159
|
-
);
|
|
160
|
-
}, hierarchyLength),
|
|
161
169
|
R.path(['value', 'label'], cell),
|
|
162
170
|
_react2.default.createElement(_flags2.default, { flags: flags })
|
|
163
171
|
)
|
package/lib/TableLayout/lib.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.addHiddenElement = exports.rejectHiddenElement = exports.changeLayout =
|
|
4
|
+
exports.addHiddenElement = exports.rejectHiddenElement = exports.changeLayout = undefined;
|
|
5
5
|
|
|
6
6
|
var _ramda = require('ramda');
|
|
7
7
|
|
|
@@ -9,15 +9,6 @@ var R = _interopRequireWildcard(_ramda);
|
|
|
9
9
|
|
|
10
10
|
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; } }
|
|
11
11
|
|
|
12
|
-
var swap = exports.swap = R.curry(function (index1, index2, list) {
|
|
13
|
-
if (index1 < 0 || index2 < 0 || index1 > list.length - 1 || index2 > list.length - 1) {
|
|
14
|
-
return list; // index out of bound
|
|
15
|
-
}
|
|
16
|
-
var value1 = list[index1];
|
|
17
|
-
var value2 = list[index2];
|
|
18
|
-
return R.pipe(R.set(R.lensIndex(index1), value2), R.set(R.lensIndex(index2), value1))(list);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
12
|
var changeLayout = exports.changeLayout = function changeLayout(_ref) {
|
|
22
13
|
var dragIndex = _ref.dragIndex,
|
|
23
14
|
hoverIndex = _ref.hoverIndex,
|
|
@@ -26,8 +17,7 @@ var changeLayout = exports.changeLayout = function changeLayout(_ref) {
|
|
|
26
17
|
currentLayout = _ref.currentLayout;
|
|
27
18
|
|
|
28
19
|
if (R.equals(dragZone, dropZone)) {
|
|
29
|
-
|
|
30
|
-
return R.over(R.lensProp(dropZone), swap(dragIndex, hoverIndex), currentLayout);
|
|
20
|
+
return R.over(R.lensProp(dropZone), R.move(dragIndex, hoverIndex), currentLayout);
|
|
31
21
|
}
|
|
32
22
|
var item = R.pipe(R.prop(dragZone), R.nth(dragIndex))(currentLayout);
|
|
33
23
|
return R.pipe(R.over(R.lensProp(dragZone), R.without([item])), R.over(R.lensProp(dropZone), R.insert(hoverIndex, item)))(currentLayout);
|