react-native-exp-fig 0.1.43 → 0.1.44
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/document-carga-info/index.js +1 -0
- package/lib/commonjs/components/document-carga-info/index.js.map +1 -1
- package/lib/commonjs/components/document-carga-info/styles.js +1 -0
- package/lib/commonjs/components/document-carga-info/styles.js.map +1 -1
- package/lib/commonjs/components/driver-journey-info/style.js +1 -0
- package/lib/commonjs/components/driver-journey-info/style.js.map +1 -1
- package/lib/commonjs/components/filter-date-selector/index.js +6 -5
- package/lib/commonjs/components/filter-date-selector/index.js.map +1 -1
- package/lib/commonjs/components/filter-date-selector/interface.d.js.map +1 -1
- package/lib/module/components/document-carga-info/index.js +1 -0
- package/lib/module/components/document-carga-info/index.js.map +1 -1
- package/lib/module/components/document-carga-info/styles.js +1 -0
- package/lib/module/components/document-carga-info/styles.js.map +1 -1
- package/lib/module/components/driver-journey-info/style.js +1 -0
- package/lib/module/components/driver-journey-info/style.js.map +1 -1
- package/lib/module/components/filter-date-selector/index.js +6 -6
- package/lib/module/components/filter-date-selector/index.js.map +1 -1
- package/lib/module/components/filter-date-selector/interface.d.js.map +1 -1
- package/lib/typescript/src/components/document-carga-info/styles.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/document-carga-info/index.tsx +2 -1
- package/src/components/document-carga-info/styles.ts +1 -0
- package/src/components/driver-journey-info/style.ts +2 -1
- package/src/components/filter-date-selector/index.tsx +9 -4
- package/src/components/filter-date-selector/interface.d.ts +5 -0
|
@@ -42,6 +42,7 @@ const DocumentCargaInfo = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
42
42
|
ref: ref,
|
|
43
43
|
style: _styles.styles.container
|
|
44
44
|
}, rest), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_box.default, {
|
|
45
|
+
width: "100%",
|
|
45
46
|
flexStyle: {
|
|
46
47
|
flexDirection: "row",
|
|
47
48
|
alignItems: "center"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_box","_interopRequireDefault","_typography","_asBaseComponent","_styles","_theme","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","DocumentCargaInfo","forwardRef","props","ref","title","numberDocument","linkDocument","isAlert","errorMessage","rest","handleOpenPdf","url","Linking","openURL","error","console","log","createElement","style","styles","container","Fragment","flexStyle","flexDirection","alignItems","Typography","text","size","theme","fontSizes","sm","fontFamily","fonts","inter_regular_400","color","colors","black","marginBottom","margins","md","Text","textOption","fontWeight","View","justifyContent","inter_bold","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_box","_interopRequireDefault","_typography","_asBaseComponent","_styles","_theme","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","DocumentCargaInfo","forwardRef","props","ref","title","numberDocument","linkDocument","isAlert","errorMessage","rest","handleOpenPdf","url","Linking","openURL","error","console","log","createElement","style","styles","container","Fragment","width","flexStyle","flexDirection","alignItems","Typography","text","size","theme","fontSizes","sm","fontFamily","fonts","inter_regular_400","color","colors","black","marginBottom","margins","md","Text","textOption","fontWeight","View","justifyContent","inter_bold","red","lineHeight","TouchableOpacity","button","backgroundColor","blue","activeOpacity","disabled","onPress","neutral","displayName","_default","exports","asBaseComponent"],"sources":["index.tsx"],"sourcesContent":["/* eslint-disable no-undef */\n/**\n * IMPORTS\n */\nimport React, { forwardRef } from \"react\";\nimport {\n TouchableOpacity,\n Text,\n View,\n Linking,\n} from \"react-native\";\n\n// components\nimport Box from \"../box\";\nimport { Typography } from \"../typography\";\n\n// typings\nimport { IDocumentCargaInfo } from \"./interface\";\nimport { asBaseComponent } from \"../../@types/as-base-component\";\n\n// styles\nimport { styles } from \"./styles\";\nimport { theme } from \"../../styles/theme/theme\";\n\n/**\n * Componente DocumentCargaInfo para interação do usuário com UI.\n */\nconst DocumentCargaInfo = forwardRef<View, IDocumentCargaInfo>(\n (props, ref): React.ReactElement => {\n const {\n title,\n numberDocument,\n linkDocument,\n isAlert,\n errorMessage,\n ...rest\n } = props;\n\n const handleOpenPdf = async (url: string): Promise<void> => {\n try {\n await Linking.openURL(url);\n } catch (error) {\n console.log(\"Erro ao abrir PDF\", error);\n }\n };\n\n return (\n <Box ref={ref} style={styles.container} {...rest}>\n <>\n {/* Título / Documento */}\n <Box width={\"100%\"} flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}>\n <Typography\n text={title ?? \"Selecione o Apolo disponível\"}\n size={theme.fontSizes.sm}\n fontFamily={theme.fonts.inter_regular_400}\n color={theme.colors.black[100]}\n marginBottom={isAlert ? 0 : theme.margins.md}\n />\n\n <Text\n style={[\n styles.textOption,\n\n {\n marginBottom: isAlert ? 0 : theme.margins.md,\n fontWeight: \"bold\",\n },\n ]}\n >\n #{numberDocument}\n </Text>\n </Box>\n\n {/* Alerta */}\n {isAlert && (\n <View\n style={{\n flexDirection: \"row\",\n alignItems: \"flex-start\",\n justifyContent: \"flex-start\",\n marginBottom: 16,\n }}\n >\n <Typography\n text=\"Atenção:\"\n size={theme.fontSizes.sm}\n fontFamily={theme.fonts.inter_bold}\n color={theme.colors.black[100]}\n />\n\n <Text\n style={[\n styles.textOption,\n {\n width: 250,\n color: theme.colors.red[900],\n lineHeight: 20,\n },\n ]}\n >\n {errorMessage ?? \"N/A\"}\n </Text>\n </View>\n )}\n\n {/* Botão */}\n <TouchableOpacity\n style={[\n styles.button,\n {\n backgroundColor: isAlert\n ? \"#8E949A\"\n : theme.colors.blue[500],\n },\n ]}\n activeOpacity={0.7}\n disabled={isAlert}\n onPress={() => handleOpenPdf(linkDocument!)}\n >\n <Typography\n text=\"Abrir documento\"\n color={theme.colors.neutral[25]}\n fontFamily={theme.fonts.inter_bold}\n size={16}\n />\n </TouchableOpacity>\n </>\n </Box>\n );\n }\n);\n\nDocumentCargaInfo.displayName = \"DocumentCargaInfo\";\n\n/**\n * EXPORTS\n */\nexport default asBaseComponent(DocumentCargaInfo);\n"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,IAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAIA,IAAAK,gBAAA,GAAAL,OAAA;AAGA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAAiD,SAAAG,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,CAAAC,I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,CAAC,EAAE,CAAE;IAChCxB,UAAU,EAAEH,YAAK,CAACI,KAAK,CAACa,UAAW;IACnClB,IAAI,EAAE;EAAG,CACV,CACe,CAClB,CACC,CAAC;AAEV,CACF,CAAC;AAED5B,iBAAiB,CAACyD,WAAW,GAAG,mBAAmB;;AAEnD;AACA;AACA;AAFA,IAAAC,QAAA,GAAAC,OAAA,CAAAnF,OAAA,GAGe,IAAAoF,gCAAe,EAAC5D,iBAAiB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_theme","styles","exports","StyleSheet","create","container","width","padding","theme","paddings","sm","backgroundColor","borderRadius","header","flexDirection","alignItems","justifyContent","marginBottom","margins","md","left","alert","color","marginTop","fontSize","button","height","arrow","textOption","colors","black","fontFamily","fonts","inter_regular_400","marginLeft"],"sources":["styles.ts"],"sourcesContent":["/**\n * IMPORTS\n */\n\nimport { StyleSheet } from \"react-native\";\n\n// theme\nimport { theme } from \"../../styles/theme/theme\";\n\n// styles\n\nconst styles = StyleSheet.create({\n container: {\n width: \"100%\",\n padding: theme.paddings.sm,\n backgroundColor: \"#EAEAEA\",\n borderRadius: 12,\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n marginBottom: theme.margins.md,\n },\n\n left: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n\n alert: {\n color: \"#D32F2F\",\n marginTop: 8,\n marginBottom: 12,\n fontSize: 13,\n },\n\n button: {\n width: \"100%\",\n height: 45,\n backgroundColor: \"#8E949A\",\n borderRadius: 8,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n arrow: {\n width: 20,\n height: 20,\n },\n textOption: {\n color: theme.colors.black[25],\n fontFamily: theme.fonts.inter_regular_400,\n fontSize: 12,\n marginLeft: 8,\n marginTop: 2,\n }\n\n})\n\n\n\n/**\n * EXPORTS\n */\nexport { styles }\n"],"mappings":";;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAD,OAAA;AAPA;AACA;AACA;;AAIA;;AAGA;;AAEA,MAAME,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,KAAK,EAAE,MAAM;IACbC,OAAO,EAAEC,YAAK,CAACC,QAAQ,CAACC,EAAE;IAC1BC,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE;EAChB,CAAC;EACDC,MAAM,EAAE;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BC,YAAY,EAAET,YAAK,CAACU,OAAO,CAACC;EAC9B,CAAC;EAEDC,IAAI,EAAE;IACJN,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EAEDM,KAAK,EAAE;IACLC,KAAK,EAAE,SAAS;IAChBC,SAAS,EAAE,CAAC;IACZN,YAAY,EAAE,EAAE;IAChBO,QAAQ,EAAE;EACZ,CAAC;EAEDC,MAAM,EAAE;IACNnB,KAAK,EAAE,MAAM;IACboB,MAAM,EAAE,EAAE;IACVf,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE,CAAC;IACfG,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDW,KAAK,EAAE;IACLrB,KAAK,EAAE,EAAE;IACToB,MAAM,EAAE;EACV,CAAC;EACDE,UAAU,EAAE;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_theme","styles","exports","StyleSheet","create","container","width","padding","theme","paddings","sm","backgroundColor","borderRadius","header","flexDirection","alignItems","justifyContent","marginBottom","margins","md","left","alert","color","marginTop","fontSize","button","height","arrow","textOption","colors","black","fontFamily","fonts","inter_regular_400","marginLeft"],"sources":["styles.ts"],"sourcesContent":["/**\n * IMPORTS\n */\n\nimport { StyleSheet } from \"react-native\";\n\n// theme\nimport { theme } from \"../../styles/theme/theme\";\n\n// styles\n\nconst styles = StyleSheet.create({\n container: {\n width: \"100%\",\n padding: theme.paddings.sm,\n backgroundColor: \"#EAEAEA\",\n borderRadius: 12,\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n marginBottom: theme.margins.md,\n },\n\n left: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n\n alert: {\n color: \"#D32F2F\",\n marginTop: 8,\n marginBottom: 12,\n fontSize: 13,\n },\n\n button: {\n width: \"100%\",\n height: 45,\n backgroundColor: \"#8E949A\",\n borderRadius: 8,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n arrow: {\n width: 20,\n height: 20,\n },\n textOption: {\n width: 100,\n color: theme.colors.black[25],\n fontFamily: theme.fonts.inter_regular_400,\n fontSize: 12,\n marginLeft: 8,\n marginTop: 2,\n }\n\n})\n\n\n\n/**\n * EXPORTS\n */\nexport { styles }\n"],"mappings":";;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAD,OAAA;AAPA;AACA;AACA;;AAIA;;AAGA;;AAEA,MAAME,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,KAAK,EAAE,MAAM;IACbC,OAAO,EAAEC,YAAK,CAACC,QAAQ,CAACC,EAAE;IAC1BC,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE;EAChB,CAAC;EACDC,MAAM,EAAE;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BC,YAAY,EAAET,YAAK,CAACU,OAAO,CAACC;EAC9B,CAAC;EAEDC,IAAI,EAAE;IACJN,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EAEDM,KAAK,EAAE;IACLC,KAAK,EAAE,SAAS;IAChBC,SAAS,EAAE,CAAC;IACZN,YAAY,EAAE,EAAE;IAChBO,QAAQ,EAAE;EACZ,CAAC;EAEDC,MAAM,EAAE;IACNnB,KAAK,EAAE,MAAM;IACboB,MAAM,EAAE,EAAE;IACVf,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE,CAAC;IACfG,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDW,KAAK,EAAE;IACLrB,KAAK,EAAE,EAAE;IACToB,MAAM,EAAE;EACV,CAAC;EACDE,UAAU,EAAE;IACVtB,KAAK,EAAE,GAAG;IACVgB,KAAK,EAAEd,YAAK,CAACqB,MAAM,CAACC,KAAK,CAAC,EAAE,CAAC;IAC7BC,UAAU,EAAEvB,YAAK,CAACwB,KAAK,CAACC,iBAAiB;IACzCT,QAAQ,EAAE,EAAE;IACZU,UAAU,EAAE,CAAC;IACbX,SAAS,EAAE;EACb;AAEF,CAAC,CAAC;;AAIF;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_theme","styles","exports","StyleSheet","create","container","bg","width","padding","theme","paddings","sm","backgroundColor","colors","gray","borderRadius","header","flexDirection","alignItems","justifyContent","flexWrap","marginBottom","margins","md","arrow","height","textSpacing","marginTop","buttonText","color","neutral","fontFamily","fonts","inter_medium_500","fontSize","fontSizes","textOption","black","inter_regular_400","marginLeft"],"sources":["style.ts"],"sourcesContent":["/**\n * IMPORTS\n */\n\nimport { StyleSheet } from \"react-native\";\n\n// typings\nimport { IStyles } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\nconst styles = StyleSheet.create<IStyles | any>({\n container: (bg?: string) => ({\n width: \"100%\",\n padding: theme.paddings.sm,\n backgroundColor: bg ?? theme.colors.gray[700],\n borderRadius: 16,\n }),\n\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n flexWrap: \"wrap\",\n marginBottom: theme.margins.md,\n },\n\n arrow: {\n width: 20,\n height: 20,\n },\n\n textSpacing: {\n marginTop: theme.margins[\"2xs\"],\n marginBottom: theme.margins[\"2xs\"],\n },\n\n buttonText: {\n color: theme.colors.neutral[25],\n fontFamily: theme.fonts.inter_medium_500,\n fontSize: theme.fontSizes.md,\n },\n textOption: {\n color: theme.colors.black[25],\n fontFamily: theme.fonts.inter_regular_400,\n fontSize: 12,\n marginLeft: 4,\n }\n});\n\n/**\n * EXPORTS\n */\nexport { styles}\n"],"mappings":";;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,MAAA,GAAAD,OAAA;AAVA;AACA;AACA;;AAIA;;AAGA;;AAGA,MAAME,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAGE,uBAAU,CAACC,MAAM,CAAgB;EAC9CC,SAAS,EAAGC,EAAW,KAAM;IAC3BC,KAAK,EAAE,MAAM;IACbC,OAAO,EAAEC,YAAK,CAACC,QAAQ,CAACC,EAAE;IAC1BC,eAAe,EAAEN,EAAE,aAAFA,EAAE,cAAFA,EAAE,GAAIG,YAAK,CAACI,MAAM,CAACC,IAAI,CAAC,GAAG,CAAC;IAC7CC,YAAY,EAAE;EAChB,CAAC,CAAC;EAEFC,MAAM,EAAE;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BC,QAAQ,EAAE,MAAM;IAChBC,YAAY,EAAEZ,YAAK,CAACa,OAAO,CAACC;EAC9B,CAAC;EAEDC,KAAK,EAAE;IACLjB,KAAK,EAAE,EAAE;IACTkB,MAAM,EAAE;EACV,CAAC;EAEDC,WAAW,EAAE;IACXC,SAAS,EAAElB,YAAK,CAACa,OAAO,CAAC,KAAK,CAAC;IAC/BD,YAAY,EAAEZ,YAAK,CAACa,OAAO,CAAC,KAAK;EACnC,CAAC;EAEDM,UAAU,EAAE;IACVC,KAAK,EAAEpB,YAAK,CAACI,MAAM,CAACiB,OAAO,CAAC,EAAE,CAAC;IAC/BC,UAAU,EAAEtB,YAAK,CAACuB,KAAK,CAACC,gBAAgB;IACxCC,QAAQ,EAAEzB,YAAK,CAAC0B,SAAS,CAACZ;EAC5B,CAAC;EACDa,UAAU,EAAE;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_theme","styles","exports","StyleSheet","create","container","bg","width","padding","theme","paddings","sm","backgroundColor","colors","gray","borderRadius","header","flexDirection","alignItems","justifyContent","flexWrap","marginBottom","margins","md","arrow","height","textSpacing","marginTop","buttonText","color","neutral","fontFamily","fonts","inter_medium_500","fontSize","fontSizes","textOption","black","inter_regular_400","marginLeft"],"sources":["style.ts"],"sourcesContent":["/**\n * IMPORTS\n */\n\nimport { StyleSheet } from \"react-native\";\n\n// typings\nimport { IStyles } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\nconst styles = StyleSheet.create<IStyles | any>({\n container: (bg?: string) => ({\n width: \"100%\",\n padding: theme.paddings.sm,\n backgroundColor: bg ?? theme.colors.gray[700],\n borderRadius: 16,\n }),\n\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n flexWrap: \"wrap\",\n marginBottom: theme.margins.md,\n },\n\n arrow: {\n width: 20,\n height: 20,\n },\n\n textSpacing: {\n marginTop: theme.margins[\"2xs\"],\n marginBottom: theme.margins[\"2xs\"],\n },\n\n buttonText: {\n color: theme.colors.neutral[25],\n fontFamily: theme.fonts.inter_medium_500,\n fontSize: theme.fontSizes.md,\n },\n textOption: {\n width: 200,\n color: theme.colors.black[25],\n fontFamily: theme.fonts.inter_regular_400,\n fontSize: 12,\n marginLeft: 4,\n }\n});\n\n/**\n * EXPORTS\n */\nexport { styles }\n"],"mappings":";;;;;;AAIA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,MAAA,GAAAD,OAAA;AAVA;AACA;AACA;;AAIA;;AAGA;;AAGA,MAAME,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAGE,uBAAU,CAACC,MAAM,CAAgB;EAC9CC,SAAS,EAAGC,EAAW,KAAM;IAC3BC,KAAK,EAAE,MAAM;IACbC,OAAO,EAAEC,YAAK,CAACC,QAAQ,CAACC,EAAE;IAC1BC,eAAe,EAAEN,EAAE,aAAFA,EAAE,cAAFA,EAAE,GAAIG,YAAK,CAACI,MAAM,CAACC,IAAI,CAAC,GAAG,CAAC;IAC7CC,YAAY,EAAE;EAChB,CAAC,CAAC;EAEFC,MAAM,EAAE;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BC,QAAQ,EAAE,MAAM;IAChBC,YAAY,EAAEZ,YAAK,CAACa,OAAO,CAACC;EAC9B,CAAC;EAEDC,KAAK,EAAE;IACLjB,KAAK,EAAE,EAAE;IACTkB,MAAM,EAAE;EACV,CAAC;EAEDC,WAAW,EAAE;IACXC,SAAS,EAAElB,YAAK,CAACa,OAAO,CAAC,KAAK,CAAC;IAC/BD,YAAY,EAAEZ,YAAK,CAACa,OAAO,CAAC,KAAK;EACnC,CAAC;EAEDM,UAAU,EAAE;IACVC,KAAK,EAAEpB,YAAK,CAACI,MAAM,CAACiB,OAAO,CAAC,EAAE,CAAC;IAC/BC,UAAU,EAAEtB,YAAK,CAACuB,KAAK,CAACC,gBAAgB;IACxCC,QAAQ,EAAEzB,YAAK,CAAC0B,SAAS,CAACZ;EAC5B,CAAC;EACDa,UAAU,EAAE;IACV7B,KAAK,EAAE,GAAG;IACVsB,KAAK,EAAEpB,YAAK,CAACI,MAAM,CAACwB,KAAK,CAAC,EAAE,CAAC;IAC7BN,UAAU,EAAEtB,YAAK,CAACuB,KAAK,CAACM,iBAAiB;IACzCJ,QAAQ,EAAE,EAAE;IACZK,UAAU,EAAE;EACd;AACF,CAAC,CAAC;;AAEF;AACA;AACA","ignoreList":[]}
|
|
@@ -8,8 +8,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _box = _interopRequireDefault(require("../box"));
|
|
10
10
|
var _typography = require("../typography");
|
|
11
|
-
var _theme = require("../../styles/theme/theme");
|
|
12
11
|
var _iconsSvg = require("../../common/icons-svg");
|
|
12
|
+
var _theme = require("../../styles/theme/theme");
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
/**
|
|
15
15
|
* IMPORTS
|
|
@@ -17,10 +17,10 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
17
17
|
|
|
18
18
|
// components
|
|
19
19
|
|
|
20
|
-
// styles
|
|
21
|
-
|
|
22
20
|
//typing
|
|
23
21
|
|
|
22
|
+
// styles
|
|
23
|
+
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
* Componente FilterDateSelector para a interação do usuário com ui.
|
|
@@ -30,7 +30,8 @@ const FilterDateSelector = ({
|
|
|
30
30
|
handleSelectedDay,
|
|
31
31
|
days,
|
|
32
32
|
isLoading,
|
|
33
|
-
testID
|
|
33
|
+
testID,
|
|
34
|
+
sort = "desc"
|
|
34
35
|
}) => {
|
|
35
36
|
const renderDayBlock = ({
|
|
36
37
|
item: day,
|
|
@@ -86,7 +87,7 @@ const FilterDateSelector = ({
|
|
|
86
87
|
const dataWithAllOption = [...daySorted];
|
|
87
88
|
return /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
88
89
|
horizontal: true,
|
|
89
|
-
data: dataWithAllOption,
|
|
90
|
+
data: sort === "desc" ? dataWithAllOption : days,
|
|
90
91
|
showsHorizontalScrollIndicator: false,
|
|
91
92
|
renderItem: renderDayBlock
|
|
92
93
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_box","_typography","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_box","_typography","_iconsSvg","_theme","e","__esModule","default","FilterDateSelector","selectedDay","handleSelectedDay","days","isLoading","testID","sort","renderDayBlock","item","day","index","isSelected","date","createElement","TouchableOpacity","disabled","key","activeOpacity","onPress","width","height","flexStyle","alignItems","justifyContent","backgroundColor","theme","colors","blue","gray","borderStyled","borderRadius","borderWidths","thick_large","borderColor","borderWidth","thin","marginStyle","marginRight","margins","marginTop","ActivityIndicator","size","color","Fragment","Icons","icon","neutral","Typography","text","toString","padStart","fontSizes","lg","fontFamily","fonts","inter_bold_700","dayName","slice","marginBottom","letterSpacing","daySorted","a","b","Date","fullDate","getTime","dataWithAllOption","FlatList","horizontal","data","showsHorizontalScrollIndicator","renderItem","exports"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React from \"react\";\nimport { TouchableOpacity, ActivityIndicator, FlatList } from \"react-native\";\n\n// components\nimport Box from \"../box\";\nimport { Typography } from \"../typography\";\n\nimport { Icons } from \"../../common/icons-svg\";\n\n//typing\nimport { IFilterDateSelector, ISelectedDay } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\n\n/**\n *\n * Componente FilterDateSelector para a interação do usuário com ui.\n */\nconst FilterDateSelector: React.FC<IFilterDateSelector> = ({\n selectedDay,\n handleSelectedDay,\n days,\n isLoading,\n testID,\n sort = \"desc\",\n}) => {\n const renderDayBlock = ({ item: day, index }: { item: ISelectedDay; index: number }) => {\n const isSelected = selectedDay && selectedDay.date === day.date;\n return (\n <TouchableOpacity\n disabled={isSelected}\n key={index}\n activeOpacity={0.7}\n onPress={() => handleSelectedDay(day)}\n >\n <Box\n testID={testID}\n width={65}\n height={75}\n flexStyle={{ alignItems: \"center\", justifyContent: \"center\" }}\n backgroundColor={isSelected ? theme.colors.blue[400] : theme.colors.gray[350]}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_large,\n borderColor: isSelected ? theme.colors.blue[400] : theme.colors.gray[350],\n borderWidth: theme.borderWidths.thin,\n }}\n marginStyle={{ marginRight: theme.margins[\"2xs\"], marginTop: theme.margins[\"2xs\"] }}\n >\n {isSelected && isLoading ? (\n <ActivityIndicator size=\"small\" color=\"white\" />\n ) : (\n <>\n {day.date === \"all\" ? (\n <Icons icon=\"REFRESH_CCW_DOT\" color={theme.colors.neutral[25]} />\n ) : (\n <>\n <Typography\n text={day.date === \"all\" ? \"\" : day.date.toString().padStart(2, \"0\")}\n size={theme.fontSizes.lg}\n color={theme.colors.neutral[25]}\n fontFamily={theme.fonts.inter_bold_700}\n />\n <Typography\n text={day.date === \"all\" ? \"Todos\" : day.dayName.slice(0, 3)}\n size={theme.fontSizes.lg}\n color={theme.colors.neutral[25]}\n fontFamily={theme.fonts.inter_bold_700}\n marginBottom={day.date === \"all\" ? theme.margins[\"3xl\"] : 0}\n letterSpacing=\"o_16\"\n />\n </>\n )}\n </>\n )}\n </Box>\n </TouchableOpacity>\n );\n };\n\n\n const daySorted = days.sort(\n (a, b) => new Date(b.fullDate).getTime() - new Date(a.fullDate).getTime()\n );\n\n // Adiciona a opção \"Todos\" no início da lista\n const dataWithAllOption = [...daySorted];\n\n return (\n <FlatList\n horizontal\n data={sort === \"desc\" ? dataWithAllOption : days}\n showsHorizontalScrollIndicator={false}\n renderItem={renderDayBlock}\n />\n );\n};\n\n/**\n * EXPORTS\n */\nexport { FilterDateSelector };\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,IAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,SAAA,GAAAJ,OAAA;AAMA,IAAAK,MAAA,GAAAL,OAAA;AAAiD,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAhBjD;AACA;AACA;;AAIA;;AAMA;;AAGA;;AAIA;AACA;AACA;AACA;AACA,MAAMG,kBAAiD,GAAGA,CAAC;EACzDC,WAAW;EACXC,iBAAiB;EACjBC,IAAI;EACJC,SAAS;EACTC,MAAM;EACNC,IAAI,GAAG;AACT,C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E5B,YAAK,CAAC6B,KAAK,CAACC,cAAe;MACvCG,YAAY,EAAEjD,GAAG,CAACG,IAAI,KAAK,KAAK,GAAGa,YAAK,CAACa,OAAO,CAAC,KAAK,CAAC,GAAG,CAAE;MAC5DqB,aAAa,EAAC;IAAM,CACrB,CACD,CAEJ,CAED,CACW,CAAC;EAEvB,CAAC;EAGD,MAAMC,SAAS,GAAGzD,IAAI,CAACG,IAAI,CACzB,CAACuD,CAAC,EAAEC,CAAC,KAAK,IAAIC,IAAI,CAACD,CAAC,CAACE,QAAQ,CAAC,CAACC,OAAO,CAAC,CAAC,GAAG,IAAIF,IAAI,CAACF,CAAC,CAACG,QAAQ,CAAC,CAACC,OAAO,CAAC,CAC1E,CAAC;;EAED;EACA,MAAMC,iBAAiB,GAAG,CAAC,GAAGN,SAAS,CAAC;EAExC,oBACEvE,MAAA,CAAAU,OAAA,CAAAc,aAAA,CAACrB,YAAA,CAAA2E,QAAQ;IACPC,UAAU;IACVC,IAAI,EAAE/D,IAAI,KAAK,MAAM,GAAG4D,iBAAiB,GAAG/D,IAAK;IACjDmE,8BAA8B,EAAE,KAAM;IACtCC,UAAU,EAAEhE;EAAe,CAC5B,CAAC;AAEN,CAAC;;AAED;AACA;AACA;AAFAiE,OAAA,CAAAxE,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/*\n * IMPORTS\n */\nimport { TouchableOpacityProps } from \"react-native\";\n\n/**\n * INTERFACE\n */\nimport { IGlobalCss } from \"../../styles/global/interface\";\n\ninterface ISelectedDay {\n date: string | number;\n dayName: string;\n fullDate: Date;\n}\n\ninterface IFilterDateSelector extends TouchableOpacityProps, IGlobalCss {\n /**\n * prop que mostra o dia selecionado\n */\n selectedDay: ISelectedDay;\n\n /**\n * função que seleciona a data\n */\n // eslint-disable-next-line no-unused-vars\n handleSelectedDay: (date: ISelectedDay) => {};\n\n /**\n * * Retorna as sete últimas datas dos dias\n */\n days: ISelectedDay[];\n\n /**\n * Retorna o loading do componente\n */\n isLoading: boolean;\n}\n\n/**\n * EXPORTS\n */\nexport type { IFilterDateSelector, ISelectedDay };\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/*\n * IMPORTS\n */\nimport { TouchableOpacityProps } from \"react-native\";\n\n/**\n * INTERFACE\n */\nimport { IGlobalCss } from \"../../styles/global/interface\";\n\ninterface ISelectedDay {\n date: string | number;\n dayName: string;\n fullDate: Date;\n}\n\ninterface IFilterDateSelector extends TouchableOpacityProps, IGlobalCss {\n /**\n * prop que mostra o dia selecionado\n */\n selectedDay: ISelectedDay;\n\n /**\n * função que seleciona a data\n */\n // eslint-disable-next-line no-unused-vars\n handleSelectedDay: (date: ISelectedDay) => {};\n\n /**\n * * Retorna as sete últimas datas dos dias\n */\n days: ISelectedDay[];\n\n /**\n * Retorna o loading do componente\n */\n isLoading: boolean;\n\n /**\n * Indica que a ordem da lista é alterada\n */\n sort?: \"asc\" | \"desc\";\n}\n\n/**\n * EXPORTS\n */\nexport type { IFilterDateSelector, ISelectedDay };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -41,6 +41,7 @@ const DocumentCargaInfo = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
41
41
|
ref: ref,
|
|
42
42
|
style: styles.container
|
|
43
43
|
}, rest), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
44
|
+
width: "100%",
|
|
44
45
|
flexStyle: {
|
|
45
46
|
flexDirection: "row",
|
|
46
47
|
alignItems: "center"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","TouchableOpacity","Text","View","Linking","Box","Typography","asBaseComponent","styles","theme","DocumentCargaInfo","props","ref","title","numberDocument","linkDocument","isAlert","errorMessage","rest","handleOpenPdf","url","openURL","error","console","log","createElement","_extends","style","container","Fragment","flexStyle","flexDirection","alignItems","text","size","fontSizes","sm","fontFamily","fonts","inter_regular_400","color","colors","black","marginBottom","margins","md","textOption","fontWeight","justifyContent","inter_bold","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","TouchableOpacity","Text","View","Linking","Box","Typography","asBaseComponent","styles","theme","DocumentCargaInfo","props","ref","title","numberDocument","linkDocument","isAlert","errorMessage","rest","handleOpenPdf","url","openURL","error","console","log","createElement","_extends","style","container","Fragment","width","flexStyle","flexDirection","alignItems","text","size","fontSizes","sm","fontFamily","fonts","inter_regular_400","color","colors","black","marginBottom","margins","md","textOption","fontWeight","justifyContent","inter_bold","red","lineHeight","button","backgroundColor","blue","activeOpacity","disabled","onPress","neutral","displayName"],"sources":["index.tsx"],"sourcesContent":["/* eslint-disable no-undef */\n/**\n * IMPORTS\n */\nimport React, { forwardRef } from \"react\";\nimport {\n TouchableOpacity,\n Text,\n View,\n Linking,\n} from \"react-native\";\n\n// components\nimport Box from \"../box\";\nimport { Typography } from \"../typography\";\n\n// typings\nimport { IDocumentCargaInfo } from \"./interface\";\nimport { asBaseComponent } from \"../../@types/as-base-component\";\n\n// styles\nimport { styles } from \"./styles\";\nimport { theme } from \"../../styles/theme/theme\";\n\n/**\n * Componente DocumentCargaInfo para interação do usuário com UI.\n */\nconst DocumentCargaInfo = forwardRef<View, IDocumentCargaInfo>(\n (props, ref): React.ReactElement => {\n const {\n title,\n numberDocument,\n linkDocument,\n isAlert,\n errorMessage,\n ...rest\n } = props;\n\n const handleOpenPdf = async (url: string): Promise<void> => {\n try {\n await Linking.openURL(url);\n } catch (error) {\n console.log(\"Erro ao abrir PDF\", error);\n }\n };\n\n return (\n <Box ref={ref} style={styles.container} {...rest}>\n <>\n {/* Título / Documento */}\n <Box width={\"100%\"} flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}>\n <Typography\n text={title ?? \"Selecione o Apolo disponível\"}\n size={theme.fontSizes.sm}\n fontFamily={theme.fonts.inter_regular_400}\n color={theme.colors.black[100]}\n marginBottom={isAlert ? 0 : theme.margins.md}\n />\n\n <Text\n style={[\n styles.textOption,\n\n {\n marginBottom: isAlert ? 0 : theme.margins.md,\n fontWeight: \"bold\",\n },\n ]}\n >\n #{numberDocument}\n </Text>\n </Box>\n\n {/* Alerta */}\n {isAlert && (\n <View\n style={{\n flexDirection: \"row\",\n alignItems: \"flex-start\",\n justifyContent: \"flex-start\",\n marginBottom: 16,\n }}\n >\n <Typography\n text=\"Atenção:\"\n size={theme.fontSizes.sm}\n fontFamily={theme.fonts.inter_bold}\n color={theme.colors.black[100]}\n />\n\n <Text\n style={[\n styles.textOption,\n {\n width: 250,\n color: theme.colors.red[900],\n lineHeight: 20,\n },\n ]}\n >\n {errorMessage ?? \"N/A\"}\n </Text>\n </View>\n )}\n\n {/* Botão */}\n <TouchableOpacity\n style={[\n styles.button,\n {\n backgroundColor: isAlert\n ? \"#8E949A\"\n : theme.colors.blue[500],\n },\n ]}\n activeOpacity={0.7}\n disabled={isAlert}\n onPress={() => handleOpenPdf(linkDocument!)}\n >\n <Typography\n text=\"Abrir documento\"\n color={theme.colors.neutral[25]}\n fontFamily={theme.fonts.inter_bold}\n size={16}\n />\n </TouchableOpacity>\n </>\n </Box>\n );\n }\n);\n\nDocumentCargaInfo.displayName = \"DocumentCargaInfo\";\n\n/**\n * EXPORTS\n */\nexport default asBaseComponent(DocumentCargaInfo);\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SACEC,gBAAgB,EAChBC,IAAI,EACJC,IAAI,EACJC,OAAO,QACF,cAAc;;AAErB;AACA,OAAOC,GAAG,MAAM,QAAQ;AACxB,SAASC,UAAU,QAAQ,eAAe;;AAE1C;;AAEA,SAASC,eAAe,QAAQ,gCAAgC;;AAEhE;AACA,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,KAAK,QAAQ,0BAA0B;;AAEhD;AACA;AACA;AACA,MAAMC,iBAAiB,gBAAGV,U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;IACtBO,KAAK,EAAEhC,KAAK,CAACiC,MAAM,CAACiB,OAAO,CAAC,EAAE,CAAE;IAChCrB,UAAU,EAAE7B,KAAK,CAAC8B,KAAK,CAACW,UAAW;IACnCf,IAAI,EAAE;EAAG,CACV,CACe,CAClB,CACC,CAAC;AAEV,CACF,CAAC;AAEDzB,iBAAiB,CAACkD,WAAW,GAAG,mBAAmB;;AAEnD;AACA;AACA;AACA,eAAerD,eAAe,CAACG,iBAAiB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","theme","styles","create","container","width","padding","paddings","sm","backgroundColor","borderRadius","header","flexDirection","alignItems","justifyContent","marginBottom","margins","md","left","alert","color","marginTop","fontSize","button","height","arrow","textOption","colors","black","fontFamily","fonts","inter_regular_400","marginLeft"],"sources":["styles.ts"],"sourcesContent":["/**\n * IMPORTS\n */\n\nimport { StyleSheet } from \"react-native\";\n\n// theme\nimport { theme } from \"../../styles/theme/theme\";\n\n// styles\n\nconst styles = StyleSheet.create({\n container: {\n width: \"100%\",\n padding: theme.paddings.sm,\n backgroundColor: \"#EAEAEA\",\n borderRadius: 12,\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n marginBottom: theme.margins.md,\n },\n\n left: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n\n alert: {\n color: \"#D32F2F\",\n marginTop: 8,\n marginBottom: 12,\n fontSize: 13,\n },\n\n button: {\n width: \"100%\",\n height: 45,\n backgroundColor: \"#8E949A\",\n borderRadius: 8,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n arrow: {\n width: 20,\n height: 20,\n },\n textOption: {\n color: theme.colors.black[25],\n fontFamily: theme.fonts.inter_regular_400,\n fontSize: 12,\n marginLeft: 8,\n marginTop: 2,\n }\n\n})\n\n\n\n/**\n * EXPORTS\n */\nexport { styles }\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,cAAc;;AAEzC;AACA,SAASC,KAAK,QAAQ,0BAA0B;;AAEhD;;AAEA,MAAMC,MAAM,GAAGF,UAAU,CAACG,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,KAAK,EAAE,MAAM;IACbC,OAAO,EAAEL,KAAK,CAACM,QAAQ,CAACC,EAAE;IAC1BC,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE;EAChB,CAAC;EACDC,MAAM,EAAE;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BC,YAAY,EAAEd,KAAK,CAACe,OAAO,CAACC;EAC9B,CAAC;EAEDC,IAAI,EAAE;IACJN,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EAEDM,KAAK,EAAE;IACLC,KAAK,EAAE,SAAS;IAChBC,SAAS,EAAE,CAAC;IACZN,YAAY,EAAE,EAAE;IAChBO,QAAQ,EAAE;EACZ,CAAC;EAEDC,MAAM,EAAE;IACNlB,KAAK,EAAE,MAAM;IACbmB,MAAM,EAAE,EAAE;IACVf,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE,CAAC;IACfG,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDW,KAAK,EAAE;IACLpB,KAAK,EAAE,EAAE;IACTmB,MAAM,EAAE;EACV,CAAC;EACDE,UAAU,EAAE;
|
|
1
|
+
{"version":3,"names":["StyleSheet","theme","styles","create","container","width","padding","paddings","sm","backgroundColor","borderRadius","header","flexDirection","alignItems","justifyContent","marginBottom","margins","md","left","alert","color","marginTop","fontSize","button","height","arrow","textOption","colors","black","fontFamily","fonts","inter_regular_400","marginLeft"],"sources":["styles.ts"],"sourcesContent":["/**\n * IMPORTS\n */\n\nimport { StyleSheet } from \"react-native\";\n\n// theme\nimport { theme } from \"../../styles/theme/theme\";\n\n// styles\n\nconst styles = StyleSheet.create({\n container: {\n width: \"100%\",\n padding: theme.paddings.sm,\n backgroundColor: \"#EAEAEA\",\n borderRadius: 12,\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n marginBottom: theme.margins.md,\n },\n\n left: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n\n alert: {\n color: \"#D32F2F\",\n marginTop: 8,\n marginBottom: 12,\n fontSize: 13,\n },\n\n button: {\n width: \"100%\",\n height: 45,\n backgroundColor: \"#8E949A\",\n borderRadius: 8,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n arrow: {\n width: 20,\n height: 20,\n },\n textOption: {\n width: 100,\n color: theme.colors.black[25],\n fontFamily: theme.fonts.inter_regular_400,\n fontSize: 12,\n marginLeft: 8,\n marginTop: 2,\n }\n\n})\n\n\n\n/**\n * EXPORTS\n */\nexport { styles }\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,cAAc;;AAEzC;AACA,SAASC,KAAK,QAAQ,0BAA0B;;AAEhD;;AAEA,MAAMC,MAAM,GAAGF,UAAU,CAACG,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,KAAK,EAAE,MAAM;IACbC,OAAO,EAAEL,KAAK,CAACM,QAAQ,CAACC,EAAE;IAC1BC,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE;EAChB,CAAC;EACDC,MAAM,EAAE;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BC,YAAY,EAAEd,KAAK,CAACe,OAAO,CAACC;EAC9B,CAAC;EAEDC,IAAI,EAAE;IACJN,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EAEDM,KAAK,EAAE;IACLC,KAAK,EAAE,SAAS;IAChBC,SAAS,EAAE,CAAC;IACZN,YAAY,EAAE,EAAE;IAChBO,QAAQ,EAAE;EACZ,CAAC;EAEDC,MAAM,EAAE;IACNlB,KAAK,EAAE,MAAM;IACbmB,MAAM,EAAE,EAAE;IACVf,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE,CAAC;IACfG,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDW,KAAK,EAAE;IACLpB,KAAK,EAAE,EAAE;IACTmB,MAAM,EAAE;EACV,CAAC;EACDE,UAAU,EAAE;IACVrB,KAAK,EAAE,GAAG;IACVe,KAAK,EAAEnB,KAAK,CAAC0B,MAAM,CAACC,KAAK,CAAC,EAAE,CAAC;IAC7BC,UAAU,EAAE5B,KAAK,CAAC6B,KAAK,CAACC,iBAAiB;IACzCT,QAAQ,EAAE,EAAE;IACZU,UAAU,EAAE,CAAC;IACbX,SAAS,EAAE;EACb;AAEF,CAAC,CAAC;;AAIF;AACA;AACA;AACA,SAASnB,MAAM","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","theme","styles","create","container","bg","width","padding","paddings","sm","backgroundColor","colors","gray","borderRadius","header","flexDirection","alignItems","justifyContent","flexWrap","marginBottom","margins","md","arrow","height","textSpacing","marginTop","buttonText","color","neutral","fontFamily","fonts","inter_medium_500","fontSize","fontSizes","textOption","black","inter_regular_400","marginLeft"],"sources":["style.ts"],"sourcesContent":["/**\n * IMPORTS\n */\n\nimport { StyleSheet } from \"react-native\";\n\n// typings\nimport { IStyles } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\nconst styles = StyleSheet.create<IStyles | any>({\n container: (bg?: string) => ({\n width: \"100%\",\n padding: theme.paddings.sm,\n backgroundColor: bg ?? theme.colors.gray[700],\n borderRadius: 16,\n }),\n\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n flexWrap: \"wrap\",\n marginBottom: theme.margins.md,\n },\n\n arrow: {\n width: 20,\n height: 20,\n },\n\n textSpacing: {\n marginTop: theme.margins[\"2xs\"],\n marginBottom: theme.margins[\"2xs\"],\n },\n\n buttonText: {\n color: theme.colors.neutral[25],\n fontFamily: theme.fonts.inter_medium_500,\n fontSize: theme.fontSizes.md,\n },\n textOption: {\n color: theme.colors.black[25],\n fontFamily: theme.fonts.inter_regular_400,\n fontSize: 12,\n marginLeft: 4,\n }\n});\n\n/**\n * EXPORTS\n */\nexport { styles}\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,cAAc;;AAEzC;;AAGA;AACA,SAASC,KAAK,QAAQ,0BAA0B;AAEhD,MAAMC,MAAM,GAAGF,UAAU,CAACG,MAAM,CAAgB;EAC9CC,SAAS,EAAGC,EAAW,KAAM;IAC3BC,KAAK,EAAE,MAAM;IACbC,OAAO,EAAEN,KAAK,CAACO,QAAQ,CAACC,EAAE;IAC1BC,eAAe,EAAEL,EAAE,aAAFA,EAAE,cAAFA,EAAE,GAAIJ,KAAK,CAACU,MAAM,CAACC,IAAI,CAAC,GAAG,CAAC;IAC7CC,YAAY,EAAE;EAChB,CAAC,CAAC;EAEFC,MAAM,EAAE;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BC,QAAQ,EAAE,MAAM;IAChBC,YAAY,EAAElB,KAAK,CAACmB,OAAO,CAACC;EAC9B,CAAC;EAEDC,KAAK,EAAE;IACLhB,KAAK,EAAE,EAAE;IACTiB,MAAM,EAAE;EACV,CAAC;EAEDC,WAAW,EAAE;IACXC,SAAS,EAAExB,KAAK,CAACmB,OAAO,CAAC,KAAK,CAAC;IAC/BD,YAAY,EAAElB,KAAK,CAACmB,OAAO,CAAC,KAAK;EACnC,CAAC;EAEDM,UAAU,EAAE;IACVC,KAAK,EAAE1B,KAAK,CAACU,MAAM,CAACiB,OAAO,CAAC,EAAE,CAAC;IAC/BC,UAAU,EAAE5B,KAAK,CAAC6B,KAAK,CAACC,gBAAgB;IACxCC,QAAQ,EAAE/B,KAAK,CAACgC,SAAS,CAACZ;EAC5B,CAAC;EACDa,UAAU,EAAE;
|
|
1
|
+
{"version":3,"names":["StyleSheet","theme","styles","create","container","bg","width","padding","paddings","sm","backgroundColor","colors","gray","borderRadius","header","flexDirection","alignItems","justifyContent","flexWrap","marginBottom","margins","md","arrow","height","textSpacing","marginTop","buttonText","color","neutral","fontFamily","fonts","inter_medium_500","fontSize","fontSizes","textOption","black","inter_regular_400","marginLeft"],"sources":["style.ts"],"sourcesContent":["/**\n * IMPORTS\n */\n\nimport { StyleSheet } from \"react-native\";\n\n// typings\nimport { IStyles } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\nconst styles = StyleSheet.create<IStyles | any>({\n container: (bg?: string) => ({\n width: \"100%\",\n padding: theme.paddings.sm,\n backgroundColor: bg ?? theme.colors.gray[700],\n borderRadius: 16,\n }),\n\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n flexWrap: \"wrap\",\n marginBottom: theme.margins.md,\n },\n\n arrow: {\n width: 20,\n height: 20,\n },\n\n textSpacing: {\n marginTop: theme.margins[\"2xs\"],\n marginBottom: theme.margins[\"2xs\"],\n },\n\n buttonText: {\n color: theme.colors.neutral[25],\n fontFamily: theme.fonts.inter_medium_500,\n fontSize: theme.fontSizes.md,\n },\n textOption: {\n width: 200,\n color: theme.colors.black[25],\n fontFamily: theme.fonts.inter_regular_400,\n fontSize: 12,\n marginLeft: 4,\n }\n});\n\n/**\n * EXPORTS\n */\nexport { styles }\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,cAAc;;AAEzC;;AAGA;AACA,SAASC,KAAK,QAAQ,0BAA0B;AAEhD,MAAMC,MAAM,GAAGF,UAAU,CAACG,MAAM,CAAgB;EAC9CC,SAAS,EAAGC,EAAW,KAAM;IAC3BC,KAAK,EAAE,MAAM;IACbC,OAAO,EAAEN,KAAK,CAACO,QAAQ,CAACC,EAAE;IAC1BC,eAAe,EAAEL,EAAE,aAAFA,EAAE,cAAFA,EAAE,GAAIJ,KAAK,CAACU,MAAM,CAACC,IAAI,CAAC,GAAG,CAAC;IAC7CC,YAAY,EAAE;EAChB,CAAC,CAAC;EAEFC,MAAM,EAAE;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BC,QAAQ,EAAE,MAAM;IAChBC,YAAY,EAAElB,KAAK,CAACmB,OAAO,CAACC;EAC9B,CAAC;EAEDC,KAAK,EAAE;IACLhB,KAAK,EAAE,EAAE;IACTiB,MAAM,EAAE;EACV,CAAC;EAEDC,WAAW,EAAE;IACXC,SAAS,EAAExB,KAAK,CAACmB,OAAO,CAAC,KAAK,CAAC;IAC/BD,YAAY,EAAElB,KAAK,CAACmB,OAAO,CAAC,KAAK;EACnC,CAAC;EAEDM,UAAU,EAAE;IACVC,KAAK,EAAE1B,KAAK,CAACU,MAAM,CAACiB,OAAO,CAAC,EAAE,CAAC;IAC/BC,UAAU,EAAE5B,KAAK,CAAC6B,KAAK,CAACC,gBAAgB;IACxCC,QAAQ,EAAE/B,KAAK,CAACgC,SAAS,CAACZ;EAC5B,CAAC;EACDa,UAAU,EAAE;IACV5B,KAAK,EAAE,GAAG;IACVqB,KAAK,EAAE1B,KAAK,CAACU,MAAM,CAACwB,KAAK,CAAC,EAAE,CAAC;IAC7BN,UAAU,EAAE5B,KAAK,CAAC6B,KAAK,CAACM,iBAAiB;IACzCJ,QAAQ,EAAE,EAAE;IACZK,UAAU,EAAE;EACd;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA,SAASnC,MAAM","ignoreList":[]}
|
|
@@ -7,13 +7,12 @@ import { TouchableOpacity, ActivityIndicator, FlatList } from "react-native";
|
|
|
7
7
|
// components
|
|
8
8
|
import Box from "../box";
|
|
9
9
|
import { Typography } from "../typography";
|
|
10
|
-
|
|
11
|
-
// styles
|
|
12
|
-
import { theme } from "../../styles/theme/theme";
|
|
10
|
+
import { Icons } from "../../common/icons-svg";
|
|
13
11
|
|
|
14
12
|
//typing
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
// styles
|
|
15
|
+
import { theme } from "../../styles/theme/theme";
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
*
|
|
@@ -24,7 +23,8 @@ const FilterDateSelector = ({
|
|
|
24
23
|
handleSelectedDay,
|
|
25
24
|
days,
|
|
26
25
|
isLoading,
|
|
27
|
-
testID
|
|
26
|
+
testID,
|
|
27
|
+
sort = "desc"
|
|
28
28
|
}) => {
|
|
29
29
|
const renderDayBlock = ({
|
|
30
30
|
item: day,
|
|
@@ -80,7 +80,7 @@ const FilterDateSelector = ({
|
|
|
80
80
|
const dataWithAllOption = [...daySorted];
|
|
81
81
|
return /*#__PURE__*/React.createElement(FlatList, {
|
|
82
82
|
horizontal: true,
|
|
83
|
-
data: dataWithAllOption,
|
|
83
|
+
data: sort === "desc" ? dataWithAllOption : days,
|
|
84
84
|
showsHorizontalScrollIndicator: false,
|
|
85
85
|
renderItem: renderDayBlock
|
|
86
86
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","TouchableOpacity","ActivityIndicator","FlatList","Box","Typography","
|
|
1
|
+
{"version":3,"names":["React","TouchableOpacity","ActivityIndicator","FlatList","Box","Typography","Icons","theme","FilterDateSelector","selectedDay","handleSelectedDay","days","isLoading","testID","sort","renderDayBlock","item","day","index","isSelected","date","createElement","disabled","key","activeOpacity","onPress","width","height","flexStyle","alignItems","justifyContent","backgroundColor","colors","blue","gray","borderStyled","borderRadius","borderWidths","thick_large","borderColor","borderWidth","thin","marginStyle","marginRight","margins","marginTop","size","color","Fragment","icon","neutral","text","toString","padStart","fontSizes","lg","fontFamily","fonts","inter_bold_700","dayName","slice","marginBottom","letterSpacing","daySorted","a","b","Date","fullDate","getTime","dataWithAllOption","horizontal","data","showsHorizontalScrollIndicator","renderItem"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React from \"react\";\nimport { TouchableOpacity, ActivityIndicator, FlatList } from \"react-native\";\n\n// components\nimport Box from \"../box\";\nimport { Typography } from \"../typography\";\n\nimport { Icons } from \"../../common/icons-svg\";\n\n//typing\nimport { IFilterDateSelector, ISelectedDay } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\n\n/**\n *\n * Componente FilterDateSelector para a interação do usuário com ui.\n */\nconst FilterDateSelector: React.FC<IFilterDateSelector> = ({\n selectedDay,\n handleSelectedDay,\n days,\n isLoading,\n testID,\n sort = \"desc\",\n}) => {\n const renderDayBlock = ({ item: day, index }: { item: ISelectedDay; index: number }) => {\n const isSelected = selectedDay && selectedDay.date === day.date;\n return (\n <TouchableOpacity\n disabled={isSelected}\n key={index}\n activeOpacity={0.7}\n onPress={() => handleSelectedDay(day)}\n >\n <Box\n testID={testID}\n width={65}\n height={75}\n flexStyle={{ alignItems: \"center\", justifyContent: \"center\" }}\n backgroundColor={isSelected ? theme.colors.blue[400] : theme.colors.gray[350]}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_large,\n borderColor: isSelected ? theme.colors.blue[400] : theme.colors.gray[350],\n borderWidth: theme.borderWidths.thin,\n }}\n marginStyle={{ marginRight: theme.margins[\"2xs\"], marginTop: theme.margins[\"2xs\"] }}\n >\n {isSelected && isLoading ? (\n <ActivityIndicator size=\"small\" color=\"white\" />\n ) : (\n <>\n {day.date === \"all\" ? (\n <Icons icon=\"REFRESH_CCW_DOT\" color={theme.colors.neutral[25]} />\n ) : (\n <>\n <Typography\n text={day.date === \"all\" ? \"\" : day.date.toString().padStart(2, \"0\")}\n size={theme.fontSizes.lg}\n color={theme.colors.neutral[25]}\n fontFamily={theme.fonts.inter_bold_700}\n />\n <Typography\n text={day.date === \"all\" ? \"Todos\" : day.dayName.slice(0, 3)}\n size={theme.fontSizes.lg}\n color={theme.colors.neutral[25]}\n fontFamily={theme.fonts.inter_bold_700}\n marginBottom={day.date === \"all\" ? theme.margins[\"3xl\"] : 0}\n letterSpacing=\"o_16\"\n />\n </>\n )}\n </>\n )}\n </Box>\n </TouchableOpacity>\n );\n };\n\n\n const daySorted = days.sort(\n (a, b) => new Date(b.fullDate).getTime() - new Date(a.fullDate).getTime()\n );\n\n // Adiciona a opção \"Todos\" no início da lista\n const dataWithAllOption = [...daySorted];\n\n return (\n <FlatList\n horizontal\n data={sort === \"desc\" ? dataWithAllOption : days}\n showsHorizontalScrollIndicator={false}\n renderItem={renderDayBlock}\n />\n );\n};\n\n/**\n * EXPORTS\n */\nexport { FilterDateSelector };\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,EAAEC,iBAAiB,EAAEC,QAAQ,QAAQ,cAAc;;AAE5E;AACA,OAAOC,GAAG,MAAM,QAAQ;AACxB,SAASC,UAAU,QAAQ,eAAe;AAE1C,SAASC,KAAK,QAAQ,wBAAwB;;AAE9C;;AAGA;AACA,SAASC,KAAK,QAAQ,0BAA0B;;AAGhD;AACA;AACA;AACA;AACA,MAAMC,kBAAiD,GAAGA,CAAC;EACzDC,WAAW;EACXC,iBAAiB;EACjBC,IAAI;EACJC,SAAS;EACTC,MAAM;EACNC,IAAI,GAAG;AACT,CAAC,KAAK;EACJ,MAAMC,cAAc,GAAGA,CAAC;IAAEC,IAAI,EAAEC,GAAG;IAAEC;EAA6C,CAAC,KAAK;IACtF,MAAMC,UAAU,GAAGV,WAAW,IAAIA,WAAW,CAACW,IAAI,KAAKH,GAAG,CAACG,IAAI;IAC/D,oBACEpB,KAAA,CAAAqB,aAAA,CAACpB,gBAAgB;MACfqB,QAAQ,EAAEH,UAAW;MACrBI,GAAG,EAAEL,KAAM;MACXM,aAAa,EAAE,GAAI;MACnBC,OAAO,EAAEA,CAAA,KAAMf,iBAAiB,CAACO,GAAG;IAAE,gBAEtCjB,KAAA,CAAAqB,aAAA,CAACjB,GAAG;MACFS,MAAM,EAAEA,MAAO;MACfa,KAAK,EAAE,EAAG;MACVC,MAAM,EAAE,EAAG;MACXC,SAAS,EAAE;QAAEC,UAAU,EAAE,QAAQ;QAAEC,cA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AAED;AACA;AACA;AACA,SAASP,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/*\n * IMPORTS\n */\nimport { TouchableOpacityProps } from \"react-native\";\n\n/**\n * INTERFACE\n */\nimport { IGlobalCss } from \"../../styles/global/interface\";\n\ninterface ISelectedDay {\n date: string | number;\n dayName: string;\n fullDate: Date;\n}\n\ninterface IFilterDateSelector extends TouchableOpacityProps, IGlobalCss {\n /**\n * prop que mostra o dia selecionado\n */\n selectedDay: ISelectedDay;\n\n /**\n * função que seleciona a data\n */\n // eslint-disable-next-line no-unused-vars\n handleSelectedDay: (date: ISelectedDay) => {};\n\n /**\n * * Retorna as sete últimas datas dos dias\n */\n days: ISelectedDay[];\n\n /**\n * Retorna o loading do componente\n */\n isLoading: boolean;\n}\n\n/**\n * EXPORTS\n */\nexport type { IFilterDateSelector, ISelectedDay };\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/*\n * IMPORTS\n */\nimport { TouchableOpacityProps } from \"react-native\";\n\n/**\n * INTERFACE\n */\nimport { IGlobalCss } from \"../../styles/global/interface\";\n\ninterface ISelectedDay {\n date: string | number;\n dayName: string;\n fullDate: Date;\n}\n\ninterface IFilterDateSelector extends TouchableOpacityProps, IGlobalCss {\n /**\n * prop que mostra o dia selecionado\n */\n selectedDay: ISelectedDay;\n\n /**\n * função que seleciona a data\n */\n // eslint-disable-next-line no-unused-vars\n handleSelectedDay: (date: ISelectedDay) => {};\n\n /**\n * * Retorna as sete últimas datas dos dias\n */\n days: ISelectedDay[];\n\n /**\n * Retorna o loading do componente\n */\n isLoading: boolean;\n\n /**\n * Indica que a ordem da lista é alterada\n */\n sort?: \"asc\" | \"desc\";\n}\n\n/**\n * EXPORTS\n */\nexport type { IFilterDateSelector, ISelectedDay };\n"],"mappings":"","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ const DocumentCargaInfo = forwardRef<View, IDocumentCargaInfo>(
|
|
|
48
48
|
<Box ref={ref} style={styles.container} {...rest}>
|
|
49
49
|
<>
|
|
50
50
|
{/* Título / Documento */}
|
|
51
|
-
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
51
|
+
<Box width={"100%"} flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
52
52
|
<Typography
|
|
53
53
|
text={title ?? "Selecione o Apolo disponível"}
|
|
54
54
|
size={theme.fontSizes.sm}
|
|
@@ -60,6 +60,7 @@ const DocumentCargaInfo = forwardRef<View, IDocumentCargaInfo>(
|
|
|
60
60
|
<Text
|
|
61
61
|
style={[
|
|
62
62
|
styles.textOption,
|
|
63
|
+
|
|
63
64
|
{
|
|
64
65
|
marginBottom: isAlert ? 0 : theme.margins.md,
|
|
65
66
|
fontWeight: "bold",
|
|
@@ -42,6 +42,7 @@ const styles = StyleSheet.create<IStyles | any>({
|
|
|
42
42
|
fontSize: theme.fontSizes.md,
|
|
43
43
|
},
|
|
44
44
|
textOption: {
|
|
45
|
+
width: 200,
|
|
45
46
|
color: theme.colors.black[25],
|
|
46
47
|
fontFamily: theme.fonts.inter_regular_400,
|
|
47
48
|
fontSize: 12,
|
|
@@ -52,4 +53,4 @@ const styles = StyleSheet.create<IStyles | any>({
|
|
|
52
53
|
/**
|
|
53
54
|
* EXPORTS
|
|
54
55
|
*/
|
|
55
|
-
export { styles}
|
|
56
|
+
export { styles }
|
|
@@ -8,12 +8,14 @@ import { TouchableOpacity, ActivityIndicator, FlatList } from "react-native";
|
|
|
8
8
|
import Box from "../box";
|
|
9
9
|
import { Typography } from "../typography";
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
import { theme } from "../../styles/theme/theme";
|
|
11
|
+
import { Icons } from "../../common/icons-svg";
|
|
13
12
|
|
|
14
13
|
//typing
|
|
15
14
|
import { IFilterDateSelector, ISelectedDay } from "./interface";
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
// styles
|
|
17
|
+
import { theme } from "../../styles/theme/theme";
|
|
18
|
+
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
*
|
|
@@ -25,6 +27,7 @@ const FilterDateSelector: React.FC<IFilterDateSelector> = ({
|
|
|
25
27
|
days,
|
|
26
28
|
isLoading,
|
|
27
29
|
testID,
|
|
30
|
+
sort = "desc",
|
|
28
31
|
}) => {
|
|
29
32
|
const renderDayBlock = ({ item: day, index }: { item: ISelectedDay; index: number }) => {
|
|
30
33
|
const isSelected = selectedDay && selectedDay.date === day.date;
|
|
@@ -78,6 +81,8 @@ const FilterDateSelector: React.FC<IFilterDateSelector> = ({
|
|
|
78
81
|
</TouchableOpacity>
|
|
79
82
|
);
|
|
80
83
|
};
|
|
84
|
+
|
|
85
|
+
|
|
81
86
|
const daySorted = days.sort(
|
|
82
87
|
(a, b) => new Date(b.fullDate).getTime() - new Date(a.fullDate).getTime()
|
|
83
88
|
);
|
|
@@ -88,7 +93,7 @@ const FilterDateSelector: React.FC<IFilterDateSelector> = ({
|
|
|
88
93
|
return (
|
|
89
94
|
<FlatList
|
|
90
95
|
horizontal
|
|
91
|
-
data={dataWithAllOption}
|
|
96
|
+
data={sort === "desc" ? dataWithAllOption : days}
|
|
92
97
|
showsHorizontalScrollIndicator={false}
|
|
93
98
|
renderItem={renderDayBlock}
|
|
94
99
|
/>
|