react-native-exp-fig 0.1.24 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/lib/commonjs/components/image-capture-with-remove/index.js +2 -1
  2. package/lib/commonjs/components/image-capture-with-remove/index.js.map +1 -1
  3. package/lib/commonjs/components/image-capture-with-remove/interface.d.js.map +1 -1
  4. package/lib/commonjs/components/modal-change-activity/index.js.map +1 -1
  5. package/lib/commonjs/components/step-indicator/index.js +69 -58
  6. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  7. package/lib/commonjs/components/step-indicator/interface.d.js.map +1 -1
  8. package/lib/commonjs/components/step-indicator/styles.js +8 -10
  9. package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
  10. package/lib/commonjs/index.js +2 -2
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js +0 -2
  13. package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -1
  14. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js +13 -7
  15. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
  16. package/lib/commonjs/utils/format-date/index.js +54 -0
  17. package/lib/commonjs/utils/format-date/index.js.map +1 -0
  18. package/lib/module/components/image-capture-with-remove/index.js +2 -1
  19. package/lib/module/components/image-capture-with-remove/index.js.map +1 -1
  20. package/lib/module/components/image-capture-with-remove/interface.d.js.map +1 -1
  21. package/lib/module/components/modal-change-activity/index.js.map +1 -1
  22. package/lib/module/components/step-indicator/index.js +69 -58
  23. package/lib/module/components/step-indicator/index.js.map +1 -1
  24. package/lib/module/components/step-indicator/interface.d.js.map +1 -1
  25. package/lib/module/components/step-indicator/styles.js +8 -10
  26. package/lib/module/components/step-indicator/styles.js.map +1 -1
  27. package/lib/module/index.js +1 -1
  28. package/lib/module/index.js.map +1 -1
  29. package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js +0 -2
  30. package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -1
  31. package/lib/module/stories/step-indicator/step-indicator.stories.js +11 -6
  32. package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
  33. package/lib/module/utils/format-date/index.js +50 -0
  34. package/lib/module/utils/format-date/index.js.map +1 -0
  35. package/lib/typescript/src/components/modal-change-activity/index.d.ts +0 -2
  36. package/lib/typescript/src/components/step-indicator/index.d.ts +2 -2
  37. package/lib/typescript/src/components/step-indicator/styles.d.ts +2 -3
  38. package/lib/typescript/src/index.d.ts +1 -1
  39. package/lib/typescript/src/stories/step-indicator/step-indicator.stories.d.ts +1 -1
  40. package/lib/typescript/src/utils/format-date/index.d.ts +24 -0
  41. package/package.json +1 -1
  42. package/src/components/image-capture-with-remove/index.tsx +2 -1
  43. package/src/components/image-capture-with-remove/interface.d.ts +2 -0
  44. package/src/components/modal-change-activity/index.tsx +0 -2
  45. package/src/components/step-indicator/index.tsx +235 -222
  46. package/src/components/step-indicator/interface.d.ts +47 -35
  47. package/src/components/step-indicator/styles.ts +66 -68
  48. package/src/index.ts +1 -1
  49. package/src/stories/modal-change-activity/modal-change-activity.stories.tsx +0 -2
  50. package/src/stories/step-indicator/step-indicator.stories.tsx +159 -154
  51. package/src/utils/format-date/index.ts +58 -0
@@ -4,23 +4,26 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = exports.StepIndicatorSincronizadoFalse = exports.StepIndicatorDefault = exports.StepIndicationCustom = void 0;
7
- var _stepIndicator = require("../../components/step-indicator");
7
+ var _stepIndicator = _interopRequireDefault(require("../../components/step-indicator"));
8
8
  var _theme = require("../../styles/theme/theme");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
10
  // components
10
11
 
11
12
  // styles
12
13
 
13
14
  const meta = {
14
15
  title: "Componente/StepIndicator",
15
- component: _stepIndicator.StepIndicator,
16
+ component: _stepIndicator.default,
16
17
  args: {
17
18
  data: [{
18
- id: 1,
19
+ jr_tipo_atividade_id: 1,
19
20
  descricao: "Repouso Noturno",
20
21
  data_inicio: "07/03/2024 14:52",
21
22
  data_fim: "07/03/2024 17:52",
22
23
  duracao_segundos: "3601",
23
- sincronizado: true
24
+ sincronizado: true,
25
+ referencia: "repouso_notuno",
26
+ tipo: "descanso"
24
27
  }],
25
28
  titleColor: _theme.theme.colors.neutral[25],
26
29
  titleNumberColor: _theme.theme.colors.neutral[25]
@@ -33,9 +36,12 @@ Este é um componente de step indicator.
33
36
  Você usa assim:
34
37
  \`\`\`tsx
35
38
  <StepIndicator
36
- type="default"
37
- data={dataMock}
38
- />
39
+ type="default"
40
+ data={dataMock}
41
+ onChangeActivity={(activity) => {
42
+ console.log("Atividade selecionada:", activity);
43
+ }}
44
+ />
39
45
  \`\`\`
40
46
  `
41
47
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_stepIndicator","require","_theme","meta","title","component","StepIndicator","args","data","id","descricao","data_inicio","data_fim","duracao_segundos","sincronizado","titleColor","theme","colors","neutral","titleNumberColor","parameters","notes","_default","exports","default","dataMock","dataMockFalse","dataMockCustom","StepIndicatorDefault","name","type","textColorDescription","gray","StepIndicatorSincronizadoFalse","StepIndicationCustom","backgroundColorBall","orange","blue"],"sources":["step-indicator.stories.tsx"],"sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\r\n\r\n// components\r\nimport { StepIndicator } from \"../../components/step-indicator\";\r\n\r\n// styles\r\nimport { theme } from \"../../styles/theme/theme\";\r\n\r\nconst meta: Meta<typeof StepIndicator> = {\r\n title: \"Componente/StepIndicator\",\r\n component: StepIndicator,\r\n args: {\r\n data: [\r\n {\r\n id: 1,\r\n descricao: \"Repouso Noturno\",\r\n data_inicio: \"07/03/2024 14:52\",\r\n data_fim: \"07/03/2024 17:52\",\r\n duracao_segundos: \"3601\",\r\n sincronizado: true,\r\n },\r\n ],\r\n titleColor: theme.colors.neutral[25],\r\n titleNumberColor: theme.colors.neutral[25],\r\n },\r\n parameters: {\r\n notes: `\r\n# StepIndicator\r\n\r\nEste é um componente de step indicator.\r\nVocê usa assim:\r\n\\`\\`\\`tsx\r\n<StepIndicator\r\n type=\"default\"\r\n data={dataMock}\r\n />\r\n\\`\\`\\`\r\n`,\r\n },\r\n};\r\n\r\nexport default meta;\r\n\r\ntype Story = StoryObj<typeof meta>;\r\n\r\nconst dataMock = [\r\n {\r\n id: 1,\r\n descricao: \"Repouso Noturno\",\r\n data_inicio: \"07/03/2024 14:52\",\r\n data_fim: \"07/03/2024 17:52\",\r\n duracao_segundos: \"3601\",\r\n sincronizado: true,\r\n },\r\n {\r\n id: 2,\r\n descricao: \"Descarga\",\r\n data_inicio: \"06/03/2024 14:52\",\r\n data_fim: \"06/03/2024 16:52\",\r\n duracao_segundos: \"7200\",\r\n sincronizado: true,\r\n },\r\n];\r\nconst dataMockFalse = [\r\n {\r\n id: 1,\r\n descricao: \"Repouso Noturno\",\r\n data_inicio: \"07/03/2024 14:52\",\r\n data_fim: \"07/03/2024 17:52\",\r\n duracao_segundos: \"3601\",\r\n sincronizado: false,\r\n },\r\n {\r\n id: 2,\r\n descricao: \"Descarga\",\r\n data_inicio: \"06/03/2024 14:52\",\r\n data_fim: \"06/03/2024 16:52\",\r\n duracao_segundos: \"7200\",\r\n sincronizado: false,\r\n },\r\n];\r\n\r\nconst dataMockCustom = [\r\n {\r\n id: 1,\r\n descricao: \"Pedido Realizado\",\r\n data_inicio: \"\",\r\n data_fim: \"\",\r\n duracao_segundos: \"\",\r\n },\r\n {\r\n id: 2,\r\n descricao: \"Pagamento Aprovado\",\r\n data_inicio: \"07/03/2024 14:52\",\r\n data_fim: \"07/03/2024 17:52\",\r\n duracao_segundos: \"3601\",\r\n },\r\n {\r\n id: 3,\r\n descricao: \"Pedido Faturado\",\r\n data_inicio: \"\",\r\n data_fim: \"\",\r\n duracao_segundos: \"\",\r\n },\r\n {\r\n id: 4,\r\n descricao: \"Pedido Enviado\",\r\n data_inicio: \"\",\r\n data_fim: \"\",\r\n duracao_segundos: \"\",\r\n },\r\n {\r\n id: 4,\r\n descricao: \"Pedido Entregue\",\r\n data_inicio: \"07/03/2024 14:52\",\r\n data_fim: \"07/03/2024 17:52\",\r\n duracao_segundos: \"3601\",\r\n },\r\n];\r\n\r\nexport const StepIndicatorDefault: Story = {\r\n name: \"step-indicator-default\",\r\n args: {\r\n data: dataMock,\r\n type: \"default\",\r\n sincronizado: true,\r\n titleColor: theme.colors.neutral[25],\r\n textColorDescription: theme.colors.gray[300],\r\n titleNumberColor: theme.colors.neutral[25],\r\n },\r\n};\r\nexport const StepIndicatorSincronizadoFalse: Story = {\r\n name: \"step-indicator-sincronizado-false\",\r\n args: {\r\n data: dataMockFalse,\r\n type: \"default\",\r\n sincronizado: false,\r\n titleColor: theme.colors.neutral[25],\r\n textColorDescription: theme.colors.gray[300],\r\n titleNumberColor: theme.colors.neutral[25],\r\n },\r\n};\r\n\r\nexport const StepIndicationCustom: Story = {\r\n name: \"step-indicator-custom\",\r\n args: {\r\n data: dataMockCustom,\r\n type: \"custom\",\r\n backgroundColorBall: theme.colors.orange[150],\r\n titleColor: theme.colors.blue[500],\r\n textColorDescription: theme.colors.gray[300],\r\n titleNumberColor: theme.colors.neutral[25],\r\n },\r\n};\r\n"],"mappings":";;;;;;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAD,OAAA;AAJA;;AAGA;;AAGA,MAAME,IAAgC,GAAG;EACvCC,KAAK,EAAE,0BAA0B;EACjCC,SAAS,EAAEC,4BAAa;EACxBC,IAAI,EAAE;IACJC,IAAI,EAAE,CACJ;MACEC,EAAE,EAAE,CAAC;MACLC,SAAS,EAAE,iBAAiB;MAC5BC,WAAW,EAAE,kBAAkB;MAC/BC,QAAQ,EAAE,kBAAkB;MAC5BC,gBAAgB,EAAE,MAAM;MACxBC,YAAY,EAAE;IAChB,CAAC,CACF;IACDC,UAAU,EAAEC,YAAK,CAACC,MAAM,CAACC,OAAO,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CAACe,IAAI,CAAC,GAAG,CAAC;IAC5Cb,gBAAgB,EAAEH,YAAK,CAACC,MAAM,CAACC,OAAO,CAAC,EAAE;EAC3C;AACF,CAAC;AAEM,MAAMgB,oBAA2B,GAAAX,OAAA,CAAAW,oBAAA,GAAG;EACzCL,IAAI,EAAE,uBAAuB;EAC7BtB,IAAI,EAAE;IACJC,IAAI,EAAEmB,cAAc;IACpBG,IAAI,EAAE,QAAQ;IACdK,mBAAmB,EAAEnB,YAAK,CAACC,MAAM,CAACmB,MAAM,CAAC,GAAG,CAAC;IAC7CrB,UAAU,EAAEC,YAAK,CAACC,MAAM,CAACoB,IAAI,CAAC,GAAG,CAAC;IAClCN,oBAAoB,EAAEf,YAAK,CAACC,MAAM,CAACe,IAAI,CAAC,GAAG,CAAC;IAC5Cb,gBAAgB,EAAEH,YAAK,CAACC,MAAM,CAACC,OAAO,CAAC,EAAE;EAC3C;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_stepIndicator","_interopRequireDefault","require","_theme","e","__esModule","default","meta","title","component","StepIndicator","args","data","jr_tipo_atividade_id","descricao","data_inicio","data_fim","duracao_segundos","sincronizado","referencia","tipo","titleColor","theme","colors","neutral","titleNumberColor","parameters","notes","_default","exports","dataMock","id","dataMockFalse","dataMockCustom","StepIndicatorDefault","name","type","textColorDescription","gray","StepIndicatorSincronizadoFalse","StepIndicationCustom","backgroundColorBall","orange","blue"],"sources":["step-indicator.stories.tsx"],"sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\n\n// components\nimport StepIndicator from \"../../components/step-indicator\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\nconst meta: Meta<typeof StepIndicator> = {\n title: \"Componente/StepIndicator\",\n component: StepIndicator,\n args: {\n data: [\n {\n jr_tipo_atividade_id: 1,\n descricao: \"Repouso Noturno\",\n data_inicio: \"07/03/2024 14:52\",\n data_fim: \"07/03/2024 17:52\",\n duracao_segundos: \"3601\",\n sincronizado: true,\n referencia: \"repouso_notuno\",\n tipo: \"descanso\",\n },\n ],\n titleColor: theme.colors.neutral[25],\n titleNumberColor: theme.colors.neutral[25],\n },\n parameters: {\n notes: `\n# StepIndicator\n\nEste é um componente de step indicator.\nVocê usa assim:\n\\`\\`\\`tsx\n<StepIndicator\n type=\"default\"\n data={dataMock}\n onChangeActivity={(activity) => {\n console.log(\"Atividade selecionada:\", activity);\n }}\n/>\n\\`\\`\\`\n`,\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nconst dataMock = [\n {\n id: 1,\n descricao: \"Repouso Noturno\",\n data_inicio: \"07/03/2024 14:52\",\n data_fim: \"07/03/2024 17:52\",\n duracao_segundos: \"3601\",\n sincronizado: true,\n },\n {\n id: 2,\n descricao: \"Descarga\",\n data_inicio: \"06/03/2024 14:52\",\n data_fim: \"06/03/2024 16:52\",\n duracao_segundos: \"7200\",\n sincronizado: true,\n },\n];\nconst dataMockFalse = [\n {\n id: 1,\n descricao: \"Repouso Noturno\",\n data_inicio: \"07/03/2024 14:52\",\n data_fim: \"07/03/2024 17:52\",\n duracao_segundos: \"3601\",\n sincronizado: false,\n },\n {\n id: 2,\n descricao: \"Descarga\",\n data_inicio: \"06/03/2024 14:52\",\n data_fim: \"06/03/2024 16:52\",\n duracao_segundos: \"7200\",\n sincronizado: false,\n },\n];\n\nconst dataMockCustom = [\n {\n id: 1,\n descricao: \"Pedido Realizado\",\n data_inicio: \"\",\n data_fim: \"\",\n duracao_segundos: \"\",\n },\n {\n id: 2,\n descricao: \"Pagamento Aprovado\",\n data_inicio: \"07/03/2024 14:52\",\n data_fim: \"07/03/2024 17:52\",\n duracao_segundos: \"3601\",\n },\n {\n id: 3,\n descricao: \"Pedido Faturado\",\n data_inicio: \"\",\n data_fim: \"\",\n duracao_segundos: \"\",\n },\n {\n id: 4,\n descricao: \"Pedido Enviado\",\n data_inicio: \"\",\n data_fim: \"\",\n duracao_segundos: \"\",\n },\n {\n id: 4,\n descricao: \"Pedido Entregue\",\n data_inicio: \"07/03/2024 14:52\",\n data_fim: \"07/03/2024 17:52\",\n duracao_segundos: \"3601\",\n },\n];\n\nexport const StepIndicatorDefault: Story = {\n name: \"step-indicator-default\",\n args: {\n data: dataMock,\n type: \"default\",\n sincronizado: true,\n titleColor: theme.colors.neutral[25],\n textColorDescription: theme.colors.gray[300],\n titleNumberColor: theme.colors.neutral[25],\n },\n};\nexport const StepIndicatorSincronizadoFalse: Story = {\n name: \"step-indicator-sincronizado-false\",\n args: {\n data: dataMockFalse,\n type: \"default\",\n sincronizado: false,\n titleColor: theme.colors.neutral[25],\n textColorDescription: theme.colors.gray[300],\n titleNumberColor: theme.colors.neutral[25],\n },\n};\n\nexport const StepIndicationCustom: Story = {\n name: \"step-indicator-custom\",\n args: {\n data: dataMockCustom,\n type: \"custom\",\n backgroundColorBall: theme.colors.orange[150],\n titleColor: theme.colors.blue[500],\n textColorDescription: theme.colors.gray[300],\n titleNumberColor: theme.colors.neutral[25],\n },\n};\n"],"mappings":";;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAD,OAAA;AAAiD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAJjD;;AAGA;;AAGA,MAAMG,IAAgC,GAAG;EACvCC,KAAK,EAAE,0BAA0B;EACjCC,SAAS,EAAEC,sBAAa;EACxBC,IAAI,EAAE;IACJC,IAAI,EAAE,CACJ;MACEC,oBAAoB,EAAE,CAAC;MACvBC,SAAS,EAAE,iBAAiB;MAC5BC,WAAW,EAAE,kBAAkB;MAC/BC,QAAQ,EAAE,kBAAkB;MAC5BC,gBAAgB,EAAE,MAAM;MACxBC,YAAY,EAAE,IAAI;MAClBC,UAAU,EAAE,gBAAgB;MAC5BC,IAAI,EAAE;IACR,CAAC,CACF;IACDC,UAAU,EAAEC,YAAK,CAACC,MAAM,CAACC,OAAO,CAA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,CAACC,MAAM,CAACe,IAAI,CAAC,GAAG,CAAC;IAC5Cb,gBAAgB,EAAEH,YAAK,CAACC,MAAM,CAACC,OAAO,CAAC,EAAE;EAC3C;AACF,CAAC;AAEM,MAAMgB,oBAA2B,GAAAX,OAAA,CAAAW,oBAAA,GAAG;EACzCL,IAAI,EAAE,uBAAuB;EAC7BxB,IAAI,EAAE;IACJC,IAAI,EAAEqB,cAAc;IACpBG,IAAI,EAAE,QAAQ;IACdK,mBAAmB,EAAEnB,YAAK,CAACC,MAAM,CAACmB,MAAM,CAAC,GAAG,CAAC;IAC7CrB,UAAU,EAAEC,YAAK,CAACC,MAAM,CAACoB,IAAI,CAAC,GAAG,CAAC;IAClCN,oBAAoB,EAAEf,YAAK,CAACC,MAAM,CAACe,IAAI,CAAC,GAAG,CAAC;IAC5Cb,gBAAgB,EAAEH,YAAK,CAACC,MAAM,CAACC,OAAO,CAAC,EAAE;EAC3C;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getLastSevenDays = exports.formatDate = exports.formHoursMinute = void 0;
7
+ /**
8
+ * Formata uma data do tipo Date para o formato DD/MM/YYYY
9
+ * @param date Objeto Date a ser formatado
10
+ * @returns String no formato DD/MM/YYYY
11
+ */
12
+ const formatDate = date => {
13
+ const day = String(date.getDate()).padStart(2, "0");
14
+ const month = String(date.getMonth() + 1).padStart(2, "0"); // Mês começa em 0
15
+ const year = date.getFullYear();
16
+ return `${day}/${month}/${year}`;
17
+ };
18
+ exports.formatDate = formatDate;
19
+ /**
20
+ * Formata uma data do tipo Date para o formato DD/MM/YYYY
21
+ * @param date Objeto Date a ser formatado
22
+ * @returns String no formato DD/MM/YYYY
23
+ */
24
+ const formHoursMinute = segundos => {
25
+ const totalSegundos = parseInt(segundos, 10);
26
+ const horas = Math.floor(totalSegundos / 3600);
27
+ const minutos = Math.floor(totalSegundos % 3600 / 60);
28
+ const horasFormatadas = String(horas).padStart(2, "0");
29
+ const minutosFormatados = String(minutos).padStart(2, "0");
30
+ return `${horasFormatadas}:${minutosFormatados}`;
31
+ };
32
+ exports.formHoursMinute = formHoursMinute;
33
+ /**
34
+ * Retorna as sete últimas datas do dias
35
+ * @returns Array<{ date: number, dayName: string, fullDate: Date }>
36
+ */
37
+
38
+ const getLastSevenDays = () => {
39
+ const today = new Date();
40
+ const days = [];
41
+ const dayNames = ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"];
42
+ for (let i = 7; i >= 0; i--) {
43
+ const date = new Date(today);
44
+ date.setDate(today.getDate() - i);
45
+ days.push({
46
+ date: date.getDate(),
47
+ dayName: dayNames[date.getDay()],
48
+ fullDate: date
49
+ });
50
+ }
51
+ return days;
52
+ };
53
+ exports.getLastSevenDays = getLastSevenDays;
54
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["formatDate","date","day","String","getDate","padStart","month","getMonth","year","getFullYear","exports","formHoursMinute","segundos","totalSegundos","parseInt","horas","Math","floor","minutos","horasFormatadas","minutosFormatados","getLastSevenDays","today","Date","days","dayNames","i","setDate","push","dayName","getDay","fullDate"],"sources":["index.ts"],"sourcesContent":["/**\n * Formata uma data do tipo Date para o formato DD/MM/YYYY\n * @param date Objeto Date a ser formatado\n * @returns String no formato DD/MM/YYYY\n */\nconst formatDate = (date: Date): string => {\n const day = String(date.getDate()).padStart(2, \"0\");\n const month = String(date.getMonth() + 1).padStart(2, \"0\"); // Mês começa em 0\n const year = date.getFullYear();\n\n return `${day}/${month}/${year}`;\n};\n\nexport { formatDate };\n\n/**\n * Formata uma data do tipo Date para o formato DD/MM/YYYY\n * @param date Objeto Date a ser formatado\n * @returns String no formato DD/MM/YYYY\n */\nconst formHoursMinute = (segundos: string): string => {\n const totalSegundos = parseInt(segundos, 10);\n const horas = Math.floor(totalSegundos / 3600);\n const minutos = Math.floor((totalSegundos % 3600) / 60);\n\n const horasFormatadas = String(horas).padStart(2, \"0\");\n const minutosFormatados = String(minutos).padStart(2, \"0\");\n\n return `${horasFormatadas}:${minutosFormatados}`;\n};\n\nexport { formHoursMinute };\n\n/**\n * Retorna as sete últimas datas do dias\n * @returns Array<{ date: number, dayName: string, fullDate: Date }>\n */\n\nconst getLastSevenDays = () => {\n const today = new Date();\n const days = [];\n const dayNames = [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"];\n\n for (let i = 7; i >= 0; i--) {\n const date = new Date(today);\n date.setDate(today.getDate() - i);\n\n days.push({\n date: date.getDate(),\n dayName: dayNames[date.getDay()],\n fullDate: date,\n });\n }\n\n return days;\n};\n\nexport { getLastSevenDays };\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA,MAAMA,UAAU,GAAIC,IAAU,IAAa;EACzC,MAAMC,GAAG,GAAGC,MAAM,CAACF,IAAI,CAACG,OAAO,CAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;EACnD,MAAMC,KAAK,GAAGH,MAAM,CAACF,IAAI,CAACM,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAACF,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;EAC5D,MAAMG,IAAI,GAAGP,IAAI,CAACQ,WAAW,CAAC,CAAC;EAE/B,OAAO,GAAGP,GAAG,IAAII,KAAK,IAAIE,IAAI,EAAE;AAClC,CAAC;AAACE,OAAA,CAAAV,UAAA,GAAAA,UAAA;AAIF;AACA;AACA;AACA;AACA;AACA,MAAMW,eAAe,GAAIC,QAAgB,IAAa;EACpD,MAAMC,aAAa,GAAGC,QAAQ,CAACF,QAAQ,EAAE,EAAE,CAAC;EAC5C,MAAMG,KAAK,GAAGC,IAAI,CAACC,KAAK,CAACJ,aAAa,GAAG,IAAI,CAAC;EAC9C,MAAMK,OAAO,GAAGF,IAAI,CAACC,KAAK,CAAEJ,aAA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to,
32
33
  onRemove
@@ -39,7 +40,7 @@ const ImageCaptureWithRemove = ({
39
40
  position: "relative"
40
41
  },
41
42
  onPress: handleTakePhoto,
42
- disabled: !!foto
43
+ disabled: disabled !== null && disabled !== void 0 ? disabled : !!foto
43
44
  }, /*#__PURE__*/React.createElement(Box, {
44
45
  width: width,
45
46
  height: height,
@@ -1 +1 @@
1
- {"version":3,"names":["React","Image","TouchableOpacity","Box","Icons","theme","getBorderColor","ImageCaptureWithRemove","width","height","foto","useRemove","status","handleTakePhoto","onRemove","statusColor","createElement","testID","activeOpacity","style","position","onPress","disabled","flexStyle","flexDirection","alignItems","justifyContent","borderStyled","borderWidth","borderWidths","thick","thin","borderRadius","fontSizes","md","borderColor","colors","blue","Fragment","resizeMode","source","uri","top","right","icon","color","red","size"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React from \"react\";\nimport { Image, TouchableOpacity } from \"react-native\";\n\n// components\nimport Box from \"../box\";\n\n// comons / icons\nimport { Icons } from \"../../common/icons-svg\";\n\n// typings\nimport { IImageCaptureWithRemoveProps } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\n// utils\nimport { getBorderColor } from \"../../utils/status-color/return-color\";\n\n/**\n *\n * Componente ImageCaptureWithRemove para a interação do usuário com ui.\n */\nconst ImageCaptureWithRemove: React.FC<IImageCaptureWithRemoveProps> = ({\n width = 50,\n height = 50,\n foto = null,\n useRemove = true,\n status,\n handleTakePhoto,\n onRemove,\n}: IImageCaptureWithRemoveProps) => {\n const statusColor = status === \"Cancelado\" || status === \"Pendente\";\n\n return (\n <TouchableOpacity\n testID=\"image-capture-touchable\"\n activeOpacity={0.7}\n style={{ position: \"relative\" }}\n onPress={handleTakePhoto}\n disabled={!!foto}\n >\n <Box\n width={width}\n height={height}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\", justifyContent: \"center\" }}\n testID=\"plus-icon-box\"\n borderStyled={{\n borderWidth: statusColor ? theme.borderWidths.thick : theme.borderWidths.thin,\n borderRadius: theme.fontSizes.md,\n borderColor: statusColor ? getBorderColor(status) : theme.colors.blue[400],\n }}\n >\n {foto ? (\n <>\n <Image\n testID=\"captured-image\"\n style={{\n width: \"100%\",\n height: \"100%\",\n borderRadius: theme.fontSizes.md,\n resizeMode: \"cover\",\n }}\n source={{\n uri: foto,\n }}\n />\n\n {useRemove && (\n <TouchableOpacity\n testID=\"remove-button\"\n style={{ position: \"absolute\", top: 2, right: 4 }}\n onPress={onRemove}\n >\n <Icons icon=\"X_CIRCLE\" color={theme.colors.red[400]} size={18} />\n </TouchableOpacity>\n )}\n </>\n ) : (\n <Icons icon=\"PLUS\" color={theme.colors.blue[400]} />\n )}\n </Box>\n </TouchableOpacity>\n );\n};\n\n/**\n * EXPORTS\n */\nexport { ImageCaptureWithRemove };\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,gBAAgB,QAAQ,cAAc;;AAEtD;AACA,OAAOC,GAAG,MAAM,QAAQ;;AAExB;AACA,SAASC,KAAK,QAAQ,wBAAwB;;AAE9C;;AAGA;AACA,SAASC,KAAK,QAAQ,0BAA0B;;AAEhD;AACA,SAASC,cAAc,QAAQ,uCAAuC;;AAEtE;AACA;AACA;AACA;AACA,MAAMC,sBAA8D,GAAGA,CAAC;EACtEC,KAAK,GAAG,EAAE;EACVC,MAAM,GAAG,EAAE;EACXC,IAAI,GAAG,IAAI;EACXC,SAAS,GAAG,IAAI;EAChBC,MAAM;EACNC,eAAe;EACfC;AAC4B,CAAC,KAAK;EAClC,MAAMC,WAAW,GAAGH,MAAM,KAAK,WAAW,IAAIA,MAAM,KAAK,UAAU;EAEnE,oBACEZ,KAAA,CAAAgB,aAAA,CAACd,gBAAgB;IACfe,MAAM,EAAC,yBAAyB;IAChCC,aAAa,EAAE,GAAI;IACnBC,KAAK,EAAE;MAAEC,QAAQ,EAAE;IAAW,CAAE;IAChCC,OAAO,EAAER,eAA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AACU,GAAG,CAAC,GAAG,CAAE;IAACC,IAAI,EAAE;EAAG,CAAE,CAChD,CAEpB,CAAC,gBAEH/C,KAAA,CAAAgB,aAAA,CAACZ,KAAK;IAACwC,IAAI,EAAC,MAAM;IAACC,KAAK,EAAExC,KAAK,CAAC+B,MAAM,CAACC,IAAI,CAAC,GAAG;EAAE,CAAE,CAElD,CACW,CAAC;AAEvB,CAAC;;AAED;AACA;AACA;AACA,SAAS9B,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["React","Image","TouchableOpacity","Box","Icons","theme","getBorderColor","ImageCaptureWithRemove","width","height","foto","useRemove","disabled","status","handleTakePhoto","onRemove","statusColor","createElement","testID","activeOpacity","style","position","onPress","flexStyle","flexDirection","alignItems","justifyContent","borderStyled","borderWidth","borderWidths","thick","thin","borderRadius","fontSizes","md","borderColor","colors","blue","Fragment","resizeMode","source","uri","top","right","icon","color","red","size"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React from \"react\";\nimport { Image, TouchableOpacity } from \"react-native\";\n\n// components\nimport Box from \"../box\";\n\n// comons / icons\nimport { Icons } from \"../../common/icons-svg\";\n\n// typings\nimport { IImageCaptureWithRemoveProps } from \"./interface\";\n\n// styles\nimport { theme } from \"../../styles/theme/theme\";\n\n// utils\nimport { getBorderColor } from \"../../utils/status-color/return-color\";\n\n/**\n *\n * Componente ImageCaptureWithRemove para a interação do usuário com ui.\n */\nconst ImageCaptureWithRemove: React.FC<IImageCaptureWithRemoveProps> = ({\n width = 50,\n height = 50,\n foto = null,\n useRemove = true,\n disabled,\n status,\n handleTakePhoto,\n onRemove,\n}: IImageCaptureWithRemoveProps) => {\n const statusColor = status === \"Cancelado\" || status === \"Pendente\";\n\n return (\n <TouchableOpacity\n testID=\"image-capture-touchable\"\n activeOpacity={0.7}\n style={{ position: \"relative\" }}\n onPress={handleTakePhoto}\n disabled={disabled ?? !!foto}\n >\n <Box\n width={width}\n height={height}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\", justifyContent: \"center\" }}\n testID=\"plus-icon-box\"\n borderStyled={{\n borderWidth: statusColor ? theme.borderWidths.thick : theme.borderWidths.thin,\n borderRadius: theme.fontSizes.md,\n borderColor: statusColor ? getBorderColor(status) : theme.colors.blue[400],\n }}\n >\n {foto ? (\n <>\n <Image\n testID=\"captured-image\"\n style={{\n width: \"100%\",\n height: \"100%\",\n borderRadius: theme.fontSizes.md,\n resizeMode: \"cover\",\n }}\n source={{\n uri: foto,\n }}\n />\n\n {useRemove && (\n <TouchableOpacity\n testID=\"remove-button\"\n style={{ position: \"absolute\", top: 2, right: 4 }}\n onPress={onRemove}\n >\n <Icons icon=\"X_CIRCLE\" color={theme.colors.red[400]} size={18} />\n </TouchableOpacity>\n )}\n </>\n ) : (\n <Icons icon=\"PLUS\" color={theme.colors.blue[400]} />\n )}\n </Box>\n </TouchableOpacity>\n );\n};\n\n/**\n * EXPORTS\n */\nexport { ImageCaptureWithRemove };\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,gBAAgB,QAAQ,cAAc;;AAEtD;AACA,OAAOC,GAAG,MAAM,QAAQ;;AAExB;AACA,SAASC,KAAK,QAAQ,wBAAwB;;AAE9C;;AAGA;AACA,SAASC,KAAK,QAAQ,0BAA0B;;AAEhD;AACA,SAASC,cAAc,QAAQ,uCAAuC;;AAEtE;AACA;AACA;AACA;AACA,MAAMC,sBAA8D,GAAGA,CAAC;EACtEC,KAAK,GAAG,EAAE;EACVC,MAAM,GAAG,EAAE;EACXC,IAAI,GAAG,IAAI;EACXC,SAAS,GAAG,IAAI;EAChBC,QAAQ;EACRC,MAAM;EACNC,eAAe;EACfC;AAC4B,CAAC,KAAK;EAClC,MAAMC,WAAW,GAAGH,MAAM,KAAK,WAAW,IAAIA,MAAM,KAAK,UAAU;EAEnE,oBACEb,KAAA,CAAAiB,aAAA,CAACf,gBAAgB;IACfgB,MAAM,EAAC,yBAAyB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AE,CAAE;IAClDrB,OAAO,EAAEP;EAAS,gBAElBf,KAAA,CAAAiB,aAAA,CAACb,KAAK;IAACwC,IAAI,EAAC,UAAU;IAACC,KAAK,EAAExC,KAAK,CAAC+B,MAAM,CAACU,GAAG,CAAC,GAAG,CAAE;IAACC,IAAI,EAAE;EAAG,CAAE,CAChD,CAEpB,CAAC,gBAEH/C,KAAA,CAAAiB,aAAA,CAACb,KAAK;IAACwC,IAAI,EAAC,MAAM;IAACC,KAAK,EAAExC,KAAK,CAAC+B,MAAM,CAACC,IAAI,CAAC,GAAG;EAAE,CAAE,CAElD,CACW,CAAC;AAEvB,CAAC;;AAED;AACA;AACA;AACA,SAAS9B,sBAAsB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/**\n * IMPORTS\n */\ntype IImageCaptureWithRemoveProps = {\n /**define o tamanho */\n width?: number;\n /**define o altura */\n height?: number;\n /**Imagem capturada */\n foto?: string | null;\n\n /**Define o status das fotos */\n status?: \"Pendente\" | \"Concluido\" | \"Cancelado\" | \"Andamento\";\n\n /**propiedade que define se e para utilizar o metódo de remover */\n useRemove?: boolean;\n\n /**Remove a imagem capturada */\n onRemove: () => void;\n\n /**Captura a imagem */\n handleTakePhoto: () => void;\n};\n\n/**\n * EXPORTS\n */\nexport { IImageCaptureWithRemoveProps };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/**\n * IMPORTS\n */\ntype IImageCaptureWithRemoveProps = {\n /**define o tamanho */\n width?: number;\n /**define o altura */\n height?: number;\n /**Imagem capturada */\n foto?: string | null;\n\n /**Define o status das fotos */\n status?: \"Pendente\" | \"Concluido\" | \"Cancelado\" | \"Andamento\";\n\n /**propiedade que define se e para utilizar o metódo de remover */\n useRemove?: boolean;\n\n disabled?: boolean;\n\n /**Remove a imagem capturada */\n onRemove: () => void;\n\n /**Captura a imagem */\n handleTakePhoto: () => void;\n};\n\n/**\n * EXPORTS\n */\nexport { IImageCaptureWithRemoveProps };\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","Modal","View","Box","Typography","SelectOption","Button","theme","Icons","options","label","value","key","ModalChangeActivity","visible","onClose","modalConfirm","descricao","isLoading","useState","initial","toLowerCase","replace","selectedOption","setSelectedOption","handleConfirm","selected","find","opt","createElement","animationType","transparent","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","margins","marginLeft","flexStyle","flexDirection","icon","color","black","background","yellow","size","text","fontFamily","fonts","inter_bold_700","fontSizes","md","neutral","padding","xs","inter_medium_500","flexWrap","maxWidth","titleLabel","sizeTitleLabel","dataOption","handleSelectDown","option","o","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor"],"sources":["index.tsx"],"sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * IMPORTS\n */\nimport React from \"react\";\n// libs RN\nimport { Modal, View } from \"react-native\";\n\n// componentes internos\nimport Box from \"../box\";\nimport { Typography } from \"../typography\";\nimport { SelectOption } from \"../selects/select-option\";\nimport { Button } from \"../button\";\n\n// styles / theme\nimport { theme } from \"../../styles/theme/theme\";\n\n// assets / icons\nimport { Icons } from \"../../common/icons-svg\";\n\n/**\n * TYPES\n */\ninterface IModalChangeActivityProps {\n visible: boolean;\n onClose: () => void;\n modalConfirm: (newData: { label: string; value: string; key: number }) => void;\n dataRegistro: string;\n descricao: string;\n imagemUrl?: string;\n}\n\n/**\n * CONSTANTS\n */\nconst options = [\n { label: \"Selecione atividade\", value: \"none\", key: 0 },\n { label: \"Descanso\", value: \"descanso\", key: 5 },\n { label: \"Repouso Noturno\", value: \"repouso_noturno\", key: 6 },\n { label: \"Refeição\", value: \"refeição\", key: 7 },\n { label: \"Repouso Semanal\", value: \"repouso_semanal\", key: 9 },\n];\n\n/**\n * COMPONENT\n */\nexport const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({\n visible,\n onClose,\n modalConfirm,\n descricao,\n}) => {\n const [isLoading] = React.useState(false);\n\n const initial = (descricao ?? \"\").toLowerCase().replace(/\\s+/g, \"_\");\n const [selectedOption, setSelectedOption] = React.useState(initial || \"none\");\n\n const handleConfirm = () => {\n const selected = options.find((opt) => opt.value === selectedOption);\n if (selected && selected.value !== \"none\") {\n modalConfirm({\n label: selected.label,\n value: selected.value,\n key: selected.key,\n });\n }\n onClose();\n };\n\n return (\n <Modal animationType=\"fade\" transparent visible={visible}>\n <View\n style={{\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n backgroundColor: \"rgba(0,0,0,0.6)\",\n }}\n >\n <Box\n width={346}\n backgroundColor={theme.colors.orange[500]}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_medium,\n }}\n paddingStyle={{\n paddingLeft: theme.paddings[\"2xs\"],\n paddingRight: theme.paddings[\"2xs\"],\n paddingTop: theme.paddings.sm,\n paddingBottom: theme.paddings.sm,\n }}\n >\n <Box\n marginStyle={{ marginBottom: theme.margins[\"2xs\"], marginLeft: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}\n >\n <Icons\n icon=\"EXCLAMATION_TRIANGLE\"\n color={theme.colors.black[10]}\n background={theme.colors.yellow[50]}\n size={22}\n />\n <Typography\n text=\"Alterar Atividade\"\n color=\"#fff\"\n marginLeft={theme.margins[\"2xs\"]}\n fontFamily={theme.fonts.inter_bold_700}\n size={theme.fontSizes.md}\n />\n </Box>\n\n <Box\n backgroundColor={theme.colors.neutral[300]}\n paddingStyle={{ padding: theme.paddings.xs }}\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\n >\n <Box flexStyle={{ flexDirection: \"row\", justifyContent: \"flex-start\" }} width={\"90%\"}>\n <Typography\n text={`Deseja realmente alterar sua atividade de ${descricao || \"atividade atual\"}?`}\n color={theme.colors.black[25]}\n fontFamily={theme.fonts.inter_medium_500}\n size={theme.fontSizes.xs}\n style={{ flexWrap: \"wrap\", maxWidth: \"100%\" }}\n />\n </Box>\n\n <SelectOption\n titleLabel=\"Selecione atividade\"\n sizeTitleLabel={theme.fontSizes.xs}\n dataOption={options}\n handleSelectDown={(opt) => {\n const option = options.find((o) => o.label === opt || o.value === opt);\n if (option) setSelectedOption(option.value);\n }}\n backgroundColor={theme.colors.neutral[300]}\n />\n\n <Box\n marginStyle={{ marginTop: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", justifyContent: \"space-between\" }}\n >\n <Button\n title=\"CANCELAR\"\n onPress={onClose}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.neutral[300]}\n buttonTextStyle={{\n color: theme.colors.blue[100],\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n <Button\n title=\"CONFIRMAR\"\n onPress={handleConfirm}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.blue[100]}\n buttonTextStyle={{\n color: \"#fff\",\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n </Box>\n </Box>\n </Box>\n </View>\n </Modal>\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;A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AAE;MACZmD,WAAW,EAAEpF,KAAK,CAACmC,YAAY,CAACkD,IAAI;MACpCC,WAAW,EAAEtF,KAAK,CAAC+B,MAAM,CAACiD,IAAI,CAAC,GAAG,CAAC;MACnC9C,YAAY,EAAElC,KAAK,CAACmC,YAAY,CAACC;IACnC;EAAE,CACH,CACE,CACF,CACF,CACD,CACD,CAAC;AAEZ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Modal","View","Box","Typography","SelectOption","Button","theme","Icons","options","label","value","key","ModalChangeActivity","visible","onClose","modalConfirm","descricao","isLoading","useState","initial","toLowerCase","replace","selectedOption","setSelectedOption","handleConfirm","selected","find","opt","createElement","animationType","transparent","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","margins","marginLeft","flexStyle","flexDirection","icon","color","black","background","yellow","size","text","fontFamily","fonts","inter_bold_700","fontSizes","md","neutral","padding","xs","inter_medium_500","flexWrap","maxWidth","titleLabel","sizeTitleLabel","dataOption","handleSelectDown","option","o","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor"],"sources":["index.tsx"],"sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * IMPORTS\n */\nimport React from \"react\";\n// libs RN\nimport { Modal, View } from \"react-native\";\n\n// componentes internos\nimport Box from \"../box\";\nimport { Typography } from \"../typography\";\nimport { SelectOption } from \"../selects/select-option\";\nimport { Button } from \"../button\";\n\n// styles / theme\nimport { theme } from \"../../styles/theme/theme\";\n\n// assets / icons\nimport { Icons } from \"../../common/icons-svg\";\n\n/**\n * TYPES\n */\ninterface IModalChangeActivityProps {\n visible: boolean;\n onClose: () => void;\n modalConfirm: (newData: { label: string; value: string; key: number }) => void;\n descricao: string;\n}\n\n/**\n * CONSTANTS\n */\nconst options = [\n { label: \"Selecione atividade\", value: \"none\", key: 0 },\n { label: \"Descanso\", value: \"descanso\", key: 5 },\n { label: \"Repouso Noturno\", value: \"repouso_noturno\", key: 6 },\n { label: \"Refeição\", value: \"refeição\", key: 7 },\n { label: \"Repouso Semanal\", value: \"repouso_semanal\", key: 9 },\n];\n\n/**\n * COMPONENT\n */\nexport const ModalChangeActivity: React.FC<IModalChangeActivityProps> = ({\n visible,\n onClose,\n modalConfirm,\n descricao,\n}) => {\n const [isLoading] = React.useState(false);\n\n const initial = (descricao ?? \"\").toLowerCase().replace(/\\s+/g, \"_\");\n const [selectedOption, setSelectedOption] = React.useState(initial || \"none\");\n\n const handleConfirm = () => {\n const selected = options.find((opt) => opt.value === selectedOption);\n if (selected && selected.value !== \"none\") {\n modalConfirm({\n label: selected.label,\n value: selected.value,\n key: selected.key,\n });\n }\n onClose();\n };\n\n return (\n <Modal animationType=\"fade\" transparent visible={visible}>\n <View\n style={{\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n backgroundColor: \"rgba(0,0,0,0.6)\",\n }}\n >\n <Box\n width={346}\n backgroundColor={theme.colors.orange[500]}\n borderStyled={{\n borderRadius: theme.borderWidths.thick_medium,\n }}\n paddingStyle={{\n paddingLeft: theme.paddings[\"2xs\"],\n paddingRight: theme.paddings[\"2xs\"],\n paddingTop: theme.paddings.sm,\n paddingBottom: theme.paddings.sm,\n }}\n >\n <Box\n marginStyle={{ marginBottom: theme.margins[\"2xs\"], marginLeft: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", alignItems: \"center\" }}\n >\n <Icons\n icon=\"EXCLAMATION_TRIANGLE\"\n color={theme.colors.black[10]}\n background={theme.colors.yellow[50]}\n size={22}\n />\n <Typography\n text=\"Alterar Atividade\"\n color=\"#fff\"\n marginLeft={theme.margins[\"2xs\"]}\n fontFamily={theme.fonts.inter_bold_700}\n size={theme.fontSizes.md}\n />\n </Box>\n\n <Box\n backgroundColor={theme.colors.neutral[300]}\n paddingStyle={{ padding: theme.paddings.xs }}\n borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}\n >\n <Box flexStyle={{ flexDirection: \"row\", justifyContent: \"flex-start\" }} width={\"90%\"}>\n <Typography\n text={`Deseja realmente alterar sua atividade de ${descricao || \"atividade atual\"}?`}\n color={theme.colors.black[25]}\n fontFamily={theme.fonts.inter_medium_500}\n size={theme.fontSizes.xs}\n style={{ flexWrap: \"wrap\", maxWidth: \"100%\" }}\n />\n </Box>\n\n <SelectOption\n titleLabel=\"Selecione atividade\"\n sizeTitleLabel={theme.fontSizes.xs}\n dataOption={options}\n handleSelectDown={(opt) => {\n const option = options.find((o) => o.label === opt || o.value === opt);\n if (option) setSelectedOption(option.value);\n }}\n backgroundColor={theme.colors.neutral[300]}\n />\n\n <Box\n marginStyle={{ marginTop: theme.margins[\"1xs\"] }}\n flexStyle={{ flexDirection: \"row\", justifyContent: \"space-between\" }}\n >\n <Button\n title=\"CANCELAR\"\n onPress={onClose}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.neutral[300]}\n buttonTextStyle={{\n color: theme.colors.blue[100],\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n <Button\n title=\"CONFIRMAR\"\n onPress={handleConfirm}\n width={\"48%\"}\n height={36}\n isLoading={isLoading}\n disabled={isLoading}\n backgroundColor={theme.colors.blue[100]}\n buttonTextStyle={{\n color: \"#fff\",\n fontFamily: \"Inter-Medium\",\n fontSize: theme.fontSizes.xs,\n fontWeight: \"500\",\n }}\n flexStyle={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }}\n borderStyled={{\n borderWidth: theme.borderWidths.thin,\n borderColor: theme.colors.blue[100],\n borderRadius: theme.borderWidths.thick_medium,\n }}\n />\n </Box>\n </Box>\n </Box>\n </View>\n </Modal>\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB;AACA,SAASC,KAAK,EAAEC,IAAI,QAAQ,cAAc;;AAE1C;AACA,OAAOC,GAAG,MAAM,QAAQ;AACxB,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,MAAM,QAAQ,WAAW;;AAElC;AACA,SAASC,KAAK,QAAQ,0BAA0B;;AAEhD;AACA,SAASC,KAAK,QAAQ,wBAAwB;;AAE9C;AACA;AACA;;AAQA;AACA;AACA;AACA,MAAMC,OAAO,GAAG,CACd;EAAEC,KAAK,EAAE,qBAAqB;EAAEC,KAAK,EAAE,MAAM;EAAEC,GAAG,EAAE;AAAE,CAAC,EACvD;EAAEF,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAE,UAAU;EAAEC,GAAG,EAAE;AAAE,CAAC,EAChD;EAAEF,KAAK,EAAE,iBAAiB;EAAEC,KAAK,EAAE,iBAAiB;EAAEC,GAAG,EAAE;AAAE,CAAC,EAC9D;EAAEF,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAE,UAAU;EAAEC,GAAG,EAAE;AAAE,CAAC,EAChD;EAAEF,KAAK,EAAE,iBAAiB;EAAEC,KAAK,EAAE,iBAAiB;EAAEC,GAAG,EAAE;AAAE,CAAC,CAC/D;;AAED;AACA;AACA;AACA,OAAO,MAAMC,mBAAwD,GAAGA,CAAC;EACvEC,OAAO;EACPC,OAAO;EACPC,YAAY;EACZC;AACF,CAAC,KAAK;EACJ,MAAM,CAACC,SAAS,CAAC,GAAGlB,KAAK,CAACmB,QAAQ,CAAC,KAAK,CAAC;EAEzC,MAAMC,OAAO,GAAG,CAACH,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAE,EAAEI,WAA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FlC,SAAS,EAAE;MACTC,aAAa,EAAE,KAAK;MACpBrB,UAAU,EAAE,QAAQ;MACpBD,cAAc,EAAE,QAAQ;MACxBwD,SAAS,EAAE;IACb,CAAE;IACFlD,YAAY,EAAE;MACZmD,WAAW,EAAEpF,KAAK,CAACmC,YAAY,CAACkD,IAAI;MACpCC,WAAW,EAAEtF,KAAK,CAAC+B,MAAM,CAACiD,IAAI,CAAC,GAAG,CAAC;MACnC9C,YAAY,EAAElC,KAAK,CAACmC,YAAY,CAACC;IACnC;EAAE,CACH,CACE,CACF,CACF,CACD,CACD,CAAC;AAEZ,CAAC","ignoreList":[]}
@@ -1,43 +1,43 @@
1
- /**
2
- * IMPORTS
1
+ /**
2
+ * IMPORTS
3
3
  */
4
4
  import React from "react";
5
- import { View, Text } from "react-native";
5
+ import { View, Text, TouchableOpacity } from "react-native";
6
+
7
+ // commons / svg
8
+ import { Icons } from "../../common/icons-svg";
9
+
10
+ // helpers
6
11
  import { getIconKeyByValue } from "./helpers/get-icon-by-status";
7
12
 
8
13
  // typings
9
14
 
10
15
  // styles
11
16
  import { styles } from "./styles";
12
- import { Icons } from "../../common/icons-svg";
13
17
  import { formHoursMinute } from "../../utils/format-data";
14
18
  import { theme } from "../../styles/theme/theme";
15
19
  import { ModalChangeActivity } from "../modal-change-activity";
16
20
 
17
- /**
18
- * Componente StepIndicator para a interação da ui.
21
+ /**
22
+ * Componente StepIndicator para a interação da ui.
19
23
  */
20
-
21
24
  const StepIndicator = ({
22
25
  data = [],
23
26
  type,
24
27
  textColorDescription,
25
28
  titleColor,
26
- titleNumberColor
29
+ titleNumberColor,
30
+ onChangeActivity
27
31
  }) => {
28
32
  const StepDefault = () => {
29
- var _stepData;
30
33
  const [isModalVisible, setIsModalVisible] = React.useState(false);
31
34
  const [currentStepIndex, setCurrentStepIndex] = React.useState(null);
32
35
  const [stepData, setStepData] = React.useState(data);
33
- const handleOpenModal = index => {
36
+ const handleOnPressActivitie = (stepItem, index) => {
34
37
  var _stepItem$descricao, _stepItem$descricao$t;
35
- const stepItem = stepData[index];
36
38
  const desc = stepItem === null || stepItem === void 0 || (_stepItem$descricao = stepItem.descricao) === null || _stepItem$descricao === void 0 || (_stepItem$descricao$t = _stepItem$descricao.toLowerCase) === null || _stepItem$descricao$t === void 0 ? void 0 : _stepItem$descricao$t.call(_stepItem$descricao);
37
39
  if (!desc) return;
38
40
  const isDescanso = ["descanso", "refeição", "repouso_noturno", "repouso_semanal"].includes(desc.replace(/\s+/g, "_"));
39
-
40
- // Só abre o modal se for do tipo descanso E se estiver sincronizado
41
41
  if (isDescanso && (stepItem === null || stepItem === void 0 ? void 0 : stepItem.sincronizado) === true) {
42
42
  setCurrentStepIndex(index);
43
43
  setIsModalVisible(true);
@@ -45,58 +45,69 @@ const StepIndicator = ({
45
45
  };
46
46
  const handleConfirmModal = newData => {
47
47
  if (currentStepIndex !== null) {
48
- const newSteps = stepData.map((item, index) => index === currentStepIndex ? {
49
- ...item,
48
+ const updatedStep = {
49
+ ...stepData[currentStepIndex],
50
50
  descricao: newData.label,
51
51
  tipo_atividade: newData.value,
52
52
  identificador: newData.key
53
- } : item);
53
+ };
54
+ const newSteps = stepData.map((item, index) => index === currentStepIndex ? updatedStep : item);
54
55
  setStepData(newSteps);
56
+ if (onChangeActivity) {
57
+ onChangeActivity(updatedStep);
58
+ }
55
59
  }
56
60
  setIsModalVisible(false);
57
61
  setCurrentStepIndex(null);
58
62
  };
59
- return /*#__PURE__*/React.createElement(React.Fragment, null, stepData.length > 0 && stepData.map((history, index) => /*#__PURE__*/React.createElement(View, {
60
- testID: "step-indicator",
61
- style: styles({}).containerIndicator,
62
- key: `${history.id}-${index}`
63
- }, /*#__PURE__*/React.createElement(View, {
64
- style: styles({
65
- sincronizado: history.sincronizado
66
- }).containerBall
67
- }, stepData.length > 1 && index < stepData.length - 1 && /*#__PURE__*/React.createElement(View, {
68
- style: {
69
- width: 2,
70
- height: 84,
71
- marginTop: 116,
72
- position: "relative",
73
- backgroundColor: history.sincronizado ? theme.colors.blue[500] : theme.colors.orange[150]
74
- }
75
- }), /*#__PURE__*/React.createElement(Text, {
76
- style: styles({
77
- titleNumberColor
78
- }).titleNumber
79
- }, stepData.length - index)), /*#__PURE__*/React.createElement(View, {
80
- style: styles({}).containerMain,
81
- onTouchEnd: () => handleOpenModal(index)
82
- }, /*#__PURE__*/React.createElement(Text, {
83
- style: styles({
84
- titleColor
85
- }).title
86
- }, history === null || history === void 0 ? void 0 : history.descricao), (history === null || history === void 0 ? void 0 : history.data_inicio) && /*#__PURE__*/React.createElement(Text, {
87
- style: styles({
88
- textColorDescription
89
- }).titleDescription
90
- }, `Inicio: ${history.data_inicio} às ${history.data_fim}`), history.duracao_segundos && /*#__PURE__*/React.createElement(Text, {
91
- style: styles({
92
- textColorDescription
93
- }).titleDescription
94
- }, "Dura\xE7\xE3o: ", formHoursMinute(history === null || history === void 0 ? void 0 : history.duracao_segundos))))), isModalVisible && currentStepIndex !== null && /*#__PURE__*/React.createElement(ModalChangeActivity, {
63
+ return /*#__PURE__*/React.createElement(React.Fragment, null, stepData.length > 0 && stepData.map((history, index) => {
64
+ const isFirst = index === 0;
65
+ const isEditableType = history.tipo === "descanso";
66
+ const isSynced = (history === null || history === void 0 ? void 0 : history.sincronizado) === true;
67
+ const canEdit = isFirst && isEditableType && isSynced;
68
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
69
+ testID: "step-indicator",
70
+ activeOpacity: 0.7,
71
+ key: history.jr_tipo_atividade_id,
72
+ style: styles({}).containerIndicator,
73
+ disabled: !canEdit,
74
+ onPress: () => handleOnPressActivitie(history, index)
75
+ }, /*#__PURE__*/React.createElement(View, {
76
+ style: styles({
77
+ sincronizado: history.sincronizado
78
+ }).containerBall
79
+ }, stepData.length > 1 && index < stepData.length - 1 && /*#__PURE__*/React.createElement(View, {
80
+ style: {
81
+ width: 2,
82
+ height: 84,
83
+ marginTop: 116,
84
+ position: "relative",
85
+ backgroundColor: history.sincronizado ? theme.colors.blue[500] : theme.colors.orange[150]
86
+ }
87
+ }), /*#__PURE__*/React.createElement(Text, {
88
+ style: styles({
89
+ titleNumberColor
90
+ }).titleNumber
91
+ }, stepData.length - index)), /*#__PURE__*/React.createElement(View, {
92
+ style: styles({}).containerMain
93
+ }, /*#__PURE__*/React.createElement(Text, {
94
+ style: styles({
95
+ titleColor
96
+ }).title
97
+ }, history === null || history === void 0 ? void 0 : history.descricao), (history === null || history === void 0 ? void 0 : history.data_inicio) && /*#__PURE__*/React.createElement(Text, {
98
+ style: styles({
99
+ textColorDescription
100
+ }).titleDescription
101
+ }, `Inicio: ${history.data_inicio} ás ${history.data_fim}`), history.duracao_segundos && /*#__PURE__*/React.createElement(Text, {
102
+ style: styles({
103
+ textColorDescription
104
+ }).titleDescription
105
+ }, "Dura\xE7\xE3o: ", formHoursMinute(history === null || history === void 0 ? void 0 : history.duracao_segundos))));
106
+ }), isModalVisible && /*#__PURE__*/React.createElement(ModalChangeActivity, {
95
107
  visible: isModalVisible,
96
- onClose: () => setIsModalVisible(false),
97
108
  modalConfirm: handleConfirmModal,
98
- dataRegistro: "",
99
- descricao: ((_stepData = stepData[currentStepIndex]) === null || _stepData === void 0 ? void 0 : _stepData.descricao) || ""
109
+ descricao: "",
110
+ onClose: () => setIsModalVisible(false)
100
111
  }));
101
112
  };
102
113
  const StepCustom = () => {
@@ -169,8 +180,8 @@ const StepIndicator = ({
169
180
  return /*#__PURE__*/React.createElement(React.Fragment, null, handleRenderComponent(type));
170
181
  };
171
182
 
172
- /**
173
- * EXPORTS
183
+ /**
184
+ * EXPORTS
174
185
  */
175
- export { StepIndicator };
186
+ export default StepIndicator;
176
187
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","getIconKeyByValue","styles","Icons","formHoursMinute","theme","ModalChangeActivity","StepIndicator","data","type","textColorDescription","titleColor","titleNumberColor","StepDefault","_stepData","isModalVisible","setIsModalVisible","useState","currentStepIndex","setCurrentStepIndex","stepData","setStepData","handleOpenModal","index","_stepItem$descricao","_stepItem$descricao$t","stepItem","desc","descricao","toLowerCase","call","isDescanso","includes","replace","sincronizado","handleConfirmModal","newData","newSteps","map","item","label","tipo_atividade","value","identificador","key","createElement","Fragment","length","history","testID","style","containerIndicator","id","containerBall","width","height","marginTop","position","backgroundColor","colors","blue","orange","titleNumber","containerMain","onTouchEnd","title","data_inicio","titleDescription","data_fim","duracao_segundos","visible","onClose","modalConfirm","dataRegistro","StepCustom","paddingHorizontal","display","flexDirection","step","indexCustom","borderRadius","alignItems","justifyContent","borderWidth","borderColor","icon","top","fontWeight","fontSize","lineHeight","textAlign","color","handleRenderComponent","stepType"],"sources":["index.tsx"],"sourcesContent":["/**\r\n * IMPORTS\r\n */\r\nimport React from \"react\";\r\nimport { View, Text } from \"react-native\";\r\n\r\nimport { getIconKeyByValue } from \"./helpers/get-icon-by-status\";\r\n\r\n// typings\r\nimport { IStepIndicator } from \"./interface\";\r\n\r\n// styles\r\nimport { styles } from \"./styles\";\r\nimport { Icons } from \"../../common/icons-svg\";\r\nimport { formHoursMinute } from \"../../utils/format-data\";\r\nimport { theme } from \"../../styles/theme/theme\";\r\nimport { ModalChangeActivity } from \"../modal-change-activity\";\r\n\r\n/**\r\n * Componente StepIndicator para a interação da ui.\r\n */\r\n\r\nconst StepIndicator: React.FC<IStepIndicator> = ({\r\n data = [],\r\n type,\r\n textColorDescription,\r\n titleColor,\r\n titleNumberColor,\r\n}) => {\r\n const StepDefault = () => {\r\n const [isModalVisible, setIsModalVisible] = React.useState(false);\r\n const [currentStepIndex, setCurrentStepIndex] = React.useState<number | null>(null);\r\n const [stepData, setStepData] = React.useState(data);\r\n\r\n const handleOpenModal = (index: number) => {\r\n const stepItem = stepData[index];\r\n const desc = stepItem?.descricao?.toLowerCase?.();\r\n if (!desc) return;\r\n \r\n const isDescanso = [\r\n \"descanso\",\r\n \"refeição\",\r\n \"repouso_noturno\",\r\n \"repouso_semanal\",\r\n ].includes(desc.replace(/\\s+/g, \"_\"));\r\n\r\n // Só abre o modal se for do tipo descanso E se estiver sincronizado\r\n if (isDescanso && stepItem?.sincronizado === true) {\r\n setCurrentStepIndex(index);\r\n setIsModalVisible(true);\r\n }\r\n };\r\n\r\n const handleConfirmModal = (newData: { label: string; value: string; key: number }) => {\r\n if (currentStepIndex !== null) {\r\n const newSteps = stepData.map((item, index) =>\r\n index === currentStepIndex\r\n ? { ...item, descricao: newData.label, tipo_atividade: newData.value, identificador: newData.key }\r\n : item\r\n );\r\n setStepData(newSteps);\r\n }\r\n\r\n setIsModalVisible(false);\r\n setCurrentStepIndex(null);\r\n };\r\n\r\n return (\r\n <>\r\n {stepData.length > 0 &&\r\n stepData.map((history, index) => (\r\n <View\r\n testID=\"step-indicator\"\r\n style={styles({}).containerIndicator}\r\n key={`${history.id}-${index}`}\r\n >\r\n <View style={styles({ sincronizado: history.sincronizado }).containerBall}>\r\n {stepData.length > 1 && index < stepData.length - 1 && (\r\n <View\r\n style={{\r\n width: 2,\r\n height: 84,\r\n marginTop: 116,\r\n position: \"relative\",\r\n backgroundColor: history.sincronizado\r\n ? theme.colors.blue[500]\r\n : theme.colors.orange[150],\r\n }}\r\n />\r\n )}\r\n <Text style={styles({ titleNumberColor }).titleNumber}>\r\n {stepData.length - index}\r\n </Text>\r\n </View>\r\n\r\n <View\r\n style={styles({}).containerMain}\r\n onTouchEnd={() => handleOpenModal(index)}\r\n >\r\n <Text style={styles({ titleColor }).title}>{history?.descricao}</Text>\r\n\r\n {history?.data_inicio && (\r\n <Text style={styles({ textColorDescription }).titleDescription}>\r\n {`Inicio: ${history.data_inicio} às ${history.data_fim}`}\r\n </Text>\r\n )}\r\n\r\n {history.duracao_segundos && (\r\n <Text style={styles({ textColorDescription }).titleDescription}>\r\n Duração: {formHoursMinute(history?.duracao_segundos as string)}\r\n </Text>\r\n )}\r\n </View>\r\n </View>\r\n ))}\r\n\r\n {isModalVisible && currentStepIndex !== null && (\r\n <ModalChangeActivity\r\n visible={isModalVisible}\r\n onClose={() => setIsModalVisible(false)}\r\n modalConfirm={handleConfirmModal}\r\n dataRegistro={\"\"}\r\n descricao={stepData[currentStepIndex!]?.descricao || \"\"}\r\n />\r\n )}\r\n </>\r\n );\r\n };\r\n\r\n\r\n const StepCustom = () => {\r\n return (\r\n <View\r\n style={{\r\n width: \"100%\",\r\n height: 84,\r\n paddingHorizontal: 24,\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n }}\r\n >\r\n {data.map((step, indexCustom) => {\r\n const descricao = getIconKeyByValue(step.descricao);\r\n\r\n return (\r\n <React.Fragment key={`step-${indexCustom}`}>\r\n <View\r\n style={{\r\n width: 45,\r\n height: 45,\r\n backgroundColor: indexCustom <= 3 ? \"orange\" : \"transparent\",\r\n borderRadius: 50,\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n borderWidth: 1,\r\n borderColor: \"#fff\",\r\n }}\r\n >\r\n <View\r\n style={{\r\n width: 45,\r\n height: 45,\r\n backgroundColor: \"transparent\",\r\n borderRadius: 50,\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n }}\r\n >\r\n {descricao && <Icons icon={descricao} />}\r\n </View>\r\n <Text\r\n style={{\r\n position: \"absolute\",\r\n top: 56,\r\n fontWeight: \"600\",\r\n fontSize: 10,\r\n lineHeight: 14,\r\n textAlign: \"center\",\r\n color: \"#fff\",\r\n width: 75,\r\n }}\r\n >\r\n {step.descricao}\r\n </Text>\r\n </View>\r\n\r\n {data?.length > 1 && indexCustom < data?.length - 1 && (\r\n <View\r\n style={{\r\n width: 35,\r\n height: 2,\r\n marginTop: 24,\r\n position: \"relative\",\r\n backgroundColor: \"orange\",\r\n }}\r\n />\r\n )}\r\n </React.Fragment>\r\n );\r\n })}\r\n </View>\r\n );\r\n };\r\n\r\n const handleRenderComponent = (stepType: \"default\" | \"custom\") => {\r\n switch (stepType) {\r\n case \"default\":\r\n return <StepDefault />;\r\n case \"custom\":\r\n return <StepCustom />;\r\n default:\r\n return <View />;\r\n }\r\n };\r\n\r\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,CAAC;UACTC,SAAS,EAAE,EAAE;UACbC,QAAQ,EAAE,UAAU;UACpBC,eAAe,EAAE;QACnB;MAAE,CACH,CAEW,CAAC;IAErB,CAAC,CACG,CAAC;EAEX,CAAC;EAED,MAAMkC,qBAAqB,GAAIC,QAA8B,IAAK;IAChE,QAAQA,QAAQ;MACd,KAAK,SAAS;QACZ,oBAAO/F,KAAA,CAAA+C,aAAA,CAAChC,WAAW,MAAE,CAAC;MACxB,KAAK,QAAQ;QACX,oBAAOf,KAAA,CAAA+C,aAAA,CAAC6B,UAAU,MAAE,CAAC;MACvB;QACE,oBAAO5E,KAAA,CAAA+C,aAAA,CAAC9C,IAAI,MAAE,CAAC;IACnB;EACF,CAAC;EAED,oBAAOD,KAAA,CAAA+C,aAAA,CAAA/C,KAAA,CAAAgD,QAAA,QAAG8C,qBAAqB,CAACnF,IAAK,CAAI,CAAC;AAC5C,CAAC;;AAED;AACA;AACA;AACA,SAASF,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","TouchableOpacity","Icons","getIconKeyByValue","styles","formHoursMinute","theme","ModalChangeActivity","StepIndicator","data","type","textColorDescription","titleColor","titleNumberColor","onChangeActivity","StepDefault","isModalVisible","setIsModalVisible","useState","currentStepIndex","setCurrentStepIndex","stepData","setStepData","handleOnPressActivitie","stepItem","index","_stepItem$descricao","_stepItem$descricao$t","desc","descricao","toLowerCase","call","isDescanso","includes","replace","sincronizado","handleConfirmModal","newData","updatedStep","label","tipo_atividade","value","identificador","key","newSteps","map","item","createElement","Fragment","length","history","isFirst","isEditableType","tipo","isSynced","canEdit","testID","activeOpacity","jr_tipo_atividade_id","style","containerIndicator","disabled","onPress","containerBall","width","height","marginTop","position","backgroundColor","colors","blue","orange","titleNumber","containerMain","title","data_inicio","titleDescription","data_fim","duracao_segundos","visible","modalConfirm","onClose","StepCustom","paddingHorizontal","display","flexDirection","step","indexCustom","borderRadius","alignItems","justifyContent","borderWidth","borderColor","icon","top","fontWeight","fontSize","lineHeight","textAlign","color","handleRenderComponent","stepType"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React from \"react\";\nimport { View, Text, TouchableOpacity } from \"react-native\";\n\n// commons / svg\nimport { Icons } from \"../../common/icons-svg\";\n\n// helpers\nimport { getIconKeyByValue } from \"./helpers/get-icon-by-status\";\n\n// typings\nimport type { IStepIndicator } from \"./interface\";\n\n// styles\nimport { styles } from \"./styles\";\nimport { formHoursMinute } from \"../../utils/format-data\";\nimport { theme } from \"../../styles/theme/theme\";\nimport { ModalChangeActivity } from \"../modal-change-activity\";\n\n/**\n * Componente StepIndicator para a interação da ui.\n */\nconst StepIndicator: React.FC<IStepIndicator> = ({\n data = [],\n type,\n textColorDescription,\n titleColor,\n titleNumberColor,\n onChangeActivity,\n}) => {\n const StepDefault = () => {\n const [isModalVisible, setIsModalVisible] = React.useState(false);\n const [currentStepIndex, setCurrentStepIndex] = React.useState<number | null>(null);\n const [stepData, setStepData] = React.useState(data);\n\n const handleOnPressActivitie = (stepItem: any, index: number) => {\n const desc = stepItem?.descricao?.toLowerCase?.();\n if (!desc) return;\n\n const isDescanso = [\"descanso\", \"refeição\", \"repouso_noturno\", \"repouso_semanal\"].includes(\n desc.replace(/\\s+/g, \"_\")\n );\n\n if (isDescanso && stepItem?.sincronizado === true) {\n setCurrentStepIndex(index);\n setIsModalVisible(true);\n }\n };\n\n const handleConfirmModal = (newData: { label: string; value: string; key: number }) => {\n if (currentStepIndex !== null) {\n const updatedStep = {\n ...stepData[currentStepIndex],\n descricao: newData.label,\n tipo_atividade: newData.value,\n identificador: newData.key,\n };\n\n const newSteps = stepData.map((item, index) =>\n index === currentStepIndex ? updatedStep : item\n );\n\n setStepData(newSteps as any);\n\n if (onChangeActivity) {\n onChangeActivity(updatedStep);\n }\n }\n\n setIsModalVisible(false);\n setCurrentStepIndex(null);\n };\n\n return (\n <>\n {stepData.length > 0 &&\n stepData.map((history, index) => {\n const isFirst = index === 0;\n const isEditableType = history.tipo === \"descanso\";\n const isSynced = history?.sincronizado === true;\n const canEdit = isFirst && isEditableType && isSynced;\n\n return (\n <TouchableOpacity\n testID=\"step-indicator\"\n activeOpacity={0.7}\n key={history.jr_tipo_atividade_id}\n style={styles({}).containerIndicator}\n disabled={!canEdit}\n onPress={() => handleOnPressActivitie(history, index)}\n >\n <View style={styles({ sincronizado: history.sincronizado }).containerBall}>\n {stepData.length > 1 && index < stepData.length - 1 && (\n <View\n style={{\n width: 2,\n height: 84,\n marginTop: 116,\n position: \"relative\",\n backgroundColor: history.sincronizado\n ? theme.colors.blue[500]\n : theme.colors.orange[150],\n }}\n />\n )}\n <Text style={styles({ titleNumberColor }).titleNumber}>\n {stepData.length - index}\n </Text>\n </View>\n\n <View style={styles({}).containerMain}>\n <Text style={styles({ titleColor }).title}>{history?.descricao}</Text>\n\n {history?.data_inicio && (\n <Text style={styles({ textColorDescription }).titleDescription}>\n {`Inicio: ${history.data_inicio} ás ${history.data_fim}`}\n </Text>\n )}\n\n {history.duracao_segundos && (\n <Text style={styles({ textColorDescription }).titleDescription}>\n Duração: {formHoursMinute(history?.duracao_segundos as string)}\n </Text>\n )}\n </View>\n </TouchableOpacity>\n );\n })}\n\n {isModalVisible && (\n <ModalChangeActivity\n visible={isModalVisible}\n modalConfirm={handleConfirmModal}\n descricao=\"\"\n onClose={() => setIsModalVisible(false)}\n />\n )}\n </>\n );\n };\n\n const StepCustom = () => {\n return (\n <View\n style={{\n width: \"100%\",\n height: 84,\n paddingHorizontal: 24,\n display: \"flex\",\n flexDirection: \"row\",\n }}\n >\n {data.map((step, indexCustom) => {\n const descricao = getIconKeyByValue(step.descricao);\n\n return (\n <React.Fragment key={`step-${indexCustom}`}>\n <View\n style={{\n width: 45,\n height: 45,\n backgroundColor: indexCustom <= 3 ? \"orange\" : \"transparent\",\n borderRadius: 50,\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 1,\n borderColor: \"#fff\",\n }}\n >\n <View\n style={{\n width: 45,\n height: 45,\n backgroundColor: \"transparent\",\n borderRadius: 50,\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {descricao && <Icons icon={descricao} />}\n </View>\n <Text\n style={{\n position: \"absolute\",\n top: 56,\n fontWeight: \"600\",\n fontSize: 10,\n lineHeight: 14,\n textAlign: \"center\",\n color: \"#fff\",\n width: 75,\n }}\n >\n {step.descricao}\n </Text>\n </View>\n\n {data?.length > 1 && indexCustom < data?.length - 1 && (\n <View\n style={{\n width: 35,\n height: 2,\n marginTop: 24,\n position: \"relative\",\n backgroundColor: \"orange\",\n }}\n />\n )}\n </React.Fragment>\n );\n })}\n </View>\n );\n };\n\n const handleRenderComponent = (stepType: \"default\" | \"custom\") => {\n switch (stepType) {\n case \"default\":\n return <StepDefault />;\n case \"custom\":\n return <StepCustom />;\n default:\n return <View />;\n }\n };\n\n return <>{handleRenderComponent(type!)}</>;\n};\n\n/**\n * EXPORTS\n */\nexport default StepIndicator;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;;AAE3D;AACA,SAASC,KAAK,QAAQ,wBAAwB;;AAE9C;AACA,SAASC,iBAAiB,QAAQ,8BAA8B;;AAEhE;;AAGA;AACA,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,KAAK,QAAQ,0BAA0B;AAChD,SAASC,mBAAmB,QAAQ,0BAA0B;;AAE9D;AACA;AACA;AACA,MAAMC,aAAuC,GAAGA,CAAC;EAC/CC,IAAI,GAAG,EAAE;EACTC,IAAI;EACJC,oBAAoB;EACpBC,UAAU;EACVC,gBAAgB;EAChBC;AACF,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGA,CAAA,KAAM;IACxB,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAGnB,KAAK,CAACoB,QAAQ,CAAC,KAAK,CAAC;IACjE,MAAM,CAACC,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,CAAC;EAED,oBAAOD,KAAA,CAAAiD,aAAA,CAAAjD,KAAA,CAAAkD,QAAA,QAAGoD,qBAAqB,CAAC1F,IAAK,CAAI,CAAC;AAC5C,CAAC;;AAED;AACA;AACA;AACA,eAAeF,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/**\r\n * IMPORTS\r\n */\r\n\r\ntype IData = {\r\n id: number;\r\n duracao_segundos: string | number;\r\n data_inicio: string;\r\n data_fim: string;\r\n descricao: string;\r\n sincronizado;\r\n};\r\ninterface IStepIndicator {\r\n /**dados que vão ser renderizados */\r\n data?: IData[];\r\n\r\n /**tupo de renderização padrão ou customizada */\r\n type?: \"default\" | \"custom\";\r\n\r\n /**cor do texto */\r\n titleColor?: string;\r\n\r\n /**cor do numero do step indicator */\r\n titleNumberColor?: string;\r\n\r\n /**cor do texto da descrição */\r\n textColorDescription?: string;\r\n\r\n /**verifica se foi sincronizado com back end */\r\n sincronizado?: boolean;\r\n}\r\n/**\r\n * EXPORTS\r\n */\r\nexport { type IStepIndicator };\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * IMPORTS\n */\n\ntype IData = {\n id?: number;\n jr_tipo_atividade_id?: number;\n duracao_segundos: string | number;\n data_inicio: string;\n data_fim: string;\n descricao: string;\n sincronizado;\n tipo: string;\n referencia: string;\n};\n\ntype IStyleProps = {\n sincronizado?: boolean;\n titleColor?: string;\n titleNumberColor?: string;\n textColorDescription?: string;\n};\n\ninterface IStepIndicator {\n /**dados que vão ser renderizados */\n data?: IData[];\n\n /**tupo de renderização padrão ou customizada */\n type?: \"default\" | \"custom\";\n\n /**cor do texto */\n titleColor?: string;\n\n /**cor do numero do step indicator */\n titleNumberColor?: string;\n\n /**cor do texto da descrição */\n textColorDescription?: string;\n\n /**params para lidar com selecionamento de atividade única */\n onChangeActivity?: (activity: any) => void;\n}\n/**\n * EXPORTS\n */\nexport { type IStepIndicator, IStyleProps };\n"],"mappings":"","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- /**
2
- * IMPORTS
1
+ /**
2
+ * IMPORTS
3
3
  */
4
4
 
5
5
  import { StyleSheet } from "react-native";
@@ -16,7 +16,6 @@ const styles = props => {
16
16
  height: 86,
17
17
  flexDirection: "row",
18
18
  justifyContent: "flex-start"
19
- // backgroundColor: theme.colors.gray[300],
20
19
  },
21
20
  containerBall: {
22
21
  width: 32,
@@ -30,7 +29,7 @@ const styles = props => {
30
29
  title: {
31
30
  color: (_props$titleColor = props.titleColor) !== null && _props$titleColor !== void 0 ? _props$titleColor : "black",
32
31
  textAlign: "center",
33
- lineHeight: 20,
32
+ lineHeight: 24,
34
33
  fontSize: theme.fontSizes["sm"],
35
34
  fontWeight: "500",
36
35
  marginLeft: 8
@@ -38,7 +37,7 @@ const styles = props => {
38
37
  titleNumber: {
39
38
  color: (_props$titleNumberCol = props.titleNumberColor) !== null && _props$titleNumberCol !== void 0 ? _props$titleNumberCol : theme.colors.neutral[25],
40
39
  textAlign: "center",
41
- lineHeight: 16,
40
+ lineHeight: 18,
42
41
  fontFamily: theme.fonts.inter_regular_400,
43
42
  fontSize: theme.fontSizes["xs"],
44
43
  position: "absolute"
@@ -47,9 +46,8 @@ const styles = props => {
47
46
  color: (_props$textColorDescr = props.textColorDescription) !== null && _props$textColorDescr !== void 0 ? _props$textColorDescr : theme.colors.gray[700],
48
47
  textAlign: "center",
49
48
  lineHeight: 16,
50
- fontSize: theme.fontSizes["xs"],
51
- fontFamily: theme.fonts.inter_regular_400,
52
- fontWeight: "400",
49
+ fontSize: 12,
50
+ fontFamily: theme.fonts.inter_light_300,
53
51
  marginLeft: 8
54
52
  },
55
53
  containerMain: {
@@ -62,8 +60,8 @@ const styles = props => {
62
60
  });
63
61
  };
64
62
 
65
- /**
66
- * EXPORTS
63
+ /**
64
+ * EXPORTS
67
65
  */
68
66
  export { styles };
69
67
  //# sourceMappingURL=styles.js.map