react-data-matrix 0.1.6 → 0.1.7
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/matrixHeaders.js +11 -42
- package/dist/components/matrixRows.js +11 -44
- package/dist/components/reactMatrix.js +13 -31
- package/dist/context/index.js +31 -7
- package/dist/utils/functions.js +18 -2
- package/package.json +1 -1
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
12
|
var _getStyles = require("../helpers/getStyles");
|
|
13
13
|
|
|
14
14
|
var _functions = require("../utils/functions");
|
|
15
15
|
|
|
16
|
+
var _context = _interopRequireDefault(require("../context"));
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
18
24
|
// import "./styles/riskMatrix.scss";
|
|
19
|
-
const MatrixHeaders =
|
|
25
|
+
const MatrixHeaders = () => {
|
|
20
26
|
const {
|
|
21
27
|
data,
|
|
22
28
|
thRowStyles,
|
|
@@ -28,7 +34,7 @@ const MatrixHeaders = props => {
|
|
|
28
34
|
customHeaderRowIdValue,
|
|
29
35
|
customDynamicHeaderTitleIdValue,
|
|
30
36
|
customDynamicSubHeaderTitleIdValue
|
|
31
|
-
} =
|
|
37
|
+
} = (0, _react.useContext)(_context.default);
|
|
32
38
|
const headerRowStyles = (0, _getStyles.getHeaderRowStyles)(hasInlineStyles, thRowStyles);
|
|
33
39
|
const headerTitleStyles = (0, _getStyles.getHeaderTitleStyles)(hasInlineStyles, thTitleStyles);
|
|
34
40
|
const headerSubTitleStyles = (0, _getStyles.getHeaderSubTitleStyles)(hasInlineStyles, thSubTitleStyles);
|
|
@@ -76,42 +82,5 @@ MatrixHeaders.defaultProps = {
|
|
|
76
82
|
customDynamicHeaderTitleIdValue: "",
|
|
77
83
|
customDynamicSubHeaderTitleIdValue: ""
|
|
78
84
|
};
|
|
79
|
-
MatrixHeaders.propTypes = {
|
|
80
|
-
data: _propTypes.default.shape({
|
|
81
|
-
id: _propTypes.default.number,
|
|
82
|
-
matrix_name: _propTypes.default.string,
|
|
83
|
-
matrix_description: _propTypes.default.string,
|
|
84
|
-
matrix_size: _propTypes.default.number.isRequired,
|
|
85
|
-
matrix_details: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
86
|
-
id: _propTypes.default.number,
|
|
87
|
-
likelihood: _propTypes.default.string,
|
|
88
|
-
consequence: _propTypes.default.number,
|
|
89
|
-
header_title: _propTypes.default.string,
|
|
90
|
-
header_sub_title: _propTypes.default.string,
|
|
91
|
-
row_header_title: _propTypes.default.string,
|
|
92
|
-
row_header_sub_title: _propTypes.default.string
|
|
93
|
-
})).isRequired,
|
|
94
|
-
matrix_values: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
95
|
-
id: _propTypes.default.number.isRequired,
|
|
96
|
-
colour: _propTypes.default.string,
|
|
97
|
-
position: _propTypes.default.number.isRequired,
|
|
98
|
-
matrix_id: _propTypes.default.number,
|
|
99
|
-
score_value: _propTypes.default.number,
|
|
100
|
-
description: _propTypes.default.string,
|
|
101
|
-
response: _propTypes.default.string,
|
|
102
|
-
likelihood_descriptor: _propTypes.default.string.isRequired,
|
|
103
|
-
consequence_descriptor: _propTypes.default.number
|
|
104
|
-
})).isRequired
|
|
105
|
-
}).isRequired,
|
|
106
|
-
hasInlineStyles: _propTypes.default.bool,
|
|
107
|
-
headerPrimaryUpper: _propTypes.default.bool,
|
|
108
|
-
thRowStyles: _propTypes.default.shape({}),
|
|
109
|
-
thTitleStyles: _propTypes.default.shape({}),
|
|
110
|
-
thSubTitleStyles: _propTypes.default.shape({}),
|
|
111
|
-
thPrimaryTitleStyles: _propTypes.default.shape({}),
|
|
112
|
-
customHeaderRowIdValue: _propTypes.default.string,
|
|
113
|
-
customDynamicHeaderTitleIdValue: _propTypes.default.string,
|
|
114
|
-
customDynamicSubHeaderTitleIdValue: _propTypes.default.string
|
|
115
|
-
};
|
|
116
85
|
var _default = MatrixHeaders;
|
|
117
86
|
exports.default = _default;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -7,19 +9,23 @@ exports.default = void 0;
|
|
|
7
9
|
|
|
8
10
|
require("core-js/modules/es.array.reverse.js");
|
|
9
11
|
|
|
10
|
-
var _react =
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
13
|
|
|
12
14
|
var _getStyles = require("../helpers/getStyles");
|
|
13
15
|
|
|
14
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
16
|
var _functions = require("../utils/functions");
|
|
17
17
|
|
|
18
18
|
var _tableData = _interopRequireDefault(require("./tableData"));
|
|
19
19
|
|
|
20
|
+
var _context = _interopRequireDefault(require("../context"));
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
const MatrixRows = () => {
|
|
23
29
|
const {
|
|
24
30
|
data,
|
|
25
31
|
tdStyles,
|
|
@@ -33,7 +39,7 @@ const MatrixRows = props => {
|
|
|
33
39
|
customRowDynamicIdValue,
|
|
34
40
|
customRowHeaderDynamicIdValue,
|
|
35
41
|
customTableDataDynamicIdValue
|
|
36
|
-
} =
|
|
42
|
+
} = (0, _react.useContext)(_context.default);
|
|
37
43
|
const valuesArray = reverseMatrixValues ? (0, _functions.groupObjectsByProp)(data.matrix_values, "likelihood_descriptor").reverse().slice(0, data.matrix_size) : (0, _functions.groupObjectsByProp)(data.matrix_values, "likelihood_descriptor").slice(0, data.matrix_size);
|
|
38
44
|
const tableRowStyles = (0, _getStyles.getHeaderRowStyles)(hasInlineStyles, trRowStyles);
|
|
39
45
|
const tableRowHeaderTitleStyles = (0, _getStyles.getHeaderTitleStyles)(hasInlineStyles, trTitleStyles);
|
|
@@ -86,44 +92,5 @@ MatrixRows.defaultProps = {
|
|
|
86
92
|
customRowHeaderDynamicIdValue: "",
|
|
87
93
|
customTableDataDynamicIdValue: ""
|
|
88
94
|
};
|
|
89
|
-
MatrixRows.propTypes = {
|
|
90
|
-
data: _propTypes.default.shape({
|
|
91
|
-
id: _propTypes.default.number,
|
|
92
|
-
matrix_name: _propTypes.default.string,
|
|
93
|
-
matrix_description: _propTypes.default.string,
|
|
94
|
-
matrix_size: _propTypes.default.number.isRequired,
|
|
95
|
-
matrix_details: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
96
|
-
id: _propTypes.default.number,
|
|
97
|
-
likelihood: _propTypes.default.string,
|
|
98
|
-
consequence: _propTypes.default.number,
|
|
99
|
-
header_title: _propTypes.default.string,
|
|
100
|
-
header_sub_title: _propTypes.default.string,
|
|
101
|
-
row_header_title: _propTypes.default.string,
|
|
102
|
-
row_header_sub_title: _propTypes.default.string
|
|
103
|
-
})).isRequired,
|
|
104
|
-
matrix_values: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
105
|
-
id: _propTypes.default.number.isRequired,
|
|
106
|
-
colour: _propTypes.default.string,
|
|
107
|
-
position: _propTypes.default.number.isRequired,
|
|
108
|
-
matrix_id: _propTypes.default.number,
|
|
109
|
-
score_value: _propTypes.default.number,
|
|
110
|
-
description: _propTypes.default.string,
|
|
111
|
-
response: _propTypes.default.string,
|
|
112
|
-
likelihood_descriptor: _propTypes.default.string.isRequired,
|
|
113
|
-
consequence_descriptor: _propTypes.default.number
|
|
114
|
-
})).isRequired
|
|
115
|
-
}).isRequired,
|
|
116
|
-
rowPrimaryUpper: _propTypes.default.bool,
|
|
117
|
-
hasInlineStyles: _propTypes.default.bool,
|
|
118
|
-
reverseMatrixValues: _propTypes.default.bool,
|
|
119
|
-
trRowStyles: _propTypes.default.shape({}),
|
|
120
|
-
trTitleStyles: _propTypes.default.shape({}),
|
|
121
|
-
trSubTitleStyles: _propTypes.default.shape({}),
|
|
122
|
-
trPrimaryTitleStyles: _propTypes.default.shape({}),
|
|
123
|
-
tdStyles: _propTypes.default.shape({}),
|
|
124
|
-
customRowDynamicIdValue: _propTypes.default.string,
|
|
125
|
-
customRowHeaderDynamicIdValue: _propTypes.default.string,
|
|
126
|
-
customTableDataDynamicIdValue: _propTypes.default.string
|
|
127
|
-
};
|
|
128
95
|
var _default = MatrixRows;
|
|
129
96
|
exports.default = _default;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
13
|
|
|
@@ -15,17 +17,21 @@ var _matrixHeaders = _interopRequireDefault(require("./matrixHeaders"));
|
|
|
15
17
|
|
|
16
18
|
var _matrixRows = _interopRequireDefault(require("./matrixRows"));
|
|
17
19
|
|
|
18
|
-
var _context = require("../context");
|
|
20
|
+
var _context = _interopRequireDefault(require("../context"));
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
22
28
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
29
|
|
|
24
30
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
31
|
|
|
26
32
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
33
|
|
|
28
|
-
const ReactMatrix =
|
|
34
|
+
const ReactMatrix = () => {
|
|
29
35
|
const {
|
|
30
36
|
matrixName,
|
|
31
37
|
tableStyles,
|
|
@@ -34,7 +40,7 @@ const ReactMatrix = props => {
|
|
|
34
40
|
matrixDescription,
|
|
35
41
|
hasContainerStyles,
|
|
36
42
|
tableContainerStyles
|
|
37
|
-
} =
|
|
43
|
+
} = (0, _react.useContext)(_context.default);
|
|
38
44
|
const tableBorder = (0, _getStyles.getTableBoarder)(hasInlineStyles && hasTableBorder);
|
|
39
45
|
const tableElmStyles = (0, _getStyles.getTableStyles)(hasInlineStyles && tableStyles, tableStyles);
|
|
40
46
|
const containerStyles = (0, _getStyles.getContainerStyles)(hasInlineStyles && hasContainerStyles, tableContainerStyles);
|
|
@@ -43,31 +49,7 @@ const ReactMatrix = props => {
|
|
|
43
49
|
}, /*#__PURE__*/_react.default.createElement("h1", null, matrixName), /*#__PURE__*/_react.default.createElement("h4", null, matrixDescription), /*#__PURE__*/_react.default.createElement("table", {
|
|
44
50
|
id: "matrix-table",
|
|
45
51
|
style: _objectSpread(_objectSpread({}, tableElmStyles), tableBorder)
|
|
46
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
47
|
-
data: context.data,
|
|
48
|
-
thRowStyles: context.thRowStyles,
|
|
49
|
-
thTitleStyles: context.thTitleStyles,
|
|
50
|
-
hasInlineStyles: context.hasInlineStyles,
|
|
51
|
-
thSubTitleStyles: context.thSubTitleStyles,
|
|
52
|
-
headerPrimaryUpper: context.headerPrimaryUpper,
|
|
53
|
-
matrixSizeSelected: context.matrixSizeSelected,
|
|
54
|
-
thPrimaryTitleStyles: context.thPrimaryTitleStyles,
|
|
55
|
-
customHeaderRowIdValue: context.customHeaderRowIdValue,
|
|
56
|
-
customDynamicHeaderTitleIdValue: context.customDynamicHeaderTitleIdValue,
|
|
57
|
-
customDynamicSubHeaderTitleIdValue: context.customDynamicSubHeaderTitleIdValue
|
|
58
|
-
})), /*#__PURE__*/_react.default.createElement(_context.Consumer, null, context => /*#__PURE__*/_react.default.createElement(_matrixRows.default, {
|
|
59
|
-
data: context.data,
|
|
60
|
-
trRowStyles: context.trRowStyles,
|
|
61
|
-
trTitleStyles: context.trTitleStyles,
|
|
62
|
-
rowPrimaryUpper: context.rowPrimaryUpper,
|
|
63
|
-
hasInlineStyles: context.hasInlineStyles,
|
|
64
|
-
trSubTitleStyles: context.trSubTitleStyles,
|
|
65
|
-
matrixSizeSelected: context.matrixSizeSelected,
|
|
66
|
-
reverseMatrixValues: context.reverseMatrixValues,
|
|
67
|
-
trPrimaryTitleStyles: context.trPrimaryTitleStyles,
|
|
68
|
-
customRowDynamicIdValue: context.customRowDynamicIdValue,
|
|
69
|
-
customTableDataDynamicIdValue: context.customTableDataDynamicIdValue
|
|
70
|
-
}))));
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_matrixHeaders.default, null), /*#__PURE__*/_react.default.createElement(_matrixRows.default, null)));
|
|
71
53
|
};
|
|
72
54
|
|
|
73
55
|
ReactMatrix.defaultProps = {
|
|
@@ -93,7 +75,7 @@ ReactMatrix.propTypes = {
|
|
|
93
75
|
header_sub_title: _propTypes.default.string,
|
|
94
76
|
row_header_title: _propTypes.default.string,
|
|
95
77
|
row_header_sub_title: _propTypes.default.string
|
|
96
|
-
}))
|
|
78
|
+
})),
|
|
97
79
|
matrix_values: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
98
80
|
id: _propTypes.default.number.isRequired,
|
|
99
81
|
colour: _propTypes.default.string,
|
|
@@ -104,7 +86,7 @@ ReactMatrix.propTypes = {
|
|
|
104
86
|
response: _propTypes.default.string,
|
|
105
87
|
likelihood_descriptor: _propTypes.default.string.isRequired,
|
|
106
88
|
consequence_descriptor: _propTypes.default.number
|
|
107
|
-
}))
|
|
89
|
+
}))
|
|
108
90
|
}),
|
|
109
91
|
hasTableBorder: _propTypes.default.bool,
|
|
110
92
|
hasInlineStyles: _propTypes.default.bool,
|
package/dist/context/index.js
CHANGED
|
@@ -3,13 +3,37 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = exports.Provider = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
10
|
-
const {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
const Context = /*#__PURE__*/(0, _react.createContext)({
|
|
11
|
+
hasTableBorder: true,
|
|
12
|
+
rowPrimaryUpper: true,
|
|
13
|
+
hasInlineStyles: true,
|
|
14
|
+
matrixSizeSelected: 5,
|
|
15
|
+
headerPrimaryUpper: true,
|
|
16
|
+
hasContainerStyles: true,
|
|
17
|
+
reverseMatrixValues: true,
|
|
18
|
+
tableContainerStyles: {},
|
|
19
|
+
tableStyles: {},
|
|
20
|
+
thRowStyles: {},
|
|
21
|
+
thTitleStyles: {},
|
|
22
|
+
thSubTitleStyles: {},
|
|
23
|
+
thPrimaryTitleStyles: {},
|
|
24
|
+
trRowStyles: {},
|
|
25
|
+
trTitleStyles: {},
|
|
26
|
+
trSubTitleStyles: {},
|
|
27
|
+
trPrimaryTitleStyles: {},
|
|
28
|
+
tdStyles: {},
|
|
29
|
+
customHeaderRowIdValue: "",
|
|
30
|
+
customRowDynamicIdValue: "",
|
|
31
|
+
customTableDataDynamicIdValue: "",
|
|
32
|
+
customRowHeaderDynamicIdValue: "",
|
|
33
|
+
customDynamicHeaderTitleIdValue: "",
|
|
34
|
+
customDynamicSubHeaderTitleIdValue: ""
|
|
35
|
+
});
|
|
36
|
+
const Provider = Context.Provider;
|
|
37
|
+
exports.Provider = Provider;
|
|
38
|
+
var _default = Context;
|
|
39
|
+
exports.default = _default;
|
package/dist/utils/functions.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.groupObjectsByProp = exports.capitaliseString = exports.capitaliseFirstCharacter = void 0;
|
|
6
|
+
exports.groupObjectsByProp = exports.capitaliseString = exports.capitaliseFirstCharacter = exports.callAll = void 0;
|
|
7
7
|
|
|
8
8
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
9
|
|
|
@@ -27,4 +27,20 @@ exports.capitaliseFirstCharacter = capitaliseFirstCharacter;
|
|
|
27
27
|
|
|
28
28
|
const capitaliseString = stringValue => stringValue.toUpperCase();
|
|
29
29
|
|
|
30
|
-
exports.capitaliseString = capitaliseString;
|
|
30
|
+
exports.capitaliseString = capitaliseString;
|
|
31
|
+
|
|
32
|
+
const callAll = function callAll() {
|
|
33
|
+
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
|
+
fns[_key] = arguments[_key];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return function () {
|
|
38
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
39
|
+
args[_key2] = arguments[_key2];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return fns.forEach(fn => fn && fn(...args));
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.callAll = callAll;
|