argous 1.2.240 → 1.2.241
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.
|
@@ -133,29 +133,28 @@ var ArgousComplexTableBody = react_1.memo(function (_a) {
|
|
|
133
133
|
var ghostRow = (lodash_1.isArray(linha)) ? !linha.some(function (value) { return !!value; }) : false;
|
|
134
134
|
var _a = rowProps({ index: i, linhaOriginal: linha, linhaFormatada: line(linha), itensSelecionados: selected }) || {}, title = _a.title, rowProperties = __rest(_a, ["title"]);
|
|
135
135
|
return react_1.default.createElement(dist_1.Draggable, { key: customKey ? lista[i][customKey] : i, render: function (draggableRef) {
|
|
136
|
-
var _a;
|
|
137
|
-
var
|
|
136
|
+
var _a, _b;
|
|
137
|
+
var _c;
|
|
138
138
|
return (
|
|
139
139
|
//TODO criar proprio draggable pois esse remove classes do filho
|
|
140
140
|
react_1.default.createElement(react_1.Fragment, null,
|
|
141
|
-
react_1.default.createElement(exports.CustomTooltip, { title: lineTitle || title },
|
|
141
|
+
react_1.default.createElement(exports.CustomTooltip, { title: (ghostRow) ? '' : (lineTitle || title) },
|
|
142
142
|
react_1.default.createElement(core_1.TableRow, __assign({ component: dist_1.Draggable }, rowProperties, { className: clsx_1.default((_a = {},
|
|
143
143
|
_a[classes.hover] = isItemSelected,
|
|
144
144
|
_a[classes.open] = (isItemOpen && !!children),
|
|
145
145
|
_a[classes.ghost] = ghostRow,
|
|
146
|
-
_a), lineClass(line(linha), linha, i), rowProperties.className), hover: true, role: 'checkbox', tabIndex: -1, selected: isItemSelected, style: lineStyle ? 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, innerRef: draggableRef }),
|
|
146
|
+
_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, innerRef: draggableRef }),
|
|
147
147
|
enableDrag && react_1.default.createElement(core_1.TableCell, { padding: 'checkbox' },
|
|
148
148
|
react_1.default.createElement(core_1.Tooltip, { title: 'Arrastar' },
|
|
149
149
|
react_1.default.createElement(core_1.IconButton, { size: 'small', className: classes.dragHandle },
|
|
150
150
|
react_1.default.createElement(md_1.MdDragHandle, null)))),
|
|
151
|
-
enableCheck && react_1.default.createElement(core_1.TableCell, { padding: 'checkbox' },
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
lodash_1.isArray(line(linha)) && line(linha).map(function (coluna, j) { return ((ghostRow) ? (react_1.default.createElement(core_1.TableCell, __assign({ key: j }, columnProps(j, coluna, linha, line(linha)), { style: columnStyles ? columnStyles[j] : undefined, className: clsx_1.default(classes.tableCell, classes.ghost) }), "\u00A0")) : (react_1.default.createElement(core_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)))); }))),
|
|
151
|
+
(enableCheck) && (react_1.default.createElement(core_1.TableCell, { padding: 'checkbox', className: clsx_1.default((_b = {}, _b[classes.ghost] = ghostRow, _b)) }, (!ghostRow) && (react_1.default.createElement(core_1.Checkbox, { checked: isItemSelected, disabled: (disableCheckIf) && disableCheckIf(linha, line(linha), i), onClick: function (event) {
|
|
152
|
+
event.stopPropagation();
|
|
153
|
+
handleClick(linha[indexToSelect]);
|
|
154
|
+
} })))),
|
|
155
|
+
lodash_1.isArray(line(linha)) && line(linha).map(function (coluna, j) { return ((ghostRow) ? (react_1.default.createElement(core_1.TableCell, { key: j, className: clsx_1.default(classes.tableCell, classes.ghost) }, "\u00A0")) : (react_1.default.createElement(core_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)))); }))),
|
|
157
156
|
children && (react_1.default.createElement(core_1.TableRow, { className: classes.group },
|
|
158
|
-
react_1.default.createElement(core_1.TableCell, { colSpan: (dadosMostrados === null || dadosMostrados === void 0 ? void 0 : dadosMostrados.length) && ((
|
|
157
|
+
react_1.default.createElement(core_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' },
|
|
159
158
|
react_1.default.createElement(core_1.Collapse, { in: open === i, mountOnEnter: true, unmountOnExit: true }, typeof children === 'function' ? children({ linha: line(linha), linhaOriginal: linha, index: i }) : children))))));
|
|
160
159
|
} });
|
|
161
160
|
}) : react_1.default.createElement(core_1.TableRow, null,
|
|
@@ -118,7 +118,7 @@ const ArgousComplexTableBody = memo(({
|
|
|
118
118
|
return <Draggable key={customKey ? lista[i][customKey] : i} render={draggableRef => (
|
|
119
119
|
//TODO criar proprio draggable pois esse remove classes do filho
|
|
120
120
|
<Fragment>
|
|
121
|
-
<CustomTooltip title={lineTitle || title}>
|
|
121
|
+
<CustomTooltip title={(ghostRow) ? '' : (lineTitle || title)}>
|
|
122
122
|
<TableRow
|
|
123
123
|
component={Draggable}
|
|
124
124
|
{...rowProperties}
|
|
@@ -129,7 +129,7 @@ const ArgousComplexTableBody = memo(({
|
|
|
129
129
|
[classes.open]: (isItemOpen && !!children),
|
|
130
130
|
[classes.ghost]: ghostRow
|
|
131
131
|
},
|
|
132
|
-
lineClass(line(linha), linha, i),
|
|
132
|
+
(ghostRow) ? '' : lineClass(line(linha), linha, i),
|
|
133
133
|
rowProperties.className
|
|
134
134
|
)
|
|
135
135
|
}
|
|
@@ -137,7 +137,7 @@ const ArgousComplexTableBody = memo(({
|
|
|
137
137
|
role='checkbox'
|
|
138
138
|
tabIndex={-1}
|
|
139
139
|
selected={isItemSelected}
|
|
140
|
-
style={lineStyle ? lineStyle(linha, line(linha), i) : undefined}
|
|
140
|
+
style={(lineStyle && !ghostRow) ? lineStyle(linha, line(linha), i) : undefined}
|
|
141
141
|
onClick={(ghostRow) ? undefined : (onClick) ? e => onClick(e, linha, line(linha), i) : (children) ? () => handleOpenClose(i) : undefined}
|
|
142
142
|
onDoubleClick={(ghostRow) ? undefined : (onDoubleClick) ? e => onDoubleClick(e, linha, line(linha), i) : undefined}
|
|
143
143
|
innerRef={draggableRef}
|
|
@@ -149,20 +149,23 @@ const ArgousComplexTableBody = memo(({
|
|
|
149
149
|
</IconButton>
|
|
150
150
|
</Tooltip>
|
|
151
151
|
</TableCell>}
|
|
152
|
-
{enableCheck &&
|
|
153
|
-
<
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
152
|
+
{(enableCheck) && (
|
|
153
|
+
<TableCell padding='checkbox' className={clsx({ [classes.ghost]: ghostRow })}>
|
|
154
|
+
{(!ghostRow) && (
|
|
155
|
+
<Checkbox
|
|
156
|
+
checked={isItemSelected}
|
|
157
|
+
disabled={(disableCheckIf) && disableCheckIf(linha, line(linha), i)}
|
|
158
|
+
onClick={(event) => {
|
|
159
|
+
event.stopPropagation();
|
|
160
|
+
handleClick(linha[indexToSelect]);
|
|
161
|
+
}}
|
|
162
|
+
/>
|
|
163
|
+
)}
|
|
164
|
+
</TableCell>
|
|
165
|
+
)}
|
|
158
166
|
{isArray(line(linha)) && line(linha).map((coluna, j) => (
|
|
159
167
|
(ghostRow) ? (
|
|
160
|
-
<TableCell
|
|
161
|
-
key={j}
|
|
162
|
-
{...columnProps(j, coluna, linha, line(linha))}
|
|
163
|
-
style={columnStyles ? columnStyles[j] : undefined}
|
|
164
|
-
className={clsx(classes.tableCell, classes.ghost)}
|
|
165
|
-
>
|
|
168
|
+
<TableCell key={j} className={clsx(classes.tableCell, classes.ghost)}>
|
|
166
169
|
|
|
167
170
|
</TableCell>
|
|
168
171
|
) : (
|