react-native-exp-fig 0.1.39 → 0.1.41
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 +8 -6
- 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/selects/select-option/index.js +8 -6
- 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/components/user-profile/index.js +2 -1
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/components/user-profile/interface.d.js.map +1 -1
- package/lib/commonjs/stories/modal-create-activitie/modal-create-activitie.stories.js +4 -0
- package/lib/commonjs/stories/modal-create-activitie/modal-create-activitie.stories.js.map +1 -1
- package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js +35 -23
- package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -1
- package/lib/module/components/modal-create-activitie/index.js +8 -6
- 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/selects/select-option/index.js +8 -6
- 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/components/user-profile/index.js +2 -1
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/components/user-profile/interface.d.js.map +1 -1
- package/lib/module/stories/modal-create-activitie/modal-create-activitie.stories.js +4 -0
- package/lib/module/stories/modal-create-activitie/modal-create-activitie.stories.js.map +1 -1
- package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js +35 -23
- package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -1
- package/lib/typescript/src/components/modal-create-activitie/interface.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/modal-create-activitie/index.tsx +5 -4
- package/src/components/modal-create-activitie/interface.ts +1 -0
- package/src/components/selects/select-option/index.tsx +14 -5
- package/src/components/selects/select-option/interface.d.ts +1 -0
- package/src/components/user-profile/index.tsx +32 -29
- package/src/components/user-profile/interface.d.ts +1 -0
- package/src/stories/modal-create-activitie/modal-create-activitie.stories.tsx +4 -0
- package/src/stories/modal-journey-rectification/modal-journey-rectification.stories.tsx +170 -161
|
@@ -40,21 +40,22 @@ const ModalCreteActivitie = /*#__PURE__*/_react.default.memo(({
|
|
|
40
40
|
visible,
|
|
41
41
|
onClose,
|
|
42
42
|
onPressConfirm,
|
|
43
|
-
textTitle
|
|
43
|
+
textTitle,
|
|
44
|
+
optionSelected = null
|
|
44
45
|
}) => {
|
|
45
|
-
var
|
|
46
|
+
var _optionSelected$value;
|
|
46
47
|
const [dateAndHours, setDateAndHours] = (0, _react.useState)({
|
|
47
48
|
date: (0, _formatData.formatDate)(new Date()),
|
|
48
49
|
hours: (0, _formatData.formHoursMinute)(String(new Date().getHours() * 3600 + new Date().getMinutes() * 60))
|
|
49
50
|
});
|
|
50
51
|
|
|
51
52
|
// estados controlados mínimos
|
|
52
|
-
const [selectedActivitie, setSelectedActivitie] = (0, _react.useState)((
|
|
53
|
+
const [selectedActivitie, setSelectedActivitie] = (0, _react.useState)((_optionSelected$value = optionSelected === null || optionSelected === void 0 ? void 0 : optionSelected.value) !== null && _optionSelected$value !== void 0 ? _optionSelected$value : null);
|
|
53
54
|
|
|
54
55
|
// label do motivo derivada com memo
|
|
55
56
|
const activitieLabel = (0, _react.useMemo)(() => {
|
|
56
|
-
var
|
|
57
|
-
return (
|
|
57
|
+
var _retificacaoActivitie, _retificacaoActivitie2;
|
|
58
|
+
return (_retificacaoActivitie = _dataActivities.retificacaoActivities === null || _dataActivities.retificacaoActivities === void 0 || (_retificacaoActivitie2 = _dataActivities.retificacaoActivities.find(activitie => (activitie === null || activitie === void 0 ? void 0 : activitie.value) === selectedActivitie)) === null || _retificacaoActivitie2 === void 0 ? void 0 : _retificacaoActivitie2.label) !== null && _retificacaoActivitie !== void 0 ? _retificacaoActivitie : null;
|
|
58
59
|
}, [selectedActivitie]);
|
|
59
60
|
|
|
60
61
|
// handlers estáveis
|
|
@@ -124,9 +125,10 @@ const ModalCreteActivitie = /*#__PURE__*/_react.default.memo(({
|
|
|
124
125
|
size: _theme.theme.fontSizes.sm,
|
|
125
126
|
marginBottom: 16
|
|
126
127
|
}), /*#__PURE__*/_react.default.createElement(_selectOption.default, {
|
|
127
|
-
titleLabel: "Selecione
|
|
128
|
+
titleLabel: "Selecione uma op\xE7\xE3o",
|
|
128
129
|
sizeTitleLabel: 18,
|
|
129
130
|
dataOption: _dataActivities.retificacaoActivities,
|
|
131
|
+
selectedValueID: selectedActivitie,
|
|
130
132
|
handleSelectDown: handleChangeReason,
|
|
131
133
|
backgroundColor: _theme.theme.colors.neutral[300]
|
|
132
134
|
}), /*#__PURE__*/_react.default.createElement(_selectDateAndHours.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_box","_interopRequireDefault","_button","_typography","_selectDateAndHours","_selectOption","_iconsSvg","_asBaseComponent","_dataActivities","_formatData","_theme","_styles","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalCreteActivitie","React","memo","visible","onClose","onPressConfirm","textTitle","_retificacaoActivitie","_retificacaoActivitie2","dateAndHours","setDateAndHours","useState","date","formatDate","Date","hours","formHoursMinute","String","getHours","getMinutes","selectedActivitie","setSelectedActivitie","retificacaoActivities","value","activitieLabel","useMemo","_retificacaoActivitie3","_retificacaoActivitie4","find","activitie","label","handleChangeReason","useCallback","handleCancel","handleConfirm","createElement","Modal","animationType","transparent","onRequestClose","statusBarTranslucent","Pressable","style","styles","overlay","onPress","width","backgroundColor","theme","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","View","headerRow","Icons","icon","color","background","neutral","size","Typography","text","marginLeft","margins","fontFamily","fonts","inter_bold","fontWeight","fontSizes","lg","padding","xs","black","inter_regular_400","lineHeight","marginBottom","titleLabel","sizeTitleLabel","dataOption","handleSelectDown","disabled","actions","Button","title","height","isLoading","buttonTextStyle","blue","inter_medium_500","fontSize","flexStyle","flexDirection","alignItems","justifyContent","textAlign","borderWidth","thin","borderColor","displayName","_default","exports","asBaseComponent"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React, { useMemo, useState, useCallback } from \"react\";\nimport { Modal, View, Pressable } from \"react-native\";\n\n// components\nimport Box from \"../box\";\nimport { Button } from \"../button\";\n\nimport { Typography } from \"../typography\";\n\nimport ActivityFields from \"../selects/select-date-and-hours\";\n\nimport SelectOption from \"../selects/select-option\";\n\n// commons\nimport { Icons } from \"../../common/icons-svg\";\nimport { asBaseComponent } from \"../../@types/as-base-component\";\n\n// helpers\nimport { retificacaoActivities } from \"../modals/modal-activities/data-activities\";\n\n// utils\nimport { formatDate, formHoursMinute } from \"../../utils/format-data\";\n\n// typings\nimport type { IDateAndHoursProps, IModalCreateActivitieProps } from \"./interface\";\n\n// styles / theme\nimport { theme } from \"../../styles/theme/theme\";\nimport { styles } from \"./styles\";\n\nconst ModalCreteActivitie: React.FC<IModalCreateActivitieProps<any>> = React.memo(\n ({ visible, onClose, onPressConfirm, textTitle }) => {\n const [dateAndHours, setDateAndHours] = useState<IDateAndHoursProps>({\n date: formatDate(new Date()),\n hours: formHoursMinute(String(new Date().getHours() * 3600 + new Date().getMinutes() * 60)),\n });\n\n // estados controlados mínimos\n const [selectedActivitie, setSelectedActivitie] = useState<number | null>(\n retificacaoActivities[0]?.value ?? null\n );\n\n // label do motivo derivada com memo\n const activitieLabel = useMemo(\n () =>\n retificacaoActivities?.find((activitie) => activitie?.value === selectedActivitie)?.label ??\n null,\n [selectedActivitie]\n );\n\n // handlers estáveis\n const handleChangeReason = useCallback((value: number | null) => {\n setSelectedActivitie(value);\n }, []);\n\n const handleCancel = useCallback(() => {\n onClose?.();\n }, [onClose]);\n\n const handleConfirm = useCallback(() => {\n onPressConfirm?.({\n value: selectedActivitie,\n label: activitieLabel,\n dateAndHours: dateAndHours,\n });\n\n onClose?.();\n }, [onPressConfirm, onClose, activitieLabel, selectedActivitie, dateAndHours]);\n\n return (\n <Modal\n animationType=\"fade\"\n transparent\n visible={visible}\n onRequestClose={handleCancel}\n statusBarTranslucent\n >\n <Pressable style={styles.overlay} onPress={handleCancel}>\n <Box\n width=\"90%\"\n backgroundColor={theme.colors.orange[500]}\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\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 <View style={styles.headerRow}>\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 ?? \"Incluir atividade\"}\n color={theme.colors.neutral[25]}\n marginLeft={theme.margins[\"2xs\"]}\n fontFamily={theme.fonts.inter_bold}\n fontWeight=\"700\"\n size={theme.fontSizes.lg}\n />\n </View>\n\n <Box\n backgroundColor={theme.colors.neutral[300]}\n paddingStyle={{ padding: theme.paddings.xs }}\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\n >\n <Typography\n text=\"Preencha os dados da atividade que deseja incluir.\"\n color={theme.colors.black[100]}\n fontFamily={theme.fonts.inter_regular_400}\n fontWeight=\"400\"\n lineHeight={theme.lineHeight[\"2xl\"]}\n size={theme.fontSizes.sm}\n marginBottom={16}\n />\n\n <SelectOption\n titleLabel=\"Selecione um motivo\"\n sizeTitleLabel={18}\n dataOption={retificacaoActivities as any}\n handleSelectDown={handleChangeReason}\n backgroundColor={theme.colors.neutral[300]}\n />\n\n <ActivityFields\n disabled={false}\n icon={\"CALENDAR\"}\n value={dateAndHours?.date}\n onPressConfirm={(value) =>\n setDateAndHours({ date: value, hours: dateAndHours?.hours })\n }\n />\n\n <ActivityFields\n disabled={false}\n icon={\"TIMER\"}\n value={dateAndHours?.hours}\n onPressConfirm={(value) =>\n setDateAndHours({ date: dateAndHours?.date, hours: value })\n }\n />\n\n <View style={styles.actions}>\n <Button\n title=\"CANCELAR\"\n onPress={handleCancel}\n width=\"48%\"\n height={40}\n isLoading={false}\n disabled={false}\n backgroundColor={theme.colors.neutral[300]}\n buttonTextStyle={{\n color: theme.colors.blue[500],\n fontFamily: theme.fonts.inter_medium_500,\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\n <Button\n title=\"CONFIRMAR\"\n onPress={handleConfirm}\n width=\"48%\"\n height={40}\n isLoading={false}\n disabled={false}\n backgroundColor={theme.colors.blue[500]}\n buttonTextStyle={{\n color: theme.colors.neutral[25],\n fontFamily: theme.fonts.inter_medium_500,\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 </View>\n </Box>\n </Box>\n </Pressable>\n </Modal>\n );\n }\n);\n\nModalCreteActivitie.displayName = \"ModalCreteActivitie\";\nexport default asBaseComponent(ModalCreteActivitie);\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA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C;AAEDtD,mBAAmB,CAAC4G,WAAW,GAAG,qBAAqB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhI,OAAA,GACzC,IAAAiI,gCAAe,EAAC/G,mBAAmB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_box","_interopRequireDefault","_button","_typography","_selectDateAndHours","_selectOption","_iconsSvg","_asBaseComponent","_dataActivities","_formatData","_theme","_styles","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalCreteActivitie","React","memo","visible","onClose","onPressConfirm","textTitle","optionSelected","_optionSelected$value","dateAndHours","setDateAndHours","useState","date","formatDate","Date","hours","formHoursMinute","String","getHours","getMinutes","selectedActivitie","setSelectedActivitie","value","activitieLabel","useMemo","_retificacaoActivitie","_retificacaoActivitie2","retificacaoActivities","find","activitie","label","handleChangeReason","useCallback","handleCancel","handleConfirm","createElement","Modal","animationType","transparent","onRequestClose","statusBarTranslucent","Pressable","style","styles","overlay","onPress","width","backgroundColor","theme","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","View","headerRow","Icons","icon","color","background","neutral","size","Typography","text","marginLeft","margins","fontFamily","fonts","inter_bold","fontWeight","fontSizes","lg","padding","xs","black","inter_regular_400","lineHeight","marginBottom","titleLabel","sizeTitleLabel","dataOption","selectedValueID","handleSelectDown","disabled","actions","Button","title","height","isLoading","buttonTextStyle","blue","inter_medium_500","fontSize","flexStyle","flexDirection","alignItems","justifyContent","textAlign","borderWidth","thin","borderColor","displayName","_default","exports","asBaseComponent"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React, { useMemo, useState, useCallback } from \"react\";\nimport { Modal, View, Pressable } from \"react-native\";\n\n// components\nimport Box from \"../box\";\nimport { Button } from \"../button\";\n\nimport { Typography } from \"../typography\";\n\nimport ActivityFields from \"../selects/select-date-and-hours\";\n\nimport SelectOption from \"../selects/select-option\";\n\n// commons\nimport { Icons } from \"../../common/icons-svg\";\nimport { asBaseComponent } from \"../../@types/as-base-component\";\n\n// helpers\nimport { retificacaoActivities } from \"../modals/modal-activities/data-activities\";\n\n// utils\nimport { formatDate, formHoursMinute } from \"../../utils/format-data\";\n\n// typings\nimport type { IDateAndHoursProps, IModalCreateActivitieProps } from \"./interface\";\n\n// styles / theme\nimport { theme } from \"../../styles/theme/theme\";\nimport { styles } from \"./styles\";\n\nconst ModalCreteActivitie: React.FC<IModalCreateActivitieProps<any>> = React.memo(\n ({ visible, onClose, onPressConfirm, textTitle, optionSelected = null }) => {\n const [dateAndHours, setDateAndHours] = useState<IDateAndHoursProps>({\n date: formatDate(new Date()),\n hours: formHoursMinute(String(new Date().getHours() * 3600 + new Date().getMinutes() * 60)),\n });\n\n // estados controlados mínimos\n const [selectedActivitie, setSelectedActivitie] = useState<number | null>(\n optionSelected?.value ?? null\n );\n\n // label do motivo derivada com memo\n const activitieLabel = useMemo(\n () =>\n retificacaoActivities?.find((activitie) => activitie?.value === selectedActivitie)?.label ??\n null,\n [selectedActivitie]\n );\n\n // handlers estáveis\n const handleChangeReason = useCallback((value: number | null) => {\n setSelectedActivitie(value);\n }, []);\n\n const handleCancel = useCallback(() => {\n onClose?.();\n }, [onClose]);\n\n const handleConfirm = useCallback(() => {\n onPressConfirm?.({\n value: selectedActivitie,\n label: activitieLabel,\n dateAndHours: dateAndHours,\n });\n\n onClose?.();\n }, [onPressConfirm, onClose, activitieLabel, selectedActivitie, dateAndHours]);\n\n return (\n <Modal\n animationType=\"fade\"\n transparent\n visible={visible}\n onRequestClose={handleCancel}\n statusBarTranslucent\n >\n <Pressable style={styles.overlay} onPress={handleCancel}>\n <Box\n width=\"90%\"\n backgroundColor={theme.colors.orange[500]}\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\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 <View style={styles.headerRow}>\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 ?? \"Incluir atividade\"}\n color={theme.colors.neutral[25]}\n marginLeft={theme.margins[\"2xs\"]}\n fontFamily={theme.fonts.inter_bold}\n fontWeight=\"700\"\n size={theme.fontSizes.lg}\n />\n </View>\n\n <Box\n backgroundColor={theme.colors.neutral[300]}\n paddingStyle={{ padding: theme.paddings.xs }}\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\n >\n <Typography\n text=\"Preencha os dados da atividade que deseja incluir.\"\n color={theme.colors.black[100]}\n fontFamily={theme.fonts.inter_regular_400}\n fontWeight=\"400\"\n lineHeight={theme.lineHeight[\"2xl\"]}\n size={theme.fontSizes.sm}\n marginBottom={16}\n />\n\n <SelectOption\n titleLabel=\"Selecione uma opção\"\n sizeTitleLabel={18}\n dataOption={retificacaoActivities}\n selectedValueID={selectedActivitie}\n handleSelectDown={handleChangeReason}\n backgroundColor={theme.colors.neutral[300]}\n />\n\n <ActivityFields\n disabled={false}\n icon={\"CALENDAR\"}\n value={dateAndHours?.date}\n onPressConfirm={(value) =>\n setDateAndHours({ date: value, hours: dateAndHours?.hours })\n }\n />\n\n <ActivityFields\n disabled={false}\n icon={\"TIMER\"}\n value={dateAndHours?.hours}\n onPressConfirm={(value) =>\n setDateAndHours({ date: dateAndHours?.date, hours: value })\n }\n />\n\n <View style={styles.actions}>\n <Button\n title=\"CANCELAR\"\n onPress={handleCancel}\n width=\"48%\"\n height={40}\n isLoading={false}\n disabled={false}\n backgroundColor={theme.colors.neutral[300]}\n buttonTextStyle={{\n color: theme.colors.blue[500],\n fontFamily: theme.fonts.inter_medium_500,\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\n <Button\n title=\"CONFIRMAR\"\n onPress={handleConfirm}\n width=\"48%\"\n height={40}\n isLoading={false}\n disabled={false}\n backgroundColor={theme.colors.blue[500]}\n buttonTextStyle={{\n color: theme.colors.neutral[25],\n fontFamily: theme.fonts.inter_medium_500,\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 </View>\n </Box>\n </Box>\n </Pressable>\n </Modal>\n );\n }\n);\n\nModalCreteActivitie.displayName = \"ModalCreteActivitie\";\nexport default asBaseComponent(ModalCreteActivitie);\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,IAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AAEA,IAAAM,mBAAA,GAAAH,sBAAA,CAAAH,OAAA;AAEA,IAAAO,aAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAGA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,gBAAA,GAAAT,OAAA;AAGA,IAAAU,eAAA,GAAAV,OAAA;AAGA,IAAAW,WAAA,GAAAX,OAAA;AAMA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,OAAA,GAAAb,OAAA;AAAkC,SAAAG,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,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AC,KAAK;IACXiD,MAAM,EAAE,EAAG;IACXC,SAAS,EAAE,KAAM;IACjBL,QAAQ,EAAE,KAAM;IAChB5C,eAAe,EAAEC,YAAK,CAACC,MAAM,CAACiD,IAAI,CAAC,GAAG,CAAE;IACxCD,eAAe,EAAE;MACf/B,KAAK,EAAElB,YAAK,CAACC,MAAM,CAACmB,OAAO,CAAC,EAAE,CAAC;MAC/BM,UAAU,EAAE1B,YAAK,CAAC2B,KAAK,CAACwB,gBAAgB;MACxCC,QAAQ,EAAEpD,YAAK,CAAC8B,SAAS,CAACG,EAAE;MAC5BJ,UAAU,EAAE;IACd,CAAE;IACFwB,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBC,SAAS,EAAE;IACb,CAAE;IACFtD,YAAY,EAAE;MACZuD,WAAW,EAAE1D,YAAK,CAACK,YAAY,CAACsD,IAAI;MACpCC,WAAW,EAAE5D,YAAK,CAACC,MAAM,CAACiD,IAAI,CAAC,GAAG,CAAC;MACnC9C,YAAY,EAAEJ,YAAK,CAACK,YAAY,CAACC;IACnC;EAAE,CACH,CACG,CACH,CACF,CACI,CACN,CAAC;AAEZ,CACF,CAAC;AAEDtD,mBAAmB,CAAC6G,WAAW,GAAG,qBAAqB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAjI,OAAA,GACzC,IAAAkI,gCAAe,EAAChH,mBAAmB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["interface.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * IMPORTS\n */\n\ntype IModalCreateActivitieProps<T> = {\n visible: boolean;\n textTitle?: string;\n options?: T;\n onClose: () => void;\n onPressConfirm: (value: T) => void;\n};\n\ntype IDateAndHoursProps = {\n date: string;\n hours: string;\n};\n\n/**\n * EXPORTS\n */\nexport type { IModalCreateActivitieProps, IDateAndHoursProps };\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["interface.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * IMPORTS\n */\n\ntype IModalCreateActivitieProps<T> = {\n visible: boolean;\n textTitle?: string;\n options?: T;\n optionSelected?: any | null;\n onClose: () => void;\n onPressConfirm: (value: T) => void;\n};\n\ntype IDateAndHoursProps = {\n date: string;\n hours: string;\n};\n\n/**\n * EXPORTS\n */\nexport type { IModalCreateActivitieProps, IDateAndHoursProps };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -26,22 +26,24 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
26
26
|
// styles
|
|
27
27
|
|
|
28
28
|
const SelectOption = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
29
|
-
var _dataOption
|
|
29
|
+
var _dataOption$find;
|
|
30
30
|
const {
|
|
31
31
|
dataOption,
|
|
32
32
|
handleSelectDown,
|
|
33
33
|
titleLabel,
|
|
34
34
|
sizeTitleLabel,
|
|
35
35
|
colortitleLabel,
|
|
36
|
-
backgroundColor
|
|
36
|
+
backgroundColor,
|
|
37
|
+
selectedValueID = null
|
|
37
38
|
} = props;
|
|
38
|
-
const [selectedValue, setSelectedValue] = (0, _react.useState)(
|
|
39
|
+
const [selectedValue, setSelectedValue] = (0, _react.useState)(selectedValueID);
|
|
39
40
|
const [modalVisible, setModalVisible] = (0, _react.useState)(false);
|
|
40
41
|
const handleSelect = value => {
|
|
41
42
|
setSelectedValue(value);
|
|
42
43
|
setModalVisible(false);
|
|
43
44
|
handleSelectDown(value);
|
|
44
45
|
};
|
|
46
|
+
const itemLabelSelected = (_dataOption$find = dataOption.find(item => item.value === selectedValue)) === null || _dataOption$find === void 0 ? void 0 : _dataOption$find.label;
|
|
45
47
|
const styleProps = {
|
|
46
48
|
dataOption,
|
|
47
49
|
handleSelectDown,
|
|
@@ -62,10 +64,10 @@ const SelectOption = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
62
64
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
63
65
|
style: (0, _styles.styles)(styleProps).selectedText,
|
|
64
66
|
numberOfLines: 1
|
|
65
|
-
}, `${(0, _textLimit.handleLimitTextdisplayByAmount)({
|
|
67
|
+
}, itemLabelSelected ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, " ", `${(0, _textLimit.handleLimitTextdisplayByAmount)({
|
|
66
68
|
limit: 42,
|
|
67
|
-
text:
|
|
68
|
-
})}`), /*#__PURE__*/_react.default.createElement(_iconsSvg.Icons, {
|
|
69
|
+
text: itemLabelSelected
|
|
70
|
+
})}`) : "Selecione uma opção"), /*#__PURE__*/_react.default.createElement(_iconsSvg.Icons, {
|
|
69
71
|
size: _theme.theme.fontSizes["xs"],
|
|
70
72
|
color: _theme.theme.colors.blue[500],
|
|
71
73
|
icon: "ARROW_DROP_DOWN"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_iconsSvg","_textLimit","_asBaseComponent","_styles","_theme","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SelectOption","forwardRef","props","ref","_dataOption$
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_iconsSvg","_textLimit","_asBaseComponent","_styles","_theme","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SelectOption","forwardRef","props","ref","_dataOption$find","dataOption","handleSelectDown","titleLabel","sizeTitleLabel","colortitleLabel","backgroundColor","selectedValueID","selectedValue","setSelectedValue","useState","modalVisible","setModalVisible","handleSelect","value","itemLabelSelected","find","item","label","styleProps","createElement","View","style","styles","container","Text","TouchableOpacity","testID","selectBox","onPress","selectedText","numberOfLines","Fragment","handleLimitTextdisplayByAmount","limit","text","Icons","size","theme","fontSizes","color","colors","blue","icon","Modal","visible","transparent","animationType","modalOverlay","modalContainer","width","alignItems","height","paddingRight","justifyContent","FlatList","data","keyExtractor","renderItem","option","optionText","_default","exports","asBaseComponent"],"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 selectedValueID = null,\n } = props;\n\n const [selectedValue, setSelectedValue] = useState<number | null>(selectedValueID);\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 itemLabelSelected = dataOption.find((item) => item.value === selectedValue)?.label!;\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 {itemLabelSelected ? (\n <>\n {\" \"}\n {`${handleLimitTextdisplayByAmount({\n limit: 42,\n text: itemLabelSelected,\n })}`}\n </>\n ) : (\n \"Selecione uma opção\"\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":";;;;;;AAGA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AAGA,IAAAG,UAAA,GAAAH,OAAA;AAGA,IAAAI,gBAAA,GAAAJ,OAAA;AAIA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAAoD,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,C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CAAe,EAACnE,YAAY,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
{"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 selectedValueID?: number | null;\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":[]}
|
|
@@ -32,6 +32,7 @@ const UserProfile = ({
|
|
|
32
32
|
cpf,
|
|
33
33
|
placa_cavalo,
|
|
34
34
|
bluetoothIsConnected,
|
|
35
|
+
situacao = "carregador",
|
|
35
36
|
app_version,
|
|
36
37
|
color,
|
|
37
38
|
width,
|
|
@@ -139,7 +140,7 @@ const UserProfile = ({
|
|
|
139
140
|
fontWeight: "600",
|
|
140
141
|
lineHeight: (_theme$fontSizes$lg4 = _theme.theme.fontSizes.lg) !== null && _theme$fontSizes$lg4 !== void 0 ? _theme$fontSizes$lg4 : 18,
|
|
141
142
|
letterSpacing: "regular"
|
|
142
|
-
})), /*#__PURE__*/_react.default.createElement(_box.default, {
|
|
143
|
+
})), situacao !== "carregador" && /*#__PURE__*/_react.default.createElement(_box.default, {
|
|
143
144
|
width: "100%",
|
|
144
145
|
flexStyle: {
|
|
145
146
|
flexDirection: "row",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_box","_typography","_constants","_theme","e","__esModule","default","UserProfile","nome","avatar","cpf","placa_cavalo","bluetoothIsConnected","app_version","color","width","height","handleProfileView","testID","_color$colorText","_theme$fontSizes$lg","_color$colorText2","_theme$fontSizes$lg2","_color$colorText3","_theme$fontSizes$lg3","_color$colorText4","_theme$fontSizes$lg4","_color$colorText5","_theme$fontSizes$lg5","_theme$fontSizes$lg6","_color$colorText6","_theme$fontSizes$lg7","_color$colorText7","_theme$fontSizes$lg8","createElement","backgroundColor","theme","colors","blue","paddingStyle","paddingLeft","paddings","md","paddingRight","paddingBottom","flexStyle","flexDirection","alignItems","justifyContent","marginStyle","marginTop","margins","TouchableOpacity","activeOpacity","onPress","Image","source","uri","IMAGES","IMAGE_ANONIMA","style","borderRadius","borderWidth","borderWidths","thin_medium","borderColor","green","textAlign","paddingTop","Typography","text","colorText","neutral","size","fontSizes","fontFamily","fonts","inter_regular_400","fontWeight","lineHeight","lg","letterSpacing","sm","ellipsizeMode","numberOfLines","inter_semi_bold_600","inter_medium_500","inter_bold_700","inter_light_300","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\";\nimport { Typography } from \"../typography\";\n\n// comons / constants\nimport { IMAGES } from \"../../common/constants\";\n\n// typings\nimport { IUserProfile } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\n/**\n * Componente Header para a interação do usuário com ui.\n */\nconst UserProfile: React.FC<IUserProfile> = ({\n nome,\n avatar,\n cpf,\n placa_cavalo,\n bluetoothIsConnected,\n app_version,\n color,\n width,\n height,\n handleProfileView,\n testID,\n}: IUserProfile) => {\n return (\n <Box\n testID={testID}\n width={width ?? \"100%\"}\n height={height}\n backgroundColor={theme.colors.blue[525]}\n paddingStyle={{\n paddingLeft: theme.paddings.md,\n paddingRight: theme.paddings.md,\n paddingBottom: theme.paddings[\"2xs\"],\n }}\n >\n <Box\n width={\"100%\"}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\", justifyContent: \"center\" }}\n marginStyle={{ marginTop: theme.margins.md }}\n >\n <TouchableOpacity activeOpacity={0.7} onPress={handleProfileView}>\n <Image\n testID=\"user-profile-avatar\"\n source={{\n uri: avatar || IMAGES.IMAGE_ANONIMA,\n }}\n style={{\n width: 120,\n height: 120,\n borderRadius: 60,\n borderWidth: theme.borderWidths.thin_medium,\n borderColor: theme.colors.green[400],\n }}\n />\n </TouchableOpacity>\n </Box>\n\n <Box\n width={\"100%\"}\n flexStyle={{ flexDirection: \"column\", alignItems: \"center\", justifyContent: \"center\" }}\n >\n <Box\n width={\"100%\"}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n textAlign: \"center\",\n }}\n paddingStyle={{ paddingTop: theme.paddings[\"2xs\"] }}\n >\n <Typography\n text={\"Olá, \"}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.md}\n fontFamily={theme.fonts.inter_regular_400}\n fontWeight=\"400\"\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n <Box width={\"89%\"}>\n <Typography\n text={nome}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.sm}\n fontFamily=\"inter_medium_500\"\n fontWeight=\"500\"\n ellipsizeMode=\"tail\"\n numberOfLines={1}\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n </Box>\n </Box>\n <Box\n width={\"100%\"}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n textAlign: \"center\",\n }}\n paddingStyle={{ paddingTop: 5 }}\n >\n <Typography\n text={\"CPF: \"}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.md}\n fontFamily={theme.fonts.inter_regular_400}\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n\n <Typography\n text={cpf}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.sm}\n fontFamily={theme.fonts.inter_semi_bold_600}\n fontWeight=\"600\"\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n </Box>\n <Box\n width={\"100%\"}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n textAlign: \"center\",\n }}\n paddingStyle={{ paddingTop: 5 }}\n >\n <Typography\n text={\"CONECTADO: \"}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.sm}\n fontFamily={theme.fonts.inter_medium_500}\n fontWeight=\"500\"\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n\n <Typography\n text={bluetoothIsConnected ? placa_cavalo : \"\"}\n color={theme.colors.green[400]}\n size={theme.fontSizes.sm}\n fontFamily={theme.fonts.inter_bold_700}\n fontWeight=\"700\"\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n </Box>\n </Box>\n\n <Box\n width={\"100%\"}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n }}\n marginStyle={{ marginTop: theme.margins.md }}\n >\n <Typography\n text={\"Versão: \"}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.md}\n fontFamily={theme.fonts.inter_regular_400}\n fontWeight=\"400\"\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n\n <Typography\n text={app_version}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.sm}\n fontWeight=\"300\"\n fontFamily={theme.fonts.inter_light_300}\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n </Box>\n </Box>\n );\n};\n\n/**\n * EXPORTS\n */\nexport { UserProfile };\n"],"mappings":";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AAA,GAAElB,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEyD,SAAS,cAAAvC,iBAAA,cAAAA,iBAAA,GAAII,YAAK,CAACC,MAAM,CAACmC,OAAO,CAAC,EAAE,CAAE;IACpDC,IAAI,EAAErC,YAAK,CAACsC,SAAS,CAACQ,EAAG;IACzBJ,UAAU,EAAC,KAAK;IAChBH,UAAU,EAAEvC,YAAK,CAACwC,KAAK,CAACY,eAAgB;IACxCT,UAAU,GAAA9C,oBAAA,GAAEG,YAAK,CAACsC,SAAS,CAACM,EAAE,cAAA/C,oBAAA,cAAAA,oBAAA,GAAI,EAAG;IACrCgD,aAAa,EAAE;EAAU,CAC1B,CACE,CACF,CAAC;AAEV,CAAC;;AAED;AACA;AACA;AAFAQ,OAAA,CAAAlF,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_box","_typography","_constants","_theme","e","__esModule","default","UserProfile","nome","avatar","cpf","placa_cavalo","bluetoothIsConnected","situacao","app_version","color","width","height","handleProfileView","testID","_color$colorText","_theme$fontSizes$lg","_color$colorText2","_theme$fontSizes$lg2","_color$colorText3","_theme$fontSizes$lg3","_color$colorText4","_theme$fontSizes$lg4","_color$colorText5","_theme$fontSizes$lg5","_theme$fontSizes$lg6","_color$colorText6","_theme$fontSizes$lg7","_color$colorText7","_theme$fontSizes$lg8","createElement","backgroundColor","theme","colors","blue","paddingStyle","paddingLeft","paddings","md","paddingRight","paddingBottom","flexStyle","flexDirection","alignItems","justifyContent","marginStyle","marginTop","margins","TouchableOpacity","activeOpacity","onPress","Image","source","uri","IMAGES","IMAGE_ANONIMA","style","borderRadius","borderWidth","borderWidths","thin_medium","borderColor","green","textAlign","paddingTop","Typography","text","colorText","neutral","size","fontSizes","fontFamily","fonts","inter_regular_400","fontWeight","lineHeight","lg","letterSpacing","sm","ellipsizeMode","numberOfLines","inter_semi_bold_600","inter_medium_500","inter_bold_700","inter_light_300","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\";\nimport { Typography } from \"../typography\";\n\n// comons / constants\nimport { IMAGES } from \"../../common/constants\";\n\n// typings\nimport { IUserProfile } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\n/**\n * Componente Header para a interação do usuário com ui.\n */\nconst UserProfile: React.FC<IUserProfile> = ({\n nome,\n avatar,\n cpf,\n placa_cavalo,\n bluetoothIsConnected,\n situacao = \"carregador\",\n app_version,\n color,\n width,\n height,\n handleProfileView,\n testID,\n}: IUserProfile) => {\n return (\n <Box\n testID={testID}\n width={width ?? \"100%\"}\n height={height}\n backgroundColor={theme.colors.blue[525]}\n paddingStyle={{\n paddingLeft: theme.paddings.md,\n paddingRight: theme.paddings.md,\n paddingBottom: theme.paddings[\"2xs\"],\n }}\n >\n <Box\n width={\"100%\"}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\", justifyContent: \"center\" }}\n marginStyle={{ marginTop: theme.margins.md }}\n >\n <TouchableOpacity activeOpacity={0.7} onPress={handleProfileView}>\n <Image\n testID=\"user-profile-avatar\"\n source={{\n uri: avatar || IMAGES.IMAGE_ANONIMA,\n }}\n style={{\n width: 120,\n height: 120,\n borderRadius: 60,\n borderWidth: theme.borderWidths.thin_medium,\n borderColor: theme.colors.green[400],\n }}\n />\n </TouchableOpacity>\n </Box>\n\n <Box\n width={\"100%\"}\n flexStyle={{ flexDirection: \"column\", alignItems: \"center\", justifyContent: \"center\" }}\n >\n <Box\n width={\"100%\"}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n textAlign: \"center\",\n }}\n paddingStyle={{ paddingTop: theme.paddings[\"2xs\"] }}\n >\n <Typography\n text={\"Olá, \"}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.md}\n fontFamily={theme.fonts.inter_regular_400}\n fontWeight=\"400\"\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n <Box width={\"89%\"}>\n <Typography\n text={nome}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.sm}\n fontFamily=\"inter_medium_500\"\n fontWeight=\"500\"\n ellipsizeMode=\"tail\"\n numberOfLines={1}\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n </Box>\n </Box>\n <Box\n width={\"100%\"}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n textAlign: \"center\",\n }}\n paddingStyle={{ paddingTop: 5 }}\n >\n <Typography\n text={\"CPF: \"}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.md}\n fontFamily={theme.fonts.inter_regular_400}\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n\n <Typography\n text={cpf}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.sm}\n fontFamily={theme.fonts.inter_semi_bold_600}\n fontWeight=\"600\"\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n </Box>\n {situacao !== \"carregador\" && (\n <Box\n width={\"100%\"}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n textAlign: \"center\",\n }}\n paddingStyle={{ paddingTop: 5 }}\n >\n <Typography\n text={\"CONECTADO: \"}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.sm}\n fontFamily={theme.fonts.inter_medium_500}\n fontWeight=\"500\"\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n\n <Typography\n text={bluetoothIsConnected ? placa_cavalo : \"\"}\n color={theme.colors.green[400]}\n size={theme.fontSizes.sm}\n fontFamily={theme.fonts.inter_bold_700}\n fontWeight=\"700\"\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n </Box>\n )}\n </Box>\n\n <Box\n width={\"100%\"}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n }}\n marginStyle={{ marginTop: theme.margins.md }}\n >\n <Typography\n text={\"Versão: \"}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.md}\n fontFamily={theme.fonts.inter_regular_400}\n fontWeight=\"400\"\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n\n <Typography\n text={app_version}\n color={color?.colorText ?? theme.colors.neutral[25]}\n size={theme.fontSizes.sm}\n fontWeight=\"300\"\n fontFamily={theme.fonts.inter_light_300}\n lineHeight={theme.fontSizes.lg ?? 18}\n letterSpacing={\"regular\"}\n />\n </Box>\n </Box>\n );\n};\n\n/**\n * EXPORTS\n */\nexport { UserProfile };\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,IAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAGA,IAAAI,UAAA,GAAAJ,OAAA;AAMA,IAAAK,MAAA,GAAAL,OAAA;AAAiD,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAjBjD;AACA;AACA;;AAIA;;AAIA;;AAGA;;AAGA;;AAGA;AACA;AACA;AACA,MAAMG,WAAmC,GAAGA,CAAC;EAC3CC,IAAI;EACJC,MAAM;EACNC,GAAG;EACHC,YAAY;EACZC,oBAAoB;EACpBC,QAAQ,GAAG,YAAY;EACvBC,WAAW;EACXC,KAAK;EACLC,KAAK;EACLC,MAAM;EACNC,iBAAiB;EACjBC;AACY,CAAC,KAAK;EAAA,IAAAC,gBAAA,EAAAC,mBAAA,EAAAC,iBAAA,EAAAC,oBAAA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ViewProps } from \"react-native\";\n\n// typing\nimport { IGlobalCss } from \"../../styles/global/interface\";\n\ninterface IUserProfile extends ViewProps, IGlobalCss {\n nome: string;\n avatar: string;\n cpf: string;\n placa_cavalo: string;\n bluetoothIsConnected: boolean;\n app_version: string;\n handleProfileView: () => void;\n}\n\n/**\n * EXPORTS\n */\nexport { IUserProfile };\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/**\n * IMPORTS\n */\nimport { ViewProps } from \"react-native\";\n\n// typing\nimport { IGlobalCss } from \"../../styles/global/interface\";\n\ninterface IUserProfile extends ViewProps, IGlobalCss {\n nome: string;\n avatar: string;\n cpf: string;\n placa_cavalo: string;\n bluetoothIsConnected: boolean;\n situacao?: string;\n app_version: string;\n handleProfileView: () => void;\n}\n\n/**\n * EXPORTS\n */\nexport { IUserProfile };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_modalCreateActivitie","e","__esModule","default","meta","title","component","ModalCreteActivitie","args","visible","textTitle","argTypes","onClose","action","onPressConfirm","control","description","parameters","docs","_default","exports","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":";;;;;;AAIA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA0E,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAR1E;AACA;AACA;AACA;;AAIA;;AAGA;;AAGA,MAAMG,IAAsC,GAAG;EAC7CC,KAAK,EAAE,gCAAgC;EACvCC,SAAS,EAAEC,6BAAmB;EAC9BC,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;QACXV,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;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAjB,OAAA,GAEvBC,IAAI;AAInB;AACA;AACA;AACA;AACO,MAAMiB,UAAiB,GAAAD,OAAA,CAAAC,UAAA,GAAG;EAC/BC,MAAM,EAAGd,IAAW,iBAAKX,MAAA,CAAAM,OAAA,CAAAoB,aAAA,CAACvB,qBAAA,CAAAG,OAAmB,EAAKK,IAAO;AAC3D,CAAC;AAEM,MAAMgB,OAAc,GAAAJ,OAAA,CAAAI,OAAA,GAAG;EAC5BhB,IAAI,EAAE;IACJC,OAAO,EAAE;EACX;AACF,CAAC;AAEM,MAAMgB,MAAa,GAAAL,OAAA,CAAAK,MAAA,GAAG;EAC3BjB,IAAI,EAAE;IACJC,OAAO,EAAE,IAAI;IACbC,SAAS,EAAE,mBAAmB;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_modalCreateActivitie","e","__esModule","default","meta","title","component","ModalCreteActivitie","args","visible","textTitle","argTypes","onClose","action","onPressConfirm","control","description","parameters","docs","_default","exports","Playground","render","createElement","Fechado","Aberto","optionSelected","value","label","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 optionSelected: {\n value: 22,\n label: \"Em operação - Carregamento\",\n },\n onPressConfirm: (payload) => {\n console.log(\"payload\", payload);\n },\n },\n};\n"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA0E,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAA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C,KAAK,EAAE;IACT,CAAC;IACDd,cAAc,EAAGe,OAAO,IAAK;MAC3BC,OAAO,CAACC,GAAG,CAAC,SAAS,EAAEF,OAAO,CAAC;IACjC;EACF;AACF,CAAC","ignoreList":[]}
|
package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js
CHANGED
|
@@ -9,18 +9,18 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _addonActions = require("@storybook/addon-actions");
|
|
10
10
|
var _modalCreateActivitie = _interopRequireDefault(require("../../components/modal-create-activitie"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
/**
|
|
13
|
-
* IMPORTS (Storybook)
|
|
12
|
+
/**
|
|
13
|
+
* IMPORTS (Storybook)
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
/**
|
|
17
|
-
* IMPORTS (Componente)
|
|
18
|
-
* Ajuste o caminho conforme sua estrutura (ex.: "../index" ou "./index").
|
|
16
|
+
/**
|
|
17
|
+
* IMPORTS (Componente)
|
|
18
|
+
* Ajuste o caminho conforme sua estrutura (ex.: "../index" ou "./index").
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* DECORATORS
|
|
23
|
-
* Envolve o story para garantir área de visualização e evitar "modal perdido".
|
|
21
|
+
/**
|
|
22
|
+
* DECORATORS
|
|
23
|
+
* Envolve o story para garantir área de visualização e evitar "modal perdido".
|
|
24
24
|
*/
|
|
25
25
|
const WithViewport = ({
|
|
26
26
|
children
|
|
@@ -36,8 +36,8 @@ const WithViewport = ({
|
|
|
36
36
|
}, children);
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
/**
|
|
40
|
-
* META
|
|
39
|
+
/**
|
|
40
|
+
* META
|
|
41
41
|
*/
|
|
42
42
|
const meta = {
|
|
43
43
|
title: "Componente/ModalJourneyRectification",
|
|
@@ -112,20 +112,24 @@ import ModalJourneyRectification from "caminho/do/componente";
|
|
|
112
112
|
decorators: [Story => /*#__PURE__*/_react.default.createElement(WithViewport, null, Story())]
|
|
113
113
|
};
|
|
114
114
|
var _default = exports.default = meta;
|
|
115
|
-
/**
|
|
116
|
-
* STORIES
|
|
115
|
+
/**
|
|
116
|
+
* STORIES
|
|
117
117
|
*/
|
|
118
|
-
/**
|
|
119
|
-
* Estado padrão (fechado).
|
|
118
|
+
/**
|
|
119
|
+
* Estado padrão (fechado).
|
|
120
120
|
*/
|
|
121
121
|
const Default = exports.Default = {};
|
|
122
122
|
|
|
123
|
-
/**
|
|
124
|
-
* Modal visível para inspeção visual.
|
|
123
|
+
/**
|
|
124
|
+
* Modal visível para inspeção visual.
|
|
125
125
|
*/
|
|
126
126
|
const Opened = exports.Opened = {
|
|
127
127
|
args: {
|
|
128
|
-
visible: true
|
|
128
|
+
visible: true,
|
|
129
|
+
optionSelected: {
|
|
130
|
+
value: 22,
|
|
131
|
+
label: "Em operação - Carregamento"
|
|
132
|
+
}
|
|
129
133
|
},
|
|
130
134
|
parameters: {
|
|
131
135
|
docs: {
|
|
@@ -136,13 +140,17 @@ const Opened = exports.Opened = {
|
|
|
136
140
|
}
|
|
137
141
|
};
|
|
138
142
|
|
|
139
|
-
/**
|
|
140
|
-
* Título customizado (ex.: para variações de copy).
|
|
143
|
+
/**
|
|
144
|
+
* Título customizado (ex.: para variações de copy).
|
|
141
145
|
*/
|
|
142
146
|
const WithCustomTitle = exports.WithCustomTitle = {
|
|
143
147
|
args: {
|
|
144
148
|
visible: true,
|
|
145
|
-
textTitle: "
|
|
149
|
+
textTitle: "Editar atividade",
|
|
150
|
+
optionSelected: {
|
|
151
|
+
value: 22,
|
|
152
|
+
label: "Em operação - Carregamento"
|
|
153
|
+
}
|
|
146
154
|
},
|
|
147
155
|
parameters: {
|
|
148
156
|
docs: {
|
|
@@ -153,13 +161,17 @@ const WithCustomTitle = exports.WithCustomTitle = {
|
|
|
153
161
|
}
|
|
154
162
|
};
|
|
155
163
|
|
|
156
|
-
/**
|
|
157
|
-
* Playground — ajuste livre via Controls.
|
|
164
|
+
/**
|
|
165
|
+
* Playground — ajuste livre via Controls.
|
|
158
166
|
*/
|
|
159
167
|
const Playground = exports.Playground = {
|
|
160
168
|
args: {
|
|
161
169
|
visible: false,
|
|
162
|
-
textTitle: "Editar atividade"
|
|
170
|
+
textTitle: "Editar atividade",
|
|
171
|
+
optionSelected: {
|
|
172
|
+
value: 22,
|
|
173
|
+
label: "Em operação - Carregamento"
|
|
174
|
+
}
|
|
163
175
|
},
|
|
164
176
|
parameters: {
|
|
165
177
|
docs: {
|
package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_addonActions","_modalCreateActivitie","e","__esModule","default","WithViewport","children","createElement","View","style","flex","minHeight","alignItems","justifyContent","backgroundColor","meta","title","component","ModalJourneyRectification","args","visible","textTitle","onClose","action","onPressConfirm","argTypes","control","type","description","table","category","parameters","layout","docs","decorators","Story","_default","exports","Default","Opened","story","WithCustomTitle","Playground"],"sources":["modal-journey-rectification.stories.tsx"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_addonActions","_modalCreateActivitie","e","__esModule","default","WithViewport","children","createElement","View","style","flex","minHeight","alignItems","justifyContent","backgroundColor","meta","title","component","ModalJourneyRectification","args","visible","textTitle","onClose","action","onPressConfirm","argTypes","control","type","description","table","category","parameters","layout","docs","decorators","Story","_default","exports","Default","Opened","optionSelected","value","label","story","WithCustomTitle","Playground"],"sources":["modal-journey-rectification.stories.tsx"],"sourcesContent":["/**\n * IMPORTS (Storybook)\n */\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport React from \"react\";\nimport { View } from \"react-native\";\nimport { action } from \"@storybook/addon-actions\";\n\n/**\n * IMPORTS (Componente)\n * Ajuste o caminho conforme sua estrutura (ex.: \"../index\" ou \"./index\").\n */\nimport ModalJourneyRectification from \"../../components/modal-create-activitie\";\n\n/**\n * DECORATORS\n * Envolve o story para garantir área de visualização e evitar \"modal perdido\".\n */\nconst WithViewport: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <View\n style={{\n flex: 1,\n minHeight: 600,\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"#F3F4F6\", // neutro claro p/ destacar o modal\n }}\n >\n {children}\n </View>\n );\n};\n\n/**\n * META\n */\nconst meta: Meta<typeof ModalJourneyRectification> = {\n title: \"Componente/ModalJourneyRectification\",\n component: ModalJourneyRectification,\n args: {\n visible: false,\n textTitle: \"Editar atividade\",\n onClose: action(\"onClose\"), // ação capturada no painel \"Actions\"\n onPressConfirm: action(\"onPressConfirm\"), // idem\n },\n argTypes: {\n visible: {\n control: { type: \"boolean\" },\n description: \"Define a visibilidade do modal.\",\n table: { category: \"Controle\" },\n },\n textTitle: {\n control: { type: \"text\" },\n description: \"Título exibido no cabeçalho do modal.\",\n table: { category: \"Conteúdo\" },\n },\n onClose: {\n description: \"Callback ao cancelar/fechar o modal.\",\n table: { category: \"Eventos\" },\n },\n onPressConfirm: {\n description: \"Callback ao confirmar. Recebe { reasonValue, label, dateAndHours }.\",\n table: { category: \"Eventos\" },\n },\n },\n parameters: {\n layout: \"fullscreen\",\n docs: {\n description: {\n component: `\n### ModalJourneyRectification\nModal para **Editar uma atividade** (motivo + data e hora) seguindo o design do sistema.\n\n#### Uso básico\n\\`\\`\\`tsx\nimport ModalJourneyRectification from \"caminho/do/componente\";\n\n<ModalJourneyRectification\n visible={true}\n textTitle=\"Edutar atividade\"\n onClose={() => {/* fechar */}}\n onPressConfirm={(payload) => {\n // payload: { reasonValue, label, dateAndHours: { date, hours } }\n }}\n/>\n\\`\\`\\`\n\n- Ao confirmar, o componente dispara o \\`onPressConfirm\\` com os dados selecionados e **fecha** em seguida.\n- O clique no overlay ou o botão \"CANCELAR\" disparam \\`onClose\\`.\n `,\n },\n },\n },\n decorators: [(Story) => <WithViewport>{Story()}</WithViewport>],\n};\nexport default meta;\n\n/**\n * STORIES\n */\ntype Story = StoryObj<typeof ModalJourneyRectification>;\n\n/**\n * Estado padrão (fechado).\n */\nexport const Default: Story = {};\n\n/**\n * Modal visível para inspeção visual.\n */\nexport const Opened: Story = {\n args: {\n visible: true,\n optionSelected: {\n value: 22,\n label: \"Em operação - Carregamento\",\n },\n },\n parameters: {\n docs: {\n description: {\n story: \"Exibe o modal aberto para validar layout, overlay e botões de ação.\",\n },\n },\n },\n};\n\n/**\n * Título customizado (ex.: para variações de copy).\n */\nexport const WithCustomTitle: Story = {\n args: {\n visible: true,\n textTitle: \"Editar atividade\",\n optionSelected: {\n value: 22,\n label: \"Em operação - Carregamento\",\n },\n },\n parameters: {\n docs: {\n description: {\n story: \"Permite validar a troca do título e o encaixe no cabeçalho do modal.\",\n },\n },\n },\n};\n\n/**\n * Playground — ajuste livre via Controls.\n */\nexport const Playground: Story = {\n args: {\n visible: false,\n textTitle: \"Editar atividade\",\n optionSelected: {\n value: 22,\n label: \"Em operação - Carregamento\",\n },\n },\n parameters: {\n docs: {\n description: {\n story:\n \"Use os **Controls** para alternar `visible` e personalizar `textTitle`. As ações aparecem no painel *Actions*.\",\n },\n },\n },\n};\n"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAMA,IAAAG,qBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAgF,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAZhF;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,MAAMG,YAA+C,GAAGA,CAAC;EAAEC;AAAS,CAAC,KAAK;EACxE,oBACEV,MAAA,CAAAQ,OAAA,CAAAG,aAAA,CAACR,YAAA,CAAAS,IA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reList":[]}
|
|
@@ -30,21 +30,22 @@ const ModalCreteActivitie = /*#__PURE__*/React.memo(({
|
|
|
30
30
|
visible,
|
|
31
31
|
onClose,
|
|
32
32
|
onPressConfirm,
|
|
33
|
-
textTitle
|
|
33
|
+
textTitle,
|
|
34
|
+
optionSelected = null
|
|
34
35
|
}) => {
|
|
35
|
-
var
|
|
36
|
+
var _optionSelected$value;
|
|
36
37
|
const [dateAndHours, setDateAndHours] = useState({
|
|
37
38
|
date: formatDate(new Date()),
|
|
38
39
|
hours: formHoursMinute(String(new Date().getHours() * 3600 + new Date().getMinutes() * 60))
|
|
39
40
|
});
|
|
40
41
|
|
|
41
42
|
// estados controlados mínimos
|
|
42
|
-
const [selectedActivitie, setSelectedActivitie] = useState((
|
|
43
|
+
const [selectedActivitie, setSelectedActivitie] = useState((_optionSelected$value = optionSelected === null || optionSelected === void 0 ? void 0 : optionSelected.value) !== null && _optionSelected$value !== void 0 ? _optionSelected$value : null);
|
|
43
44
|
|
|
44
45
|
// label do motivo derivada com memo
|
|
45
46
|
const activitieLabel = useMemo(() => {
|
|
46
|
-
var
|
|
47
|
-
return (
|
|
47
|
+
var _retificacaoActivitie, _retificacaoActivitie2;
|
|
48
|
+
return (_retificacaoActivitie = retificacaoActivities === null || retificacaoActivities === void 0 || (_retificacaoActivitie2 = retificacaoActivities.find(activitie => (activitie === null || activitie === void 0 ? void 0 : activitie.value) === selectedActivitie)) === null || _retificacaoActivitie2 === void 0 ? void 0 : _retificacaoActivitie2.label) !== null && _retificacaoActivitie !== void 0 ? _retificacaoActivitie : null;
|
|
48
49
|
}, [selectedActivitie]);
|
|
49
50
|
|
|
50
51
|
// handlers estáveis
|
|
@@ -114,9 +115,10 @@ const ModalCreteActivitie = /*#__PURE__*/React.memo(({
|
|
|
114
115
|
size: theme.fontSizes.sm,
|
|
115
116
|
marginBottom: 16
|
|
116
117
|
}), /*#__PURE__*/React.createElement(SelectOption, {
|
|
117
|
-
titleLabel: "Selecione
|
|
118
|
+
titleLabel: "Selecione uma op\xE7\xE3o",
|
|
118
119
|
sizeTitleLabel: 18,
|
|
119
120
|
dataOption: retificacaoActivities,
|
|
121
|
+
selectedValueID: selectedActivitie,
|
|
120
122
|
handleSelectDown: handleChangeReason,
|
|
121
123
|
backgroundColor: theme.colors.neutral[300]
|
|
122
124
|
}), /*#__PURE__*/React.createElement(ActivityFields, {
|