@credithub/harlan-components 1.28.0 → 1.28.2

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.
@@ -8,6 +8,7 @@ import XPathUtils from '../../../utils/xpath';
8
8
  import styled from 'styled-components';
9
9
  import IconePessoa from '../../../assets/icones/iconePessoa';
10
10
  import theme from '../../../components/interface/theme';
11
+ import { format } from 'date-fns';
11
12
  var StyledContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: 1fr 2fr;\n margin-bottom: 20px;\n border-top: 1.6px solid ", ";\n padding: 16px;\n @media screen and (max-width: 992px) {\n grid-template-columns: 1fr;\n }\n"], ["\n display: grid;\n grid-template-columns: 1fr 2fr;\n margin-bottom: 20px;\n border-top: 1.6px solid ", ";\n padding: 16px;\n @media screen and (max-width: 992px) {\n grid-template-columns: 1fr;\n }\n"])), theme.colors.cinzaClaro);
12
13
  var Header = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n grid-row: 1 / 6;\n padding: 16px;\n margin: 16px;\n row-gap: 20px;\n @media (max-width: 992px) {\n padding: 0 0 16px 0;\n justify-content: flex-start;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n grid-row: 1 / 6;\n padding: 16px;\n margin: 16px;\n row-gap: 20px;\n @media (max-width: 992px) {\n padding: 0 0 16px 0;\n justify-content: flex-start;\n }\n"])));
13
14
  var Title = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 18px;\n font-weight: bold;\n text-align: center;\n"], ["\n font-size: 18px;\n font-weight: bold;\n text-align: center;\n"])));
@@ -20,14 +21,11 @@ export var TransactionsTable = function (_a) {
20
21
  React.createElement(Header, null,
21
22
  React.createElement(Title, null, "Quem Consultou esse Documento?"),
22
23
  React.createElement(IconePessoa, { size: 60 })),
23
- events.map(function (event, index) {
24
- var _a;
25
- return (React.createElement(TransactionContent, { key: index },
26
- React.createElement(UserField, null,
27
- React.createElement(AddItemField, { name: "Usu\u00E1rio", value: XPathUtils.select('string(./usuario)', event), style: { display: 'inline-block', padding: '2px 0px' } })),
28
- React.createElement(DateField, null,
29
- React.createElement(AddItemField, { name: "Data", value: (_a = new Date(XPathUtils.select('string(./ultimaConsulta)', event))) === null || _a === void 0 ? void 0 : _a.toLocaleDateString(), style: { display: 'inline-block' } }))));
30
- })));
24
+ events.map(function (event, index) { return (React.createElement(TransactionContent, { key: index },
25
+ React.createElement(UserField, null,
26
+ React.createElement(AddItemField, { name: "Usu\u00E1rio", value: XPathUtils.select('string(./usuario)', event), style: { display: 'inline-block', padding: '2px 0px' } })),
27
+ React.createElement(DateField, null,
28
+ React.createElement(AddItemField, { name: "Data", value: format(new Date(XPathUtils.select('string(./ultimaConsulta)', event)), 'dd/MM/yyyy'), style: { display: 'inline-block' } })))); })));
31
29
  };
32
30
  export default TransactionsTable;
33
31
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -195,7 +195,7 @@ var Section = function (_a) {
195
195
  React.createElement(StatusMessage, { type: "warning" }, err.message))),
196
196
  actions: (React.createElement(React.Fragment, null,
197
197
  React.createElement(Button, { onClick: function () { return ctx.refetch(); } }, "Tentar Novamente")))
198
- }); } : _b, _c = _a.onLoading, onLoading = _c === void 0 ? function () { return React.createElement(React.Fragment, null); } : _c, ctx = _a.ctx, className = _a.className, _d = _a.hideHeader, hideHeader = _d === void 0 ? false : _d, _e = _a.minimized, minimized = _e === void 0 ? true : _e, headerProps = __rest(_a, ["onSuccess", "isError", "onLoading", "ctx", "className", "hideHeader", "minimized"]);
198
+ }); } : _b, _c = _a.onLoading, onLoading = _c === void 0 ? function () { return React.createElement(React.Fragment, null); } : _c, ctx = _a.ctx, className = _a.className, _d = _a.hideHeader, hideHeader = _d === void 0 ? false : _d, _e = _a.minimized, minimized = _e === void 0 ? false : _e, headerProps = __rest(_a, ["onSuccess", "isError", "onLoading", "ctx", "className", "hideHeader", "minimized"]);
199
199
  var _f = useToggle(!minimized), isOpen = _f[0], toggleOpen = _f[1];
200
200
  if (!ctx)
201
201
  return null;