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