react-native-exp-fig 0.1.37 → 0.1.39
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/modal-create-activitie/index.js +13 -11
- package/lib/commonjs/components/modal-create-activitie/index.js.map +1 -1
- package/lib/commonjs/components/modal-create-activitie/interface.js.map +1 -1
- package/lib/commonjs/components/modal-journey-rectification/index.js +10 -10
- package/lib/commonjs/components/modal-journey-rectification/index.js.map +1 -1
- package/lib/commonjs/components/modals/modal-activities/data-activities/index.js +25 -1
- package/lib/commonjs/components/modals/modal-activities/data-activities/index.js.map +1 -1
- package/lib/commonjs/components/modals/modal-activity-reason/index.js +6 -5
- package/lib/commonjs/components/modals/modal-activity-reason/index.js.map +1 -1
- package/lib/commonjs/components/modals/modal-activity-reason/interface.d.js.map +1 -1
- package/lib/commonjs/components/modals/modal-change-activity/index.js.map +1 -1
- package/lib/commonjs/components/selects/select-option/index.js +4 -4
- package/lib/commonjs/components/selects/select-option/index.js.map +1 -1
- package/lib/commonjs/components/selects/select-option/interface.d.js.map +1 -1
- package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js +8 -8
- package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -1
- package/lib/commonjs/stories/modal-create-activitie/modal-create-activitie.stories.js +5 -1
- package/lib/commonjs/stories/modal-create-activitie/modal-create-activitie.stories.js.map +1 -1
- package/lib/module/components/modal-create-activitie/index.js +13 -11
- package/lib/module/components/modal-create-activitie/index.js.map +1 -1
- package/lib/module/components/modal-create-activitie/interface.js.map +1 -1
- package/lib/module/components/modal-journey-rectification/index.js +10 -10
- package/lib/module/components/modal-journey-rectification/index.js.map +1 -1
- package/lib/module/components/modals/modal-activities/data-activities/index.js +24 -0
- package/lib/module/components/modals/modal-activities/data-activities/index.js.map +1 -1
- package/lib/module/components/modals/modal-activity-reason/index.js +6 -5
- package/lib/module/components/modals/modal-activity-reason/index.js.map +1 -1
- package/lib/module/components/modals/modal-activity-reason/interface.d.js.map +1 -1
- package/lib/module/components/modals/modal-change-activity/index.js.map +1 -1
- package/lib/module/components/selects/select-option/index.js +4 -4
- package/lib/module/components/selects/select-option/index.js.map +1 -1
- package/lib/module/components/selects/select-option/interface.d.js.map +1 -1
- package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js +8 -8
- package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -1
- package/lib/module/stories/modal-create-activitie/modal-create-activitie.stories.js +5 -1
- package/lib/module/stories/modal-create-activitie/modal-create-activitie.stories.js.map +1 -1
- package/lib/typescript/src/components/modals/modal-activities/data-activities/index.d.ts +7 -0
- package/package.json +4 -8
- package/src/components/modal-create-activitie/index.tsx +215 -211
- package/src/components/modal-create-activitie/interface.ts +22 -22
- package/src/components/modal-journey-rectification/index.tsx +213 -211
- package/src/components/modals/modal-activities/data-activities/index.ts +31 -0
- package/src/components/modals/modal-activity-reason/index.tsx +163 -162
- package/src/components/modals/modal-activity-reason/interface.d.ts +10 -10
- package/src/components/modals/modal-change-activity/index.tsx +1 -1
- package/src/components/selects/select-option/index.tsx +124 -124
- package/src/components/selects/select-option/interface.d.ts +18 -18
- package/src/stories/modal-activity-reason/modal-activity-reason.stories.tsx +192 -192
- package/src/stories/modal-create-activitie/modal-create-activitie.stories.tsx +4 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
3
|
*/
|
|
4
4
|
import React, { useState } from "react";
|
|
5
5
|
import { Modal, View } from "react-native";
|
|
@@ -25,6 +25,7 @@ const ModalActivityReason = ({
|
|
|
25
25
|
testID
|
|
26
26
|
}) => {
|
|
27
27
|
const [isLoading] = useState(false);
|
|
28
|
+
const [description, setDescription] = useState("");
|
|
28
29
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
29
30
|
testID: testID,
|
|
30
31
|
animationType: "fade",
|
|
@@ -82,7 +83,8 @@ const ModalActivityReason = ({
|
|
|
82
83
|
}, /*#__PURE__*/React.createElement(InputTextCounter, {
|
|
83
84
|
label: `${textTitle || "Motivo da exclusão"}`,
|
|
84
85
|
placeholderTextColor: "#9B9B9B",
|
|
85
|
-
placeholder: "Motivo da exclus\xE3o"
|
|
86
|
+
placeholder: "Motivo da exclus\xE3o",
|
|
87
|
+
onChangeText: setDescription
|
|
86
88
|
})), /*#__PURE__*/React.createElement(Box, {
|
|
87
89
|
marginStyle: {
|
|
88
90
|
marginTop: 4
|
|
@@ -119,8 +121,7 @@ const ModalActivityReason = ({
|
|
|
119
121
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
120
122
|
title: "CONFIRMAR",
|
|
121
123
|
onPress: () => {
|
|
122
|
-
modalConfirm(
|
|
123
|
-
onClose();
|
|
124
|
+
modalConfirm(description);
|
|
124
125
|
},
|
|
125
126
|
width: "48%",
|
|
126
127
|
height: 40,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Modal","View","Box","Typography","Button","InputTextCounter","Icons","theme","ModalActivityReason","visible","onClose","modalConfirm","textTitle","testID","isLoading","createElement","animationType","transparent","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","marginLeft","flexStyle","flexDirection","icon","color","background","neutral","size","text","margins","fontFamily","fonts","inter_bold_700","fontSizes","md","padding","xs","label","placeholderTextColor","placeholder","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor","displayName"],"sources":["index.tsx"],"sourcesContent":["/**\r\n * IMPORTS\r\n */\r\nimport React, { useState } from \"react\";\r\nimport { Modal, View } from \"react-native\";\r\n\r\n// components\r\nimport Box from \"../../box\";\r\nimport { Typography } from \"../../typography\";\r\nimport { Button } from \"../../button\";\r\n\r\nimport InputTextCounter from \"../../input-text-counter\";\r\n\r\n// commons / svg\r\nimport { Icons } from \"../../../common/icons-svg\";\r\n\r\n// typings\r\nimport type { IModalActivityReasonProps } from \"./interface\";\r\n\r\n// styles\r\nimport { theme } from \"../../../styles/theme/theme\";\r\n\r\nconst ModalActivityReason: React.FC<IModalActivityReasonProps> = ({\r\n visible,\r\n onClose,\r\n modalConfirm,\r\n textTitle,\r\n testID,\r\n}) => {\r\n const [isLoading] = useState(false);\r\n\r\n return (\r\n <Modal testID={testID} animationType=\"fade\" transparent visible={visible}>\r\n <View\r\n style={{\r\n flex: 1,\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n backgroundColor: \"rgba(0,0,0,0.6)\",\r\n }}\r\n >\r\n <Box\r\n width={\"90%\"}\r\n backgroundColor={theme.colors.orange[500]}\r\n borderStyled={{\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n paddingStyle={{\r\n paddingLeft: theme.paddings[\"2xs\"],\r\n paddingRight: theme.paddings[\"2xs\"],\r\n paddingTop: theme.paddings.sm,\r\n paddingBottom: theme.paddings.sm,\r\n }}\r\n >\r\n <Box\r\n marginStyle={{ marginBottom: 10, marginLeft: 4 }}\r\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}\r\n >\r\n <Icons\r\n icon=\"EXCLAMATION_TRIANGLE\"\r\n color={theme.colors.orange[500]}\r\n background={theme.colors.neutral[300]}\r\n size={22}\r\n />\r\n <Typography\r\n text={`${textTitle ?? \"Motivo da exclusão\"}`}\r\n color={theme.colors.neutral[25]}\r\n marginLeft={theme.margins[\"2xs\"]}\r\n fontFamily={theme.fonts.inter_bold_700}\r\n size={theme.fontSizes.md}\r\n />\r\n </Box>\r\n\r\n <Box\r\n backgroundColor={theme.colors.neutral[300]}\r\n paddingStyle={{\r\n padding: theme.paddings.xs,\r\n }}\r\n borderStyled={{\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n >\r\n <Box width=\"100%\">\r\n <InputTextCounter\r\n label={`${textTitle || \"Motivo da exclusão\"}`}\r\n placeholderTextColor=\"#9B9B9B\"\r\n placeholder=\"Motivo da exclusão\"\r\n />\r\n </Box>\r\n <Box\r\n marginStyle={{ marginTop: 4 }}\r\n flexStyle={{\r\n flexDirection: \"row\",\r\n justifyContent: \"space-between\",\r\n }}\r\n >\r\n <Button\r\n title=\"CANCELAR\"\r\n onPress={onClose}\r\n width={\"48%\"}\r\n height={40}\r\n isLoading={isLoading}\r\n disabled={isLoading}\r\n backgroundColor={theme.colors.neutral[300]}\r\n buttonTextStyle={{\r\n color: theme.colors.blue[100],\r\n fontFamily: \"Inter-Medium\",\r\n fontSize: theme.fontSizes.xs,\r\n fontWeight: \"500\",\r\n }}\r\n flexStyle={{\r\n flexDirection: \"row\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n textAlign: \"center\",\r\n }}\r\n borderStyled={{\r\n borderWidth: theme.borderWidths.thin,\r\n borderColor: theme.colors.blue[100],\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n />\r\n <Button\r\n title=\"CONFIRMAR\"\r\n onPress={() => {\r\n modalConfirm(true);\r\n onClose();\r\n }}\r\n width={\"48%\"}\r\n height={40}\r\n isLoading={isLoading}\r\n disabled={isLoading}\r\n backgroundColor={theme.colors.blue[500]}\r\n buttonTextStyle={{\r\n color: theme.colors.neutral[25],\r\n fontFamily: \"Inter-Medium\",\r\n fontSize: theme.fontSizes.xs,\r\n fontWeight: \"500\",\r\n }}\r\n flexStyle={{\r\n flexDirection: \"row\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n textAlign: \"center\",\r\n }}\r\n borderStyled={{\r\n borderWidth: theme.borderWidths.thin,\r\n borderColor: theme.colors.blue[100],\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n />\r\n </Box>\r\n </Box>\r\n </Box>\r\n </View>\r\n </Modal>\r\n );\r\n};\r\n\r\nModalActivityReason.displayName = \"ModalActivityReason\";\r\n\r\nexport default ModalActivityReason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ACjBC,OAAO,EAAEA,CAAA,KAAM;MACblD,YAAY,CAAC,IAAI,CAAC;MAClBD,OAAO,CAAC,CAAC;IACX,CAAE;IACFa,KAAK,EAAE,KAAM;IACbuC,MAAM,EAAE,EAAG;IACXhD,SAAS,EAAEA,SAAU;IACrBiD,QAAQ,EAAEjD,SAAU;IACpBQ,eAAe,EAAEf,KAAK,CAACiB,MAAM,CAACyC,IAAI,CAAC,GAAG,CAAE;IACxCD,eAAe,EAAE;MACfrB,KAAK,EAAEpC,KAAK,CAACiB,MAAM,CAACqB,OAAO,CAAC,EAAE,CAAC;MAC/BI,UAAU,EAAE,cAAc;MAC1BiB,QAAQ,EAAE3D,KAAK,CAAC6C,SAAS,CAACG,EAAE;MAC5BY,UAAU,EAAE;IACd,CAAE;IACF3B,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBpB,UAAU,EAAE,QAAQ;MACpBD,cAAc,EAAE,QAAQ;MACxBgD,SAAS,EAAE;IACb,CAAE;IACF1C,YAAY,EAAE;MACZ2C,WAAW,EAAE9D,KAAK,CAACqB,YAAY,CAAC0C,IAAI;MACpCC,WAAW,EAAEhE,KAAK,CAACiB,MAAM,CAACyC,IAAI,CAAC,GAAG,CAAC;MACnCtC,YAAY,EAAEpB,KAAK,CAACqB,YAAY,CAACC;IACnC;EAAE,CACH,CACE,CACF,CACF,CACD,CACD,CAAC;AAEZ,CAAC;AAEDrB,mBAAmB,CAACgE,WAAW,GAAG,qBAAqB;AAEvD,eAAehE,mBAAmB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","useState","Modal","View","Box","Typography","Button","InputTextCounter","Icons","theme","ModalActivityReason","visible","onClose","modalConfirm","textTitle","testID","isLoading","description","setDescription","createElement","animationType","transparent","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","marginLeft","flexStyle","flexDirection","icon","color","background","neutral","size","text","margins","fontFamily","fonts","inter_bold_700","fontSizes","md","padding","xs","label","placeholderTextColor","placeholder","onChangeText","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor","displayName"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React, { useState } from \"react\";\nimport { Modal, View } from \"react-native\";\n\n// components\nimport Box from \"../../box\";\nimport { Typography } from \"../../typography\";\nimport { Button } from \"../../button\";\n\nimport InputTextCounter from \"../../input-text-counter\";\n\n// commons / svg\nimport { Icons } from \"../../../common/icons-svg\";\n\n// typings\nimport type { IModalActivityReasonProps } from \"./interface\";\n\n// styles\nimport { theme } from \"../../../styles/theme/theme\";\n\nconst ModalActivityReason: React.FC<IModalActivityReasonProps> = ({\n visible,\n onClose,\n modalConfirm,\n textTitle,\n testID,\n}) => {\n const [isLoading] = useState(false);\n const [description, setDescription] = useState(\"\");\n\n return (\n <Modal testID={testID} animationType=\"fade\" transparent visible={visible}>\n <View\n style={{\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n backgroundColor: \"rgba(0,0,0,0.6)\",\n }}\n >\n <Box\n width={\"90%\"}\n backgroundColor={theme.colors.orange[500]}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_medium,\n }}\n paddingStyle={{\n paddingLeft: theme.paddings[\"2xs\"],\n paddingRight: theme.paddings[\"2xs\"],\n paddingTop: theme.paddings.sm,\n paddingBottom: theme.paddings.sm,\n }}\n >\n <Box\n marginStyle={{ marginBottom: 10, marginLeft: 4 }}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}\n >\n <Icons\n icon=\"EXCLAMATION_TRIANGLE\"\n color={theme.colors.orange[500]}\n background={theme.colors.neutral[300]}\n size={22}\n />\n <Typography\n text={`${textTitle ?? \"Motivo da exclusão\"}`}\n color={theme.colors.neutral[25]}\n marginLeft={theme.margins[\"2xs\"]}\n fontFamily={theme.fonts.inter_bold_700}\n size={theme.fontSizes.md}\n />\n </Box>\n\n <Box\n backgroundColor={theme.colors.neutral[300]}\n paddingStyle={{\n padding: theme.paddings.xs,\n }}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_medium,\n }}\n >\n <Box width=\"100%\">\n <InputTextCounter\n label={`${textTitle || \"Motivo da exclusão\"}`}\n placeholderTextColor=\"#9B9B9B\"\n placeholder=\"Motivo da exclusão\"\n onChangeText={setDescription}\n />\n </Box>\n <Box\n marginStyle={{ marginTop: 4 }}\n flexStyle={{\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n }}\n >\n <Button\n title=\"CANCELAR\"\n onPress={onClose}\n width={\"48%\"}\n height={40}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.neutral[300]}\n buttonTextStyle={{\n color: theme.colors.blue[100],\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n <Button\n title=\"CONFIRMAR\"\n onPress={() => {\n modalConfirm(description);\n }}\n width={\"48%\"}\n height={40}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.blue[500]}\n buttonTextStyle={{\n color: theme.colors.neutral[25],\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n </Box>\n </Box>\n </Box>\n </View>\n </Modal>\n );\n};\n\nModalActivityReason.displayName = \"ModalActivityReason\";\n\nexport default ModalActivityReason;\n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B,KAAK,CAACuB,YAAY,CAACC;IACnC;EAAE,CACH,CAAC,eACFjC,KAAA,CAAAmB,aAAA,CAACb,MAAM;IACL2D,KAAK,EAAC,WAAW;IACjBC,OAAO,EAAEA,CAAA,KAAM;MACbrD,YAAY,CAACI,WAAW,CAAC;IAC3B,CAAE;IACFU,KAAK,EAAE,KAAM;IACbwC,MAAM,EAAE,EAAG;IACXnD,SAAS,EAAEA,SAAU;IACrBoD,QAAQ,EAAEpD,SAAU;IACpBU,eAAe,EAAEjB,KAAK,CAACmB,MAAM,CAAC0C,IAAI,CAAC,GAAG,CAAE;IACxCD,eAAe,EAAE;MACftB,KAAK,EAAEtC,KAAK,CAACmB,MAAM,CAACqB,OAAO,CAAC,EAAE,CAAC;MAC/BI,UAAU,EAAE,cAAc;MAC1BkB,QAAQ,EAAE9D,KAAK,CAAC+C,SAAS,CAACG,EAAE;MAC5Ba,UAAU,EAAE;IACd,CAAE;IACF5B,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBpB,UAAU,EAAE,QAAQ;MACpBD,cAAc,EAAE,QAAQ;MACxBiD,SAAS,EAAE;IACb,CAAE;IACF3C,YAAY,EAAE;MACZ4C,WAAW,EAAEjE,KAAK,CAACuB,YAAY,CAAC2C,IAAI;MACpCC,WAAW,EAAEnE,KAAK,CAACmB,MAAM,CAAC0C,IAAI,CAAC,GAAG,CAAC;MACnCvC,YAAY,EAAEtB,KAAK,CAACuB,YAAY,CAACC;IACnC;EAAE,CACH,CACE,CACF,CACF,CACD,CACD,CAAC;AAEZ,CAAC;AAEDvB,mBAAmB,CAACmE,WAAW,GAAG,qBAAqB;AAEvD,eAAenE,mBAAmB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\
|
|
1
|
+
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\ninterface IModalActivityReasonProps {\n visible: boolean;\n onClose: () => void;\n modalConfirm: (value: string) => void;\n textTitle?: string;\n testID?: string;\n}\n\nexport type { IModalActivityReasonProps };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Modal","View","Box","Typography","Button","SelectOption","theme","Icons","options","label","value","key","ModalChangeActivity","visible","onClose","modalConfirm","descricao","isLoading","useState","initial","toLowerCase","replace","selectedOption","setSelectedOption","handleConfirm","selected","find","opt","createElement","animationType","transparent","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","margins","marginLeft","flexStyle","flexDirection","icon","color","black","background","yellow","size","text","fontFamily","fonts","inter_bold_700","fontSizes","md","neutral","padding","xs","inter_medium_500","flexWrap","maxWidth","titleLabel","sizeTitleLabel","dataOption","handleSelectDown","option","o","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor"],"sources":["index.tsx"],"sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * IMPORTS\n */\nimport React from \"react\";\n// libs RN\nimport { Modal, View } from \"react-native\";\n\n// componentes internos\nimport Box from \"../../box\";\nimport { Typography } from \"../../typography\";\nimport { Button } from \"../../button\";\nimport SelectOption from \"../../selects/select-option\";\n\n// styles / theme\nimport { theme } from \"../../../styles/theme/theme\";\n\n// assets / icons\nimport { Icons } from \"../../../common/icons-svg\";\n\n/**\n * TYPES\n */\ninterface IModalChangeActivityProps {\n visible: boolean;\n onClose: () => void;\n modalConfirm: (newData: { label: string; value: string; key: number }) => void;\n descricao: string;\n}\n\n/**\n * CONSTANTS\n */\nconst options = [\n { label: \"Selecione atividade\", value: \"none\", key: 0 },\n { label: \"Descanso\", value: \"descanso\", key: 5 },\n { label: \"Repouso Noturno\", value: \"repouso_noturno\", key: 6 },\n { label: \"Refeição\", value: \"refeição\", key: 7 },\n { label: \"Repouso Semanal\", value: \"repouso_semanal\", key: 9 },\n];\n\n/**\n * COMPONENT\n */\nexport const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({\n visible,\n onClose,\n modalConfirm,\n descricao,\n}) => {\n const [isLoading] = React.useState(false);\n\n const initial = (descricao ?? \"\").toLowerCase().replace(/\\s+/g, \"_\");\n const [selectedOption, setSelectedOption] = React.useState(initial || \"none\");\n\n const handleConfirm = () => {\n const selected = options.find((opt) => opt.value === selectedOption);\n if (selected && selected.value !== \"none\") {\n modalConfirm({\n label: selected.label,\n value: selected.value,\n key: selected.key,\n });\n }\n onClose();\n };\n\n return (\n <Modal animationType=\"fade\" transparent visible={visible}>\n <View\n style={{\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n backgroundColor: \"rgba(0,0,0,0.6)\",\n }}\n >\n <Box\n width={346}\n backgroundColor={theme.colors.orange[500]}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_medium,\n }}\n paddingStyle={{\n paddingLeft: theme.paddings[\"2xs\"],\n paddingRight: theme.paddings[\"2xs\"],\n paddingTop: theme.paddings.sm,\n paddingBottom: theme.paddings.sm,\n }}\n >\n <Box\n marginStyle={{ marginBottom: theme.margins[\"2xs\"], marginLeft: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}\n >\n <Icons\n icon=\"EXCLAMATION_TRIANGLE\"\n color={theme.colors.black[10]}\n background={theme.colors.yellow[50]}\n size={22}\n />\n <Typography\n text=\"Alterar Atividade\"\n color=\"#fff\"\n marginLeft={theme.margins[\"2xs\"]}\n fontFamily={theme.fonts.inter_bold_700}\n size={theme.fontSizes.md}\n />\n </Box>\n\n <Box\n backgroundColor={theme.colors.neutral[300]}\n paddingStyle={{ padding: theme.paddings.xs }}\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\n >\n <Box flexStyle={{ flexDirection: \"row\", justifyContent: \"flex-start\" }} width={\"90%\"}>\n <Typography\n text={`Deseja realmente alterar sua atividade de ${descricao || \"atividade atual\"}?`}\n color={theme.colors.black[25]}\n fontFamily={theme.fonts.inter_medium_500}\n size={theme.fontSizes.xs}\n style={{ flexWrap: \"wrap\", maxWidth: \"100%\" }}\n />\n </Box>\n\n <SelectOption\n titleLabel=\"Selecione atividade\"\n sizeTitleLabel={theme.fontSizes.xs}\n dataOption={options}\n handleSelectDown={(opt) => {\n const option = options.find((o) => o.label === opt || o.value === opt);\n if (option) setSelectedOption(option.value);\n }}\n backgroundColor={theme.colors.neutral[300]}\n />\n\n <Box\n marginStyle={{ marginTop: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", justifyContent: \"space-between\" }}\n >\n <Button\n title=\"CANCELAR\"\n onPress={onClose}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.neutral[300]}\n buttonTextStyle={{\n color: theme.colors.blue[100],\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n <Button\n title=\"CONFIRMAR\"\n onPress={handleConfirm}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.blue[100]}\n buttonTextStyle={{\n color: \"#fff\",\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n </Box>\n </Box>\n </Box>\n </View>\n </Modal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MACxBwD,SAAS,EAAE;IACb,CAAE;IACFlD,YAAY,EAAE;MACZmD,WAAW,EAAEpF,KAAK,CAACmC,YAAY,CAACkD,IAAI;MACpCC,WAAW,EAAEtF,KAAK,CAAC+B,MAAM,CAACiD,IAAI,CAAC,GAAG,CAAC;MACnC9C,YAAY,EAAElC,KAAK,CAACmC,YAAY,CAACC;IACnC;EAAE,CACH,CACE,CACF,CACF,CACD,CACD,CAAC;AAEZ,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Modal","View","Box","Typography","Button","SelectOption","theme","Icons","options","label","value","key","ModalChangeActivity","visible","onClose","modalConfirm","descricao","isLoading","useState","initial","toLowerCase","replace","selectedOption","setSelectedOption","handleConfirm","selected","find","opt","createElement","animationType","transparent","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","margins","marginLeft","flexStyle","flexDirection","icon","color","black","background","yellow","size","text","fontFamily","fonts","inter_bold_700","fontSizes","md","neutral","padding","xs","inter_medium_500","flexWrap","maxWidth","titleLabel","sizeTitleLabel","dataOption","handleSelectDown","option","o","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor"],"sources":["index.tsx"],"sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * IMPORTS\n */\nimport React from \"react\";\n// libs RN\nimport { Modal, View } from \"react-native\";\n\n// componentes internos\nimport Box from \"../../box\";\nimport { Typography } from \"../../typography\";\nimport { Button } from \"../../button\";\nimport SelectOption from \"../../selects/select-option\";\n\n// styles / theme\nimport { theme } from \"../../../styles/theme/theme\";\n\n// assets / icons\nimport { Icons } from \"../../../common/icons-svg\";\n\n/**\n * TYPES\n */\ninterface IModalChangeActivityProps {\n visible: boolean;\n onClose: () => void;\n modalConfirm: (newData: { label: string; value: string; key: number }) => void;\n descricao: string;\n}\n\n/**\n * CONSTANTS\n */\nconst options = [\n { label: \"Selecione atividade\", value: \"none\", key: 0 },\n { label: \"Descanso\", value: \"descanso\", key: 5 },\n { label: \"Repouso Noturno\", value: \"repouso_noturno\", key: 6 },\n { label: \"Refeição\", value: \"refeição\", key: 7 },\n { label: \"Repouso Semanal\", value: \"repouso_semanal\", key: 9 },\n];\n\n/**\n * COMPONENT\n */\nexport const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({\n visible,\n onClose,\n modalConfirm,\n descricao,\n}) => {\n const [isLoading] = React.useState(false);\n\n const initial = (descricao ?? \"\").toLowerCase().replace(/\\s+/g, \"_\");\n const [selectedOption, setSelectedOption] = React.useState(initial || \"none\");\n\n const handleConfirm = () => {\n const selected = options.find((opt) => opt.value === selectedOption);\n if (selected && selected.value !== \"none\") {\n modalConfirm({\n label: selected.label,\n value: selected.value,\n key: selected.key,\n });\n }\n onClose();\n };\n\n return (\n <Modal animationType=\"fade\" transparent visible={visible}>\n <View\n style={{\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n backgroundColor: \"rgba(0,0,0,0.6)\",\n }}\n >\n <Box\n width={346}\n backgroundColor={theme.colors.orange[500]}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_medium,\n }}\n paddingStyle={{\n paddingLeft: theme.paddings[\"2xs\"],\n paddingRight: theme.paddings[\"2xs\"],\n paddingTop: theme.paddings.sm,\n paddingBottom: theme.paddings.sm,\n }}\n >\n <Box\n marginStyle={{ marginBottom: theme.margins[\"2xs\"], marginLeft: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}\n >\n <Icons\n icon=\"EXCLAMATION_TRIANGLE\"\n color={theme.colors.black[10]}\n background={theme.colors.yellow[50]}\n size={22}\n />\n <Typography\n text=\"Alterar Atividade\"\n color=\"#fff\"\n marginLeft={theme.margins[\"2xs\"]}\n fontFamily={theme.fonts.inter_bold_700}\n size={theme.fontSizes.md}\n />\n </Box>\n\n <Box\n backgroundColor={theme.colors.neutral[300]}\n paddingStyle={{ padding: theme.paddings.xs }}\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\n >\n <Box flexStyle={{ flexDirection: \"row\", justifyContent: \"flex-start\" }} width={\"90%\"}>\n <Typography\n text={`Deseja realmente alterar sua atividade de ${descricao || \"atividade atual\"}?`}\n color={theme.colors.black[25]}\n fontFamily={theme.fonts.inter_medium_500}\n size={theme.fontSizes.xs}\n style={{ flexWrap: \"wrap\", maxWidth: \"100%\" }}\n />\n </Box>\n\n <SelectOption\n titleLabel=\"Selecione atividade\"\n sizeTitleLabel={theme.fontSizes.xs}\n dataOption={options}\n handleSelectDown={(opt: any) => {\n const option = options.find((o) => o.label === opt || o.value === opt);\n if (option) setSelectedOption(option.value);\n }}\n backgroundColor={theme.colors.neutral[300]}\n />\n\n <Box\n marginStyle={{ marginTop: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", justifyContent: \"space-between\" }}\n >\n <Button\n title=\"CANCELAR\"\n onPress={onClose}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.neutral[300]}\n buttonTextStyle={{\n color: theme.colors.blue[100],\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n <Button\n title=\"CONFIRMAR\"\n onPress={handleConfirm}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.blue[100]}\n buttonTextStyle={{\n color: \"#fff\",\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n </Box>\n </Box>\n </Box>\n </View>\n </Modal>\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB;AACA,SAASC,KAAK,EAAEC,IAAI,QAAQ,cAAc;;AAE1C;AACA,OAAOC,GAAG,MAAM,WAAW;AAC3B,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,MAAM,QAAQ,cAAc;AACrC,OAAOC,YAAY,MAAM,6BAA6B;;AAEtD;AACA,SAASC,KAAK,QAAQ,6BAA6B;;AAEnD;AACA,SAASC,KAAK,QAAQ,2BAA2B;;AAEjD;AACA;AACA;;AAQA;AACA;AACA;AACA,MAAMC,OAAO,GAAG,CACd;EAAEC,KAAK,EAAE,qBAAqB;EAAEC,KAAK,EAAE,MAAM;EAAEC,GAAG,EAAE;AAAE,CAAC,EACvD;EAAEF,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAE,UAAU;EAAEC,GAAG,EAAE;AAAE,CAAC,EAChD;EAAEF,KAAK,EAAE,iBAAiB;EAAEC,KAAK,EAAE,iBAAiB;EAAEC,GAAG,EAAE;AAAE,CAAC,EAC9D;EAAEF,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAE,UAAU;EAAEC,GAAG,EAAE;AAAE,CAAC,EAChD;EAAEF,KAAK,EAAE,iBAAiB;EAAEC,KAAK,EAAE,iBAAiB;EAAEC,GAAG,EAAE;AAAE,CAAC,CAC/D;;AAED;AACA;AACA;AACA,OAAO,MAAMC,mBAAwD,GAAGA,CAAC;EACvEC,OAAO;EACPC,OAAO;EACPC,YAAY;EACZC;AACF,CAAC,KAAK;EACJ,MAAM,CAACC,SAAS,CAAC,GAAGlB,KAAK,CAACmB,QAAQ,CAAC,KAAK,CAAC;EAEzC,MAAMC,OAAO,G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AAK,CAAC4D,SAAS,CAACI,EAAE;MAC5BkB,UAAU,EAAE;IACd,CAAE;IACFlC,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBrB,UAAU,EAAE,QAAQ;MACpBD,cAAc,EAAE,QAAQ;MACxBwD,SAAS,EAAE;IACb,CAAE;IACFlD,YAAY,EAAE;MACZmD,WAAW,EAAEpF,KAAK,CAACmC,YAAY,CAACkD,IAAI;MACpCC,WAAW,EAAEtF,KAAK,CAAC+B,MAAM,CAACiD,IAAI,CAAC,GAAG,CAAC;MACnC9C,YAAY,EAAElC,KAAK,CAACmC,YAAY,CAACC;IACnC;EAAE,CACH,CACE,CACF,CACF,CACD,CACD,CAAC;AAEZ,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
3
|
*/
|
|
4
4
|
import React, { forwardRef, useState } from "react";
|
|
5
5
|
import { View, Text, TouchableOpacity, Modal, FlatList } from "react-native";
|
|
@@ -102,8 +102,8 @@ const SelectOption = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
102
102
|
})))));
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
-
/**
|
|
106
|
-
* Componente SelectOption para a interação da ui.
|
|
105
|
+
/**
|
|
106
|
+
* Componente SelectOption para a interação da ui.
|
|
107
107
|
*/
|
|
108
108
|
export default asBaseComponent(SelectOption);
|
|
109
109
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","useState","View","Text","TouchableOpacity","Modal","FlatList","Icons","handleLimitTextdisplayByAmount","asBaseComponent","styles","theme","SelectOption","props","ref","_dataOption$","_dataOption$find","dataOption","handleSelectDown","titleLabel","sizeTitleLabel","colortitleLabel","backgroundColor","selectedValue","setSelectedValue","value","modalVisible","setModalVisible","handleSelect","styleProps","createElement","style","container","label","testID","selectBox","onPress","selectedText","numberOfLines","limit","text","find","item","size","fontSizes","color","colors","blue","icon","visible","transparent","animationType","modalOverlay","modalContainer","width","alignItems","height","paddingRight","justifyContent","data","keyExtractor","renderItem","option","optionText"],"sources":["index.tsx"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useState","View","Text","TouchableOpacity","Modal","FlatList","Icons","handleLimitTextdisplayByAmount","asBaseComponent","styles","theme","SelectOption","props","ref","_dataOption$","_dataOption$find","dataOption","handleSelectDown","titleLabel","sizeTitleLabel","colortitleLabel","backgroundColor","selectedValue","setSelectedValue","value","modalVisible","setModalVisible","handleSelect","styleProps","createElement","style","container","label","testID","selectBox","onPress","selectedText","numberOfLines","limit","text","find","item","size","fontSizes","color","colors","blue","icon","visible","transparent","animationType","modalOverlay","modalContainer","width","alignItems","height","paddingRight","justifyContent","data","keyExtractor","renderItem","option","optionText"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React, { forwardRef, useState } from \"react\";\nimport { View, Text, TouchableOpacity, Modal, FlatList } from \"react-native\";\n\n// commons / svg\nimport { Icons } from \"../../../common/icons-svg\";\n\n// utils\nimport { handleLimitTextdisplayByAmount } from \"../../../utils/text-limit\";\n\n// typings\nimport { asBaseComponent } from \"../../../@types/as-base-component\";\nimport type { ISelectDropDownProps } from \"./interface\";\n\n// styles\nimport { styles } from \"./styles\";\nimport { theme } from \"../../../styles/theme/theme\";\n\nconst SelectOption = forwardRef<any, ISelectDropDownProps>((props, ref): React.ReactElement => {\n const {\n dataOption,\n handleSelectDown,\n titleLabel,\n sizeTitleLabel,\n colortitleLabel,\n backgroundColor,\n } = props;\n\n const [selectedValue, setSelectedValue] = useState(dataOption[0]?.value || \"\");\n const [modalVisible, setModalVisible] = useState(false);\n\n const handleSelect = (value: number) => {\n setSelectedValue(value);\n setModalVisible(false);\n handleSelectDown(value);\n };\n\n const styleProps = {\n dataOption,\n handleSelectDown,\n titleLabel,\n sizeTitleLabel,\n colortitleLabel,\n backgroundColor,\n } as ISelectDropDownProps;\n return (\n <View ref={ref} style={styles(styleProps).container}>\n {/* Titulo para exibir o label */}\n <Text style={styles(styleProps).label}>{`${titleLabel ?? \"Selecione uma opção\"}`}:</Text>\n\n {/* Botão para abrir o modal */}\n <TouchableOpacity\n testID=\"select-box\"\n style={styles(styleProps).selectBox}\n onPress={() => setModalVisible(true)}\n >\n <Text style={styles(styleProps).selectedText} numberOfLines={1}>\n {`${handleLimitTextdisplayByAmount({\n limit: 42,\n text: dataOption.find((item) => item.value === selectedValue)?.label!,\n })}`}\n </Text>\n\n <Icons\n size={theme.fontSizes[\"xs\"]}\n color={theme.colors.blue[500]}\n icon={\"ARROW_DROP_DOWN\"}\n />\n </TouchableOpacity>\n\n {/* Modal para exibir as opções */}\n <Modal testID=\"modal-container\" visible={modalVisible} transparent animationType=\"fade\">\n <View style={styles(styleProps).modalOverlay}>\n <View style={styles(styleProps).modalContainer}>\n <View\n style={{\n width: \"100%\",\n alignItems: \"flex-end\",\n height: 40,\n paddingRight: 8,\n }}\n >\n <TouchableOpacity\n testID=\"close-icon\"\n onPress={() => setModalVisible(false)}\n style={{\n width: 40,\n height: 45,\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <Icons\n size={theme.fontSizes[\"md\"]}\n color={theme.colors.blue[500]}\n icon={\"CLOSED\"}\n />\n </TouchableOpacity>\n </View>\n <FlatList\n data={dataOption || []}\n keyExtractor={(item) => item.value}\n renderItem={({ item }) => (\n <TouchableOpacity\n style={styles(styleProps).option}\n onPress={() => handleSelect(item.value)}\n >\n <Text style={styles(styleProps).optionText}>{item.label}</Text>\n </TouchableOpacity>\n )}\n />\n </View>\n </View>\n </Modal>\n </View>\n );\n});\n\n/**\n * Componente SelectOption para a interação da ui.\n */\nexport default asBaseComponent(SelectOption);\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AACnD,SAASC,IAAI,EAAEC,IAA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+1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/**\n * IMPORTS\n */\ntype ISelectDropDownProps = {\n dataOption: any[];\n titleLabel: string;\n sizeTitleLabel?: number;\n colortitleLabel?: string;\n backgroundColor?: string;\n /**retorna o valor selecionado */\n // eslint-disable-next-line no-unused-vars\n handleSelectDown: (value: number) => void;\n};\n\n/**\n * EXPORTS\n */\nexport { ISelectDropDownProps };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
/**
|
|
3
|
-
* IMPORTS
|
|
2
|
+
/**
|
|
3
|
+
* IMPORTS
|
|
4
4
|
*/
|
|
5
5
|
import React, { useState } from "react";
|
|
6
6
|
import { View, Text, Button } from "react-native";
|
|
@@ -8,8 +8,8 @@ import { View, Text, Button } from "react-native";
|
|
|
8
8
|
// components
|
|
9
9
|
import ModalActivityReason from "../../components/modals/modal-activity-reason";
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* META
|
|
11
|
+
/**
|
|
12
|
+
* META
|
|
13
13
|
*/
|
|
14
14
|
const meta = {
|
|
15
15
|
title: "componente/ModalActivityReason",
|
|
@@ -114,8 +114,8 @@ const [open, setOpen] = useState(false);
|
|
|
114
114
|
}, /*#__PURE__*/React.createElement(Story, null))]
|
|
115
115
|
};
|
|
116
116
|
export default meta;
|
|
117
|
-
/**
|
|
118
|
-
* STORIES
|
|
117
|
+
/**
|
|
118
|
+
* STORIES
|
|
119
119
|
*/
|
|
120
120
|
|
|
121
121
|
// 1) Aberto (básico)
|
|
@@ -168,10 +168,10 @@ export const ControladoInterativo = {
|
|
|
168
168
|
args === null || args === void 0 || (_args$onClose = args.onClose) === null || _args$onClose === void 0 || _args$onClose.call(args);
|
|
169
169
|
setOpen(false);
|
|
170
170
|
},
|
|
171
|
-
modalConfirm:
|
|
171
|
+
modalConfirm: value => {
|
|
172
172
|
var _args$modalConfirm;
|
|
173
173
|
// @ts-ignore
|
|
174
|
-
args === null || args === void 0 || (_args$modalConfirm = args.modalConfirm) === null || _args$modalConfirm === void 0 || _args$modalConfirm.call(args,
|
|
174
|
+
args === null || args === void 0 || (_args$modalConfirm = args.modalConfirm) === null || _args$modalConfirm === void 0 || _args$modalConfirm.call(args, value);
|
|
175
175
|
setOpen(false);
|
|
176
176
|
},
|
|
177
177
|
textTitle: (_args$textTitle = args.textTitle) !== null && _args$textTitle !== void 0 ? _args$textTitle : "Motivo da exclusão"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","View","Text","Button","ModalActivityReason","meta","title","component","tags","args","visible","textTitle","undefined","argTypes","control","type","description","table","category","onClose","action","modalConfirm","parameters","controls","expanded","layout","docs","decorators","Story","createElement","style","width","padding","backgroundColor","borderRadius","AbertoBasico","name","Fechado","TituloPersonalizado","ControladoInterativo","render","Wrapper","_args$textTitle","open","setOpen","onPress","marginTop","fontSize","color","_extends","_args$onClose","call","
|
|
1
|
+
{"version":3,"names":["React","useState","View","Text","Button","ModalActivityReason","meta","title","component","tags","args","visible","textTitle","undefined","argTypes","control","type","description","table","category","onClose","action","modalConfirm","parameters","controls","expanded","layout","docs","decorators","Story","createElement","style","width","padding","backgroundColor","borderRadius","AbertoBasico","name","Fechado","TituloPersonalizado","ControladoInterativo","render","Wrapper","_args$textTitle","open","setOpen","onPress","marginTop","fontSize","color","_extends","_args$onClose","call","value","_args$modalConfirm","story"],"sources":["modal-activity-reason.stories.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { View, Text, Button } from \"react-native\";\n\n// components\nimport ModalActivityReason from \"../../components/modals/modal-activity-reason\";\n\n/**\n * META\n */\nconst meta: Meta<typeof ModalActivityReason> = {\n title: \"componente/ModalActivityReason\",\n component: ModalActivityReason as React.FC,\n tags: [\"autodocs\"],\n args: {\n visible: false,\n textTitle: undefined,\n },\n argTypes: {\n visible: {\n control: { type: \"boolean\" },\n description: \"Controla a visibilidade do modal.\",\n table: { category: \"Comportamento\" },\n },\n textTitle: {\n control: { type: \"text\" },\n description:\n \"Título exibido no cabeçalho do modal. Se não informado, usa 'Motivo da exclusão'.\",\n table: { category: \"Aparência\" },\n },\n onClose: {\n action: \"onClose\",\n description:\n \"Chamado ao fechar/cancelar o modal. Deve alternar `visible` para `false` no uso controlado.\",\n table: { category: \"Eventos\" },\n },\n modalConfirm: {\n action: \"modalConfirm\",\n description:\n \"Chamado ao confirmar a ação. Por padrão, o componente chama `modalConfirm(true)` e em seguida `onClose()`.\",\n table: { category: \"Eventos\" },\n },\n },\n parameters: {\n controls: { expanded: true },\n layout: \"centered\",\n docs: {\n description: {\n component: `\n### ModalActivityReason\n\nModal para solicitar **motivo/justificativa** antes de executar uma ação crítica (ex.: excluir atividade).\n\n#### Recursos\n- Título personalizável via \\`textTitle\\`\n- Campo de texto (interno) para descrição do motivo\n- Botões **CANCELAR** e **CONFIRMAR**\n- Dispara \\`onClose\\` e \\`modalConfirm\\` conforme interação do usuário\n\n#### Props\n- \\`visible: boolean\\` — controla abertura/fechamento do modal\n- \\`onClose: () => void\\` — chamado ao cancelar/fechar\n- \\`modalConfirm: (ok?: boolean) => void\\` — chamado ao confirmar; o componente invoca \\`modalConfirm(true)\\` e depois \\`onClose()\\`\n- \\`textTitle?: string\\` — título opcional do cabeçalho\n\n> Caso \\`textTitle\\` não seja informado, o título padrão é **\"Motivo da exclusão\"**.\n\n#### Padrão de Uso (controlado)\nNo consumo real, gerencie o estado \\`visible\\` fora do componente e passe callbacks:\n\\`\\`\\`tsx\nconst [open, setOpen] = useState(false);\n\n<ModalActivityReason\n visible={open}\n onClose={() => setOpen(false)}\n modalConfirm={() => {\n // enviar justificativa para API (se o componente expuser)\n setOpen(false);\n }}\n textTitle=\"Motivo da exclusão\"\n/>\n\\`\\`\\`\n\n#### Testes (ideias)\n- Renderiza com \\`visible=true\\`\n- Exibe título padrão e título customizado\n- Dispara \\`onClose\\` ao cancelar\n- Dispara \\`modalConfirm\\` ao confirmar (e fecha em seguida)\n`,\n },\n },\n },\n decorators: [\n (Story) => (\n <View\n style={{\n width: 360,\n padding: 16,\n backgroundColor: \"#F7F7F7\",\n borderRadius: 12,\n }}\n >\n <Story />\n </View>\n ),\n ],\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\n/**\n * STORIES\n */\n\n// 1) Aberto (básico)\nexport const AbertoBasico: Story = {\n name: \"aberto-basico\",\n args: {\n visible: true,\n },\n};\n\n// 2) Fechado (estado inicial comum)\nexport const Fechado: Story = {\n name: \"fechado\",\n args: {\n visible: false,\n },\n};\n\n// 3) Com título personalizado\nexport const TituloPersonalizado: Story = {\n name: \"titulo-personalizado\",\n args: {\n visible: true,\n textTitle: \"Justifique a alteração da atividade\",\n },\n};\n\n// 4) Interativo (controlado) — demonstra fluxo completo\nexport const ControladoInterativo: Story = {\n name: \"controlado-interativo\",\n render: (args) => {\n const Wrapper = () => {\n const [open, setOpen] = useState(false);\n\n return (\n <View>\n <Button title=\"Abrir modal\" onPress={() => setOpen(true)} />\n <Text style={{ marginTop: 12, fontSize: 12, color: \"#666\" }}>\n Clique para abrir e testar CANCELAR/CONFIRMAR.\n </Text>\n\n <ModalActivityReason\n {...args}\n visible={open}\n onClose={() => {\n // aciona painel de ações do Storybook\n // @ts-ignore\n args?.onClose?.();\n setOpen(false);\n }}\n modalConfirm={(value?: string) => {\n // @ts-ignore\n args?.modalConfirm?.(value);\n setOpen(false);\n }}\n textTitle={args.textTitle ?? \"Motivo da exclusão\"}\n />\n </View>\n );\n };\n\n return <Wrapper />;\n },\n args: {\n visible: false,\n },\n parameters: {\n docs: {\n description: {\n story:\n \"Exemplo **controlado**: o estado `visible` é gerenciado no Story para simular uso real.\",\n },\n },\n },\n};\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AAEvC,SAASC,IAAI,EAAEC,IAAI,EAAEC,MAAM,QAAQ,cAAc;;AAEjD;AACA,OAAOC,mBAAmB,MAAM,+CAA+C;;AAE/E;AACA;AACA;AACA,MAAMC,IAAsC,GAAG;EAC7CC,KAAK,EAAE,gCAAgC;EACvCC,SAAS,EAAEH,mBAA+B;EAC1CI,IAAI,EAAE,CAAC,UAAU,CAAC;EAClBC,IAAI,EAAE;IACJC,OAAO,EAAE,KAAK;IACdC,SAAS,EAAEC;EACb,CAAC;EACDC,QAAQ,EAAE;IACRH,OAAO,EAAE;MACPI,OAAO,EAAE;QAAEC,IAAI,EAAE;MAAU,CAAC;MAC5BC,WAAW,EAAE,mCAAmC;MAChDC,KAAK,EAAE;QAAEC,QAAQ,EAAE;MAAgB;IACrC,CAAC;IACDP,SAAS,EAAE;MACTG,OAAO,EAAE;QAAEC,IAAI,EAAE;MAAO,CAAC;MACzBC,WAAW,EACT,mFAAmF;MACrFC,KAAK,EAAE;QAAEC,QAAQ,EAAE;MAAY;IACjC,CAAC;IACDC,OAAO,EAAE;MACPC,MAAM,EAAE,SAAS;MACjBJ,WAAW,EACT,6FAA6F;MAC/FC,KAAK,EAAE;QAAEC,QAAQ,EAAE;MAAU;IAC/B,CAAC;IACDG,YAAY,EAAE;MACZD,MAAM,EAAE,cAAc;MACtBJ,WAAW,EACT,4GAA4G;MAC9GC,KAAK,EAAE;QAAEC,QAAQ,EAAE;MAAU;IAC/B;EACF,CAAC;EACDI,UAAU,EAAE;IACVC,QAAQ,EAAE;MAAEC,QAAQ,EAAE;IAAK,CAAC;IAC5BC,MAAM,EAAE,UAAU;IAClBC,IAAI,EAAE;MACJV,WAAW,EAAE;QACXT,SAAS,EAAE;AACnB;AACA;A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|
+
/* eslint-disable no-undef */
|
|
1
2
|
/**
|
|
2
3
|
* IMPORTS
|
|
3
4
|
*/
|
|
@@ -72,7 +73,10 @@ export const Fechado = {
|
|
|
72
73
|
export const Aberto = {
|
|
73
74
|
args: {
|
|
74
75
|
visible: true,
|
|
75
|
-
textTitle: "Incluir atividade"
|
|
76
|
+
textTitle: "Incluir atividade",
|
|
77
|
+
onPressConfirm: payload => {
|
|
78
|
+
console.log("payload", payload);
|
|
79
|
+
}
|
|
76
80
|
}
|
|
77
81
|
};
|
|
78
82
|
//# sourceMappingURL=modal-create-activitie.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ModalCreteActivitie","meta","title","component","args","visible","textTitle","argTypes","onClose","action","onPressConfirm","control","description","parameters","docs","Playground","render","createElement","Fechado","Aberto"],"sources":["modal-create-activitie.stories.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\n\n// component\nimport ModalCreteActivitie from \"../../components/modal-create-activitie\";\n\n// utils / types\ntype Props = React.ComponentProps<typeof ModalCreteActivitie>;\n\nconst meta: Meta<typeof ModalCreteActivitie> = {\n title: \"Componente/ModalCreteActivitie\",\n component: ModalCreteActivitie,\n args: {\n visible: false,\n textTitle: \"Incluir atividade\",\n },\n argTypes: {\n onClose: { action: \"onClose\" },\n onPressConfirm: { action: \"onPressConfirm\" },\n textTitle: {\n control: \"text\",\n description: \"Título exibido no cabeçalho do modal\",\n },\n visible: {\n control: \"boolean\",\n description: \"Controla a visibilidade do modal\",\n },\n },\n parameters: {\n docs: {\n description: {\n component: `\n### ModalCreteActivitie\nModal para incluir uma atividade com motivo, data e hora.\n\n#### Uso\n\\`\\`\\`tsx\n<ModalCreteActivitie\n visible={visible}\n onClose={() => {}}\n onPressConfirm={(payload) => {}}\n textTitle=\"Incluir atividade\"\n/>\n\\`\\`\\`\n\n- \\`visible\\`: abre/fecha o modal\n- \\`onClose\\`: chamado ao cancelar/fechar\n- \\`onPressConfirm\\`: retorna { reasonValue, label, dateAndHours }\n- \\`textTitle\\`: título opcional\n `,\n },\n },\n },\n} as Meta<typeof ModalCreteActivitie>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof ModalCreteActivitie>;\n\n/**\n * Apenas controla via Controls (visible true/false no painel do Storybook).\n * Evita Template com \"args: any\" e mantém tipagem estrita.\n */\nexport const Playground: Story = {\n render: (args: Props) => <ModalCreteActivitie {...args} />,\n};\n\nexport const Fechado: Story = {\n args: {\n visible: false,\n },\n};\n\nexport const Aberto: Story = {\n args: {\n visible: true,\n textTitle: \"Incluir atividade\",\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAGzB;AACA,OAAOC,mBAAmB,MAAM,yCAAyC;;AAEzE;;AAGA,MAAMC,IAAsC,GAAG;EAC7CC,KAAK,EAAE,gCAAgC;EACvCC,SAAS,EAAEH,mBAAmB;EAC9BI,IAAI,EAAE;IACJC,OAAO,EAAE,KAAK;IACdC,SAAS,EAAE;EACb,CAAC;EACDC,QAAQ,EAAE;IACRC,OAAO,EAAE;MAAEC,MAAM,EAAE;IAAU,CAAC;IAC9BC,cAAc,EAAE;MAAED,MAAM,EAAE;IAAiB,CAAC;IAC5CH,SAAS,EAAE;MACTK,OAAO,EAAE,MAAM;MACfC,WAAW,EAAE;IACf,CAAC;IACDP,OAAO,EAAE;MACPM,OAAO,EAAE,SAAS;MAClBC,WAAW,EAAE;IACf;EACF,CAAC;EACDC,UAAU,EAAE;IACVC,IAAI,EAAE;MACJF,WAAW,EAAE;QACXT,SAAS,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACM;IACF;EACF;AACF,CAAqC;AAErC,eAAeF,IAAI;AAInB;AACA;AACA;AACA;AACA,OAAO,MAAMc,UAAiB,GAAG;EAC/BC,MAAM,EAAGZ,IAAW,iBAAKL,KAAA,CAAAkB,aAAA,CAACjB,mBAAmB,EAAKI,IAAO;AAC3D,CAAC;AAED,OAAO,MAAMc,OAAc,GAAG;EAC5Bd,IAAI,EAAE;IACJC,OAAO,EAAE;EACX;AACF,CAAC;AAED,OAAO,MAAMc,MAAa,GAAG;EAC3Bf,IAAI,EAAE;IACJC,OAAO,EAAE,IAAI;IACbC,SAAS,EAAE;
|
|
1
|
+
{"version":3,"names":["React","ModalCreteActivitie","meta","title","component","args","visible","textTitle","argTypes","onClose","action","onPressConfirm","control","description","parameters","docs","Playground","render","createElement","Fechado","Aberto","payload","console","log"],"sources":["modal-create-activitie.stories.tsx"],"sourcesContent":["/* eslint-disable no-undef */\n/**\n * IMPORTS\n */\nimport React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\n\n// component\nimport ModalCreteActivitie from \"../../components/modal-create-activitie\";\n\n// utils / types\ntype Props = React.ComponentProps<typeof ModalCreteActivitie>;\n\nconst meta: Meta<typeof ModalCreteActivitie> = {\n title: \"Componente/ModalCreteActivitie\",\n component: ModalCreteActivitie,\n args: {\n visible: false,\n textTitle: \"Incluir atividade\",\n },\n argTypes: {\n onClose: { action: \"onClose\" },\n onPressConfirm: { action: \"onPressConfirm\" },\n textTitle: {\n control: \"text\",\n description: \"Título exibido no cabeçalho do modal\",\n },\n visible: {\n control: \"boolean\",\n description: \"Controla a visibilidade do modal\",\n },\n },\n parameters: {\n docs: {\n description: {\n component: `\n### ModalCreteActivitie\nModal para incluir uma atividade com motivo, data e hora.\n\n#### Uso\n\\`\\`\\`tsx\n<ModalCreteActivitie\n visible={visible}\n onClose={() => {}}\n onPressConfirm={(payload) => {}}\n textTitle=\"Incluir atividade\"\n/>\n\\`\\`\\`\n\n- \\`visible\\`: abre/fecha o modal\n- \\`onClose\\`: chamado ao cancelar/fechar\n- \\`onPressConfirm\\`: retorna { reasonValue, label, dateAndHours }\n- \\`textTitle\\`: título opcional\n `,\n },\n },\n },\n} as Meta<typeof ModalCreteActivitie>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof ModalCreteActivitie>;\n\n/**\n * Apenas controla via Controls (visible true/false no painel do Storybook).\n * Evita Template com \"args: any\" e mantém tipagem estrita.\n */\nexport const Playground: Story = {\n render: (args: Props) => <ModalCreteActivitie {...args} />,\n};\n\nexport const Fechado: Story = {\n args: {\n visible: false,\n },\n};\n\nexport const Aberto: Story = {\n args: {\n visible: true,\n textTitle: \"Incluir atividade\",\n onPressConfirm: (payload) => {\n console.log(\"payload\", payload);\n },\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAGzB;AACA,OAAOC,mBAAmB,MAAM,yCAAyC;;AAEzE;;AAGA,MAAMC,IAAsC,GAAG;EAC7CC,KAAK,EAAE,gCAAgC;EACvCC,SAAS,EAAEH,mBAAmB;EAC9BI,IAAI,EAAE;IACJC,OAAO,EAAE,KAAK;IACdC,SAAS,EAAE;EACb,CAAC;EACDC,QAAQ,EAAE;IACRC,OAAO,EAAE;MAAEC,MAAM,EAAE;IAAU,CAAC;IAC9BC,cAAc,EAAE;MAAED,MAAM,EAAE;IAAiB,CAAC;IAC5CH,SAAS,EAAE;MACTK,OAAO,EAAE,MAAM;MACfC,WAAW,EAAE;IACf,CAAC;IACDP,OAAO,EAAE;MACPM,OAAO,EAAE,SAAS;MAClBC,WAAW,EAAE;IACf;EACF,CAAC;EACDC,UAAU,EAAE;IACVC,IAAI,EAAE;MACJF,WAAW,EAAE;QACXT,SAAS,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACM;IACF;EACF;AACF,CAAqC;AAErC,eAAeF,IAAI;AAInB;AACA;AACA;AACA;AACA,OAAO,MAAMc,UAAiB,GAAG;EAC/BC,MAAM,EAAGZ,IAAW,iBAAKL,KAAA,CAAAkB,aAAA,CAACjB,mBAAmB,EAAKI,IAAO;AAC3D,CAAC;AAED,OAAO,MAAMc,OAAc,GAAG;EAC5Bd,IAAI,EAAE;IACJC,OAAO,EAAE;EACX;AACF,CAAC;AAED,OAAO,MAAMc,MAAa,GAAG;EAC3Bf,IAAI,EAAE;IACJC,OAAO,EAAE,IAAI;IACbC,SAAS,EAAE,mBAAmB;IAC9BI,cAAc,EAAGU,OAAO,IAAK;MAC3BC,OAAO,CAACC,GAAG,CAAC,SAAS,EAAEF,OAAO,CAAC;IACjC;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -12,3 +12,10 @@ export interface IActivity {
|
|
|
12
12
|
* Atividades específicas por tipo de usuário
|
|
13
13
|
*/
|
|
14
14
|
export declare const activitiesByDriverType: Record<string, Record<string, IActivity[]>>;
|
|
15
|
+
/**
|
|
16
|
+
* Atividades para retificação
|
|
17
|
+
*/
|
|
18
|
+
export declare const retificacaoActivities: {
|
|
19
|
+
value: number;
|
|
20
|
+
label: string;
|
|
21
|
+
}[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-exp-fig",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
4
4
|
"description": "Biblioteca para desenvolvimento dos componentes para utilizar nos app da Expresso Figueiredo.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
"babel-plugin-react-docgen-typescript": "^1.5.1",
|
|
106
106
|
"babel-plugin-react-native-web": "^0.19.12",
|
|
107
107
|
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
|
|
108
|
+
"baseline-browser-mapping": "2.9.2",
|
|
108
109
|
"commitlint": "^17.0.2",
|
|
109
110
|
"del-cli": "^5.1.0",
|
|
110
111
|
"eslint": "^9.19.0",
|
|
@@ -181,19 +182,14 @@
|
|
|
181
182
|
},
|
|
182
183
|
"dependencies": {
|
|
183
184
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
184
|
-
"@react-native-community/datetimepicker": "
|
|
185
|
+
"@react-native-community/datetimepicker": ">=8.0.0",
|
|
185
186
|
"@react-native-community/slider": "^4.5.3",
|
|
186
187
|
"@storybook/test": "^8.3.0",
|
|
187
188
|
"jest-environment-jsdom": "^29.7.0",
|
|
188
189
|
"jest-matcher-utils": "^29.7.0",
|
|
189
|
-
"react": "*",
|
|
190
|
-
"react-dom": "*",
|
|
191
|
-
"react-native": "*",
|
|
192
|
-
"react-native-exp-fig": "^0.1.34",
|
|
193
190
|
"react-native-gesture-handler": "^2.19.0",
|
|
194
191
|
"react-native-reanimated": "^3.16.7",
|
|
195
|
-
"react-native-
|
|
196
|
-
"react-native-svg": "^15.6.0",
|
|
192
|
+
"react-native-svg": "15.15.1",
|
|
197
193
|
"react-native-web": "^0.19.12",
|
|
198
194
|
"ts-jest": "^29.1.1",
|
|
199
195
|
"ts-node": "^10.9.1",
|