react-native-srschat 0.1.57 → 0.1.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/lib/commonjs/components/input.js +5 -2
  2. package/lib/commonjs/components/input.js.map +1 -1
  3. package/lib/commonjs/components/productCard.js +26 -8
  4. package/lib/commonjs/components/productCard.js.map +1 -1
  5. package/lib/commonjs/components/testing.js +8 -35
  6. package/lib/commonjs/components/testing.js.map +1 -1
  7. package/lib/commonjs/contexts/AppContext.js +12 -6
  8. package/lib/commonjs/contexts/AppContext.js.map +1 -1
  9. package/lib/commonjs/layout/window.js +21 -10
  10. package/lib/commonjs/layout/window.js.map +1 -1
  11. package/lib/module/components/input.js +5 -2
  12. package/lib/module/components/input.js.map +1 -1
  13. package/lib/module/components/productCard.js +26 -8
  14. package/lib/module/components/productCard.js.map +1 -1
  15. package/lib/module/components/testing.js +9 -36
  16. package/lib/module/components/testing.js.map +1 -1
  17. package/lib/module/contexts/AppContext.js +12 -6
  18. package/lib/module/contexts/AppContext.js.map +1 -1
  19. package/lib/module/layout/window.js +21 -10
  20. package/lib/module/layout/window.js.map +1 -1
  21. package/lib/typescript/components/testing.d.ts.map +1 -1
  22. package/lib/typescript/contexts/AppContext.d.ts.map +1 -1
  23. package/lib/typescript/layout/window.d.ts.map +1 -1
  24. package/package.json +1 -1
  25. package/src/components/input.js +4 -2
  26. package/src/components/productCard.js +19 -4
  27. package/src/components/testing.js +14 -45
  28. package/src/contexts/AppContext.js +13 -3
  29. package/src/layout/window.js +14 -4
  30. package/lib/commonjs/components/testProductCard.js +0 -60
  31. package/lib/commonjs/components/testProductCard.js.map +0 -1
  32. package/lib/module/components/testProductCard.js +0 -52
  33. package/lib/module/components/testProductCard.js.map +0 -1
  34. package/lib/typescript/components/testProductCard.d.ts +0 -3
  35. package/lib/typescript/components/testProductCard.d.ts.map +0 -1
  36. package/src/components/testProductCard.js +0 -55
@@ -352,11 +352,11 @@ export const ProductCard = ({ prod, onFocusQuantityInput, messageId }) => {
352
352
  <View style={styles.priceContainer}>
353
353
  {isOnSale ? (
354
354
  <>
355
- <Text style={styles.originalPrice}>${Number(grossPrice).toFixed(2)}</Text>
356
- <Text style={styles.salePrice}>${Number(netPrice).toFixed(2)}</Text>
355
+ <Text style={styles.originalPrice} allowFontScaling={false}>${Number(grossPrice).toFixed(2)}</Text>
356
+ <Text style={styles.salePrice} allowFontScaling={false}>${Number(netPrice).toFixed(2)}</Text>
357
357
  </>
358
358
  ) : (
359
- <Text style={styles.price}>${Number(grossPrice).toFixed(2)}</Text>
359
+ <Text style={styles.price} allowFontScaling={false}>${Number(grossPrice).toFixed(2)}</Text>
360
360
  )}
361
361
  <Text style={styles.perUnit}> / {selectedUom}</Text>
362
362
  </View>
@@ -520,24 +520,39 @@ const styles = StyleSheet.create({
520
520
  price: {
521
521
  fontSize: 14,
522
522
  fontWeight: "bold",
523
+ color: "#161616",
523
524
  textAlign: "center",
525
+ textBreakStrategy: "simple",
526
+ alignSelf: "stretch",
527
+ lineHeight: 20,
528
+ includeFontPadding: false,
529
+ textAlignVertical: 'center',
524
530
  },
525
531
  priceContainer: {
526
532
  flexDirection: "row",
527
533
  alignItems: "center",
528
- flexWrap: "wrap",
534
+ flexWrap: "nowrap",
529
535
  justifyContent: "center",
536
+ paddingHorizontal: 2,
530
537
  },
531
538
  originalPrice: {
532
539
  fontSize: 14,
533
540
  textDecorationLine: "line-through",
534
541
  color: "gray",
535
542
  marginRight: 5,
543
+ textBreakStrategy: "simple",
544
+ lineHeight: 20,
545
+ includeFontPadding: false,
546
+ textAlignVertical: 'center',
536
547
  },
537
548
  salePrice: {
538
549
  fontSize: 16,
539
550
  fontWeight: "bold",
540
551
  color: "red",
552
+ textBreakStrategy: "simple",
553
+ lineHeight: 22,
554
+ includeFontPadding: false,
555
+ textAlignVertical: 'center',
541
556
  },
542
557
  perUnit: {
543
558
  fontSize: 12,
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { View, Button, StyleSheet, TouchableOpacity, Text, ScrollView } from 'react-native';
3
- import { ProductCard } from './productCard';
2
+ import { View, Button, StyleSheet, TouchableOpacity, Text } from 'react-native';
4
3
 
5
4
  export const Testing = ({ onProductCardClick, onAddToCartClick }) => {
6
5
 
@@ -15,8 +14,7 @@ export const Testing = ({ onProductCardClick, onAddToCartClick }) => {
15
14
  "net_price": 7.83,
16
15
  "is_on_sale": false,
17
16
  "quantity_available": 0,
18
- "discounts": null,
19
- "min_pack_qty": 1.5
17
+ "discounts": null
20
18
  }
21
19
  }
22
20
  },
@@ -30,52 +28,25 @@ export const Testing = ({ onProductCardClick, onAddToCartClick }) => {
30
28
  }
31
29
 
32
30
  return (
33
- <ScrollView style={styles.container}>
34
- <Text style={styles.title}>Test Product Card</Text>
35
-
36
- {/* Display the actual product card */}
37
- <View style={styles.productCardContainer}>
38
- <ProductCard
39
- prod={product}
40
- onFocusQuantityInput={(partNumber) => console.log('Focus on:', partNumber)}
41
- messageId="test-message-123"
42
- />
43
- </View>
44
-
45
- {/* Test buttons */}
46
- <View style={styles.buttonContainer}>
47
- <TouchableOpacity style={styles.button} onPress={() => onProductCardClick(product)}>
48
- <Text style={styles.buttonText}>Product Card Click</Text>
49
- </TouchableOpacity>
50
- <TouchableOpacity style={styles.button} onPress={() => onAddToCartClick({"quantity":1,"product":product})}>
51
- <Text style={styles.buttonText}>Add to Cart</Text>
52
- </TouchableOpacity>
53
- </View>
54
- </ScrollView>
31
+ <View style={styles.container}>
32
+ <TouchableOpacity style={styles.button} onPress={() => onProductCardClick(product)}>
33
+ <Text style={styles.buttonText}>Product Card Click</Text>
34
+ </TouchableOpacity>
35
+ <TouchableOpacity style={styles.button} onPress={() => onAddToCartClick({"quantity":1,"product":product})}>
36
+ <Text style={styles.buttonText}>Add to Cart</Text>
37
+ </TouchableOpacity>
38
+ </View>
55
39
  );
56
40
  };
57
41
 
58
42
  const styles = StyleSheet.create({
59
43
  container: {
60
- backgroundColor: '#f6f6f6',
61
- borderTopWidth: 1,
62
- borderTopColor: '#DDD',
63
- },
64
- title: {
65
- fontSize: 18,
66
- fontWeight: 'bold',
67
- textAlign: 'center',
68
- padding: 16,
69
- },
70
- productCardContainer: {
71
- paddingHorizontal: 16,
72
- },
73
- buttonContainer: {
74
44
  flexDirection: 'row',
75
45
  alignItems: 'center',
76
46
  justifyContent: 'space-evenly',
77
47
  paddingHorizontal: 16,
78
- paddingVertical: 20,
48
+ borderTopWidth: 1,
49
+ borderTopColor: '#DDD',
79
50
  },
80
51
  button: {
81
52
  backgroundColor: "#d4d4d4",
@@ -83,9 +54,7 @@ const styles = StyleSheet.create({
83
54
  paddingHorizontal: 12,
84
55
  borderRadius: 5,
85
56
  alignItems: "center",
86
- },
87
- buttonText: {
88
- fontSize: 14,
89
- fontWeight: 'bold',
57
+ marginBottom: 10,
58
+ marginTop: 10,
90
59
  },
91
60
  });
@@ -150,16 +150,26 @@ export const AppProvider = ({ data, onProductCardClick, onAddToCartClick, uiConf
150
150
  { type: "ai", text: "The chat is currently unavailable, please come back later!",},]);
151
151
  return;
152
152
  }
153
- if (input.trim() !== "") {
153
+
154
+ // Ensure input is a string and not empty
155
+ const userInput = typeof input === 'string' ? input.trim() : String(input || '').trim();
156
+
157
+ if (userInput !== "") {
154
158
  if (messages.length <= 1) {
155
159
  const startTime = new Date().toISOString();
156
160
  setConversationStartTime(startTime);
157
161
  }
158
162
 
163
+ // Create user message object with immutable text
164
+ const userMessage = {
165
+ type: "user",
166
+ text: userInput
167
+ };
168
+
159
169
  // Initiate streaming
160
170
  setShowModal("ChatWindow");
161
- setLastUserMessage(input);
162
- setMessages([...messages, { type: "user", text: input }]);
171
+ setLastUserMessage(userInput);
172
+ setMessages([...messages, userMessage]);
163
173
  setTypingIndicator(true);
164
174
  setGhostMessage(true);
165
175
  setStartStreaming(true);
@@ -104,11 +104,13 @@ export const ChatWindow = ({ panHandlers }) => {
104
104
  >
105
105
  {messages.map((msg, i) => (
106
106
 
107
- <View key={i} style={styles.messageWrapper}>
107
+ <View key={msg.id || msg.message_id || i} style={styles.messageWrapper}>
108
108
  {msg.type !== "middle" && (
109
109
  <View style={[ styles.messageBubble, msg.type === "user" ? styles.userMessage : styles.aiMessage,]}>
110
- <Markdown style={{ body: { color: msg.type === "user" ? "#ffffff" : "#161616",fontSize: 16, lineHeight: 22 }}}>
110
+
111
+ <Markdown style={{ body: { color: msg.type === "user" ? "#ffffff" : "#161616",fontSize: 16, lineHeight: 22, includeFontPadding: false, textAlignVertical: 'center' }}}>
111
112
  {typeof msg.text === 'string' ? msg.text : String(msg.text || '')}
113
+
112
114
  </Markdown>
113
115
  {(msg.type == 'ai' && i != 0 && msg.message_id ) &&
114
116
  <Feedback message={msg} messageId={msg.message_id}/>
@@ -118,10 +120,14 @@ export const ChatWindow = ({ panHandlers }) => {
118
120
 
119
121
  {msg.type == "middle" && (
120
122
  <View style={[styles.middleMessageBubble, styles.middleMessage]}>
121
- <Ionicons name="sparkles-outline" size={16} style={{marginRight: 10, marginTop: 10}}/>
123
+ <Text style={{marginRight: 10, marginTop: 10}} allowFontScaling={false}>
124
+ <Ionicons name="sparkles-outline" size={16} color="#161616"/>
125
+ </Text>
122
126
  <View style={styles.middleMessageText}>
123
- <Markdown style={{ body: { color: msg.type === "user" ? "#ffffff" : "#161616",fontSize: 16, lineHeight: 22 }}}>
127
+
128
+ <Markdown style={{ body: { color: msg.type === "user" ? "#ffffff" : "#161616",fontSize: 16, lineHeight: 22, includeFontPadding: false, textAlignVertical: 'center' }}}>
124
129
  {typeof msg.text === 'string' ? msg.text : String(msg.text || '')}
130
+
125
131
  </Markdown>
126
132
  </View>
127
133
  </View>
@@ -238,6 +244,8 @@ const styles = StyleSheet.create({
238
244
  color: "#004687",
239
245
  fontSize: 13,
240
246
  textAlign: "left",
247
+ includeFontPadding: false,
248
+ textAlignVertical: "center",
241
249
  },
242
250
  ghostMessageContainer: {
243
251
  alignSelf: 'flex-start',
@@ -297,6 +305,8 @@ const styles = StyleSheet.create({
297
305
  color: 'white',
298
306
  fontSize: 16,
299
307
  marginRight: 8,
308
+ includeFontPadding: false,
309
+ textAlignVertical: "center",
300
310
  },
301
311
  middleMessageBubble:{
302
312
  padding: 6,
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.TestProductCard = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- var _productCard = require("./productCard");
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- const mockProduct = {
12
- "part_number": "AEQO177",
13
- "inventory_info": {
14
- "default_uom": "EA",
15
- "is_valid": true,
16
- "info_by_uom": {
17
- "EA": {
18
- "gross_price": 7.83,
19
- "net_price": 7.83,
20
- "is_on_sale": false,
21
- "quantity_available": 0,
22
- "discounts": null,
23
- "min_pack_qty": 1.5
24
- }
25
- }
26
- },
27
- "product_details": {
28
- "product_name": "Aladdin Hayward SPX1600S SuperPump Lid Gasket | O-177-2",
29
- "part_number": "AEQO177",
30
- "manufacturer_id": "O-177-2",
31
- "heritage_link": "https://www.heritagepoolplus.com/aeqo177-aladdin-o-ring-o-177-o-177-2-o-177-2",
32
- "image_url": "https://media.heritageplus.com/image/upload/v1668157956/image/AEQO177_0.jpg"
33
- }
34
- };
35
- const TestProductCard = () => {
36
- return /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
37
- style: styles.container
38
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
39
- style: styles.title
40
- }, "Test Product Card"), /*#__PURE__*/_react.default.createElement(_productCard.ProductCard, {
41
- prod: mockProduct,
42
- onFocusQuantityInput: partNumber => console.log('Focus on:', partNumber),
43
- messageId: "test-message-123"
44
- }));
45
- };
46
- exports.TestProductCard = TestProductCard;
47
- const styles = _reactNative.StyleSheet.create({
48
- container: {
49
- flex: 1,
50
- backgroundColor: '#f6f6f6',
51
- padding: 16
52
- },
53
- title: {
54
- fontSize: 18,
55
- fontWeight: 'bold',
56
- marginBottom: 16,
57
- textAlign: 'center'
58
- }
59
- });
60
- //# sourceMappingURL=testProductCard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_productCard","e","__esModule","default","mockProduct","TestProductCard","createElement","ScrollView","style","styles","container","Text","title","ProductCard","prod","onFocusQuantityInput","partNumber","console","log","messageId","exports","StyleSheet","create","flex","backgroundColor","padding","fontSize","fontWeight","marginBottom","textAlign"],"sourceRoot":"../../../src","sources":["components/testProductCard.js"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAA4C,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5C,MAAMG,WAAW,GAAG;EAClB,aAAa,EAAE,SAAS;EACxB,gBAAgB,EAAE;IAChB,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE;MACb,IAAI,EAAE;QACJ,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,IAAI;QACjB,YAAY,EAAE,KAAK;QACnB,oBAAoB,EAAE,CAAC;QACvB,WAAW,EAAE,IAAI;QACjB,cAAc,EAAE;MAClB;IACF;EACF,CAAC;EACD,iBAAiB,EAAE;IACjB,cAAc,EAAE,yDAAyD;IACzE,aAAa,EAAE,SAAS;IACxB,iBAAiB,EAAE,SAAS;IAC5B,eAAe,EAAE,+EAA+E;IAChG,WAAW,EAAE;EACf;AACF,CAAC;AAEM,MAAMC,eAAe,GAAGA,CAAA,KAAM;EACnC,oBACET,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACP,YAAA,CAAAQ,UAAU;IAACC,KAAK,EAAEC,MAAM,CAACC;EAAU,gBAClCd,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACP,YAAA,CAAAY,IAAI;IAACH,KAAK,EAAEC,MAAM,CAACG;EAAM,GAAC,mBAAuB,CAAC,eACnDhB,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACN,YAAA,CAAAa,WAAW;IACVC,IAAI,EAAEV,WAAY;IAClBW,oBAAoB,EAAGC,UAAU,IAAKC,OAAO,CAACC,GAAG,CAAC,WAAW,EAAEF,UAAU,CAAE;IAC3EG,SAAS,EAAC;EAAkB,CAC7B,CACS,CAAC;AAEjB,CAAC;AAACC,OAAA,CAAAf,eAAA,GAAAA,eAAA;AAEF,MAAMI,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC/BZ,SAAS,EAAE;IACTa,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE,SAAS;IAC1BC,OAAO,EAAE;EACX,CAAC;EACDb,KAAK,EAAE;IACLc,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,52 +0,0 @@
1
- import React from 'react';
2
- import { View, ScrollView, StyleSheet, Text } from 'react-native';
3
- import { ProductCard } from './productCard';
4
- const mockProduct = {
5
- "part_number": "AEQO177",
6
- "inventory_info": {
7
- "default_uom": "EA",
8
- "is_valid": true,
9
- "info_by_uom": {
10
- "EA": {
11
- "gross_price": 7.83,
12
- "net_price": 7.83,
13
- "is_on_sale": false,
14
- "quantity_available": 0,
15
- "discounts": null,
16
- "min_pack_qty": 1.5
17
- }
18
- }
19
- },
20
- "product_details": {
21
- "product_name": "Aladdin Hayward SPX1600S SuperPump Lid Gasket | O-177-2",
22
- "part_number": "AEQO177",
23
- "manufacturer_id": "O-177-2",
24
- "heritage_link": "https://www.heritagepoolplus.com/aeqo177-aladdin-o-ring-o-177-o-177-2-o-177-2",
25
- "image_url": "https://media.heritageplus.com/image/upload/v1668157956/image/AEQO177_0.jpg"
26
- }
27
- };
28
- export const TestProductCard = () => {
29
- return /*#__PURE__*/React.createElement(ScrollView, {
30
- style: styles.container
31
- }, /*#__PURE__*/React.createElement(Text, {
32
- style: styles.title
33
- }, "Test Product Card"), /*#__PURE__*/React.createElement(ProductCard, {
34
- prod: mockProduct,
35
- onFocusQuantityInput: partNumber => console.log('Focus on:', partNumber),
36
- messageId: "test-message-123"
37
- }));
38
- };
39
- const styles = StyleSheet.create({
40
- container: {
41
- flex: 1,
42
- backgroundColor: '#f6f6f6',
43
- padding: 16
44
- },
45
- title: {
46
- fontSize: 18,
47
- fontWeight: 'bold',
48
- marginBottom: 16,
49
- textAlign: 'center'
50
- }
51
- });
52
- //# sourceMappingURL=testProductCard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","View","ScrollView","StyleSheet","Text","ProductCard","mockProduct","TestProductCard","createElement","style","styles","container","title","prod","onFocusQuantityInput","partNumber","console","log","messageId","create","flex","backgroundColor","padding","fontSize","fontWeight","marginBottom","textAlign"],"sourceRoot":"../../../src","sources":["components/testProductCard.js"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACjE,SAASC,WAAW,QAAQ,eAAe;AAE3C,MAAMC,WAAW,GAAG;EAClB,aAAa,EAAE,SAAS;EACxB,gBAAgB,EAAE;IAChB,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE;MACb,IAAI,EAAE;QACJ,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,IAAI;QACjB,YAAY,EAAE,KAAK;QACnB,oBAAoB,EAAE,CAAC;QACvB,WAAW,EAAE,IAAI;QACjB,cAAc,EAAE;MAClB;IACF;EACF,CAAC;EACD,iBAAiB,EAAE;IACjB,cAAc,EAAE,yDAAyD;IACzE,aAAa,EAAE,SAAS;IACxB,iBAAiB,EAAE,SAAS;IAC5B,eAAe,EAAE,+EAA+E;IAChG,WAAW,EAAE;EACf;AACF,CAAC;AAED,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAAM;EACnC,oBACEP,KAAA,CAAAQ,aAAA,CAACN,UAAU;IAACO,KAAK,EAAEC,MAAM,CAACC;EAAU,gBAClCX,KAAA,CAAAQ,aAAA,CAACJ,IAAI;IAACK,KAAK,EAAEC,MAAM,CAACE;EAAM,GAAC,mBAAuB,CAAC,eACnDZ,KAAA,CAAAQ,aAAA,CAACH,WAAW;IACVQ,IAAI,EAAEP,WAAY;IAClBQ,oBAAoB,EAAGC,UAAU,IAAKC,OAAO,CAACC,GAAG,CAAC,WAAW,EAAEF,UAAU,CAAE;IAC3EG,SAAS,EAAC;EAAkB,CAC7B,CACS,CAAC;AAEjB,CAAC;AAED,MAAMR,MAAM,GAAGP,UAAU,CAACgB,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE,SAAS;IAC1BC,OAAO,EAAE;EACX,CAAC;EACDV,KAAK,EAAE;IACLW,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- export function TestProductCard(): React.JSX.Element;
2
- import React from 'react';
3
- //# sourceMappingURL=testProductCard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testProductCard.d.ts","sourceRoot":"","sources":["../../../src/components/testProductCard.js"],"names":[],"mappings":"AA6BO,qDAWN;kBAxCiB,OAAO"}
@@ -1,55 +0,0 @@
1
- import React from 'react';
2
- import { View, ScrollView, StyleSheet, Text } from 'react-native';
3
- import { ProductCard } from './productCard';
4
-
5
- const mockProduct = {
6
- "part_number": "AEQO177",
7
- "inventory_info": {
8
- "default_uom": "EA",
9
- "is_valid": true,
10
- "info_by_uom": {
11
- "EA": {
12
- "gross_price": 7.83,
13
- "net_price": 7.83,
14
- "is_on_sale": false,
15
- "quantity_available": 0,
16
- "discounts": null,
17
- "min_pack_qty": 1.5
18
- }
19
- }
20
- },
21
- "product_details": {
22
- "product_name": "Aladdin Hayward SPX1600S SuperPump Lid Gasket | O-177-2",
23
- "part_number": "AEQO177",
24
- "manufacturer_id": "O-177-2",
25
- "heritage_link": "https://www.heritagepoolplus.com/aeqo177-aladdin-o-ring-o-177-o-177-2-o-177-2",
26
- "image_url": "https://media.heritageplus.com/image/upload/v1668157956/image/AEQO177_0.jpg"
27
- }
28
- };
29
-
30
- export const TestProductCard = () => {
31
- return (
32
- <ScrollView style={styles.container}>
33
- <Text style={styles.title}>Test Product Card</Text>
34
- <ProductCard
35
- prod={mockProduct}
36
- onFocusQuantityInput={(partNumber) => console.log('Focus on:', partNumber)}
37
- messageId="test-message-123"
38
- />
39
- </ScrollView>
40
- );
41
- };
42
-
43
- const styles = StyleSheet.create({
44
- container: {
45
- flex: 1,
46
- backgroundColor: '#f6f6f6',
47
- padding: 16,
48
- },
49
- title: {
50
- fontSize: 18,
51
- fontWeight: 'bold',
52
- marginBottom: 16,
53
- textAlign: 'center',
54
- },
55
- });