@gustavo-valsechi/client 1.3.57 → 1.3.59
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.
|
@@ -36,8 +36,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
36
36
|
var import_react = require("react");
|
|
37
37
|
var import_styles = require("./styles");
|
|
38
38
|
var import_tools = require("../tools");
|
|
39
|
-
var
|
|
39
|
+
var import_utils = __toESM(require("@gustavo-valsechi/utils"));
|
|
40
40
|
var import_lodash = __toESM(require("lodash"));
|
|
41
|
+
var import_assets = __toESM(require("../assets"));
|
|
41
42
|
function CreditCardComponent(props) {
|
|
42
43
|
var _a;
|
|
43
44
|
const flagRef = (0, import_react.useRef)({});
|
|
@@ -54,13 +55,16 @@ function CreditCardComponent(props) {
|
|
|
54
55
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-credit-card-left", children: [
|
|
55
56
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-credit-card-top", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: "iz-credit-card-chip", style: { backgroundImage: `url(${import_assets.default.Chip})` } }) }),
|
|
56
57
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-credit-card-bottom", children: [
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-credit-card-number", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-credit-card-elipse" }) }),
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-credit-card-number", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-credit-card-elipse", children: import_utils.default.mask.loop(props.number, { sequencyNumber: 4, maxSequency: 4, placeholder: "\u2022" }) }) }),
|
|
58
59
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-credit-card-name", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-credit-card-elipse", children: import_lodash.default.deburr((_a = props.name) == null ? void 0 : _a.replace(/[^A-Za-zÀ-ÿ\s]/g, "").toUpperCase()) || "Nome do Titular" }) })
|
|
59
60
|
] })
|
|
60
61
|
] }),
|
|
61
62
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-credit-card-right", children: [
|
|
62
63
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "iz-credit-card-top", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: "iz-credit-card-flag", ref: flagRef }) }),
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "iz-credit-card-bottom", children: [
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "validade" }),
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: import_utils.default.mask.loop(props.expiry, { sequencyNumber: 2, maxSequency: 2, placeholder: "\u2022", separator: "/" }) })
|
|
67
|
+
] })
|
|
64
68
|
] })
|
|
65
69
|
] });
|
|
66
70
|
}
|
|
@@ -3,8 +3,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
4
|
import { Container } from "./styles";
|
|
5
5
|
import { getCardContent } from "../tools";
|
|
6
|
-
import
|
|
6
|
+
import Utils from "@gustavo-valsechi/utils";
|
|
7
7
|
import _ from "lodash";
|
|
8
|
+
import assets from "../assets";
|
|
8
9
|
function CreditCardComponent(props) {
|
|
9
10
|
var _a;
|
|
10
11
|
const flagRef = useRef({});
|
|
@@ -21,13 +22,16 @@ function CreditCardComponent(props) {
|
|
|
21
22
|
/* @__PURE__ */ jsxs("div", { className: "iz-credit-card-left", children: [
|
|
22
23
|
/* @__PURE__ */ jsx("div", { className: "iz-credit-card-top", children: /* @__PURE__ */ jsx("div", { id: "iz-credit-card-chip", style: { backgroundImage: `url(${assets.Chip})` } }) }),
|
|
23
24
|
/* @__PURE__ */ jsxs("div", { className: "iz-credit-card-bottom", children: [
|
|
24
|
-
/* @__PURE__ */ jsx("div", { className: "iz-credit-card-number", children: /* @__PURE__ */ jsx("div", { className: "iz-credit-card-elipse" }) }),
|
|
25
|
+
/* @__PURE__ */ jsx("div", { className: "iz-credit-card-number", children: /* @__PURE__ */ jsx("div", { className: "iz-credit-card-elipse", children: Utils.mask.loop(props.number, { sequencyNumber: 4, maxSequency: 4, placeholder: "\u2022" }) }) }),
|
|
25
26
|
/* @__PURE__ */ jsx("div", { className: "iz-credit-card-name", children: /* @__PURE__ */ jsx("div", { className: "iz-credit-card-elipse", children: _.deburr((_a = props.name) == null ? void 0 : _a.replace(/[^A-Za-zÀ-ÿ\s]/g, "").toUpperCase()) || "Nome do Titular" }) })
|
|
26
27
|
] })
|
|
27
28
|
] }),
|
|
28
29
|
/* @__PURE__ */ jsxs("div", { className: "iz-credit-card-right", children: [
|
|
29
30
|
/* @__PURE__ */ jsx("div", { className: "iz-credit-card-top", children: /* @__PURE__ */ jsx("div", { id: "iz-credit-card-flag", ref: flagRef }) }),
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ jsxs("div", { className: "iz-credit-card-bottom", children: [
|
|
32
|
+
/* @__PURE__ */ jsx("span", { children: "validade" }),
|
|
33
|
+
/* @__PURE__ */ jsx("span", { children: Utils.mask.loop(props.expiry, { sequencyNumber: 2, maxSequency: 2, placeholder: "\u2022", separator: "/" }) })
|
|
34
|
+
] })
|
|
31
35
|
] })
|
|
32
36
|
] });
|
|
33
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gustavo-valsechi/client",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.59",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@emotion/is-prop-valid": "1.3.0",
|
|
27
|
-
"@gustavo-valsechi/
|
|
27
|
+
"@gustavo-valsechi/utils": "1.0.0",
|
|
28
|
+
"@gustavo-valsechi/server": "1.0.12",
|
|
28
29
|
"@hookform/resolvers": "5.2.2",
|
|
29
30
|
"apexcharts": "3.51.0",
|
|
30
31
|
"lodash": "4.17.21",
|