react-native-exp-fig 0.1.23 → 0.1.25
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/image-capture-with-remove/index.js +2 -1
- package/lib/commonjs/components/image-capture-with-remove/index.js.map +1 -1
- package/lib/commonjs/components/image-capture-with-remove/interface.d.js.map +1 -1
- package/lib/commonjs/components/modal-change-activity/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/index.js +69 -58
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/interface.d.js.map +1 -1
- package/lib/commonjs/components/step-indicator/styles.js +8 -10
- package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
- package/lib/commonjs/index.js +2 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js +0 -2
- package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -1
- package/lib/commonjs/stories/step-indicator/step-indicator.stories.js +13 -7
- package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
- package/lib/commonjs/utils/format-date/index.js +54 -0
- package/lib/commonjs/utils/format-date/index.js.map +1 -0
- package/lib/commonjs/utils/get-icon-by-property/index.js +10 -11
- package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -1
- package/lib/module/components/image-capture-with-remove/index.js +2 -1
- package/lib/module/components/image-capture-with-remove/index.js.map +1 -1
- package/lib/module/components/image-capture-with-remove/interface.d.js.map +1 -1
- package/lib/module/components/modal-change-activity/index.js.map +1 -1
- package/lib/module/components/step-indicator/index.js +69 -58
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/step-indicator/interface.d.js.map +1 -1
- package/lib/module/components/step-indicator/styles.js +8 -10
- package/lib/module/components/step-indicator/styles.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js +0 -2
- package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -1
- package/lib/module/stories/step-indicator/step-indicator.stories.js +11 -6
- package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
- package/lib/module/utils/format-date/index.js +50 -0
- package/lib/module/utils/format-date/index.js.map +1 -0
- package/lib/module/utils/get-icon-by-property/index.js +10 -11
- package/lib/module/utils/get-icon-by-property/index.js.map +1 -1
- package/lib/typescript/src/components/modal-change-activity/index.d.ts +0 -2
- package/lib/typescript/src/components/step-indicator/index.d.ts +2 -2
- package/lib/typescript/src/components/step-indicator/styles.d.ts +2 -3
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/stories/step-indicator/step-indicator.stories.d.ts +1 -1
- package/lib/typescript/src/utils/format-date/index.d.ts +24 -0
- package/package.json +1 -1
- package/src/components/image-capture-with-remove/index.tsx +2 -1
- package/src/components/image-capture-with-remove/interface.d.ts +2 -0
- package/src/components/modal-change-activity/index.tsx +0 -2
- package/src/components/step-indicator/index.tsx +235 -222
- package/src/components/step-indicator/interface.d.ts +47 -35
- package/src/components/step-indicator/styles.ts +66 -68
- package/src/index.ts +1 -1
- package/src/stories/modal-change-activity/modal-change-activity.stories.tsx +0 -2
- package/src/stories/step-indicator/step-indicator.stories.tsx +159 -154
- package/src/utils/format-date/index.ts +58 -0
- package/src/utils/get-icon-by-property/index.tsx +65 -67
|
@@ -34,6 +34,7 @@ const ImageCaptureWithRemove = ({
|
|
|
34
34
|
height = 50,
|
|
35
35
|
foto = null,
|
|
36
36
|
useRemove = true,
|
|
37
|
+
disabled,
|
|
37
38
|
status,
|
|
38
39
|
handleTakePhoto,
|
|
39
40
|
onRemove
|
|
@@ -46,7 +47,7 @@ const ImageCaptureWithRemove = ({
|
|
|
46
47
|
position: "relative"
|
|
47
48
|
},
|
|
48
49
|
onPress: handleTakePhoto,
|
|
49
|
-
disabled: !!foto
|
|
50
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : !!foto
|
|
50
51
|
}, /*#__PURE__*/_react.default.createElement(_box.default, {
|
|
51
52
|
width: width,
|
|
52
53
|
height: height,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_box","_iconsSvg","_theme","_returnColor","e","__esModule","default","ImageCaptureWithRemove","width","height","foto","useRemove","status","handleTakePhoto","onRemove","statusColor","createElement","TouchableOpacity","testID","activeOpacity","style","position","onPress","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_box","_iconsSvg","_theme","_returnColor","e","__esModule","default","ImageCaptureWithRemove","width","height","foto","useRemove","disabled","status","handleTakePhoto","onRemove","statusColor","createElement","TouchableOpacity","testID","activeOpacity","style","position","onPress","flexStyle","flexDirection","alignItems","justifyContent","borderStyled","borderWidth","theme","borderWidths","thick","thin","borderRadius","fontSizes","md","borderColor","getBorderColor","colors","blue","Fragment","Image","resizeMode","source","uri","top","right","Icons","icon","color","red","size","exports"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React from \"react\";\nimport { Image, TouchableOpacity } from \"react-native\";\n\n// components\nimport Box from \"../box\";\n\n// comons / icons\nimport { Icons } from \"../../common/icons-svg\";\n\n// typings\nimport { IImageCaptureWithRemoveProps } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\n// utils\nimport { getBorderColor } from \"../../utils/status-color/return-color\";\n\n/**\n *\n * Componente ImageCaptureWithRemove para a interação do usuário com ui.\n */\nconst ImageCaptureWithRemove: React.FC<IImageCaptureWithRemoveProps> = ({\n width = 50,\n height = 50,\n foto = null,\n useRemove = true,\n disabled,\n status,\n handleTakePhoto,\n onRemove,\n}: IImageCaptureWithRemoveProps) => {\n const statusColor = status === \"Cancelado\" || status === \"Pendente\";\n\n return (\n <TouchableOpacity\n testID=\"image-capture-touchable\"\n activeOpacity={0.7}\n style={{ position: \"relative\" }}\n onPress={handleTakePhoto}\n disabled={disabled ?? !!foto}\n >\n <Box\n width={width}\n height={height}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\", justifyContent: \"center\" }}\n testID=\"plus-icon-box\"\n borderStyled={{\n borderWidth: statusColor ? theme.borderWidths.thick : theme.borderWidths.thin,\n borderRadius: theme.fontSizes.md,\n borderColor: statusColor ? getBorderColor(status) : theme.colors.blue[400],\n }}\n >\n {foto ? (\n <>\n <Image\n testID=\"captured-image\"\n style={{\n width: \"100%\",\n height: \"100%\",\n borderRadius: theme.fontSizes.md,\n resizeMode: \"cover\",\n }}\n source={{\n uri: foto,\n }}\n />\n\n {useRemove && (\n <TouchableOpacity\n testID=\"remove-button\"\n style={{ position: \"absolute\", top: 2, right: 4 }}\n onPress={onRemove}\n >\n <Icons icon=\"X_CIRCLE\" color={theme.colors.red[400]} size={18} />\n </TouchableOpacity>\n )}\n </>\n ) : (\n <Icons icon=\"PLUS\" color={theme.colors.blue[400]} />\n )}\n </Box>\n </TouchableOpacity>\n );\n};\n\n/**\n * EXPORTS\n */\nexport { ImageCaptureWithRemove };\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,IAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,SAAA,GAAAH,OAAA;AAMA,IAAAI,MAAA,GAAAJ,OAAA;AAGA,IAAAK,YAAA,GAAAL,OAAA;AAAuE,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAnBvE;AACA;AACA;;AAIA;;AAGA;;AAGA;;AAGA;;AAGA;;AAGA;AACA;AACA;AACA;AACA,MAAMG,sBAA8D,GAAGA,CAAC;EACtEC,KAAK,GAAG,EAAE;EACVC,MAAM,GAAG,EAAE;EACXC,IAAI,GAAG,IAAI;EACXC,SAAS,GAAG,IAAI;EAChBC,QAAQ;EACRC,MAAM;EACNC,e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S,CAACC,EAAE;MAChCO,UAAU,EAAE;IACd,CAAE;IACFC,MAAM,EAAE;MACNC,GAAG,EAAEnC;IACP;EAAE,CACH,CAAC,EAEDC,SAAS,iBACRf,MAAA,CAAAU,OAAA,CAAAW,aAAA,CAAClB,YAAA,CAAAmB,gBAAgB;IACfC,MAAM,EAAC,eAAe;IACtBE,KAAK,EAAE;MAAEC,QAAQ,EAAE,UAAU;MAAEwB,GAAG,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAE,CAAE;IAClDxB,OAAO,EAAER;EAAS,gBAElBnB,MAAA,CAAAU,OAAA,CAAAW,aAAA,CAAChB,SAAA,CAAA+C,KAAK;IAACC,IAAI,EAAC,UAAU;IAACC,KAAK,EAAEpB,YAAK,CAACS,MAAM,CAACY,GAAG,CAAC,GAAG,CAAE;IAACC,IAAI,EAAE;EAAG,CAAE,CAChD,CAEpB,CAAC,gBAEHxD,MAAA,CAAAU,OAAA,CAAAW,aAAA,CAAChB,SAAA,CAAA+C,KAAK;IAACC,IAAI,EAAC,MAAM;IAACC,KAAK,EAAEpB,YAAK,CAACS,MAAM,CAACC,IAAI,CAAC,GAAG;EAAE,CAAE,CAElD,CACW,CAAC;AAEvB,CAAC;;AAED;AACA;AACA;AAFAa,OAAA,CAAA9C,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/**\n * IMPORTS\n */\ntype IImageCaptureWithRemoveProps = {\n /**define o tamanho */\n width?: number;\n /**define o altura */\n height?: number;\n /**Imagem capturada */\n foto?: string | null;\n\n /**Define o status das fotos */\n status?: \"Pendente\" | \"Concluido\" | \"Cancelado\" | \"Andamento\";\n\n /**propiedade que define se e para utilizar o metódo de remover */\n useRemove?: boolean;\n\n /**Remove a imagem capturada */\n onRemove: () => void;\n\n /**Captura a imagem */\n handleTakePhoto: () => void;\n};\n\n/**\n * EXPORTS\n */\nexport { IImageCaptureWithRemoveProps };\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/**\n * IMPORTS\n */\ntype IImageCaptureWithRemoveProps = {\n /**define o tamanho */\n width?: number;\n /**define o altura */\n height?: number;\n /**Imagem capturada */\n foto?: string | null;\n\n /**Define o status das fotos */\n status?: \"Pendente\" | \"Concluido\" | \"Cancelado\" | \"Andamento\";\n\n /**propiedade que define se e para utilizar o metódo de remover */\n useRemove?: boolean;\n\n disabled?: boolean;\n\n /**Remove a imagem capturada */\n onRemove: () => void;\n\n /**Captura a imagem */\n handleTakePhoto: () => void;\n};\n\n/**\n * EXPORTS\n */\nexport { IImageCaptureWithRemoveProps };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_box","_typography","_selectOption","_button","_theme","_iconsSvg","e","__esModule","default","options","label","value","key","ModalChangeActivity","visible","onClose","modalConfirm","descricao","isLoading","React","useState","initial","toLowerCase","replace","selectedOption","setSelectedOption","handleConfirm","selected","find","opt","createElement","Modal","animationType","transparent","View","style","flex","justifyContent","alignItems","backgroundColor","width","theme","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","margins","marginLeft","flexStyle","flexDirection","Icons","icon","color","black","background","yellow","size","Typography","text","fontFamily","fonts","inter_bold_700","fontSizes","md","neutral","padding","xs","inter_medium_500","flexWrap","maxWidth","SelectOption","titleLabel","sizeTitleLabel","dataOption","handleSelectDown","option","o","marginTop","Button","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor","exports"],"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 { SelectOption } from \"../selects/select-option\";\nimport { Button } from \"../button\";\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 dataRegistro: string;\n descricao: string;\n imagemUrl?: 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>\n );\n};\n"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,IAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAGA,IAAAM,MAAA,GAAAN,OAAA;AAGA,IAAAO,SAAA,GAAAP,OAAA;AAA+C,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAlB/C;AACA;AACA;AACA;;AAEA;;AAGA;;AAMA;;AAGA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;AACA,MAAMG,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;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react","_interopRequireDefault","require","_reactNative","_box","_typography","_selectOption","_button","_theme","_iconsSvg","e","__esModule","default","options","label","value","key","ModalChangeActivity","visible","onClose","modalConfirm","descricao","isLoading","React","useState","initial","toLowerCase","replace","selectedOption","setSelectedOption","handleConfirm","selected","find","opt","createElement","Modal","animationType","transparent","View","style","flex","justifyContent","alignItems","backgroundColor","width","theme","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","margins","marginLeft","flexStyle","flexDirection","Icons","icon","color","black","background","yellow","size","Typography","text","fontFamily","fonts","inter_bold_700","fontSizes","md","neutral","padding","xs","inter_medium_500","flexWrap","maxWidth","SelectOption","titleLabel","sizeTitleLabel","dataOption","handleSelectDown","option","o","marginTop","Button","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor","exports"],"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 { SelectOption } from \"../selects/select-option\";\nimport { Button } from \"../button\";\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>\n );\n};\n"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,O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IACpBqB,eAAe,EAAEE,YAAK,CAACC,MAAM,CAACqD,IAAI,CAAC,GAAG,CAAE;IACxCD,eAAe,EAAE;MACf/B,KAAK,EAAE,MAAM;MACbO,UAAU,EAAE,cAAc;MAC1B0B,QAAQ,EAAEvD,YAAK,CAACgC,SAAS,CAACI,EAAE;MAC5BoB,UAAU,EAAE;IACd,CAAE;IACFtC,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBtB,UAAU,EAAE,QAAQ;MACpBD,cAAc,EAAE,QAAQ;MACxB6D,SAAS,EAAE;IACb,CAAE;IACFtD,YAAY,EAAE;MACZuD,WAAW,EAAE1D,YAAK,CAACK,YAAY,CAACsD,IAAI;MACpCC,WAAW,EAAE5D,YAAK,CAACC,MAAM,CAACqD,IAAI,CAAC,GAAG,CAAC;MACnClD,YAAY,EAAEJ,YAAK,CAACK,YAAY,CAACC;IACnC;EAAE,CACH,CACE,CACF,CACF,CACD,CACD,CAAC;AAEZ,CAAC;AAACuD,OAAA,CAAAzF,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -3,48 +3,48 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _iconsSvg = require("../../common/icons-svg");
|
|
9
10
|
var _getIconByStatus = require("./helpers/get-icon-by-status");
|
|
10
11
|
var _styles = require("./styles");
|
|
11
|
-
var _iconsSvg = require("../../common/icons-svg");
|
|
12
12
|
var _formatData = require("../../utils/format-data");
|
|
13
13
|
var _theme = require("../../styles/theme/theme");
|
|
14
14
|
var _modalChangeActivity = require("../modal-change-activity");
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
/**
|
|
17
|
-
* IMPORTS
|
|
16
|
+
/**
|
|
17
|
+
* IMPORTS
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
+
// commons / svg
|
|
21
|
+
|
|
22
|
+
// helpers
|
|
23
|
+
|
|
20
24
|
// typings
|
|
21
25
|
|
|
22
26
|
// styles
|
|
23
27
|
|
|
24
|
-
/**
|
|
25
|
-
* Componente StepIndicator para a interação da ui.
|
|
28
|
+
/**
|
|
29
|
+
* Componente StepIndicator para a interação da ui.
|
|
26
30
|
*/
|
|
27
|
-
|
|
28
31
|
const StepIndicator = ({
|
|
29
32
|
data = [],
|
|
30
33
|
type,
|
|
31
34
|
textColorDescription,
|
|
32
35
|
titleColor,
|
|
33
|
-
titleNumberColor
|
|
36
|
+
titleNumberColor,
|
|
37
|
+
onChangeActivity
|
|
34
38
|
}) => {
|
|
35
39
|
const StepDefault = () => {
|
|
36
|
-
var _stepData;
|
|
37
40
|
const [isModalVisible, setIsModalVisible] = _react.default.useState(false);
|
|
38
41
|
const [currentStepIndex, setCurrentStepIndex] = _react.default.useState(null);
|
|
39
42
|
const [stepData, setStepData] = _react.default.useState(data);
|
|
40
|
-
const
|
|
43
|
+
const handleOnPressActivitie = (stepItem, index) => {
|
|
41
44
|
var _stepItem$descricao, _stepItem$descricao$t;
|
|
42
|
-
const stepItem = stepData[index];
|
|
43
45
|
const desc = stepItem === null || stepItem === void 0 || (_stepItem$descricao = stepItem.descricao) === null || _stepItem$descricao === void 0 || (_stepItem$descricao$t = _stepItem$descricao.toLowerCase) === null || _stepItem$descricao$t === void 0 ? void 0 : _stepItem$descricao$t.call(_stepItem$descricao);
|
|
44
46
|
if (!desc) return;
|
|
45
47
|
const isDescanso = ["descanso", "refeição", "repouso_noturno", "repouso_semanal"].includes(desc.replace(/\s+/g, "_"));
|
|
46
|
-
|
|
47
|
-
// Só abre o modal se for do tipo descanso E se estiver sincronizado
|
|
48
48
|
if (isDescanso && (stepItem === null || stepItem === void 0 ? void 0 : stepItem.sincronizado) === true) {
|
|
49
49
|
setCurrentStepIndex(index);
|
|
50
50
|
setIsModalVisible(true);
|
|
@@ -52,58 +52,69 @@ const StepIndicator = ({
|
|
|
52
52
|
};
|
|
53
53
|
const handleConfirmModal = newData => {
|
|
54
54
|
if (currentStepIndex !== null) {
|
|
55
|
-
const
|
|
56
|
-
...
|
|
55
|
+
const updatedStep = {
|
|
56
|
+
...stepData[currentStepIndex],
|
|
57
57
|
descricao: newData.label,
|
|
58
58
|
tipo_atividade: newData.value,
|
|
59
59
|
identificador: newData.key
|
|
60
|
-
}
|
|
60
|
+
};
|
|
61
|
+
const newSteps = stepData.map((item, index) => index === currentStepIndex ? updatedStep : item);
|
|
61
62
|
setStepData(newSteps);
|
|
63
|
+
if (onChangeActivity) {
|
|
64
|
+
onChangeActivity(updatedStep);
|
|
65
|
+
}
|
|
62
66
|
}
|
|
63
67
|
setIsModalVisible(false);
|
|
64
68
|
setCurrentStepIndex(null);
|
|
65
69
|
};
|
|
66
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, stepData.length > 0 && stepData.map((history, index) =>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}).
|
|
101
|
-
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, stepData.length > 0 && stepData.map((history, index) => {
|
|
71
|
+
const isFirst = index === 0;
|
|
72
|
+
const isEditableType = history.tipo === "descanso";
|
|
73
|
+
const isSynced = (history === null || history === void 0 ? void 0 : history.sincronizado) === true;
|
|
74
|
+
const canEdit = isFirst && isEditableType && isSynced;
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
76
|
+
testID: "step-indicator",
|
|
77
|
+
activeOpacity: 0.7,
|
|
78
|
+
key: history.jr_tipo_atividade_id,
|
|
79
|
+
style: (0, _styles.styles)({}).containerIndicator,
|
|
80
|
+
disabled: !canEdit,
|
|
81
|
+
onPress: () => handleOnPressActivitie(history, index)
|
|
82
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
83
|
+
style: (0, _styles.styles)({
|
|
84
|
+
sincronizado: history.sincronizado
|
|
85
|
+
}).containerBall
|
|
86
|
+
}, stepData.length > 1 && index < stepData.length - 1 && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
87
|
+
style: {
|
|
88
|
+
width: 2,
|
|
89
|
+
height: 84,
|
|
90
|
+
marginTop: 116,
|
|
91
|
+
position: "relative",
|
|
92
|
+
backgroundColor: history.sincronizado ? _theme.theme.colors.blue[500] : _theme.theme.colors.orange[150]
|
|
93
|
+
}
|
|
94
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
95
|
+
style: (0, _styles.styles)({
|
|
96
|
+
titleNumberColor
|
|
97
|
+
}).titleNumber
|
|
98
|
+
}, stepData.length - index)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
99
|
+
style: (0, _styles.styles)({}).containerMain
|
|
100
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
101
|
+
style: (0, _styles.styles)({
|
|
102
|
+
titleColor
|
|
103
|
+
}).title
|
|
104
|
+
}, history === null || history === void 0 ? void 0 : history.descricao), (history === null || history === void 0 ? void 0 : history.data_inicio) && /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
105
|
+
style: (0, _styles.styles)({
|
|
106
|
+
textColorDescription
|
|
107
|
+
}).titleDescription
|
|
108
|
+
}, `Inicio: ${history.data_inicio} ás ${history.data_fim}`), history.duracao_segundos && /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
109
|
+
style: (0, _styles.styles)({
|
|
110
|
+
textColorDescription
|
|
111
|
+
}).titleDescription
|
|
112
|
+
}, "Dura\xE7\xE3o: ", (0, _formatData.formHoursMinute)(history === null || history === void 0 ? void 0 : history.duracao_segundos))));
|
|
113
|
+
}), isModalVisible && /*#__PURE__*/_react.default.createElement(_modalChangeActivity.ModalChangeActivity, {
|
|
102
114
|
visible: isModalVisible,
|
|
103
|
-
onClose: () => setIsModalVisible(false),
|
|
104
115
|
modalConfirm: handleConfirmModal,
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
descricao: "",
|
|
117
|
+
onClose: () => setIsModalVisible(false)
|
|
107
118
|
}));
|
|
108
119
|
};
|
|
109
120
|
const StepCustom = () => {
|
|
@@ -176,8 +187,8 @@ const StepIndicator = ({
|
|
|
176
187
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, handleRenderComponent(type));
|
|
177
188
|
};
|
|
178
189
|
|
|
179
|
-
/**
|
|
180
|
-
* EXPORTS
|
|
190
|
+
/**
|
|
191
|
+
* EXPORTS
|
|
181
192
|
*/
|
|
182
|
-
exports.
|
|
193
|
+
var _default = exports.default = StepIndicator;
|
|
183
194
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_getIconByStatus","_styles","_iconsSvg","_formatData","_theme","_modalChangeActivity","e","__esModule","default","StepIndicator","data","type","textColorDescription","titleColor","titleNumberColor","StepDefault","_stepData","isModalVisible","setIsModalVisible","React","useState","currentStepIndex","setCurrentStepIndex","stepData","setStepData","handleOpenModal","index","_stepItem$descricao","_stepItem$descricao$t","stepItem","desc","descricao","toLowerCase","call","isDescanso","includes","replace","sincronizado","handleConfirmModal","newData","newSteps","map","item","label","tipo_atividade","value","identificador","key","createElement","Fragment","length","history","View","testID","style","styles","containerIndicator","id","containerBall","width","height","marginTop","position","backgroundColor","theme","colors","blue","orange","Text","titleNumber","containerMain","onTouchEnd","title","data_inicio","titleDescription","data_fim","duracao_segundos","formHoursMinute","ModalChangeActivity","visible","onClose","modalConfirm","dataRegistro","StepCustom","paddingHorizontal","display","flexDirection","step","indexCustom","getIconKeyByValue","borderRadius","alignItems","justifyContent","borderWidth","borderColor","Icons","icon","top","fontWeight","fontSize","lineHeight","textAlign","color","handleRenderComponent","stepType","exports"],"sources":["index.tsx"],"sourcesContent":["/**\r\n * IMPORTS\r\n */\r\nimport React from \"react\";\r\nimport { View, Text } from \"react-native\";\r\n\r\nimport { getIconKeyByValue } from \"./helpers/get-icon-by-status\";\r\n\r\n// typings\r\nimport { IStepIndicator } from \"./interface\";\r\n\r\n// styles\r\nimport { styles } from \"./styles\";\r\nimport { Icons } from \"../../common/icons-svg\";\r\nimport { formHoursMinute } from \"../../utils/format-data\";\r\nimport { theme } from \"../../styles/theme/theme\";\r\nimport { ModalChangeActivity } from \"../modal-change-activity\";\r\n\r\n/**\r\n * Componente StepIndicator para a interação da ui.\r\n */\r\n\r\nconst StepIndicator: React.FC<IStepIndicator> = ({\r\n data = [],\r\n type,\r\n textColorDescription,\r\n titleColor,\r\n titleNumberColor,\r\n}) => {\r\n const StepDefault = () => {\r\n const [isModalVisible, setIsModalVisible] = React.useState(false);\r\n const [currentStepIndex, setCurrentStepIndex] = React.useState<number | null>(null);\r\n const [stepData, setStepData] = React.useState(data);\r\n\r\n const handleOpenModal = (index: number) => {\r\n const stepItem = stepData[index];\r\n const desc = stepItem?.descricao?.toLowerCase?.();\r\n if (!desc) return;\r\n \r\n const isDescanso = [\r\n \"descanso\",\r\n \"refeição\",\r\n \"repouso_noturno\",\r\n \"repouso_semanal\",\r\n ].includes(desc.replace(/\\s+/g, \"_\"));\r\n\r\n // Só abre o modal se for do tipo descanso E se estiver sincronizado\r\n if (isDescanso && stepItem?.sincronizado === true) {\r\n setCurrentStepIndex(index);\r\n setIsModalVisible(true);\r\n }\r\n };\r\n\r\n const handleConfirmModal = (newData: { label: string; value: string; key: number }) => {\r\n if (currentStepIndex !== null) {\r\n const newSteps = stepData.map((item, index) =>\r\n index === currentStepIndex\r\n ? { ...item, descricao: newData.label, tipo_atividade: newData.value, identificador: newData.key }\r\n : item\r\n );\r\n setStepData(newSteps);\r\n }\r\n\r\n setIsModalVisible(false);\r\n setCurrentStepIndex(null);\r\n };\r\n\r\n return (\r\n <>\r\n {stepData.length > 0 &&\r\n stepData.map((history, index) => (\r\n <View\r\n testID=\"step-indicator\"\r\n style={styles({}).containerIndicator}\r\n key={`${history.id}-${index}`}\r\n >\r\n <View style={styles({ sincronizado: history.sincronizado }).containerBall}>\r\n {stepData.length > 1 && index < stepData.length - 1 && (\r\n <View\r\n style={{\r\n width: 2,\r\n height: 84,\r\n marginTop: 116,\r\n position: \"relative\",\r\n backgroundColor: history.sincronizado\r\n ? theme.colors.blue[500]\r\n : theme.colors.orange[150],\r\n }}\r\n />\r\n )}\r\n <Text style={styles({ titleNumberColor }).titleNumber}>\r\n {stepData.length - index}\r\n </Text>\r\n </View>\r\n\r\n <View\r\n style={styles({}).containerMain}\r\n onTouchEnd={() => handleOpenModal(index)}\r\n >\r\n <Text style={styles({ titleColor }).title}>{history?.descricao}</Text>\r\n\r\n {history?.data_inicio && (\r\n <Text style={styles({ textColorDescription }).titleDescription}>\r\n {`Inicio: ${history.data_inicio} às ${history.data_fim}`}\r\n </Text>\r\n )}\r\n\r\n {history.duracao_segundos && (\r\n <Text style={styles({ textColorDescription }).titleDescription}>\r\n Duração: {formHoursMinute(history?.duracao_segundos as string)}\r\n </Text>\r\n )}\r\n </View>\r\n </View>\r\n ))}\r\n\r\n {isModalVisible && currentStepIndex !== null && (\r\n <ModalChangeActivity\r\n visible={isModalVisible}\r\n onClose={() => setIsModalVisible(false)}\r\n modalConfirm={handleConfirmModal}\r\n dataRegistro={\"\"}\r\n descricao={stepData[currentStepIndex!]?.descricao || \"\"}\r\n />\r\n )}\r\n </>\r\n );\r\n };\r\n\r\n\r\n const StepCustom = () => {\r\n return (\r\n <View\r\n style={{\r\n width: \"100%\",\r\n height: 84,\r\n paddingHorizontal: 24,\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n }}\r\n >\r\n {data.map((step, indexCustom) => {\r\n const descricao = getIconKeyByValue(step.descricao);\r\n\r\n return (\r\n <React.Fragment key={`step-${indexCustom}`}>\r\n <View\r\n style={{\r\n width: 45,\r\n height: 45,\r\n backgroundColor: indexCustom <= 3 ? \"orange\" : \"transparent\",\r\n borderRadius: 50,\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n borderWidth: 1,\r\n borderColor: \"#fff\",\r\n }}\r\n >\r\n <View\r\n style={{\r\n width: 45,\r\n height: 45,\r\n backgroundColor: \"transparent\",\r\n borderRadius: 50,\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n }}\r\n >\r\n {descricao && <Icons icon={descricao} />}\r\n </View>\r\n <Text\r\n style={{\r\n position: \"absolute\",\r\n top: 56,\r\n fontWeight: \"600\",\r\n fontSize: 10,\r\n lineHeight: 14,\r\n textAlign: \"center\",\r\n color: \"#fff\",\r\n width: 75,\r\n }}\r\n >\r\n {step.descricao}\r\n </Text>\r\n </View>\r\n\r\n {data?.length > 1 && indexCustom < data?.length - 1 && (\r\n <View\r\n style={{\r\n width: 35,\r\n height: 2,\r\n marginTop: 24,\r\n position: \"relative\",\r\n backgroundColor: \"orange\",\r\n }}\r\n />\r\n )}\r\n </React.Fragment>\r\n );\r\n })}\r\n </View>\r\n );\r\n };\r\n\r\n const handleRenderComponent = (stepType: \"default\" | \"custom\") => {\r\n switch (stepType) {\r\n case \"default\":\r\n return <StepDefault />;\r\n case \"custom\":\r\n return <StepCustom />;\r\n default:\r\n return <View />;\r\n }\r\n };\r\n\r\n return <>{handleRenderComponent(type!)}</>;\r\n};\r\n\r\n/**\r\n * EXPORTS\r\n */\r\nexport { StepIndicator };\r\n"],"mappings":";;;;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reactNative","_iconsSvg","_getIconByStatus","_styles","_formatData","_theme","_modalChangeActivity","e","__esModule","default","StepIndicator","data","type","textColorDescription","titleColor","titleNumberColor","onChangeActivity","StepDefault","isModalVisible","setIsModalVisible","React","useState","currentStepIndex","setCurrentStepIndex","stepData","setStepData","handleOnPressActivitie","stepItem","index","_stepItem$descricao","_stepItem$descricao$t","desc","descricao","toLowerCase","call","isDescanso","includes","replace","sincronizado","handleConfirmModal","newData","updatedStep","label","tipo_atividade","value","identificador","key","newSteps","map","item","createElement","Fragment","length","history","isFirst","isEditableType","tipo","isSynced","canEdit","TouchableOpacity","testID","activeOpacity","jr_tipo_atividade_id","style","styles","containerIndicator","disabled","onPress","View","containerBall","width","height","marginTop","position","backgroundColor","theme","colors","blue","orange","Text","titleNumber","containerMain","title","data_inicio","titleDescription","data_fim","duracao_segundos","formHoursMinute","ModalChangeActivity","visible","modalConfirm","onClose","StepCustom","paddingHorizontal","display","flexDirection","step","indexCustom","getIconKeyByValue","borderRadius","alignItems","justifyContent","borderWidth","borderColor","Icons","icon","top","fontWeight","fontSize","lineHeight","textAlign","color","handleRenderComponent","stepType","_default","exports"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React from \"react\";\nimport { View, Text, TouchableOpacity } from \"react-native\";\n\n// commons / svg\nimport { Icons } from \"../../common/icons-svg\";\n\n// helpers\nimport { getIconKeyByValue } from \"./helpers/get-icon-by-status\";\n\n// typings\nimport type { IStepIndicator } from \"./interface\";\n\n// styles\nimport { styles } from \"./styles\";\nimport { formHoursMinute } from \"../../utils/format-data\";\nimport { theme } from \"../../styles/theme/theme\";\nimport { ModalChangeActivity } from \"../modal-change-activity\";\n\n/**\n * Componente StepIndicator para a interação da ui.\n */\nconst StepIndicator: React.FC<IStepIndicator> = ({\n data = [],\n type,\n textColorDescription,\n titleColor,\n titleNumberColor,\n onChangeActivity,\n}) => {\n const StepDefault = () => {\n const [isModalVisible, setIsModalVisible] = React.useState(false);\n const [currentStepIndex, setCurrentStepIndex] = React.useState<number | null>(null);\n const [stepData, setStepData] = React.useState(data);\n\n const handleOnPressActivitie = (stepItem: any, index: number) => {\n const desc = stepItem?.descricao?.toLowerCase?.();\n if (!desc) return;\n\n const isDescanso = [\"descanso\", \"refeição\", \"repouso_noturno\", \"repouso_semanal\"].includes(\n desc.replace(/\\s+/g, \"_\")\n );\n\n if (isDescanso && stepItem?.sincronizado === true) {\n setCurrentStepIndex(index);\n setIsModalVisible(true);\n }\n };\n\n const handleConfirmModal = (newData: { label: string; value: string; key: number }) => {\n if (currentStepIndex !== null) {\n const updatedStep = {\n ...stepData[currentStepIndex],\n descricao: newData.label,\n tipo_atividade: newData.value,\n identificador: newData.key,\n };\n\n const newSteps = stepData.map((item, index) =>\n index === currentStepIndex ? updatedStep : item\n );\n\n setStepData(newSteps as any);\n\n if (onChangeActivity) {\n onChangeActivity(updatedStep);\n }\n }\n\n setIsModalVisible(false);\n setCurrentStepIndex(null);\n };\n\n return (\n <>\n {stepData.length > 0 &&\n stepData.map((history, index) => {\n const isFirst = index === 0;\n const isEditableType = history.tipo === \"descanso\";\n const isSynced = history?.sincronizado === true;\n const canEdit = isFirst && isEditableType && isSynced;\n\n return (\n <TouchableOpacity\n testID=\"step-indicator\"\n activeOpacity={0.7}\n key={history.jr_tipo_atividade_id}\n style={styles({}).containerIndicator}\n disabled={!canEdit}\n onPress={() => handleOnPressActivitie(history, index)}\n >\n <View style={styles({ sincronizado: history.sincronizado }).containerBall}>\n {stepData.length > 1 && index < stepData.length - 1 && (\n <View\n style={{\n width: 2,\n height: 84,\n marginTop: 116,\n position: \"relative\",\n backgroundColor: history.sincronizado\n ? theme.colors.blue[500]\n : theme.colors.orange[150],\n }}\n />\n )}\n <Text style={styles({ titleNumberColor }).titleNumber}>\n {stepData.length - index}\n </Text>\n </View>\n\n <View style={styles({}).containerMain}>\n <Text style={styles({ titleColor }).title}>{history?.descricao}</Text>\n\n {history?.data_inicio && (\n <Text style={styles({ textColorDescription }).titleDescription}>\n {`Inicio: ${history.data_inicio} ás ${history.data_fim}`}\n </Text>\n )}\n\n {history.duracao_segundos && (\n <Text style={styles({ textColorDescription }).titleDescription}>\n Duração: {formHoursMinute(history?.duracao_segundos as string)}\n </Text>\n )}\n </View>\n </TouchableOpacity>\n );\n })}\n\n {isModalVisible && (\n <ModalChangeActivity\n visible={isModalVisible}\n modalConfirm={handleConfirmModal}\n descricao=\"\"\n onClose={() => setIsModalVisible(false)}\n />\n )}\n </>\n );\n };\n\n const StepCustom = () => {\n return (\n <View\n style={{\n width: \"100%\",\n height: 84,\n paddingHorizontal: 24,\n display: \"flex\",\n flexDirection: \"row\",\n }}\n >\n {data.map((step, indexCustom) => {\n const descricao = getIconKeyByValue(step.descricao);\n\n return (\n <React.Fragment key={`step-${indexCustom}`}>\n <View\n style={{\n width: 45,\n height: 45,\n backgroundColor: indexCustom <= 3 ? \"orange\" : \"transparent\",\n borderRadius: 50,\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 1,\n borderColor: \"#fff\",\n }}\n >\n <View\n style={{\n width: 45,\n height: 45,\n backgroundColor: \"transparent\",\n borderRadius: 50,\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {descricao && <Icons icon={descricao} />}\n </View>\n <Text\n style={{\n position: \"absolute\",\n top: 56,\n fontWeight: \"600\",\n fontSize: 10,\n lineHeight: 14,\n textAlign: \"center\",\n color: \"#fff\",\n width: 75,\n }}\n >\n {step.descricao}\n </Text>\n </View>\n\n {data?.length > 1 && indexCustom < data?.length - 1 && (\n <View\n style={{\n width: 35,\n height: 2,\n marginTop: 24,\n position: \"relative\",\n backgroundColor: \"orange\",\n }}\n />\n )}\n </React.Fragment>\n );\n })}\n </View>\n );\n };\n\n const handleRenderComponent = (stepType: \"default\" | \"custom\") => {\n switch (stepType) {\n case \"default\":\n return <StepDefault />;\n case \"custom\":\n return <StepCustom />;\n default:\n return <View />;\n }\n };\n\n return <>{handleRenderComponent(type!)}</>;\n};\n\n/**\n *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Y,OAAA,CAAAyC,aAAA,CAAClD,YAAA,CAAAoE,IAAI,MAAE,CAAC;IACnB;EACF,CAAC;EAED,oBAAOvE,MAAA,CAAAY,OAAA,CAAAyC,aAAA,CAAArD,MAAA,CAAAY,OAAA,CAAA0C,QAAA,QAAG6D,qBAAqB,CAACpG,IAAK,CAAI,CAAC;AAC5C,CAAC;;AAED;AACA;AACA;AAFA,IAAAsG,QAAA,GAAAC,OAAA,CAAA1G,OAAA,GAGeC,aAAa","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * IMPORTS\n */\n\ntype IData = {\n id?: number;\n jr_tipo_atividade_id?: number;\n duracao_segundos: string | number;\n data_inicio: string;\n data_fim: string;\n descricao: string;\n sincronizado;\n tipo: string;\n referencia: string;\n};\n\ntype IStyleProps = {\n sincronizado?: boolean;\n titleColor?: string;\n titleNumberColor?: string;\n textColorDescription?: string;\n};\n\ninterface IStepIndicator {\n /**dados que vão ser renderizados */\n data?: IData[];\n\n /**tupo de renderização padrão ou customizada */\n type?: \"default\" | \"custom\";\n\n /**cor do texto */\n titleColor?: string;\n\n /**cor do numero do step indicator */\n titleNumberColor?: string;\n\n /**cor do texto da descrição */\n textColorDescription?: string;\n\n /**params para lidar com selecionamento de atividade única */\n onChangeActivity?: (activity: any) => void;\n}\n/**\n * EXPORTS\n */\nexport { type IStepIndicator, IStyleProps };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.styles = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _theme = require("../../styles/theme/theme");
|
|
9
|
-
/**
|
|
10
|
-
* IMPORTS
|
|
9
|
+
/**
|
|
10
|
+
* IMPORTS
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
// typings
|
|
@@ -22,7 +22,6 @@ const styles = props => {
|
|
|
22
22
|
height: 86,
|
|
23
23
|
flexDirection: "row",
|
|
24
24
|
justifyContent: "flex-start"
|
|
25
|
-
// backgroundColor: theme.colors.gray[300],
|
|
26
25
|
},
|
|
27
26
|
containerBall: {
|
|
28
27
|
width: 32,
|
|
@@ -36,7 +35,7 @@ const styles = props => {
|
|
|
36
35
|
title: {
|
|
37
36
|
color: (_props$titleColor = props.titleColor) !== null && _props$titleColor !== void 0 ? _props$titleColor : "black",
|
|
38
37
|
textAlign: "center",
|
|
39
|
-
lineHeight:
|
|
38
|
+
lineHeight: 24,
|
|
40
39
|
fontSize: _theme.theme.fontSizes["sm"],
|
|
41
40
|
fontWeight: "500",
|
|
42
41
|
marginLeft: 8
|
|
@@ -44,7 +43,7 @@ const styles = props => {
|
|
|
44
43
|
titleNumber: {
|
|
45
44
|
color: (_props$titleNumberCol = props.titleNumberColor) !== null && _props$titleNumberCol !== void 0 ? _props$titleNumberCol : _theme.theme.colors.neutral[25],
|
|
46
45
|
textAlign: "center",
|
|
47
|
-
lineHeight:
|
|
46
|
+
lineHeight: 18,
|
|
48
47
|
fontFamily: _theme.theme.fonts.inter_regular_400,
|
|
49
48
|
fontSize: _theme.theme.fontSizes["xs"],
|
|
50
49
|
position: "absolute"
|
|
@@ -53,9 +52,8 @@ const styles = props => {
|
|
|
53
52
|
color: (_props$textColorDescr = props.textColorDescription) !== null && _props$textColorDescr !== void 0 ? _props$textColorDescr : _theme.theme.colors.gray[700],
|
|
54
53
|
textAlign: "center",
|
|
55
54
|
lineHeight: 16,
|
|
56
|
-
fontSize:
|
|
57
|
-
fontFamily: _theme.theme.fonts.
|
|
58
|
-
fontWeight: "400",
|
|
55
|
+
fontSize: 12,
|
|
56
|
+
fontFamily: _theme.theme.fonts.inter_light_300,
|
|
59
57
|
marginLeft: 8
|
|
60
58
|
},
|
|
61
59
|
containerMain: {
|
|
@@ -68,8 +66,8 @@ const styles = props => {
|
|
|
68
66
|
});
|
|
69
67
|
};
|
|
70
68
|
|
|
71
|
-
/**
|
|
72
|
-
* EXPORTS
|
|
69
|
+
/**
|
|
70
|
+
* EXPORTS
|
|
73
71
|
*/
|
|
74
72
|
exports.styles = styles;
|
|
75
73
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_theme","styles","props","_props$titleColor","_props$titleNumberCol","_props$textColorDescr","StyleSheet","create","containerIndicator","width","height","flexDirection","justifyContent","containerBall","backgroundColor","sincronizado","theme","colors","blue","orange","alignItems","borderRadius","title","color","titleColor","textAlign","lineHeight","fontSize","fontSizes","fontWeight","marginLeft","titleNumber","titleNumberColor","neutral","fontFamily","fonts","inter_regular_400","position","titleDescription","textColorDescription","gray","containerMain","exports"],"sources":["styles.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_theme","styles","props","_props$titleColor","_props$titleNumberCol","_props$textColorDescr","StyleSheet","create","containerIndicator","width","height","flexDirection","justifyContent","containerBall","backgroundColor","sincronizado","theme","colors","blue","orange","alignItems","borderRadius","title","color","titleColor","textAlign","lineHeight","fontSize","fontSizes","fontWeight","marginLeft","titleNumber","titleNumberColor","neutral","fontFamily","fonts","inter_regular_400","position","titleDescription","textColorDescription","gray","inter_light_300","containerMain","exports"],"sources":["styles.ts"],"sourcesContent":["/**\n * IMPORTS\n */\n\nimport { StyleSheet } from \"react-native\";\n\n// typings\nimport { type IStyleProps } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\nconst styles = (props: IStyleProps) =>\n StyleSheet.create({\n containerIndicator: {\n width: \"100%\",\n height: 86,\n flexDirection: \"row\",\n justifyContent: \"flex-start\",\n },\n containerBall: {\n width: 32,\n height: 32,\n backgroundColor: props.sincronizado ? theme.colors.blue[500] : theme.colors.orange[150],\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: 16,\n },\n title: {\n color: props.titleColor ?? \"black\",\n textAlign: \"center\",\n lineHeight: 24,\n fontSize: theme.fontSizes[\"sm\"],\n fontWeight: \"500\",\n marginLeft: 8,\n },\n titleNumber: {\n color: props.titleNumberColor ?? theme.colors.neutral[25],\n textAlign: \"center\",\n lineHeight: 18,\n fontFamily: theme.fonts.inter_regular_400,\n fontSize: theme.fontSizes[\"xs\"],\n position: \"absolute\",\n },\n titleDescription: {\n color: props.textColorDescription ?? theme.colors.gray[700],\n textAlign: \"center\",\n lineHeight: 16,\n fontSize: 12,\n fontFamily: theme.fonts.inter_light_300,\n marginLeft: 8,\n },\n containerMain: {\n width: \"100%\",\n height: 56,\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n marginLeft: 2,\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,GAAIC,KAAkB;EAAA,IAAAC,iBAAA,EAAAC,qBAAA,EAAAC,qBAAA;EAAA,OAChCC,uBAAU,CAACC,MAAM,CAAC;IAChBC,kBAAkB,EAAE;MAClBC,KAAK,EAAE,MAAM;MACbC,MAAM,EAAE,EAAE;MACVC,aAAa,EAAE,KAAK;MACpBC,cAAc,EAAE;IAClB,CAAC;IACDC,aAAa,EAAE;MACbJ,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVI,eAAe,EAAEZ,KAAK,CAACa,YAAY,GAAGC,YAAK,CAACC,MAAM,CAACC,IAAI,CAAC,GAAG,CAAC,GAAGF,YAAK,CAACC,MAAM,CAACE,MAAM,CAAC,GAAG,CAAC;MACvFR,aAAa,EAAE,KAAK;MACpBS,UAAU,EAAE,QAAQ;MACpBR,cAAc,EAAE,QAAQ;MACxBS,YAAY,EAAE;IAChB,CAAC;IACDC,KAAK,EAAE;MACLC,KAAK,GAAAp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{
|
|
|
186
186
|
Object.defineProperty(exports, "StepIndicator", {
|
|
187
187
|
enumerable: true,
|
|
188
188
|
get: function () {
|
|
189
|
-
return _stepIndicator.
|
|
189
|
+
return _stepIndicator.default;
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
192
|
Object.defineProperty(exports, "Typography", {
|
|
@@ -233,7 +233,7 @@ Object.defineProperty(exports, "theme", {
|
|
|
233
233
|
});
|
|
234
234
|
var _box = _interopRequireDefault(require("./components/box"));
|
|
235
235
|
var _button = require("./components/button");
|
|
236
|
-
var _stepIndicator = require("./components/step-indicator");
|
|
236
|
+
var _stepIndicator = _interopRequireDefault(require("./components/step-indicator"));
|
|
237
237
|
var _typography = require("./components/typography");
|
|
238
238
|
var _input = require("./components/input");
|
|
239
239
|
var _capturePhoto = require("./components/capture-photo");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_box","_interopRequireDefault","require","_button","_stepIndicator","_typography","_input","_capturePhoto","_cardHours","_selectOption","_headerProfile","_scheduledJourneyIndicators","_cardScheduledJourney","_userProfile","_menuItem","_cardLoading","_cardWorkSession","_loadingProgress","_noData","_filterJourney","_coil","_filterDateSelector","_cardHistory","_notificationLoading","_checkBox","_imageCaptureWithRemove","_loadingDetails","_avatarProfile","_historyDetails","_activitiesDaily","_activitiesProgress","_profileMenuOption","_modalActivities","_historyActivitiesCard","_modalChangeActivity","_mutiply","_formatData","_theme","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["/**\n * EXPORTS\n */\n\n// Components\nexport { default as Box } from \"./components/box\";\nexport { Button } from \"./components/button\";\nexport { StepIndicator } from \"./components/step-indicator\";\nexport { Typography } from \"./components/typography\";\nexport { Input } from \"./components/input\";\nexport { CapturePhoto } from \"./components/capture-photo\";\nexport { CardHours } from \"./components/card-hours\";\nexport { SelectOption } from \"./components/selects/select-option\";\nexport { Header } from \"./components/header-profile\";\nexport { ScheduledJourneyIndicators } from \"./components/scheduled-journey-indicators\";\nexport { CardScheduledJourney } from \"./components/card-scheduled-journey\";\nexport { UserProfile } from \"./components/user-profile\";\nexport { MenuItem } from \"./components/menu-item\";\nexport { CardLoading } from \"./components/card-loading\";\nexport { CardWorkSession } from \"./components/card-work-session\";\nexport { LoadingProgress } from \"./components/loading-progress\";\nexport { NoData } from \"./components/no-data\";\nexport { FilterJourney } from \"./components/filter-journey\";\nexport { Coil } from \"./components/coil\";\nexport { FilterDateSelector } from \"./components/filter-date-selector\";\nexport { CardHistory } from \"./components/card-history\";\nexport { NotificationLoading } from \"./components/notification-loading\";\nexport { CheckBox } from \"./components/check-box\";\nexport { ImageCaptureWithRemove } from \"./components/image-capture-with-remove\";\nexport { LoadingDetails } from \"./components/loading-details\";\nexport { AvatarProfile } from \"./components/avatar-profile\";\nexport { HistoryDetails } from \"./components/history-details\";\nexport { ActivitiesDaily } from \"./components/activities-daily\";\nexport { ActivitiesProgress } from \"./components/activities-progress\";\nexport { ProfileMenuOption } from \"./components/profile-menu-option\";\nexport { ModalActivities } from \"./components/modal-activities\";\nexport { HistoryActivitiesCard } from \"./components/history-activities-card\";\nexport { ModalChangeActivity } from \"./components/modal-change-activity\";\n\n// Utilities\nexport { multiply } from \"./utils/mutiply\";\nexport { formatDate, getLastSevenDays, formHoursMinute } from \"./utils/format-data\";\n\n// Styles\nexport { theme } from \"./styles/theme/theme\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,
|
|
1
|
+
{"version":3,"names":["_box","_interopRequireDefault","require","_button","_stepIndicator","_typography","_input","_capturePhoto","_cardHours","_selectOption","_headerProfile","_scheduledJourneyIndicators","_cardScheduledJourney","_userProfile","_menuItem","_cardLoading","_cardWorkSession","_loadingProgress","_noData","_filterJourney","_coil","_filterDateSelector","_cardHistory","_notificationLoading","_checkBox","_imageCaptureWithRemove","_loadingDetails","_avatarProfile","_historyDetails","_activitiesDaily","_activitiesProgress","_profileMenuOption","_modalActivities","_historyActivitiesCard","_modalChangeActivity","_mutiply","_formatData","_theme","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["/**\n * EXPORTS\n */\n\n// Components\nexport { default as Box } from \"./components/box\";\nexport { Button } from \"./components/button\";\nexport { default as StepIndicator } from \"./components/step-indicator\";\nexport { Typography } from \"./components/typography\";\nexport { Input } from \"./components/input\";\nexport { CapturePhoto } from \"./components/capture-photo\";\nexport { CardHours } from \"./components/card-hours\";\nexport { SelectOption } from \"./components/selects/select-option\";\nexport { Header } from \"./components/header-profile\";\nexport { ScheduledJourneyIndicators } from \"./components/scheduled-journey-indicators\";\nexport { CardScheduledJourney } from \"./components/card-scheduled-journey\";\nexport { UserProfile } from \"./components/user-profile\";\nexport { MenuItem } from \"./components/menu-item\";\nexport { CardLoading } from \"./components/card-loading\";\nexport { CardWorkSession } from \"./components/card-work-session\";\nexport { LoadingProgress } from \"./components/loading-progress\";\nexport { NoData } from \"./components/no-data\";\nexport { FilterJourney } from \"./components/filter-journey\";\nexport { Coil } from \"./components/coil\";\nexport { FilterDateSelector } from \"./components/filter-date-selector\";\nexport { CardHistory } from \"./components/card-history\";\nexport { NotificationLoading } from \"./components/notification-loading\";\nexport { CheckBox } from \"./components/check-box\";\nexport { ImageCaptureWithRemove } from \"./components/image-capture-with-remove\";\nexport { LoadingDetails } from \"./components/loading-details\";\nexport { AvatarProfile } from \"./components/avatar-profile\";\nexport { HistoryDetails } from \"./components/history-details\";\nexport { ActivitiesDaily } from \"./components/activities-daily\";\nexport { ActivitiesProgress } from \"./components/activities-progress\";\nexport { ProfileMenuOption } from \"./components/profile-menu-option\";\nexport { ModalActivities } from \"./components/modal-activities\";\nexport { HistoryActivitiesCard } from \"./components/history-activities-card\";\nexport { ModalChangeActivity } from \"./components/modal-change-activity\";\n\n// Utilities\nexport { multiply } from \"./utils/mutiply\";\nexport { formatDate, getLastSevenDays, formHoursMinute } from \"./utils/format-data\";\n\n// Styles\nexport { theme } from \"./styles/theme/theme\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,2BAAA,GAAAT,OAAA;AACA,IAAAU,qBAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,YAAA,GAAAb,OAAA;AACA,IAAAc,gBAAA,GAAAd,OAAA;AACA,IAAAe,gBAAA,GAAAf,OAAA;AACA,IAAAgB,OAAA,GAAAhB,OAAA;AACA,IAAAiB,cAAA,GAAAjB,OAAA;AACA,IAAAkB,KAAA,GAAAlB,OAAA;AACA,IAAAmB,mBAAA,GAAAnB,OAAA;AACA,IAAAoB,YAAA,GAAApB,OAAA;AACA,IAAAqB,oBAAA,GAAArB,OAAA;AACA,IAAAsB,SAAA,GAAAtB,OAAA;AACA,IAAAuB,uBAAA,GAAAvB,OAAA;AACA,IAAAwB,eAAA,GAAAxB,OAAA;AACA,IAAAyB,cAAA,GAAAzB,OAAA;AACA,IAAA0B,eAAA,GAAA1B,OAAA;AACA,IAAA2B,gBAAA,GAAA3B,OAAA;AACA,IAAA4B,mBAAA,GAAA5B,OAAA;AACA,IAAA6B,kBAAA,GAAA7B,OAAA;AACA,IAAA8B,gBAAA,GAAA9B,OAAA;AACA,IAAA+B,sBAAA,GAAA/B,OAAA;AACA,IAAAgC,oBAAA,GAAAhC,OAAA;AAGA,IAAAiC,QAAA,GAAAjC,OAAA;AACA,IAAAkC,WAAA,GAAAlC,OAAA;AAGA,IAAAmC,MAAA,GAAAnC,OAAA;AAA6C,SAAAD,uBAAAqC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|
|
@@ -16,9 +16,7 @@ const meta = {
|
|
|
16
16
|
component: _modalChangeActivity.ModalChangeActivity,
|
|
17
17
|
args: {
|
|
18
18
|
visible: true,
|
|
19
|
-
dataRegistro: "07/03/2024",
|
|
20
19
|
descricao: "Repouso Noturno",
|
|
21
|
-
imagemUrl: "https://via.placeholder.com/150",
|
|
22
20
|
onClose: () => {},
|
|
23
21
|
modalConfirm: () => {}
|
|
24
22
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_modalChangeActivity","require","meta","title","component","ModalChangeActivity","args","visible","
|
|
1
|
+
{"version":3,"names":["_modalChangeActivity","require","meta","title","component","ModalChangeActivity","args","visible","descricao","onClose","modalConfirm","parameters","docs","description","_default","exports","default","Default","name"],"sources":["modal-change-activity.stories.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\n\nimport type { Meta, StoryObj } from \"@storybook/react\";\n\n// component\nimport { ModalChangeActivity } from \"../../components/modal-change-activity\";\n\nconst meta: Meta<typeof ModalChangeActivity> = {\n title: \"Componente/ModalChangeActivity\",\n component: ModalChangeActivity,\n args: {\n visible: true,\n descricao: \"Repouso Noturno\",\n onClose: () => {},\n modalConfirm: () => {},\n },\n parameters: {\n docs: {\n description: {\n component: `\n# ModalChangeActivity\n\nComponente de modal para alterar a atividade do usuário.\n\n## Uso\n\\`\\`\\`tsx\n<ModalChangeActivity\n visible\n dataRegistro=\"07/03/2024\"\n descricao=\"Repouso Noturno\"\n modalConfirm={(data) => console.log(data)}\n onClose={() => console.log(\"fechar modal\")}\n/>\n\\`\\`\\`\n `,\n },\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Default: Story = {\n name: \"Modal - Alterar Descanso\",\n};\n"],"mappings":";;;;;;AAOA,IAAAA,oBAAA,GAAAC,OAAA;AAPA;AACA;AACA;;AAIA;;AAGA,MAAMC,IAAsC,GAAG;EAC7CC,KAAK,EAAE,gCAAgC;EACvCC,SAAS,EAAEC,wCAAmB;EAC9BC,IAAI,EAAE;IACJC,OAAO,EAAE,IAAI;IACbC,SAAS,EAAE,iBAAiB;IAC5BC,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC;IACjBC,YAAY,EAAEA,CAAA,KAAM,CAAC;EACvB,CAAC;EACDC,UAAU,EAAE;IACVC,IAAI,EAAE;MACJC,WAAW,EAAE;QACXT,SAAS,EAAE;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACM;IACF;EACF;AACF,CAAC;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEad,IAAI;AAIZ,MAAMe,OAAc,GAAAF,OAAA,CAAAE,OAAA,GAAG;EAC5BC,IAAI,EAAE;AACR,CAAC","ignoreList":[]}
|