@nuskin/routine-feature 2.0.0 → 2.0.1

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.
@@ -8,34 +8,35 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _mobileUi = require("@ns/mobile-ui");
10
10
  var _reactNativeLinearGradient = _interopRequireDefault(require("react-native-linear-gradient"));
11
+ var _Accessibility = require("./helpers/Accessibility");
11
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
12
14
  function RoutineDetails(props) {
13
15
  var _props$route, _item$routine_imageCo, _item$routine_imageCo2, _item$routine_imageCo3;
14
16
  const item = (_props$route = props.route) === null || _props$route === void 0 ? void 0 : _props$route.params;
15
17
  return /*#__PURE__*/_react.default.createElement(_reactNative.SafeAreaView, {
16
18
  style: styles.container,
17
19
  testID: "routineStack"
18
- }, /*#__PURE__*/_react.default.createElement(_mobileUi.VeraHeader, {
20
+ }, /*#__PURE__*/_react.default.createElement(_mobileUi.VeraHeader, _extends({
19
21
  left: /*#__PURE__*/_react.default.createElement(_mobileUi.Logo, {
20
22
  accessibilityLabel: "logo"
21
23
  }),
22
24
  right: /*#__PURE__*/_react.default.createElement(_mobileUi.HeaderCart, {
23
25
  accessibilityLabel: "crt-btn"
24
26
  }),
25
- title: 'Routine Details',
26
- accessibilityLabel: "header"
27
- }), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
27
+ title: item.reference
28
+ }, (0, _Accessibility.accessibility)(`vera-header`))), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
28
29
  style: styles.routinesContainer
29
- }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
30
+ }, item && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
30
31
  style: {
31
32
  position: 'relative'
32
33
  }
33
- }, /*#__PURE__*/_react.default.createElement(_reactNative.ImageBackground, {
34
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.ImageBackground, _extends({}, (0, _Accessibility.accessibility)(`image-routine-background`), {
34
35
  source: {
35
36
  uri: (_item$routine_imageCo = item.routine_imageConnection) === null || _item$routine_imageCo === void 0 ? void 0 : (_item$routine_imageCo2 = _item$routine_imageCo.edges[0]) === null || _item$routine_imageCo2 === void 0 ? void 0 : (_item$routine_imageCo3 = _item$routine_imageCo2.node) === null || _item$routine_imageCo3 === void 0 ? void 0 : _item$routine_imageCo3.url
36
37
  },
37
38
  style: styles.itemPhoto
38
- }, /*#__PURE__*/_react.default.createElement(_reactNativeLinearGradient.default, {
39
+ }), /*#__PURE__*/_react.default.createElement(_reactNativeLinearGradient.default, {
39
40
  colors: ['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.6)'],
40
41
  locations: [0.6, 1],
41
42
  style: styles.imageOverlay
@@ -43,7 +44,7 @@ function RoutineDetails(props) {
43
44
  style: styles.itemTitleContainer
44
45
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
45
46
  style: styles.itemTextSpan
46
- }, "Default"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
47
+ }, item.routine_subtitle), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
47
48
  style: styles.itemTextTitle
48
49
  }, item.routine_title)))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
49
50
  style: styles.routineDetailsContainer
@@ -53,13 +54,15 @@ function RoutineDetails(props) {
53
54
  style: styles.itemTextDescription
54
55
  }, item.routines_description), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
55
56
  style: styles.itemText
56
- }, item.products_used_label), item.products.map(item => {
57
+ }, item.products_used_label), item.products.map((item, index) => {
57
58
  var _item$product_imageCo, _item$product_imageCo2, _item$product_imageCo3;
58
59
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
60
+ key: index,
59
61
  style: {
60
62
  flexDirection: 'row'
61
63
  }
62
64
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
65
+ key: index,
63
66
  source: {
64
67
  uri: (_item$product_imageCo = item.product_imageConnection) === null || _item$product_imageCo === void 0 ? void 0 : (_item$product_imageCo2 = _item$product_imageCo.edges[0]) === null || _item$product_imageCo2 === void 0 ? void 0 : (_item$product_imageCo3 = _item$product_imageCo2.node) === null || _item$product_imageCo3 === void 0 ? void 0 : _item$product_imageCo3.url
65
68
  },
@@ -98,7 +101,7 @@ function RoutineDetails(props) {
98
101
  style: styles.stepImagePhoto,
99
102
  resizeMode: "contain"
100
103
  }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
101
- style: styles[`${item.style}TextContainer`]
104
+ style: styles[`${item.style ? `${item.style}TextContainer` : 'TextContainer'}`]
102
105
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
103
106
  style: styles.itemTextStepDescription
104
107
  }, item.step_description), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
@@ -224,7 +227,6 @@ const styles = _reactNative.StyleSheet.create({
224
227
  height: 40,
225
228
  borderRadius: 50,
226
229
  borderColor: '#EDEDED',
227
- borderStyle: 'solid',
228
230
  borderWidth: 1
229
231
  },
230
232
  itemTextStepProduct: {
@@ -1 +1 @@
1
- {"version":3,"names":["RoutineDetails","props","item","route","params","styles","container","routinesContainer","position","uri","routine_imageConnection","edges","node","url","itemPhoto","imageOverlay","itemTitleContainer","itemTextSpan","itemTextTitle","routine_title","routineDetailsContainer","routineDetails","itemTextDescription","routines_description","itemText","products_used_label","products","map","flexDirection","product_imageConnection","productPhoto","productName","itemTextProduct","product_category","product_name","steps","index","marginHorizontal","marginBottom","marginVertical","itemTextTitleIndex","itemTextStepTitle","step_title","style","imageConnection","stepImagePhoto","itemTextStepDescription","step_description","itemTextStepSubDescription","step_sub_description","textLumiSpaTreatmentContainer","textLumiSpaTreatment","image_title","stepProductContainer","stepProductPhoto","itemTextStepProduct","image_description","StyleSheet","create","flex","backgroundColor","colors","white","primaryGray","sectionHeader","textTransform","fontWeight","fontSize","marginTop","paddingHorizontal","left","right","top","height","margin","borderRadius","width","minHeight","aspectRatio","Image","ImageTextContainer","padding","LumiSpaIOTextContainer","Container","Product","LumiSpaIO","justifyContent","marginLeft","paddingTop","paddingBottom","paddingVertical","borderColor","borderStyle","borderWidth","lineHeight","bottom","color","accentB400","paddingRight","primaryBlack","letterSpacing","itemTextSteps","textAlign"],"sources":["RoutineDetails.tsx"],"sourcesContent":["import React from 'react';\nimport {\n SafeAreaView,\n View,\n StyleSheet,\n ScrollView,\n Text,\n Image,\n ImageBackground,\n Pressable,\n} from 'react-native';\nimport { VeraHeader, Logo, HeaderCart, colors } from '@ns/mobile-ui';\nimport LinearGradient from 'react-native-linear-gradient';\n\nfunction RoutineDetails(props) {\n const item = props.route?.params;\n return (\n <SafeAreaView style={styles.container} testID=\"routineStack\">\n <VeraHeader\n left={<Logo accessibilityLabel=\"logo\" />}\n right={<HeaderCart accessibilityLabel=\"crt-btn\" />}\n title={'Routine Details'}\n accessibilityLabel=\"header\"\n />\n <ScrollView style={styles.routinesContainer}>\n <>\n <View style={{ position: 'relative' }}>\n <ImageBackground\n source={{\n uri: item.routine_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.itemPhoto}\n >\n <LinearGradient\n colors={['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.6)']}\n locations={[0.6, 1]}\n style={styles.imageOverlay}\n />\n <View style={styles.itemTitleContainer}>\n <Text style={styles.itemTextSpan}>Default</Text>\n <Text style={styles.itemTextTitle}>{item.routine_title}</Text>\n </View>\n </ImageBackground>\n </View>\n <View style={styles.routineDetailsContainer}>\n <View style={styles.routineDetails}>\n <Text style={styles.itemTextDescription}>\n {item.routines_description}\n </Text>\n <Text style={styles.itemText}>{item.products_used_label}</Text>\n {item.products.map((item) => {\n return (\n <View style={{ flexDirection: 'row' }}>\n <Image\n source={{\n uri: item.product_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.productPhoto}\n resizeMode=\"contain\"\n />\n <View style={styles.productName}>\n <Text style={styles.itemTextProduct}>\n {item.product_category}\n </Text>\n <Text style={styles.itemTextProduct}>\n {item.product_name}\n </Text>\n </View>\n </View>\n );\n })}\n </View>\n </View>\n {item.steps.map((item, index) => {\n return (\n <View\n key={index}\n style={{\n marginHorizontal: 20,\n marginBottom: 15,\n }}\n >\n <View\n style={{\n flexDirection: 'row',\n marginVertical: 10,\n }}\n >\n <Text style={styles.itemTextTitleIndex}>{index + 1}</Text>\n <Text style={styles.itemTextStepTitle}>\n {item.step_title}\n </Text>\n </View>\n <View\n style={styles[`${item.style ? item.style : 'Container'}`]}\n >\n {(item.style === 'Image' || item.style == 'LumiSpaIO') && (\n <Image\n source={{\n uri: item.imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.stepImagePhoto}\n resizeMode=\"contain\"\n />\n )}\n <View style={styles[`${item.style}TextContainer`]}>\n <Text style={styles.itemTextStepDescription}>\n {item.step_description}\n </Text>\n <Text style={styles.itemTextStepSubDescription}>\n {item.step_sub_description}\n </Text>\n {item.style === 'LumiSpaIO' && (\n <Pressable style={styles.textLumiSpaTreatmentContainer}>\n <Text style={styles.textLumiSpaTreatment}>\n {item.image_title}\n </Text>\n </Pressable>\n )}\n </View>\n </View>\n {item.style === 'Product' && (\n <View style={styles.stepProductContainer}>\n <Image\n source={{\n uri: item.imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.stepProductPhoto}\n resizeMode=\"contain\"\n />\n <View style={styles.productName}>\n <Text style={styles.itemTextStepProduct}>\n {item.image_title}\n </Text>\n <Text style={styles.itemTextStepProduct}>\n {item.image_description}\n </Text>\n </View>\n </View>\n )}\n </View>\n );\n })}\n </>\n </ScrollView>\n </SafeAreaView>\n );\n}\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.white,\n },\n routinesContainer: {\n backgroundColor: colors.primaryGray,\n flex: 1,\n },\n sectionHeader: {\n textTransform: 'uppercase',\n fontWeight: '600',\n fontSize: 14,\n // color: '#f4f4f4',\n marginTop: 20,\n paddingHorizontal: 15,\n marginBottom: 5,\n },\n imageOverlay: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n height: '100%',\n },\n item: {\n margin: 10,\n borderRadius: 14,\n },\n itemPhoto: {\n width: '100%',\n minHeight: 160,\n aspectRatio: 1.5,\n },\n Image: {\n flexDirection: 'row',\n flex: 1,\n backgroundColor: colors.white,\n },\n ImageTextContainer: {\n flex: 1,\n padding: 20,\n },\n LumiSpaIOTextContainer: {\n flex: 1,\n padding: 20,\n },\n Container: {\n flexDirection: 'column',\n flex: 1,\n padding: 20,\n backgroundColor: colors.white,\n },\n Product: {\n flexDirection: 'column',\n flex: 1,\n padding: 20,\n backgroundColor: colors.white,\n },\n LumiSpaIO: {\n flexDirection: 'row',\n flex: 1,\n backgroundColor: colors.white,\n },\n productName: {\n flex: 1,\n justifyContent: 'center',\n marginLeft: 5,\n },\n routineDetailsContainer: {\n backgroundColor: 'white',\n paddingTop: 20,\n paddingBottom: 10,\n marginBottom: 10,\n },\n routineDetails: {\n flexDirection: 'column',\n paddingHorizontal: 15,\n paddingVertical: 10,\n },\n stepImagePhoto: {\n width: 130,\n minHeight: 150,\n },\n stepProductPhoto: {\n width: 80,\n height: 80,\n },\n stepProductContainer: {\n flexDirection: 'row',\n backgroundColor: colors.white,\n paddingHorizontal: 20,\n paddingBottom: 20,\n },\n productPhoto: {\n margin: 2,\n width: 40,\n height: 40,\n borderRadius: 50,\n borderColor: '#EDEDED',\n borderStyle: 'solid',\n borderWidth: 1,\n },\n itemTextStepProduct: {\n fontWeight: '400',\n fontSize: 13,\n lineHeight: 18,\n },\n itemTitleContainer: {\n flexDirection: 'column',\n justifyContent: 'space-between',\n paddingHorizontal: 15,\n position: 'absolute',\n bottom: 20,\n },\n itemTextSpan: {\n color: colors.white,\n fontWeight: '400',\n fontSize: 14,\n textTransform: 'uppercase',\n },\n itemTextTitleIndex: {\n color: colors.accentB400,\n fontWeight: '400',\n fontSize: 20,\n lineHeight: 26,\n paddingRight: 10,\n },\n itemTextStepTitle: {\n color: colors.primaryBlack,\n fontWeight: '600',\n fontSize: 18,\n lineHeight: 26,\n },\n itemTextStepSubDescription: {\n fontWeight: '700',\n fontSize: 10,\n lineHeight: 15,\n letterSpacing: 0.5,\n paddingTop: 5,\n textTransform: 'uppercase',\n },\n itemTextTitle: {\n color: colors.white,\n fontWeight: '400',\n fontSize: 26,\n },\n itemTextDescription: {\n color: colors.primaryBlack,\n fontWeight: '400',\n fontSize: 14,\n lineHeight: 20,\n paddingBottom: 20,\n },\n itemText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n textTransform: 'uppercase',\n },\n itemTextStepDescription: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n },\n itemTextProduct: {\n color: colors.primaryBlack,\n fontSize: 11,\n fontWeight: '600',\n textTransform: 'uppercase',\n letterSpacing: 0.05,\n },\n itemTextSteps: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n textLumiSpaTreatmentContainer: {\n marginTop: 10,\n padding: 10,\n textAlign: 'center',\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: colors.primaryBlack,\n },\n textLumiSpaTreatment: {\n textAlign: 'center',\n fontSize: 14,\n fontWeight: '600',\n lineHeight: 16,\n letterSpacing: 0.05,\n },\n});\nexport default RoutineDetails;\n"],"mappings":";;;;;;AAAA;AACA;AAUA;AACA;AAA0D;AAE1D,SAASA,cAAc,CAACC,KAAK,EAAE;EAAA;EAC7B,MAAMC,IAAI,mBAAGD,KAAK,CAACE,KAAK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AAE,KAAK;IACjB4B,UAAU,EAAE,EAAE;IACdM,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAAC,eACYpG,cAAc;AAAA"}
1
+ {"version":3,"names":["RoutineDetails","props","item","route","params","styles","container","reference","accessibility","routinesContainer","position","uri","routine_imageConnection","edges","node","url","itemPhoto","imageOverlay","itemTitleContainer","itemTextSpan","routine_subtitle","itemTextTitle","routine_title","routineDetailsContainer","routineDetails","itemTextDescription","routines_description","itemText","products_used_label","products","map","index","flexDirection","product_imageConnection","productPhoto","productName","itemTextProduct","product_category","product_name","steps","marginHorizontal","marginBottom","marginVertical","itemTextTitleIndex","itemTextStepTitle","step_title","style","imageConnection","stepImagePhoto","itemTextStepDescription","step_description","itemTextStepSubDescription","step_sub_description","textLumiSpaTreatmentContainer","textLumiSpaTreatment","image_title","stepProductContainer","stepProductPhoto","itemTextStepProduct","image_description","StyleSheet","create","flex","backgroundColor","colors","white","primaryGray","sectionHeader","textTransform","fontWeight","fontSize","marginTop","paddingHorizontal","left","right","top","height","margin","borderRadius","width","minHeight","aspectRatio","Image","ImageTextContainer","padding","LumiSpaIOTextContainer","Container","Product","LumiSpaIO","justifyContent","marginLeft","paddingTop","paddingBottom","paddingVertical","borderColor","borderWidth","lineHeight","bottom","color","accentB400","paddingRight","primaryBlack","letterSpacing","itemTextSteps","textAlign","borderStyle"],"sources":["RoutineDetails.tsx"],"sourcesContent":["import React from 'react';\nimport {\n SafeAreaView,\n View,\n StyleSheet,\n ScrollView,\n Text,\n Image,\n ImageBackground,\n Pressable,\n} from 'react-native';\nimport { VeraHeader, Logo, HeaderCart, colors } from '@ns/mobile-ui';\nimport LinearGradient from 'react-native-linear-gradient';\nimport { accessibility } from './helpers/Accessibility';\n\nfunction RoutineDetails(props) {\n const item = props.route?.params;\n return (\n <SafeAreaView style={styles.container} testID=\"routineStack\">\n <VeraHeader\n left={<Logo accessibilityLabel=\"logo\" />}\n right={<HeaderCart accessibilityLabel=\"crt-btn\" />}\n title={item.reference}\n {...accessibility(`vera-header`)}\n />\n <ScrollView style={styles.routinesContainer}>\n {item && (\n <>\n <View style={{ position: 'relative' }}>\n <ImageBackground\n {...accessibility(`image-routine-background`)}\n source={{\n uri: item.routine_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.itemPhoto}\n >\n <LinearGradient\n colors={['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.6)']}\n locations={[0.6, 1]}\n style={styles.imageOverlay}\n />\n <View style={styles.itemTitleContainer}>\n <Text style={styles.itemTextSpan}>\n {item.routine_subtitle}\n </Text>\n <Text style={styles.itemTextTitle}>{item.routine_title}</Text>\n </View>\n </ImageBackground>\n </View>\n <View style={styles.routineDetailsContainer}>\n <View style={styles.routineDetails}>\n <Text style={styles.itemTextDescription}>\n {item.routines_description}\n </Text>\n <Text style={styles.itemText}>{item.products_used_label}</Text>\n {item.products.map((item, index) => {\n return (\n <View key={index} style={{ flexDirection: 'row' }}>\n <Image\n key={index}\n source={{\n uri: item.product_imageConnection?.edges[0]?.node\n ?.url,\n }}\n style={styles.productPhoto}\n resizeMode=\"contain\"\n />\n <View style={styles.productName}>\n <Text style={styles.itemTextProduct}>\n {item.product_category}\n </Text>\n <Text style={styles.itemTextProduct}>\n {item.product_name}\n </Text>\n </View>\n </View>\n );\n })}\n </View>\n </View>\n {item.steps.map((item, index) => {\n return (\n <View\n key={index}\n style={{\n marginHorizontal: 20,\n marginBottom: 15,\n }}\n >\n <View\n style={{\n flexDirection: 'row',\n marginVertical: 10,\n }}\n >\n <Text style={styles.itemTextTitleIndex}>{index + 1}</Text>\n <Text style={styles.itemTextStepTitle}>\n {item.step_title}\n </Text>\n </View>\n <View\n style={styles[`${item.style ? item.style : 'Container'}`]}\n >\n {(item.style === 'Image' || item.style == 'LumiSpaIO') && (\n <Image\n source={{\n uri: item.imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.stepImagePhoto}\n resizeMode=\"contain\"\n />\n )}\n <View\n style={\n styles[\n `${\n item.style\n ? `${item.style}TextContainer`\n : 'TextContainer'\n }`\n ]\n }\n >\n <Text style={styles.itemTextStepDescription}>\n {item.step_description}\n </Text>\n <Text style={styles.itemTextStepSubDescription}>\n {item.step_sub_description}\n </Text>\n {item.style === 'LumiSpaIO' && (\n <Pressable style={styles.textLumiSpaTreatmentContainer}>\n <Text style={styles.textLumiSpaTreatment}>\n {item.image_title}\n </Text>\n </Pressable>\n )}\n </View>\n </View>\n {item.style === 'Product' && (\n <View style={styles.stepProductContainer}>\n <Image\n source={{\n uri: item.imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.stepProductPhoto}\n resizeMode=\"contain\"\n />\n <View style={styles.productName}>\n <Text style={styles.itemTextStepProduct}>\n {item.image_title}\n </Text>\n <Text style={styles.itemTextStepProduct}>\n {item.image_description}\n </Text>\n </View>\n </View>\n )}\n </View>\n );\n })}\n </>\n )}\n </ScrollView>\n </SafeAreaView>\n );\n}\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.white,\n },\n routinesContainer: {\n backgroundColor: colors.primaryGray,\n flex: 1,\n },\n sectionHeader: {\n textTransform: 'uppercase',\n fontWeight: '600',\n fontSize: 14,\n // color: '#f4f4f4',\n marginTop: 20,\n paddingHorizontal: 15,\n marginBottom: 5,\n },\n imageOverlay: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n height: '100%',\n },\n item: {\n margin: 10,\n borderRadius: 14,\n },\n itemPhoto: {\n width: '100%',\n minHeight: 160,\n aspectRatio: 1.5,\n },\n Image: {\n flexDirection: 'row',\n flex: 1,\n backgroundColor: colors.white,\n },\n ImageTextContainer: {\n flex: 1,\n padding: 20,\n },\n LumiSpaIOTextContainer: {\n flex: 1,\n padding: 20,\n },\n Container: {\n flexDirection: 'column',\n flex: 1,\n padding: 20,\n backgroundColor: colors.white,\n },\n Product: {\n flexDirection: 'column',\n flex: 1,\n padding: 20,\n backgroundColor: colors.white,\n },\n LumiSpaIO: {\n flexDirection: 'row',\n flex: 1,\n backgroundColor: colors.white,\n },\n productName: {\n flex: 1,\n justifyContent: 'center',\n marginLeft: 5,\n },\n routineDetailsContainer: {\n backgroundColor: 'white',\n paddingTop: 20,\n paddingBottom: 10,\n marginBottom: 10,\n },\n routineDetails: {\n flexDirection: 'column',\n paddingHorizontal: 15,\n paddingVertical: 10,\n },\n stepImagePhoto: {\n width: 130,\n minHeight: 150,\n },\n stepProductPhoto: {\n width: 80,\n height: 80,\n },\n stepProductContainer: {\n flexDirection: 'row',\n backgroundColor: colors.white,\n paddingHorizontal: 20,\n paddingBottom: 20,\n },\n productPhoto: {\n margin: 2,\n width: 40,\n height: 40,\n borderRadius: 50,\n borderColor: '#EDEDED',\n borderWidth: 1,\n },\n itemTextStepProduct: {\n fontWeight: '400',\n fontSize: 13,\n lineHeight: 18,\n },\n itemTitleContainer: {\n flexDirection: 'column',\n justifyContent: 'space-between',\n paddingHorizontal: 15,\n position: 'absolute',\n bottom: 20,\n },\n itemTextSpan: {\n color: colors.white,\n fontWeight: '400',\n fontSize: 14,\n textTransform: 'uppercase',\n },\n itemTextTitleIndex: {\n color: colors.accentB400,\n fontWeight: '400',\n fontSize: 20,\n lineHeight: 26,\n paddingRight: 10,\n },\n itemTextStepTitle: {\n color: colors.primaryBlack,\n fontWeight: '600',\n fontSize: 18,\n lineHeight: 26,\n },\n itemTextStepSubDescription: {\n fontWeight: '700',\n fontSize: 10,\n lineHeight: 15,\n letterSpacing: 0.5,\n paddingTop: 5,\n textTransform: 'uppercase',\n },\n itemTextTitle: {\n color: colors.white,\n fontWeight: '400',\n fontSize: 26,\n },\n itemTextDescription: {\n color: colors.primaryBlack,\n fontWeight: '400',\n fontSize: 14,\n lineHeight: 20,\n paddingBottom: 20,\n },\n itemText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n textTransform: 'uppercase',\n },\n itemTextStepDescription: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n },\n itemTextProduct: {\n color: colors.primaryBlack,\n fontSize: 11,\n fontWeight: '600',\n textTransform: 'uppercase',\n letterSpacing: 0.05,\n },\n itemTextSteps: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n textLumiSpaTreatmentContainer: {\n marginTop: 10,\n padding: 10,\n textAlign: 'center',\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: colors.primaryBlack,\n },\n textLumiSpaTreatment: {\n textAlign: 'center',\n fontSize: 14,\n fontWeight: '600',\n lineHeight: 16,\n letterSpacing: 0.05,\n },\n});\nexport default RoutineDetails;\n"],"mappings":";;;;;;AAAA;AACA;AAUA;AACA;AACA;AAAwD;AAAA;AAExD,SAASA,cAAc,CAACC,KAAK,EAAE;EAAA;EAC7B,MAAMC,IAAI,mBAAGD,KAAK,CAACE,KAAK,iDAAX,aAAaC,MAAM;EAChC,oBACE,6BAAC,yBAAY;IAAC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAC,MAAM,EAAC;EAAc,gBAC1D,6BAAC,oBAAU;IACT,IAAI,eAAE,6BAAC,cAAI;MAAC,kBAAkB,EAAC;IAAM,EAAI;IACzC,KAAK,eAAE,6BAAC,oBAAU;MAAC,kBAAkB,EAAC;IAAS,EAAI;IACnD,KAAK,EAAEJ,IAAI,CAACK;EAAU,GAClB,IAAAC,4BAAa,EAAE,aAAY,CAAC,EAChC,eACF,6BAAC,uBAAU;IAAC,KAAK,EAAEH,MAAM,CAACI;EAAkB,GACzCP,IAAI,iBACH,yEACE,6BAAC,iBAAI;IAAC,KAAK,EAAE;MAAEQ,QAAQ,EAAE;IAAW;EAAE,gBACpC,6BAAC,4BAAe,eACV,IAAAF,4BAAa,EAAE,0BAAyB,CAAC;IAC7C,MAAM,EAAE;MACNG,GAAG,2BAAET,IAAI,CAACU,uBAAuB,oFAA5B,sBAA8BC,KAAK,CAAC,CAAC,CAAC,qFAAtC,uBAAwCC,IAA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AuB,EAAE;IACvBiD,KAAK,EAAElC,gBAAM,CAACqC,YAAY;IAC1BhC,UAAU,EAAE,MAAM;IAClBC,QAAQ,EAAE,EAAE;IACZgC,aAAa,EAAE,IAAI;IACnBV,aAAa,EAAE;EACjB,CAAC;EACDxD,eAAe,EAAE;IACf8D,KAAK,EAAElC,gBAAM,CAACqC,YAAY;IAC1B/B,QAAQ,EAAE,EAAE;IACZD,UAAU,EAAE,KAAK;IACjBD,aAAa,EAAE,WAAW;IAC1BkC,aAAa,EAAE;EACjB,CAAC;EACDC,aAAa,EAAE;IACbL,KAAK,EAAElC,gBAAM,CAACqC,YAAY;IAC1BhC,UAAU,EAAE,MAAM;IAClBD,aAAa,EAAE;EACjB,CAAC;EACDf,6BAA6B,EAAE;IAC7BkB,SAAS,EAAE,EAAE;IACba,OAAO,EAAE,EAAE;IACXoB,SAAS,EAAE,QAAQ;IACnBC,WAAW,EAAE,OAAO;IACpBV,WAAW,EAAE,CAAC;IACdD,WAAW,EAAE9B,gBAAM,CAACqC;EACtB,CAAC;EACD/C,oBAAoB,EAAE;IACpBkD,SAAS,EAAE,QAAQ;IACnBlC,QAAQ,EAAE,EAAE;IACZD,UAAU,EAAE,KAAK;IACjB2B,UAAU,EAAE,EAAE;IACdM,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAAC,eACYtG,cAAc;AAAA"}
@@ -42,8 +42,10 @@ const FETCH_ROUTINES_PAGE = (0, _client.gql)`
42
42
  }
43
43
  products_used_label
44
44
  routine_title
45
+ routine_subtitle
45
46
  routines_description
46
47
  routine_step_label
48
+ reference
47
49
  routine_imageConnection {
48
50
  edges {
49
51
  node {
@@ -75,7 +77,8 @@ exports.FETCH_ROUTINES_PAGE = FETCH_ROUTINES_PAGE;
75
77
  const ListItem = _ref => {
76
78
  var _item$routine_imageCo, _item$routine_imageCo2, _item$routine_imageCo3;
77
79
  let {
78
- item
80
+ item,
81
+ index
79
82
  } = _ref;
80
83
  const navigation = (0, _native.useNavigation)();
81
84
  const handleOnPress = () => {
@@ -85,18 +88,18 @@ const ListItem = _ref => {
85
88
  style: styles.itemContainer
86
89
  }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
87
90
  onPress: handleOnPress
88
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
91
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Image, _extends({}, (0, _Accessibility.accessibility)(`list-item-${index}`), {
89
92
  source: {
90
93
  uri: (_item$routine_imageCo = item.routine_imageConnection) === null || _item$routine_imageCo === void 0 ? void 0 : (_item$routine_imageCo2 = _item$routine_imageCo.edges[0]) === null || _item$routine_imageCo2 === void 0 ? void 0 : (_item$routine_imageCo3 = _item$routine_imageCo2.node) === null || _item$routine_imageCo3 === void 0 ? void 0 : _item$routine_imageCo3.url
91
94
  },
92
95
  style: styles.itemPhoto
93
- })), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
96
+ }))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
94
97
  style: styles.itemTextContainer
95
98
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
96
99
  style: styles.itemTitleContainer
97
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
100
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, _extends({}, (0, _Accessibility.accessibility)(`list-item-title-${index}`), {
98
101
  style: styles.itemTextTitle
99
- }, item.routine_title), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
102
+ }), item.routine_title), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
100
103
  style: styles.itemTextSteps
101
104
  }, item.steps.length, " ", item.routine_step_label)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
102
105
  style: styles.listContainer
@@ -111,14 +114,15 @@ const ListItem = _ref => {
111
114
  item,
112
115
  index
113
116
  } = _ref2;
114
- return /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
115
- key: index,
117
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Image, _extends({
118
+ key: index
119
+ }, (0, _Accessibility.accessibility)(`list-item-product-${index}`), {
116
120
  source: {
117
121
  uri: (_item$product_imageCo = item.product_imageConnection) === null || _item$product_imageCo === void 0 ? void 0 : (_item$product_imageCo2 = _item$product_imageCo.edges[0]) === null || _item$product_imageCo2 === void 0 ? void 0 : (_item$product_imageCo3 = _item$product_imageCo2.node) === null || _item$product_imageCo3 === void 0 ? void 0 : _item$product_imageCo3.url
118
122
  },
119
123
  style: styles.productPhoto,
120
124
  resizeMode: "contain"
121
- });
125
+ }));
122
126
  },
123
127
  showsHorizontalScrollIndicator: false
124
128
  })))));
@@ -181,6 +185,7 @@ const Routines = () => {
181
185
  index
182
186
  } = _ref3;
183
187
  return /*#__PURE__*/_react.default.createElement(ListItem, {
188
+ index: index,
184
189
  item: item,
185
190
  key: index
186
191
  });
@@ -191,17 +196,17 @@ const Routines = () => {
191
196
  }
192
197
  }))));
193
198
  };
194
- function RoutineStack(_ref4) {
195
- let {
196
- navigation
197
- } = _ref4;
199
+ function RoutineStack() {
200
+ const navigation = (0, _native.useNavigation)();
198
201
  (0, _react.useEffect)(() => {
199
202
  const unsubscribe = navigation.addListener('focus', () => {
200
203
  _mobileLogging.Logger.info('User navigated to the RoutineStack page.');
201
204
  });
202
205
  return unsubscribe;
203
206
  }, [navigation]);
204
- return /*#__PURE__*/_react.default.createElement(Stack.Navigator, null, /*#__PURE__*/_react.default.createElement(Stack.Screen, {
207
+ return /*#__PURE__*/_react.default.createElement(Stack.Navigator, {
208
+ initialRouteName: "Routines"
209
+ }, /*#__PURE__*/_react.default.createElement(Stack.Screen, {
205
210
  name: "Routines",
206
211
  component: Routines,
207
212
  options: {
@@ -262,7 +267,6 @@ const styles = _reactNative.StyleSheet.create({
262
267
  height: 40,
263
268
  borderRadius: 50,
264
269
  borderColor: '#EDEDED',
265
- borderStyle: 'solid',
266
270
  borderWidth: 1
267
271
  },
268
272
  itemTitleContainer: {
@@ -1 +1 @@
1
- {"version":3,"names":["Stack","createStackNavigator","FETCH_ROUTINES_PAGE","gql","ListItem","item","navigation","useNavigation","handleOnPress","navigate","styles","itemContainer","uri","routine_imageConnection","edges","node","url","itemPhoto","itemTextContainer","itemTitleContainer","itemTextTitle","routine_title","itemTextSteps","steps","length","routine_step_label","listContainer","itemText","products_used_label","products","index","product_imageConnection","productPhoto","Routines","localizationStore","useSnapshot","localizationState","refresh","setRefresh","useState","locale","localization","getLocalization","LocalizationFormat","CONTENT_STACK","loading","error","data","refetch","useQuery","variables","useEffect","routinesPageData","result","items","errorCode","graphQLErrors","extensions","errors","code","container","accessibility","title","routinesContainer","sortListText","sort_list_label","routines","paddingHorizontal","RoutineStack","unsubscribe","addListener","Logger","info","headerShown","RoutineDetails","StyleSheet","create","flex","backgroundColor","colors","white","primaryGray","paddingTop","flexDirection","paddingVertical","sectionHeader","textTransform","fontWeight","fontSize","marginTop","marginBottom","margin","borderRadius","paddingBottom","width","minHeight","height","borderColor","borderStyle","borderWidth","justifyContent","color","primaryBlack","letterSpacing","textAlign","marginRight","paddingRight"],"sources":["index.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n FlatList,\n Image,\n SafeAreaView,\n StyleSheet,\n Text,\n TouchableOpacity,\n View,\n ActivityIndicator,\n} from 'react-native';\nimport { gql, useQuery } from '@apollo/client';\nimport { useNavigation } from '@react-navigation/native';\nimport {\n VeraHeader,\n Logo,\n HeaderCart,\n colors,\n ErrorScreen,\n} from '@ns/mobile-ui';\nimport { localization, localizationState } from '@nuskin/utils-module';\nimport { useSnapshot } from 'valtio';\nimport RoutineDetails from './RoutineDetails';\nimport { Logger } from '@nuskin/mobile-logging';\nimport { accessibility } from './helpers/Accessibility';\nimport { createStackNavigator } from '@react-navigation/stack';\n\nconst Stack = createStackNavigator();\nexport const FETCH_ROUTINES_PAGE = gql`\n query fetchAllHomePages($locale: String) {\n result: all_routine(fallback_locale: true, locale: $locale) {\n items {\n products_used_label\n sort_list_label\n title\n routines {\n products {\n product_name\n product_category\n product_imageConnection {\n edges {\n node {\n url\n }\n }\n }\n }\n products_used_label\n routine_title\n routines_description\n routine_step_label\n routine_imageConnection {\n edges {\n node {\n url\n }\n }\n }\n steps {\n imageConnection {\n edges {\n node {\n url\n }\n }\n }\n step_sub_description\n step_title\n step_description\n style\n image_title\n image_description\n }\n }\n }\n }\n }\n`;\n\nconst ListItem = ({ item }) => {\n const navigation = useNavigation();\n const handleOnPress = () => {\n navigation.navigate('RoutineDetails' as never, item as never);\n };\n return (\n <View style={styles.itemContainer}>\n <TouchableOpacity onPress={handleOnPress}>\n <View>\n <Image\n source={{\n uri: item.routine_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.itemPhoto}\n />\n </View>\n <View style={styles.itemTextContainer}>\n <View style={styles.itemTitleContainer}>\n <Text style={styles.itemTextTitle}>{item.routine_title}</Text>\n <Text style={styles.itemTextSteps}>\n {item.steps.length} {item.routine_step_label}\n </Text>\n </View>\n <View style={styles.listContainer}>\n <Text style={styles.itemText}>{item.products_used_label}</Text>\n <FlatList\n data={item.products}\n horizontal\n renderItem={({ item, index }) => (\n <Image\n key={index}\n source={{\n uri: item.product_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.productPhoto}\n resizeMode=\"contain\"\n />\n )}\n showsHorizontalScrollIndicator={false}\n />\n </View>\n </View>\n </TouchableOpacity>\n </View>\n );\n};\n\nconst Routines = () => {\n const localizationStore = useSnapshot(localizationState);\n const [refresh, setRefresh] = useState(false);\n const locale = localization.getLocalization(\n localization.LocalizationFormat.CONTENT_STACK\n );\n\n const { loading, error, data, refetch } = useQuery(FETCH_ROUTINES_PAGE, {\n variables: { locale },\n });\n\n useEffect(() => {\n setRefresh(!refresh);\n }, [localizationStore]);\n\n const routinesPageData = data ? data.result.items[0] : {};\n if (error || !routinesPageData) {\n const errorCode = error?.graphQLErrors[0]?.extensions?.errors[0]?.code;\n\n return (\n <SafeAreaView style={styles.container}>\n <ErrorScreen errorCode={errorCode} refresh={() => refetch()} />\n </SafeAreaView>\n );\n }\n if (loading) {\n return (\n <SafeAreaView\n style={styles.container}\n {...accessibility('routine-container-loading')}\n >\n <ActivityIndicator\n size=\"large\"\n {...accessibility('routine-activity-indicator')}\n />\n </SafeAreaView>\n );\n }\n\n return (\n <SafeAreaView style={styles.container} testID=\"routineStack\">\n <VeraHeader\n left={<Logo accessibilityLabel=\"logo\" />}\n right={<HeaderCart accessibilityLabel=\"crt-btn\" />}\n title={routinesPageData.title}\n {...accessibility('routine-activity-indicator')}\n />\n <View style={styles.routinesContainer}>\n {routinesPageData && (\n <>\n <Text style={styles.sortListText}>\n {routinesPageData.sort_list_label}\n </Text>\n <FlatList\n data={routinesPageData.routines}\n renderItem={({ item, index }) => (\n <ListItem item={item} key={index} />\n )}\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={{ paddingHorizontal: 15 }}\n />\n </>\n )}\n </View>\n </SafeAreaView>\n );\n};\n\nfunction RoutineStack({ navigation }) {\n useEffect(() => {\n const unsubscribe = navigation.addListener('focus', () => {\n Logger.info('User navigated to the RoutineStack page.');\n });\n return unsubscribe;\n }, [navigation]);\n\n return (\n <Stack.Navigator>\n <Stack.Screen\n name=\"Routines\"\n component={Routines}\n options={{ headerShown: false }}\n />\n <Stack.Screen\n name=\"RoutineDetails\"\n component={RoutineDetails}\n options={{ headerShown: false }}\n />\n </Stack.Navigator>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.white,\n },\n routinesContainer: {\n backgroundColor: colors.primaryGray,\n flex: 1,\n paddingTop: 10,\n },\n listContainer: {\n flexDirection: 'column',\n paddingHorizontal: 15,\n paddingVertical: 10,\n },\n sectionHeader: {\n textTransform: 'uppercase',\n fontWeight: '600',\n fontSize: 14,\n marginTop: 20,\n paddingHorizontal: 15,\n marginBottom: 5,\n },\n item: {\n margin: 10,\n borderRadius: 14,\n },\n itemContainer: {\n backgroundColor: 'transparent',\n flex: 1,\n marginBottom: 10,\n },\n itemTextContainer: {\n backgroundColor: colors.white,\n paddingTop: 20,\n paddingBottom: 10,\n },\n itemPhoto: {\n width: '100%',\n minHeight: 160,\n },\n productPhoto: {\n margin: 2,\n width: 40,\n height: 40,\n borderRadius: 50,\n borderColor: '#EDEDED',\n borderStyle: 'solid',\n borderWidth: 1,\n },\n itemTitleContainer: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingHorizontal: 15,\n },\n itemTextTitle: {\n color: colors.primaryBlack,\n fontWeight: '600',\n fontSize: 18,\n },\n itemText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n textTransform: 'uppercase',\n },\n itemTextSteps: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n sortListText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n textAlign: 'right',\n marginRight: 10,\n letterSpacing: 0.5,\n paddingVertical: 10,\n paddingRight: 20,\n },\n});\n\nexport { RoutineStack };\n"],"mappings":";;;;;;;AAAA;AACA;AAUA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AAA+D;AAAA;AAAA;AAAA;AAE/D,MAAMA,KAAK,GAAG,IAAAC,2BAAoB,GAAE;AAC7B,MAAMC,mBAAmB,GAAG,IAAAC,WAAG,CAAC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC;AAEF,MAAMC,QAAQ,GAAG,QAAc;EAAA;EAAA,IAAb;IAAEC;EAAK,CAAC;EACxB,MAAMC,UAAU,GAAG,IAAAC,qBAAa,G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CAAC,CAAC"}
1
+ {"version":3,"names":["Stack","createStackNavigator","FETCH_ROUTINES_PAGE","gql","ListItem","item","index","navigation","useNavigation","handleOnPress","navigate","styles","itemContainer","accessibility","uri","routine_imageConnection","edges","node","url","itemPhoto","itemTextContainer","itemTitleContainer","itemTextTitle","routine_title","itemTextSteps","steps","length","routine_step_label","listContainer","itemText","products_used_label","products","product_imageConnection","productPhoto","Routines","localizationStore","useSnapshot","localizationState","refresh","setRefresh","useState","locale","localization","getLocalization","LocalizationFormat","CONTENT_STACK","loading","error","data","refetch","useQuery","variables","useEffect","routinesPageData","result","items","errorCode","graphQLErrors","extensions","errors","code","container","title","routinesContainer","sortListText","sort_list_label","routines","paddingHorizontal","RoutineStack","unsubscribe","addListener","Logger","info","headerShown","RoutineDetails","StyleSheet","create","flex","backgroundColor","colors","white","primaryGray","paddingTop","flexDirection","paddingVertical","sectionHeader","textTransform","fontWeight","fontSize","marginTop","marginBottom","margin","borderRadius","paddingBottom","width","minHeight","height","borderColor","borderWidth","justifyContent","color","primaryBlack","letterSpacing","textAlign","marginRight","paddingRight"],"sources":["index.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n FlatList,\n Image,\n SafeAreaView,\n StyleSheet,\n Text,\n TouchableOpacity,\n View,\n ActivityIndicator,\n} from 'react-native';\nimport { gql, useQuery } from '@apollo/client';\nimport { useNavigation } from '@react-navigation/native';\nimport {\n VeraHeader,\n Logo,\n HeaderCart,\n colors,\n ErrorScreen,\n} from '@ns/mobile-ui';\nimport { localization, localizationState } from '@nuskin/utils-module';\nimport { useSnapshot } from 'valtio';\nimport RoutineDetails from './RoutineDetails';\nimport { Logger } from '@nuskin/mobile-logging';\nimport { accessibility } from './helpers/Accessibility';\nimport { createStackNavigator } from '@react-navigation/stack';\n\nconst Stack = createStackNavigator();\nexport const FETCH_ROUTINES_PAGE = gql`\n query fetchAllHomePages($locale: String) {\n result: all_routine(fallback_locale: true, locale: $locale) {\n items {\n products_used_label\n sort_list_label\n title\n routines {\n products {\n product_name\n product_category\n product_imageConnection {\n edges {\n node {\n url\n }\n }\n }\n }\n products_used_label\n routine_title\n routine_subtitle\n routines_description\n routine_step_label\n reference\n routine_imageConnection {\n edges {\n node {\n url\n }\n }\n }\n steps {\n imageConnection {\n edges {\n node {\n url\n }\n }\n }\n step_sub_description\n step_title\n step_description\n style\n image_title\n image_description\n }\n }\n }\n }\n }\n`;\n\nconst ListItem = ({ item, index }) => {\n const navigation = useNavigation();\n const handleOnPress = () => {\n navigation.navigate('RoutineDetails' as never, item as never);\n };\n return (\n <View style={styles.itemContainer}>\n <TouchableOpacity onPress={handleOnPress}>\n <View>\n <Image\n {...accessibility(`list-item-${index}`)}\n source={{\n uri: item.routine_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.itemPhoto}\n />\n </View>\n <View style={styles.itemTextContainer}>\n <View style={styles.itemTitleContainer}>\n <Text\n {...accessibility(`list-item-title-${index}`)}\n style={styles.itemTextTitle}\n >\n {item.routine_title}\n </Text>\n <Text style={styles.itemTextSteps}>\n {item.steps.length} {item.routine_step_label}\n </Text>\n </View>\n <View style={styles.listContainer}>\n <Text style={styles.itemText}>{item.products_used_label}</Text>\n <FlatList\n data={item.products}\n horizontal\n renderItem={({ item, index }) => (\n <Image\n key={index}\n {...accessibility(`list-item-product-${index}`)}\n source={{\n uri: item.product_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.productPhoto}\n resizeMode=\"contain\"\n />\n )}\n showsHorizontalScrollIndicator={false}\n />\n </View>\n </View>\n </TouchableOpacity>\n </View>\n );\n};\n\nconst Routines = () => {\n const localizationStore = useSnapshot(localizationState);\n const [refresh, setRefresh] = useState(false);\n const locale = localization.getLocalization(\n localization.LocalizationFormat.CONTENT_STACK\n );\n\n const { loading, error, data, refetch } = useQuery(FETCH_ROUTINES_PAGE, {\n variables: { locale },\n });\n\n useEffect(() => {\n setRefresh(!refresh);\n }, [localizationStore]);\n\n const routinesPageData = data ? data.result.items[0] : {};\n if (error || !routinesPageData) {\n const errorCode = error?.graphQLErrors[0]?.extensions?.errors[0]?.code;\n\n return (\n <SafeAreaView style={styles.container}>\n <ErrorScreen errorCode={errorCode} refresh={() => refetch()} />\n </SafeAreaView>\n );\n }\n if (loading) {\n return (\n <SafeAreaView\n style={styles.container}\n {...accessibility('routine-container-loading')}\n >\n <ActivityIndicator\n size=\"large\"\n {...accessibility('routine-activity-indicator')}\n />\n </SafeAreaView>\n );\n }\n\n return (\n <SafeAreaView style={styles.container} testID=\"routineStack\">\n <VeraHeader\n left={<Logo accessibilityLabel=\"logo\" />}\n right={<HeaderCart accessibilityLabel=\"crt-btn\" />}\n title={routinesPageData.title}\n {...accessibility('routine-activity-indicator')}\n />\n <View style={styles.routinesContainer}>\n {routinesPageData && (\n <>\n <Text style={styles.sortListText}>\n {routinesPageData.sort_list_label}\n </Text>\n <FlatList\n data={routinesPageData.routines}\n renderItem={({ item, index }) => (\n <ListItem index={index} item={item} key={index} />\n )}\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={{ paddingHorizontal: 15 }}\n />\n </>\n )}\n </View>\n </SafeAreaView>\n );\n};\n\nfunction RoutineStack() {\n const navigation = useNavigation();\n useEffect(() => {\n const unsubscribe = navigation.addListener('focus', () => {\n Logger.info('User navigated to the RoutineStack page.');\n });\n return unsubscribe;\n }, [navigation]);\n\n return (\n <Stack.Navigator initialRouteName=\"Routines\">\n <Stack.Screen\n name=\"Routines\"\n component={Routines}\n options={{ headerShown: false }}\n />\n <Stack.Screen\n name=\"RoutineDetails\"\n component={RoutineDetails}\n options={{ headerShown: false }}\n />\n </Stack.Navigator>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.white,\n },\n routinesContainer: {\n backgroundColor: colors.primaryGray,\n flex: 1,\n paddingTop: 10,\n },\n listContainer: {\n flexDirection: 'column',\n paddingHorizontal: 15,\n paddingVertical: 10,\n },\n sectionHeader: {\n textTransform: 'uppercase',\n fontWeight: '600',\n fontSize: 14,\n marginTop: 20,\n paddingHorizontal: 15,\n marginBottom: 5,\n },\n item: {\n margin: 10,\n borderRadius: 14,\n },\n itemContainer: {\n backgroundColor: 'transparent',\n flex: 1,\n marginBottom: 10,\n },\n itemTextContainer: {\n backgroundColor: colors.white,\n paddingTop: 20,\n paddingBottom: 10,\n },\n itemPhoto: {\n width: '100%',\n minHeight: 160,\n },\n productPhoto: {\n margin: 2,\n width: 40,\n height: 40,\n borderRadius: 50,\n borderColor: '#EDEDED',\n borderWidth: 1,\n },\n itemTitleContainer: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingHorizontal: 15,\n },\n itemTextTitle: {\n color: colors.primaryBlack,\n fontWeight: '600',\n fontSize: 18,\n },\n itemText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n textTransform: 'uppercase',\n },\n itemTextSteps: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n sortListText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n textAlign: 'right',\n marginRight: 10,\n letterSpacing: 0.5,\n paddingVertical: 10,\n paddingRight: 20,\n },\n});\n\nexport { RoutineStack };\n"],"mappings":";;;;;;;AAAA;AACA;AAUA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AAA+D;AAAA;AAAA;AAAA;AAE/D,MAAMA,KAAK,GAAG,IAAAC,2BAAoB,GAAE;AAC7B,MAAMC,mBAAmB,GAAG,IAAAC,WAAG,CAAC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAC;AAEF,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;IAC1Bd,UAAU,EAAE,MAAM;IAClBD,aAAa,EAAE;EACjB,CAAC;EACDtB,YAAY,EAAE;IACZoC,KAAK,EAAErB,gBAAM,CAACsB,YAAY;IAC1Bd,UAAU,EAAE,MAAM;IAClBD,aAAa,EAAE,WAAW;IAC1BiB,SAAS,EAAE,OAAO;IAClBC,WAAW,EAAE,EAAE;IACfF,aAAa,EAAE,GAAG;IAClBlB,eAAe,EAAE,EAAE;IACnBqB,YAAY,EAAE;EAChB;AACF,CAAC,CAAC"}
@@ -1,34 +1,35 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import React from 'react';
2
3
  import { SafeAreaView, View, StyleSheet, ScrollView, Text, Image, ImageBackground, Pressable } from 'react-native';
3
4
  import { VeraHeader, Logo, HeaderCart, colors } from '@ns/mobile-ui';
4
5
  import LinearGradient from 'react-native-linear-gradient';
6
+ import { accessibility } from './helpers/Accessibility';
5
7
  function RoutineDetails(props) {
6
8
  var _props$route, _item$routine_imageCo, _item$routine_imageCo2, _item$routine_imageCo3;
7
9
  const item = (_props$route = props.route) === null || _props$route === void 0 ? void 0 : _props$route.params;
8
10
  return /*#__PURE__*/React.createElement(SafeAreaView, {
9
11
  style: styles.container,
10
12
  testID: "routineStack"
11
- }, /*#__PURE__*/React.createElement(VeraHeader, {
13
+ }, /*#__PURE__*/React.createElement(VeraHeader, _extends({
12
14
  left: /*#__PURE__*/React.createElement(Logo, {
13
15
  accessibilityLabel: "logo"
14
16
  }),
15
17
  right: /*#__PURE__*/React.createElement(HeaderCart, {
16
18
  accessibilityLabel: "crt-btn"
17
19
  }),
18
- title: 'Routine Details',
19
- accessibilityLabel: "header"
20
- }), /*#__PURE__*/React.createElement(ScrollView, {
20
+ title: item.reference
21
+ }, accessibility(`vera-header`))), /*#__PURE__*/React.createElement(ScrollView, {
21
22
  style: styles.routinesContainer
22
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
23
+ }, item && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
23
24
  style: {
24
25
  position: 'relative'
25
26
  }
26
- }, /*#__PURE__*/React.createElement(ImageBackground, {
27
+ }, /*#__PURE__*/React.createElement(ImageBackground, _extends({}, accessibility(`image-routine-background`), {
27
28
  source: {
28
29
  uri: (_item$routine_imageCo = item.routine_imageConnection) === null || _item$routine_imageCo === void 0 ? void 0 : (_item$routine_imageCo2 = _item$routine_imageCo.edges[0]) === null || _item$routine_imageCo2 === void 0 ? void 0 : (_item$routine_imageCo3 = _item$routine_imageCo2.node) === null || _item$routine_imageCo3 === void 0 ? void 0 : _item$routine_imageCo3.url
29
30
  },
30
31
  style: styles.itemPhoto
31
- }, /*#__PURE__*/React.createElement(LinearGradient, {
32
+ }), /*#__PURE__*/React.createElement(LinearGradient, {
32
33
  colors: ['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.6)'],
33
34
  locations: [0.6, 1],
34
35
  style: styles.imageOverlay
@@ -36,7 +37,7 @@ function RoutineDetails(props) {
36
37
  style: styles.itemTitleContainer
37
38
  }, /*#__PURE__*/React.createElement(Text, {
38
39
  style: styles.itemTextSpan
39
- }, "Default"), /*#__PURE__*/React.createElement(Text, {
40
+ }, item.routine_subtitle), /*#__PURE__*/React.createElement(Text, {
40
41
  style: styles.itemTextTitle
41
42
  }, item.routine_title)))), /*#__PURE__*/React.createElement(View, {
42
43
  style: styles.routineDetailsContainer
@@ -46,13 +47,15 @@ function RoutineDetails(props) {
46
47
  style: styles.itemTextDescription
47
48
  }, item.routines_description), /*#__PURE__*/React.createElement(Text, {
48
49
  style: styles.itemText
49
- }, item.products_used_label), item.products.map(item => {
50
+ }, item.products_used_label), item.products.map((item, index) => {
50
51
  var _item$product_imageCo, _item$product_imageCo2, _item$product_imageCo3;
51
52
  return /*#__PURE__*/React.createElement(View, {
53
+ key: index,
52
54
  style: {
53
55
  flexDirection: 'row'
54
56
  }
55
57
  }, /*#__PURE__*/React.createElement(Image, {
58
+ key: index,
56
59
  source: {
57
60
  uri: (_item$product_imageCo = item.product_imageConnection) === null || _item$product_imageCo === void 0 ? void 0 : (_item$product_imageCo2 = _item$product_imageCo.edges[0]) === null || _item$product_imageCo2 === void 0 ? void 0 : (_item$product_imageCo3 = _item$product_imageCo2.node) === null || _item$product_imageCo3 === void 0 ? void 0 : _item$product_imageCo3.url
58
61
  },
@@ -91,7 +94,7 @@ function RoutineDetails(props) {
91
94
  style: styles.stepImagePhoto,
92
95
  resizeMode: "contain"
93
96
  }), /*#__PURE__*/React.createElement(View, {
94
- style: styles[`${item.style}TextContainer`]
97
+ style: styles[`${item.style ? `${item.style}TextContainer` : 'TextContainer'}`]
95
98
  }, /*#__PURE__*/React.createElement(Text, {
96
99
  style: styles.itemTextStepDescription
97
100
  }, item.step_description), /*#__PURE__*/React.createElement(Text, {
@@ -217,7 +220,6 @@ const styles = StyleSheet.create({
217
220
  height: 40,
218
221
  borderRadius: 50,
219
222
  borderColor: '#EDEDED',
220
- borderStyle: 'solid',
221
223
  borderWidth: 1
222
224
  },
223
225
  itemTextStepProduct: {
@@ -1 +1 @@
1
- {"version":3,"names":["React","SafeAreaView","View","StyleSheet","ScrollView","Text","Image","ImageBackground","Pressable","VeraHeader","Logo","HeaderCart","colors","LinearGradient","RoutineDetails","props","item","route","params","styles","container","routinesContainer","position","uri","routine_imageConnection","edges","node","url","itemPhoto","imageOverlay","itemTitleContainer","itemTextSpan","itemTextTitle","routine_title","routineDetailsContainer","routineDetails","itemTextDescription","routines_description","itemText","products_used_label","products","map","flexDirection","product_imageConnection","productPhoto","productName","itemTextProduct","product_category","product_name","steps","index","marginHorizontal","marginBottom","marginVertical","itemTextTitleIndex","itemTextStepTitle","step_title","style","imageConnection","stepImagePhoto","itemTextStepDescription","step_description","itemTextStepSubDescription","step_sub_description","textLumiSpaTreatmentContainer","textLumiSpaTreatment","image_title","stepProductContainer","stepProductPhoto","itemTextStepProduct","image_description","create","flex","backgroundColor","white","primaryGray","sectionHeader","textTransform","fontWeight","fontSize","marginTop","paddingHorizontal","left","right","top","height","margin","borderRadius","width","minHeight","aspectRatio","ImageTextContainer","padding","LumiSpaIOTextContainer","Container","Product","LumiSpaIO","justifyContent","marginLeft","paddingTop","paddingBottom","paddingVertical","borderColor","borderStyle","borderWidth","lineHeight","bottom","color","accentB400","paddingRight","primaryBlack","letterSpacing","itemTextSteps","textAlign"],"sources":["RoutineDetails.tsx"],"sourcesContent":["import React from 'react';\nimport {\n SafeAreaView,\n View,\n StyleSheet,\n ScrollView,\n Text,\n Image,\n ImageBackground,\n Pressable,\n} from 'react-native';\nimport { VeraHeader, Logo, HeaderCart, colors } from '@ns/mobile-ui';\nimport LinearGradient from 'react-native-linear-gradient';\n\nfunction RoutineDetails(props) {\n const item = props.route?.params;\n return (\n <SafeAreaView style={styles.container} testID=\"routineStack\">\n <VeraHeader\n left={<Logo accessibilityLabel=\"logo\" />}\n right={<HeaderCart accessibilityLabel=\"crt-btn\" />}\n title={'Routine Details'}\n accessibilityLabel=\"header\"\n />\n <ScrollView style={styles.routinesContainer}>\n <>\n <View style={{ position: 'relative' }}>\n <ImageBackground\n source={{\n uri: item.routine_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.itemPhoto}\n >\n <LinearGradient\n colors={['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.6)']}\n locations={[0.6, 1]}\n style={styles.imageOverlay}\n />\n <View style={styles.itemTitleContainer}>\n <Text style={styles.itemTextSpan}>Default</Text>\n <Text style={styles.itemTextTitle}>{item.routine_title}</Text>\n </View>\n </ImageBackground>\n </View>\n <View style={styles.routineDetailsContainer}>\n <View style={styles.routineDetails}>\n <Text style={styles.itemTextDescription}>\n {item.routines_description}\n </Text>\n <Text style={styles.itemText}>{item.products_used_label}</Text>\n {item.products.map((item) => {\n return (\n <View style={{ flexDirection: 'row' }}>\n <Image\n source={{\n uri: item.product_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.productPhoto}\n resizeMode=\"contain\"\n />\n <View style={styles.productName}>\n <Text style={styles.itemTextProduct}>\n {item.product_category}\n </Text>\n <Text style={styles.itemTextProduct}>\n {item.product_name}\n </Text>\n </View>\n </View>\n );\n })}\n </View>\n </View>\n {item.steps.map((item, index) => {\n return (\n <View\n key={index}\n style={{\n marginHorizontal: 20,\n marginBottom: 15,\n }}\n >\n <View\n style={{\n flexDirection: 'row',\n marginVertical: 10,\n }}\n >\n <Text style={styles.itemTextTitleIndex}>{index + 1}</Text>\n <Text style={styles.itemTextStepTitle}>\n {item.step_title}\n </Text>\n </View>\n <View\n style={styles[`${item.style ? item.style : 'Container'}`]}\n >\n {(item.style === 'Image' || item.style == 'LumiSpaIO') && (\n <Image\n source={{\n uri: item.imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.stepImagePhoto}\n resizeMode=\"contain\"\n />\n )}\n <View style={styles[`${item.style}TextContainer`]}>\n <Text style={styles.itemTextStepDescription}>\n {item.step_description}\n </Text>\n <Text style={styles.itemTextStepSubDescription}>\n {item.step_sub_description}\n </Text>\n {item.style === 'LumiSpaIO' && (\n <Pressable style={styles.textLumiSpaTreatmentContainer}>\n <Text style={styles.textLumiSpaTreatment}>\n {item.image_title}\n </Text>\n </Pressable>\n )}\n </View>\n </View>\n {item.style === 'Product' && (\n <View style={styles.stepProductContainer}>\n <Image\n source={{\n uri: item.imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.stepProductPhoto}\n resizeMode=\"contain\"\n />\n <View style={styles.productName}>\n <Text style={styles.itemTextStepProduct}>\n {item.image_title}\n </Text>\n <Text style={styles.itemTextStepProduct}>\n {item.image_description}\n </Text>\n </View>\n </View>\n )}\n </View>\n );\n })}\n </>\n </ScrollView>\n </SafeAreaView>\n );\n}\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.white,\n },\n routinesContainer: {\n backgroundColor: colors.primaryGray,\n flex: 1,\n },\n sectionHeader: {\n textTransform: 'uppercase',\n fontWeight: '600',\n fontSize: 14,\n // color: '#f4f4f4',\n marginTop: 20,\n paddingHorizontal: 15,\n marginBottom: 5,\n },\n imageOverlay: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n height: '100%',\n },\n item: {\n margin: 10,\n borderRadius: 14,\n },\n itemPhoto: {\n width: '100%',\n minHeight: 160,\n aspectRatio: 1.5,\n },\n Image: {\n flexDirection: 'row',\n flex: 1,\n backgroundColor: colors.white,\n },\n ImageTextContainer: {\n flex: 1,\n padding: 20,\n },\n LumiSpaIOTextContainer: {\n flex: 1,\n padding: 20,\n },\n Container: {\n flexDirection: 'column',\n flex: 1,\n padding: 20,\n backgroundColor: colors.white,\n },\n Product: {\n flexDirection: 'column',\n flex: 1,\n padding: 20,\n backgroundColor: colors.white,\n },\n LumiSpaIO: {\n flexDirection: 'row',\n flex: 1,\n backgroundColor: colors.white,\n },\n productName: {\n flex: 1,\n justifyContent: 'center',\n marginLeft: 5,\n },\n routineDetailsContainer: {\n backgroundColor: 'white',\n paddingTop: 20,\n paddingBottom: 10,\n marginBottom: 10,\n },\n routineDetails: {\n flexDirection: 'column',\n paddingHorizontal: 15,\n paddingVertical: 10,\n },\n stepImagePhoto: {\n width: 130,\n minHeight: 150,\n },\n stepProductPhoto: {\n width: 80,\n height: 80,\n },\n stepProductContainer: {\n flexDirection: 'row',\n backgroundColor: colors.white,\n paddingHorizontal: 20,\n paddingBottom: 20,\n },\n productPhoto: {\n margin: 2,\n width: 40,\n height: 40,\n borderRadius: 50,\n borderColor: '#EDEDED',\n borderStyle: 'solid',\n borderWidth: 1,\n },\n itemTextStepProduct: {\n fontWeight: '400',\n fontSize: 13,\n lineHeight: 18,\n },\n itemTitleContainer: {\n flexDirection: 'column',\n justifyContent: 'space-between',\n paddingHorizontal: 15,\n position: 'absolute',\n bottom: 20,\n },\n itemTextSpan: {\n color: colors.white,\n fontWeight: '400',\n fontSize: 14,\n textTransform: 'uppercase',\n },\n itemTextTitleIndex: {\n color: colors.accentB400,\n fontWeight: '400',\n fontSize: 20,\n lineHeight: 26,\n paddingRight: 10,\n },\n itemTextStepTitle: {\n color: colors.primaryBlack,\n fontWeight: '600',\n fontSize: 18,\n lineHeight: 26,\n },\n itemTextStepSubDescription: {\n fontWeight: '700',\n fontSize: 10,\n lineHeight: 15,\n letterSpacing: 0.5,\n paddingTop: 5,\n textTransform: 'uppercase',\n },\n itemTextTitle: {\n color: colors.white,\n fontWeight: '400',\n fontSize: 26,\n },\n itemTextDescription: {\n color: colors.primaryBlack,\n fontWeight: '400',\n fontSize: 14,\n lineHeight: 20,\n paddingBottom: 20,\n },\n itemText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n textTransform: 'uppercase',\n },\n itemTextStepDescription: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n },\n itemTextProduct: {\n color: colors.primaryBlack,\n fontSize: 11,\n fontWeight: '600',\n textTransform: 'uppercase',\n letterSpacing: 0.05,\n },\n itemTextSteps: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n textLumiSpaTreatmentContainer: {\n marginTop: 10,\n padding: 10,\n textAlign: 'center',\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: colors.primaryBlack,\n },\n textLumiSpaTreatment: {\n textAlign: 'center',\n fontSize: 14,\n fontWeight: '600',\n lineHeight: 16,\n letterSpacing: 0.05,\n },\n});\nexport default RoutineDetails;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,YAAY,EACZC,IAAI,EACJC,UAAU,EACVC,UAAU,EACVC,IAAI,EACJC,KAAK,EACLC,eAAe,EACfC,SAAS,QACJ,cAAc;AACrB,SAASC,UAAU,EAAEC,IAAI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,WAAW,EAAE1F,MAAM,CAACkG;EACtB,CAAC;EACD7C,oBAAoB,EAAE;IACpBgD,SAAS,EAAE,QAAQ;IACnBlC,QAAQ,EAAE,EAAE;IACZD,UAAU,EAAE,KAAK;IACjB2B,UAAU,EAAE,EAAE;IACdM,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AACF,eAAejG,cAAc"}
1
+ {"version":3,"names":["React","SafeAreaView","View","StyleSheet","ScrollView","Text","Image","ImageBackground","Pressable","VeraHeader","Logo","HeaderCart","colors","LinearGradient","accessibility","RoutineDetails","props","item","route","params","styles","container","reference","routinesContainer","position","uri","routine_imageConnection","edges","node","url","itemPhoto","imageOverlay","itemTitleContainer","itemTextSpan","routine_subtitle","itemTextTitle","routine_title","routineDetailsContainer","routineDetails","itemTextDescription","routines_description","itemText","products_used_label","products","map","index","flexDirection","product_imageConnection","productPhoto","productName","itemTextProduct","product_category","product_name","steps","marginHorizontal","marginBottom","marginVertical","itemTextTitleIndex","itemTextStepTitle","step_title","style","imageConnection","stepImagePhoto","itemTextStepDescription","step_description","itemTextStepSubDescription","step_sub_description","textLumiSpaTreatmentContainer","textLumiSpaTreatment","image_title","stepProductContainer","stepProductPhoto","itemTextStepProduct","image_description","create","flex","backgroundColor","white","primaryGray","sectionHeader","textTransform","fontWeight","fontSize","marginTop","paddingHorizontal","left","right","top","height","margin","borderRadius","width","minHeight","aspectRatio","ImageTextContainer","padding","LumiSpaIOTextContainer","Container","Product","LumiSpaIO","justifyContent","marginLeft","paddingTop","paddingBottom","paddingVertical","borderColor","borderWidth","lineHeight","bottom","color","accentB400","paddingRight","primaryBlack","letterSpacing","itemTextSteps","textAlign","borderStyle"],"sources":["RoutineDetails.tsx"],"sourcesContent":["import React from 'react';\nimport {\n SafeAreaView,\n View,\n StyleSheet,\n ScrollView,\n Text,\n Image,\n ImageBackground,\n Pressable,\n} from 'react-native';\nimport { VeraHeader, Logo, HeaderCart, colors } from '@ns/mobile-ui';\nimport LinearGradient from 'react-native-linear-gradient';\nimport { accessibility } from './helpers/Accessibility';\n\nfunction RoutineDetails(props) {\n const item = props.route?.params;\n return (\n <SafeAreaView style={styles.container} testID=\"routineStack\">\n <VeraHeader\n left={<Logo accessibilityLabel=\"logo\" />}\n right={<HeaderCart accessibilityLabel=\"crt-btn\" />}\n title={item.reference}\n {...accessibility(`vera-header`)}\n />\n <ScrollView style={styles.routinesContainer}>\n {item && (\n <>\n <View style={{ position: 'relative' }}>\n <ImageBackground\n {...accessibility(`image-routine-background`)}\n source={{\n uri: item.routine_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.itemPhoto}\n >\n <LinearGradient\n colors={['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.6)']}\n locations={[0.6, 1]}\n style={styles.imageOverlay}\n />\n <View style={styles.itemTitleContainer}>\n <Text style={styles.itemTextSpan}>\n {item.routine_subtitle}\n </Text>\n <Text style={styles.itemTextTitle}>{item.routine_title}</Text>\n </View>\n </ImageBackground>\n </View>\n <View style={styles.routineDetailsContainer}>\n <View style={styles.routineDetails}>\n <Text style={styles.itemTextDescription}>\n {item.routines_description}\n </Text>\n <Text style={styles.itemText}>{item.products_used_label}</Text>\n {item.products.map((item, index) => {\n return (\n <View key={index} style={{ flexDirection: 'row' }}>\n <Image\n key={index}\n source={{\n uri: item.product_imageConnection?.edges[0]?.node\n ?.url,\n }}\n style={styles.productPhoto}\n resizeMode=\"contain\"\n />\n <View style={styles.productName}>\n <Text style={styles.itemTextProduct}>\n {item.product_category}\n </Text>\n <Text style={styles.itemTextProduct}>\n {item.product_name}\n </Text>\n </View>\n </View>\n );\n })}\n </View>\n </View>\n {item.steps.map((item, index) => {\n return (\n <View\n key={index}\n style={{\n marginHorizontal: 20,\n marginBottom: 15,\n }}\n >\n <View\n style={{\n flexDirection: 'row',\n marginVertical: 10,\n }}\n >\n <Text style={styles.itemTextTitleIndex}>{index + 1}</Text>\n <Text style={styles.itemTextStepTitle}>\n {item.step_title}\n </Text>\n </View>\n <View\n style={styles[`${item.style ? item.style : 'Container'}`]}\n >\n {(item.style === 'Image' || item.style == 'LumiSpaIO') && (\n <Image\n source={{\n uri: item.imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.stepImagePhoto}\n resizeMode=\"contain\"\n />\n )}\n <View\n style={\n styles[\n `${\n item.style\n ? `${item.style}TextContainer`\n : 'TextContainer'\n }`\n ]\n }\n >\n <Text style={styles.itemTextStepDescription}>\n {item.step_description}\n </Text>\n <Text style={styles.itemTextStepSubDescription}>\n {item.step_sub_description}\n </Text>\n {item.style === 'LumiSpaIO' && (\n <Pressable style={styles.textLumiSpaTreatmentContainer}>\n <Text style={styles.textLumiSpaTreatment}>\n {item.image_title}\n </Text>\n </Pressable>\n )}\n </View>\n </View>\n {item.style === 'Product' && (\n <View style={styles.stepProductContainer}>\n <Image\n source={{\n uri: item.imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.stepProductPhoto}\n resizeMode=\"contain\"\n />\n <View style={styles.productName}>\n <Text style={styles.itemTextStepProduct}>\n {item.image_title}\n </Text>\n <Text style={styles.itemTextStepProduct}>\n {item.image_description}\n </Text>\n </View>\n </View>\n )}\n </View>\n );\n })}\n </>\n )}\n </ScrollView>\n </SafeAreaView>\n );\n}\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.white,\n },\n routinesContainer: {\n backgroundColor: colors.primaryGray,\n flex: 1,\n },\n sectionHeader: {\n textTransform: 'uppercase',\n fontWeight: '600',\n fontSize: 14,\n // color: '#f4f4f4',\n marginTop: 20,\n paddingHorizontal: 15,\n marginBottom: 5,\n },\n imageOverlay: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n height: '100%',\n },\n item: {\n margin: 10,\n borderRadius: 14,\n },\n itemPhoto: {\n width: '100%',\n minHeight: 160,\n aspectRatio: 1.5,\n },\n Image: {\n flexDirection: 'row',\n flex: 1,\n backgroundColor: colors.white,\n },\n ImageTextContainer: {\n flex: 1,\n padding: 20,\n },\n LumiSpaIOTextContainer: {\n flex: 1,\n padding: 20,\n },\n Container: {\n flexDirection: 'column',\n flex: 1,\n padding: 20,\n backgroundColor: colors.white,\n },\n Product: {\n flexDirection: 'column',\n flex: 1,\n padding: 20,\n backgroundColor: colors.white,\n },\n LumiSpaIO: {\n flexDirection: 'row',\n flex: 1,\n backgroundColor: colors.white,\n },\n productName: {\n flex: 1,\n justifyContent: 'center',\n marginLeft: 5,\n },\n routineDetailsContainer: {\n backgroundColor: 'white',\n paddingTop: 20,\n paddingBottom: 10,\n marginBottom: 10,\n },\n routineDetails: {\n flexDirection: 'column',\n paddingHorizontal: 15,\n paddingVertical: 10,\n },\n stepImagePhoto: {\n width: 130,\n minHeight: 150,\n },\n stepProductPhoto: {\n width: 80,\n height: 80,\n },\n stepProductContainer: {\n flexDirection: 'row',\n backgroundColor: colors.white,\n paddingHorizontal: 20,\n paddingBottom: 20,\n },\n productPhoto: {\n margin: 2,\n width: 40,\n height: 40,\n borderRadius: 50,\n borderColor: '#EDEDED',\n borderWidth: 1,\n },\n itemTextStepProduct: {\n fontWeight: '400',\n fontSize: 13,\n lineHeight: 18,\n },\n itemTitleContainer: {\n flexDirection: 'column',\n justifyContent: 'space-between',\n paddingHorizontal: 15,\n position: 'absolute',\n bottom: 20,\n },\n itemTextSpan: {\n color: colors.white,\n fontWeight: '400',\n fontSize: 14,\n textTransform: 'uppercase',\n },\n itemTextTitleIndex: {\n color: colors.accentB400,\n fontWeight: '400',\n fontSize: 20,\n lineHeight: 26,\n paddingRight: 10,\n },\n itemTextStepTitle: {\n color: colors.primaryBlack,\n fontWeight: '600',\n fontSize: 18,\n lineHeight: 26,\n },\n itemTextStepSubDescription: {\n fontWeight: '700',\n fontSize: 10,\n lineHeight: 15,\n letterSpacing: 0.5,\n paddingTop: 5,\n textTransform: 'uppercase',\n },\n itemTextTitle: {\n color: colors.white,\n fontWeight: '400',\n fontSize: 26,\n },\n itemTextDescription: {\n color: colors.primaryBlack,\n fontWeight: '400',\n fontSize: 14,\n lineHeight: 20,\n paddingBottom: 20,\n },\n itemText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n textTransform: 'uppercase',\n },\n itemTextStepDescription: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n },\n itemTextProduct: {\n color: colors.primaryBlack,\n fontSize: 11,\n fontWeight: '600',\n textTransform: 'uppercase',\n letterSpacing: 0.05,\n },\n itemTextSteps: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n textLumiSpaTreatmentContainer: {\n marginTop: 10,\n padding: 10,\n textAlign: 'center',\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: colors.primaryBlack,\n },\n textLumiSpaTreatment: {\n textAlign: 'center',\n fontSize: 14,\n fontWeight: '600',\n lineHeight: 16,\n letterSpacing: 0.05,\n },\n});\nexport default RoutineDetails;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,YAAY,EACZC,IAAI,EACJC,UAAU,EACVC,UAAU,EACVC,IAAI,EACJC,KAAK,EACLC,eAAe,EACfC,SAAS,QACJ,cAAc;AACrB,SAASC,UAAU,EAAEC,IAAI,EAAEC,UAAU,EAAEC,MAAM,QAAQ,eAAe;AACpE,OAAOC,cAAc,MAAM,8BAA8B;AACzD,SAASC,aAAa,QAAQ,yBAAyB;AAEvD,SAASC,cAAc,CAACC,KAAK,EAAE;EAAA;EAC7B,MAAMC,IAAI,mBAAGD,KAAK,CAACE,KAAK,iDAAX,aAAaC,MAAM;EAChC,oBACE,oBAAC,YAAY;IAAC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAC,MAAM,EAAC;EAAc,gBAC1D,oBAAC,UAAU;IACT,IAAI,eAAE,oBAAC,IAAI;MAAC,kBAAkB,EAAC;IAAM,EAAI;IACzC,KAAK,eAAE,oBAAC,UAAU;MAAC,kBAAkB,EAAC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 export const FETCH_ROUTINES_PAGE = gql`
32
32
  }
33
33
  products_used_label
34
34
  routine_title
35
+ routine_subtitle
35
36
  routines_description
36
37
  routine_step_label
38
+ reference
37
39
  routine_imageConnection {
38
40
  edges {
39
41
  node {
@@ -64,7 +66,8 @@ export const FETCH_ROUTINES_PAGE = gql`
64
66
  const ListItem = _ref => {
65
67
  var _item$routine_imageCo, _item$routine_imageCo2, _item$routine_imageCo3;
66
68
  let {
67
- item
69
+ item,
70
+ index
68
71
  } = _ref;
69
72
  const navigation = useNavigation();
70
73
  const handleOnPress = () => {
@@ -74,18 +77,18 @@ const ListItem = _ref => {
74
77
  style: styles.itemContainer
75
78
  }, /*#__PURE__*/React.createElement(TouchableOpacity, {
76
79
  onPress: handleOnPress
77
- }, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Image, {
80
+ }, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Image, _extends({}, accessibility(`list-item-${index}`), {
78
81
  source: {
79
82
  uri: (_item$routine_imageCo = item.routine_imageConnection) === null || _item$routine_imageCo === void 0 ? void 0 : (_item$routine_imageCo2 = _item$routine_imageCo.edges[0]) === null || _item$routine_imageCo2 === void 0 ? void 0 : (_item$routine_imageCo3 = _item$routine_imageCo2.node) === null || _item$routine_imageCo3 === void 0 ? void 0 : _item$routine_imageCo3.url
80
83
  },
81
84
  style: styles.itemPhoto
82
- })), /*#__PURE__*/React.createElement(View, {
85
+ }))), /*#__PURE__*/React.createElement(View, {
83
86
  style: styles.itemTextContainer
84
87
  }, /*#__PURE__*/React.createElement(View, {
85
88
  style: styles.itemTitleContainer
86
- }, /*#__PURE__*/React.createElement(Text, {
89
+ }, /*#__PURE__*/React.createElement(Text, _extends({}, accessibility(`list-item-title-${index}`), {
87
90
  style: styles.itemTextTitle
88
- }, item.routine_title), /*#__PURE__*/React.createElement(Text, {
91
+ }), item.routine_title), /*#__PURE__*/React.createElement(Text, {
89
92
  style: styles.itemTextSteps
90
93
  }, item.steps.length, " ", item.routine_step_label)), /*#__PURE__*/React.createElement(View, {
91
94
  style: styles.listContainer
@@ -100,14 +103,15 @@ const ListItem = _ref => {
100
103
  item,
101
104
  index
102
105
  } = _ref2;
103
- return /*#__PURE__*/React.createElement(Image, {
104
- key: index,
106
+ return /*#__PURE__*/React.createElement(Image, _extends({
107
+ key: index
108
+ }, accessibility(`list-item-product-${index}`), {
105
109
  source: {
106
110
  uri: (_item$product_imageCo = item.product_imageConnection) === null || _item$product_imageCo === void 0 ? void 0 : (_item$product_imageCo2 = _item$product_imageCo.edges[0]) === null || _item$product_imageCo2 === void 0 ? void 0 : (_item$product_imageCo3 = _item$product_imageCo2.node) === null || _item$product_imageCo3 === void 0 ? void 0 : _item$product_imageCo3.url
107
111
  },
108
112
  style: styles.productPhoto,
109
113
  resizeMode: "contain"
110
- });
114
+ }));
111
115
  },
112
116
  showsHorizontalScrollIndicator: false
113
117
  })))));
@@ -170,6 +174,7 @@ const Routines = () => {
170
174
  index
171
175
  } = _ref3;
172
176
  return /*#__PURE__*/React.createElement(ListItem, {
177
+ index: index,
173
178
  item: item,
174
179
  key: index
175
180
  });
@@ -180,17 +185,17 @@ const Routines = () => {
180
185
  }
181
186
  }))));
182
187
  };
183
- function RoutineStack(_ref4) {
184
- let {
185
- navigation
186
- } = _ref4;
188
+ function RoutineStack() {
189
+ const navigation = useNavigation();
187
190
  useEffect(() => {
188
191
  const unsubscribe = navigation.addListener('focus', () => {
189
192
  Logger.info('User navigated to the RoutineStack page.');
190
193
  });
191
194
  return unsubscribe;
192
195
  }, [navigation]);
193
- return /*#__PURE__*/React.createElement(Stack.Navigator, null, /*#__PURE__*/React.createElement(Stack.Screen, {
196
+ return /*#__PURE__*/React.createElement(Stack.Navigator, {
197
+ initialRouteName: "Routines"
198
+ }, /*#__PURE__*/React.createElement(Stack.Screen, {
194
199
  name: "Routines",
195
200
  component: Routines,
196
201
  options: {
@@ -251,7 +256,6 @@ const styles = StyleSheet.create({
251
256
  height: 40,
252
257
  borderRadius: 50,
253
258
  borderColor: '#EDEDED',
254
- borderStyle: 'solid',
255
259
  borderWidth: 1
256
260
  },
257
261
  itemTitleContainer: {
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useState","FlatList","Image","SafeAreaView","StyleSheet","Text","TouchableOpacity","View","ActivityIndicator","gql","useQuery","useNavigation","VeraHeader","Logo","HeaderCart","colors","ErrorScreen","localization","localizationState","useSnapshot","RoutineDetails","Logger","accessibility","createStackNavigator","Stack","FETCH_ROUTINES_PAGE","ListItem","item","navigation","handleOnPress","navigate","styles","itemContainer","uri","routine_imageConnection","edges","node","url","itemPhoto","itemTextContainer","itemTitleContainer","itemTextTitle","routine_title","itemTextSteps","steps","length","routine_step_label","listContainer","itemText","products_used_label","products","index","product_imageConnection","productPhoto","Routines","localizationStore","refresh","setRefresh","locale","getLocalization","LocalizationFormat","CONTENT_STACK","loading","error","data","refetch","variables","routinesPageData","result","items","errorCode","graphQLErrors","extensions","errors","code","container","title","routinesContainer","sortListText","sort_list_label","routines","paddingHorizontal","RoutineStack","unsubscribe","addListener","info","headerShown","create","flex","backgroundColor","white","primaryGray","paddingTop","flexDirection","paddingVertical","sectionHeader","textTransform","fontWeight","fontSize","marginTop","marginBottom","margin","borderRadius","paddingBottom","width","minHeight","height","borderColor","borderStyle","borderWidth","justifyContent","color","primaryBlack","letterSpacing","textAlign","marginRight","paddingRight"],"sources":["index.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n FlatList,\n Image,\n SafeAreaView,\n StyleSheet,\n Text,\n TouchableOpacity,\n View,\n ActivityIndicator,\n} from 'react-native';\nimport { gql, useQuery } from '@apollo/client';\nimport { useNavigation } from '@react-navigation/native';\nimport {\n VeraHeader,\n Logo,\n HeaderCart,\n colors,\n ErrorScreen,\n} from '@ns/mobile-ui';\nimport { localization, localizationState } from '@nuskin/utils-module';\nimport { useSnapshot } from 'valtio';\nimport RoutineDetails from './RoutineDetails';\nimport { Logger } from '@nuskin/mobile-logging';\nimport { accessibility } from './helpers/Accessibility';\nimport { createStackNavigator } from '@react-navigation/stack';\n\nconst Stack = createStackNavigator();\nexport const FETCH_ROUTINES_PAGE = gql`\n query fetchAllHomePages($locale: String) {\n result: all_routine(fallback_locale: true, locale: $locale) {\n items {\n products_used_label\n sort_list_label\n title\n routines {\n products {\n product_name\n product_category\n product_imageConnection {\n edges {\n node {\n url\n }\n }\n }\n }\n products_used_label\n routine_title\n routines_description\n routine_step_label\n routine_imageConnection {\n edges {\n node {\n url\n }\n }\n }\n steps {\n imageConnection {\n edges {\n node {\n url\n }\n }\n }\n step_sub_description\n step_title\n step_description\n style\n image_title\n image_description\n }\n }\n }\n }\n }\n`;\n\nconst ListItem = ({ item }) => {\n const navigation = useNavigation();\n const handleOnPress = () => {\n navigation.navigate('RoutineDetails' as never, item as never);\n };\n return (\n <View style={styles.itemContainer}>\n <TouchableOpacity onPress={handleOnPress}>\n <View>\n <Image\n source={{\n uri: item.routine_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.itemPhoto}\n />\n </View>\n <View style={styles.itemTextContainer}>\n <View style={styles.itemTitleContainer}>\n <Text style={styles.itemTextTitle}>{item.routine_title}</Text>\n <Text style={styles.itemTextSteps}>\n {item.steps.length} {item.routine_step_label}\n </Text>\n </View>\n <View style={styles.listContainer}>\n <Text style={styles.itemText}>{item.products_used_label}</Text>\n <FlatList\n data={item.products}\n horizontal\n renderItem={({ item, index }) => (\n <Image\n key={index}\n source={{\n uri: item.product_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.productPhoto}\n resizeMode=\"contain\"\n />\n )}\n showsHorizontalScrollIndicator={false}\n />\n </View>\n </View>\n </TouchableOpacity>\n </View>\n );\n};\n\nconst Routines = () => {\n const localizationStore = useSnapshot(localizationState);\n const [refresh, setRefresh] = useState(false);\n const locale = localization.getLocalization(\n localization.LocalizationFormat.CONTENT_STACK\n );\n\n const { loading, error, data, refetch } = useQuery(FETCH_ROUTINES_PAGE, {\n variables: { locale },\n });\n\n useEffect(() => {\n setRefresh(!refresh);\n }, [localizationStore]);\n\n const routinesPageData = data ? data.result.items[0] : {};\n if (error || !routinesPageData) {\n const errorCode = error?.graphQLErrors[0]?.extensions?.errors[0]?.code;\n\n return (\n <SafeAreaView style={styles.container}>\n <ErrorScreen errorCode={errorCode} refresh={() => refetch()} />\n </SafeAreaView>\n );\n }\n if (loading) {\n return (\n <SafeAreaView\n style={styles.container}\n {...accessibility('routine-container-loading')}\n >\n <ActivityIndicator\n size=\"large\"\n {...accessibility('routine-activity-indicator')}\n />\n </SafeAreaView>\n );\n }\n\n return (\n <SafeAreaView style={styles.container} testID=\"routineStack\">\n <VeraHeader\n left={<Logo accessibilityLabel=\"logo\" />}\n right={<HeaderCart accessibilityLabel=\"crt-btn\" />}\n title={routinesPageData.title}\n {...accessibility('routine-activity-indicator')}\n />\n <View style={styles.routinesContainer}>\n {routinesPageData && (\n <>\n <Text style={styles.sortListText}>\n {routinesPageData.sort_list_label}\n </Text>\n <FlatList\n data={routinesPageData.routines}\n renderItem={({ item, index }) => (\n <ListItem item={item} key={index} />\n )}\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={{ paddingHorizontal: 15 }}\n />\n </>\n )}\n </View>\n </SafeAreaView>\n );\n};\n\nfunction RoutineStack({ navigation }) {\n useEffect(() => {\n const unsubscribe = navigation.addListener('focus', () => {\n Logger.info('User navigated to the RoutineStack page.');\n });\n return unsubscribe;\n }, [navigation]);\n\n return (\n <Stack.Navigator>\n <Stack.Screen\n name=\"Routines\"\n component={Routines}\n options={{ headerShown: false }}\n />\n <Stack.Screen\n name=\"RoutineDetails\"\n component={RoutineDetails}\n options={{ headerShown: false }}\n />\n </Stack.Navigator>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.white,\n },\n routinesContainer: {\n backgroundColor: colors.primaryGray,\n flex: 1,\n paddingTop: 10,\n },\n listContainer: {\n flexDirection: 'column',\n paddingHorizontal: 15,\n paddingVertical: 10,\n },\n sectionHeader: {\n textTransform: 'uppercase',\n fontWeight: '600',\n fontSize: 14,\n marginTop: 20,\n paddingHorizontal: 15,\n marginBottom: 5,\n },\n item: {\n margin: 10,\n borderRadius: 14,\n },\n itemContainer: {\n backgroundColor: 'transparent',\n flex: 1,\n marginBottom: 10,\n },\n itemTextContainer: {\n backgroundColor: colors.white,\n paddingTop: 20,\n paddingBottom: 10,\n },\n itemPhoto: {\n width: '100%',\n minHeight: 160,\n },\n productPhoto: {\n margin: 2,\n width: 40,\n height: 40,\n borderRadius: 50,\n borderColor: '#EDEDED',\n borderStyle: 'solid',\n borderWidth: 1,\n },\n itemTitleContainer: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingHorizontal: 15,\n },\n itemTextTitle: {\n color: colors.primaryBlack,\n fontWeight: '600',\n fontSize: 18,\n },\n itemText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n textTransform: 'uppercase',\n },\n itemTextSteps: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n sortListText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n textAlign: 'right',\n marginRight: 10,\n letterSpacing: 0.5,\n paddingVertical: 10,\n paddingRight: 20,\n },\n});\n\nexport { RoutineStack };\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,QAAQ,EACRC,KAAK,EACLC,YAAY,EACZC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,EACJC,iBAAiB,QACZ,cAAc;AACrB,SAASC,GAAG,EAAEC,QAAQ,QAAQ,gBAAgB;AAC9C,SAASC,aAAa,QAAQ,0BAA0B;AACxD,SACEC,UAAU,EACVC,IAAI,EACJC,UAAU,EACVC,MAAM,EACNC,WAAW,QACN,eAAe;AACtB,SAASC,YAAY,EAAEC,iBAAiB,QAAQ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KAAK,EAAEhG,MAAM,CAACiG,YAAY;IAC1Bf,UAAU,EAAE,MAAM;IAClBC,QAAQ,EAAE,EAAE;IACZe,aAAa,EAAE,IAAI;IACnBV,aAAa,EAAE,CAAC;IAChBP,aAAa,EAAE;EACjB,CAAC;EACDrD,aAAa,EAAE;IACboE,KAAK,EAAEhG,MAAM,CAACiG,YAAY;IAC1Bf,UAAU,EAAE,MAAM;IAClBD,aAAa,EAAE;EACjB,CAAC;EACDlB,YAAY,EAAE;IACZiC,KAAK,EAAEhG,MAAM,CAACiG,YAAY;IAC1Bf,UAAU,EAAE,MAAM;IAClBD,aAAa,EAAE,WAAW;IAC1BkB,SAAS,EAAE,OAAO;IAClBC,WAAW,EAAE,EAAE;IACfF,aAAa,EAAE,GAAG;IAClBnB,eAAe,EAAE,EAAE;IACnBsB,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,SAASlC,YAAY"}
1
+ {"version":3,"names":["React","useEffect","useState","FlatList","Image","SafeAreaView","StyleSheet","Text","TouchableOpacity","View","ActivityIndicator","gql","useQuery","useNavigation","VeraHeader","Logo","HeaderCart","colors","ErrorScreen","localization","localizationState","useSnapshot","RoutineDetails","Logger","accessibility","createStackNavigator","Stack","FETCH_ROUTINES_PAGE","ListItem","item","index","navigation","handleOnPress","navigate","styles","itemContainer","uri","routine_imageConnection","edges","node","url","itemPhoto","itemTextContainer","itemTitleContainer","itemTextTitle","routine_title","itemTextSteps","steps","length","routine_step_label","listContainer","itemText","products_used_label","products","product_imageConnection","productPhoto","Routines","localizationStore","refresh","setRefresh","locale","getLocalization","LocalizationFormat","CONTENT_STACK","loading","error","data","refetch","variables","routinesPageData","result","items","errorCode","graphQLErrors","extensions","errors","code","container","title","routinesContainer","sortListText","sort_list_label","routines","paddingHorizontal","RoutineStack","unsubscribe","addListener","info","headerShown","create","flex","backgroundColor","white","primaryGray","paddingTop","flexDirection","paddingVertical","sectionHeader","textTransform","fontWeight","fontSize","marginTop","marginBottom","margin","borderRadius","paddingBottom","width","minHeight","height","borderColor","borderWidth","justifyContent","color","primaryBlack","letterSpacing","textAlign","marginRight","paddingRight"],"sources":["index.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n FlatList,\n Image,\n SafeAreaView,\n StyleSheet,\n Text,\n TouchableOpacity,\n View,\n ActivityIndicator,\n} from 'react-native';\nimport { gql, useQuery } from '@apollo/client';\nimport { useNavigation } from '@react-navigation/native';\nimport {\n VeraHeader,\n Logo,\n HeaderCart,\n colors,\n ErrorScreen,\n} from '@ns/mobile-ui';\nimport { localization, localizationState } from '@nuskin/utils-module';\nimport { useSnapshot } from 'valtio';\nimport RoutineDetails from './RoutineDetails';\nimport { Logger } from '@nuskin/mobile-logging';\nimport { accessibility } from './helpers/Accessibility';\nimport { createStackNavigator } from '@react-navigation/stack';\n\nconst Stack = createStackNavigator();\nexport const FETCH_ROUTINES_PAGE = gql`\n query fetchAllHomePages($locale: String) {\n result: all_routine(fallback_locale: true, locale: $locale) {\n items {\n products_used_label\n sort_list_label\n title\n routines {\n products {\n product_name\n product_category\n product_imageConnection {\n edges {\n node {\n url\n }\n }\n }\n }\n products_used_label\n routine_title\n routine_subtitle\n routines_description\n routine_step_label\n reference\n routine_imageConnection {\n edges {\n node {\n url\n }\n }\n }\n steps {\n imageConnection {\n edges {\n node {\n url\n }\n }\n }\n step_sub_description\n step_title\n step_description\n style\n image_title\n image_description\n }\n }\n }\n }\n }\n`;\n\nconst ListItem = ({ item, index }) => {\n const navigation = useNavigation();\n const handleOnPress = () => {\n navigation.navigate('RoutineDetails' as never, item as never);\n };\n return (\n <View style={styles.itemContainer}>\n <TouchableOpacity onPress={handleOnPress}>\n <View>\n <Image\n {...accessibility(`list-item-${index}`)}\n source={{\n uri: item.routine_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.itemPhoto}\n />\n </View>\n <View style={styles.itemTextContainer}>\n <View style={styles.itemTitleContainer}>\n <Text\n {...accessibility(`list-item-title-${index}`)}\n style={styles.itemTextTitle}\n >\n {item.routine_title}\n </Text>\n <Text style={styles.itemTextSteps}>\n {item.steps.length} {item.routine_step_label}\n </Text>\n </View>\n <View style={styles.listContainer}>\n <Text style={styles.itemText}>{item.products_used_label}</Text>\n <FlatList\n data={item.products}\n horizontal\n renderItem={({ item, index }) => (\n <Image\n key={index}\n {...accessibility(`list-item-product-${index}`)}\n source={{\n uri: item.product_imageConnection?.edges[0]?.node?.url,\n }}\n style={styles.productPhoto}\n resizeMode=\"contain\"\n />\n )}\n showsHorizontalScrollIndicator={false}\n />\n </View>\n </View>\n </TouchableOpacity>\n </View>\n );\n};\n\nconst Routines = () => {\n const localizationStore = useSnapshot(localizationState);\n const [refresh, setRefresh] = useState(false);\n const locale = localization.getLocalization(\n localization.LocalizationFormat.CONTENT_STACK\n );\n\n const { loading, error, data, refetch } = useQuery(FETCH_ROUTINES_PAGE, {\n variables: { locale },\n });\n\n useEffect(() => {\n setRefresh(!refresh);\n }, [localizationStore]);\n\n const routinesPageData = data ? data.result.items[0] : {};\n if (error || !routinesPageData) {\n const errorCode = error?.graphQLErrors[0]?.extensions?.errors[0]?.code;\n\n return (\n <SafeAreaView style={styles.container}>\n <ErrorScreen errorCode={errorCode} refresh={() => refetch()} />\n </SafeAreaView>\n );\n }\n if (loading) {\n return (\n <SafeAreaView\n style={styles.container}\n {...accessibility('routine-container-loading')}\n >\n <ActivityIndicator\n size=\"large\"\n {...accessibility('routine-activity-indicator')}\n />\n </SafeAreaView>\n );\n }\n\n return (\n <SafeAreaView style={styles.container} testID=\"routineStack\">\n <VeraHeader\n left={<Logo accessibilityLabel=\"logo\" />}\n right={<HeaderCart accessibilityLabel=\"crt-btn\" />}\n title={routinesPageData.title}\n {...accessibility('routine-activity-indicator')}\n />\n <View style={styles.routinesContainer}>\n {routinesPageData && (\n <>\n <Text style={styles.sortListText}>\n {routinesPageData.sort_list_label}\n </Text>\n <FlatList\n data={routinesPageData.routines}\n renderItem={({ item, index }) => (\n <ListItem index={index} item={item} key={index} />\n )}\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={{ paddingHorizontal: 15 }}\n />\n </>\n )}\n </View>\n </SafeAreaView>\n );\n};\n\nfunction RoutineStack() {\n const navigation = useNavigation();\n useEffect(() => {\n const unsubscribe = navigation.addListener('focus', () => {\n Logger.info('User navigated to the RoutineStack page.');\n });\n return unsubscribe;\n }, [navigation]);\n\n return (\n <Stack.Navigator initialRouteName=\"Routines\">\n <Stack.Screen\n name=\"Routines\"\n component={Routines}\n options={{ headerShown: false }}\n />\n <Stack.Screen\n name=\"RoutineDetails\"\n component={RoutineDetails}\n options={{ headerShown: false }}\n />\n </Stack.Navigator>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.white,\n },\n routinesContainer: {\n backgroundColor: colors.primaryGray,\n flex: 1,\n paddingTop: 10,\n },\n listContainer: {\n flexDirection: 'column',\n paddingHorizontal: 15,\n paddingVertical: 10,\n },\n sectionHeader: {\n textTransform: 'uppercase',\n fontWeight: '600',\n fontSize: 14,\n marginTop: 20,\n paddingHorizontal: 15,\n marginBottom: 5,\n },\n item: {\n margin: 10,\n borderRadius: 14,\n },\n itemContainer: {\n backgroundColor: 'transparent',\n flex: 1,\n marginBottom: 10,\n },\n itemTextContainer: {\n backgroundColor: colors.white,\n paddingTop: 20,\n paddingBottom: 10,\n },\n itemPhoto: {\n width: '100%',\n minHeight: 160,\n },\n productPhoto: {\n margin: 2,\n width: 40,\n height: 40,\n borderRadius: 50,\n borderColor: '#EDEDED',\n borderWidth: 1,\n },\n itemTitleContainer: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingHorizontal: 15,\n },\n itemTextTitle: {\n color: colors.primaryBlack,\n fontWeight: '600',\n fontSize: 18,\n },\n itemText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n fontSize: 12,\n letterSpacing: 0.05,\n paddingBottom: 5,\n textTransform: 'uppercase',\n },\n itemTextSteps: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n },\n sortListText: {\n color: colors.primaryBlack,\n fontWeight: 'bold',\n textTransform: 'uppercase',\n textAlign: 'right',\n marginRight: 10,\n letterSpacing: 0.5,\n paddingVertical: 10,\n paddingRight: 20,\n },\n});\n\nexport { RoutineStack };\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,QAAQ,EACRC,KAAK,EACLC,YAAY,EACZC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,EACJC,iBAAiB,QACZ,cAAc;AACrB,SAASC,GAAG,EAAEC,QAAQ,QAAQ,gBAAgB;AAC9C,SAASC,aAAa,QAAQ,0BAA0B;AACxD,SACEC,UAAU,EACVC,IAAI,EACJC,UAAU,EACVC,MAAM,EACNC,WAAW,QACN,eAAe;AACtB,SAASC,YAAY,EAAEC,iBAAiB,QAAQ,sBAAsB;AACtE,SAASC,WAAW,QAAQ,QAAQ;AACpC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,oBAAoB,QAAQ,yBAAyB;AAE9D,MAAMC,KAAK,GAAGD,oBAAoB,EAAE;AACpC,OAAO,MAAME,mBAAmB,GAAGhB,GAAI;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMiB,QAAQ,GAAG,QAAqB;EAAA;EAAA,IAApB;IAAEC,IAAI;IAAEC;EAAM,CAAC;EAC/B,MAAMC,UAAU,GAAGlB,aAAa,EAAE;EAClC,MAAMmB,aAAa,GAA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E,GAAG;IAClBlB,eAAe,EAAE,EAAE;IACnBqB,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,SAASjC,YAAY"}
@@ -1,6 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  export declare const FETCH_ROUTINES_PAGE: import("@apollo/client").DocumentNode;
3
- declare function RoutineStack({ navigation }: {
4
- navigation: any;
5
- }): JSX.Element;
3
+ declare function RoutineStack(): JSX.Element;
6
4
  export { RoutineStack };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuskin/routine-feature",
3
3
  "private": false,
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://code.tls.nuskin.io/ns-am/mobile/applications/luna-and-sol/shared2.git",
@@ -36,7 +36,9 @@
36
36
  "@apollo/client": "^3.7.4",
37
37
  "@react-navigation/stack": "^6.2.2",
38
38
  "@ns/mobile-ui": "^1.3.41",
39
- "@nuskin/utils-module": "^1.1.5"
39
+ "@nuskin/utils-module": "^1.1.5",
40
+ "react-native-linear-gradient": "^2.5.6",
41
+ "@nuskin/mobile-logging": "^1.0.3"
40
42
  },
41
43
  "devDependencies": {
42
44
  "react-native-builder-bob": "0.18.3",
@@ -74,6 +76,9 @@
74
76
  "statements": 0
75
77
  }
76
78
  },
79
+ "testMatch": [
80
+ "**/__tests__/**/*.spec.(js|jsx|ts|tsx)"
81
+ ],
77
82
  "reporters": [
78
83
  "default",
79
84
  "jest-junit"
@@ -134,7 +139,7 @@
134
139
  ]
135
140
  ]
136
141
  },
137
- "commithash": "db5cd5e6cc2d8bfd932e072c4ac1c53cecaab4c7",
142
+ "commithash": "bd325d14d7e5e60d8bc1b9eec1ab9af163285abe",
138
143
  "author": {
139
144
  "name": "Camila Urquizo",
140
145
  "email": "curquizo@nuskin.com",
@@ -11,6 +11,7 @@ import {
11
11
  } from 'react-native';
12
12
  import { VeraHeader, Logo, HeaderCart, colors } from '@ns/mobile-ui';
13
13
  import LinearGradient from 'react-native-linear-gradient';
14
+ import { accessibility } from './helpers/Accessibility';
14
15
 
15
16
  function RoutineDetails(props) {
16
17
  const item = props.route?.params;
@@ -19,129 +20,146 @@ function RoutineDetails(props) {
19
20
  <VeraHeader
20
21
  left={<Logo accessibilityLabel="logo" />}
21
22
  right={<HeaderCart accessibilityLabel="crt-btn" />}
22
- title={'Routine Details'}
23
- accessibilityLabel="header"
23
+ title={item.reference}
24
+ {...accessibility(`vera-header`)}
24
25
  />
25
26
  <ScrollView style={styles.routinesContainer}>
26
- <>
27
- <View style={{ position: 'relative' }}>
28
- <ImageBackground
29
- source={{
30
- uri: item.routine_imageConnection?.edges[0]?.node?.url,
31
- }}
32
- style={styles.itemPhoto}
33
- >
34
- <LinearGradient
35
- colors={['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.6)']}
36
- locations={[0.6, 1]}
37
- style={styles.imageOverlay}
38
- />
39
- <View style={styles.itemTitleContainer}>
40
- <Text style={styles.itemTextSpan}>Default</Text>
41
- <Text style={styles.itemTextTitle}>{item.routine_title}</Text>
42
- </View>
43
- </ImageBackground>
44
- </View>
45
- <View style={styles.routineDetailsContainer}>
46
- <View style={styles.routineDetails}>
47
- <Text style={styles.itemTextDescription}>
48
- {item.routines_description}
49
- </Text>
50
- <Text style={styles.itemText}>{item.products_used_label}</Text>
51
- {item.products.map((item) => {
52
- return (
53
- <View style={{ flexDirection: 'row' }}>
54
- <Image
55
- source={{
56
- uri: item.product_imageConnection?.edges[0]?.node?.url,
57
- }}
58
- style={styles.productPhoto}
59
- resizeMode="contain"
60
- />
61
- <View style={styles.productName}>
62
- <Text style={styles.itemTextProduct}>
63
- {item.product_category}
64
- </Text>
65
- <Text style={styles.itemTextProduct}>
66
- {item.product_name}
67
- </Text>
68
- </View>
69
- </View>
70
- );
71
- })}
72
- </View>
73
- </View>
74
- {item.steps.map((item, index) => {
75
- return (
76
- <View
77
- key={index}
78
- style={{
79
- marginHorizontal: 20,
80
- marginBottom: 15,
27
+ {item && (
28
+ <>
29
+ <View style={{ position: 'relative' }}>
30
+ <ImageBackground
31
+ {...accessibility(`image-routine-background`)}
32
+ source={{
33
+ uri: item.routine_imageConnection?.edges[0]?.node?.url,
81
34
  }}
35
+ style={styles.itemPhoto}
82
36
  >
83
- <View
84
- style={{
85
- flexDirection: 'row',
86
- marginVertical: 10,
87
- }}
88
- >
89
- <Text style={styles.itemTextTitleIndex}>{index + 1}</Text>
90
- <Text style={styles.itemTextStepTitle}>
91
- {item.step_title}
37
+ <LinearGradient
38
+ colors={['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.6)']}
39
+ locations={[0.6, 1]}
40
+ style={styles.imageOverlay}
41
+ />
42
+ <View style={styles.itemTitleContainer}>
43
+ <Text style={styles.itemTextSpan}>
44
+ {item.routine_subtitle}
92
45
  </Text>
46
+ <Text style={styles.itemTextTitle}>{item.routine_title}</Text>
93
47
  </View>
48
+ </ImageBackground>
49
+ </View>
50
+ <View style={styles.routineDetailsContainer}>
51
+ <View style={styles.routineDetails}>
52
+ <Text style={styles.itemTextDescription}>
53
+ {item.routines_description}
54
+ </Text>
55
+ <Text style={styles.itemText}>{item.products_used_label}</Text>
56
+ {item.products.map((item, index) => {
57
+ return (
58
+ <View key={index} style={{ flexDirection: 'row' }}>
59
+ <Image
60
+ key={index}
61
+ source={{
62
+ uri: item.product_imageConnection?.edges[0]?.node
63
+ ?.url,
64
+ }}
65
+ style={styles.productPhoto}
66
+ resizeMode="contain"
67
+ />
68
+ <View style={styles.productName}>
69
+ <Text style={styles.itemTextProduct}>
70
+ {item.product_category}
71
+ </Text>
72
+ <Text style={styles.itemTextProduct}>
73
+ {item.product_name}
74
+ </Text>
75
+ </View>
76
+ </View>
77
+ );
78
+ })}
79
+ </View>
80
+ </View>
81
+ {item.steps.map((item, index) => {
82
+ return (
94
83
  <View
95
- style={styles[`${item.style ? item.style : 'Container'}`]}
84
+ key={index}
85
+ style={{
86
+ marginHorizontal: 20,
87
+ marginBottom: 15,
88
+ }}
96
89
  >
97
- {(item.style === 'Image' || item.style == 'LumiSpaIO') && (
98
- <Image
99
- source={{
100
- uri: item.imageConnection?.edges[0]?.node?.url,
101
- }}
102
- style={styles.stepImagePhoto}
103
- resizeMode="contain"
104
- />
105
- )}
106
- <View style={styles[`${item.style}TextContainer`]}>
107
- <Text style={styles.itemTextStepDescription}>
108
- {item.step_description}
90
+ <View
91
+ style={{
92
+ flexDirection: 'row',
93
+ marginVertical: 10,
94
+ }}
95
+ >
96
+ <Text style={styles.itemTextTitleIndex}>{index + 1}</Text>
97
+ <Text style={styles.itemTextStepTitle}>
98
+ {item.step_title}
109
99
  </Text>
110
- <Text style={styles.itemTextStepSubDescription}>
111
- {item.step_sub_description}
112
- </Text>
113
- {item.style === 'LumiSpaIO' && (
114
- <Pressable style={styles.textLumiSpaTreatmentContainer}>
115
- <Text style={styles.textLumiSpaTreatment}>
116
- {item.image_title}
117
- </Text>
118
- </Pressable>
119
- )}
120
100
  </View>
121
- </View>
122
- {item.style === 'Product' && (
123
- <View style={styles.stepProductContainer}>
124
- <Image
125
- source={{
126
- uri: item.imageConnection?.edges[0]?.node?.url,
127
- }}
128
- style={styles.stepProductPhoto}
129
- resizeMode="contain"
130
- />
131
- <View style={styles.productName}>
132
- <Text style={styles.itemTextStepProduct}>
133
- {item.image_title}
101
+ <View
102
+ style={styles[`${item.style ? item.style : 'Container'}`]}
103
+ >
104
+ {(item.style === 'Image' || item.style == 'LumiSpaIO') && (
105
+ <Image
106
+ source={{
107
+ uri: item.imageConnection?.edges[0]?.node?.url,
108
+ }}
109
+ style={styles.stepImagePhoto}
110
+ resizeMode="contain"
111
+ />
112
+ )}
113
+ <View
114
+ style={
115
+ styles[
116
+ `${
117
+ item.style
118
+ ? `${item.style}TextContainer`
119
+ : 'TextContainer'
120
+ }`
121
+ ]
122
+ }
123
+ >
124
+ <Text style={styles.itemTextStepDescription}>
125
+ {item.step_description}
134
126
  </Text>
135
- <Text style={styles.itemTextStepProduct}>
136
- {item.image_description}
127
+ <Text style={styles.itemTextStepSubDescription}>
128
+ {item.step_sub_description}
137
129
  </Text>
130
+ {item.style === 'LumiSpaIO' && (
131
+ <Pressable style={styles.textLumiSpaTreatmentContainer}>
132
+ <Text style={styles.textLumiSpaTreatment}>
133
+ {item.image_title}
134
+ </Text>
135
+ </Pressable>
136
+ )}
138
137
  </View>
139
138
  </View>
140
- )}
141
- </View>
142
- );
143
- })}
144
- </>
139
+ {item.style === 'Product' && (
140
+ <View style={styles.stepProductContainer}>
141
+ <Image
142
+ source={{
143
+ uri: item.imageConnection?.edges[0]?.node?.url,
144
+ }}
145
+ style={styles.stepProductPhoto}
146
+ resizeMode="contain"
147
+ />
148
+ <View style={styles.productName}>
149
+ <Text style={styles.itemTextStepProduct}>
150
+ {item.image_title}
151
+ </Text>
152
+ <Text style={styles.itemTextStepProduct}>
153
+ {item.image_description}
154
+ </Text>
155
+ </View>
156
+ </View>
157
+ )}
158
+ </View>
159
+ );
160
+ })}
161
+ </>
162
+ )}
145
163
  </ScrollView>
146
164
  </SafeAreaView>
147
165
  );
@@ -246,7 +264,6 @@ const styles = StyleSheet.create({
246
264
  height: 40,
247
265
  borderRadius: 50,
248
266
  borderColor: '#EDEDED',
249
- borderStyle: 'solid',
250
267
  borderWidth: 1,
251
268
  },
252
269
  itemTextStepProduct: {
package/src/index.tsx CHANGED
@@ -47,8 +47,10 @@ export const FETCH_ROUTINES_PAGE = gql`
47
47
  }
48
48
  products_used_label
49
49
  routine_title
50
+ routine_subtitle
50
51
  routines_description
51
52
  routine_step_label
53
+ reference
52
54
  routine_imageConnection {
53
55
  edges {
54
56
  node {
@@ -77,7 +79,7 @@ export const FETCH_ROUTINES_PAGE = gql`
77
79
  }
78
80
  `;
79
81
 
80
- const ListItem = ({ item }) => {
82
+ const ListItem = ({ item, index }) => {
81
83
  const navigation = useNavigation();
82
84
  const handleOnPress = () => {
83
85
  navigation.navigate('RoutineDetails' as never, item as never);
@@ -87,6 +89,7 @@ const ListItem = ({ item }) => {
87
89
  <TouchableOpacity onPress={handleOnPress}>
88
90
  <View>
89
91
  <Image
92
+ {...accessibility(`list-item-${index}`)}
90
93
  source={{
91
94
  uri: item.routine_imageConnection?.edges[0]?.node?.url,
92
95
  }}
@@ -95,7 +98,12 @@ const ListItem = ({ item }) => {
95
98
  </View>
96
99
  <View style={styles.itemTextContainer}>
97
100
  <View style={styles.itemTitleContainer}>
98
- <Text style={styles.itemTextTitle}>{item.routine_title}</Text>
101
+ <Text
102
+ {...accessibility(`list-item-title-${index}`)}
103
+ style={styles.itemTextTitle}
104
+ >
105
+ {item.routine_title}
106
+ </Text>
99
107
  <Text style={styles.itemTextSteps}>
100
108
  {item.steps.length} {item.routine_step_label}
101
109
  </Text>
@@ -108,6 +116,7 @@ const ListItem = ({ item }) => {
108
116
  renderItem={({ item, index }) => (
109
117
  <Image
110
118
  key={index}
119
+ {...accessibility(`list-item-product-${index}`)}
111
120
  source={{
112
121
  uri: item.product_imageConnection?.edges[0]?.node?.url,
113
122
  }}
@@ -180,7 +189,7 @@ const Routines = () => {
180
189
  <FlatList
181
190
  data={routinesPageData.routines}
182
191
  renderItem={({ item, index }) => (
183
- <ListItem item={item} key={index} />
192
+ <ListItem index={index} item={item} key={index} />
184
193
  )}
185
194
  showsHorizontalScrollIndicator={false}
186
195
  contentContainerStyle={{ paddingHorizontal: 15 }}
@@ -192,7 +201,8 @@ const Routines = () => {
192
201
  );
193
202
  };
194
203
 
195
- function RoutineStack({ navigation }) {
204
+ function RoutineStack() {
205
+ const navigation = useNavigation();
196
206
  useEffect(() => {
197
207
  const unsubscribe = navigation.addListener('focus', () => {
198
208
  Logger.info('User navigated to the RoutineStack page.');
@@ -201,7 +211,7 @@ function RoutineStack({ navigation }) {
201
211
  }, [navigation]);
202
212
 
203
213
  return (
204
- <Stack.Navigator>
214
+ <Stack.Navigator initialRouteName="Routines">
205
215
  <Stack.Screen
206
216
  name="Routines"
207
217
  component={Routines}
@@ -263,7 +273,6 @@ const styles = StyleSheet.create({
263
273
  height: 40,
264
274
  borderRadius: 50,
265
275
  borderColor: '#EDEDED',
266
- borderStyle: 'solid',
267
276
  borderWidth: 1,
268
277
  },
269
278
  itemTitleContainer: {