argous 1.2.247 → 1.3.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/dist/api/WebSocket.d.ts +18 -10
- package/dist/api/WebSocket.js +26 -18
- package/dist/api/index.js +54 -43
- package/dist/api/ws.d.ts +1 -1
- package/dist/api/ws.js +44 -3
- package/dist/components/Alert/Alert.js +17 -7
- package/dist/components/ArgousAction/ArgousAction.js +17 -7
- package/dist/components/ArgousAvatar/ArgousAvatar.d.ts +1 -1
- package/dist/components/ArgousAvatar/ArgousAvatar.js +44 -60
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +1 -1
- package/dist/components/ArgousComplexPagination/ArgousComplexPagination.js +107 -81
- package/dist/components/ArgousComplexTable/ArgousComplexTable.d.ts +1 -1
- package/dist/components/ArgousComplexTable/ArgousComplexTable.js +39 -52
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +1 -1
- package/dist/components/ArgousComplexTableBody/ArgousComplexTableBody.js +119 -97
- package/dist/components/ArgousComplexTableBody/DragAndDrop.d.ts +37 -0
- package/dist/components/ArgousComplexTableBody/DragAndDrop.js +156 -0
- package/dist/components/ArgousComplexTableHead/ArgousComplexTableHead.js +64 -47
- package/dist/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +55 -37
- package/dist/components/ArgousInput/ArgousInput.js +19 -9
- package/dist/components/ArgousPagination/ArgousPagination.js +18 -11
- package/dist/components/ArgousProgressBar/ArgousProgressBar.js +64 -74
- package/dist/components/ArgousSimpleTable/ArgousSimpleTable.js +28 -22
- package/dist/components/AutoComplete/AutoComplete.js +18 -9
- package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +3 -4
- package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +226 -174
- package/dist/components/BarChart/BarChart.js +17 -7
- package/dist/components/BarraFerramentas/BarraFerramentas.js +119 -105
- package/dist/components/Button/Button.js +17 -7
- package/dist/components/Cabecalho/Cabecalho.js +17 -7
- package/dist/components/Calendar/Calendar.js +24 -41
- package/dist/components/Cam/Cam.js +19 -9
- package/dist/components/Carousel/Carousel.js +113 -103
- package/dist/components/CartaoUsuario/CartaoUsuario.js +36 -26
- package/dist/components/Collapse/Collapse.d.ts +3 -3
- package/dist/components/Collapse/Collapse.js +121 -71
- package/dist/components/Compartilhar/Compartilhar.js +70 -65
- package/dist/components/ConfirmModal/BasicModal.d.ts +1 -1
- package/dist/components/ConfirmModal/BasicModal.js +8 -8
- package/dist/components/ConfirmModal/ModalProvider.d.ts +12 -1
- package/dist/components/ConfirmModal/ModalProvider.js +17 -7
- package/dist/components/ConfirmModal/WrapperModal.d.ts +2 -2
- package/dist/components/ConfirmModal/WrapperModal.js +5 -5
- package/dist/components/ContactValidationInput/ContactValidationInput.d.ts +1 -1
- package/dist/components/ContactValidationInput/ContactValidationInput.js +105 -80
- package/dist/components/ContactValidationInput/SealModal.d.ts +1 -1
- package/dist/components/ContactValidationInput/SealModal.js +13 -20
- package/dist/components/Document/Icons.d.ts +2 -2
- package/dist/components/Document/Icons.js +33 -16
- package/dist/components/Document/ModalVisualizacaoDocumentos.d.ts +1 -1
- package/dist/components/Document/ModalVisualizacaoDocumentos.js +33 -17
- package/dist/components/Document/Visualizacao.d.ts +1 -1
- package/dist/components/Document/Visualizacao.js +48 -34
- package/dist/components/DropArea/DropArea.js +27 -12
- package/dist/components/DropArea/Html5FileSelector.js +6 -7
- package/dist/components/Editor/ScriptLoader2.d.ts +1 -1
- package/dist/components/Editor/ScriptLoader2.js +2 -2
- package/dist/components/Editor/Utils.d.ts +3 -3
- package/dist/components/Editor/Utils.js +2 -2
- package/dist/components/Editor/components/Editor.d.ts +1 -1
- package/dist/components/Editor/components/Editor.js +18 -9
- package/dist/components/Editor/components/EditorPropTypes.js +17 -7
- package/dist/components/FilePreparer/FilePreparer.d.ts +1 -1
- package/dist/components/FilePreparer/FilePreparer.js +105 -88
- package/dist/components/FileUploader/FileUploader.js +33 -22
- package/dist/components/FormVisualizer/FormVisualizer.d.ts +5 -7
- package/dist/components/FormVisualizer/FormVisualizer.js +92 -61
- package/dist/components/HalfGauge/HalfGauge.js +87 -135
- package/dist/components/Highlight/Highlight.js +23 -12
- package/dist/components/ImageResize/ImageResize.d.ts +1 -1
- package/dist/components/ImageResize/ImageResize.js +79 -85
- package/dist/components/ImageResizeButton/ImageResizeButton.d.ts +1 -1
- package/dist/components/ImageResizeButton/ImageResizeButton.js +19 -9
- package/dist/components/Input/Input.js +19 -9
- package/dist/components/InputTags/InputTags.js +22 -13
- package/dist/components/ListSelect/ListSelect.js +17 -7
- package/dist/components/MaterialButton/MaterialButton.d.ts +2 -4
- package/dist/components/MaterialButton/MaterialButton.js +56 -125
- package/dist/components/MenuBar/MenuBar.js +17 -7
- package/dist/components/MonthPicker/MonthPicker.js +20 -10
- package/dist/components/MultipleSelect/MultipleSelect.js +17 -7
- package/dist/components/OtpInput/OtpInput.d.ts +1 -1
- package/dist/components/OtpInput/OtpInput.js +71 -58
- package/dist/components/OutputText/OutputText.js +17 -7
- package/dist/components/Pagination/Pagination.js +17 -7
- package/dist/components/PercentageDisplay/PercentageDisplay.d.ts +1 -1
- package/dist/components/PercentageDisplay/PercentageDisplay.js +24 -92
- package/dist/components/Programa/PageCodeEasterEgg.d.ts +5 -4
- package/dist/components/Programa/PageCodeEasterEgg.js +41 -32
- package/dist/components/Programa/Programa.d.ts +2 -2
- package/dist/components/Programa/Programa.js +50 -28
- package/dist/components/Programa/Tab.d.ts +2 -2
- package/dist/components/Programa/TabNavigationRail.d.ts +3 -3
- package/dist/components/Programa/TabNavigationRail.js +13 -55
- package/dist/components/ProgressBar/ProgressBar.js +17 -7
- package/dist/components/Select/Select.js +17 -7
- package/dist/components/SimpleTable/SimpleTable.js +17 -7
- package/dist/components/Stepper/Stepper.d.ts +1 -1
- package/dist/components/Stepper/Stepper.js +194 -179
- package/dist/components/TablePicker/TablePicker.js +37 -12
- package/dist/components/Tabs/Tabs.js +17 -7
- package/dist/components/TextArea/TextArea.js +17 -7
- package/dist/components/TextToHtml/Cursor.d.ts +1 -1
- package/dist/components/TextToHtml/Cursor.js +17 -7
- package/dist/components/TextToHtml/TextStyles.d.ts +1 -1
- package/dist/components/TextToHtml/TextStyles.js +51 -44
- package/dist/components/TextToHtml/TextToHtml.js +37 -17
- package/dist/components/ThreadLog/ThreadLog.js +19 -9
- package/dist/components/UserCard/UserCard.js +36 -26
- package/dist/components/UtilAutoComplete/UtilAutoComplete.d.ts +3 -4
- package/dist/components/UtilAutoComplete/UtilAutoComplete.js +26 -16
- package/dist/components/UtilTextField/UtilTextField.d.ts +1 -1
- package/dist/components/UtilTextField/UtilTextField.js +26 -14
- package/dist/components/Zoom/Zoom.js +23 -24
- package/dist/fieldsRedux/createField.js +17 -7
- package/dist/fieldsRedux/fieldsRedux.js +19 -9
- package/dist/fieldsRedux/passFields.js +17 -7
- package/dist/reducers/index.d.ts +98 -2
- package/dist/utils/api.js +32 -15
- package/dist/utils/config.js +2 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +68 -54
- package/dist/utils/store.js +2 -3
- package/lib/api/WebSocket.js +11 -12
- package/lib/api/index.js +14 -14
- package/lib/api/ws.js +48 -4
- package/lib/components/ArgousAvatar/ArgousAvatar.d.ts +1 -1
- package/lib/components/ArgousAvatar/ArgousAvatar.js +20 -54
- package/lib/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +1 -1
- package/lib/components/ArgousComplexPagination/ArgousComplexPagination.js +50 -25
- package/lib/components/ArgousComplexTable/ArgousComplexTable.d.ts +1 -1
- package/lib/components/ArgousComplexTable/ArgousComplexTable.js +15 -15
- package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +1 -1
- package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.js +121 -106
- package/lib/components/ArgousComplexTableBody/DragAndDrop.js +85 -0
- package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.js +60 -51
- package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +21 -12
- package/lib/components/ArgousInput/ArgousInput.js +2 -2
- package/lib/components/ArgousPagination/ArgousPagination.js +12 -4
- package/lib/components/ArgousProgressBar/ArgousProgressBar.js +67 -78
- package/lib/components/ArgousSimpleTable/ArgousSimpleTable.js +12 -18
- package/lib/components/AutoComplete/AutoComplete.js +2 -3
- package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +3 -4
- package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +174 -108
- package/lib/components/BarraFerramentas/BarraFerramentas.js +32 -21
- package/lib/components/Calendar/Calendar.js +7 -42
- package/lib/components/Carousel/Carousel.js +42 -27
- package/lib/components/CartaoUsuario/CartaoUsuario.js +6 -6
- package/lib/components/Collapse/Collapse.d.ts +3 -3
- package/lib/components/Collapse/Collapse.js +92 -57
- package/lib/components/Compartilhar/Compartilhar.js +47 -46
- package/lib/components/ConfirmModal/BasicModal.tsx +1 -1
- package/lib/components/ConfirmModal/WrapperModal.tsx +2 -2
- package/lib/components/ContactValidationInput/ContactValidationInput.d.ts +1 -1
- package/lib/components/ContactValidationInput/ContactValidationInput.js +248 -213
- package/lib/components/ContactValidationInput/SealModal.js +38 -32
- package/lib/components/Document/Icons.js +14 -6
- package/lib/components/Document/ModalVisualizacaoDocumentos.js +9 -2
- package/lib/components/Document/Visualizacao.js +31 -25
- package/lib/components/DropArea/DropArea.js +9 -3
- package/lib/components/Editor/ScriptLoader2.ts +3 -3
- package/lib/components/Editor/Utils.ts +3 -3
- package/lib/components/Editor/components/Editor.tsx +1 -1
- package/lib/components/Editor/tinymce/README.md +73 -0
- package/lib/components/Editor/tinymce/langs/README.md +3 -0
- package/lib/components/Editor/tinymce/models/dom/model.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/accordion/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/table/plugin.js +3 -3
- package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +1 -1
- package/lib/components/Editor/tinymce/themes/silver/theme.js +38 -38
- package/lib/components/Editor/tinymce/themes/silver/theme.min.js +1 -1
- package/lib/components/Editor/tinymce/tinymce.js +12 -12
- package/lib/components/Editor/tinymce/tinymce.min.js +1 -1
- package/lib/components/FilePreparer/FilePreparer.d.ts +1 -1
- package/lib/components/FilePreparer/FilePreparer.js +112 -108
- package/lib/components/FileUploader/FileUploader.js +8 -7
- package/lib/components/FormVisualizer/FormVisualizer.d.ts +5 -7
- package/lib/components/FormVisualizer/FormVisualizer.js +59 -46
- package/lib/components/HalfGauge/HalfGauge.js +87 -85
- package/lib/components/Highlight/Highlight.js +4 -4
- package/lib/components/ImageResize/ImageResize.d.ts +1 -1
- package/lib/components/ImageResize/ImageResize.js +123 -118
- package/lib/components/ImageResizeButton/ImageResizeButton.d.ts +1 -1
- package/lib/components/ImageResizeButton/ImageResizeButton.js +1 -1
- package/lib/components/Input/Input.js +2 -2
- package/lib/components/InputTags/InputTags.js +6 -7
- package/lib/components/MaterialButton/MaterialButton.d.ts +2 -4
- package/lib/components/MaterialButton/MaterialButton.js +50 -125
- package/lib/components/MonthPicker/MonthPicker.js +2 -2
- package/lib/components/OtpInput/OtpInput.tsx +77 -69
- package/lib/components/PercentageDisplay/PercentageDisplay.d.ts +1 -1
- package/lib/components/PercentageDisplay/PercentageDisplay.js +29 -54
- package/lib/components/Programa/PageCodeEasterEgg.js +41 -40
- package/lib/components/Programa/Programa.d.ts +2 -2
- package/lib/components/Programa/Programa.js +21 -5
- package/lib/components/Programa/Tab.ts +4 -2
- package/lib/components/Programa/TabNavigationRail.js +9 -31
- package/lib/components/Stepper/Stepper.d.ts +1 -1
- package/lib/components/Stepper/Stepper.js +222 -190
- package/lib/components/TablePicker/TablePicker.js +11 -6
- package/lib/components/TextToHtml/TextStyles.js +42 -42
- package/lib/components/TextToHtml/TextToHtml.js +102 -92
- package/lib/components/ThreadLog/ThreadLog.js +1 -1
- package/lib/components/UserCard/UserCard.js +6 -6
- package/lib/components/UtilAutoComplete/UtilAutoComplete.d.ts +3 -4
- package/lib/components/UtilAutoComplete/UtilAutoComplete.js +67 -9
- package/lib/components/UtilTextField/UtilTextField.d.ts +1 -1
- package/lib/components/UtilTextField/UtilTextField.js +18 -16
- package/lib/components/Zoom/Zoom.js +6 -3
- package/lib/utils/api.ts +1 -1
- package/lib/utils/index.ts +10 -8
- package/package.json +56 -56
- package/.gitlab-ci.yml +0 -21
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
47
|
var t = {};
|
|
38
48
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -44,66 +54,76 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
44
54
|
}
|
|
45
55
|
return t;
|
|
46
56
|
};
|
|
47
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
-
};
|
|
50
57
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
58
|
exports.CustomTooltip = void 0;
|
|
52
59
|
var ArgousComplexTable_1 = require("../ArgousComplexTable/ArgousComplexTable");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
60
|
+
var material_1 = require("@mui/material");
|
|
61
|
+
var styles_1 = require("@mui/material/styles");
|
|
62
|
+
var clsx_1 = require("clsx");
|
|
55
63
|
var lodash_1 = require("lodash");
|
|
56
64
|
var react_1 = __importStar(require("react"));
|
|
57
65
|
var md_1 = require("react-icons/md");
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
dragHandle:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
66
|
+
var DragAndDrop_1 = require("./DragAndDrop");
|
|
67
|
+
var classes = {
|
|
68
|
+
dragHandle: 'argous-complex-table-body-drag-handle',
|
|
69
|
+
hover: 'argous-complex-table-body-hover',
|
|
70
|
+
open: 'argous-complex-table-body-open',
|
|
71
|
+
semDados: 'argous-complex-table-body-sem-dados',
|
|
72
|
+
group: 'argous-complex-table-body-group',
|
|
73
|
+
loading: 'argous-complex-table-body-loading',
|
|
74
|
+
ghost: 'argous-complex-table-body-ghost',
|
|
75
|
+
tableCell: 'argous-complex-table-body-table-cell',
|
|
76
|
+
};
|
|
77
|
+
var tableBodyStyles = function (theme) {
|
|
78
|
+
var _a;
|
|
79
|
+
return (_a = {},
|
|
80
|
+
_a[".".concat(classes.dragHandle)] = {
|
|
81
|
+
cursor: 'n-resize'
|
|
82
|
+
},
|
|
83
|
+
_a[".".concat(classes.hover)] = {
|
|
84
|
+
'&:hover': {
|
|
85
|
+
backgroundColor: (0, styles_1.alpha)(theme.palette.secondary.main, theme.palette.action.selectedOpacity * 2)
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
_a[".".concat(classes.open)] = {
|
|
89
|
+
backgroundColor: (0, styles_1.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
90
|
+
'&:hover': {
|
|
91
|
+
backgroundColor: (0, styles_1.alpha)(theme.palette.primary.main, theme.palette.action.selectedOpacity * 2),
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
_a[".".concat(classes.semDados)] = {
|
|
95
|
+
padding: theme.spacing(1),
|
|
96
|
+
paddingLeft: theme.spacing(2),
|
|
97
|
+
fontSize: '1rem',
|
|
98
|
+
},
|
|
99
|
+
_a[".".concat(classes.group)] = {
|
|
100
|
+
'&>td': {
|
|
101
|
+
padding: '0px',
|
|
102
|
+
// '&:hover':{
|
|
103
|
+
// backgroundColor: theme.palette.action.selected
|
|
104
|
+
// }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
_a[".".concat(classes.loading)] = {
|
|
108
|
+
textAlign: 'center',
|
|
109
|
+
padding: '7px'
|
|
110
|
+
},
|
|
111
|
+
_a[".".concat(classes.ghost)] = {
|
|
112
|
+
borderBottom: '1px solid #0000',
|
|
113
|
+
userSelect: 'none',
|
|
114
|
+
'&:hover': {
|
|
115
|
+
backgroundColor: '#0000 !important'
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
_a[".".concat(classes.tableCell)] = {
|
|
119
|
+
overflow: 'hidden',
|
|
120
|
+
whiteSpace: 'nowrap',
|
|
121
|
+
textOverflow: 'ellipsis'
|
|
122
|
+
},
|
|
123
|
+
_a);
|
|
124
|
+
};
|
|
104
125
|
var ArgousComplexTableBody = (0, react_1.memo)(function (_a) {
|
|
105
126
|
var children = _a.children, line = _a.line, lineStyle = _a.lineStyle, handleOpenClose = _a.handleOpenClose, lineClass = _a.lineClass, enableCheck = _a.enableCheck, disableCheckIf = _a.disableCheckIf, columnStyles = _a.columnStyles, head = _a.head, onClick = _a.onClick, onDoubleClick = _a.onDoubleClick, indexToSelect = _a.indexToSelect, open = _a.open, dadosMostrados = _a.dadosMostrados, columnOptions = _a.columnOptions, lineTitle = _a.lineTitle, customKey = _a.customKey, columnProps = _a.columnProps, rowProps = _a.rowProps, enableDrag = _a.enableDrag, onDrop = _a.onDrop;
|
|
106
|
-
var classes = useStyles();
|
|
107
127
|
var _b = (0, react_1.useContext)(ArgousComplexTable_1.TableContext), lista = _b.lista, selected = _b.selected, dispatch = _b.dispatch, loading = _b.loading;
|
|
108
128
|
var handleClick = function (name) {
|
|
109
129
|
var selectedIndex = selected.indexOf(name);
|
|
@@ -127,49 +147,51 @@ var ArgousComplexTableBody = (0, react_1.memo)(function (_a) {
|
|
|
127
147
|
}
|
|
128
148
|
return coluna;
|
|
129
149
|
};
|
|
130
|
-
return (react_1.default.createElement(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
150
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
151
|
+
react_1.default.createElement(material_1.GlobalStyles, { styles: tableBodyStyles }),
|
|
152
|
+
react_1.default.createElement(DragAndDrop_1.Container, { dragHandleSelector: ".".concat(classes.dragHandle), onDrop: onDrop, render: function (containerRef) {
|
|
153
|
+
var _a;
|
|
154
|
+
return (react_1.default.createElement(material_1.TableBody, { ref: containerRef }, loading ? (react_1.default.createElement(material_1.TableRow, null,
|
|
155
|
+
react_1.default.createElement(material_1.TableCell, { className: classes.loading, colSpan: (dadosMostrados === null || dadosMostrados === void 0 ? void 0 : dadosMostrados.length) && ((_a = line(dadosMostrados[0])) === null || _a === void 0 ? void 0 : _a.length) + (enableCheck ? 1 : 0) + (enableDrag ? 1 : 0) },
|
|
156
|
+
react_1.default.createElement(material_1.CircularProgress, { disableShrink: true })))) : dadosMostrados.length ? dadosMostrados.map(function (linha, i) {
|
|
157
|
+
var isItemSelected = isSelected(linha[indexToSelect]);
|
|
158
|
+
var isItemOpen = i === open;
|
|
159
|
+
var ghostRow = ((0, lodash_1.isArray)(linha)) ? !linha.some(function (value) { return !!value; }) : false;
|
|
160
|
+
var _a = rowProps({ index: i, linhaOriginal: linha, linhaFormatada: line(linha), itensSelecionados: selected }) || {}, title = _a.title, rowProperties = __rest(_a, ["title"]);
|
|
161
|
+
return (react_1.default.createElement(DragAndDrop_1.Draggable, { key: customKey ? lista[i][customKey] : i, render: function (draggableRef) {
|
|
162
|
+
var _a, _b;
|
|
163
|
+
var _c;
|
|
164
|
+
return (
|
|
165
|
+
//TODO criar proprio draggable pois esse remove classes do filho
|
|
166
|
+
(react_1.default.createElement(react_1.Fragment, null,
|
|
167
|
+
react_1.default.createElement(exports.CustomTooltip, { title: (ghostRow) ? '' : (lineTitle || title) },
|
|
168
|
+
react_1.default.createElement(material_1.TableRow, __assign({ component: DragAndDrop_1.Draggable }, rowProperties, { className: (0, clsx_1.clsx)((_a = {},
|
|
169
|
+
_a[classes.hover] = isItemSelected,
|
|
170
|
+
_a[classes.open] = (isItemOpen && !!children),
|
|
171
|
+
_a[classes.ghost] = ghostRow,
|
|
172
|
+
_a), (ghostRow) ? '' : lineClass(line(linha), linha, i), rowProperties.className), hover: true, role: 'checkbox', tabIndex: -1, selected: isItemSelected, style: (lineStyle && !ghostRow) ? lineStyle(linha, line(linha), i) : undefined, onClick: (ghostRow) ? undefined : (onClick) ? function (e) { return onClick(e, linha, line(linha), i); } : (children) ? function () { return handleOpenClose(i); } : undefined, onDoubleClick: (ghostRow) ? undefined : (onDoubleClick) ? function (e) { return onDoubleClick(e, linha, line(linha), i); } : undefined, ref: draggableRef }),
|
|
173
|
+
enableDrag && react_1.default.createElement(material_1.TableCell, { padding: 'checkbox' },
|
|
174
|
+
react_1.default.createElement(material_1.Tooltip, { title: 'Arrastar' },
|
|
175
|
+
react_1.default.createElement(material_1.IconButton, { size: 'small', className: classes.dragHandle },
|
|
176
|
+
react_1.default.createElement(md_1.MdDragHandle, null)))),
|
|
177
|
+
(enableCheck) && (react_1.default.createElement(material_1.TableCell, { padding: 'checkbox', className: (0, clsx_1.clsx)((_b = {}, _b[classes.ghost] = ghostRow, _b)) }, (!ghostRow) && (react_1.default.createElement(material_1.Checkbox, { checked: isItemSelected, disabled: (disableCheckIf) && disableCheckIf(linha, line(linha), i), onClick: function (event) {
|
|
178
|
+
event.stopPropagation();
|
|
179
|
+
handleClick(linha[indexToSelect]);
|
|
180
|
+
} })))),
|
|
181
|
+
(0, lodash_1.isArray)(line(linha)) && line(linha).map(function (coluna, j) { return ((ghostRow) ? (react_1.default.createElement(material_1.TableCell, { key: j, className: (0, clsx_1.clsx)(classes.tableCell, classes.ghost) }, "\u00A0")) : (react_1.default.createElement(material_1.TableCell, __assign({ key: j }, columnProps(j, coluna, linha, line(linha)), { style: columnStyles ? columnStyles[j] : undefined, className: classes.tableCell }), getCellContent(coluna, dadosMostrados[i], j, i)))); }))),
|
|
182
|
+
children && (react_1.default.createElement(material_1.TableRow, { className: classes.group },
|
|
183
|
+
react_1.default.createElement(material_1.TableCell, { colSpan: (dadosMostrados === null || dadosMostrados === void 0 ? void 0 : dadosMostrados.length) && ((_c = line(dadosMostrados[0])) === null || _c === void 0 ? void 0 : _c.length) + (enableCheck ? 1 : 0) + (enableDrag ? 1 : 0), style: { padding: open === i ? 8 : 0 }, className: 'argous-complex-table-group-cell' },
|
|
184
|
+
react_1.default.createElement(material_1.Collapse, { in: open === i, mountOnEnter: true, unmountOnExit: true }, typeof children === 'function' ? children({ linha: line(linha), linhaOriginal: linha, index: i }) : children)))))));
|
|
185
|
+
} }));
|
|
186
|
+
}) : react_1.default.createElement(material_1.TableRow, null,
|
|
187
|
+
react_1.default.createElement(material_1.Typography, { className: classes.semDados, component: 'td', variant: 'h6', colSpan: head.length + (enableCheck ? 1 : 0) }, "Nenhum dado a ser exibido"))));
|
|
188
|
+
} })));
|
|
167
189
|
});
|
|
168
190
|
exports.default = ArgousComplexTableBody;
|
|
169
191
|
var CustomTooltip = function (_a) {
|
|
170
192
|
var title = _a.title, children = _a.children;
|
|
171
193
|
if (title)
|
|
172
|
-
return react_1.default.createElement(
|
|
194
|
+
return react_1.default.createElement(material_1.Tooltip, { arrow: true, title: title }, children);
|
|
173
195
|
return children;
|
|
174
196
|
};
|
|
175
197
|
exports.CustomTooltip = CustomTooltip;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export class Container extends React.Component<any, any, any> {
|
|
2
|
+
constructor(props: any);
|
|
3
|
+
constructor(props: any, context: any);
|
|
4
|
+
componentDidMount(): void;
|
|
5
|
+
previousContainer: any;
|
|
6
|
+
container: any;
|
|
7
|
+
componentDidUpdate(): void;
|
|
8
|
+
componentWillUnmount(): void;
|
|
9
|
+
setRef: (element: any) => void;
|
|
10
|
+
containerElement: any;
|
|
11
|
+
getContainerOptions: () => {};
|
|
12
|
+
render(): any;
|
|
13
|
+
}
|
|
14
|
+
export namespace Container {
|
|
15
|
+
namespace propTypes {
|
|
16
|
+
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
17
|
+
let render: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
let style: PropTypes.Requireable<object>;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export class Draggable extends React.Component<any, any, any> {
|
|
22
|
+
constructor(props: any);
|
|
23
|
+
constructor(props: any, context: any);
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
export namespace Draggable {
|
|
27
|
+
export namespace propTypes_1 {
|
|
28
|
+
let children_1: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
29
|
+
export { children_1 as children };
|
|
30
|
+
export let className: PropTypes.Requireable<string>;
|
|
31
|
+
let render_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
|
+
export { render_1 as render };
|
|
33
|
+
}
|
|
34
|
+
export { propTypes_1 as propTypes };
|
|
35
|
+
}
|
|
36
|
+
import React from 'react';
|
|
37
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
|
+
if (k2 === undefined) k2 = k;
|
|
30
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
33
|
+
}
|
|
34
|
+
Object.defineProperty(o, k2, desc);
|
|
35
|
+
}) : (function(o, m, k, k2) {
|
|
36
|
+
if (k2 === undefined) k2 = k;
|
|
37
|
+
o[k2] = m[k];
|
|
38
|
+
}));
|
|
39
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
40
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
41
|
+
}) : function(o, v) {
|
|
42
|
+
o["default"] = v;
|
|
43
|
+
});
|
|
44
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
45
|
+
var ownKeys = function(o) {
|
|
46
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
47
|
+
var ar = [];
|
|
48
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
49
|
+
return ar;
|
|
50
|
+
};
|
|
51
|
+
return ownKeys(o);
|
|
52
|
+
};
|
|
53
|
+
return function (mod) {
|
|
54
|
+
if (mod && mod.__esModule) return mod;
|
|
55
|
+
var result = {};
|
|
56
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
57
|
+
__setModuleDefault(result, mod);
|
|
58
|
+
return result;
|
|
59
|
+
};
|
|
60
|
+
})();
|
|
61
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
+
};
|
|
64
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
+
exports.Draggable = exports.Container = void 0;
|
|
66
|
+
var prop_types_1 = __importDefault(require("prop-types"));
|
|
67
|
+
var react_1 = __importStar(require("react"));
|
|
68
|
+
var trello_smooth_dnd_1 = __importStar(require("trello-smooth-dnd"));
|
|
69
|
+
trello_smooth_dnd_1.default.dropHandler = trello_smooth_dnd_1.dropHandlers.reactDropHandler().handler;
|
|
70
|
+
trello_smooth_dnd_1.default.wrapChild = function (child) { return child; };
|
|
71
|
+
var Container = /** @class */ (function (_super) {
|
|
72
|
+
__extends(Container, _super);
|
|
73
|
+
function Container() {
|
|
74
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
75
|
+
_this.setRef = function (element) {
|
|
76
|
+
_this.containerElement = element;
|
|
77
|
+
};
|
|
78
|
+
_this.getContainerOptions = function () {
|
|
79
|
+
var functionProps = {};
|
|
80
|
+
var callbacks = [
|
|
81
|
+
'onDragStart',
|
|
82
|
+
'onDragEnd',
|
|
83
|
+
'onDrop',
|
|
84
|
+
'getChildPayload',
|
|
85
|
+
'shouldAnimateDrop',
|
|
86
|
+
'shouldAcceptDrop',
|
|
87
|
+
'onDragEnter',
|
|
88
|
+
'onDragLeave',
|
|
89
|
+
'render',
|
|
90
|
+
'onDropReady',
|
|
91
|
+
'getGhostParent'
|
|
92
|
+
];
|
|
93
|
+
callbacks.forEach(function (callback) {
|
|
94
|
+
if (_this.props[callback]) {
|
|
95
|
+
functionProps[callback] = function () {
|
|
96
|
+
var _a;
|
|
97
|
+
var parameters = [];
|
|
98
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
99
|
+
parameters[_i] = arguments[_i];
|
|
100
|
+
}
|
|
101
|
+
return (_a = _this.props)[callback].apply(_a, parameters);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return __assign(__assign({}, _this.props), functionProps);
|
|
106
|
+
};
|
|
107
|
+
return _this;
|
|
108
|
+
}
|
|
109
|
+
Container.prototype.componentDidMount = function () {
|
|
110
|
+
this.previousContainer = this.containerElement;
|
|
111
|
+
this.container = (0, trello_smooth_dnd_1.default)(this.containerElement, this.getContainerOptions());
|
|
112
|
+
};
|
|
113
|
+
Container.prototype.componentDidUpdate = function () {
|
|
114
|
+
if (this.previousContainer && this.previousContainer !== this.containerElement) {
|
|
115
|
+
this.container.dispose();
|
|
116
|
+
this.container = (0, trello_smooth_dnd_1.default)(this.containerElement, this.getContainerOptions());
|
|
117
|
+
this.previousContainer = this.containerElement;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
Container.prototype.componentWillUnmount = function () {
|
|
121
|
+
this.container.dispose();
|
|
122
|
+
};
|
|
123
|
+
Container.prototype.render = function () {
|
|
124
|
+
if (this.props.render) {
|
|
125
|
+
return this.props.render(this.setRef);
|
|
126
|
+
}
|
|
127
|
+
return react_1.default.createElement("div", { style: this.props.style, ref: this.setRef }, this.props.children);
|
|
128
|
+
};
|
|
129
|
+
return Container;
|
|
130
|
+
}(react_1.Component));
|
|
131
|
+
exports.Container = Container;
|
|
132
|
+
Container.propTypes = {
|
|
133
|
+
children: prop_types_1.default.node,
|
|
134
|
+
render: prop_types_1.default.func,
|
|
135
|
+
style: prop_types_1.default.object
|
|
136
|
+
};
|
|
137
|
+
var Draggable = /** @class */ (function (_super) {
|
|
138
|
+
__extends(Draggable, _super);
|
|
139
|
+
function Draggable() {
|
|
140
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
141
|
+
}
|
|
142
|
+
Draggable.prototype.render = function () {
|
|
143
|
+
if (this.props.render) {
|
|
144
|
+
return react_1.default.cloneElement(this.props.render(), { className: trello_smooth_dnd_1.constants.wrapperClass });
|
|
145
|
+
}
|
|
146
|
+
var className = "".concat(this.props.className ? "".concat(this.props.className, " ") : '').concat(trello_smooth_dnd_1.constants.wrapperClass);
|
|
147
|
+
return react_1.default.createElement("div", __assign({}, this.props, { className: className }), this.props.children);
|
|
148
|
+
};
|
|
149
|
+
return Draggable;
|
|
150
|
+
}(react_1.Component));
|
|
151
|
+
exports.Draggable = Draggable;
|
|
152
|
+
Draggable.propTypes = {
|
|
153
|
+
children: prop_types_1.default.node,
|
|
154
|
+
className: prop_types_1.default.string,
|
|
155
|
+
render: prop_types_1.default.func
|
|
156
|
+
};
|
|
@@ -15,46 +15,61 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
28
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
36
|
var ArgousComplexTable_1 = require("../ArgousComplexTable/ArgousComplexTable");
|
|
30
|
-
var
|
|
31
|
-
var
|
|
37
|
+
var material_1 = require("@mui/material");
|
|
38
|
+
var styles_1 = require("@mui/material/styles");
|
|
39
|
+
var clsx_1 = require("clsx");
|
|
32
40
|
var lodash_1 = require("lodash");
|
|
33
41
|
var react_1 = __importStar(require("react"));
|
|
34
|
-
var
|
|
35
|
-
highlight:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
var classes = {
|
|
43
|
+
highlight: 'argous-complex-table-head-highlight',
|
|
44
|
+
lighthighlight: 'argous-complex-table-head-light-highlight',
|
|
45
|
+
visuallyHidden: 'argous-complex-table-head-visually-hidden',
|
|
46
|
+
};
|
|
47
|
+
var tableHeadStyles = function (theme) {
|
|
48
|
+
var _a;
|
|
49
|
+
return (_a = {},
|
|
50
|
+
_a[".".concat(classes.highlight)] = {
|
|
51
|
+
color: theme.palette.mode === 'light' ? theme.palette.secondary.main : theme.palette.text.primary,
|
|
52
|
+
backgroundColor: (0, styles_1.alpha)(theme.palette.secondary.main, theme.palette.action.selectedOpacity * 2)
|
|
53
|
+
},
|
|
54
|
+
_a[".".concat(classes.lighthighlight)] = {
|
|
55
|
+
background: (0, styles_1.alpha)(theme.palette.secondary.main, theme.palette.action.selectedOpacity)
|
|
56
|
+
},
|
|
57
|
+
_a[".".concat(classes.visuallyHidden)] = {
|
|
58
|
+
border: 0,
|
|
59
|
+
clip: 'rect(0 0 0 0)',
|
|
60
|
+
height: 1,
|
|
61
|
+
margin: -1,
|
|
62
|
+
overflow: 'hidden',
|
|
63
|
+
padding: 0,
|
|
64
|
+
position: 'absolute',
|
|
65
|
+
top: 20,
|
|
66
|
+
width: 1,
|
|
67
|
+
},
|
|
68
|
+
_a);
|
|
69
|
+
};
|
|
54
70
|
var ArgousComplexTableHead = (0, react_1.memo)(function (_a) {
|
|
55
71
|
var _b;
|
|
56
72
|
var numSelected = _a.numSelected, rowCount = _a.rowCount, head = _a.head, enableCheck = _a.enableCheck, disableCheckIf = _a.disableCheckIf, line = _a.line, size = _a.size, headerColumnStyles = _a.headerColumnStyles, disableSorting = _a.disableSorting, ordCols = _a.ordCols, cortaDados = _a.cortaDados, enableDrag = _a.enableDrag;
|
|
57
|
-
var classes = useStyles();
|
|
58
73
|
var _c = (0, react_1.useContext)(ArgousComplexTable_1.TableContext), selected = _c.selected, order = _c.order, orderBy = _c.orderBy, dispatch = _c.dispatch, lista = _c.lista, indexToSelect = _c.indexToSelect, method = _c.method, externalCtrlPgn = _c.externalCtrlPgn;
|
|
59
74
|
var handleRequestSort = function (property) {
|
|
60
75
|
var isAsc = orderBy === property && order === 'asc';
|
|
@@ -74,19 +89,21 @@ var ArgousComplexTableHead = (0, react_1.memo)(function (_a) {
|
|
|
74
89
|
else
|
|
75
90
|
dispatch({ type: 'setSelected', value: [] });
|
|
76
91
|
};
|
|
77
|
-
return (react_1.default.createElement(
|
|
78
|
-
react_1.default.createElement(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
react_1.default.createElement(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
93
|
+
react_1.default.createElement(material_1.GlobalStyles, { styles: tableHeadStyles }),
|
|
94
|
+
react_1.default.createElement(material_1.TableHead, null,
|
|
95
|
+
react_1.default.createElement(material_1.TableRow, { className: (0, clsx_1.clsx)((_b = {},
|
|
96
|
+
_b[classes.highlight] = (((numSelected === rowCount) || (numSelected === length) || (numSelected === (lista === null || lista === void 0 ? void 0 : lista.length))) && (rowCount && length)),
|
|
97
|
+
_b[classes.lighthighlight] = ((numSelected > 0) && ((method || externalCtrlPgn) ? (numSelected < (lista === null || lista === void 0 ? void 0 : lista.length)) : (numSelected < rowCount))),
|
|
98
|
+
_b)) },
|
|
99
|
+
enableDrag && react_1.default.createElement(material_1.TableCell, { padding: 'checkbox' }),
|
|
100
|
+
enableCheck && react_1.default.createElement(material_1.TableCell, { padding: 'checkbox' },
|
|
101
|
+
react_1.default.createElement(material_1.Checkbox, { disabled: !length, indeterminate: (method || externalCtrlPgn) ? ((numSelected > 0) && (numSelected < (lista === null || lista === void 0 ? void 0 : lista.length))) : ((numSelected > 0) && (numSelected < length)), checked: (method || externalCtrlPgn) ? ((rowCount > 0) && ((numSelected === rowCount) || (numSelected === (lista === null || lista === void 0 ? void 0 : lista.length)))) : ((rowCount > 0) && length && (numSelected === length)), onChange: handleSelectAllClick })),
|
|
102
|
+
(0, lodash_1.isArray)(head) && head.map(function (item, i) { return (react_1.default.createElement(material_1.TableCell, { key: i, style: headerColumnStyles ? headerColumnStyles[i] : undefined }, (disableSorting[i] || (ordCols && !ordCols[i])) ?
|
|
103
|
+
item
|
|
104
|
+
:
|
|
105
|
+
react_1.default.createElement(material_1.TableSortLabel, { active: orderBy === i, direction: orderBy === i ? order : 'asc', onClick: function () { return handleRequestSort(i); } },
|
|
106
|
+
item,
|
|
107
|
+
orderBy === i ? (react_1.default.createElement("span", { className: classes.visuallyHidden }, order === 'desc' ? 'sorted descending' : 'sorted ascending')) : null))); })))));
|
|
91
108
|
});
|
|
92
109
|
exports.default = ArgousComplexTableHead;
|