ui-kit-ck-consultant 0.6.3 → 0.6.5
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/index.js +29 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +29 -4
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -922,18 +922,36 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
922
922
|
var dataCSV = '';
|
923
923
|
|
924
924
|
function findStringChild(children) {
|
925
|
+
console.log('Analyzing:', children);
|
926
|
+
|
925
927
|
if (typeof children === 'string') {
|
928
|
+
console.log('String found:', children);
|
926
929
|
return children;
|
927
|
-
}
|
930
|
+
}
|
931
|
+
|
932
|
+
if (Array.isArray(children)) {
|
928
933
|
for (var _iterator = _createForOfIteratorHelperLoose(children), _step; !(_step = _iterator()).done;) {
|
929
934
|
var child = _step.value;
|
930
935
|
var result = findStringChild(child);
|
931
|
-
|
936
|
+
|
937
|
+
if (result) {
|
938
|
+
return result;
|
939
|
+
}
|
932
940
|
}
|
933
|
-
}
|
941
|
+
}
|
942
|
+
|
943
|
+
if (React.isValidElement(children)) {
|
934
944
|
return findStringChild(children.props.children);
|
935
945
|
}
|
936
946
|
|
947
|
+
if (children && typeof children === 'object' && 'toString' in children) {
|
948
|
+
var potentialString = children.toString();
|
949
|
+
|
950
|
+
if (typeof potentialString === 'string' && potentialString !== '[object Object]') {
|
951
|
+
return potentialString;
|
952
|
+
}
|
953
|
+
}
|
954
|
+
|
937
955
|
return null;
|
938
956
|
}
|
939
957
|
|
@@ -944,7 +962,14 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
944
962
|
if (line.props && line.props.children) {
|
945
963
|
_this.getArray(line.props.children).forEach(function (column) {
|
946
964
|
if (column.props && column.props.children) {
|
947
|
-
|
965
|
+
var stringChild = findStringChild(column.props.children);
|
966
|
+
console.log(stringChild);
|
967
|
+
|
968
|
+
if (stringChild) {
|
969
|
+
dataCSV += stringChild + ";";
|
970
|
+
} else {
|
971
|
+
dataCSV += ';';
|
972
|
+
}
|
948
973
|
} else {
|
949
974
|
dataCSV += ';';
|
950
975
|
}
|