@wavemaker/app-rn-runtime 11.11.5-rc.214 → 11.11.6-rc.216

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 (87) hide show
  1. package/components/basic/label/label.component.js +32 -1
  2. package/components/basic/label/label.component.js.map +1 -1
  3. package/components/basic/label/label.props.js +1 -0
  4. package/components/basic/label/label.props.js.map +1 -1
  5. package/components/basic/label/label.styles.js +17 -0
  6. package/components/basic/label/label.styles.js.map +1 -1
  7. package/components/basic/search/search.component.js +2 -1
  8. package/components/basic/search/search.component.js.map +1 -1
  9. package/components/basic/search/search.styles.js +18 -0
  10. package/components/basic/search/search.styles.js.map +1 -1
  11. package/components/data/form/form-field/form-field.styles.js +12 -0
  12. package/components/data/form/form-field/form-field.styles.js.map +1 -1
  13. package/components/data/form/form.component.js +1 -1
  14. package/components/data/form/form.component.js.map +1 -1
  15. package/components/data/form/form.props.js +1 -0
  16. package/components/data/form/form.props.js.map +1 -1
  17. package/components/dialogs/dialog/dialog.component.js +6 -2
  18. package/components/dialogs/dialog/dialog.component.js.map +1 -1
  19. package/components/dialogs/dialog/dialog.styles.js +0 -1
  20. package/components/dialogs/dialog/dialog.styles.js.map +1 -1
  21. package/components/input/basedataset/basedataset.component.js +2 -3
  22. package/components/input/basedataset/basedataset.component.js.map +1 -1
  23. package/components/input/basedataset/basedataset.props.js +1 -0
  24. package/components/input/basedataset/basedataset.props.js.map +1 -1
  25. package/components/input/baseinput/baseinput.component.js +7 -3
  26. package/components/input/baseinput/baseinput.component.js.map +1 -1
  27. package/components/input/baseinput/baseinput.props.js +1 -0
  28. package/components/input/baseinput/baseinput.props.js.map +1 -1
  29. package/components/input/basenumber/basenumber.component.js +10 -3
  30. package/components/input/basenumber/basenumber.component.js.map +1 -1
  31. package/components/input/basenumber/basenumber.props.js +1 -0
  32. package/components/input/basenumber/basenumber.props.js.map +1 -1
  33. package/components/input/checkbox/checkbox.styles.js +12 -1
  34. package/components/input/checkbox/checkbox.styles.js.map +1 -1
  35. package/components/input/checkboxset/checkboxset.styles.js +11 -1
  36. package/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  37. package/components/input/chips/chips.styles.js +11 -0
  38. package/components/input/chips/chips.styles.js.map +1 -1
  39. package/components/input/currency/currency.styles.js +11 -0
  40. package/components/input/currency/currency.styles.js.map +1 -1
  41. package/components/input/epoch/base-datetime.component.js +1 -2
  42. package/components/input/epoch/base-datetime.component.js.map +1 -1
  43. package/components/input/epoch/date/date.styles.js +11 -0
  44. package/components/input/epoch/date/date.styles.js.map +1 -1
  45. package/components/input/epoch/datetime/datetime.styles.js +31 -0
  46. package/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  47. package/components/input/epoch/time/time.styles.js +11 -0
  48. package/components/input/epoch/time/time.styles.js.map +1 -1
  49. package/components/input/number/number.styles.js +11 -0
  50. package/components/input/number/number.styles.js.map +1 -1
  51. package/components/input/radioset/radioset.styles.js +13 -1
  52. package/components/input/radioset/radioset.styles.js.map +1 -1
  53. package/components/input/rating/rating.styles.js +12 -0
  54. package/components/input/rating/rating.styles.js.map +1 -1
  55. package/components/input/select/select.component.js +4 -4
  56. package/components/input/select/select.component.js.map +1 -1
  57. package/components/input/select/select.styles.js +26 -0
  58. package/components/input/select/select.styles.js.map +1 -1
  59. package/components/input/slider/slider.component.js.map +1 -1
  60. package/components/input/slider/slider.styles.js +12 -0
  61. package/components/input/slider/slider.styles.js.map +1 -1
  62. package/components/input/switch/switch.styles.js +12 -0
  63. package/components/input/switch/switch.styles.js.map +1 -1
  64. package/components/input/text/text.styles.js +20 -0
  65. package/components/input/text/text.styles.js.map +1 -1
  66. package/components/input/textarea/textarea.styles.js +11 -0
  67. package/components/input/textarea/textarea.styles.js.map +1 -1
  68. package/components/input/toggle/toggle.styles.js +8 -0
  69. package/components/input/toggle/toggle.styles.js.map +1 -1
  70. package/components/page/page-content/page-content.styles.js.map +1 -1
  71. package/core/components/error-fallback.component.js +264 -0
  72. package/core/components/error-fallback.component.js.map +1 -0
  73. package/core/error-boundary.component.js +48 -0
  74. package/core/error-boundary.component.js.map +1 -0
  75. package/core/navigation.service.js +65 -0
  76. package/core/navigation.service.js.map +1 -1
  77. package/core/utils.js +0 -1
  78. package/core/utils.js.map +1 -1
  79. package/npm-shrinkwrap.json +257 -271
  80. package/package-lock.json +257 -271
  81. package/package.json +4 -3
  82. package/runtime/App.js +5 -2
  83. package/runtime/App.js.map +1 -1
  84. package/runtime/App.navigator.js +3 -0
  85. package/runtime/App.navigator.js.map +1 -1
  86. package/runtime/navigator/stack.navigator.js +3 -2
  87. package/runtime/navigator/stack.navigator.js.map +1 -1
@@ -39,6 +39,26 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
39
39
  }
40
40
  });
41
41
  addStyle(DEFAULT_CLASS, '', defaultStyles);
42
+
43
+ // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles
44
+ addStyle('form-text-input-horizontal', '', {
45
+ root: {
46
+ flex: 1,
47
+ minWidth: 0,
48
+ maxWidth: '100%'
49
+ },
50
+ text: {}
51
+ });
52
+
53
+ // Password widgets use the text component but have their own widget type
54
+ addStyle('form-password-input-horizontal', '', {
55
+ root: {
56
+ flex: 1,
57
+ minWidth: 0,
58
+ maxWidth: '100%'
59
+ },
60
+ text: {}
61
+ });
42
62
  addStyle(DEFAULT_CLASS + '-disabled', '', {
43
63
  root: {
44
64
  backgroundColor: themeVariables.inputDisabledBgColor
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","paddingLeft","paddingRight","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","width","height","inputDisabledBgColor","textAlign","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["text.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle, Theme} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {ColorValue} from \"react-native\";\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTextStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-text';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextStyles = defineStyles({\n root: {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n paddingLeft: 16,\n paddingRight: 16,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont\n },\n text: {\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48,\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n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ACiC;IAClC;EACJ,CAAC,CAAC;EACFhC,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCK,IAAI,EAAC;MACH+B,SAAS,EAAE;IACb;EACJ,CAAC,CAAC;EACFjC,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDwB,aAAa,EAAE;MACbO,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRlB,QAAQ,EAAE,EAAE;MACZO,KAAK,EAAE1B,cAAc,CAACsC;IACxB,CAAC;IACDT,mBAAmB,EAAE;MACnBH,KAAK,EAAE1B,cAAc,CAACuC;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","paddingLeft","paddingRight","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","width","height","flex","minWidth","maxWidth","inputDisabledBgColor","textAlign","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["text.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle, Theme} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {ColorValue} from \"react-native\";\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTextStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-text';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextStyles = defineStyles({\n root: {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n paddingLeft: 16,\n paddingRight: 16,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont\n },\n text: {\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n \n // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles\n addStyle('form-text-input-horizontal', '', {\n root: {\n flex: 1, \n minWidth: 0, \n maxWidth: '100%',\n },\n text: {\n }\n } as BaseStyles);\n \n // Password widgets use the text component but have their own widget type\n addStyle('form-password-input-horizontal', '', {\n root: {\n flex: 1, \n minWidth: 0, \n maxWidth: '100%',\n },\n text: {}\n } as BaseStyles);\n \n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48,\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAyB,wCAAwC;AAClF,SAAqBC,Y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,CAAC,gCAAgC,EAAE,EAAE,EAAE;IAC7CE,IAAI,EAAE;MACJ8B,IAAI,EAAE,CAAC;MACPC,QAAQ,EAAE,CAAC;MACXC,QAAQ,EAAE;IACZ,CAAC;IACDjB,IAAI,EAAE,CAAC;EACT,CAAe,CAAC;EAEhBjB,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLU,eAAe,EAAEb,cAAc,CAACoC;IAClC;EACJ,CAAC,CAAC;EACFnC,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCK,IAAI,EAAC;MACHkC,SAAS,EAAE;IACb;EACJ,CAAC,CAAC;EACFpC,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDwB,aAAa,EAAE;MACbU,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRrB,QAAQ,EAAE,EAAE;MACZO,KAAK,EAAE1B,cAAc,CAACyC;IACxB,CAAC;IACDZ,mBAAmB,EAAE;MACnBH,KAAK,EAAE1B,cAAc,CAAC0C;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -44,6 +44,17 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
44
44
  }
45
45
  });
46
46
  addStyle(DEFAULT_CLASS, '', defaultStyles);
47
+
48
+ // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles
49
+ addStyle('form-textarea-input-horizontal', '', {
50
+ root: {
51
+ flex: 1,
52
+ minWidth: 0,
53
+ // Allow shrinking below intrinsic content size if needed
54
+ maxWidth: '100%' // Prevent overflow
55
+ },
56
+ text: {}
57
+ });
47
58
  addStyle(DEFAULT_CLASS + '-disabled', '', {
48
59
  root: {
49
60
  backgroundColor: themeVariables.inputDisabledBgColor
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","ThemeVariables","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","minHeight","text","fontSize","textAlignVertical","floatingLabel","activeFloatingLabel","invalid","borderBottomColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","helpText","marginTop","textAlign","INSTANCE","textAreaHelpTextColor","inputDisabledBgColor","paddingTop","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["textarea.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport type WmTextareaStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n helpText:AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-textarea';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextareaStyles = defineStyles({\n root: {\n padding:12,\n borderWidth:1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont,\n minHeight: 160,\n },\n text: {\n fontSize: 16,\n textAlignVertical: 'top'\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n invalid: {\n borderBottomColor: 'red'\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 84,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles,\n helpText:{\n marginTop:5,\n textAlign:'right',\n fontSize: 13,\n color: ThemeVariables.INSTANCE.textAreaHelpTextColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n })\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n text:{\n paddingTop: 24\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,OAAOC,cAAc,MAAM,kDAAkD;AAY7E,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGN,YAAY,CAAC;IACjDO,IAAI,EAAE;MACJC,OAAO,EAAC,EAAE;MACVC,WAAW,EAAC,CAAC;MACbC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEZ,cAAc,CAACa,QAAQ;MACnCC,SAAS,EAAE;IACb,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,iBAAiB,EAAE;IACrB,CAAC;IACDC,aAAa,EAAE,CAAC,CAAC;IACjBC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,OAAO,EAAE;MACPC,iBAAiB,EAAE;IACrB,CAAC;IACDC,OAAO,EAAG;MACRf,WAAW,EAAEP,cAAc,CAACuB;IAC9B,CAAC;IACDC,eAAe,EAAE;MACfC,KAAK,EAAEzB,cAAc,CAAC0B;IACxB,CAAC;IACDC,QAAQ,EAAE;MACRxB,IAAI,EAAE;QACJyB,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVlB,YAAY,EAAE;MAChB;IACF,CAA4B;IAC5BmB,QAAQ,EAAC;MACPC,SAAS,EAAC,CAAC;MACXC,SAAS,EAAC,OAAO;MACjBhB,QAAQ,EAAE,EAAE;MACZS,KAAK,EAAE5B,cAAc,CAACoC,QAAQ,CAACC;IACjC;EACJ,CAAC,CAAC;EAEFjC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAACmC;IAClC;EACJ,CAAC,CAAC;EACFlC,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAC;MACH6B,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EACF/B,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CiB,IAAI,EAAC;MACHqB,UAAU,EAAE;IACd,CAAC;IACDlB,aAAa,EAAE;MACbmB,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRvB,QAAQ,EAAE,EAAE;MACZS,KAAK,EAAEzB,cAAc,CAACwC;IACxB,CAAC;IACDrB,mBAAmB,EAAE;MACnBM,KAAK,EAAEzB,cAAc,CAACyC;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","ThemeVariables","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","minHeight","text","fontSize","textAlignVertical","floatingLabel","activeFloatingLabel","invalid","borderBottomColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","helpText","marginTop","textAlign","INSTANCE","textAreaHelpTextColor","flex","minWidth","maxWidth","inputDisabledBgColor","paddingTop","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["textarea.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport type WmTextareaStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n helpText:AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-textarea';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextareaStyles = defineStyles({\n root: {\n padding:12,\n borderWidth:1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont,\n minHeight: 160,\n },\n text: {\n fontSize: 16,\n textAlignVertical: 'top'\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n invalid: {\n borderBottomColor: 'red'\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 84,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles,\n helpText:{\n marginTop:5,\n textAlign:'right',\n fontSize: 13,\n color: ThemeVariables.INSTANCE.textAreaHelpTextColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n \n // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles\n addStyle('form-textarea-input-horizontal', '', {\n root: {\n flex: 1,\n minWidth: 0, // Allow shrinking below intrinsic content size if needed\n maxWidth: '100%', // Prevent overflow\n },\n text: {}\n } as BaseStyles);\n \n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n })\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n text:{\n paddingTop: 24\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,OAAOC,cAAc,MAAM,kDAAkD;AAY7E,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGN,YAAY,CAAC;IACjDO,IAAI,EAAE;MACJC,OAAO,EAAC,EAAE;MACVC,WAAW,EAAC,CAAC;MACbC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEZ,cAAc,CAACa,QAAQ;MACnCC,SAAS,EAAE;IACb,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,iBAAiB,EAAE;IACrB,CAAC;IACDC,aAAa,EAAE,CAAC,CAAC;IACjBC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,OAAO,EAAE;MACPC,iBAAiB,EAAE;IACrB,CAAC;IACDC,OAAO,EAAG;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BM,KAAK,EAAEzB,cAAc,CAAC4C;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -29,6 +29,14 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
29
29
  }
30
30
  });
31
31
  addStyle(DEFAULT_CLASS, '', defaultStyles);
32
+
33
+ // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles
34
+ addStyle('form-toggle-input-horizontal', '', {
35
+ root: {
36
+ minWidth: 0
37
+ },
38
+ text: {}
39
+ });
32
40
  addStyle(DEFAULT_CLASS + '-on', '', {
33
41
  root: {
34
42
  backgroundColor: themeVariables.toggleOnColor
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","height","flexDirection","alignItems","borderRadius","text","handle","marginLeft","marginRight","backgroundSize","backgroundPosition","skeleton","backgroundColor","toggleOnColor","toggleHandleColor","toggleOffColor","borderColor","toggleOffBorderColor","borderWidth","toggleHandleDisableColor"],"sources":["toggle.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ViewStyle } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmToggleStyles = BaseStyles & {\n handle: ViewStyle,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-toggle';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmToggleStyles = defineStyles({\n root: {\n width: 52,\n height: 32,\n flexDirection: 'row',\n alignItems: 'center',\n borderRadius: 18\n },\n text: {},\n handle: {\n width: 16,\n height: 16,\n borderRadius: 18,\n marginLeft : 8,\n marginRight: 0,\n backgroundSize: '100% 100%',\n backgroundPosition: 'center'\n },\n skeleton: {\n root: {\n width: 52,\n height: 32,\n borderRadius: 18,\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-on', '', {\n root : {\n backgroundColor: themeVariables.toggleOnColor,\n },\n handle: {\n backgroundColor: themeVariables.toggleHandleColor,\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-off', '', {\n root : {\n backgroundColor: themeVariables.toggleOffColor,\n borderColor: themeVariables.toggleOffBorderColor,\n borderWidth: 2\n },\n handle: {\n backgroundColor: themeVariables.toggleHandleDisableColor,\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {}\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AASxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE;MACJC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,MAAM,EAAE;MACNN,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVG,YAAY,EAAE,EAAE;MAChBG,UAAU,EAAG,CAAC;MACdC,WAAW,EAAE,CAAC;MACdC,cAAc,EAAE,WAAW;MAC3BC,kBAAkB,EAAE;IACtB,CAAC;IACDC,QAAQ,EAAE;MACRZ,IAAI,EAAE;QACJC,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVG,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFP,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,KAAK,EAAE,EAAE,EAAE;IAClCK,IAAI,EAAG;MACLa,eAAe,EAAEhB,cAAc,CAACiB;IAClC,CAAC;IACDP,MAAM,EAAE;MACNM,eAAe,EAAEhB,cAAc,CAACkB;IAClC;EACF,CAAmB,CAAC;EACpBjB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAG;MACLa,eAAe,EAAEhB,cAAc,CAACmB,cAAc;MAC9CC,WAAW,EAAEpB,cAAc,CAACqB,oBAAoB;MAChDC,WAAW,EAAE;IACf,CAAC;IACDZ,MAAM,EAAE;MACNM,eAAe,EAAEhB,cAAc,CAACuB;IAClC;EACF,CAAmB,CAAC;EACpBtB,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;EACxCG,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG,CAAC;EACZ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","width","height","flexDirection","alignItems","borderRadius","text","handle","marginLeft","marginRight","backgroundSize","backgroundPosition","skeleton","minWidth","backgroundColor","toggleOnColor","toggleHandleColor","toggleOffColor","borderColor","toggleOffBorderColor","borderWidth","toggleHandleDisableColor"],"sources":["toggle.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ViewStyle } from 'react-native';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmToggleStyles = BaseStyles & {\n handle: ViewStyle,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-toggle';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmToggleStyles = defineStyles({\n root: {\n width: 52,\n height: 32,\n flexDirection: 'row',\n alignItems: 'center',\n borderRadius: 18\n },\n text: {},\n handle: {\n width: 16,\n height: 16,\n borderRadius: 18,\n marginLeft : 8,\n marginRight: 0,\n backgroundSize: '100% 100%',\n backgroundPosition: 'center'\n },\n skeleton: {\n root: {\n width: 52,\n height: 32,\n borderRadius: 18,\n }\n } as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n \n // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles\n addStyle('form-toggle-input-horizontal', '', {\n root: {\n minWidth: 0, \n },\n text: {}\n } as BaseStyles);\n \n addStyle(DEFAULT_CLASS + '-on', '', {\n root : {\n backgroundColor: themeVariables.toggleOnColor,\n },\n handle: {\n backgroundColor: themeVariables.toggleHandleColor,\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-off', '', {\n root : {\n backgroundColor: themeVariables.toggleOffColor,\n borderColor: themeVariables.toggleOffBorderColor,\n borderWidth: 2\n },\n handle: {\n backgroundColor: themeVariables.toggleHandleDisableColor,\n }\n } as WmToggleStyles);\n addStyle(DEFAULT_CLASS + '-rtl', '', {});\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {}\n });\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AASxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAC;IAC/CM,IAAI,EAAE;MACJC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE,CAAC,CA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":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","backgroundColor","pageContentBgColor","minHeight","text","skeleton","height","maxModalHeight"],"sources":["page-content.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { Dimensions } from 'react-native';\n\nexport type WmPageContentStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-page-content';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPageContentStyles = defineStyles({\n root: {\n padding: 8,\n backgroundColor: themeVariables.pageContentBgColor,\n minHeight: '100%'\n },\n text: {},\n skeleton: {\n root: {\n height: themeVariables.maxModalHeight\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAQxF,OAAO,MAAMC,aAAa,GAAG,kBAAkB;AAC/CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE;MACFC,OAAO,EAAE,CAAC;MACVC,eAAe,EAAEL,cAAc,CAACM,kBAAkB;MAClDC,SAAS,EAAE;IACf,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNN,IAAI,EAAE;QACFO,MAAM,EAAEV,cAAc,CAACW;MAC3B;IACJ;EACJ,CAAC,CAAC;EAEFV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","backgroundColor","pageContentBgColor","minHeight","text","skeleton","height","maxModalHeight"],"sources":["page-content.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmPageContentStyles = BaseStyles & {\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-page-content';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmPageContentStyles = defineStyles({\n root: {\n padding: 8,\n backgroundColor: themeVariables.pageContentBgColor,\n minHeight: '100%'\n },\n text: {},\n skeleton: {\n root: {\n height: themeVariables.maxModalHeight\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,kBAAkB;AAC/CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE;MACFC,OAAO,EAAE,CAAC;MACVC,eAAe,EAAEL,cAAc,CAACM,kBAAkB;MAClDC,SAAS,EAAE;IACf,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNN,IAAI,EAAE;QACFO,MAAM,EAAEV,cAAc,CAACW;MAC3B;IACJ;EACJ,CAAC,CAAC;EAEFV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,264 @@
1
+ import React, { useState } from 'react';
2
+ import { Text, View, StyleSheet, ScrollView, TouchableOpacity } from 'react-native';
3
+ import { navigate, goBackRef } from '@wavemaker/app-rn-runtime/core/navigation.service';
4
+ import * as Clipboard from 'expo-clipboard';
5
+ import injector from '@wavemaker/app-rn-runtime/core/injector';
6
+ const Fallback = props => {
7
+ const {
8
+ error,
9
+ info,
10
+ resetErrorBoundary
11
+ } = props;
12
+ const [showStack, setShowStack] = useState(false);
13
+ const [isCopied, setIsCopied] = useState(false);
14
+ const appConfig = injector.get('APP_CONFIG');
15
+ const copyErrorToClipboard = async () => {
16
+ const errorDetails = `
17
+ Error: ${(error === null || error === void 0 ? void 0 : error.message) || 'Unknown error'}
18
+ Stack: ${(error === null || error === void 0 ? void 0 : error.stack) || 'No stack available'}
19
+ Component Stack: ${(info === null || info === void 0 ? void 0 : info.componentStack) || 'No component stack available'}
20
+ `.trim();
21
+ await Clipboard.setStringAsync(errorDetails);
22
+ setIsCopied(true);
23
+ setTimeout(() => {
24
+ setIsCopied(false);
25
+ }, 2000);
26
+ };
27
+ const handleGoBack = () => {
28
+ goBackRef();
29
+ if (resetErrorBoundary) {
30
+ resetErrorBoundary();
31
+ }
32
+ };
33
+ const handleGoHome = () => {
34
+ navigate(appConfig.appProperties.homePage, {});
35
+ if (resetErrorBoundary) {
36
+ resetErrorBoundary();
37
+ }
38
+ };
39
+ return /*#__PURE__*/React.createElement(View, {
40
+ style: styles.container
41
+ }, /*#__PURE__*/React.createElement(Text, {
42
+ style: styles.title
43
+ }, "Something went wrong."), /*#__PURE__*/React.createElement(Text, {
44
+ style: styles.subtitle
45
+ }, "Please try again."), /*#__PURE__*/React.createElement(View, {
46
+ style: styles.errorCard
47
+ }, /*#__PURE__*/React.createElement(Text, {
48
+ style: styles.errorLabel
49
+ }, "Error:"), /*#__PURE__*/React.createElement(Text, {
50
+ style: styles.errorMessage
51
+ }, (error === null || error === void 0 ? void 0 : error.message) || 'An unexpected error occurred')), /*#__PURE__*/React.createElement(TouchableOpacity, {
52
+ style: styles.toggleButton,
53
+ onPress: () => setShowStack(!showStack)
54
+ }, /*#__PURE__*/React.createElement(Text, {
55
+ style: styles.toggleText
56
+ }, showStack ? 'Hide' : 'Show', " Error Details"), /*#__PURE__*/React.createElement(Text, {
57
+ style: styles.toggleIcon
58
+ }, showStack ? '▲' : '▼')), showStack && /*#__PURE__*/React.createElement(View, {
59
+ style: styles.stackCard
60
+ }, /*#__PURE__*/React.createElement(View, {
61
+ style: styles.stackHeader
62
+ }, /*#__PURE__*/React.createElement(Text, {
63
+ style: styles.stackTitle
64
+ }, "Error Stack"), /*#__PURE__*/React.createElement(TouchableOpacity, {
65
+ onPress: copyErrorToClipboard,
66
+ style: [styles.copyButton, isCopied && styles.copiedButton],
67
+ disabled: isCopied
68
+ }, /*#__PURE__*/React.createElement(Text, {
69
+ style: [styles.copyButtonText, isCopied && styles.copiedButtonText]
70
+ }, isCopied ? 'Copied!' : 'Copy'))), /*#__PURE__*/React.createElement(ScrollView, {
71
+ style: styles.stackContainer,
72
+ showsVerticalScrollIndicator: true
73
+ }, /*#__PURE__*/React.createElement(Text, {
74
+ style: styles.stackText,
75
+ selectable: true
76
+ }, (error === null || error === void 0 ? void 0 : error.stack) || 'No stack trace available'), (info === null || info === void 0 ? void 0 : info.componentStack) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
77
+ style: styles.componentStackTitle
78
+ }, "Component Stack:"), /*#__PURE__*/React.createElement(Text, {
79
+ style: styles.stackText,
80
+ selectable: true
81
+ }, info.componentStack)))), /*#__PURE__*/React.createElement(View, {
82
+ style: styles.buttonContainer
83
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
84
+ style: styles.secondaryButton,
85
+ onPress: handleGoBack
86
+ }, /*#__PURE__*/React.createElement(Text, {
87
+ style: styles.secondaryButtonText
88
+ }, "Go Back")), /*#__PURE__*/React.createElement(TouchableOpacity, {
89
+ style: styles.primaryButton,
90
+ onPress: handleGoHome
91
+ }, /*#__PURE__*/React.createElement(Text, {
92
+ style: styles.primaryButtonText
93
+ }, "Go to Home"))));
94
+ };
95
+ const styles = StyleSheet.create({
96
+ container: {
97
+ flex: 1,
98
+ padding: 20,
99
+ backgroundColor: '#f8f9fa',
100
+ justifyContent: 'center'
101
+ },
102
+ imageContainer: {
103
+ alignItems: 'center',
104
+ marginBottom: 30
105
+ },
106
+ errorImage: {
107
+ width: 200,
108
+ height: 150
109
+ },
110
+ title: {
111
+ fontSize: 24,
112
+ fontWeight: '600',
113
+ textAlign: 'center',
114
+ color: '#2d3748',
115
+ marginBottom: 8
116
+ },
117
+ subtitle: {
118
+ fontSize: 16,
119
+ textAlign: 'center',
120
+ color: '#718096',
121
+ marginBottom: 30
122
+ },
123
+ errorCard: {
124
+ backgroundColor: '#fff',
125
+ borderRadius: 12,
126
+ padding: 16,
127
+ marginBottom: 16,
128
+ borderLeftWidth: 4,
129
+ borderLeftColor: '#f56565',
130
+ shadowColor: '#000',
131
+ shadowOffset: {
132
+ width: 0,
133
+ height: 2
134
+ },
135
+ shadowOpacity: 0.1,
136
+ shadowRadius: 4,
137
+ elevation: 3
138
+ },
139
+ errorLabel: {
140
+ fontSize: 14,
141
+ fontWeight: '600',
142
+ color: '#e53e3e',
143
+ marginBottom: 8
144
+ },
145
+ errorMessage: {
146
+ fontSize: 16,
147
+ color: '#2d3748',
148
+ lineHeight: 22
149
+ },
150
+ toggleButton: {
151
+ flexDirection: 'row',
152
+ alignItems: 'center',
153
+ justifyContent: 'center',
154
+ paddingVertical: 12,
155
+ paddingHorizontal: 16,
156
+ backgroundColor: '#edf2f7',
157
+ borderRadius: 8,
158
+ marginBottom: 16
159
+ },
160
+ toggleText: {
161
+ fontSize: 16,
162
+ color: '#4a5568',
163
+ marginRight: 8
164
+ },
165
+ toggleIcon: {
166
+ fontSize: 12,
167
+ color: '#4a5568'
168
+ },
169
+ stackCard: {
170
+ backgroundColor: '#fff',
171
+ borderRadius: 12,
172
+ marginBottom: 24,
173
+ borderWidth: 1,
174
+ borderColor: '#e2e8f0',
175
+ shadowColor: '#000',
176
+ shadowOffset: {
177
+ width: 0,
178
+ height: 2
179
+ },
180
+ shadowOpacity: 0.1,
181
+ shadowRadius: 4,
182
+ elevation: 3
183
+ },
184
+ stackHeader: {
185
+ flexDirection: 'row',
186
+ justifyContent: 'space-between',
187
+ alignItems: 'center',
188
+ padding: 16,
189
+ borderBottomWidth: 1,
190
+ borderBottomColor: '#e2e8f0'
191
+ },
192
+ stackTitle: {
193
+ fontSize: 16,
194
+ fontWeight: '600',
195
+ color: '#2d3748'
196
+ },
197
+ copyButton: {
198
+ paddingVertical: 6,
199
+ paddingHorizontal: 12,
200
+ backgroundColor: '#4299e1',
201
+ borderRadius: 6
202
+ },
203
+ copiedButton: {
204
+ backgroundColor: '#48bb78'
205
+ },
206
+ copyButtonText: {
207
+ color: '#fff',
208
+ fontSize: 14,
209
+ fontWeight: '500'
210
+ },
211
+ copiedButtonText: {
212
+ color: '#fff'
213
+ },
214
+ stackContainer: {
215
+ maxHeight: 200,
216
+ padding: 16
217
+ },
218
+ stackText: {
219
+ fontSize: 12,
220
+ color: '#4a5568',
221
+ lineHeight: 16,
222
+ fontFamily: 'monospace'
223
+ },
224
+ componentStackTitle: {
225
+ fontSize: 14,
226
+ fontWeight: '600',
227
+ color: '#2d3748',
228
+ marginTop: 16,
229
+ marginBottom: 8
230
+ },
231
+ buttonContainer: {
232
+ flexDirection: 'row',
233
+ justifyContent: 'space-between',
234
+ gap: 12
235
+ },
236
+ primaryButton: {
237
+ flex: 1,
238
+ backgroundColor: '#4299e1',
239
+ borderRadius: 8,
240
+ paddingVertical: 14,
241
+ alignItems: 'center'
242
+ },
243
+ primaryButtonText: {
244
+ color: '#fff',
245
+ fontSize: 16,
246
+ fontWeight: '600'
247
+ },
248
+ secondaryButton: {
249
+ flex: 1,
250
+ backgroundColor: '#fff',
251
+ borderRadius: 8,
252
+ paddingVertical: 14,
253
+ alignItems: 'center',
254
+ borderWidth: 1,
255
+ borderColor: '#e2e8f0'
256
+ },
257
+ secondaryButtonText: {
258
+ color: '#4a5568',
259
+ fontSize: 16,
260
+ fontWeight: '600'
261
+ }
262
+ });
263
+ export default Fallback;
264
+ //# sourceMappingURL=error-fallback.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","Text","View","StyleSheet","ScrollView","TouchableOpacity","navigate","goBackRef","Clipboard","injector","Fallback","props","error","info","resetErrorBoundary","showStack","setShowStack","isCopied","setIsCopied","appConfig","get","copyErrorToClipboard","errorDetails","message","stack","componentStack","trim","setStringAsync","setTimeout","handleGoBack","handleGoHome","appProperties","homePage","createElement","style","styles","container","title","subtitle","errorCard","errorLabel","errorMessage","toggleButton","onPress","toggleText","toggleIcon","stackCard","stackHeader","stackTitle","copyButton","copiedButton","disabled","copyButtonText","copiedButtonText","stackContainer","showsVerticalScrollIndicator","stackText","selectable","Fragment","componentStackTitle","buttonContainer","secondaryButton","secondaryButtonText","primaryButton","primaryButtonText","create","flex","padding","backgroundColor","justifyContent","imageContainer","alignItems","marginBottom","errorImage","width","height","fontSize","fontWeight","textAlign","color","borderRadius","borderLeftWidth","borderLeftColor","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","lineHeight","flexDirection","paddingVertical","paddingHorizontal","marginRight","borderWidth","borderColor","borderBottomWidth","borderBottomColor","maxHeight","fontFamily","marginTop","gap"],"sources":["error-fallback.component.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport {\n Text,\n View,\n StyleSheet,\n ScrollView,\n TouchableOpacity,\n Image,\n} from 'react-native';\nimport {\n navigate,\n goBackRef,\n} from '@wavemaker/app-rn-runtime/core/navigation.service';\nimport * as Clipboard from 'expo-clipboard';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nconst Fallback = (props: any) => {\n const { error, info, resetErrorBoundary } = props;\n const [showStack, setShowStack] = useState(false);\n const [isCopied, setIsCopied] = useState(false);\n const appConfig = injector.get<AppConfig>('APP_CONFIG');\n\n const copyErrorToClipboard = async () => {\n const errorDetails = `\nError: ${error?.message || 'Unknown error'}\nStack: ${error?.stack || 'No stack available'}\nComponent Stack: ${info?.componentStack || 'No component stack available'}\n `.trim();\n\n await Clipboard.setStringAsync(errorDetails);\n setIsCopied(true);\n\n setTimeout(() => {\n setIsCopied(false);\n }, 2000);\n };\n\n const handleGoBack = () => {\n goBackRef();\n if (resetErrorBoundary) {\n resetErrorBoundary();\n }\n };\n\n const handleGoHome = () => {\n navigate(appConfig.appProperties.homePage, {});\n if (resetErrorBoundary) {\n resetErrorBoundary();\n }\n };\n\n return (\n <View style={styles.container}>\n {/* Error Image */}\n {/* <View style={styles.imageContainer}>\n {\n <Image\n source={require('./something_wrong.png')}\n style={styles.errorImage}\n resizeMode=\"contain\"\n />\n }\n </View> */}\n\n {/* Error Message */}\n <Text style={styles.title}>Something went wrong.</Text>\n <Text style={styles.subtitle}>Please try again.</Text>\n\n {/* Main Error Display */}\n <View style={styles.errorCard}>\n <Text style={styles.errorLabel}>Error:</Text>\n <Text style={styles.errorMessage}>\n {error?.message || 'An unexpected error occurred'}\n </Text>\n </View>\n\n {/* Stack Toggle */}\n <TouchableOpacity\n style={styles.toggleButton}\n onPress={() => setShowStack(!showStack)}\n >\n <Text style={styles.toggleText}>\n {showStack ? 'Hide' : 'Show'} Error Details\n </Text>\n <Text style={styles.toggleIcon}>{showStack ? '▲' : '▼'}</Text>\n </TouchableOpacity>\n\n {/* Stack Details */}\n {showStack && (\n <View style={styles.stackCard}>\n <View style={styles.stackHeader}>\n <Text style={styles.stackTitle}>Error Stack</Text>\n <TouchableOpacity\n onPress={copyErrorToClipboard}\n style={[styles.copyButton, isCopied && styles.copiedButton]}\n disabled={isCopied}\n >\n <Text\n style={[\n styles.copyButtonText,\n isCopied && styles.copiedButtonText,\n ]}\n >\n {isCopied ? 'Copied!' : 'Copy'}\n </Text>\n </TouchableOpacity>\n </View>\n <ScrollView\n style={styles.stackContainer}\n showsVerticalScrollIndicator={true}\n >\n <Text style={styles.stackText} selectable={true}>\n {error?.stack || 'No stack trace available'}\n </Text>\n {info?.componentStack && (\n <>\n <Text style={styles.componentStackTitle}>Component Stack:</Text>\n <Text style={styles.stackText} selectable={true}>\n {info.componentStack}\n </Text>\n </>\n )}\n </ScrollView>\n </View>\n )}\n\n {/* Action Buttons */}\n <View style={styles.buttonContainer}>\n <TouchableOpacity style={styles.secondaryButton} onPress={handleGoBack}>\n <Text style={styles.secondaryButtonText}>Go Back</Text>\n </TouchableOpacity>\n <TouchableOpacity style={styles.primaryButton} onPress={handleGoHome}>\n <Text style={styles.primaryButtonText}>Go to Home</Text>\n </TouchableOpacity>\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n padding: 20,\n backgroundColor: '#f8f9fa',\n justifyContent: 'center',\n },\n imageContainer: {\n alignItems: 'center',\n marginBottom: 30,\n },\n errorImage: {\n width: 200,\n height: 150,\n },\n title: {\n fontSize: 24,\n fontWeight: '600',\n textAlign: 'center',\n color: '#2d3748',\n marginBottom: 8,\n },\n subtitle: {\n fontSize: 16,\n textAlign: 'center',\n color: '#718096',\n marginBottom: 30,\n },\n errorCard: {\n backgroundColor: '#fff',\n borderRadius: 12,\n padding: 16,\n marginBottom: 16,\n borderLeftWidth: 4,\n borderLeftColor: '#f56565',\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.1,\n shadowRadius: 4,\n elevation: 3,\n },\n errorLabel: {\n fontSize: 14,\n fontWeight: '600',\n color: '#e53e3e',\n marginBottom: 8,\n },\n errorMessage: {\n fontSize: 16,\n color: '#2d3748',\n lineHeight: 22,\n },\n toggleButton: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n paddingVertical: 12,\n paddingHorizontal: 16,\n backgroundColor: '#edf2f7',\n borderRadius: 8,\n marginBottom: 16,\n },\n toggleText: {\n fontSize: 16,\n color: '#4a5568',\n marginRight: 8,\n },\n toggleIcon: {\n fontSize: 12,\n color: '#4a5568',\n },\n stackCard: {\n backgroundColor: '#fff',\n borderRadius: 12,\n marginBottom: 24,\n borderWidth: 1,\n borderColor: '#e2e8f0',\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.1,\n shadowRadius: 4,\n elevation: 3,\n },\n stackHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: 16,\n borderBottomWidth: 1,\n borderBottomColor: '#e2e8f0',\n },\n stackTitle: {\n fontSize: 16,\n fontWeight: '600',\n color: '#2d3748',\n },\n copyButton: {\n paddingVertical: 6,\n paddingHorizontal: 12,\n backgroundColor: '#4299e1',\n borderRadius: 6,\n },\n copiedButton: {\n backgroundColor: '#48bb78',\n },\n copyButtonText: {\n color: '#fff',\n fontSize: 14,\n fontWeight: '500',\n },\n copiedButtonText: {\n color: '#fff',\n },\n stackContainer: {\n maxHeight: 200,\n padding: 16,\n },\n stackText: {\n fontSize: 12,\n color: '#4a5568',\n lineHeight: 16,\n fontFamily: 'monospace',\n },\n componentStackTitle: {\n fontSize: 14,\n fontWeight: '600',\n color: '#2d3748',\n marginTop: 16,\n marginBottom: 8,\n },\n buttonContainer: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n gap: 12,\n },\n primaryButton: {\n flex: 1,\n backgroundColor: '#4299e1',\n borderRadius: 8,\n paddingVertical: 14,\n alignItems: 'center',\n },\n primaryButtonText: {\n color: '#fff',\n fontSize: 16,\n fontWeight: '600',\n },\n secondaryButton: {\n flex: 1,\n backgroundColor: '#fff',\n borderRadius: 8,\n paddingVertical: 14,\n alignItems: 'center',\n borderWidth: 1,\n borderColor: '#e2e8f0',\n },\n secondaryButtonText: {\n color: '#4a5568',\n fontSize: 16,\n fontWeight: '600',\n },\n});\n\nexport default Fallback;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SACEC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,UAAU,EACVC,gBAAgB,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eAAe,EAAE,EAAE;IACnBnB,UAAU,EAAE;EACd,CAAC;EACDP,iBAAiB,EAAE;IACjBe,KAAK,EAAE,MAAM;IACbH,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDhB,eAAe,EAAE;IACfK,IAAI,EAAE,CAAC;IACPE,eAAe,EAAE,MAAM;IACvBY,YAAY,EAAE,CAAC;IACfU,eAAe,EAAE,EAAE;IACnBnB,UAAU,EAAE,QAAQ;IACpBsB,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE;EACf,CAAC;EACDhC,mBAAmB,EAAE;IACnBiB,KAAK,EAAE,SAAS;IAChBH,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAenE,QAAQ","ignoreList":[]}
@@ -0,0 +1,48 @@
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
+ import * as React from 'react';
5
+ import Fallback from './components/error-fallback.component';
6
+ import appModalService from '@wavemaker/app-rn-runtime/runtime/services/app-modal.service';
7
+ export default class ErrorBoundary extends React.Component {
8
+ constructor(props) {
9
+ super(props);
10
+ _defineProperty(this, "resetErrorBoundary", () => {
11
+ this.setState({
12
+ hasError: false,
13
+ error: undefined,
14
+ info: undefined
15
+ });
16
+ });
17
+ this.state = {
18
+ hasError: false
19
+ };
20
+ }
21
+ static getDerivedStateFromError(error) {
22
+ return {
23
+ hasError: true
24
+ };
25
+ }
26
+ componentDidCatch(error, info) {
27
+ if (error && appModalService.modalsOpened.length > 0) {
28
+ appModalService.modalsOpened.pop();
29
+ appModalService.showLastModal();
30
+ }
31
+ this.setState({
32
+ error,
33
+ info
34
+ });
35
+ }
36
+ render() {
37
+ if (this.state.hasError) {
38
+ var _this$state, _this$state2;
39
+ return /*#__PURE__*/React.createElement(Fallback, {
40
+ error: (_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.error,
41
+ info: (_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.info,
42
+ resetErrorBoundary: this.resetErrorBoundary
43
+ });
44
+ }
45
+ return this.props.children;
46
+ }
47
+ }
48
+ //# sourceMappingURL=error-boundary.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Fallback","appModalService","ErrorBoundary","Component","constructor","props","_defineProperty","setState","hasError","error","undefined","info","state","getDerivedStateFromError","componentDidCatch","modalsOpened","length","pop","showLastModal","render","_this$state","_this$state2","createElement","resetErrorBoundary","children"],"sources":["error-boundary.component.tsx"],"sourcesContent":["import * as React from 'react';\nimport Fallback from './components/error-fallback.component';\nimport appModalService from '@wavemaker/app-rn-runtime/runtime/services/app-modal.service';\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n info?: any;\n error?: any;\n}\n\ninterface ErrorBoundaryProps {\n currentPage?: any;\n children: React.ReactNode;\n}\n\nexport default class ErrorBoundary extends React.Component<\n ErrorBoundaryProps,\n ErrorBoundaryState\n> {\n \n constructor(props: any) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(error: any) {\n return { hasError: true };\n }\n\n resetErrorBoundary = () => {\n this.setState({ hasError: false, error: undefined, info: undefined });\n };\n\n componentDidCatch(error: any, info: any) {\n if(error && appModalService.modalsOpened.length > 0){\n appModalService.modalsOpened.pop();\n (appModalService as any).showLastModal();\n }\n this.setState({ error, info });\n }\n\n render() {\n if (this.state.hasError) {\n return <Fallback error={this.state?.error} info={this.state?.info} resetErrorBoundary={this.resetErrorBoundary} />;\n }\n\n return this.props.children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,CAACA;MAAmB,CAAE,CAAC;IACpH;IAEA,OAAO,IAAI,CAAClB,KAAK,CAACmB,QAAQ;EAC5B;AACF","ignoreList":[]}
@@ -1,5 +1,70 @@
1
1
  import React from 'react';
2
+ import { createNavigationContainerRef } from '@react-navigation/native';
2
3
  const NavigationContext = /*#__PURE__*/React.createContext(null);
3
4
  export const NavigationServiceProvider = NavigationContext.Provider;
4
5
  export const NavigationServiceConsumer = NavigationContext.Consumer;
6
+
7
+ // Error Boundary - Navigation handling in case of app level errors.
8
+
9
+ // Creating a navigationRef for use with NavigationContainer in App.navigator.tsx
10
+ export const navigationRef = createNavigationContainerRef();
11
+
12
+ // Flag to track whether the NavigationContainer is ready
13
+ let isNavigationReady = false;
14
+
15
+ // Queue to hold navigation actions while NavigationContainer is not ready
16
+ let pendingNavigation = [];
17
+
18
+ /**
19
+ * Set the navigation readiness state.
20
+ * If NavigationContainer becomes ready, flush any pending navigation actions.
21
+ */
22
+ export function setNavigationReady(ready) {
23
+ isNavigationReady = ready;
24
+ if (ready) {
25
+ flushPendingNavigation();
26
+ }
27
+ }
28
+
29
+ /**
30
+ * Get the current navigation readiness state.
31
+ */
32
+ export function getNavigationReady() {
33
+ return isNavigationReady;
34
+ }
35
+
36
+ /**
37
+ * Execute all queued navigation actions.
38
+ */
39
+ function flushPendingNavigation() {
40
+ while (pendingNavigation.length > 0) {
41
+ const action = pendingNavigation.shift();
42
+ if (action) action();
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Navigate to a specific screen.
48
+ * If NavigationContainer isn't ready, queue the navigation action.
49
+ */
50
+ export function navigate(name, params) {
51
+ if (isNavigationReady && navigationRef.isReady()) {
52
+ navigationRef.navigate(name, params);
53
+ } else {
54
+ pendingNavigation.push(() => navigationRef.navigate(name, params));
55
+ }
56
+ }
57
+
58
+ /**
59
+ * Navigate back to the previous screen.
60
+ * If NavigationContainer isn't ready, queue the goBack action.
61
+ */
62
+ export function goBackRef() {
63
+ if (isNavigationReady && navigationRef.isReady() && navigationRef.canGoBack()) {
64
+ navigationRef.goBack();
65
+ } else {
66
+ pendingNavigation.push(() => navigationRef.goBack());
67
+ }
68
+ }
69
+ export { isNavigationReady };
5
70
  //# sourceMappingURL=navigation.service.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","NavigationContext","createContext","NavigationServiceProvider","Provider","NavigationServiceConsumer","Consumer"],"sources":["navigation.service.ts"],"sourcesContent":["import React from 'react';\n\nexport default interface NavigationService {\n goToPage: (pageName: string, params: any) => Promise<void>;\n goBack: (pageName: string, params: any) => Promise<void>;\n openUrl: (url: string, params?: any) => Promise<void>;\n}\n\nconst NavigationContext = React.createContext<NavigationService>(null as any);\n\nexport const NavigationServiceProvider = NavigationContext.Provider;\nexport const NavigationServiceConsumer = NavigationContext.Consumer;"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAQzB,MAAMC,iBAAiB,gBAAGD,KAAK,CAACE,aAAa,CAAoB,IAAW,CAAC;AAE7E,OAAO,MAAMC,yBAAyB,GAAGF,iBAAiB,CAACG,QAAQ;AACnE,OAAO,MAAMC,yBAAyB,GAAGJ,iBAAiB,CAACK,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["React","createNavigationContainerRef","NavigationContext","createContext","NavigationServiceProvider","Provider","NavigationServiceConsumer","Consumer","navigationRef","isNavigationReady","pendingNavigation","setNavigationReady","ready","flushPendingNavigation","getNavigationReady","length","action","shift","navigate","name","params","isReady","push","goBackRef","canGoBack","goBack"],"sources":["navigation.service.ts"],"sourcesContent":["import React from 'react';\nimport { createNavigationContainerRef, ParamListBase } from '@react-navigation/native';\n\nexport default interface NavigationService {\n goToPage: (pageName: string, params: any) => Promise<void>;\n goBack: (pageName: string, params: any) => Promise<void>;\n openUrl: (url: string, params?: any) => Promise<void>;\n}\n\nconst NavigationContext = React.createContext<NavigationService>(null as any);\n\nexport const NavigationServiceProvider = NavigationContext.Provider;\nexport const NavigationServiceConsumer = NavigationContext.Consumer;\n\n\n// Error Boundary - Navigation handling in case of app level errors.\n\n// Creating a navigationRef for use with NavigationContainer in App.navigator.tsx\nexport const navigationRef = createNavigationContainerRef<ParamListBase>();\n\n// Flag to track whether the NavigationContainer is ready\nlet isNavigationReady = false;\n\n// Queue to hold navigation actions while NavigationContainer is not ready\nlet pendingNavigation: (() => void)[] = [];\n\n/**\n * Set the navigation readiness state.\n * If NavigationContainer becomes ready, flush any pending navigation actions.\n */\nexport function setNavigationReady(ready: boolean) {\n isNavigationReady = ready;\n if (ready) {\n flushPendingNavigation();\n }\n}\n\n/**\n * Get the current navigation readiness state.\n */\nexport function getNavigationReady() {\n return isNavigationReady;\n}\n\n/**\n * Execute all queued navigation actions.\n */\nfunction flushPendingNavigation() {\n while (pendingNavigation.length > 0) {\n const action = pendingNavigation.shift();\n if (action) action();\n }\n}\n\n/**\n * Navigate to a specific screen.\n * If NavigationContainer isn't ready, queue the navigation action.\n */\nexport function navigate(name: string, params: any) {\n if (isNavigationReady && navigationRef.isReady()) {\n navigationRef.navigate(name, params);\n } else {\n pendingNavigation.push(() => navigationRef.navigate(name, params));\n }\n}\n\n/**\n * Navigate back to the previous screen.\n * If NavigationContainer isn't ready, queue the goBack action.\n */\nexport function goBackRef() {\n if (isNavigationReady && navigationRef.isReady() && navigationRef.canGoBack()) {\n navigationRef.goBack();\n } else {\n pendingNavigation.push(() => navigationRef.goBack());\n }\n}\n\nexport { isNavigationReady };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,4BAA4B,QAAuB,0BAA0B;AAQtF,MAAMC,iBAAiB,gBAAGF,KAAK,CAACG,aAAa,CAAoB,IAAW,CAAC;AAE7E,OAAO,MAAMC,yBAAyB,GAAGF,iBAAiB,CAACG,QAAQ;AACnE,OAAO,MAAMC,yBAAyB,GAAGJ,iBAAiB,CAACK,QAAQ;;AAGnE;;AAEA;AACA,OAAO,MAAMC,aAAa,GAAGP,4BAA4B,CAAgB,CAAC;;AAE1E;AACA,IAAIQ,iBAAiB,GAAG,KAAK;;AAE7B;AACA,IAAIC,iBAAiC,GAAG,EAAE;;AAE1C;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACC,KAAc,EAAE;EACjDH,iBAAiB,GAAGG,KAAK;EACzB,IAAIA,KAAK,EAAE;IACTC,sBAAsB,CAAC,CAAC;EAC1B;AACF;;AAEA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACnC,OAAOL,iBAAiB;AAC1B;;AAEA;AACA;AACA;AACA,SAASI,sBAAsBA,CAAA,EAAG;EAChC,OAAOH,iBAAiB,CAACK,MAAM,GAAG,CAAC,EAAE;IACnC,MAAMC,MAAM,GAAGN,iBAAiB,CAACO,KAAK,CAAC,CAAC;IACxC,IAAID,MAAM,EAAEA,MAAM,CAAC,CAAC;EACtB;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASE,QAAQA,CAACC,IAAY,EAAEC,MAAW,EAAE;EAClD,IAAIX,iBAAiB,IAAID,aAAa,CAACa,OAAO,CAAC,CAAC,EAAE;IAChDb,aAAa,CAACU,QAAQ,CAACC,IAAI,EAAEC,MAAM,CAAC;EACtC,CAAC,MAAM;IACLV,iBAAiB,CAACY,IAAI,CAAC,MAAMd,aAAa,CAACU,QAAQ,CAACC,IAAI,EAAEC,MAAM,CAAC,CAAC;EACpE;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASG,SAASA,CAAA,EAAG;EAC1B,IAAId,iBAAiB,IAAID,aAAa,CAACa,OAAO,CAAC,CAAC,IAAIb,aAAa,CAACgB,SAAS,CAAC,CAAC,EAAE;IAC7EhB,aAAa,CAACiB,MAAM,CAAC,CAAC;EACxB,CAAC,MAAM;IACLf,iBAAiB,CAACY,IAAI,CAAC,MAAMd,aAAa,CAACiB,MAAM,CAAC,CAAC,CAAC;EACtD;AACF;AAEA,SAAShB,iBAAiB","ignoreList":[]}
package/core/utils.js CHANGED
@@ -244,7 +244,6 @@ export function splitBorderColorInPlace(rootStyles) {
244
244
  const sides = ["Top", "Right", "Bottom", "Left"];
245
245
  for (const side of sides) {
246
246
  const key = `border${side}Color`;
247
- console.log(updatedRootStyles[key], "hs");
248
247
  if (!updatedRootStyles[key]) {
249
248
  updatedRootStyles[key] = color;
250
249
  }