jornada-ui 0.4.25 → 0.4.27
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/lib/commonjs/components/notification-details-card/index.js +40 -12
- package/lib/commonjs/components/notification-details-card/index.js.map +1 -1
- package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js +18 -4
- package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js.map +1 -1
- package/lib/module/components/notification-details-card/index.js +40 -12
- package/lib/module/components/notification-details-card/index.js.map +1 -1
- package/lib/module/stories/notification-details-card/notification-details-card.stories.js +17 -3
- package/lib/module/stories/notification-details-card/notification-details-card.stories.js.map +1 -1
- package/lib/typescript/commonjs/src/components/notification-details-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/notification-details-card/interface.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/notification-details-card/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/notification-details-card/notification-details-card.stories.d.ts +1 -0
- package/lib/typescript/commonjs/src/stories/notification-details-card/notification-details-card.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/components/notification-details-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/notification-details-card/interface.d.ts +2 -0
- package/lib/typescript/module/src/components/notification-details-card/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/notification-details-card/notification-details-card.stories.d.ts +1 -0
- package/lib/typescript/module/src/stories/notification-details-card/notification-details-card.stories.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/notification-details-card/index.tsx +222 -180
- package/src/components/notification-details-card/interface.ts +3 -0
- package/src/stories/notification-details-card/notification-details-card.stories.tsx +14 -0
|
@@ -13,16 +13,17 @@ var _asBaseComponent = require("../../@types/as-base-component.js");
|
|
|
13
13
|
var _theme = require("../../styles/theme/theme.js");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } /**
|
|
17
|
-
* IMPORTS
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } /**
|
|
17
|
+
* IMPORTS
|
|
18
18
|
*/ // commons / icons
|
|
19
19
|
// components
|
|
20
20
|
// typings
|
|
21
21
|
// styles / theme
|
|
22
|
-
/**
|
|
23
|
-
* Componente NotificationDetailCard
|
|
22
|
+
/**
|
|
23
|
+
* Componente NotificationDetailCard
|
|
24
24
|
*/
|
|
25
25
|
const NotificationDetailCard = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
26
|
+
isInternetReachable = true,
|
|
26
27
|
title,
|
|
27
28
|
description,
|
|
28
29
|
fileUrl,
|
|
@@ -88,19 +89,25 @@ const NotificationDetailCard = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
88
89
|
testID: "button",
|
|
89
90
|
onPress: openFile,
|
|
90
91
|
activeOpacity: 0.8,
|
|
92
|
+
disabled: !isInternetReachable // quando for falso joga true se nao false
|
|
93
|
+
,
|
|
91
94
|
style: {
|
|
92
95
|
borderRadius: _theme.theme.borderWidths.thick_medium,
|
|
93
96
|
overflow: "hidden",
|
|
94
97
|
borderWidth: 1,
|
|
95
|
-
borderColor: _theme.theme.colors.gray[300]
|
|
98
|
+
borderColor: isInternetReachable ? _theme.theme.colors.gray[300] : _theme.theme.colors.red[900]
|
|
96
99
|
},
|
|
97
100
|
children: fileType === "image" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.default, {
|
|
101
|
+
flexStyle: {
|
|
102
|
+
alignItems: "center",
|
|
103
|
+
justifyContent: "center"
|
|
104
|
+
},
|
|
98
105
|
borderStyled: {
|
|
99
106
|
borderWidth: 2,
|
|
100
|
-
borderColor: _theme.theme.colors.blue[525],
|
|
107
|
+
borderColor: isInternetReachable ? _theme.theme.colors.blue[525] : _theme.theme.colors.red[900],
|
|
101
108
|
borderRadius: _theme.theme.borderWidths.thick_medium
|
|
102
109
|
},
|
|
103
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
110
|
+
children: isInternetReachable ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
104
111
|
source: {
|
|
105
112
|
uri: fileUrl
|
|
106
113
|
},
|
|
@@ -109,9 +116,26 @@ const NotificationDetailCard = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
109
116
|
height: 180,
|
|
110
117
|
borderRadius: _theme.theme.borderWidths.thick_medium,
|
|
111
118
|
borderWidth: 2,
|
|
112
|
-
borderColor: _theme.theme.colors.blue[525]
|
|
119
|
+
borderColor: isInternetReachable ? _theme.theme.colors.blue[525] : _theme.theme.colors.red[900]
|
|
113
120
|
},
|
|
114
121
|
resizeMode: "cover"
|
|
122
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index2.default, {
|
|
123
|
+
flexStyle: {
|
|
124
|
+
alignItems: "center",
|
|
125
|
+
justifyContent: "center"
|
|
126
|
+
},
|
|
127
|
+
height: 180,
|
|
128
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Icons, {
|
|
129
|
+
icon: "WIFI_X",
|
|
130
|
+
size: 20,
|
|
131
|
+
color: _theme.theme.colors.red[900]
|
|
132
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.default, {
|
|
133
|
+
text: "Imagem indisponível",
|
|
134
|
+
size: _theme.theme.fontSizes.sm,
|
|
135
|
+
lineHeight: _theme.theme.lineHeight.md,
|
|
136
|
+
color: _theme.theme.colors.gray[700],
|
|
137
|
+
marginBottom: fileUrl ? 12 : 0
|
|
138
|
+
})]
|
|
115
139
|
})
|
|
116
140
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index2.default, {
|
|
117
141
|
flexStyle: {
|
|
@@ -123,14 +147,18 @@ const NotificationDetailCard = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
123
147
|
padding: _theme.theme.paddings.sm
|
|
124
148
|
},
|
|
125
149
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.default, {
|
|
126
|
-
text: `Abrir arquivo (${fileType.toUpperCase()})
|
|
150
|
+
text: isInternetReachable ? `Abrir arquivo (${fileType.toUpperCase()})` : "Arquivo indisponível",
|
|
127
151
|
fontFamily: _theme.theme.fonts.inter_medium_500,
|
|
128
152
|
color: _theme.theme.colors.blue[500],
|
|
129
153
|
size: _theme.theme.fontSizes.md
|
|
130
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Icons, {
|
|
154
|
+
}), isInternetReachable ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Icons, {
|
|
131
155
|
icon: "FILES",
|
|
132
156
|
size: 20,
|
|
133
157
|
color: _theme.theme.colors.blue[500]
|
|
158
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Icons, {
|
|
159
|
+
icon: "WIFI_X",
|
|
160
|
+
size: 20,
|
|
161
|
+
color: _theme.theme.colors.red[900]
|
|
134
162
|
})]
|
|
135
163
|
})
|
|
136
164
|
})]
|
|
@@ -174,8 +202,8 @@ const NotificationDetailCard = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
174
202
|
});
|
|
175
203
|
NotificationDetailCard.displayName = "NotificationDetailCard";
|
|
176
204
|
|
|
177
|
-
/**
|
|
178
|
-
* EXPORTS
|
|
205
|
+
/**
|
|
206
|
+
* EXPORTS
|
|
179
207
|
*/
|
|
180
208
|
var _default = exports.default = (0, _asBaseComponent.asBaseComponent)(NotificationDetailCard);
|
|
181
209
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_interopRequireDefault","_index3","_asBaseComponent","_theme","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","NotificationDetailCard","forwardRef","title","description","fileUrl","fileType","testID","ref","visible","setVisible","useState","openFile","Promise","resolve","then","Linking","openURL","catch","err","console","warn","borderColor","theme","colors","blue","jsxs","flexStyle","flexDirection","borderStyled","borderWidth","neutral","borderRadius","borderWidths","thick_medium","marginStyle","marginBottom","backgroundColor","children","jsx","width","borderTopLeftRadius","borderBottomLeftRadius","flex","paddingStyle","padding","paddings","md","text","fontFamily","fonts","inter_bold","fontWeight","size","fontSizes","color","black","sm","lineHeight","gray","TouchableOpacity","onPress","activeOpacity","style","overflow","Image","source","uri","height","resizeMode","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_interopRequireDefault","_index3","_asBaseComponent","_theme","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","NotificationDetailCard","forwardRef","isInternetReachable","title","description","fileUrl","fileType","testID","ref","visible","setVisible","useState","openFile","Promise","resolve","then","Linking","openURL","catch","err","console","warn","borderColor","theme","colors","blue","jsxs","flexStyle","flexDirection","borderStyled","borderWidth","neutral","borderRadius","borderWidths","thick_medium","marginStyle","marginBottom","backgroundColor","children","jsx","width","borderTopLeftRadius","borderBottomLeftRadius","flex","paddingStyle","padding","paddings","md","text","fontFamily","fonts","inter_bold","fontWeight","size","fontSizes","color","black","sm","lineHeight","gray","TouchableOpacity","onPress","activeOpacity","disabled","style","overflow","red","alignItems","justifyContent","Image","source","uri","height","resizeMode","Icons","icon","toUpperCase","inter_medium_500","Modal","transparent","animationType","View","position","top","right","displayName","_default","exports","asBaseComponent"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/notification-details-card/index.tsx"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAGA,IAAAG,OAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAIA,IAAAM,gBAAA,GAAAN,OAAA;AAGA,IAAAO,MAAA,GAAAP,OAAA;AAAiD,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAI,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAd,uBAAA,YAAAA,CAAAU,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAA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CACF,CACR;EAAA,CACE,CAAC;AAEV,CACF,CAAC;AAEDzE,sBAAsB,CAACqF,WAAW,GAAG,wBAAwB;;AAE7D;AACA;AACA;AAFA,IAAAC,QAAA,GAAAC,OAAA,CAAAxG,OAAA,GAGe,IAAAyG,gCAAe,EAACxF,sBAAsB,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.TextoComPdf = exports.TextoComImagem = exports.TextoComCsv = exports.SomenteTexto = void 0;
|
|
6
|
+
exports.default = exports.TextoComPdf = exports.TextoComImagemSemInternet = exports.TextoComImagem = exports.TextoComCsv = exports.SomenteTexto = void 0;
|
|
7
7
|
var _index = _interopRequireDefault(require("../../components/notification-details-card/index.js"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
/**
|
|
@@ -88,7 +88,19 @@ const TextoComImagem = exports.TextoComImagem = {
|
|
|
88
88
|
description: "Ponte interditada para caminhões. Apenas veículos leves podem transitar.",
|
|
89
89
|
fileUrl: "https://placehold.co/300x300",
|
|
90
90
|
// aqui você troca pelo real
|
|
91
|
-
fileType: "image"
|
|
91
|
+
fileType: "image",
|
|
92
|
+
isInternetReachable: true
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const TextoComImagemSemInternet = exports.TextoComImagemSemInternet = {
|
|
96
|
+
name: "Texto + Imagem (sem internet)",
|
|
97
|
+
args: {
|
|
98
|
+
title: "Atenção!",
|
|
99
|
+
description: "Ponte interditada para caminhões. Apenas veículos leves podem transitar.",
|
|
100
|
+
fileUrl: "https://placehold.co/300x300",
|
|
101
|
+
// aqui você troca pelo real
|
|
102
|
+
fileType: "image",
|
|
103
|
+
isInternetReachable: false
|
|
92
104
|
}
|
|
93
105
|
};
|
|
94
106
|
const TextoComPdf = exports.TextoComPdf = {
|
|
@@ -97,7 +109,8 @@ const TextoComPdf = exports.TextoComPdf = {
|
|
|
97
109
|
title: "Relatório disponível",
|
|
98
110
|
description: "Clique abaixo para abrir o relatório completo em PDF.",
|
|
99
111
|
fileUrl: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
|
|
100
|
-
fileType: "pdf"
|
|
112
|
+
fileType: "pdf",
|
|
113
|
+
isInternetReachable: false
|
|
101
114
|
}
|
|
102
115
|
};
|
|
103
116
|
const TextoComCsv = exports.TextoComCsv = {
|
|
@@ -106,7 +119,8 @@ const TextoComCsv = exports.TextoComCsv = {
|
|
|
106
119
|
title: "Dados Exportados",
|
|
107
120
|
description: "Clique abaixo para visualizar o arquivo CSV exportado.",
|
|
108
121
|
fileUrl: "https://people.sc.fsu.edu/~jburkardt/data/csv/airtravel.csv",
|
|
109
|
-
fileType: "csv"
|
|
122
|
+
fileType: "csv",
|
|
123
|
+
isInternetReachable: true
|
|
110
124
|
}
|
|
111
125
|
};
|
|
112
126
|
//# sourceMappingURL=notification-details-card.stories.js.map
|
package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_index","_interopRequireDefault","require","e","__esModule","default","meta","title","component","NotificationDetailCard","args","description","argTypes","control","type","fileUrl","fileType","options","parameters","docs","_default","exports","SomenteTexto","name","TextoComImagem","TextoComPdf","TextoComCsv"],"sourceRoot":"..\\..\\..\\..\\src","sources":["stories/notification-details-card/notification-details-card.stories.tsx"],"mappings":";;;;;;AAOA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAgF,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAPhF;AACA;AACA;;AAIA;;AAGA;;AAGA;AACA;AACA;AACA,MAAMG,IAAyC,GAAG;EAChDC,KAAK,EAAE,mCAAmC;EAC1CC,SAAS,EAAE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efault","require","e","__esModule","default","meta","title","component","NotificationDetailCard","args","description","argTypes","control","type","fileUrl","fileType","options","parameters","docs","_default","exports","SomenteTexto","name","TextoComImagem","isInternetReachable","TextoComImagemSemInternet","TextoComPdf","TextoComCsv"],"sourceRoot":"..\\..\\..\\..\\src","sources":["stories/notification-details-card/notification-details-card.stories.tsx"],"mappings":";;;;;;AAOA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAgF,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAPhF;AACA;AACA;;AAIA;;AAGA;;AAGA;AACA;AACA;AACA,MAAMG,IAAyC,GAAG;EAChDC,KAAK,EAAE,mCAAmC;EAC1CC,SAAS,EAAEC,cAAgE;EAC3EC,IAAI,EAAE;IACJH,KAAK,EAAE,aAAa;IACpBI,WAAW,EACT,6EAA6E,GAC7E;EACJ,CAAC;EACDC,QAAQ,EAAE;IACRL,KAAK,EAAE;MACLM,OAAO,EAAE;QAAEC,IAAI,EAAE;MAAO,CAAC;MACzBH,WAAW,EAAE;IACf,CAAC;IACDA,WAAW,EAAE;MACXE,OAAO,EAAE;QAAEC,IAAI,EAAE;MAAO,CAAC;MACzBH,WAAW,EAAE;IACf,CAAC;IACDI,OAAO,EAAE;MACPF,OAAO,EAAE;QAAEC,IAAI,EAAE;MAAO,CAAC;MACzBH,WAAW,EAAE;IACf,CAAC;IACDK,QAAQ,EAAE;MACRH,OAAO,EAAE;QAAEC,IAAI,EAAE;MAAS,CAAC;MAC3BG,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC;MACzCN,WAAW,EAAE;IACf;EACF,CAAC;EACDO,UAAU,EAAE;IACVC,IAAI,EAAE;MACJR,WAAW,EAAE;QACXH,SAAS,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACM;IACF;EACF;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;EACvB;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* IMPORTS
|
|
3
|
+
/**
|
|
4
|
+
* IMPORTS
|
|
5
5
|
*/
|
|
6
6
|
import React, { forwardRef, useState } from "react";
|
|
7
7
|
import { Modal, TouchableOpacity, Image, View } from "react-native";
|
|
@@ -20,11 +20,12 @@ import { asBaseComponent } from "../../@types/as-base-component.js";
|
|
|
20
20
|
// styles / theme
|
|
21
21
|
import { theme } from "../../styles/theme/theme.js";
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* Componente NotificationDetailCard
|
|
23
|
+
/**
|
|
24
|
+
* Componente NotificationDetailCard
|
|
25
25
|
*/
|
|
26
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
27
|
const NotificationDetailCard = /*#__PURE__*/forwardRef(({
|
|
28
|
+
isInternetReachable = true,
|
|
28
29
|
title,
|
|
29
30
|
description,
|
|
30
31
|
fileUrl,
|
|
@@ -90,19 +91,25 @@ const NotificationDetailCard = /*#__PURE__*/forwardRef(({
|
|
|
90
91
|
testID: "button",
|
|
91
92
|
onPress: openFile,
|
|
92
93
|
activeOpacity: 0.8,
|
|
94
|
+
disabled: !isInternetReachable // quando for falso joga true se nao false
|
|
95
|
+
,
|
|
93
96
|
style: {
|
|
94
97
|
borderRadius: theme.borderWidths.thick_medium,
|
|
95
98
|
overflow: "hidden",
|
|
96
99
|
borderWidth: 1,
|
|
97
|
-
borderColor: theme.colors.gray[300]
|
|
100
|
+
borderColor: isInternetReachable ? theme.colors.gray[300] : theme.colors.red[900]
|
|
98
101
|
},
|
|
99
102
|
children: fileType === "image" ? /*#__PURE__*/_jsx(Box, {
|
|
103
|
+
flexStyle: {
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
justifyContent: "center"
|
|
106
|
+
},
|
|
100
107
|
borderStyled: {
|
|
101
108
|
borderWidth: 2,
|
|
102
|
-
borderColor: theme.colors.blue[525],
|
|
109
|
+
borderColor: isInternetReachable ? theme.colors.blue[525] : theme.colors.red[900],
|
|
103
110
|
borderRadius: theme.borderWidths.thick_medium
|
|
104
111
|
},
|
|
105
|
-
children: /*#__PURE__*/_jsx(Image, {
|
|
112
|
+
children: isInternetReachable ? /*#__PURE__*/_jsx(Image, {
|
|
106
113
|
source: {
|
|
107
114
|
uri: fileUrl
|
|
108
115
|
},
|
|
@@ -111,9 +118,26 @@ const NotificationDetailCard = /*#__PURE__*/forwardRef(({
|
|
|
111
118
|
height: 180,
|
|
112
119
|
borderRadius: theme.borderWidths.thick_medium,
|
|
113
120
|
borderWidth: 2,
|
|
114
|
-
borderColor: theme.colors.blue[525]
|
|
121
|
+
borderColor: isInternetReachable ? theme.colors.blue[525] : theme.colors.red[900]
|
|
115
122
|
},
|
|
116
123
|
resizeMode: "cover"
|
|
124
|
+
}) : /*#__PURE__*/_jsxs(Box, {
|
|
125
|
+
flexStyle: {
|
|
126
|
+
alignItems: "center",
|
|
127
|
+
justifyContent: "center"
|
|
128
|
+
},
|
|
129
|
+
height: 180,
|
|
130
|
+
children: [/*#__PURE__*/_jsx(Icons, {
|
|
131
|
+
icon: "WIFI_X",
|
|
132
|
+
size: 20,
|
|
133
|
+
color: theme.colors.red[900]
|
|
134
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
135
|
+
text: "Imagem indisponível",
|
|
136
|
+
size: theme.fontSizes.sm,
|
|
137
|
+
lineHeight: theme.lineHeight.md,
|
|
138
|
+
color: theme.colors.gray[700],
|
|
139
|
+
marginBottom: fileUrl ? 12 : 0
|
|
140
|
+
})]
|
|
117
141
|
})
|
|
118
142
|
}) : /*#__PURE__*/_jsxs(Box, {
|
|
119
143
|
flexStyle: {
|
|
@@ -125,14 +149,18 @@ const NotificationDetailCard = /*#__PURE__*/forwardRef(({
|
|
|
125
149
|
padding: theme.paddings.sm
|
|
126
150
|
},
|
|
127
151
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
128
|
-
text: `Abrir arquivo (${fileType.toUpperCase()})
|
|
152
|
+
text: isInternetReachable ? `Abrir arquivo (${fileType.toUpperCase()})` : "Arquivo indisponível",
|
|
129
153
|
fontFamily: theme.fonts.inter_medium_500,
|
|
130
154
|
color: theme.colors.blue[500],
|
|
131
155
|
size: theme.fontSizes.md
|
|
132
|
-
}), /*#__PURE__*/_jsx(Icons, {
|
|
156
|
+
}), isInternetReachable ? /*#__PURE__*/_jsx(Icons, {
|
|
133
157
|
icon: "FILES",
|
|
134
158
|
size: 20,
|
|
135
159
|
color: theme.colors.blue[500]
|
|
160
|
+
}) : /*#__PURE__*/_jsx(Icons, {
|
|
161
|
+
icon: "WIFI_X",
|
|
162
|
+
size: 20,
|
|
163
|
+
color: theme.colors.red[900]
|
|
136
164
|
})]
|
|
137
165
|
})
|
|
138
166
|
})]
|
|
@@ -176,8 +204,8 @@ const NotificationDetailCard = /*#__PURE__*/forwardRef(({
|
|
|
176
204
|
});
|
|
177
205
|
NotificationDetailCard.displayName = "NotificationDetailCard";
|
|
178
206
|
|
|
179
|
-
/**
|
|
180
|
-
* EXPORTS
|
|
207
|
+
/**
|
|
208
|
+
* EXPORTS
|
|
181
209
|
*/
|
|
182
210
|
export default asBaseComponent(NotificationDetailCard);
|
|
183
211
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","useState","Modal","TouchableOpacity","Image","View","Icons","Box","Typography","asBaseComponent","theme","jsx","_jsx","jsxs","_jsxs","NotificationDetailCard","title","description","fileUrl","fileType","testID","ref","visible","setVisible","openFile","then","Linking","openURL","catch","err","console","warn","borderColor","colors","blue","flexStyle","flexDirection","borderStyled","borderWidth","neutral","borderRadius","borderWidths","thick_medium","marginStyle","marginBottom","backgroundColor","children","width","borderTopLeftRadius","borderBottomLeftRadius","flex","paddingStyle","padding","paddings","md","text","fontFamily","fonts","inter_bold","fontWeight","size","fontSizes","color","black","sm","lineHeight","gray","onPress","activeOpacity","style","overflow","source","uri","height","resizeMode","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useState","Modal","TouchableOpacity","Image","View","Icons","Box","Typography","asBaseComponent","theme","jsx","_jsx","jsxs","_jsxs","NotificationDetailCard","isInternetReachable","title","description","fileUrl","fileType","testID","ref","visible","setVisible","openFile","then","Linking","openURL","catch","err","console","warn","borderColor","colors","blue","flexStyle","flexDirection","borderStyled","borderWidth","neutral","borderRadius","borderWidths","thick_medium","marginStyle","marginBottom","backgroundColor","children","width","borderTopLeftRadius","borderBottomLeftRadius","flex","paddingStyle","padding","paddings","md","text","fontFamily","fonts","inter_bold","fontWeight","size","fontSizes","color","black","sm","lineHeight","gray","onPress","activeOpacity","disabled","style","overflow","red","alignItems","justifyContent","source","uri","height","resizeMode","icon","toUpperCase","inter_medium_500","transparent","animationType","position","top","right","displayName"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/notification-details-card/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AACnD,SAASC,KAAK,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,cAAc;;AAEnE;AACA,SAASC,KAAK,QAAQ,iCAAwB;;AAE9C;AACA,OAAOC,GAAG,MAAM,iBAAQ;AACxB,OAAOC,UAAU,MAAM,wBAAe;;AAEtC;;AAEA,SAASC,eAAe,QAAQ,mCAAgC;;AAEhE;AACA,SAASC,KAAK,QAAQ,6BAA0B;;AAEhD;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGA,MAAMC,sBAA8D,gBAAGf,UAAU,CAI/E,CACE;EAAEgB,mBAAmB,GAAG,IAAI;EAAEC,KAAK;EAAEC,WAAW;EAAEC,OAAO;EAAEC,QAAQ,GAAG,OAAO;EAAEC;AAAO,CAAC,EACvFC,GAAG,KACA;EACH,MAAM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D,WAAW;MAACC,aAAa,EAAC,MAAM;MAAArC,QAAA,eACvDjC,KAAA,CAACT,IAAI;QACHkE,KAAK,EAAE;UACLpB,IAAI,EAAE,CAAC;UACPL,eAAe,EAAE,iBAAiB;UAClC6B,cAAc,EAAE,QAAQ;UACxBD,UAAU,EAAE;QACd,CAAE;QAAA3B,QAAA,gBAEFnC,IAAA,CAACT,gBAAgB;UACfiE,OAAO,EAAEA,CAAA,KAAM5C,UAAU,CAAC,KAAK,CAAE;UACjC+C,KAAK,EAAE;YAAEc,QAAQ,EAAE,UAAU;YAAEC,GAAG,EAAE,EAAE;YAAEC,KAAK,EAAE;UAAG,CAAE;UAAAxC,QAAA,eAEpDnC,IAAA,CAACN,KAAK;YAAC0E,IAAI,EAAC,QAAQ;YAACnB,IAAI,EAAE,EAAG;YAACE,KAAK,EAAErD,KAAK,CAACwB,MAAM,CAACM,OAAO,CAAC,EAAE;UAAE,CAAE;QAAC,CAClD,CAAC,eAEnB5B,IAAA,CAACR,KAAK;UACJwE,MAAM,EAAE;YAAEC,GAAG,EAAE1D;UAAQ,CAAE;UACzBoD,KAAK,EAAE;YACLvB,KAAK,EAAE,KAAK;YACZ8B,MAAM,EAAE,KAAK;YACbrC,YAAY,EAAE/B,KAAK,CAACgC,YAAY,CAACC;UACnC,CAAE;UACFoC,UAAU,EAAC;QAAS,CACrB,CAAC;MAAA,CACE;IAAC,CACF,CACR;EAAA,CACE,CAAC;AAEV,CACF,CAAC;AAEDhE,sBAAsB,CAACyE,WAAW,GAAG,wBAAwB;;AAE7D;AACA;AACA;AACA,eAAe/E,eAAe,CAACM,sBAAsB,CAAC","ignoreList":[]}
|
|
@@ -83,7 +83,19 @@ export const TextoComImagem = {
|
|
|
83
83
|
description: "Ponte interditada para caminhões. Apenas veículos leves podem transitar.",
|
|
84
84
|
fileUrl: "https://placehold.co/300x300",
|
|
85
85
|
// aqui você troca pelo real
|
|
86
|
-
fileType: "image"
|
|
86
|
+
fileType: "image",
|
|
87
|
+
isInternetReachable: true
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
export const TextoComImagemSemInternet = {
|
|
91
|
+
name: "Texto + Imagem (sem internet)",
|
|
92
|
+
args: {
|
|
93
|
+
title: "Atenção!",
|
|
94
|
+
description: "Ponte interditada para caminhões. Apenas veículos leves podem transitar.",
|
|
95
|
+
fileUrl: "https://placehold.co/300x300",
|
|
96
|
+
// aqui você troca pelo real
|
|
97
|
+
fileType: "image",
|
|
98
|
+
isInternetReachable: false
|
|
87
99
|
}
|
|
88
100
|
};
|
|
89
101
|
export const TextoComPdf = {
|
|
@@ -92,7 +104,8 @@ export const TextoComPdf = {
|
|
|
92
104
|
title: "Relatório disponível",
|
|
93
105
|
description: "Clique abaixo para abrir o relatório completo em PDF.",
|
|
94
106
|
fileUrl: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
|
|
95
|
-
fileType: "pdf"
|
|
107
|
+
fileType: "pdf",
|
|
108
|
+
isInternetReachable: false
|
|
96
109
|
}
|
|
97
110
|
};
|
|
98
111
|
export const TextoComCsv = {
|
|
@@ -101,7 +114,8 @@ export const TextoComCsv = {
|
|
|
101
114
|
title: "Dados Exportados",
|
|
102
115
|
description: "Clique abaixo para visualizar o arquivo CSV exportado.",
|
|
103
116
|
fileUrl: "https://people.sc.fsu.edu/~jburkardt/data/csv/airtravel.csv",
|
|
104
|
-
fileType: "csv"
|
|
117
|
+
fileType: "csv",
|
|
118
|
+
isInternetReachable: true
|
|
105
119
|
}
|
|
106
120
|
};
|
|
107
121
|
//# sourceMappingURL=notification-details-card.stories.js.map
|
package/lib/module/stories/notification-details-card/notification-details-card.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NotificationDetailCard","meta","title","component","args","description","argTypes","control","type","fileUrl","fileType","options","parameters","docs","SomenteTexto","name","TextoComImagem","TextoComPdf","TextoComCsv"],"sourceRoot":"..\\..\\..\\..\\src","sources":["stories/notification-details-card/not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AA0E;IACvFI,OAAO,EAAE,8BAA8B;IAAE;IACzCC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"names":["NotificationDetailCard","meta","title","component","args","description","argTypes","control","type","fileUrl","fileType","options","parameters","docs","SomenteTexto","name","TextoComImagem","isInternetReachable","TextoComImagemSemInternet","TextoComPdf","TextoComCsv"],"sourceRoot":"..\\..\\..\\..\\src","sources":["stories/notification-details-card/notification-details-card.stories.tsx"],"mappings":";;AAAA;AACA;AACA;;AAIA;AACA,OAAOA,sBAAsB,MAAM,qDAA4C;;AAE/E;;AAGA;AACA;AACA;AACA,MAAMC,IAAyC,GAAG;EAChDC,KAAK,EAAE,mCAAmC;EAC1CC,SAAS,EAAEH,sBAAgE;EAC3EI,IAAI,EAAE;IACJF,KAAK,EAAE,aAAa;IACpBG,WAAW,EACT,6EAA6E,GAC7E;EACJ,CAAC;EACDC,QAAQ,EAAE;IACRJ,KAAK,EAAE;MACLK,OAAO,EAAE;QAAEC,IAAI,EAAE;MAAO,CAAC;MACzBH,WAAW,EAAE;IACf,CAAC;IACDA,WAAW,EAAE;MACXE,OAAO,EAAE;QAAEC,IAAI,EAAE;MAAO,CAAC;MACzBH,WAAW,EAAE;IACf,CAAC;IACDI,OAAO,EAAE;MACPF,OAAO,EAAE;QAAEC,IAAI,EAAE;MAAO,CAAC;MACzBH,WAAW,EAAE;IACf,CAAC;IACDK,QAAQ,EAAE;MACRH,OAAO,EAAE;QAAEC,IAAI,EAAE;MAAS,CAAC;MAC3BG,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC;MACzCN,WAAW,EAAE;IACf;EACF,CAAC;EACDO,UAAU,EAAE;IACVC,IAAI,EAAE;MACJR,WAAW,EAAE;QACXF,SAAS,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACM;IACF;EACF;AACF,CAAC;AAED,eAAeF,IAAI;AAInB;AACA;AACA;AACA,OAAO,MAAMa,YAAmB,GAAG;EACjCC,IAAI,EAAE,eAAe;EACrBX,IAAI,EAAE;IACJF,KAAK,EAAE,aAAa;IACpBG,WAAW,EACT,6EAA6E,GAC7E;EACJ;AACF,CAAC;AAED,OAAO,MAAMW,cAAqB,GAAG;EACnCD,IAAI,EAAE,gBAAgB;EACtBX,IAAI,EAAE;IACJF,KAAK,EAAE,UAAU;IACjBG,WAAW,EAAE,0EAA0E;IACvFI,OAAO,EAAE,8BAA8B;IAAE;IACzCC,QAAQ,EAAE,OAAO;IACjBO,mBAAmB,EAAE;EACvB;AACF,CAAC;AAED,OAAO,MAAMC,yBAAgC,GAAG;EAC9CH,IAAI,EAAE,+BAA+B;EACrCX,IAAI,EAAE;IACJF,KAAK,EAAE,UAAU;IACjBG,WAAW,EAAE,0EAA0E;IACvFI,OAAO,EAAE,8BAA8B;IAAE;IACzCC,QAAQ,EAAE,OAAO;IACjBO,mBAAmB,EAAE;EACvB;AACF,CAAC;AAED,OAAO,MAAME,WAAkB,GAAG;EAChCJ,IAAI,EAAE,aAAa;EACnBX,IAAI,EAAE;IACJF,KAAK,EAAE,sBAAsB;IAC7BG,WAAW,EAAE,uDAAuD;IACpEI,OAAO,EAAE,yEAAyE;IAClFC,QAAQ,EAAE,KAAK;IACfO,mBAAmB,EAAE;EACvB;AACF,CAAC;AAED,OAAO,MAAMG,WAAkB,GAAG;EAChCL,IAAI,EAAE,aAAa;EACnBX,IAAI,EAAE;IACJF,KAAK,EAAE,kBAAkB;IACzBG,WAAW,EAAE,wDAAwD;IACrEI,OAAO,EAAE,6DAA6D;IACtEC,QAAQ,EAAE,KAAK;IACfO,mBAAmB,EAAE;EACvB;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/notification-details-card/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAA+B,MAAM,OAAO,CAAC;AAWpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/notification-details-card/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAA+B,MAAM,OAAO,CAAC;AAWpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AA4MhE;;GAEG;;AACH,wBAAuD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/notification-details-card/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,UAAU,4BAA4B;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/notification-details-card/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,UAAU,4BAA4B;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,wDAAwD;IACxD,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,OAAO,EAAE,KAAK,4BAA4B,EAAE,CAAC"}
|
|
@@ -11,6 +11,7 @@ type Story = StoryObj<typeof NotificationDetailCard>;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const SomenteTexto: Story;
|
|
13
13
|
export declare const TextoComImagem: Story;
|
|
14
|
+
export declare const TextoComImagemSemInternet: Story;
|
|
14
15
|
export declare const TextoComPdf: Story;
|
|
15
16
|
export declare const TextoComCsv: Story;
|
|
16
17
|
//# sourceMappingURL=notification-details-card.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-details-card.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/notification-details-card/notification-details-card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,sBAAsB,MAAM,4CAA4C,CAAC;AAKhF;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,sBAAsB,CA8C7C,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"notification-details-card.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/notification-details-card/notification-details-card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,sBAAsB,MAAM,4CAA4C,CAAC;AAKhF;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,sBAAsB,CA8C7C,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAS5B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KASvC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KASzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KASzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/notification-details-card/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAA+B,MAAM,OAAO,CAAC;AAWpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/notification-details-card/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAA+B,MAAM,OAAO,CAAC;AAWpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AA4MhE;;GAEG;;AACH,wBAAuD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/notification-details-card/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,UAAU,4BAA4B;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/notification-details-card/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,UAAU,4BAA4B;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,wDAAwD;IACxD,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,OAAO,EAAE,KAAK,4BAA4B,EAAE,CAAC"}
|
|
@@ -11,6 +11,7 @@ type Story = StoryObj<typeof NotificationDetailCard>;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const SomenteTexto: Story;
|
|
13
13
|
export declare const TextoComImagem: Story;
|
|
14
|
+
export declare const TextoComImagemSemInternet: Story;
|
|
14
15
|
export declare const TextoComPdf: Story;
|
|
15
16
|
export declare const TextoComCsv: Story;
|
|
16
17
|
//# sourceMappingURL=notification-details-card.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-details-card.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/notification-details-card/notification-details-card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,sBAAsB,MAAM,4CAA4C,CAAC;AAKhF;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,sBAAsB,CA8C7C,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"notification-details-card.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/notification-details-card/notification-details-card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,sBAAsB,MAAM,4CAA4C,CAAC;AAKhF;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,sBAAsB,CA8C7C,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAS5B,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KASvC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KASzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KASzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,180 +1,222 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React, { forwardRef, useState } from "react";
|
|
5
|
-
import { Modal, TouchableOpacity, Image, View } from "react-native";
|
|
6
|
-
|
|
7
|
-
// commons / icons
|
|
8
|
-
import { Icons } from "../../common/icons-svg";
|
|
9
|
-
|
|
10
|
-
// components
|
|
11
|
-
import Box from "../box";
|
|
12
|
-
import Typography from "../typography";
|
|
13
|
-
|
|
14
|
-
// typings
|
|
15
|
-
import type { INotificationDetailCardProps } from "./interface";
|
|
16
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
17
|
-
|
|
18
|
-
// styles / theme
|
|
19
|
-
import { theme } from "../../styles/theme/theme";
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Componente NotificationDetailCard
|
|
23
|
-
*/
|
|
24
|
-
const NotificationDetailCard: React.FC<INotificationDetailCardProps> = forwardRef<
|
|
25
|
-
View,
|
|
26
|
-
INotificationDetailCardProps
|
|
27
|
-
>(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef, useState } from "react";
|
|
5
|
+
import { Modal, TouchableOpacity, Image, View } from "react-native";
|
|
6
|
+
|
|
7
|
+
// commons / icons
|
|
8
|
+
import { Icons } from "../../common/icons-svg";
|
|
9
|
+
|
|
10
|
+
// components
|
|
11
|
+
import Box from "../box";
|
|
12
|
+
import Typography from "../typography";
|
|
13
|
+
|
|
14
|
+
// typings
|
|
15
|
+
import type { INotificationDetailCardProps } from "./interface";
|
|
16
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
17
|
+
|
|
18
|
+
// styles / theme
|
|
19
|
+
import { theme } from "../../styles/theme/theme";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Componente NotificationDetailCard
|
|
23
|
+
*/
|
|
24
|
+
const NotificationDetailCard: React.FC<INotificationDetailCardProps> = forwardRef<
|
|
25
|
+
View,
|
|
26
|
+
INotificationDetailCardProps
|
|
27
|
+
>(
|
|
28
|
+
(
|
|
29
|
+
{ isInternetReachable = true, title, description, fileUrl, fileType = "image", testID },
|
|
30
|
+
ref
|
|
31
|
+
) => {
|
|
32
|
+
const [visible, setVisible] = useState(false);
|
|
33
|
+
|
|
34
|
+
function openFile() {
|
|
35
|
+
if (fileType === "image") {
|
|
36
|
+
setVisible(true);
|
|
37
|
+
} else if (fileUrl) {
|
|
38
|
+
import("react-native").then(({ Linking }) => {
|
|
39
|
+
Linking.openURL(fileUrl).catch((err) => console.warn("Erro ao abrir arquivo:", err));
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const borderColor = theme.colors.blue[500];
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<Box
|
|
48
|
+
ref={ref}
|
|
49
|
+
testID={testID ?? "notification-detail-card"}
|
|
50
|
+
flexStyle={{ flexDirection: "row" }}
|
|
51
|
+
borderStyled={{
|
|
52
|
+
borderWidth: 1,
|
|
53
|
+
borderColor: theme.colors.neutral[200],
|
|
54
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
55
|
+
}}
|
|
56
|
+
marginStyle={{ marginBottom: 16 }}
|
|
57
|
+
backgroundColor={theme.colors.neutral[25]}
|
|
58
|
+
>
|
|
59
|
+
{/* borda fixa lateral esquerda */}
|
|
60
|
+
<Box
|
|
61
|
+
width={8}
|
|
62
|
+
backgroundColor={borderColor}
|
|
63
|
+
borderStyled={{
|
|
64
|
+
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
65
|
+
borderBottomLeftRadius: theme.borderWidths.thick_medium,
|
|
66
|
+
}}
|
|
67
|
+
/>
|
|
68
|
+
|
|
69
|
+
{/* Conteúdo do card */}
|
|
70
|
+
<Box flexStyle={{ flex: 1 }} paddingStyle={{ padding: theme.paddings.md }}>
|
|
71
|
+
{/* header */}
|
|
72
|
+
<Typography
|
|
73
|
+
text={title}
|
|
74
|
+
fontFamily={theme.fonts.inter_bold}
|
|
75
|
+
fontWeight="700"
|
|
76
|
+
size={theme.fontSizes.md}
|
|
77
|
+
color={theme.colors.black[100]}
|
|
78
|
+
marginBottom={8}
|
|
79
|
+
/>
|
|
80
|
+
|
|
81
|
+
{/* texto */}
|
|
82
|
+
<Typography
|
|
83
|
+
text={description}
|
|
84
|
+
size={theme.fontSizes.sm}
|
|
85
|
+
lineHeight={theme.lineHeight.md}
|
|
86
|
+
color={theme.colors.gray[700]}
|
|
87
|
+
marginBottom={fileUrl ? 12 : 0}
|
|
88
|
+
/>
|
|
89
|
+
|
|
90
|
+
{/* arquivo (se existir) */}
|
|
91
|
+
{fileUrl && (
|
|
92
|
+
<TouchableOpacity
|
|
93
|
+
testID="button"
|
|
94
|
+
onPress={openFile}
|
|
95
|
+
activeOpacity={0.8}
|
|
96
|
+
disabled={!isInternetReachable} // quando for falso joga true se nao false
|
|
97
|
+
style={{
|
|
98
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
99
|
+
overflow: "hidden",
|
|
100
|
+
borderWidth: 1,
|
|
101
|
+
|
|
102
|
+
borderColor: isInternetReachable ? theme.colors.gray[300] : theme.colors.red[900],
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
105
|
+
{fileType === "image" ? (
|
|
106
|
+
<Box
|
|
107
|
+
flexStyle={{
|
|
108
|
+
alignItems: "center",
|
|
109
|
+
justifyContent: "center",
|
|
110
|
+
}}
|
|
111
|
+
borderStyled={{
|
|
112
|
+
borderWidth: 2,
|
|
113
|
+
borderColor: isInternetReachable
|
|
114
|
+
? theme.colors.blue[525]
|
|
115
|
+
: theme.colors.red[900],
|
|
116
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
117
|
+
}}
|
|
118
|
+
>
|
|
119
|
+
{isInternetReachable ? (
|
|
120
|
+
<Image
|
|
121
|
+
source={{ uri: fileUrl }}
|
|
122
|
+
style={{
|
|
123
|
+
width: "100%",
|
|
124
|
+
height: 180,
|
|
125
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
126
|
+
borderWidth: 2,
|
|
127
|
+
borderColor: isInternetReachable
|
|
128
|
+
? theme.colors.blue[525]
|
|
129
|
+
: theme.colors.red[900],
|
|
130
|
+
}}
|
|
131
|
+
resizeMode="cover"
|
|
132
|
+
/>
|
|
133
|
+
) : (
|
|
134
|
+
<Box
|
|
135
|
+
flexStyle={{
|
|
136
|
+
alignItems: "center",
|
|
137
|
+
justifyContent: "center",
|
|
138
|
+
}}
|
|
139
|
+
height={180}
|
|
140
|
+
>
|
|
141
|
+
<Icons icon="WIFI_X" size={20} color={theme.colors.red[900]} />
|
|
142
|
+
<Typography
|
|
143
|
+
text={"Imagem indisponível"}
|
|
144
|
+
size={theme.fontSizes.sm}
|
|
145
|
+
lineHeight={theme.lineHeight.md}
|
|
146
|
+
color={theme.colors.gray[700]}
|
|
147
|
+
marginBottom={fileUrl ? 12 : 0}
|
|
148
|
+
/>
|
|
149
|
+
</Box>
|
|
150
|
+
)}
|
|
151
|
+
</Box>
|
|
152
|
+
) : (
|
|
153
|
+
<Box
|
|
154
|
+
flexStyle={{
|
|
155
|
+
flexDirection: "row",
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
justifyContent: "space-between",
|
|
158
|
+
}}
|
|
159
|
+
paddingStyle={{ padding: theme.paddings.sm }}
|
|
160
|
+
>
|
|
161
|
+
<Typography
|
|
162
|
+
text={
|
|
163
|
+
isInternetReachable
|
|
164
|
+
? `Abrir arquivo (${fileType.toUpperCase()})`
|
|
165
|
+
: "Arquivo indisponível"
|
|
166
|
+
}
|
|
167
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
168
|
+
color={theme.colors.blue[500]}
|
|
169
|
+
size={theme.fontSizes.md}
|
|
170
|
+
/>
|
|
171
|
+
{isInternetReachable ? (
|
|
172
|
+
<Icons icon="FILES" size={20} color={theme.colors.blue[500]} />
|
|
173
|
+
) : (
|
|
174
|
+
<Icons icon="WIFI_X" size={20} color={theme.colors.red[900]} />
|
|
175
|
+
)}
|
|
176
|
+
</Box>
|
|
177
|
+
)}
|
|
178
|
+
</TouchableOpacity>
|
|
179
|
+
)}
|
|
180
|
+
</Box>
|
|
181
|
+
|
|
182
|
+
{/* modal para zoom da imagem */}
|
|
183
|
+
{fileType === "image" && (
|
|
184
|
+
<Modal visible={visible} transparent animationType="fade">
|
|
185
|
+
<View
|
|
186
|
+
style={{
|
|
187
|
+
flex: 1,
|
|
188
|
+
backgroundColor: "rgba(0,0,0,0.9)",
|
|
189
|
+
justifyContent: "center",
|
|
190
|
+
alignItems: "center",
|
|
191
|
+
}}
|
|
192
|
+
>
|
|
193
|
+
<TouchableOpacity
|
|
194
|
+
onPress={() => setVisible(false)}
|
|
195
|
+
style={{ position: "absolute", top: 40, right: 20 }}
|
|
196
|
+
>
|
|
197
|
+
<Icons icon="CLOSED" size={28} color={theme.colors.neutral[25]} />
|
|
198
|
+
</TouchableOpacity>
|
|
199
|
+
|
|
200
|
+
<Image
|
|
201
|
+
source={{ uri: fileUrl }}
|
|
202
|
+
style={{
|
|
203
|
+
width: "90%",
|
|
204
|
+
height: "70%",
|
|
205
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
206
|
+
}}
|
|
207
|
+
resizeMode="contain"
|
|
208
|
+
/>
|
|
209
|
+
</View>
|
|
210
|
+
</Modal>
|
|
211
|
+
)}
|
|
212
|
+
</Box>
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
NotificationDetailCard.displayName = "NotificationDetailCard";
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* EXPORTS
|
|
221
|
+
*/
|
|
222
|
+
export default asBaseComponent(NotificationDetailCard);
|
|
@@ -8,6 +8,9 @@ interface INotificationDetailCardProps {
|
|
|
8
8
|
fileUrl?: string; // link para arquivo (png, pdf, csv, etc.)
|
|
9
9
|
fileType?: "image" | "pdf" | "csv" | "other";
|
|
10
10
|
testID?: string;
|
|
11
|
+
|
|
12
|
+
/**Indica se a conexão com a internet está disponível */
|
|
13
|
+
isInternetReachable?: boolean;
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
/**
|
|
@@ -85,6 +85,18 @@ export const TextoComImagem: Story = {
|
|
|
85
85
|
description: "Ponte interditada para caminhões. Apenas veículos leves podem transitar.",
|
|
86
86
|
fileUrl: "https://placehold.co/300x300", // aqui você troca pelo real
|
|
87
87
|
fileType: "image",
|
|
88
|
+
isInternetReachable: true,
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const TextoComImagemSemInternet: Story = {
|
|
93
|
+
name: "Texto + Imagem (sem internet)",
|
|
94
|
+
args: {
|
|
95
|
+
title: "Atenção!",
|
|
96
|
+
description: "Ponte interditada para caminhões. Apenas veículos leves podem transitar.",
|
|
97
|
+
fileUrl: "https://placehold.co/300x300", // aqui você troca pelo real
|
|
98
|
+
fileType: "image",
|
|
99
|
+
isInternetReachable: false,
|
|
88
100
|
},
|
|
89
101
|
};
|
|
90
102
|
|
|
@@ -95,6 +107,7 @@ export const TextoComPdf: Story = {
|
|
|
95
107
|
description: "Clique abaixo para abrir o relatório completo em PDF.",
|
|
96
108
|
fileUrl: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
|
|
97
109
|
fileType: "pdf",
|
|
110
|
+
isInternetReachable: false,
|
|
98
111
|
},
|
|
99
112
|
};
|
|
100
113
|
|
|
@@ -105,5 +118,6 @@ export const TextoComCsv: Story = {
|
|
|
105
118
|
description: "Clique abaixo para visualizar o arquivo CSV exportado.",
|
|
106
119
|
fileUrl: "https://people.sc.fsu.edu/~jburkardt/data/csv/airtravel.csv",
|
|
107
120
|
fileType: "csv",
|
|
121
|
+
isInternetReachable: true,
|
|
108
122
|
},
|
|
109
123
|
};
|