@credithub/harlan-components 1.53.3 → 1.53.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credithub/harlan-components",
3
- "version": "1.53.3",
3
+ "version": "1.53.4",
4
4
  "description": "Provide a set of web components to be used in Harlan and other projects",
5
5
  "keywords": [
6
6
  "harlan",
@@ -30,16 +30,11 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@credithub/webservice": "^1.1.4",
33
- "@emotion/stylis": "^0.8.5",
34
33
  "@itseasy21/react-elastic-carousel": "^0.12.3",
35
- "@react-google-maps/api": "^2.19.2",
36
34
  "@rollup/plugin-babel": "^6.0.4",
37
35
  "@rollup/plugin-commonjs": "^28.0.0",
38
36
  "@rollup/plugin-node-resolve": "^15.2.3",
39
- "@rollup/rollup-linux-x64-gnu": "^4.24.0",
40
- "@swc/core": "^1.7.6",
41
37
  "@types/express": "^5.0.0",
42
- "axios": "^1.6.2",
43
38
  "chart.js": "^4.4.2",
44
39
  "chartjs-adapter-date-fns": "^3.0.0",
45
40
  "chartjs-adapter-moment": "^1.0.1",
@@ -57,11 +52,9 @@
57
52
  "phosphor-react": "^1.4.1",
58
53
  "plotly.js": "^2.27.1",
59
54
  "react-chartjs-2": "^5.2.0",
60
- "react-is": "^18.2.0",
61
55
  "react-markdown": "^9.0.1",
62
56
  "react-plotly.js": "^2.6.0",
63
57
  "remark-gfm": "^4.0.1",
64
- "rimraf": "^6.0.1",
65
58
  "string-similarity": "^4.0.4",
66
59
  "styled-components": "^5.3.11",
67
60
  "ts-node": "^10.9.2",
@@ -91,23 +84,16 @@
91
84
  "@types/underscore": "^1.11.15",
92
85
  "@typescript-eslint/eslint-plugin": "^8.8.1",
93
86
  "@vitejs/plugin-react": "^4.3.1",
94
- "babel-plugin-module-resolver": "^5.0.0",
95
87
  "eslint-plugin-import": "^2.29.0",
96
- "eslint-plugin-node": "^11.1.0",
97
88
  "eslint-plugin-prettier": "^5.1.3",
98
89
  "fs-extra": "^11.2.0",
99
90
  "git-commit-msg-linter": "^5.0.4",
100
91
  "http-server": "^14.1.1",
101
92
  "husky": "^9.1.6",
102
- "identity-obj-proxy": "^3.0.0",
103
93
  "lint-staged": "^15.0.2",
104
- "ncp": "^2.0.0",
105
94
  "prettier": "^3.2.5",
106
95
  "rollup": "^4.20.0",
107
- "style-loader": "^4.0.0",
108
- "ts-loader": "^9.5.0",
109
96
  "tsc-alias": "^1.8.8",
110
- "tsconfig-paths-jest": "^0.0.1",
111
97
  "typescript": "^5.2.2",
112
98
  "vite": "^5.4.0",
113
99
  "vite-plugin-svgr": "^4.2.0"
@@ -1,6 +0,0 @@
1
- interface GeocodeResponse {
2
- lat: number;
3
- lng: number;
4
- }
5
- export declare function getGeocode(address: string, apiKey: string): Promise<GeocodeResponse | null>;
6
- export {};
@@ -1,69 +0,0 @@
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
- return g.next = verb(0), g["throw"] = verb(1), g["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
- export function getGeocode(address, apiKey) {
38
- return __awaiter(this, void 0, void 0, function () {
39
- var url, response, data, results, location_1, error_1;
40
- return __generator(this, function (_a) {
41
- switch (_a.label) {
42
- case 0:
43
- _a.trys.push([0, 3, , 4]);
44
- url = new URL('https://maps.googleapis.com/maps/api/geocode/json');
45
- url.search = new URLSearchParams({ address: address, key: apiKey }).toString();
46
- return [4 /*yield*/, fetch(url)];
47
- case 1:
48
- response = _a.sent();
49
- if (!response.ok) {
50
- throw new Error("Erro na requisi\u00E7\u00E3o: ".concat(response.status));
51
- }
52
- return [4 /*yield*/, response.json()];
53
- case 2:
54
- data = _a.sent();
55
- results = data.results;
56
- if (results && results.length > 0) {
57
- location_1 = results[0].geometry.location;
58
- return [2 /*return*/, { lat: location_1.lat, lng: location_1.lng }];
59
- }
60
- return [2 /*return*/, null];
61
- case 3:
62
- error_1 = _a.sent();
63
- console.error('Erro ao obter geocódigo:', error_1);
64
- return [2 /*return*/, null];
65
- case 4: return [2 /*return*/];
66
- }
67
- });
68
- });
69
- }
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- interface MapContainerProps {
3
- address: string;
4
- apiKey: string;
5
- }
6
- interface MapContainerProps {
7
- log?: number;
8
- lat?: number;
9
- }
10
- declare const MapContainer: React.FC<MapContainerProps>;
11
- export default MapContainer;
@@ -1,25 +0,0 @@
1
- import { GoogleMap, LoadScript, Marker } from '@react-google-maps/api';
2
- import React, { useEffect, useState } from 'react';
3
- import { getGeocode } from './getGeocode';
4
- var MapContainer = function (_a) {
5
- var address = _a.address, apiKey = _a.apiKey;
6
- var _b = useState({ lat: 0, lng: 0 }), coordinates = _b[0], setCoordinates = _b[1];
7
- useEffect(function () {
8
- getGeocode(address, apiKey).then(function (coords) {
9
- if (coords) {
10
- setCoordinates(coords);
11
- }
12
- });
13
- }, [address, apiKey]);
14
- var mapStyles = {
15
- height: '100px',
16
- width: '100px'
17
- };
18
- if (!coordinates) {
19
- return React.createElement("div", null, "Carregando mapa...");
20
- }
21
- return (React.createElement(LoadScript, { googleMapsApiKey: apiKey },
22
- React.createElement(GoogleMap, { mapContainerStyle: mapStyles, zoom: 13, center: coordinates },
23
- React.createElement(Marker, { position: coordinates }))));
24
- };
25
- export default MapContainer;