@credithub/harlan-components 1.3.2 → 1.3.3
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.
|
@@ -78,17 +78,17 @@ var ReclameAquiStats = function (_a) {
|
|
|
78
78
|
react_1.default.createElement(ProblemasResolvidos, { value: percentualProblemasResolvidos + "%" }))));
|
|
79
79
|
};
|
|
80
80
|
exports.ReclameAquiCarousel = (0, react_1.memo)(function (_a) {
|
|
81
|
-
var _b, _c;
|
|
81
|
+
var _b, _c, _d;
|
|
82
82
|
var nome = _a.nome, documento = _a.documento;
|
|
83
|
-
var
|
|
84
|
-
if (isLoading || error)
|
|
83
|
+
var _e = (0, webservice_1.useQuery)("SELECT FROM 'RECLAMEAQUI'.'CONSULTA'", { documento: documento }), response = _e.response, isLoading = _e.isLoading, error = _e.error;
|
|
84
|
+
if (isLoading || error || (response === null || response === void 0 ? void 0 : response.document) && !((_b = response === null || response === void 0 ? void 0 : response.document) === null || _b === void 0 ? void 0 : _b.length))
|
|
85
85
|
return react_1.default.createElement(carrousel_1.default, { name: nome, document: documento });
|
|
86
86
|
return (react_1.default.createElement("div", { className: "reclame-aqui-carousel" },
|
|
87
87
|
react_1.default.createElement("div", { className: "carrossel-content" },
|
|
88
|
-
react_1.default.createElement(carousel_1.default, { pagination: false, isRTL: false, showArrows: (response === null || response === void 0 ? void 0 : response.document) && ((
|
|
88
|
+
react_1.default.createElement(carousel_1.default, { pagination: false, isRTL: false, showArrows: (response === null || response === void 0 ? void 0 : response.document) && ((_c = response === null || response === void 0 ? void 0 : response.document) === null || _c === void 0 ? void 0 : _c.length) > 1, renderArrow: function (_a) {
|
|
89
89
|
var type = _a.type, onClick = _a.onClick;
|
|
90
90
|
return (react_1.default.createElement("i", { className: "fa fa-angle-".concat(type == "PREV" ? "left" : "right", " reclame-aqui-carousel-btn"), onClick: onClick }));
|
|
91
|
-
} }, (
|
|
91
|
+
} }, (_d = response === null || response === void 0 ? void 0 : response.document) === null || _d === void 0 ? void 0 : _d.map(function (item) {
|
|
92
92
|
var infos = item.infos;
|
|
93
93
|
return {
|
|
94
94
|
nome: nome,
|
|
@@ -49,17 +49,17 @@ var ReclameAquiStats = function (_a) {
|
|
|
49
49
|
React.createElement(ProblemasResolvidos, { value: percentualProblemasResolvidos + "%" }))));
|
|
50
50
|
};
|
|
51
51
|
export var ReclameAquiCarousel = memo(function (_a) {
|
|
52
|
-
var _b, _c;
|
|
52
|
+
var _b, _c, _d;
|
|
53
53
|
var nome = _a.nome, documento = _a.documento;
|
|
54
|
-
var
|
|
55
|
-
if (isLoading || error)
|
|
54
|
+
var _e = useQuery("SELECT FROM 'RECLAMEAQUI'.'CONSULTA'", { documento: documento }), response = _e.response, isLoading = _e.isLoading, error = _e.error;
|
|
55
|
+
if (isLoading || error || (response === null || response === void 0 ? void 0 : response.document) && !((_b = response === null || response === void 0 ? void 0 : response.document) === null || _b === void 0 ? void 0 : _b.length))
|
|
56
56
|
return React.createElement(Carrousel, { name: nome, document: documento });
|
|
57
57
|
return (React.createElement("div", { className: "reclame-aqui-carousel" },
|
|
58
58
|
React.createElement("div", { className: "carrossel-content" },
|
|
59
|
-
React.createElement(Carousel, { pagination: false, isRTL: false, showArrows: (response === null || response === void 0 ? void 0 : response.document) && ((
|
|
59
|
+
React.createElement(Carousel, { pagination: false, isRTL: false, showArrows: (response === null || response === void 0 ? void 0 : response.document) && ((_c = response === null || response === void 0 ? void 0 : response.document) === null || _c === void 0 ? void 0 : _c.length) > 1, renderArrow: function (_a) {
|
|
60
60
|
var type = _a.type, onClick = _a.onClick;
|
|
61
61
|
return (React.createElement("i", { className: "fa fa-angle-".concat(type == "PREV" ? "left" : "right", " reclame-aqui-carousel-btn"), onClick: onClick }));
|
|
62
|
-
} }, (
|
|
62
|
+
} }, (_d = response === null || response === void 0 ? void 0 : response.document) === null || _d === void 0 ? void 0 : _d.map(function (item) {
|
|
63
63
|
var infos = item.infos;
|
|
64
64
|
return {
|
|
65
65
|
nome: nome,
|