@ssplib/react-components 0.0.221 → 0.0.222

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.
@@ -1,7 +1,8 @@
1
1
  import React, { ReactElement } from 'react';
2
2
  import { FieldValues } from 'react-hook-form';
3
- export declare function Stepper({ debugLog, test, testConfig, ...props }: {
4
- children: ReactElement | ReactElement[];
3
+ export declare function Stepper({ debugLog, test, testConfig, customMarginBottom, ...props }: {
4
+ customMarginBottom?: number;
5
+ children: ReactElement | (ReactElement | null | undefined | false)[];
5
6
  debugData?: (data: FieldValues) => void;
6
7
  debugLog?: boolean;
7
8
  test?: boolean;
@@ -69,7 +69,8 @@ function sleep(ms) {
69
69
  return new Promise((resolve) => setTimeout(resolve, ms));
70
70
  }
71
71
  function Stepper(_a) {
72
- var { debugLog = false, test = false, testConfig = {} } = _a, props = __rest(_a, ["debugLog", "test", "testConfig"]);
72
+ var { debugLog = false, test = false, testConfig = {}, customMarginBottom = 10 } = _a, props = __rest(_a, ["debugLog", "test", "testConfig", "customMarginBottom"]);
73
+ props.children = Array.isArray(props.children) ? props.children.filter((x, id) => x) : props.children;
73
74
  const length = Array.isArray(props.children) ? props.children.length : 1;
74
75
  const context = (0, react_1.useContext)(form_1.FormContext);
75
76
  // next button ref
@@ -122,7 +123,7 @@ function Stepper(_a) {
122
123
  return (react_1.default.createElement(material_1.Box, null,
123
124
  test && (react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'end' },
124
125
  react_1.default.createElement(material_1.Button, { variant: 'contained', color: 'error', onClick: preencher }, "EXCLUIR BANCO PRODU\u00C7\u00C3O"))),
125
- react_1.default.createElement(material_1.Stack, { sx: { padding: 2, marginBottom: 10 } },
126
+ react_1.default.createElement(material_1.Stack, { sx: { padding: 2, marginBottom: customMarginBottom } },
126
127
  react_1.default.createElement(material_1.Box, null, stepperBlocks.map((b, index) => (react_1.default.createElement(material_1.Box, { key: 'formsB' + index, hidden: !(activeStep === index) }, stepperBlocks[index])))),
127
128
  react_1.default.createElement(material_1.MobileStepper, { variant: 'text', steps: maxSteps,
128
129
  // position='bottom'
@@ -100,8 +100,8 @@ function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg = {
100
100
  status: j.statusCode,
101
101
  });
102
102
  else {
103
- const value = (0, lodash_get_1.default)(j, dataPath);
104
- if (!value || !Array.isArray(value)) {
103
+ console.log('data:', (0, lodash_get_1.default)(j, 'body'));
104
+ if (!j || !Array.isArray(j)) {
105
105
  setData({ body: { data: [] } });
106
106
  startData = [];
107
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.221",
3
+ "version": "0.0.222",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",