jornada-ui 0.4.16 → 0.4.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/modal-type-activities/index.js +7 -6
- package/lib/commonjs/components/modal-type-activities/index.js.map +1 -1
- package/lib/commonjs/components/modal-type-activities/mock/index.js +34 -3
- package/lib/commonjs/components/modal-type-activities/mock/index.js.map +1 -1
- package/lib/commonjs/components/modals/modal-change-activitie-history/helpers/index.js +35 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/helpers/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/index.js +203 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/interface.js +6 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/interface.js.map +1 -0
- package/lib/commonjs/components/step-indicator/index.js +131 -68
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/modal-type-activities/index.js +8 -7
- package/lib/module/components/modal-type-activities/index.js.map +1 -1
- package/lib/module/components/modal-type-activities/mock/index.js +33 -2
- package/lib/module/components/modal-type-activities/mock/index.js.map +1 -1
- package/lib/module/components/modals/modal-change-activitie-history/helpers/index.js +32 -0
- package/lib/module/components/modals/modal-change-activitie-history/helpers/index.js.map +1 -0
- package/lib/module/components/modals/modal-change-activitie-history/index.js +196 -0
- package/lib/module/components/modals/modal-change-activitie-history/index.js.map +1 -0
- package/lib/module/components/modals/modal-change-activitie-history/interface.js +4 -0
- package/lib/module/components/modals/modal-change-activitie-history/interface.js.map +1 -0
- package/lib/module/components/step-indicator/index.js +129 -65
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-type-activities/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/modal-type-activities/interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modal-type-activities/mock/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/modal-type-activities/mock/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/helpers/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/helpers/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts +18 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts +3 -9
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-type-activities/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts +1 -0
- package/lib/typescript/module/src/components/modal-type-activities/interface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modal-type-activities/mock/index.d.ts +17 -0
- package/lib/typescript/module/src/components/modal-type-activities/mock/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/helpers/index.d.ts +13 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/helpers/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts +10 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts +18 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/step-indicator/index.d.ts +3 -9
- package/lib/typescript/module/src/components/step-indicator/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/modal-type-activities/index.tsx +173 -169
- package/src/components/modal-type-activities/interface.ts +36 -34
- package/src/components/modal-type-activities/mock/index.ts +103 -65
- package/src/components/modals/modal-change-activitie-history/helpers/index.ts +15 -0
- package/src/components/modals/modal-change-activitie-history/index.tsx +189 -0
- package/src/components/modals/modal-change-activitie-history/interface.ts +16 -0
- package/src/components/step-indicator/index.tsx +226 -155
- package/src/components/step-indicator/interface.d.ts +3 -2
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* IMPORTS
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
// libs RN
|
|
8
|
+
import { Modal, View } from "react-native";
|
|
9
|
+
|
|
10
|
+
// componentes
|
|
11
|
+
import Box from "../../box/index.js";
|
|
12
|
+
import Button from "../../button/index.js";
|
|
13
|
+
import Typography from "../../typography/index.js";
|
|
14
|
+
import SelectOption from "../../selects/select-option/index.js";
|
|
15
|
+
|
|
16
|
+
// assets / icons
|
|
17
|
+
import { Icons } from "../../../common/icons-svg/index.js";
|
|
18
|
+
|
|
19
|
+
// helpers / data
|
|
20
|
+
import { optionsActivities } from "./helpers/index.js";
|
|
21
|
+
|
|
22
|
+
// typings
|
|
23
|
+
|
|
24
|
+
// styles / theme
|
|
25
|
+
import { theme } from "../../../styles/theme/theme.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Componente Modal para alteração de atividade.
|
|
29
|
+
*/
|
|
30
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
|
+
export const ModalChangeActivity = ({
|
|
32
|
+
visible,
|
|
33
|
+
onClose,
|
|
34
|
+
modalConfirm,
|
|
35
|
+
descricao
|
|
36
|
+
}) => {
|
|
37
|
+
const [isLoading] = React.useState(false);
|
|
38
|
+
const initial = (descricao ?? "").toLowerCase().replace(/\s+/g, "_");
|
|
39
|
+
const [selectedOption, setSelectedOption] = React.useState(initial || "none");
|
|
40
|
+
const handleConfirm = () => {
|
|
41
|
+
const selected = optionsActivities?.find(activity => activity.value === selectedOption);
|
|
42
|
+
if (selected && selected.value !== "none") {
|
|
43
|
+
modalConfirm({
|
|
44
|
+
label: selected.label,
|
|
45
|
+
value: selected.value,
|
|
46
|
+
key: selected.key
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// sempre fechar o modal
|
|
51
|
+
onClose();
|
|
52
|
+
};
|
|
53
|
+
const handleSelectDown = activity => {
|
|
54
|
+
const option = optionsActivities.find(o => o.label === activity || o.value === activity);
|
|
55
|
+
if (option) setSelectedOption(option.value);
|
|
56
|
+
};
|
|
57
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
58
|
+
animationType: "fade",
|
|
59
|
+
transparent: true,
|
|
60
|
+
visible: visible,
|
|
61
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
62
|
+
style: {
|
|
63
|
+
flex: 1,
|
|
64
|
+
justifyContent: "center",
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
backgroundColor: "rgba(0,0,0,0.6)"
|
|
67
|
+
},
|
|
68
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
69
|
+
width: 346,
|
|
70
|
+
backgroundColor: theme.colors.orange[500],
|
|
71
|
+
borderStyled: {
|
|
72
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
73
|
+
},
|
|
74
|
+
paddingStyle: {
|
|
75
|
+
paddingLeft: theme.paddings["2xs"],
|
|
76
|
+
paddingRight: theme.paddings["2xs"],
|
|
77
|
+
paddingTop: theme.paddings.sm,
|
|
78
|
+
paddingBottom: theme.paddings.sm
|
|
79
|
+
},
|
|
80
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
81
|
+
marginStyle: {
|
|
82
|
+
marginBottom: theme.margins["2xs"],
|
|
83
|
+
marginLeft: theme.margins["1xs"]
|
|
84
|
+
},
|
|
85
|
+
flexStyle: {
|
|
86
|
+
flexDirection: "row",
|
|
87
|
+
alignItems: "center"
|
|
88
|
+
},
|
|
89
|
+
children: [/*#__PURE__*/_jsx(Icons, {
|
|
90
|
+
icon: "EXCLAMATION_TRIANGLE",
|
|
91
|
+
color: theme.colors.black[10],
|
|
92
|
+
background: theme.colors.yellow[50],
|
|
93
|
+
size: theme.fontSizes["2xl"]
|
|
94
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
95
|
+
text: "Alterar Atividade",
|
|
96
|
+
color: "#fff",
|
|
97
|
+
marginLeft: theme.margins["2xs"],
|
|
98
|
+
fontFamily: theme.fonts.inter_bold_700,
|
|
99
|
+
size: theme.fontSizes.md
|
|
100
|
+
})]
|
|
101
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
102
|
+
backgroundColor: theme.colors.neutral[300],
|
|
103
|
+
paddingStyle: {
|
|
104
|
+
padding: theme.paddings.xs
|
|
105
|
+
},
|
|
106
|
+
borderStyled: {
|
|
107
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
108
|
+
},
|
|
109
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
110
|
+
flexStyle: {
|
|
111
|
+
flexDirection: "row",
|
|
112
|
+
justifyContent: "flex-start"
|
|
113
|
+
},
|
|
114
|
+
width: "100%",
|
|
115
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
116
|
+
text: `Deseja realmente alterar sua atividade?`,
|
|
117
|
+
color: theme.colors.black[25],
|
|
118
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
119
|
+
size: theme.fontSizes.xs,
|
|
120
|
+
style: {
|
|
121
|
+
flexWrap: "wrap",
|
|
122
|
+
maxWidth: "100%"
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
}), /*#__PURE__*/_jsx(SelectOption, {
|
|
126
|
+
titleLabel: "Selecione atividade",
|
|
127
|
+
sizeTitleLabel: theme.fontSizes.xs,
|
|
128
|
+
dataOption: optionsActivities,
|
|
129
|
+
handleSelectDown: handleSelectDown,
|
|
130
|
+
backgroundColor: theme.colors.neutral[300]
|
|
131
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
132
|
+
marginStyle: {
|
|
133
|
+
marginTop: theme.margins["1xs"]
|
|
134
|
+
},
|
|
135
|
+
flexStyle: {
|
|
136
|
+
flexDirection: "row",
|
|
137
|
+
justifyContent: "space-between"
|
|
138
|
+
},
|
|
139
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
140
|
+
title: "CANCELAR",
|
|
141
|
+
onPress: onClose,
|
|
142
|
+
width: "48%",
|
|
143
|
+
height: 36,
|
|
144
|
+
isLoading: isLoading,
|
|
145
|
+
disabled: isLoading,
|
|
146
|
+
backgroundColor: theme.colors.neutral[300],
|
|
147
|
+
buttonTextStyle: {
|
|
148
|
+
color: theme.colors.blue[100],
|
|
149
|
+
fontFamily: "Inter-Medium",
|
|
150
|
+
fontSize: theme.fontSizes.xs,
|
|
151
|
+
fontWeight: "500"
|
|
152
|
+
},
|
|
153
|
+
flexStyle: {
|
|
154
|
+
flexDirection: "row",
|
|
155
|
+
alignItems: "center",
|
|
156
|
+
justifyContent: "center",
|
|
157
|
+
textAlign: "center"
|
|
158
|
+
},
|
|
159
|
+
borderStyled: {
|
|
160
|
+
borderWidth: theme.borderWidths.thin,
|
|
161
|
+
borderColor: theme.colors.blue[100],
|
|
162
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
163
|
+
}
|
|
164
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
165
|
+
title: "CONFIRMAR",
|
|
166
|
+
onPress: handleConfirm,
|
|
167
|
+
width: "48%",
|
|
168
|
+
height: 36,
|
|
169
|
+
isLoading: isLoading,
|
|
170
|
+
disabled: isLoading,
|
|
171
|
+
backgroundColor: theme.colors.blue[100],
|
|
172
|
+
buttonTextStyle: {
|
|
173
|
+
color: "#fff",
|
|
174
|
+
fontFamily: "Inter-Medium",
|
|
175
|
+
fontSize: theme.fontSizes.xs,
|
|
176
|
+
fontWeight: "500"
|
|
177
|
+
},
|
|
178
|
+
flexStyle: {
|
|
179
|
+
flexDirection: "row",
|
|
180
|
+
alignItems: "center",
|
|
181
|
+
justifyContent: "center",
|
|
182
|
+
textAlign: "center"
|
|
183
|
+
},
|
|
184
|
+
borderStyled: {
|
|
185
|
+
borderWidth: theme.borderWidths.thin,
|
|
186
|
+
borderColor: theme.colors.blue[100],
|
|
187
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
188
|
+
}
|
|
189
|
+
})]
|
|
190
|
+
})]
|
|
191
|
+
})]
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Modal","View","Box","Button","Typography","SelectOption","Icons","optionsActivities","theme","jsx","_jsx","jsxs","_jsxs","ModalChangeActivity","visible","onClose","modalConfirm","descricao","isLoading","useState","initial","toLowerCase","replace","selectedOption","setSelectedOption","handleConfirm","selected","find","activity","value","label","key","handleSelectDown","option","o","animationType","transparent","children","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","fontSizes","text","fontFamily","fonts","inter_bold_700","md","neutral","padding","xs","inter_medium_500","flexWrap","maxWidth","titleLabel","sizeTitleLabel","dataOption","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-change-activitie-history/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB;AACA,SAASC,KAAK,EAAEC,IAAI,QAAQ,cAAc;;AAE1C;AACA,OAAOC,GAAG,MAAM,oBAAW;AAC3B,OAAOC,MAAM,MAAM,uBAAc;AACjC,OAAOC,UAAU,MAAM,2BAAkB;AACzC,OAAOC,YAAY,MAAM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AAC,eACFvC,IAAA,CAACP,MAAM;cACLkF,KAAK,EAAC,WAAW;cACjBC,OAAO,EAAE7D,aAAc;cACvBkB,KAAK,EAAE,KAAM;cACb4C,MAAM,EAAE,EAAG;cACXrE,SAAS,EAAEA,SAAU;cACrBsE,QAAQ,EAAEtE,SAAU;cACpBwB,eAAe,EAAElC,KAAK,CAACoC,MAAM,CAAC8C,IAAI,CAAC,GAAG,CAAE;cACxCD,eAAe,EAAE;gBACfzB,KAAK,EAAE,MAAM;gBACbO,UAAU,EAAE,cAAc;gBAC1BoB,QAAQ,EAAEnF,KAAK,CAAC6D,SAAS,CAACQ,EAAE;gBAC5Be,UAAU,EAAE;cACd,CAAE;cACF/B,SAAS,EAAE;gBACTC,aAAa,EAAE,KAAK;gBACpBrB,UAAU,EAAE,QAAQ;gBACpBD,cAAc,EAAE,QAAQ;gBACxBqD,SAAS,EAAE;cACb,CAAE;cACF/C,YAAY,EAAE;gBACZgD,WAAW,EAAEtF,KAAK,CAACwC,YAAY,CAAC+C,IAAI;gBACpCC,WAAW,EAAExF,KAAK,CAACoC,MAAM,CAAC8C,IAAI,CAAC,GAAG,CAAC;gBACnC3C,YAAY,EAAEvC,KAAK,CAACwC,YAAY,CAACC;cACnC;YAAE,CACH,CAAC;UAAA,CACC,CAAC;QAAA,CACH,CAAC;MAAA,CACH;IAAC,CACF;EAAC,CACF,CAAC;AAEZ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-change-activitie-history/interface.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
3
|
+
import React, { useState, forwardRef, useImperativeHandle, useRef } from "react";
|
|
4
|
+
import { View, Text, TouchableOpacity, FlatList } from "react-native";
|
|
5
|
+
|
|
6
|
+
// components
|
|
7
|
+
import { ModalChangeActivity } from "../modals/modal-change-activitie-history/index.js";
|
|
8
8
|
|
|
9
9
|
// commons / svg
|
|
10
10
|
import { Icons } from "../../common/icons-svg/index.js";
|
|
@@ -12,83 +12,146 @@ import { Icons } from "../../common/icons-svg/index.js";
|
|
|
12
12
|
// helpers
|
|
13
13
|
import { getIconKeyByValue } from "./helpers/get-icon-by-status.js";
|
|
14
14
|
|
|
15
|
+
// typings
|
|
16
|
+
|
|
15
17
|
// utils
|
|
16
18
|
import { formHoursMinute } from "../../utils/format-date/index.js";
|
|
17
19
|
|
|
18
|
-
// typings
|
|
19
|
-
|
|
20
20
|
// styles
|
|
21
21
|
import { styles } from "./styles.js";
|
|
22
22
|
import { theme } from "../../styles/theme/theme.js";
|
|
23
|
+
import { asBaseComponent } from "../../@types/as-base-component.js";
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
* Componente StepIndicator para a interação da ui.
|
|
26
27
|
*/
|
|
27
28
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
|
-
const StepIndicator = ({
|
|
29
|
+
const StepIndicator = /*#__PURE__*/forwardRef(({
|
|
29
30
|
data = [],
|
|
30
31
|
type,
|
|
31
32
|
textColorDescription,
|
|
32
33
|
titleColor,
|
|
33
34
|
titleNumberColor,
|
|
34
|
-
|
|
35
|
-
}) => {
|
|
35
|
+
onChangeActivity
|
|
36
|
+
}, ref) => {
|
|
36
37
|
const StepDefault = () => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
39
|
+
const [currentStepIndex, setCurrentStepIndex] = useState(null);
|
|
40
|
+
const [stepData, setStepData] = useState(data);
|
|
41
|
+
const flatListRef = useRef(null);
|
|
42
|
+
const handleOnPressActivitie = (stepItem, index) => {
|
|
43
|
+
const desc = stepItem?.descricao?.toLowerCase?.();
|
|
44
|
+
if (!desc) return;
|
|
45
|
+
const isDescanso = ["descanso", "refeição", "repouso_noturno", "repouso_semanal"].includes(desc.replace(/\s+/g, "_"));
|
|
46
|
+
if (isDescanso && stepItem?.sincronizado === true) {
|
|
47
|
+
setCurrentStepIndex(index);
|
|
48
|
+
setIsModalVisible(true);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const handleConfirmModal = newData => {
|
|
52
|
+
if (currentStepIndex !== null) {
|
|
53
|
+
const updatedStep = {
|
|
54
|
+
...stepData[currentStepIndex],
|
|
55
|
+
descricao: newData.label,
|
|
56
|
+
referencia: newData.value,
|
|
57
|
+
jr_tipo_atividade_id: newData.key
|
|
58
|
+
};
|
|
59
|
+
const newSteps = stepData.map((item, index) => index === currentStepIndex ? updatedStep : item);
|
|
60
|
+
setStepData(newSteps);
|
|
61
|
+
if (onChangeActivity) {
|
|
62
|
+
onChangeActivity(updatedStep);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
setIsModalVisible(false);
|
|
66
|
+
setCurrentStepIndex(null);
|
|
67
|
+
};
|
|
43
68
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
69
|
+
// render item padrão do step indicator
|
|
70
|
+
const renderItem = ({
|
|
71
|
+
item: history,
|
|
72
|
+
index
|
|
73
|
+
}) => {
|
|
74
|
+
const isFirst = index === 0;
|
|
75
|
+
const isEditableType = history.tipo === "descanso";
|
|
76
|
+
const isSynced = history?.sincronizado === true;
|
|
77
|
+
const canEdit = isFirst && isEditableType && isSynced;
|
|
78
|
+
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
79
|
+
testID: "step-indicator",
|
|
80
|
+
activeOpacity: 0.7,
|
|
81
|
+
style: styles({}).containerIndicator,
|
|
82
|
+
disabled: !canEdit,
|
|
83
|
+
onPress: () => handleOnPressActivitie(history, index),
|
|
84
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
85
|
+
style: styles({
|
|
86
|
+
sincronizado: history.sincronizado
|
|
87
|
+
}).containerBall,
|
|
88
|
+
children: [stepData.length > 1 && index < stepData.length - 1 && /*#__PURE__*/_jsx(View, {
|
|
89
|
+
style: {
|
|
90
|
+
width: 2,
|
|
91
|
+
height: 84,
|
|
92
|
+
marginTop: 116,
|
|
93
|
+
position: "relative",
|
|
94
|
+
backgroundColor: history.sincronizado ? theme.colors.blue[500] : theme.colors.orange[150]
|
|
95
|
+
}
|
|
96
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
54
97
|
style: styles({
|
|
55
|
-
|
|
56
|
-
}).
|
|
57
|
-
children:
|
|
58
|
-
style: {
|
|
59
|
-
width: 2,
|
|
60
|
-
height: 84,
|
|
61
|
-
marginTop: 116,
|
|
62
|
-
position: "relative",
|
|
63
|
-
backgroundColor: history.sincronizado ? theme.colors.blue[500] : theme.colors.orange[150]
|
|
64
|
-
}
|
|
65
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
66
|
-
style: styles({
|
|
67
|
-
titleNumberColor
|
|
68
|
-
}).titleNumber,
|
|
69
|
-
children: data?.length - index
|
|
70
|
-
})]
|
|
71
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
72
|
-
style: styles({}).containerMain,
|
|
73
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
74
|
-
style: styles({
|
|
75
|
-
titleColor
|
|
76
|
-
}).title,
|
|
77
|
-
children: history?.descricao
|
|
78
|
-
}), history?.data_inicio && /*#__PURE__*/_jsx(Text, {
|
|
79
|
-
style: styles({
|
|
80
|
-
textColorDescription
|
|
81
|
-
}).titleDescription,
|
|
82
|
-
children: `Inicio: ${history.data_inicio} ás ${history.data_fim}`
|
|
83
|
-
}), history.duracao_segundos && /*#__PURE__*/_jsxs(Text, {
|
|
84
|
-
style: styles({
|
|
85
|
-
textColorDescription
|
|
86
|
-
}).titleDescription,
|
|
87
|
-
children: ["Dura\xE7\xE3o: ", formHoursMinute(history?.duracao_segundos)]
|
|
88
|
-
})]
|
|
98
|
+
titleNumberColor
|
|
99
|
+
}).titleNumber,
|
|
100
|
+
children: stepData.length - index
|
|
89
101
|
})]
|
|
90
|
-
},
|
|
91
|
-
|
|
102
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
103
|
+
style: styles({}).containerMain,
|
|
104
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
105
|
+
style: styles({
|
|
106
|
+
titleColor
|
|
107
|
+
}).title,
|
|
108
|
+
children: history?.descricao
|
|
109
|
+
}), history?.data_inicio && /*#__PURE__*/_jsx(Text, {
|
|
110
|
+
style: styles({
|
|
111
|
+
textColorDescription
|
|
112
|
+
}).titleDescription,
|
|
113
|
+
children: `Inicio: ${history.data_inicio} ás ${history.data_fim}`
|
|
114
|
+
}), history.duracao_segundos && /*#__PURE__*/_jsxs(Text, {
|
|
115
|
+
style: styles({
|
|
116
|
+
textColorDescription
|
|
117
|
+
}).titleDescription,
|
|
118
|
+
children: ["Dura\xE7\xE3o: ", formHoursMinute(history?.duracao_segundos)]
|
|
119
|
+
})]
|
|
120
|
+
})]
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// Expor funções para o pai via forwardRef
|
|
125
|
+
useImperativeHandle(ref, () => ({
|
|
126
|
+
scrollToIndex: index => {
|
|
127
|
+
flatListRef.current?.scrollToIndex({
|
|
128
|
+
index,
|
|
129
|
+
animated: true
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
openModalAt: index => {
|
|
133
|
+
if (stepData[index]) {
|
|
134
|
+
setCurrentStepIndex(index);
|
|
135
|
+
setIsModalVisible(true);
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
resetSteps: newData => {
|
|
139
|
+
setStepData(newData);
|
|
140
|
+
}
|
|
141
|
+
}));
|
|
142
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
143
|
+
children: [/*#__PURE__*/_jsx(FlatList, {
|
|
144
|
+
ref: flatListRef,
|
|
145
|
+
data: stepData,
|
|
146
|
+
renderItem: renderItem,
|
|
147
|
+
keyExtractor: (item, index) => String(item?.id ?? String(index)),
|
|
148
|
+
showsVerticalScrollIndicator: false
|
|
149
|
+
}), isModalVisible && /*#__PURE__*/_jsx(ModalChangeActivity, {
|
|
150
|
+
visible: isModalVisible,
|
|
151
|
+
modalConfirm: handleConfirmModal,
|
|
152
|
+
descricao: "",
|
|
153
|
+
onClose: () => setIsModalVisible(false)
|
|
154
|
+
})]
|
|
92
155
|
});
|
|
93
156
|
};
|
|
94
157
|
const StepCustom = () => {
|
|
@@ -165,10 +228,11 @@ const StepIndicator = ({
|
|
|
165
228
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
166
229
|
children: handleRenderComponent(type)
|
|
167
230
|
});
|
|
168
|
-
};
|
|
231
|
+
});
|
|
232
|
+
StepIndicator.displayName = "StepIndicator";
|
|
169
233
|
|
|
170
234
|
/**
|
|
171
|
-
*
|
|
235
|
+
* Componente StepIndicator para a interação da ui.
|
|
172
236
|
*/
|
|
173
|
-
export default StepIndicator;
|
|
237
|
+
export default asBaseComponent(StepIndicator);
|
|
174
238
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","TouchableOpacity","Icons","getIconKeyByValue","formHoursMinute","styles","theme","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","StepIndicator","data","type","textColorDescription","titleColor","titleNumberColor","
|
|
1
|
+
{"version":3,"names":["React","useState","forwardRef","useImperativeHandle","useRef","View","Text","TouchableOpacity","FlatList","ModalChangeActivity","Icons","getIconKeyByValue","formHoursMinute","styles","theme","asBaseComponent","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","StepIndicator","data","type","textColorDescription","titleColor","titleNumberColor","onChangeActivity","ref","StepDefault","isModalVisible","setIsModalVisible","currentStepIndex","setCurrentStepIndex","stepData","setStepData","flatListRef","handleOnPressActivitie","stepItem","index","desc","descricao","toLowerCase","isDescanso","includes","replace","sincronizado","handleConfirmModal","newData","updatedStep","label","referencia","value","jr_tipo_atividade_id","key","newSteps","map","item","renderItem","history","isFirst","isEditableType","tipo","isSynced","canEdit","testID","activeOpacity","style","containerIndicator","disabled","onPress","children","containerBall","length","width","height","marginTop","position","backgroundColor","colors","blue","orange","titleNumber","containerMain","title","data_inicio","titleDescription","data_fim","duracao_segundos","scrollToIndex","current","animated","openModalAt","resetSteps","keyExtractor","String","id","showsVerticalScrollIndicator","visible","modalConfirm","onClose","StepCustom","paddingHorizontal","display","flexDirection","step","indexCustom","borderRadius","alignItems","justifyContent","borderWidth","borderColor","icon","top","fontWeight","fontSize","lineHeight","textAlign","color","handleRenderComponent","stepType","displayName"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/step-indicator/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,UAAU,EAAEC,mBAAmB,EAAEC,MAAM,QAAQ,OAAO;AAChF,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,QAAQ,QAAkC,cAAc;;AAE/F;AACA,SAASC,mBAAmB,QAAQ,mDAA0C;;AAE9E;AACA,SAASC,KAAK,QAAQ,iCAAwB;;AAE9C;AACA,SAASC,iBAAiB,QAAQ,iCAA8B;;AAEhE;;AAGA;AACA,SAASC,eAAe,QAAQ,kCAAyB;;AAEzD;AACA,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,KAAK,QAAQ,6BAA0B;AAChD,SAASC,eAAe,QAAQ,mCAAgC;;AAEhE;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAGA,MAAMC,aAAa,gBAAGpB,UAAU,CAC9B,CACE;EAAEqB,IAAI,GAAG,EAAE;EAAEC,IAAI;EAAEC,oBAAoB;EAAEC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KAAK,EAAE,EAAE;cACTC,MAAM,EAAE,CAAC;cACTC,SAAS,EAAE,EAAE;cACbC,QAAQ,EAAE,UAAU;cACpBC,eAAe,EAAE;YACnB;UAAE,CACH,CACF;QAAA,GAnDkB,QAAQ4B,WAAW,EAoDxB,CAAC;MAErB,CAAC;IAAC,CACE,CAAC;EAEX,CAAC;EAED,MAAMa,qBAAqB,GAAIC,QAA8B,IAAK;IAChE,QAAQA,QAAQ;MACd,KAAK,SAAS;QACZ,oBAAOxG,IAAA,CAACa,WAAW,IAAE,CAAC;MACxB,KAAK,QAAQ;QACX,oBAAOb,IAAA,CAACqF,UAAU,IAAE,CAAC;MACvB;QACE,oBAAOrF,IAAA,CAACZ,IAAI,IAAE,CAAC;IACnB;EACF,CAAC;EAED,oBAAOY,IAAA,CAAAI,SAAA;IAAAmD,QAAA,EAAGgD,qBAAqB,CAAChG,IAAK;EAAC,CAAG,CAAC;AAC5C,CACF,CAAC;AAEDF,aAAa,CAACoG,WAAW,GAAG,eAAe;;AAE3C;AACA;AACA;AACA,eAAe3G,eAAe,CAACO,aAAa,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal-type-activities/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAe1C,OAAO,KAAK,EAAE,oBAAoB,EAAa,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal-type-activities/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAe1C,OAAO,KAAK,EAAE,oBAAoB,EAAa,MAAM,aAAa,CAAC;AAuJnE;;GAEG;;AACH,wBAA0C"}
|
|
@@ -15,6 +15,7 @@ interface IModalTypeActivities extends ModalProps, IGlobalCss {
|
|
|
15
15
|
onClose: () => void;
|
|
16
16
|
/** tipo de atividades */
|
|
17
17
|
activityType: IActivity["tipo"];
|
|
18
|
+
driverType?: "normal" | "reserva";
|
|
18
19
|
/** se está carregando */
|
|
19
20
|
isLoading: boolean;
|
|
20
21
|
/** função que seleciona atividade */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal-type-activities/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGhE,UAAU,SAAS;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;CAC/B;AAED,UAAU,oBAAqB,SAAQ,UAAU,EAAE,UAAU;IAC3D,6BAA6B;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,yBAAyB;IACzB,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAEhC,yBAAyB;IACzB,SAAS,EAAE,OAAO,CAAC;IAEnB,qCAAqC;IAErC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal-type-activities/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAGhE,UAAU,SAAS;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;CAC/B;AAED,UAAU,oBAAqB,SAAQ,UAAU,EAAE,UAAU;IAC3D,6BAA6B;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,yBAAyB;IACzB,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAEhC,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAElC,yBAAyB;IACzB,SAAS,EAAE,OAAO,CAAC;IAEnB,qCAAqC;IAErC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -17,4 +17,21 @@ export declare const activities: {
|
|
|
17
17
|
tipo: string;
|
|
18
18
|
}[];
|
|
19
19
|
};
|
|
20
|
+
export declare const activitiesReserva: {
|
|
21
|
+
trabalho: {
|
|
22
|
+
id: number;
|
|
23
|
+
referencia: string;
|
|
24
|
+
cor_hex: string;
|
|
25
|
+
descricao: string;
|
|
26
|
+
tipo: string;
|
|
27
|
+
}[];
|
|
28
|
+
descanso: {
|
|
29
|
+
id: number;
|
|
30
|
+
atividade_id: number;
|
|
31
|
+
referencia: string;
|
|
32
|
+
cor_hex: string;
|
|
33
|
+
descricao: string;
|
|
34
|
+
tipo: string;
|
|
35
|
+
}[];
|
|
36
|
+
};
|
|
20
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modal-type-activities/mock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;CA6DtB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modal-type-activities/mock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;CA6DtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;CAoC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/modals/modal-change-activitie-history/helpers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,QAAA,MAAM,iBAAiB;;;;GAMtB,CAAC;AAEF;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import type { IModalChangeActivityProps } from "./interface";
|
|
6
|
+
/**
|
|
7
|
+
* Componente Modal para alteração de atividade.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ModalChangeActivity: React.FC<IModalChangeActivityProps>;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modals/modal-change-activitie-history/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAgKnE,CAAC"}
|
package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPROTS
|
|
3
|
+
*/
|
|
4
|
+
interface IModalChangeActivityProps {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
modalConfirm: (newData: {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
key: number;
|
|
11
|
+
}) => void;
|
|
12
|
+
descricao: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* EXPORTS
|
|
16
|
+
*/
|
|
17
|
+
export { type IModalChangeActivityProps };
|
|
18
|
+
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/modals/modal-change-activitie-history/interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,YAAY,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/E,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,OAAO,EAAE,KAAK,yBAAyB,EAAE,CAAC"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
1
|
import React from "react";
|
|
5
2
|
import type { IStepIndicator } from "./interface";
|
|
6
3
|
/**
|
|
7
|
-
* Componente StepIndicator para a interação da
|
|
8
|
-
*/
|
|
9
|
-
declare const StepIndicator: React.FC<IStepIndicator>;
|
|
10
|
-
/**
|
|
11
|
-
* EXPORTS
|
|
4
|
+
* Componente StepIndicator para a interação da ui.
|
|
12
5
|
*/
|
|
13
|
-
|
|
6
|
+
declare const _default: React.ComponentType<IStepIndicator & React.RefAttributes<any>>;
|
|
7
|
+
export default _default;
|
|
14
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/step-indicator/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/step-indicator/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAajF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqPlD;;GAEG;;AACH,wBAA8C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal-type-activities/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAe1C,OAAO,KAAK,EAAE,oBAAoB,EAAa,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal-type-activities/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAe1C,OAAO,KAAK,EAAE,oBAAoB,EAAa,MAAM,aAAa,CAAC;AAuJnE;;GAEG;;AACH,wBAA0C"}
|
|
@@ -15,6 +15,7 @@ interface IModalTypeActivities extends ModalProps, IGlobalCss {
|
|
|
15
15
|
onClose: () => void;
|
|
16
16
|
/** tipo de atividades */
|
|
17
17
|
activityType: IActivity["tipo"];
|
|
18
|
+
driverType?: "normal" | "reserva";
|
|
18
19
|
/** se está carregando */
|
|
19
20
|
isLoading: boolean;
|
|
20
21
|
/** função que seleciona atividade */
|