ui-kit-ck-consultant 0.6.59 → 0.6.61
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 +46 -28
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +46 -28
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -889,39 +889,57 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
889
889
|
|
890
890
|
_this.getCSV = function (callback) {
|
891
891
|
var dataCSV = '';
|
892
|
-
console.log('this.props', _this.props);
|
893
892
|
|
894
|
-
if (_this.props
|
895
|
-
|
893
|
+
if (_this.props.data) {
|
894
|
+
Object.keys(_this.props.data).forEach(function (key) {
|
895
|
+
var rowData = _this.props.data[key].map(function (cell) {
|
896
|
+
return cell ? _this.extractText(cell) : '';
|
897
|
+
}).join(';');
|
896
898
|
|
897
|
-
|
899
|
+
dataCSV += rowData + '\n';
|
900
|
+
});
|
898
901
|
|
899
|
-
|
900
|
-
var
|
902
|
+
_this.props.data.map(function (row) {
|
903
|
+
var rowData = row.map(function (cell) {
|
904
|
+
return cell ? _this.extractText(cell) : '';
|
905
|
+
}).join(';');
|
906
|
+
dataCSV += rowData + '\n';
|
907
|
+
});
|
908
|
+
} else {
|
909
|
+
console.log('this.props', _this.props);
|
901
910
|
|
902
|
-
|
903
|
-
|
911
|
+
if (_this.props && _this.props.children) {
|
912
|
+
console.log('this.props.children', _this.props.children);
|
904
913
|
|
905
|
-
|
906
|
-
});
|
907
|
-
});
|
908
|
-
console.log('Toutes les lignes (Tr) trouvées:', allRows);
|
914
|
+
var tableChildren = _this.getArray(_this.props.children);
|
909
915
|
|
910
|
-
|
911
|
-
|
912
|
-
console.log(row.props.children.length, row.props.children.length !== 2, row.props.children.type, row.props.children.type === React.Fragment, row);
|
916
|
+
var allRows = tableChildren.flatMap(function (section) {
|
917
|
+
var _section$props;
|
913
918
|
|
914
|
-
|
915
|
-
var
|
919
|
+
return _this.getArray((_section$props = section.props) === null || _section$props === void 0 ? void 0 : _section$props.children).filter(function (child) {
|
920
|
+
var _child$type, _child$type2, _child$type3;
|
916
921
|
|
917
|
-
return (
|
922
|
+
return (child === null || child === void 0 ? void 0 : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name) === 'Tr' || (child === null || child === void 0 ? void 0 : (_child$type2 = child.type) === null || _child$type2 === void 0 ? void 0 : _child$type2.displayName) === 'Tr' || (child === null || child === void 0 ? void 0 : (_child$type3 = child.type) === null || _child$type3 === void 0 ? void 0 : _child$type3.displayName) === 'tr';
|
918
923
|
});
|
919
|
-
|
920
|
-
var rowData = cells.map(function (cell) {
|
921
|
-
return cell.props && cell.props.children ? _this.extractText(cell.props.children) : '';
|
922
|
-
}).join(';');
|
923
|
-
dataCSV += rowData + '\n';
|
924
924
|
});
|
925
|
+
console.log('Toutes les lignes (Tr) trouvées:', allRows);
|
926
|
+
|
927
|
+
if (allRows.length > 0) {
|
928
|
+
allRows.forEach(function (row, rowIndex) {
|
929
|
+
console.log(row.props.children.length, row.props.children.length !== 2, row.props.children.type, row.props.children.type === React.Fragment, row);
|
930
|
+
|
931
|
+
var cells = _this.getArray(row.props.children.length !== 2 ? row.props.children.type === React.Fragment ? row.props.children.props.children[0] : row.props.children : row.props.children[0]).filter(function (cell) {
|
932
|
+
var _cell$type, _cell$type2, _cell$type3, _cell$type4, _cell$type5, _cell$type6;
|
933
|
+
|
934
|
+
return (cell === null || cell === void 0 ? void 0 : (_cell$type = cell.type) === null || _cell$type === void 0 ? void 0 : _cell$type.name) === 'Th' || (cell === null || cell === void 0 ? void 0 : (_cell$type2 = cell.type) === null || _cell$type2 === void 0 ? void 0 : _cell$type2.name) === 'Td' || (cell === null || cell === void 0 ? void 0 : (_cell$type3 = cell.type) === null || _cell$type3 === void 0 ? void 0 : _cell$type3.displayName) === 'Th' || (cell === null || cell === void 0 ? void 0 : (_cell$type4 = cell.type) === null || _cell$type4 === void 0 ? void 0 : _cell$type4.displayName) === 'Td' || (cell === null || cell === void 0 ? void 0 : (_cell$type5 = cell.type) === null || _cell$type5 === void 0 ? void 0 : _cell$type5.displayName) === 'th' || (cell === null || cell === void 0 ? void 0 : (_cell$type6 = cell.type) === null || _cell$type6 === void 0 ? void 0 : _cell$type6.displayName) === 'td';
|
935
|
+
});
|
936
|
+
|
937
|
+
var rowData = cells.map(function (cell) {
|
938
|
+
return cell.props && cell.props.children ? _this.extractText(cell.props.children) : '';
|
939
|
+
}).join(';');
|
940
|
+
dataCSV += rowData + '\n';
|
941
|
+
});
|
942
|
+
}
|
925
943
|
}
|
926
944
|
}
|
927
945
|
|
@@ -1089,7 +1107,7 @@ var Th = /*#__PURE__*/function (_React$Component) {
|
|
1089
1107
|
return Th;
|
1090
1108
|
}(React.Component);
|
1091
1109
|
|
1092
|
-
|
1110
|
+
Th.displayName = 'Th';
|
1093
1111
|
|
1094
1112
|
var Td = /*#__PURE__*/function (_React$Component) {
|
1095
1113
|
_inheritsLoose(Td, _React$Component);
|
@@ -1117,9 +1135,9 @@ var Td = /*#__PURE__*/function (_React$Component) {
|
|
1117
1135
|
return Td;
|
1118
1136
|
}(React.Component);
|
1119
1137
|
|
1120
|
-
|
1138
|
+
Td.displayName = 'Td';
|
1121
1139
|
|
1122
|
-
var Tr
|
1140
|
+
var Tr = /*#__PURE__*/function (_React$Component) {
|
1123
1141
|
_inheritsLoose(Tr, _React$Component);
|
1124
1142
|
|
1125
1143
|
function Tr() {
|
@@ -1139,7 +1157,7 @@ var Tr$1 = /*#__PURE__*/function (_React$Component) {
|
|
1139
1157
|
return Tr;
|
1140
1158
|
}(React.Component);
|
1141
1159
|
|
1142
|
-
Tr
|
1160
|
+
Tr.displayName = 'Tr';
|
1143
1161
|
|
1144
1162
|
var style$a = {"nav":"_JJyUj","nav_left":"_3kuw-","nav_right":"_3vpQT","nav_back":"_HJHB0","nav_text":"_1pO70"};
|
1145
1163
|
|
@@ -10605,5 +10623,5 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
10605
10623
|
return Calendar;
|
10606
10624
|
}(React.Component);
|
10607
10625
|
|
10608
|
-
export { Alert, AlertContainer, AlertElement, BarChart, Button, ButtonIcon, Calendar, Card, CardColor, CardStatistics, CardTabs, Chips, Cookie, DoughnutChart, Dropdown, Dropzone, DropzoneMultiple, Error404, FloatActionButton, FloatActionButtonItem, Footer, FormCheckbox, FormInput, FormRadio, FormRange, FormSelect, FormSelectMultiples, FormTextarea, FullModal, Gauge, Header, HorizontalBarChart, Icon, ListingHorizontal, ListingVertical, Loader, Modal, Nav, Pagination, PaginationClass, PieChart, ProgressBar, RadarChart, Sidebar, Signature, Slider, Status, Switch, Table, Tabs, TabsBody, TabsCustom, TabsCustomArrowCustom as TabsCustomArrow, TabsCustomArrowBody, TabsCustomArrowHeader, TabsCustomArrowItem, TabsCustomArrowMenu, TabsCustomBody, TabsCustomHeader, TabsCustomItem, TabsCustomMenu, TabsEdit, TabsEditBody, TabsEditHeader, TabsEditItem, TabsEditMenu, TabsHeader, TabsItem, TabsMenu, Tbody, Td, Th, Thead, Tr
|
10626
|
+
export { Alert, AlertContainer, AlertElement, BarChart, Button, ButtonIcon, Calendar, Card, CardColor, CardStatistics, CardTabs, Chips, Cookie, DoughnutChart, Dropdown, Dropzone, DropzoneMultiple, Error404, FloatActionButton, FloatActionButtonItem, Footer, FormCheckbox, FormInput, FormRadio, FormRange, FormSelect, FormSelectMultiples, FormTextarea, FullModal, Gauge, Header, HorizontalBarChart, Icon, ListingHorizontal, ListingVertical, Loader, Modal, Nav, Pagination, PaginationClass, PieChart, ProgressBar, RadarChart, Sidebar, Signature, Slider, Status, Switch, Table, Tabs, TabsBody, TabsCustom, TabsCustomArrowCustom as TabsCustomArrow, TabsCustomArrowBody, TabsCustomArrowHeader, TabsCustomArrowItem, TabsCustomArrowMenu, TabsCustomBody, TabsCustomHeader, TabsCustomItem, TabsCustomMenu, TabsEdit, TabsEditBody, TabsEditHeader, TabsEditItem, TabsEditMenu, TabsHeader, TabsItem, TabsMenu, Tbody, Td, Th, Thead, Tr };
|
10609
10627
|
//# sourceMappingURL=index.modern.js.map
|