@credithub/harlan-components 1.26.0 → 1.27.1

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,20 +1,3 @@
1
- /// <reference types="@/@types/domain/addressesTypes" />
2
- /// <reference types="@/@types/domain/bankAccountTypes" />
3
- /// <reference types="@/@types/domain/ccfTypes" />
4
- /// <reference types="@/@types/domain/contactTypes" />
5
- /// <reference types="@/@types/domain/dividasTypes" />
6
- /// <reference types="@/@types/domain/dossieTypes" />
7
- /// <reference types="@/@types/domain/imoveisTypes" />
8
- /// <reference types="@/@types/domain/liminarTypes" />
9
- /// <reference types="@/@types/domain/partnersTypes" />
10
- /// <reference types="@/@types/domain/pepTypes" />
11
- /// <reference types="@/@types/domain/processosJuridicosTypes" />
12
- /// <reference types="@/@types/domain/protestosTypes" />
13
- /// <reference types="@/@types/domain/refinBoaVistaTypes" />
14
- /// <reference types="@/@types/domain/refinSerasaTypes" />
15
- /// <reference types="@/@types/domain/scoreTypes" />
16
- /// <reference types="@/@types/domain/scrTypes" />
17
- /// <reference types="@/@types/domain/veiculosTypes" />
18
1
  export type { Address, AddressesState } from '@/@types/domain/addressesTypes';
19
2
  export type { BankAccount, BankAccountsState } from '@/@types/domain/bankAccountTypes';
20
3
  export type { CCFData, CCFState } from '@/@types/domain/ccfTypes';
@@ -1,6 +1,6 @@
1
1
  import { ChartData, ChartOptions } from 'chart.js';
2
2
  import { DataInput } from '../types/iChart';
3
- export declare const useCategoryProtestos: (dataInput: DataInput['protestosCategory']) => {
4
- data: ChartData<'bar', number[], string>;
5
- options: ChartOptions<'bar'>;
3
+ export declare const useCategoryProtestos: (dataInput: DataInput["protestosCategory"]) => {
4
+ data: ChartData<"bar", number[], string>;
5
+ options: ChartOptions<"bar">;
6
6
  };
@@ -2,9 +2,9 @@ import { ChartData, ChartOptions } from 'chart.js';
2
2
  import { DataInput, TimeFilter } from '../types/iChart';
3
3
  import 'chartjs-adapter-date-fns';
4
4
  export declare const useMixedChartData: (dataInput: DataInput, timeFilter?: TimeFilter) => {
5
- data: ChartData<'line' | 'bar', (number | {
5
+ data: ChartData<"line" | "bar", (number | {
6
6
  x: string;
7
7
  y: number | null;
8
8
  })[], string>;
9
- options: ChartOptions<'line' | 'bar'>;
9
+ options: ChartOptions<"line" | "bar">;
10
10
  };
@@ -1,6 +1,6 @@
1
1
  import { ChartData, ChartOptions } from 'chart.js';
2
2
  import { DataInput } from '../types/iChart';
3
3
  export declare const usePieChartData: (dataInput: DataInput) => {
4
- data: ChartData<'pie', number[], string>;
5
- options: ChartOptions<'pie'>;
4
+ data: ChartData<"pie", number[], string>;
5
+ options: ChartOptions<"pie">;
6
6
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  declare const useCardsAndProducts: ({ finderResponse, rfbResponse }: {
3
- finderResponse?: Document | undefined;
4
- rfbResponse?: Document | undefined;
3
+ finderResponse?: Document;
4
+ rfbResponse?: Document;
5
5
  }) => {
6
6
  cards: ({
7
7
  title: string | false;
@@ -1,5 +1,5 @@
1
- export declare const getField: (path: string, response?: Document, formatter?: ((value: string | number) => string) | undefined) => string;
2
- export declare const getFieldRfb: (path: string, response?: Document | null, formatter?: ((value: string | number) => string) | undefined) => string;
1
+ export declare const getField: (path: string, response?: Document, formatter?: (value: string | number) => string) => string;
2
+ export declare const getFieldRfb: (path: string, response?: Document | null, formatter?: (value: string | number) => string) => string;
3
3
  export declare const getAtividadesEconomicasSecundarias: (response?: Document | null) => string[];
4
4
  export declare const getProductsPrices: (isPF: boolean) => {
5
5
  refinBoaVista: number;
@@ -1,9 +1,9 @@
1
1
  import { CSSProperties } from 'styled-components';
2
2
  declare const ResponsiveGrid: import("styled-components").StyledComponent<"div", any, {
3
- mobile?: CSSProperties['gridTemplateColumns'];
4
- tablet?: CSSProperties['gridTemplateColumns'];
5
- desktop?: CSSProperties['gridTemplateColumns'];
6
- print?: CSSProperties['gridTemplateColumns'];
7
- fullWidth?: boolean | undefined;
3
+ mobile?: CSSProperties["gridTemplateColumns"];
4
+ tablet?: CSSProperties["gridTemplateColumns"];
5
+ desktop?: CSSProperties["gridTemplateColumns"];
6
+ print?: CSSProperties["gridTemplateColumns"];
7
+ fullWidth?: boolean;
8
8
  }, never>;
9
9
  export default ResponsiveGrid;
@@ -1,10 +1,10 @@
1
1
  export declare const ResultContent: import("styled-components").StyledComponent<"div", any, {
2
- mobile?: import("csstype").Property.GridTemplateColumns<string | number> | undefined;
3
- tablet?: import("csstype").Property.GridTemplateColumns<string | number> | undefined;
4
- desktop?: import("csstype").Property.GridTemplateColumns<string | number> | undefined;
5
- print?: import("csstype").Property.GridTemplateColumns<string | number> | undefined;
6
- fullWidth?: boolean | undefined;
2
+ mobile?: import("styled-components").CSSProperties["gridTemplateColumns"];
3
+ tablet?: import("styled-components").CSSProperties["gridTemplateColumns"];
4
+ desktop?: import("styled-components").CSSProperties["gridTemplateColumns"];
5
+ print?: import("styled-components").CSSProperties["gridTemplateColumns"];
6
+ fullWidth?: boolean;
7
7
  }, never>;
8
8
  export declare const Result: import("styled-components").StyledComponent<"div", any, {
9
- resultContentStriped?: boolean | undefined;
9
+ resultContentStriped?: boolean;
10
10
  }, never>;
@@ -3,7 +3,7 @@ export declare const ProtestoItem: React.MemoExoticComponent<({ protesto }: {
3
3
  protesto: Node;
4
4
  }) => React.JSX.Element>;
5
5
  export declare const Instrumento: ({ nm_chave }: {
6
- nm_chave?: string | undefined;
6
+ nm_chave?: string;
7
7
  }) => React.JSX.Element | null;
8
8
  export declare const ProtestosList: React.FC<{
9
9
  protestos: Node[];
@@ -8,14 +8,14 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
8
8
  return to.concat(ar || Array.prototype.slice.call(from));
9
9
  };
10
10
  import { sum } from '../../utils/number';
11
- import { groupBy } from 'underscore';
11
+ import * as _ from 'underscore';
12
12
  function getResumoDeModalidades(scr) {
13
13
  var _a, _b, _c;
14
14
  if (!((_a = scr === null || scr === void 0 ? void 0 : scr.analise) === null || _a === void 0 ? void 0 : _a.detalhamento)) {
15
15
  return [];
16
16
  }
17
17
  var agruparPorTitulo = function (detalhamento) {
18
- return groupBy(detalhamento, function (_a) {
18
+ return _.groupBy(detalhamento, function (_a) {
19
19
  var modalidade = _a.modalidade;
20
20
  return (modalidade === null || modalidade === void 0 ? void 0 : modalidade.titulo) || 'Indefinido';
21
21
  });
@@ -25,7 +25,7 @@ function getResumoDeModalidades(scr) {
25
25
  var key = _a[0], values = _a[1];
26
26
  return [
27
27
  key,
28
- Object.entries(groupBy(values, function (_a) {
28
+ Object.entries(_.groupBy(values, function (_a) {
29
29
  var modalidade = _a.modalidade;
30
30
  return modalidade === null || modalidade === void 0 ? void 0 : modalidade.subtitulo;
31
31
  })).map(function (_a) {
@@ -60,7 +60,7 @@ export declare function useMutation<R = unknown, T extends Client.Form = Client.
60
60
  export declare function query<T extends Client.Form = Client.Form, R = unknown>(query: string): React.Context<RequestContext<R>> & {
61
61
  Request: React.FC<React.PropsWithChildren<{
62
62
  data?: T | undefined;
63
- urlData?: Client.Form | undefined;
63
+ urlData?: Client.Form;
64
64
  }>>;
65
65
  };
66
66
  export declare const Queries: {
@@ -69,7 +69,7 @@ export declare const Queries: {
69
69
  data?: {
70
70
  documento: string;
71
71
  } | undefined;
72
- urlData?: Client.Form | undefined;
72
+ urlData?: Client.Form;
73
73
  }>>;
74
74
  };
75
75
  Protestos: React.Context<RequestContext<Document>> & {
@@ -77,7 +77,7 @@ export declare const Queries: {
77
77
  data?: {
78
78
  documento: string;
79
79
  } | undefined;
80
- urlData?: Client.Form | undefined;
80
+ urlData?: Client.Form;
81
81
  }>>;
82
82
  };
83
83
  CCF: React.Context<RequestContext<Document>> & {
@@ -85,18 +85,18 @@ export declare const Queries: {
85
85
  data?: {
86
86
  documento: string;
87
87
  } | undefined;
88
- urlData?: Client.Form | undefined;
88
+ urlData?: Client.Form;
89
89
  }>>;
90
90
  };
91
91
  ProcessosJuridicos: React.Context<RequestContext<ProcessosJuridicosState>> & {
92
92
  Request: React.FC<React.PropsWithChildren<{
93
93
  data?: {
94
94
  documento: string;
95
- nome?: string | undefined;
96
- estado?: string | undefined;
97
- pf?: string | undefined;
95
+ nome?: string;
96
+ estado?: string;
97
+ pf?: string;
98
98
  } | undefined;
99
- urlData?: Client.Form | undefined;
99
+ urlData?: Client.Form;
100
100
  }>>;
101
101
  };
102
102
  Liminar: React.Context<RequestContext<LiminarResponse>> & {
@@ -104,7 +104,7 @@ export declare const Queries: {
104
104
  data?: {
105
105
  documento: string;
106
106
  } | undefined;
107
- urlData?: Client.Form | undefined;
107
+ urlData?: Client.Form;
108
108
  }>>;
109
109
  };
110
110
  ReclameAqui: React.Context<RequestContext<Document>> & {
@@ -112,7 +112,7 @@ export declare const Queries: {
112
112
  data?: {
113
113
  documento: string;
114
114
  } | undefined;
115
- urlData?: Client.Form | undefined;
115
+ urlData?: Client.Form;
116
116
  }>>;
117
117
  };
118
118
  Dominios: React.Context<RequestContext<[string]>> & {
@@ -121,7 +121,7 @@ export declare const Queries: {
121
121
  documento: string;
122
122
  cnpj: string;
123
123
  } | undefined;
124
- urlData?: Client.Form | undefined;
124
+ urlData?: Client.Form;
125
125
  }>>;
126
126
  };
127
127
  GraficosAnaliticos: React.Context<RequestContext<string>> & {
@@ -129,7 +129,7 @@ export declare const Queries: {
129
129
  data?: {
130
130
  documento: string;
131
131
  } | undefined;
132
- urlData?: Client.Form | undefined;
132
+ urlData?: Client.Form;
133
133
  }>>;
134
134
  };
135
135
  };
@@ -1,5 +1,3 @@
1
- /// <reference types="react" />
2
- /// <reference types="@/@types/globalState" />
3
1
  import { GlobalState } from '@/types/globalState.d';
4
2
  declare const GlobalDataProvider: import("react").FunctionComponent<{
5
3
  children: import("react").ReactNode;
package/dist/index.d.ts CHANGED
@@ -1,23 +1,23 @@
1
- export { default as Section } from './components/interface/section';
2
- export { default as Header } from './components/interface/header';
3
- export { default as Loading } from './components/interface/loading';
1
+ export { default as Addresses } from './components/adresses/addresses';
2
+ export { default as BankAccounts } from './components/bank-accounts/bank-accounts';
3
+ export { default as CCF } from './components/ccf/ccf';
4
+ export { default as ChartSystem } from './components/chart/chartSystem';
4
5
  export { default as AddItemField } from './components/common/addItem';
5
6
  export { default as Contacts } from './components/contacts/contacts';
6
- export { default as Partners } from './components/partners/partners';
7
- export { default as Protestos } from './components/protestos/protestos';
8
- export { default as CCF } from './components/ccf/ccf';
7
+ export { default as DividasPublicas } from './components/dividasPublicas/dividasPublicas';
9
8
  export { default as Dossie } from './components/dossie/dossie';
10
- export { default as ProcessosJuridicos } from './components/processos-juridicos/processosJuridicos';
11
- export { default as Addresses } from './components/adresses/addresses';
12
- export { default as ChartSystem } from './components/chart/chartSystem';
13
- export { default as BankAccounts } from './components/bank-accounts/bank-accounts';
14
- export { default as ResultWithoutInformation } from './components/interface/resultWithoutInformation';
15
- export * from './components/webservice';
9
+ export { default as Header } from './components/interface/header';
10
+ export { default as Loading } from './components/interface/loading';
16
11
  export * from './components/interface/result';
17
- export { default as ConsultaSimples } from './consultaSimples';
18
- export { default as DividasPublicas } from './components/dividasPublicas/dividasPublicas';
12
+ export { default as ResultWithoutInformation } from './components/interface/resultWithoutInformation';
13
+ export { default as Section } from './components/interface/section';
14
+ export { default as Partners } from './components/partners/partners';
19
15
  export { default as PessoaPoliticamenteExposta } from './components/pep/pep';
20
- export { default as RefinSerasa } from './components/refinSerasa/refinSerasa';
16
+ export { default as ProcessosJuridicos } from './components/processos-juridicos/processosJuridicos';
17
+ export { default as Protestos } from './components/protestos/protestos';
21
18
  export { default as RefinBoaVista } from './components/refinBoaVista/refinBoaVista';
19
+ export { default as RefinSerasa } from './components/refinSerasa/refinSerasa';
22
20
  export { default as SCR } from './components/scr/scr';
23
21
  export { default as Veiculos } from './components/veiculos/veiculos';
22
+ export * from './components/webservice';
23
+ export { default as ConsultaSimples } from './consultaSimples';
package/dist/index.js CHANGED
@@ -1,26 +1,23 @@
1
- export { default as Section } from './components/interface/section';
2
- export { default as Header } from './components/interface/header';
3
- export { default as Loading } from './components/interface/loading';
1
+ export { default as Addresses } from './components/adresses/addresses';
2
+ export { default as BankAccounts } from './components/bank-accounts/bank-accounts';
3
+ export { default as CCF } from './components/ccf/ccf';
4
+ export { default as ChartSystem } from './components/chart/chartSystem';
4
5
  export { default as AddItemField } from './components/common/addItem';
5
6
  export { default as Contacts } from './components/contacts/contacts';
6
- export { default as Partners } from './components/partners/partners';
7
- export { default as Protestos } from './components/protestos/protestos';
8
- export { default as CCF } from './components/ccf/ccf';
7
+ export { default as DividasPublicas } from './components/dividasPublicas/dividasPublicas';
9
8
  export { default as Dossie } from './components/dossie/dossie';
10
- export { default as ProcessosJuridicos } from './components/processos-juridicos/processosJuridicos';
11
- export { default as Addresses } from './components/adresses/addresses';
12
- export {
13
- // default as Chart,
14
- // ResumoDeNegativacoesChartSection as CustomChartSection,
15
- default as ChartSystem } from './components/chart/chartSystem';
16
- export { default as BankAccounts } from './components/bank-accounts/bank-accounts';
17
- export { default as ResultWithoutInformation } from './components/interface/resultWithoutInformation';
18
- export * from './components/webservice';
9
+ export { default as Header } from './components/interface/header';
10
+ export { default as Loading } from './components/interface/loading';
19
11
  export * from './components/interface/result';
20
- export { default as ConsultaSimples } from './consultaSimples';
21
- export { default as DividasPublicas } from './components/dividasPublicas/dividasPublicas';
12
+ export { default as ResultWithoutInformation } from './components/interface/resultWithoutInformation';
13
+ export { default as Section } from './components/interface/section';
14
+ export { default as Partners } from './components/partners/partners';
22
15
  export { default as PessoaPoliticamenteExposta } from './components/pep/pep';
23
- export { default as RefinSerasa } from './components/refinSerasa/refinSerasa';
16
+ export { default as ProcessosJuridicos } from './components/processos-juridicos/processosJuridicos';
17
+ export { default as Protestos } from './components/protestos/protestos';
24
18
  export { default as RefinBoaVista } from './components/refinBoaVista/refinBoaVista';
19
+ export { default as RefinSerasa } from './components/refinSerasa/refinSerasa';
25
20
  export { default as SCR } from './components/scr/scr';
26
21
  export { default as Veiculos } from './components/veiculos/veiculos';
22
+ export * from './components/webservice';
23
+ export { default as ConsultaSimples } from './consultaSimples';
@@ -0,0 +1 @@
1
+ export {};
package/dist/server.js ADDED
@@ -0,0 +1,65 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import express from 'express';
38
+ import { createServer as createViteServer } from 'vite';
39
+ function startServer() {
40
+ return __awaiter(this, void 0, void 0, function () {
41
+ var app, vite, port;
42
+ return __generator(this, function (_a) {
43
+ switch (_a.label) {
44
+ case 0:
45
+ app = express();
46
+ return [4 /*yield*/, createViteServer({
47
+ server: { middlewareMode: true }
48
+ })];
49
+ case 1:
50
+ vite = _a.sent();
51
+ app.use(vite.middlewares);
52
+ app.get('/api', function (req, res) {
53
+ var _a = req.query, apiKey = _a.apiKey, documento = _a.documento;
54
+ res.redirect("/?apiKey=".concat(apiKey, "&documento=").concat(documento));
55
+ });
56
+ port = process.env.PORT || 8080;
57
+ app.listen(port, function () {
58
+ console.log("Server listening on http://localhost:".concat(port));
59
+ });
60
+ return [2 /*return*/];
61
+ }
62
+ });
63
+ });
64
+ }
65
+ startServer();