react-native-exp-fig 0.1.38 → 0.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/lib/commonjs/components/modal-create-activitie/index.js +13 -11
  2. package/lib/commonjs/components/modal-create-activitie/index.js.map +1 -1
  3. package/lib/commonjs/components/modal-create-activitie/interface.js.map +1 -1
  4. package/lib/commonjs/components/modal-journey-rectification/index.js +10 -10
  5. package/lib/commonjs/components/modal-journey-rectification/index.js.map +1 -1
  6. package/lib/commonjs/components/modals/modal-activities/data-activities/index.js +25 -1
  7. package/lib/commonjs/components/modals/modal-activities/data-activities/index.js.map +1 -1
  8. package/lib/commonjs/components/modals/modal-activity-reason/index.js +6 -5
  9. package/lib/commonjs/components/modals/modal-activity-reason/index.js.map +1 -1
  10. package/lib/commonjs/components/modals/modal-activity-reason/interface.d.js.map +1 -1
  11. package/lib/commonjs/components/modals/modal-change-activity/index.js.map +1 -1
  12. package/lib/commonjs/components/selects/select-option/index.js +4 -4
  13. package/lib/commonjs/components/selects/select-option/index.js.map +1 -1
  14. package/lib/commonjs/components/selects/select-option/interface.d.js.map +1 -1
  15. package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js +8 -8
  16. package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -1
  17. package/lib/commonjs/stories/modal-create-activitie/modal-create-activitie.stories.js +5 -1
  18. package/lib/commonjs/stories/modal-create-activitie/modal-create-activitie.stories.js.map +1 -1
  19. package/lib/module/components/modal-create-activitie/index.js +13 -11
  20. package/lib/module/components/modal-create-activitie/index.js.map +1 -1
  21. package/lib/module/components/modal-create-activitie/interface.js.map +1 -1
  22. package/lib/module/components/modal-journey-rectification/index.js +10 -10
  23. package/lib/module/components/modal-journey-rectification/index.js.map +1 -1
  24. package/lib/module/components/modals/modal-activities/data-activities/index.js +24 -0
  25. package/lib/module/components/modals/modal-activities/data-activities/index.js.map +1 -1
  26. package/lib/module/components/modals/modal-activity-reason/index.js +6 -5
  27. package/lib/module/components/modals/modal-activity-reason/index.js.map +1 -1
  28. package/lib/module/components/modals/modal-activity-reason/interface.d.js.map +1 -1
  29. package/lib/module/components/modals/modal-change-activity/index.js.map +1 -1
  30. package/lib/module/components/selects/select-option/index.js +4 -4
  31. package/lib/module/components/selects/select-option/index.js.map +1 -1
  32. package/lib/module/components/selects/select-option/interface.d.js.map +1 -1
  33. package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js +8 -8
  34. package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -1
  35. package/lib/module/stories/modal-create-activitie/modal-create-activitie.stories.js +5 -1
  36. package/lib/module/stories/modal-create-activitie/modal-create-activitie.stories.js.map +1 -1
  37. package/lib/typescript/src/components/modals/modal-activities/data-activities/index.d.ts +7 -0
  38. package/package.json +4 -8
  39. package/src/components/modal-create-activitie/index.tsx +215 -211
  40. package/src/components/modal-create-activitie/interface.ts +22 -22
  41. package/src/components/modal-journey-rectification/index.tsx +213 -211
  42. package/src/components/modals/modal-activities/data-activities/index.ts +31 -0
  43. package/src/components/modals/modal-activity-reason/index.tsx +163 -162
  44. package/src/components/modals/modal-activity-reason/interface.d.ts +10 -10
  45. package/src/components/modals/modal-change-activity/index.tsx +1 -1
  46. package/src/components/selects/select-option/index.tsx +124 -124
  47. package/src/components/selects/select-option/interface.d.ts +18 -18
  48. package/src/stories/modal-activity-reason/modal-activity-reason.stories.tsx +192 -192
  49. package/src/stories/modal-create-activitie/modal-create-activitie.stories.tsx +4 -0
@@ -6,22 +6,22 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
- var _box = _interopRequireDefault(require("..//box"));
9
+ var _box = _interopRequireDefault(require("../box"));
10
10
  var _button = require("../button");
11
11
  var _typography = require("../typography");
12
12
  var _selectDateAndHours = _interopRequireDefault(require("../selects/select-date-and-hours"));
13
13
  var _selectOption = _interopRequireDefault(require("../selects/select-option"));
14
14
  var _iconsSvg = require("../../common/icons-svg");
15
15
  var _asBaseComponent = require("../../@types/as-base-component");
16
- var _optionsActivity = require("../../utils/options-activity");
16
+ var _dataActivities = require("../modals/modal-activities/data-activities");
17
+ var _formatData = require("../../utils/format-data");
17
18
  var _theme = require("../../styles/theme/theme");
18
19
  var _styles = require("./styles");
19
- var _formatData = require("../../utils/format-data");
20
20
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
22
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
- /**
24
- * IMPORTS
23
+ /**
24
+ * IMPORTS
25
25
  */
26
26
 
27
27
  // components
@@ -30,6 +30,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
30
30
 
31
31
  // helpers
32
32
 
33
+ // utils
34
+
33
35
  // typings
34
36
 
35
37
  // styles / theme
@@ -40,19 +42,19 @@ const ModalCreteActivitie = /*#__PURE__*/_react.default.memo(({
40
42
  onPressConfirm,
41
43
  textTitle
42
44
  }) => {
43
- var _OPTIONS$0$value, _OPTIONS$;
45
+ var _retificacaoActivitie, _retificacaoActivitie2;
44
46
  const [dateAndHours, setDateAndHours] = (0, _react.useState)({
45
47
  date: (0, _formatData.formatDate)(new Date()),
46
48
  hours: (0, _formatData.formHoursMinute)(String(new Date().getHours() * 3600 + new Date().getMinutes() * 60))
47
49
  });
48
50
 
49
51
  // estados controlados mínimos
50
- const [selectedActivitie, setSelectedActivitie] = (0, _react.useState)((_OPTIONS$0$value = (_OPTIONS$ = _optionsActivity.OPTIONS[0]) === null || _OPTIONS$ === void 0 ? void 0 : _OPTIONS$.value) !== null && _OPTIONS$0$value !== void 0 ? _OPTIONS$0$value : null);
52
+ const [selectedActivitie, setSelectedActivitie] = (0, _react.useState)((_retificacaoActivitie = (_retificacaoActivitie2 = _dataActivities.retificacaoActivities[0]) === null || _retificacaoActivitie2 === void 0 ? void 0 : _retificacaoActivitie2.value) !== null && _retificacaoActivitie !== void 0 ? _retificacaoActivitie : null);
51
53
 
52
54
  // label do motivo derivada com memo
53
55
  const activitieLabel = (0, _react.useMemo)(() => {
54
- var _OPTIONS$find$label, _OPTIONS$find;
55
- return (_OPTIONS$find$label = (_OPTIONS$find = _optionsActivity.OPTIONS.find(activitie => activitie.value === selectedActivitie)) === null || _OPTIONS$find === void 0 ? void 0 : _OPTIONS$find.label) !== null && _OPTIONS$find$label !== void 0 ? _OPTIONS$find$label : null;
56
+ var _retificacaoActivitie3, _retificacaoActivitie4;
57
+ return (_retificacaoActivitie3 = _dataActivities.retificacaoActivities === null || _dataActivities.retificacaoActivities === void 0 || (_retificacaoActivitie4 = _dataActivities.retificacaoActivities.find(activitie => (activitie === null || activitie === void 0 ? void 0 : activitie.value) === selectedActivitie)) === null || _retificacaoActivitie4 === void 0 ? void 0 : _retificacaoActivitie4.label) !== null && _retificacaoActivitie3 !== void 0 ? _retificacaoActivitie3 : null;
56
58
  }, [selectedActivitie]);
57
59
 
58
60
  // handlers estáveis
@@ -64,7 +66,7 @@ const ModalCreteActivitie = /*#__PURE__*/_react.default.memo(({
64
66
  }, [onClose]);
65
67
  const handleConfirm = (0, _react.useCallback)(() => {
66
68
  onPressConfirm === null || onPressConfirm === void 0 || onPressConfirm({
67
- reasonValue: selectedActivitie,
69
+ value: selectedActivitie,
68
70
  label: activitieLabel,
69
71
  dateAndHours: dateAndHours
70
72
  });
@@ -124,7 +126,7 @@ const ModalCreteActivitie = /*#__PURE__*/_react.default.memo(({
124
126
  }), /*#__PURE__*/_react.default.createElement(_selectOption.default, {
125
127
  titleLabel: "Selecione um motivo",
126
128
  sizeTitleLabel: 18,
127
- dataOption: _optionsActivity.OPTIONS,
129
+ dataOption: _dataActivities.retificacaoActivities,
128
130
  handleSelectDown: handleChangeReason,
129
131
  backgroundColor: _theme.theme.colors.neutral[300]
130
132
  }), /*#__PURE__*/_react.default.createElement(_selectDateAndHours.default, {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_box","_interopRequireDefault","_button","_typography","_selectDateAndHours","_selectOption","_iconsSvg","_asBaseComponent","_optionsActivity","_theme","_styles","_formatData","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","_OPTIONS$0$value","_OPTIONS$","dateAndHours","setDateAndHours","useState","date","formatDate","Date","hours","formHoursMinute","String","getHours","getMinutes","selectedActivitie","setSelectedActivitie","OPTIONS","value","activitieLabel","useMemo","_OPTIONS$find$label","_OPTIONS$find","find","activitie","label","handleChangeReason","useCallback","handleCancel","handleConfirm","reasonValue","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":["/**\r\n * IMPORTS\r\n */\r\nimport React, { useMemo, useState, useCallback } from \"react\";\r\nimport { Modal, View, Pressable } from \"react-native\";\r\n\r\n// components\r\nimport Box from \"..//box\";\r\nimport { Button }from \"../button\";\r\n\r\nimport { Typography } from \"../typography\";\r\n\r\nimport ActivityFields from \"../selects/select-date-and-hours\";\r\n\r\nimport SelectOption from \"../selects/select-option\";\r\n\r\n// commons\r\nimport { Icons } from \"../../common/icons-svg\";\r\nimport { asBaseComponent } from \"../../@types/as-base-component\";\r\n\r\n// helpers\r\nimport { OPTIONS } from \"../../utils/options-activity\";\r\n\r\n// typings\r\nimport type { IDateAndHoursProps, IModalCreateActivitieProps } from \"./interface\";\r\n\r\n// styles / theme\r\nimport { theme } from \"../../styles/theme/theme\";\r\nimport { styles } from \"./styles\";\r\nimport { formatDate, formHoursMinute } from \"../../utils/format-data\";\r\n\r\nconst ModalCreteActivitie: React.FC<IModalCreateActivitieProps<any>> = React.memo(\r\n ({ visible, onClose, onPressConfirm, textTitle }) => {\r\n const [dateAndHours, setDateAndHours] = useState<IDateAndHoursProps>({\r\n date: formatDate(new Date()),\r\n hours: formHoursMinute(String(new Date().getHours() * 3600 + new Date().getMinutes() * 60)),\r\n });\r\n\r\n // estados controlados mínimos\r\n const [selectedActivitie, setSelectedActivitie] = useState<string | null>(\r\n OPTIONS[0]?.value ?? null\r\n );\r\n\r\n // label do motivo derivada com memo\r\n const activitieLabel = useMemo(\r\n () => OPTIONS.find((activitie) => activitie.value === selectedActivitie)?.label ?? null,\r\n [selectedActivitie]\r\n );\r\n\r\n // handlers estáveis\r\n const handleChangeReason = useCallback((value: string | null) => {\r\n setSelectedActivitie(value);\r\n }, []);\r\n\r\n const handleCancel = useCallback(() => {\r\n onClose?.();\r\n }, [onClose]);\r\n\r\n const handleConfirm = useCallback(() => {\r\n onPressConfirm?.({\r\n reasonValue: selectedActivitie,\r\n label: activitieLabel,\r\n dateAndHours: dateAndHours,\r\n });\r\n\r\n onClose?.();\r\n }, [onPressConfirm, onClose, activitieLabel, selectedActivitie, dateAndHours]);\r\n\r\n return (\r\n <Modal\r\n animationType=\"fade\"\r\n transparent\r\n visible={visible}\r\n onRequestClose={handleCancel}\r\n statusBarTranslucent\r\n >\r\n <Pressable style={styles.overlay} onPress={handleCancel}>\r\n <Box\r\n width=\"90%\"\r\n backgroundColor={theme.colors.orange[500]}\r\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\r\n paddingStyle={{\r\n paddingLeft: theme.paddings[\"2xs\"],\r\n paddingRight: theme.paddings[\"2xs\"],\r\n paddingTop: theme.paddings.sm,\r\n paddingBottom: theme.paddings.sm,\r\n }}\r\n >\r\n <View style={styles.headerRow}>\r\n <Icons\r\n icon=\"EXCLAMATION_TRIANGLE\"\r\n color={theme.colors.orange[500]}\r\n background={theme.colors.neutral[300]}\r\n size={22}\r\n />\r\n <Typography\r\n text={textTitle ?? \"Incluir atividade\"}\r\n color={theme.colors.neutral[25]}\r\n marginLeft={theme.margins[\"2xs\"]}\r\n fontFamily={theme.fonts.inter_bold}\r\n fontWeight=\"700\"\r\n size={theme.fontSizes.lg}\r\n />\r\n </View>\r\n\r\n <Box\r\n backgroundColor={theme.colors.neutral[300]}\r\n paddingStyle={{ padding: theme.paddings.xs }}\r\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\r\n >\r\n <Typography\r\n text=\"Preencha os dados da atividade que deseja incluir.\"\r\n color={theme.colors.black[100]}\r\n fontFamily={theme.fonts.inter_regular_400}\r\n fontWeight=\"400\"\r\n lineHeight={theme.lineHeight[\"2xl\"]}\r\n size={theme.fontSizes.sm}\r\n marginBottom={16}\r\n />\r\n\r\n <SelectOption\r\n titleLabel=\"Selecione um motivo\"\r\n sizeTitleLabel={18}\r\n dataOption={OPTIONS as any}\r\n handleSelectDown={handleChangeReason}\r\n backgroundColor={theme.colors.neutral[300]}\r\n />\r\n\r\n <ActivityFields\r\n disabled={false}\r\n icon={\"CALENDAR\"}\r\n value={dateAndHours?.date}\r\n onPressConfirm={(value) =>\r\n setDateAndHours({ date: value, hours: dateAndHours?.hours })\r\n }\r\n />\r\n\r\n <ActivityFields\r\n disabled={false}\r\n icon={\"TIMER\"}\r\n value={dateAndHours?.hours}\r\n onPressConfirm={(value) =>\r\n setDateAndHours({ date: dateAndHours?.date, hours: value })\r\n }\r\n />\r\n\r\n <View style={styles.actions}>\r\n <Button\r\n title=\"CANCELAR\"\r\n onPress={handleCancel}\r\n width=\"48%\"\r\n height={40}\r\n isLoading={false}\r\n disabled={false}\r\n backgroundColor={theme.colors.neutral[300]}\r\n buttonTextStyle={{\r\n color: theme.colors.blue[500],\r\n fontFamily: theme.fonts.inter_medium_500,\r\n fontSize: theme.fontSizes.xs,\r\n fontWeight: \"500\",\r\n }}\r\n flexStyle={{\r\n flexDirection: \"row\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n textAlign: \"center\",\r\n }}\r\n borderStyled={{\r\n borderWidth: theme.borderWidths.thin,\r\n borderColor: theme.colors.blue[100],\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n />\r\n\r\n <Button\r\n title=\"CONFIRMAR\"\r\n onPress={handleConfirm}\r\n width=\"48%\"\r\n height={40}\r\n isLoading={false}\r\n disabled={false}\r\n backgroundColor={theme.colors.blue[500]}\r\n buttonTextStyle={{\r\n color: theme.colors.neutral[25],\r\n fontFamily: theme.fonts.inter_medium_500,\r\n fontSize: theme.fontSizes.xs,\r\n fontWeight: \"500\",\r\n }}\r\n flexStyle={{\r\n flexDirection: \"row\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n textAlign: \"center\",\r\n }}\r\n borderStyled={{\r\n borderWidth: theme.borderWidths.thin,\r\n borderColor: theme.colors.blue[100],\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n />\r\n </View>\r\n </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,CAACgD,IAAI,CAAC,GAAG,CAAC;MACnC7C,YAAY,EAAEJ,YAAK,CAACK,YAAY,CAACC;IACnC;EAAE,CACH,CACG,CACH,CACF,CACI,CACN,CAAC;AAEZ,CACF,CAAC;AAEDvD,mBAAmB,CAAC6G,WAAW,GAAG,qBAAqB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAjI,OAAA,GACzC,IAAAkI,gCAAe,EAAChH,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","_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,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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AAA,CAAAqD,aAAA,CAACjE,OAAA,CAAA0H,MAAM;IACLC,KAAK,EAAC,WAAW;IACjBhD,OAAO,EAAEX,aAAc;IACvBY,KAAK,EAAC,KAAK;IACXgD,MAAM,EAAE,EAAG;IACXC,SAAS,EAAE,KAAM;IACjBL,QAAQ,EAAE,KAAM;IAChB3C,eAAe,EAAEC,YAAK,CAACC,MAAM,CAACgD,IAAI,CAAC,GAAG,CAAE;IACxCD,eAAe,EAAE;MACf9B,KAAK,EAAElB,YAAK,CAACC,MAAM,CAACmB,OAAO,CAAC,EAAE,CAAC;MAC/BM,UAAU,EAAE1B,YAAK,CAAC2B,KAAK,CAACuB,gBAAgB;MACxCC,QAAQ,EAAEnD,YAAK,CAAC8B,SAAS,CAACG,EAAE;MAC5BJ,UAAU,EAAE;IACd,CAAE;IACFuB,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBC,SAAS,EAAE;IACb,CAAE;IACFrD,YAAY,EAAE;MACZsD,WAAW,EAAEzD,YAAK,CAACK,YAAY,CAACqD,IAAI;MACpCC,WAAW,EAAE3D,YAAK,CAACC,MAAM,CAACgD,IAAI,CAAC,GAAG,CAAC;MACnC7C,YAAY,EAAEJ,YAAK,CAACK,YAAY,CAACC;IACnC;EAAE,CACH,CACG,CACH,CACF,CACI,CACN,CAAC;AAEZ,CACF,CAAC;AAEDtD,mBAAmB,CAAC4G,WAAW,GAAG,qBAAqB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhI,OAAA,GACzC,IAAAiI,gCAAe,EAAC/G,mBAAmB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["interface.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\r\n/**\r\n * IMPORTS\r\n */\r\n\r\ntype IModalCreateActivitieProps<T> = {\r\n visible: boolean;\r\n textTitle?: string;\r\n options?: T;\r\n onClose: () => void;\r\n onPressConfirm: (value: T) => void;\r\n};\r\n\r\ntype IDateAndHoursProps = {\r\n date: string;\r\n hours: string;\r\n};\r\n\r\n/**\r\n * EXPORTS\r\n */\r\nexport type { IModalCreateActivitieProps, IDateAndHoursProps };\r\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 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":[]}
@@ -6,22 +6,22 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
- var _box = _interopRequireDefault(require("..//box"));
9
+ var _box = _interopRequireDefault(require("../box"));
10
10
  var _button = require("../button");
11
11
  var _typography = require("../typography");
12
12
  var _selectDateAndHours = _interopRequireDefault(require("../selects/select-date-and-hours"));
13
13
  var _selectOption = _interopRequireDefault(require("../selects/select-option"));
14
14
  var _iconsSvg = require("../../common/icons-svg");
15
15
  var _asBaseComponent = require("../../@types/as-base-component");
16
- var _optionsActivity = require("../../utils/options-activity");
16
+ var _dataActivities = require("../modals/modal-activities/data-activities");
17
17
  var _theme = require("../../styles/theme/theme");
18
18
  var _styles = require("./styles");
19
19
  var _formatData = require("../../utils/format-data");
20
20
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
22
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
- /**
24
- * IMPORTS
23
+ /**
24
+ * IMPORTS
25
25
  */
26
26
 
27
27
  // components
@@ -40,19 +40,19 @@ const ModalJourneyRectification = /*#__PURE__*/_react.default.memo(({
40
40
  onPressConfirm,
41
41
  textTitle
42
42
  }) => {
43
- var _OPTIONS$0$value, _OPTIONS$;
43
+ var _retificacaoActivitie, _retificacaoActivitie2;
44
44
  const [dateAndHours, setDateAndHours] = (0, _react.useState)({
45
45
  date: (0, _formatData.formatDate)(new Date()),
46
46
  hours: (0, _formatData.formHoursMinute)(String(new Date().getHours() * 3600 + new Date().getMinutes() * 60))
47
47
  });
48
48
 
49
49
  // estados controlados mínimos
50
- const [selectedActivitie, setSelectedActivitie] = (0, _react.useState)((_OPTIONS$0$value = (_OPTIONS$ = _optionsActivity.OPTIONS[0]) === null || _OPTIONS$ === void 0 ? void 0 : _OPTIONS$.value) !== null && _OPTIONS$0$value !== void 0 ? _OPTIONS$0$value : null);
50
+ const [selectedActivitie, setSelectedActivitie] = (0, _react.useState)((_retificacaoActivitie = (_retificacaoActivitie2 = _dataActivities.retificacaoActivities[0]) === null || _retificacaoActivitie2 === void 0 ? void 0 : _retificacaoActivitie2.value) !== null && _retificacaoActivitie !== void 0 ? _retificacaoActivitie : null);
51
51
 
52
52
  // label do motivo derivada com memo
53
53
  const activitieLabel = (0, _react.useMemo)(() => {
54
- var _OPTIONS$find$label, _OPTIONS$find;
55
- return (_OPTIONS$find$label = (_OPTIONS$find = _optionsActivity.OPTIONS.find(activitie => activitie.value === selectedActivitie)) === null || _OPTIONS$find === void 0 ? void 0 : _OPTIONS$find.label) !== null && _OPTIONS$find$label !== void 0 ? _OPTIONS$find$label : null;
54
+ var _retificacaoActivitie3, _retificacaoActivitie4;
55
+ return (_retificacaoActivitie3 = _dataActivities.retificacaoActivities === null || _dataActivities.retificacaoActivities === void 0 || (_retificacaoActivitie4 = _dataActivities.retificacaoActivities.find(activitie => activitie.value === selectedActivitie)) === null || _retificacaoActivitie4 === void 0 ? void 0 : _retificacaoActivitie4.label) !== null && _retificacaoActivitie3 !== void 0 ? _retificacaoActivitie3 : null;
56
56
  }, [selectedActivitie]);
57
57
 
58
58
  // handlers estáveis
@@ -64,7 +64,7 @@ const ModalJourneyRectification = /*#__PURE__*/_react.default.memo(({
64
64
  }, [onClose]);
65
65
  const handleConfirm = (0, _react.useCallback)(() => {
66
66
  onPressConfirm === null || onPressConfirm === void 0 || onPressConfirm({
67
- reasonValue: selectedActivitie,
67
+ value: selectedActivitie,
68
68
  label: activitieLabel,
69
69
  dateAndHours: dateAndHours
70
70
  });
@@ -124,7 +124,7 @@ const ModalJourneyRectification = /*#__PURE__*/_react.default.memo(({
124
124
  }), /*#__PURE__*/_react.default.createElement(_selectOption.default, {
125
125
  titleLabel: "Selecione um motivo",
126
126
  sizeTitleLabel: 18,
127
- dataOption: _optionsActivity.OPTIONS,
127
+ dataOption: _dataActivities.retificacaoActivities,
128
128
  handleSelectDown: handleChangeReason,
129
129
  backgroundColor: _theme.theme.colors.neutral[300]
130
130
  }), /*#__PURE__*/_react.default.createElement(_selectDateAndHours.default, {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_box","_interopRequireDefault","_button","_typography","_selectDateAndHours","_selectOption","_iconsSvg","_asBaseComponent","_optionsActivity","_theme","_styles","_formatData","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalJourneyRectification","React","memo","visible","onClose","onPressConfirm","textTitle","_OPTIONS$0$value","_OPTIONS$","dateAndHours","setDateAndHours","useState","date","formatDate","Date","hours","formHoursMinute","String","getHours","getMinutes","selectedActivitie","setSelectedActivitie","OPTIONS","value","activitieLabel","useMemo","_OPTIONS$find$label","_OPTIONS$find","find","activitie","label","handleChangeReason","useCallback","handleCancel","handleConfirm","reasonValue","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":["/**\r\n * IMPORTS\r\n */\r\nimport React, { useMemo, useState, useCallback } from \"react\";\r\nimport { Modal, View, Pressable } from \"react-native\";\r\n\r\n// components\r\nimport Box from \"..//box\";\r\nimport { Button }from \"../button\";\r\n\r\nimport { Typography } from \"../typography\";\r\n\r\nimport ActivityFields from \"../selects/select-date-and-hours\";\r\n\r\nimport SelectOption from \"../selects/select-option\";\r\n\r\n// commons\r\nimport { Icons } from \"../../common/icons-svg\";\r\nimport { asBaseComponent } from \"../../@types/as-base-component\";\r\n\r\n// helpers\r\nimport { OPTIONS } from \"../../utils/options-activity\";\r\n\r\n// typings\r\nimport type { IDateAndHoursProps, IModalJourneyRectificationProps } from \"./interface\";\r\n\r\n// styles / theme\r\nimport { theme } from \"../../styles/theme/theme\";\r\nimport { styles } from \"./styles\";\r\nimport { formatDate, formHoursMinute } from \"../../utils/format-data\";\r\n\r\nconst ModalJourneyRectification: React.FC<IModalJourneyRectificationProps<any>> = React.memo(\r\n ({ visible, onClose, onPressConfirm, textTitle }) => {\r\n const [dateAndHours, setDateAndHours] = useState<IDateAndHoursProps>({\r\n date: formatDate(new Date()),\r\n hours: formHoursMinute(String(new Date().getHours() * 3600 + new Date().getMinutes() * 60)),\r\n });\r\n\r\n // estados controlados mínimos\r\n const [selectedActivitie, setSelectedActivitie] = useState<string | null>(\r\n OPTIONS[0]?.value ?? null\r\n );\r\n\r\n // label do motivo derivada com memo\r\n const activitieLabel = useMemo(\r\n () => OPTIONS.find((activitie) => activitie.value === selectedActivitie)?.label ?? null,\r\n [selectedActivitie]\r\n );\r\n\r\n // handlers estáveis\r\n const handleChangeReason = useCallback((value: string | null) => {\r\n setSelectedActivitie(value);\r\n }, []);\r\n\r\n const handleCancel = useCallback(() => {\r\n onClose?.();\r\n }, [onClose]);\r\n\r\n const handleConfirm = useCallback(() => {\r\n onPressConfirm?.({\r\n reasonValue: selectedActivitie,\r\n label: activitieLabel,\r\n dateAndHours: dateAndHours,\r\n });\r\n\r\n onClose?.();\r\n }, [onPressConfirm, onClose, activitieLabel, selectedActivitie, dateAndHours]);\r\n\r\n return (\r\n <Modal\r\n animationType=\"fade\"\r\n transparent\r\n visible={visible}\r\n onRequestClose={handleCancel}\r\n statusBarTranslucent\r\n >\r\n <Pressable style={styles.overlay} onPress={handleCancel}>\r\n <Box\r\n width=\"90%\"\r\n backgroundColor={theme.colors.orange[500]}\r\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\r\n paddingStyle={{\r\n paddingLeft: theme.paddings[\"2xs\"],\r\n paddingRight: theme.paddings[\"2xs\"],\r\n paddingTop: theme.paddings.sm,\r\n paddingBottom: theme.paddings.sm,\r\n }}\r\n >\r\n <View style={styles.headerRow}>\r\n <Icons\r\n icon=\"EXCLAMATION_TRIANGLE\"\r\n color={theme.colors.orange[500]}\r\n background={theme.colors.neutral[300]}\r\n size={22}\r\n />\r\n <Typography\r\n text={textTitle ?? \"Editar atividad\"}\r\n color={theme.colors.neutral[25]}\r\n marginLeft={theme.margins[\"2xs\"]}\r\n fontFamily={theme.fonts.inter_bold}\r\n fontWeight=\"700\"\r\n size={theme.fontSizes.lg}\r\n />\r\n </View>\r\n\r\n <Box\r\n backgroundColor={theme.colors.neutral[300]}\r\n paddingStyle={{ padding: theme.paddings.xs }}\r\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\r\n >\r\n <Typography\r\n text=\"Confirme as alterações antes de salvar.\"\r\n color={theme.colors.black[100]}\r\n fontFamily={theme.fonts.inter_regular_400}\r\n fontWeight=\"400\"\r\n lineHeight={theme.lineHeight[\"2xl\"]}\r\n size={theme.fontSizes.sm}\r\n marginBottom={16}\r\n />\r\n\r\n <SelectOption\r\n titleLabel=\"Selecione um motivo\"\r\n sizeTitleLabel={18}\r\n dataOption={OPTIONS as any}\r\n handleSelectDown={handleChangeReason}\r\n backgroundColor={theme.colors.neutral[300]}\r\n />\r\n\r\n <ActivityFields\r\n disabled={false}\r\n icon={\"CALENDAR\"}\r\n value={dateAndHours?.date}\r\n onPressConfirm={(value) =>\r\n setDateAndHours({ date: value, hours: dateAndHours?.hours })\r\n }\r\n />\r\n\r\n <ActivityFields\r\n disabled={false}\r\n icon={\"TIMER\"}\r\n value={dateAndHours?.hours}\r\n onPressConfirm={(value) =>\r\n setDateAndHours({ date: dateAndHours?.date, hours: value })\r\n }\r\n />\r\n\r\n <View style={styles.actions}>\r\n <Button\r\n title=\"CANCELAR\"\r\n onPress={handleCancel}\r\n width=\"48%\"\r\n height={40}\r\n isLoading={false}\r\n disabled={false}\r\n backgroundColor={theme.colors.neutral[300]}\r\n buttonTextStyle={{\r\n color: theme.colors.blue[500],\r\n fontFamily: theme.fonts.inter_medium_500,\r\n fontSize: theme.fontSizes.xs,\r\n fontWeight: \"500\",\r\n }}\r\n flexStyle={{\r\n flexDirection: \"row\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n textAlign: \"center\",\r\n }}\r\n borderStyled={{\r\n borderWidth: theme.borderWidths.thin,\r\n borderColor: theme.colors.blue[100],\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n />\r\n\r\n <Button\r\n title=\"CONFIRMAR\"\r\n onPress={handleConfirm}\r\n width=\"48%\"\r\n height={40}\r\n isLoading={false}\r\n disabled={false}\r\n backgroundColor={theme.colors.blue[500]}\r\n buttonTextStyle={{\r\n color: theme.colors.neutral[25],\r\n fontFamily: theme.fonts.inter_medium_500,\r\n fontSize: theme.fontSizes.xs,\r\n fontWeight: \"500\",\r\n }}\r\n flexStyle={{\r\n flexDirection: \"row\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n textAlign: \"center\",\r\n }}\r\n borderStyled={{\r\n borderWidth: theme.borderWidths.thin,\r\n borderColor: theme.colors.blue[100],\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n />\r\n </View>\r\n </Box>\r\n </Box>\r\n </Pressable>\r\n </Modal>\r\n );\r\n }\r\n);\r\n\r\nModalJourneyRectification.displayName = \"ModalJourneyRectification\";\r\nexport default asBaseComponent(ModalJourneyRectification);"],"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,gBAAA,GAAAV,OAAA;AAMA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,OAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AAAsE,SAAAG,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,C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M;IAChB3C,eAAe,EAAEC,YAAK,CAACC,MAAM,CAACgD,IAAI,CAAC,GAAG,CAAE;IACxCD,eAAe,EAAE;MACf9B,KAAK,EAAElB,YAAK,CAACC,MAAM,CAACmB,OAAO,CAAC,EAAE,CAAC;MAC/BM,UAAU,EAAE1B,YAAK,CAAC2B,KAAK,CAACuB,gBAAgB;MACxCC,QAAQ,EAAEnD,YAAK,CAAC8B,SAAS,CAACG,EAAE;MAC5BJ,UAAU,EAAE;IACd,CAAE;IACFuB,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBC,SAAS,EAAE;IACb,CAAE;IACFrD,YAAY,EAAE;MACZsD,WAAW,EAAEzD,YAAK,CAACK,YAAY,CAACqD,IAAI;MACpCC,WAAW,EAAE3D,YAAK,CAACC,MAAM,CAACgD,IAAI,CAAC,GAAG,CAAC;MACnC7C,YAAY,EAAEJ,YAAK,CAACK,YAAY,CAACC;IACnC;EAAE,CACH,CACG,CACH,CACF,CACI,CACN,CAAC;AAEZ,CACF,CAAC;AAEDvD,yBAAyB,CAAC6G,WAAW,GAAG,2BAA2B;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAjI,OAAA,GACrD,IAAAkI,gCAAe,EAAChH,yBAAyB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_box","_interopRequireDefault","_button","_typography","_selectDateAndHours","_selectOption","_iconsSvg","_asBaseComponent","_dataActivities","_theme","_styles","_formatData","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalJourneyRectification","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// typings\nimport type { IDateAndHoursProps, IModalJourneyRectificationProps } from \"./interface\";\n\n// styles / theme\nimport { theme } from \"../../styles/theme/theme\";\nimport { styles } from \"./styles\";\nimport { formatDate, formHoursMinute } from \"../../utils/format-data\";\n\nconst ModalJourneyRectification: React.FC<IModalJourneyRectificationProps<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 ?? \"Editar atividad\"}\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=\"Confirme as alterações antes de salvar.\"\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>\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MAAM,CAACgD,IAAI,CAAC,GAAG,CAAC;MACnC7C,YAAY,EAAEJ,YAAK,CAACK,YAAY,CAACC;IACnC;EAAE,CACH,CACG,CACH,CACF,CACI,CACN,CAAC;AAEZ,CACF,CAAC;AAEDtD,yBAAyB,CAAC4G,WAAW,GAAG,2BAA2B;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhI,OAAA,GACrD,IAAAiI,gCAAe,EAAC/G,yBAAyB,CAAC","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.activitiesByDriverType = void 0;
6
+ exports.retificacaoActivities = exports.activitiesByDriverType = void 0;
7
7
  /**
8
8
  * Tipagem da atividade
9
9
  */
@@ -86,4 +86,28 @@ const activitiesByDriverType = exports.activitiesByDriverType = {
86
86
  descanso: baseActivities.descanso
87
87
  }
88
88
  };
89
+
90
+ /**
91
+ * Atividades para retificação
92
+ */
93
+
94
+ const retificacaoActivities = exports.retificacaoActivities = [{
95
+ value: 22,
96
+ label: "Em operação - Carregamento"
97
+ }, {
98
+ value: 21,
99
+ label: "Tempo à Disposição"
100
+ }, {
101
+ value: 5,
102
+ label: "Repouso Semanal"
103
+ }, {
104
+ value: 6,
105
+ label: "Repouso Noturno"
106
+ }, {
107
+ value: 7,
108
+ label: "Refeição"
109
+ }, {
110
+ value: 9,
111
+ label: "Descanso"
112
+ }];
89
113
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["baseActivities","trabalho","id","referencia","cor_hex","descricao","tipo","descanso","activitiesByDriverType","exports","normal","carregador"],"sources":["index.ts"],"sourcesContent":["/**\n * Tipagem da atividade\n */\nexport interface IActivity {\n id: number;\n referencia: string;\n cor_hex: string;\n descricao: string;\n tipo: \"trabalho\" | \"descanso\";\n}\n\n/**\n * Lista base de atividades padrão (normal)\n */\nconst baseActivities: Record<string, IActivity[]> = {\n trabalho: [\n {\n id: 1,\n referencia: \"operacao_veiculo\",\n cor_hex: \"#000000\",\n descricao: \"Operação com Veículo\",\n tipo: \"trabalho\",\n },\n {\n id: 2,\n referencia: \"aguardando_carga\",\n cor_hex: \"#000000\",\n descricao: \"Em Carga\",\n tipo: \"trabalho\",\n },\n {\n id: 3,\n referencia: \"aguardando_descarga\",\n cor_hex: \"#000000\",\n descricao: \"Em Descarga\",\n tipo: \"trabalho\",\n },\n {\n id: 8,\n referencia: \"disposicao_veiculo_parado\",\n cor_hex: \"#000000\",\n descricao: \"Disposição com Veículo Parado\",\n tipo: \"trabalho\",\n },\n ],\n descanso: [\n {\n id: 5,\n referencia: \"repouso_semanal\",\n cor_hex: \"#000000\",\n descricao: \"Repouso Semanal\",\n tipo: \"descanso\",\n },\n {\n id: 6,\n referencia: \"repouso_noturno\",\n cor_hex: \"#000000\",\n descricao: \"Repouso Noturno\",\n tipo: \"descanso\",\n },\n {\n id: 7,\n referencia: \"refeicao\",\n cor_hex: \"#000000\",\n descricao: \"Refeição\",\n tipo: \"descanso\",\n },\n {\n id: 9,\n referencia: \"descanso\",\n cor_hex: \"#000000\",\n descricao: \"Descanso\",\n tipo: \"descanso\",\n },\n ],\n};\n\n/**\n * Atividades específicas por tipo de usuário\n */\nexport const activitiesByDriverType: Record<string, Record<string, IActivity[]>> = {\n normal: baseActivities,\n carregador: {\n trabalho: [\n {\n id: 22,\n referencia: \"em_operacao_carregamento\",\n cor_hex: \"#000000\",\n descricao: \"Em operação - Carregamento\",\n tipo: \"trabalho\",\n },\n {\n id: 21,\n referencia: \"tempo_disposicao\",\n cor_hex: \"#000000\",\n descricao: \"Tempo à Disposição\",\n tipo: \"trabalho\",\n },\n ],\n descanso: baseActivities.descanso!,\n },\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AASA;AACA;AACA;AACA,MAAMA,cAA2C,GAAG;EAClDC,QAAQ,EAAE,CACR;IACEC,EAAE,EAAE,CAAC;IACLC,UAAU,EAAE,kBAAkB;IAC9BC,OAAO,EAAE,SAAS;IACl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,EAAE,0BAA0B;MACtCC,OAAO,EAAE,SAAS;MAClBC,SAAS,EAAE,4BAA4B;MACvCC,IAAI,EAAE;IACR,CAAC,EACD;MACEJ,EAAE,EAAE,EAAE;MACNC,UAAU,EAAE,kBAAkB;MAC9BC,OAAO,EAAE,SAAS;MAClBC,SAAS,EAAE,oBAAoB;MAC/BC,IAAI,EAAE;IACR,CAAC,CACF;IACDC,QAAQ,EAAEP,cAAc,CAACO;EAC3B;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["baseActivities","trabalho","id","referencia","cor_hex","descricao","tipo","descanso","activitiesByDriverType","exports","normal","carregador","retificacaoActivities","value","label"],"sources":["index.ts"],"sourcesContent":["/**\n * Tipagem da atividade\n */\nexport interface IActivity {\n id: number;\n referencia: string;\n cor_hex: string;\n descricao: string;\n tipo: \"trabalho\" | \"descanso\";\n}\n\n/**\n * Lista base de atividades padrão (normal)\n */\nconst baseActivities: Record<string, IActivity[]> = {\n trabalho: [\n {\n id: 1,\n referencia: \"operacao_veiculo\",\n cor_hex: \"#000000\",\n descricao: \"Operação com Veículo\",\n tipo: \"trabalho\",\n },\n {\n id: 2,\n referencia: \"aguardando_carga\",\n cor_hex: \"#000000\",\n descricao: \"Em Carga\",\n tipo: \"trabalho\",\n },\n {\n id: 3,\n referencia: \"aguardando_descarga\",\n cor_hex: \"#000000\",\n descricao: \"Em Descarga\",\n tipo: \"trabalho\",\n },\n {\n id: 8,\n referencia: \"disposicao_veiculo_parado\",\n cor_hex: \"#000000\",\n descricao: \"Disposição com Veículo Parado\",\n tipo: \"trabalho\",\n },\n ],\n descanso: [\n {\n id: 5,\n referencia: \"repouso_semanal\",\n cor_hex: \"#000000\",\n descricao: \"Repouso Semanal\",\n tipo: \"descanso\",\n },\n {\n id: 6,\n referencia: \"repouso_noturno\",\n cor_hex: \"#000000\",\n descricao: \"Repouso Noturno\",\n tipo: \"descanso\",\n },\n {\n id: 7,\n referencia: \"refeicao\",\n cor_hex: \"#000000\",\n descricao: \"Refeição\",\n tipo: \"descanso\",\n },\n {\n id: 9,\n referencia: \"descanso\",\n cor_hex: \"#000000\",\n descricao: \"Descanso\",\n tipo: \"descanso\",\n },\n ],\n};\n\n/**\n * Atividades específicas por tipo de usuário\n */\nexport const activitiesByDriverType: Record<string, Record<string, IActivity[]>> = {\n normal: baseActivities,\n carregador: {\n trabalho: [\n {\n id: 22,\n referencia: \"em_operacao_carregamento\",\n cor_hex: \"#000000\",\n descricao: \"Em operação - Carregamento\",\n tipo: \"trabalho\",\n },\n {\n id: 21,\n referencia: \"tempo_disposicao\",\n cor_hex: \"#000000\",\n descricao: \"Tempo à Disposição\",\n tipo: \"trabalho\",\n },\n ],\n descanso: baseActivities.descanso!,\n },\n};\n\n/**\n * Atividades para retificação\n */\n\nexport const retificacaoActivities = [\n {\n value: 22,\n label: \"Em operação - Carregamento\",\n },\n {\n value: 21,\n label: \"Tempo à Disposição\",\n },\n {\n value: 5,\n label: \"Repouso Semanal\",\n },\n {\n value: 6,\n label: \"Repouso Noturno\",\n },\n {\n value: 7,\n label: \"Refeição\",\n },\n {\n value: 9,\n label: \"Descanso\",\n },\n];\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AASA;AACA;AACA;AACA,MAAMA,cAA2C,GAAG;EAClDC,QAAQ,EAAE,CACR;IACEC,EAAE,EAAE,CAAC;IACLC,UAAU,EAAE,kBAAkB;IAC9BC,OAAO,EAAE,SAAS;IAClBC,SAAS,EAAE,sBAAsB;IACjCC,IAAI,EAAE;EACR,CAAC,EACD;IACEJ,EAAE,EAAE,CAAC;IACLC,UAAU,EAAE,kBAAkB;IAC9BC,OAAO,EAAE,SAAS;IAClBC,SAAS,EAAE,UAAU;IACrBC,IAAI,EAAE;EACR,CAAC,EACD;IACEJ,EAAE,EAAE,CAAC;IACLC,UAAU,EAAE,qBAAqB;IACjCC,OAAO,EAAE,SAAS;IAClBC,SAAS,EAAE,aAAa;IACxBC,IAAI,EAAE;EACR,CAAC,EACD;IACEJ,EAAE,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CAAAG,qBAAA,GAAG,CACnC;EACEC,KAAK,EAAE,EAAE;EACTC,KAAK,EAAE;AACT,CAAC,EACD;EACED,KAAK,EAAE,EAAE;EACTC,KAAK,EAAE;AACT,CAAC,EACD;EACED,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE;AACT,CAAC,EACD;EACED,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE;AACT,CAAC,EACD;EACED,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE;AACT,CAAC,EACD;EACED,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE;AACT,CAAC,CACF","ignoreList":[]}
@@ -15,8 +15,8 @@ var _theme = require("../../../styles/theme/theme");
15
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
- /**
19
- * IMPORTS
18
+ /**
19
+ * IMPORTS
20
20
  */
21
21
 
22
22
  // components
@@ -35,6 +35,7 @@ const ModalActivityReason = ({
35
35
  testID
36
36
  }) => {
37
37
  const [isLoading] = (0, _react.useState)(false);
38
+ const [description, setDescription] = (0, _react.useState)("");
38
39
  return /*#__PURE__*/_react.default.createElement(_reactNative.Modal, {
39
40
  testID: testID,
40
41
  animationType: "fade",
@@ -92,7 +93,8 @@ const ModalActivityReason = ({
92
93
  }, /*#__PURE__*/_react.default.createElement(_inputTextCounter.default, {
93
94
  label: `${textTitle || "Motivo da exclusão"}`,
94
95
  placeholderTextColor: "#9B9B9B",
95
- placeholder: "Motivo da exclus\xE3o"
96
+ placeholder: "Motivo da exclus\xE3o",
97
+ onChangeText: setDescription
96
98
  })), /*#__PURE__*/_react.default.createElement(_box.default, {
97
99
  marginStyle: {
98
100
  marginTop: 4
@@ -129,8 +131,7 @@ const ModalActivityReason = ({
129
131
  }), /*#__PURE__*/_react.default.createElement(_button.Button, {
130
132
  title: "CONFIRMAR",
131
133
  onPress: () => {
132
- modalConfirm(true);
133
- onClose();
134
+ modalConfirm(description);
134
135
  },
135
136
  width: "48%",
136
137
  height: 40,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_box","_interopRequireDefault","_typography","_button","_inputTextCounter","_iconsSvg","_theme","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalActivityReason","visible","onClose","modalConfirm","textTitle","testID","isLoading","useState","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","marginLeft","flexStyle","flexDirection","Icons","icon","color","background","neutral","size","Typography","text","margins","fontFamily","fonts","inter_bold_700","fontSizes","md","padding","xs","label","placeholderTextColor","placeholder","marginTop","Button","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor","displayName","_default","exports"],"sources":["index.tsx"],"sourcesContent":["/**\r\n * IMPORTS\r\n */\r\nimport React, { useState } from \"react\";\r\nimport { Modal, View } from \"react-native\";\r\n\r\n// components\r\nimport Box from \"../../box\";\r\nimport { Typography } from \"../../typography\";\r\nimport { Button } from \"../../button\";\r\n\r\nimport InputTextCounter from \"../../input-text-counter\";\r\n\r\n// commons / svg\r\nimport { Icons } from \"../../../common/icons-svg\";\r\n\r\n// typings\r\nimport type { IModalActivityReasonProps } from \"./interface\";\r\n\r\n// styles\r\nimport { theme } from \"../../../styles/theme/theme\";\r\n\r\nconst ModalActivityReason: React.FC<IModalActivityReasonProps> = ({\r\n visible,\r\n onClose,\r\n modalConfirm,\r\n textTitle,\r\n testID,\r\n}) => {\r\n const [isLoading] = useState(false);\r\n\r\n return (\r\n <Modal testID={testID} animationType=\"fade\" transparent visible={visible}>\r\n <View\r\n style={{\r\n flex: 1,\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n backgroundColor: \"rgba(0,0,0,0.6)\",\r\n }}\r\n >\r\n <Box\r\n width={\"90%\"}\r\n backgroundColor={theme.colors.orange[500]}\r\n borderStyled={{\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n paddingStyle={{\r\n paddingLeft: theme.paddings[\"2xs\"],\r\n paddingRight: theme.paddings[\"2xs\"],\r\n paddingTop: theme.paddings.sm,\r\n paddingBottom: theme.paddings.sm,\r\n }}\r\n >\r\n <Box\r\n marginStyle={{ marginBottom: 10, marginLeft: 4 }}\r\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}\r\n >\r\n <Icons\r\n icon=\"EXCLAMATION_TRIANGLE\"\r\n color={theme.colors.orange[500]}\r\n background={theme.colors.neutral[300]}\r\n size={22}\r\n />\r\n <Typography\r\n text={`${textTitle ?? \"Motivo da exclusão\"}`}\r\n color={theme.colors.neutral[25]}\r\n marginLeft={theme.margins[\"2xs\"]}\r\n fontFamily={theme.fonts.inter_bold_700}\r\n size={theme.fontSizes.md}\r\n />\r\n </Box>\r\n\r\n <Box\r\n backgroundColor={theme.colors.neutral[300]}\r\n paddingStyle={{\r\n padding: theme.paddings.xs,\r\n }}\r\n borderStyled={{\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n >\r\n <Box width=\"100%\">\r\n <InputTextCounter\r\n label={`${textTitle || \"Motivo da exclusão\"}`}\r\n placeholderTextColor=\"#9B9B9B\"\r\n placeholder=\"Motivo da exclusão\"\r\n />\r\n </Box>\r\n <Box\r\n marginStyle={{ marginTop: 4 }}\r\n flexStyle={{\r\n flexDirection: \"row\",\r\n justifyContent: \"space-between\",\r\n }}\r\n >\r\n <Button\r\n title=\"CANCELAR\"\r\n onPress={onClose}\r\n width={\"48%\"}\r\n height={40}\r\n isLoading={isLoading}\r\n disabled={isLoading}\r\n backgroundColor={theme.colors.neutral[300]}\r\n buttonTextStyle={{\r\n color: theme.colors.blue[100],\r\n fontFamily: \"Inter-Medium\",\r\n fontSize: theme.fontSizes.xs,\r\n fontWeight: \"500\",\r\n }}\r\n flexStyle={{\r\n flexDirection: \"row\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n textAlign: \"center\",\r\n }}\r\n borderStyled={{\r\n borderWidth: theme.borderWidths.thin,\r\n borderColor: theme.colors.blue[100],\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n />\r\n <Button\r\n title=\"CONFIRMAR\"\r\n onPress={() => {\r\n modalConfirm(true);\r\n onClose();\r\n }}\r\n width={\"48%\"}\r\n height={40}\r\n isLoading={isLoading}\r\n disabled={isLoading}\r\n backgroundColor={theme.colors.blue[500]}\r\n buttonTextStyle={{\r\n color: theme.colors.neutral[25],\r\n fontFamily: \"Inter-Medium\",\r\n fontSize: theme.fontSizes.xs,\r\n fontWeight: \"500\",\r\n }}\r\n flexStyle={{\r\n flexDirection: \"row\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n textAlign: \"center\",\r\n }}\r\n borderStyled={{\r\n borderWidth: theme.borderWidths.thin,\r\n borderColor: theme.colors.blue[100],\r\n borderRadius: theme.borderWidths.thick_medium,\r\n }}\r\n />\r\n </Box>\r\n </Box>\r\n </Box>\r\n </View>\r\n </Modal>\r\n );\r\n};\r\n\r\nModalActivityReason.displayName = \"ModalActivityReason\";\r\n\r\nexport default ModalActivityReason;\r\n"],"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EzCkB,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_box","_interopRequireDefault","_typography","_button","_inputTextCounter","_iconsSvg","_theme","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalActivityReason","visible","onClose","modalConfirm","textTitle","testID","isLoading","useState","description","setDescription","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","marginLeft","flexStyle","flexDirection","Icons","icon","color","background","neutral","size","Typography","text","margins","fontFamily","fonts","inter_bold_700","fontSizes","md","padding","xs","label","placeholderTextColor","placeholder","onChangeText","marginTop","Button","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor","displayName","_default","exports"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React, { useState } from \"react\";\nimport { Modal, View } from \"react-native\";\n\n// components\nimport Box from \"../../box\";\nimport { Typography } from \"../../typography\";\nimport { Button } from \"../../button\";\n\nimport InputTextCounter from \"../../input-text-counter\";\n\n// commons / svg\nimport { Icons } from \"../../../common/icons-svg\";\n\n// typings\nimport type { IModalActivityReasonProps } from \"./interface\";\n\n// styles\nimport { theme } from \"../../../styles/theme/theme\";\n\nconst ModalActivityReason: React.FC<IModalActivityReasonProps> = ({\n visible,\n onClose,\n modalConfirm,\n textTitle,\n testID,\n}) => {\n const [isLoading] = useState(false);\n const [description, setDescription] = useState(\"\");\n\n return (\n <Modal testID={testID} animationType=\"fade\" transparent visible={visible}>\n <View\n style={{\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n backgroundColor: \"rgba(0,0,0,0.6)\",\n }}\n >\n <Box\n width={\"90%\"}\n backgroundColor={theme.colors.orange[500]}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_medium,\n }}\n paddingStyle={{\n paddingLeft: theme.paddings[\"2xs\"],\n paddingRight: theme.paddings[\"2xs\"],\n paddingTop: theme.paddings.sm,\n paddingBottom: theme.paddings.sm,\n }}\n >\n <Box\n marginStyle={{ marginBottom: 10, marginLeft: 4 }}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}\n >\n <Icons\n icon=\"EXCLAMATION_TRIANGLE\"\n color={theme.colors.orange[500]}\n background={theme.colors.neutral[300]}\n size={22}\n />\n <Typography\n text={`${textTitle ?? \"Motivo da exclusão\"}`}\n color={theme.colors.neutral[25]}\n marginLeft={theme.margins[\"2xs\"]}\n fontFamily={theme.fonts.inter_bold_700}\n size={theme.fontSizes.md}\n />\n </Box>\n\n <Box\n backgroundColor={theme.colors.neutral[300]}\n paddingStyle={{\n padding: theme.paddings.xs,\n }}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_medium,\n }}\n >\n <Box width=\"100%\">\n <InputTextCounter\n label={`${textTitle || \"Motivo da exclusão\"}`}\n placeholderTextColor=\"#9B9B9B\"\n placeholder=\"Motivo da exclusão\"\n onChangeText={setDescription}\n />\n </Box>\n <Box\n marginStyle={{ marginTop: 4 }}\n flexStyle={{\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n }}\n >\n <Button\n title=\"CANCELAR\"\n onPress={onClose}\n width={\"48%\"}\n height={40}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.neutral[300]}\n buttonTextStyle={{\n color: theme.colors.blue[100],\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n <Button\n title=\"CONFIRMAR\"\n onPress={() => {\n modalConfirm(description);\n }}\n width={\"48%\"}\n height={40}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.blue[500]}\n buttonTextStyle={{\n color: theme.colors.neutral[25],\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n </Box>\n </Box>\n </Box>\n </View>\n </Modal>\n );\n};\n\nModalActivityReason.displayName = \"ModalActivityReason\";\n\nexport default ModalActivityReason;\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,IAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEA,IAAAM,iBAAA,GAAAH,sBAAA,CAAAH,OAAA;AAGA,IAAAO,SAAA,GAAAP,OAAA;AAMA,IAAAQ,MAAA,GAAAR,OAAA;AAAoD,SAAAG,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAA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BmB,QAAQ,EAAE/C,YAAK,CAAC+B,SAAS,CAACG,EAAE;MAC5Bc,UAAU,EAAE;IACd,CAAE;IACF/B,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBrB,UAAU,EAAE,QAAQ;MACpBD,cAAc,EAAE,QAAQ;MACxBqD,SAAS,EAAE;IACb,CAAE;IACF9C,YAAY,EAAE;MACZ+C,WAAW,EAAElD,YAAK,CAACK,YAAY,CAAC8C,IAAI;MACpCC,WAAW,EAAEpD,YAAK,CAACC,MAAM,CAAC6C,IAAI,CAAC,GAAG,CAAC;MACnC1C,YAAY,EAAEJ,YAAK,CAACK,YAAY,CAACC;IACnC;EAAE,CACH,CACE,CACF,CACF,CACD,CACD,CAAC;AAEZ,CAAC;AAED3B,mBAAmB,CAAC0E,WAAW,GAAG,qBAAqB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA9F,OAAA,GAEzCkB,mBAAmB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\r\ninterface IModalActivityReasonProps {\r\n visible: boolean;\r\n onClose: () => void;\r\n modalConfirm: (value: true) => void;\r\n textTitle?: string;\r\n testID?: string;\r\n}\r\n\r\nexport type { IModalActivityReasonProps };\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\ninterface IModalActivityReasonProps {\n visible: boolean;\n onClose: () => void;\n modalConfirm: (value: string) => void;\n textTitle?: string;\n testID?: string;\n}\n\nexport type { IModalActivityReasonProps };\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_box","_typography","_button","_selectOption","_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","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 { Button } from \"../../button\";\nimport SelectOption from \"../../selects/select-option\";\n\n// styles / theme\nimport { theme } from \"../../../styles/theme/theme\";\n\n// assets / icons\nimport { Icons } from \"../../../common/icons-svg\";\n\n/**\n * TYPES\n */\ninterface IModalChangeActivityProps {\n visible: boolean;\n onClose: () => void;\n modalConfirm: (newData: { label: string; value: string; key: number }) => void;\n descricao: string;\n}\n\n/**\n * CONSTANTS\n */\nconst options = [\n { label: \"Selecione atividade\", value: \"none\", key: 0 },\n { label: \"Descanso\", value: \"descanso\", key: 5 },\n { label: \"Repouso Noturno\", value: \"repouso_noturno\", key: 6 },\n { label: \"Refeição\", value: \"refeição\", key: 7 },\n { label: \"Repouso Semanal\", value: \"repouso_semanal\", key: 9 },\n];\n\n/**\n * COMPONENT\n */\nexport const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({\n visible,\n onClose,\n modalConfirm,\n descricao,\n}) => {\n const [isLoading] = React.useState(false);\n\n const initial = (descricao ?? \"\").toLowerCase().replace(/\\s+/g, \"_\");\n const [selectedOption, setSelectedOption] = React.useState(initial || \"none\");\n\n const handleConfirm = () => {\n const selected = options.find((opt) => opt.value === selectedOption);\n if (selected && selected.value !== \"none\") {\n modalConfirm({\n label: selected.label,\n value: selected.value,\n key: selected.key,\n });\n }\n onClose();\n };\n\n return (\n <Modal animationType=\"fade\" transparent visible={visible}>\n <View\n style={{\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n backgroundColor: \"rgba(0,0,0,0.6)\",\n }}\n >\n <Box\n width={346}\n backgroundColor={theme.colors.orange[500]}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_medium,\n }}\n paddingStyle={{\n paddingLeft: theme.paddings[\"2xs\"],\n paddingRight: theme.paddings[\"2xs\"],\n paddingTop: theme.paddings.sm,\n paddingBottom: theme.paddings.sm,\n }}\n >\n <Box\n marginStyle={{ marginBottom: theme.margins[\"2xs\"], marginLeft: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}\n >\n <Icons\n icon=\"EXCLAMATION_TRIANGLE\"\n color={theme.colors.black[10]}\n background={theme.colors.yellow[50]}\n size={22}\n />\n <Typography\n text=\"Alterar Atividade\"\n color=\"#fff\"\n marginLeft={theme.margins[\"2xs\"]}\n fontFamily={theme.fonts.inter_bold_700}\n size={theme.fontSizes.md}\n />\n </Box>\n\n <Box\n backgroundColor={theme.colors.neutral[300]}\n paddingStyle={{ padding: theme.paddings.xs }}\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\n >\n <Box flexStyle={{ flexDirection: \"row\", justifyContent: \"flex-start\" }} width={\"90%\"}>\n <Typography\n text={`Deseja realmente alterar sua atividade de ${descricao || \"atividade atual\"}?`}\n color={theme.colors.black[25]}\n fontFamily={theme.fonts.inter_medium_500}\n size={theme.fontSizes.xs}\n style={{ flexWrap: \"wrap\", maxWidth: \"100%\" }}\n />\n </Box>\n\n <SelectOption\n titleLabel=\"Selecione atividade\"\n sizeTitleLabel={theme.fontSizes.xs}\n dataOption={options}\n handleSelectDown={(opt) => {\n const option = options.find((o) => o.label === opt || o.value === opt);\n if (option) setSelectedOption(option.value);\n }}\n backgroundColor={theme.colors.neutral[300]}\n />\n\n <Box\n marginStyle={{ marginTop: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", justifyContent: \"space-between\" }}\n >\n <Button\n title=\"CANCELAR\"\n onPress={onClose}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.neutral[300]}\n buttonTextStyle={{\n color: theme.colors.blue[100],\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n <Button\n title=\"CONFIRMAR\"\n onPress={handleConfirm}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.blue[100]}\n buttonTextStyle={{\n color: \"#fff\",\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n </Box>\n </Box>\n </Box>\n </View>\n </Modal>\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,OAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAN,sBAAA,CAAAC,OAAA;AAGA,IAA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Q,EAAEtD,YAAK,CAACgC,SAAS,CAACI,EAAE;MAC5BmB,UAAU,EAAE;IACd,CAAE;IACFrC,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBtB,UAAU,EAAE,QAAQ;MACpBD,cAAc,EAAE,QAAQ;MACxB4D,SAAS,EAAE;IACb,CAAE;IACFrD,YAAY,EAAE;MACZsD,WAAW,EAAEzD,YAAK,CAACK,YAAY,CAACqD,IAAI;MACpCC,WAAW,EAAE3D,YAAK,CAACC,MAAM,CAACoD,IAAI,CAAC,GAAG,CAAC;MACnCjD,YAAY,EAAEJ,YAAK,CAACK,YAAY,CAACC;IACnC;EAAE,CACH,CACE,CACF,CACF,CACD,CACD,CAAC;AAEZ,CAAC;AAACsD,OAAA,CAAAxF,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_box","_typography","_button","_selectOption","_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","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 { Button } from \"../../button\";\nimport SelectOption from \"../../selects/select-option\";\n\n// styles / theme\nimport { theme } from \"../../../styles/theme/theme\";\n\n// assets / icons\nimport { Icons } from \"../../../common/icons-svg\";\n\n/**\n * TYPES\n */\ninterface IModalChangeActivityProps {\n visible: boolean;\n onClose: () => void;\n modalConfirm: (newData: { label: string; value: string; key: number }) => void;\n descricao: string;\n}\n\n/**\n * CONSTANTS\n */\nconst options = [\n { label: \"Selecione atividade\", value: \"none\", key: 0 },\n { label: \"Descanso\", value: \"descanso\", key: 5 },\n { label: \"Repouso Noturno\", value: \"repouso_noturno\", key: 6 },\n { label: \"Refeição\", value: \"refeição\", key: 7 },\n { label: \"Repouso Semanal\", value: \"repouso_semanal\", key: 9 },\n];\n\n/**\n * COMPONENT\n */\nexport const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({\n visible,\n onClose,\n modalConfirm,\n descricao,\n}) => {\n const [isLoading] = React.useState(false);\n\n const initial = (descricao ?? \"\").toLowerCase().replace(/\\s+/g, \"_\");\n const [selectedOption, setSelectedOption] = React.useState(initial || \"none\");\n\n const handleConfirm = () => {\n const selected = options.find((opt) => opt.value === selectedOption);\n if (selected && selected.value !== \"none\") {\n modalConfirm({\n label: selected.label,\n value: selected.value,\n key: selected.key,\n });\n }\n onClose();\n };\n\n return (\n <Modal animationType=\"fade\" transparent visible={visible}>\n <View\n style={{\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n backgroundColor: \"rgba(0,0,0,0.6)\",\n }}\n >\n <Box\n width={346}\n backgroundColor={theme.colors.orange[500]}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_medium,\n }}\n paddingStyle={{\n paddingLeft: theme.paddings[\"2xs\"],\n paddingRight: theme.paddings[\"2xs\"],\n paddingTop: theme.paddings.sm,\n paddingBottom: theme.paddings.sm,\n }}\n >\n <Box\n marginStyle={{ marginBottom: theme.margins[\"2xs\"], marginLeft: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}\n >\n <Icons\n icon=\"EXCLAMATION_TRIANGLE\"\n color={theme.colors.black[10]}\n background={theme.colors.yellow[50]}\n size={22}\n />\n <Typography\n text=\"Alterar Atividade\"\n color=\"#fff\"\n marginLeft={theme.margins[\"2xs\"]}\n fontFamily={theme.fonts.inter_bold_700}\n size={theme.fontSizes.md}\n />\n </Box>\n\n <Box\n backgroundColor={theme.colors.neutral[300]}\n paddingStyle={{ padding: theme.paddings.xs }}\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\n >\n <Box flexStyle={{ flexDirection: \"row\", justifyContent: \"flex-start\" }} width={\"90%\"}>\n <Typography\n text={`Deseja realmente alterar sua atividade de ${descricao || \"atividade atual\"}?`}\n color={theme.colors.black[25]}\n fontFamily={theme.fonts.inter_medium_500}\n size={theme.fontSizes.xs}\n style={{ flexWrap: \"wrap\", maxWidth: \"100%\" }}\n />\n </Box>\n\n <SelectOption\n titleLabel=\"Selecione atividade\"\n sizeTitleLabel={theme.fontSizes.xs}\n dataOption={options}\n handleSelectDown={(opt: any) => {\n const option = options.find((o) => o.label === opt || o.value === opt);\n if (option) setSelectedOption(option.value);\n }}\n backgroundColor={theme.colors.neutral[300]}\n />\n\n <Box\n marginStyle={{ marginTop: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", justifyContent: \"space-between\" }}\n >\n <Button\n title=\"CANCELAR\"\n onPress={onClose}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.neutral[300]}\n buttonTextStyle={{\n color: theme.colors.blue[100],\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n <Button\n title=\"CONFIRMAR\"\n onPress={handleConfirm}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.blue[100]}\n buttonTextStyle={{\n color: \"#fff\",\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n </Box>\n </Box>\n </Box>\n </View>\n </Modal>\n );\n};\n"],"mappings":";;;;;;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,OAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAN,sBAAA,CAAAC,OAAA;AAGA,IAAAM,MAAA,GAAAN,OAAA;AAGA,IAAAO,SAAA,GAAAP,OAAA;AAAkD,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAlBlD;AACA;AACA;AACA;;AAEA;;AAGA;;AAMA;;AAGA;;AAGA;AACA;AACA;;AAQA;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;AA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