argous 1.2.240 → 1.2.242

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 _b;
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
- react_1.default.createElement(core_1.Checkbox, { disabled: disableCheckIf && disableCheckIf(linha, line(linha), i), onClick: function (e) {
153
- e.stopPropagation();
154
- handleClick(linha[indexToSelect]);
155
- }, checked: isItemSelected })),
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) && ((_b = line(dadosMostrados[0])) === null || _b === void 0 ? void 0 : _b.length) + (enableCheck ? 1 : 0) + (enableDrag ? 1 : 0), style: { padding: open === i ? 8 : 0 }, className: 'argous-complex-table-group-cell' },
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,
@@ -137,6 +137,22 @@ export declare const documentType: {
137
137
  };
138
138
  lengthWithSymbols: number;
139
139
  };
140
+ rg: {
141
+ length: number;
142
+ symbols: {
143
+ length: number;
144
+ };
145
+ lengthWithSymbols: number;
146
+ };
147
+ cnes: {
148
+ length: number;
149
+ };
150
+ crm: {
151
+ length: number;
152
+ };
153
+ unimedCard: {
154
+ length: number;
155
+ };
140
156
  cep: {
141
157
  length: number;
142
158
  symbols: {
@@ -598,6 +598,22 @@ exports.documentType = {
598
598
  },
599
599
  lengthWithSymbols: 18
600
600
  },
601
+ rg: {
602
+ length: 10,
603
+ symbols: {
604
+ length: 0
605
+ },
606
+ lengthWithSymbols: 10
607
+ },
608
+ cnes: {
609
+ length: 7
610
+ },
611
+ crm: {
612
+ length: 6
613
+ },
614
+ unimedCard: {
615
+ length: 17
616
+ },
601
617
  cep: {
602
618
  length: 8,
603
619
  symbols: {
@@ -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 && <TableCell padding='checkbox'>
153
- <Checkbox disabled={disableCheckIf && disableCheckIf(linha, line(linha), i)} onClick={e => {
154
- e.stopPropagation();
155
- handleClick(linha[indexToSelect]);
156
- }} checked={isItemSelected} />
157
- </TableCell>}
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
  &nbsp;
167
170
  </TableCell>
168
171
  ) : (
@@ -521,6 +521,22 @@ export const documentType = {
521
521
  },
522
522
  lengthWithSymbols: 18
523
523
  },
524
+ rg: {
525
+ length: 10,
526
+ symbols: {
527
+ length: 0
528
+ },
529
+ lengthWithSymbols: 10
530
+ },
531
+ cnes: {
532
+ length: 7
533
+ },
534
+ crm: {
535
+ length: 6
536
+ },
537
+ unimedCard: {
538
+ length: 17
539
+ },
524
540
  cep: {
525
541
  length: 8,
526
542
  symbols: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argous",
3
- "version": "1.2.240",
3
+ "version": "1.2.242",
4
4
  "description": "Argous.",
5
5
  "main": "lib/index.js",
6
6
  "author": "Carlos Schneider",