@wavemaker/app-rn-runtime 12.0.0-next.141192 → 12.0.0-next.141936

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -0
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/basic/custom/custom.component.js +1 -1
  4. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
  5. app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
  6. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
  7. app-rn-runtime/components/basic/search/search.component.js +1 -1
  8. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  9. app-rn-runtime/components/basic/search/search.props.js +1 -0
  10. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  11. app-rn-runtime/components/basic/skeleton/skeleton.component.js +2 -0
  12. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  13. app-rn-runtime/components/container/container.component.js +8 -1
  14. app-rn-runtime/components/container/container.component.js.map +1 -1
  15. app-rn-runtime/components/container/container.props.js +1 -0
  16. app-rn-runtime/components/container/container.props.js.map +1 -1
  17. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
  18. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  19. app-rn-runtime/components/container/tabs/tabs.component.js +3 -1
  20. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  21. app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
  22. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  23. app-rn-runtime/components/input/basenumber/basenumber.component.js +16 -3
  24. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  25. app-rn-runtime/components/input/checkbox/checkbox.component.js +2 -2
  26. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  27. app-rn-runtime/components/input/checkbox/checkbox.styles.js +3 -1
  28. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  29. app-rn-runtime/components/input/currency/currency.component.js +3 -1
  30. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  31. app-rn-runtime/components/input/currency/currency.styles.js +6 -1
  32. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  33. app-rn-runtime/components/input/epoch/base-datetime.component.js +4 -3
  34. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  35. app-rn-runtime/components/input/number/number.component.js +3 -1
  36. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  37. app-rn-runtime/components/input/number/number.styles.js +3 -0
  38. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  39. app-rn-runtime/components/input/radioset/radioset.component.js +12 -7
  40. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  41. app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
  42. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  43. app-rn-runtime/components/input/radioset/radioset.styles.js +6 -0
  44. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  45. app-rn-runtime/components/input/text/text.component.js +5 -2
  46. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  47. app-rn-runtime/components/input/text/text.props.js +1 -0
  48. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  49. app-rn-runtime/components/input/text/text.styles.js +3 -0
  50. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  51. app-rn-runtime/components/input/textarea/textarea.component.js +3 -1
  52. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  53. app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
  54. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  55. app-rn-runtime/components/page/content/content.component.js +4 -19
  56. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  57. app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
  58. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  59. app-rn-runtime/components/page/page-content/page-content.component.js +43 -12
  60. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  61. app-rn-runtime/core/AppConfig.js.map +1 -1
  62. app-rn-runtime/core/base.component.js +31 -5
  63. app-rn-runtime/core/base.component.js.map +1 -1
  64. app-rn-runtime/core/components/textinput.component.js +9 -7
  65. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  66. app-rn-runtime/core/storage.service.js +15 -0
  67. app-rn-runtime/core/storage.service.js.map +1 -1
  68. app-rn-runtime/core/wm-component-tree.js +58 -0
  69. app-rn-runtime/core/wm-component-tree.js.map +1 -0
  70. app-rn-runtime/package.json +13 -6
  71. app-rn-runtime/runtime/App.js +17 -2
  72. app-rn-runtime/runtime/App.js.map +1 -1
  73. app-rn-runtime/runtime/App.navigator.js +1 -0
  74. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  75. app-rn-runtime/runtime/base-fragment.component.js +18 -0
  76. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  77. app-rn-runtime/runtime/base-page.component.js +10 -0
  78. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  79. app-rn-runtime/runtime/base-partial.component.js +3 -0
  80. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  81. app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
  82. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  83. app-rn-runtime/styles/theme.js +5 -0
  84. app-rn-runtime/styles/theme.js.map +1 -1
  85. app-rn-runtime/styles/theme.variables.js +1 -1
  86. app-rn-runtime/styles/theme.variables.js.map +1 -1
  87. app-rn-runtime/variables/http.service.js +5 -1
  88. app-rn-runtime/variables/http.service.js.map +1 -1
  89. app-rn-runtime/variables/live-variable.js +14 -0
  90. app-rn-runtime/variables/live-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","checkedColor","text","group","flexDirection","flexWrap","groupHeaderTitle","backgroundColor","groupHeadingBgColor","fontSize","paddingLeft","paddingRight","lineHeight","fontFamily","baseFont","item","alignContent","marginRight","marginTop","selectedItem","selectedLabel","radioLabel","alignSelf","labelDefaultColor","marginLeft","skeleton","width","height","borderRadius","uncheckedRadio","borderStyle","borderWidth","borderColor","checkedBorderColor","icon","opacity","checkedRadio","padding","checkedDisabledColor"],"sources":["radioset.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 { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmRadiosetStyles = BaseStyles & {\n group: AllStyle,\n groupHeaderTitle: AllStyle;\n item: AllStyle;\n selectedItem: AllStyle;\n radioLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n uncheckedRadio: WmIconStyles;\n checkedRadio: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-radioset';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmRadiosetStyles = defineStyles({\n root: {\n color: themeVariables.checkedColor\n },\n text: {},\n group: {\n flexDirection: 'row',\n flexWrap: 'wrap'\n },\n groupHeaderTitle: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\n } as AllStyle,\n item: {\n flexDirection: 'row',\n alignContent: 'center',\n marginRight: -20,\n marginTop: 8\n } as AllStyle,\n selectedItem: {} as AllStyle,\n selectedLabel: {} as AllStyle,\n radioLabel: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8\n } as AllStyle,\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4,\n }\n } as any as WmSkeletonStyles,\n uncheckedRadio: {\n root: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 2,\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {},\n icon: {\n opacity: 0,\n }\n } as WmIconStyles,\n checkedRadio : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 2,\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 16,\n },\n icon : {\n color: themeVariables.checkedColor,\n padding: 0,\n }\n } as WmIconStyles\n});\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n color: themeVariables.checkedDisabledColor,\n opacity: 0.8\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAexF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI,EAAE;MACJC,KAAK,EAAEJ,cAAc,CAACK;IACxB,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,KAAK,EAAE;MACLC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE;IACZ,CAAC;IACDC,gBAAgB,EAAE;MAChBC,eAAe,EAAEX,cAAc,CAACY,mBAAmB;MACnDC,QAAQ,EAAE,EAAE;MACZC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAE,EAAE;MACdC,UAAU,EAAEjB,cAAc,CAACkB;IAC7B,CAAa;IACbC,IAAI,EAAE;MACJX,aAAa,EAAE,KAAK;MACpBY,YAAY,EAAE,QAAQ;MACtBC,WAAW,EAAE,CAAC,EAAE;MAChBC,SAAS,EAAE;IACb,CAAa;IACbC,YAAY,EAAE,CAAC,CAAa;IAC5B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,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","checkedColor","text","group","flexDirection","flexWrap","groupHeaderTitle","backgroundColor","groupHeadingBgColor","fontSize","paddingLeft","paddingRight","lineHeight","fontFamily","baseFont","item","alignContent","marginRight","marginTop","noscrollitem","marginLeft","selectedItem","selectedLabel","radioLabel","alignSelf","labelDefaultColor","skeleton","width","height","borderRadius","uncheckedRadio","borderStyle","borderWidth","borderColor","checkedBorderColor","icon","opacity","checkedRadio","padding","checkedDisabledColor"],"sources":["radioset.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 { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmRadiosetStyles = BaseStyles & {\n group: AllStyle,\n groupHeaderTitle: AllStyle;\n item: AllStyle;\n selectedItem: AllStyle;\n radioLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n uncheckedRadio: WmIconStyles;\n checkedRadio: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-radioset';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmRadiosetStyles = defineStyles({\n root: {\n color: themeVariables.checkedColor\n },\n text: {},\n group: {\n flexDirection: 'row',\n flexWrap: 'wrap'\n },\n groupHeaderTitle: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\n } as AllStyle,\n item: {\n flexDirection: 'row',\n alignContent: 'center',\n marginRight: -20,\n marginTop: 8\n } as AllStyle,\n noscrollitem:{\n flexDirection: 'row',\n alignContent: 'center',\n marginTop: 8, \n marginLeft: 16 \n } as AllStyle,\n selectedItem: {} as AllStyle,\n selectedLabel: {} as AllStyle,\n radioLabel: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8\n } as AllStyle,\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4,\n }\n } as any as WmSkeletonStyles,\n uncheckedRadio: {\n root: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 2,\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {},\n icon: {\n opacity: 0,\n }\n } as WmIconStyles,\n checkedRadio : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 2,\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 16,\n },\n icon : {\n color: themeVariables.checkedColor,\n padding: 0,\n }\n } as WmIconStyles\n});\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n color: themeVariables.checkedDisabledColor,\n opacity: 0.8\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAexF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI,EAAE;MACJC,KAAK,EAAEJ,cAAc,CAACK;IACxB,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,KAAK,EAAE;MACLC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE;IACZ,CAAC;IACDC,gBAAgB,EAAE;MAChBC,eAAe,EAAEX,cAAc,CAACY,mBAAmB;MACnDC,QAAQ,EAAE,EAAE;MACZC,WAAW,EAAE,CAAC;MACdC,YAAY,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AAE;QACJO,QAAQ,EAAE;MACZ,CAAC;MACD0B,IAAI,EAAG;QACLnC,KAAK,EAAEJ,cAAc,CAACK,YAAY;QAClCqC,OAAO,EAAE;MACX;IACN;EACF,CAAC,CAAC;EAEAzC,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACLC,KAAK,EAAEJ,cAAc,CAAC2C,oBAAoB;MAC1CH,OAAO,EAAE;IACX;EACF,CAAC,CAAC;EAEFvC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
@@ -60,13 +60,15 @@ export default class WmText extends BaseInputComponent {
60
60
  floatingLabelStyle: this.styles.floatingLabel,
61
61
  activeFloatingLabelStyle: this.styles.activeFloatingLabel,
62
62
  placeholderTextColor: this.styles.placeholderText.color,
63
- style: [this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid],
63
+ isInputFocused: this.state.isInputFocused,
64
+ style: [this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}],
64
65
  keyboardType: this.state.keyboardType,
65
66
  autoComplete: props.autocomplete ? 'username' : 'off',
66
67
  autoFocus: props.autofocus,
67
68
  editable: props.disabled || props.readonly ? false : true,
68
69
  secureTextEntry: props.type === 'password' && !props.maskchar ? true : false,
69
70
  displayformat: props.displayformat,
71
+ background: this._background,
70
72
  maskchar: props.maskchar,
71
73
  maxLength: props.maxchars,
72
74
  placeholder: props.placeholder,
@@ -75,7 +77,8 @@ export default class WmText extends BaseInputComponent {
75
77
  onKeyPress: this.onKeyPress.bind(this),
76
78
  onChangeText: this.onChangeText.bind(this),
77
79
  onChange: this.invokeChange.bind(this),
78
- allowContentSelection: this.styles.text.userSelect === 'text'
80
+ allowContentSelection: this.styles.text.userSelect === 'text',
81
+ autoCapitalize: props.autocapitalize
79
82
  }));
80
83
  }
81
84
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","WmTextProps","DEFAULT_CLASS","WMTextInput","BaseInputComponent","BaseInputState","isNull","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmTextState","WmText","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","styles","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXT","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","placeholderTextColor","placeholderText","color","style","text","isValid","invalid","keyboardType","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","secureTextEntry","type","maskchar","displayformat","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["text.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform } from 'react-native';\n\nimport WmTextProps from './text.props';\nimport { DEFAULT_CLASS, WmTextStyles } from './text.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { BaseInputComponent, BaseInputState } from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component\";\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTextState extends BaseInputState<WmTextProps> {\n}\n\nexport default class WmText extends BaseInputComponent<WmTextProps, WmTextState, WmTextStyles> {\n\n constructor(props: WmTextProps) {\n super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-text-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public renderSkeleton(props: WmTextProps): React.ReactNode { \n let skeletonWidth, skeletonHeight;\n \n if(this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height;\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n })\n }\n\n renderWidget(props: WmTextProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXT,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n keyboardType={this.state.keyboardType}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n secureTextEntry={props.type === 'password' && !props.maskchar ? true : false}\n displayformat={props.displayformat}\n maskchar={props.maskchar}\n maxLength={props.maxchars}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />\n );\n }\n}\n"],"mapp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EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAACzD,MAAM,CAACgC,IAAI,CAAC0B,UAAU,KAAK;IAAO,EAC/D,CAAC;EAER;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","WmTextProps","DEFAULT_CLASS","WMTextInput","BaseInputComponent","BaseInputState","isNull","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmTextState","WmText","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","styles","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXT","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","placeholderTextColor","placeholderText","color","isInputFocused","style","text","isValid","invalid","focused","keyboardType","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","secureTextEntry","type","maskchar","displayformat","background","_background","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect","autoCapitalize","autocapitalize"],"sources":["text.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform } from 'react-native';\n\nimport WmTextProps from './text.props';\nimport { DEFAULT_CLASS, WmTextStyles } from './text.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { BaseInputComponent, BaseInputState } from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component\";\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTextState extends BaseInputState<WmTextProps> {\n}\n\nexport default class WmText extends BaseInputComponent<WmTextProps, WmTextState, WmTextStyles> {\n\n constructor(props: WmTextProps) {\n super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-text-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public renderSkeleton(props: WmTextProps): React.ReactNode { \n let skeletonWidth, skeletonHeight;\n \n if(this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height;\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n })\n }\n\n renderWidget(props: WmTextProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXT,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n placeholderTextColor={this.styles.placeholderText.color as any}\n isInputFocused={ this.state.isInputFocused }\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]}\n keyboardType={this.state.keyboardType}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n secureTextEntry={props.type === 'password' && !props.maskchar ? true : false}\n displayformat={props.displayformat}\n background={this._background}\n maskchar={props.maskchar}\n maxLength={props.maxchars}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n autoCapitalize={props.autocapitalize}\n />\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,QAAQ,cAAc;AAEvD,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAC3D,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,0EAA0E;AAC7H,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO,MAAMC,WAAW,SAASL,cAAc,CAAc;AAG7D,eAAe,MAAMM,MAAM,SAASP,kBAAkB,CAAyC;EAE7FQ,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,EAAE,IAAIS,WAAW,CAAC,CAAC,CAAC;EACnE;EAEOI,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,qBAAqB,CAAC;IACrC;IACAH,OAAO,CAACG,IAAI,CAAC,KAAK,CAACJ,iBAAiB,CAAC,CAAC,CAAC;IACvC,OAAOC,OAAO,CAACI,IAAI,CAAC,GA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AAK,GAAG,IAAK;MAC1DC,eAAe,EAAEzD,KAAK,CAAC0D,IAAI,KAAK,UAAU,IAAI,CAAC1D,KAAK,CAAC2D,QAAQ,GAAG,IAAI,GAAG,KAAM;MAC7EC,aAAa,EAAE5D,KAAK,CAAC4D,aAAc;MACnCC,UAAU,EAAE,IAAI,CAACC,WAAY;MAC7BH,QAAQ,EAAE3D,KAAK,CAAC2D,QAAS;MACzBI,SAAS,EAAE/D,KAAK,CAACgE,QAAS;MAC1BC,WAAW,EAAEjE,KAAK,CAACiE,WAAY;MAC/BC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAAC7D,MAAM,CAACiC,IAAI,CAAC6B,UAAU,KAAK,MAAO;MAC9DC,cAAc,EAAE3E,KAAK,CAAC4E;IAAe,EACtC,CAAC;EAER;AACF","ignoreList":[]}
@@ -9,6 +9,7 @@ export default class WmTextProps extends BaseInputProps {
9
9
  _defineProperty(this, "placeholder", 'Enter text');
10
10
  _defineProperty(this, "skeletonheight", null);
11
11
  _defineProperty(this, "skeletonwidth", null);
12
+ _defineProperty(this, "autocapitalize", 'none');
12
13
  }
13
14
  }
14
15
  //# sourceMappingURL=text.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseInputProps","WmTextProps","constructor","args","_defineProperty"],"sources":["text.props.ts"],"sourcesContent":["import BaseInputProps from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props\";\n\nexport default class WmTextProps extends BaseInputProps {\n floatinglabel?: string;\n placeholder: string = 'Enter text';\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,WAAW,SAASD,cAAc,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,sBAEhC,YAAY;IAAAA,eAAA,yBACR,IAAI;IAAAA,eAAA,wBACL,IAAI;EAAA;AAC/B","ignoreList":[]}
1
+ {"version":3,"names":["BaseInputProps","WmTextProps","constructor","args","_defineProperty"],"sources":["text.props.ts"],"sourcesContent":["import BaseInputProps from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props\";\n\nexport default class WmTextProps extends BaseInputProps {\n floatinglabel?: string;\n placeholder: string = 'Enter text';\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n autocapitalize?: string = 'none';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,WAAW,SAASD,cAAc,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,sBAEhC,YAAY;IAAAA,eAAA,yBACR,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,yBACH,MAAM;EAAA;AAClC","ignoreList":[]}
@@ -22,6 +22,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
22
22
  invalid: {
23
23
  borderBottomColor: themeVariables.inputInvalidBorderColor
24
24
  },
25
+ focused: {
26
+ borderColor: themeVariables.inputFocusBorderColor
27
+ },
25
28
  placeholderText: {
26
29
  color: themeVariables.inputPlaceholderColor
27
30
  },
@@ -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","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 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 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 },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAyB,wCAAwC;AAClF,SAAqBC,YAAY,QAAQ,+CAA+C;AAYxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEX,cAAc,CAACY,gBAAgB;MAC5CC,eAAe,EAAEb,cAAc,CAACc,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEhB,cAAc,CAACiB;IAC7B,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE;IACZ,CAAC;IACDC,OAAO,EAAE;MACPC,iBAAiB,EAAErB,cAAc,CAACsB;IACpC,CAAC;IACDC,eAAe,EAAE;MACjBC,KAAK,EAAExB,cAAc,CAACyB;IACtB,CAAC;IACDC,aAAa,EAAE,CAAC,CAAC;IACjBC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,QAAQ,EAAE;MACRzB,IAAI,EAAE;QACJ0B,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVf,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFd,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLU,eAAe,EAAEb,cAAc,CAAC+B;IAClC;EACJ,CAAC,CAAC;EACF9B,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCK,IAAI,EAAC;MACH6B,SAAS,EAAE;IACb;EACJ,CAAC,CAAC;EACF/B,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDsB,aAAa,EAAE;MACbO,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRhB,QAAQ,EAAE,EAAE;MACZK,KAAK,EAAExB,cAAc,CAACoC;IACxB,CAAC;IACDT,mBAAmB,EAAE;MACnBH,KAAK,EAAExB,cAAc,CAACqC;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","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 },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAyB,wCAAwC;AAClF,SAAqBC,YAAY,QAAQ,+CAA+C;AAaxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE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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":[]}
@@ -56,9 +56,11 @@ export default class WmTextarea extends BaseInputComponent {
56
56
  }
57
57
  },
58
58
  placeholderTextColor: this.styles.placeholderText.color,
59
- style: [this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid],
59
+ isInputFocused: this.state.isInputFocused,
60
+ style: [this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}],
60
61
  multiline: true,
61
62
  numberOfLines: 4,
63
+ background: this._background,
62
64
  keyboardType: this.state.keyboardType
63
65
  }, opts, {
64
66
  floatingLabel: props.floatinglabel,
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","WMTextInput","isNull","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmTextareaState","WmTextarea","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","styles","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXTAREA","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","placeholderText","color","style","text","isValid","invalid","multiline","numberOfLines","keyboardType","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["textarea.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform } from 'react-native';\nimport WmTextareaProps from './textarea.props';\nimport { DEFAULT_CLASS, WmTextareaStyles } from './textarea.styles';\nimport {\n BaseInputComponent,\n BaseInputState\n} from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTextareaState extends BaseInputState<WmTextareaProps> {}\n\nexport default class WmTextarea extends BaseInputComponent<WmTextareaProps, WmTextareaState, WmTextareaStyles> {\n\n constructor(props: WmTextareaProps) {\n super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-textarea-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public renderSkeleton(props: WmTextareaProps): React.ReactNode {\n let skeletonWidth, skeletonHeight;\n if(this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height;\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n\n renderWidget(props: WmTextareaProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return ( <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXTAREA,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n placeholderTextColor={this.styles.placeholderText.color as any}\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid]}\n multiline={true}\n numberOfLines={4}\n keyboardType={this.state.keyboardType}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n maxLength={props.maxchars}\n placeholder={props.placeholder || 'Place your text'}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,QAAQ,cAAc;AACvD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,kBAAkB,EAClBC,cAAc,QACT,0EAA0E;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO,MAAMC,eAAe,SAASN,cAAc,CAAkB;AAErE,eAAe,MAAMO,UAAU,SAASR,kBAAkB,CAAqD;EAE7GS,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIS,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEOI,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,K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U;MAC3BC,QAAQ,EAAEtD,KAAK,CAACuD,QAAQ,IAAIvD,KAAK,CAACwD,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,SAAS,EAAEzD,KAAK,CAAC0D,QAAS;MAC1BC,WAAW,EAAE3D,KAAK,CAAC2D,WAAW,IAAI,iBAAkB;MACpDC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAACvD,MAAM,CAAC4B,IAAI,CAAC4B,UAAU,KAAK;IAAO,EAC/D,CAAC;EACJ;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","WMTextInput","isNull","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmTextareaState","WmTextarea","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","styles","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXTAREA","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","placeholderText","color","isInputFocused","style","text","isValid","invalid","focused","multiline","numberOfLines","background","_background","keyboardType","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect"],"sources":["textarea.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform } from 'react-native';\nimport WmTextareaProps from './textarea.props';\nimport { DEFAULT_CLASS, WmTextareaStyles } from './textarea.styles';\nimport {\n BaseInputComponent,\n BaseInputState\n} from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTextareaState extends BaseInputState<WmTextareaProps> {}\n\nexport default class WmTextarea extends BaseInputComponent<WmTextareaProps, WmTextareaState, WmTextareaStyles> {\n\n constructor(props: WmTextareaProps) {\n super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-textarea-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public renderSkeleton(props: WmTextareaProps): React.ReactNode {\n let skeletonWidth, skeletonHeight;\n if(this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height;\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n\n renderWidget(props: WmTextareaProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return ( <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXTAREA,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n placeholderTextColor={this.styles.placeholderText.color as any}\n isInputFocused={ this.state.isInputFocused }\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]}\n multiline={true}\n numberOfLines={4}\n background={this._background}\n keyboardType={this.state.keyboardType}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n maxLength={props.maxchars}\n placeholder={props.placeholder || 'Place your text'}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n />);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,QAAQ,cAAc;AACvD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,kBAAkB,EAClBC,cAAc,QACT,0EAA0E;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO,MAAMC,eAAe,SAASN,cAAc,CAAkB;AAErE,eAAe,MAAMO,UAAU,SAASR,kBAAkB,CAAqD;EAE7GS,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA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,aAAa,EAAE,CAAE;MACjBC,UAAU,EAAE,IAAI,CAACC,WAAY;MAC7BC,YAAY,EAAE,IAAI,CAAC9C,KAAK,CAAC8C;IAAa,GAClC3B,IAAI;MACR4B,aAAa,EAAElD,KAAK,CAACI,aAAc;MACnC+C,kBAAkB,EAAE,IAAI,CAACvC,MAAM,CAACsC,aAAc;MAC9CE,wBAAwB,EAAE,IAAI,CAACxC,MAAM,CAACyC,mBAAoB;MAC1DC,YAAY,EAAEtD,KAAK,CAACuD,YAAY,GAAG,UAAU,GAAG,KAAM;MACtDC,SAAS,EAAExD,KAAK,CAACyD,SAAU;MAC3BC,QAAQ,EAAE1D,KAAK,CAAC2D,QAAQ,IAAI3D,KAAK,CAAC4D,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,SAAS,EAAE7D,KAAK,CAAC8D,QAAS;MAC1BC,WAAW,EAAE/D,KAAK,CAAC+D,WAAW,IAAI,iBAAkB;MACpDC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAAC3D,MAAM,CAAC6B,IAAI,CAAC+B,UAAU,KAAK;IAAO,EAC/D,CAAC;EACJ;AACF","ignoreList":[]}
@@ -22,6 +22,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
22
22
  invalid: {
23
23
  borderBottomColor: 'red'
24
24
  },
25
+ focused: {
26
+ borderColor: themeVariables.inputFocusBorderColor
27
+ },
25
28
  placeholderText: {
26
29
  color: themeVariables.inputPlaceholderColor
27
30
  },
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","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","placeholderText","color","inputPlaceholderColor","skeleton","width","height","inputDisabledBgColor","textAlign","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';\n\nexport type WmTextareaStyles = BaseStyles & {\n invalid: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\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 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 });\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;AAWxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,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,eAAe,EAAE;MACfC,KAAK,EAAEvB,cAAc,CAACwB;IACxB,CAAC;IACDC,QAAQ,EAAE;MACRtB,IAAI,EAAE;QACJuB,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVhB,YAAY,EAAE;MAChB;IACF;EACJ,CAAC,CAAC;EAEFV,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;EAC1CD,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLM,eAAe,EAAET,cAAc,CAAC4B;IAClC;EACJ,CAAC,CAAC;EACF3B,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACnCK,IAAI,EAAC;MACH0B,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EACF5B,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CiB,IAAI,EAAC;MACHe,UAAU,EAAE;IACd,CAAC;IACDZ,aAAa,EAAE;MACba,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPC,IAAI,EAAE,EAAE;MACRjB,QAAQ,EAAE,EAAE;MACZO,KAAK,EAAEvB,cAAc,CAACkC;IACxB,CAAC;IACDf,mBAAmB,EAAE;MACnBI,KAAK,EAAEvB,cAAc,CAACmC;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","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","inputDisabledBgColor","textAlign","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';\n\nexport type WmTextareaStyles = 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-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 });\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;AAYxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI,EAAE;MACJC,OAAO,EAAC,EAAE;MACVC,WAAW,EAAC,CAAC;MACbC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAA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,CAAC,CAAC","ignoreList":[]}
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { KeyboardAvoidingView, View } from 'react-native';
2
+ import { View } from 'react-native';
3
3
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
4
- import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
5
4
  import { DEFAULT_CLASS } from './content.styles';
6
5
  export class WmContentState extends BaseComponentState {}
7
6
  export default class WmContent extends BaseComponent {
@@ -9,23 +8,9 @@ export default class WmContent extends BaseComponent {
9
8
  super(props, DEFAULT_CLASS);
10
9
  }
11
10
  renderWidget(props) {
12
- return /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Consumer, null, (insets = {
13
- top: 0,
14
- bottom: 0,
15
- left: 0,
16
- right: 0
17
- }) => {
18
- const keyboardOffset = insets === null || insets === void 0 ? void 0 : insets.bottom;
19
- return /*#__PURE__*/React.createElement(View, {
20
- style: this.styles.root
21
- }, /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
22
- behavior: "position",
23
- keyboardVerticalOffset: keyboardOffset,
24
- style: {
25
- flex: 1
26
- }
27
- }, this._background, props.children));
28
- });
11
+ return /*#__PURE__*/React.createElement(View, {
12
+ style: this.styles.root
13
+ }, this._background, props.children);
29
14
  }
30
15
  }
31
16
  //# sourceMappingURL=content.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","KeyboardAvoidingView","View","BaseComponent","BaseComponentState","SafeAreaInsetsContext","DEFAULT_CLASS","WmContentState","WmContent","constructor","props","renderWidget","createElement","Consumer","insets","top","bottom","left","right","keyboardOffset","style","styles","root","behavior","keyboardVerticalOffset","flex","_background","children"],"sources":["content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardAvoidingView, Platform, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\n\nimport WmContentProps from './content.props';\nimport { DEFAULT_CLASS, WmContentStyles } from './content.styles';\n\nexport class WmContentState extends BaseComponentState<WmContentProps> {\n\n}\n\nexport default class WmContent extends BaseComponent<WmContentProps, WmContentState, WmContentStyles> {\n\n constructor(props: WmContentProps) {\n super(props, DEFAULT_CLASS, );\n }\n\n renderWidget(props: WmContentProps) {\n return (\n <SafeAreaInsetsContext.Consumer>\n {(insets = {top: 0, bottom: 0, left: 0, right: 0}) => { \n const keyboardOffset = insets?.bottom;\n return (\n <View style={this.styles.root}>\n <KeyboardAvoidingView \n behavior=\"position\"\n keyboardVerticalOffset={keyboardOffset}\n style={{ flex: 1 }}>\n {this._background}\n {props.children}\n </KeyboardAvoidingView>\n </View>\n );\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,oBAAoB,EAAYC,IAAI,QAAQ,cAAc;AACnE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,SAASC,qBAAqB,QAAQ,gCAAgC;AAGtE,SAASC,aAAa,QAAyB,kBAAkB;AAEjE,OAAO,MAAMC,cAAc,SAASH,kBAAkB,CAAiB;AAIvE,eAAe,MAAMI,SAAS,SAASL,aAAa,CAAkD;EAEpGM,WAAWA,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAe,CAAC;EAC/B;EAEAK,YAAYA,CAACD,KAAqB,EAAE;IAClC,oBACEV,KAAA,CAAAY,aAAA,CAACP,qBAAqB,CAACQ,QAAQ,QAC9B,CAACC,MAAM,GAAG;MAACC,GAAG,EAAE,CAAC;MAAEC,MAAM,EAAE,CAAC;MAAEC,IAAI,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAC,CAAC,KAAK;MACnD,MAAMC,cAAc,GAAGL,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEE,MAAM;MACpC,oBACEhB,KAAA,CAAAY,aAAA,CAACV,IAAI;QAACkB,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;MAAK,gBAC5BtB,KAAA,CAAAY,aAAA,CAACX,oBAAoB;QACnBsB,QAAQ,EAAC,UAAU;QACnBC,sBAAsB,EAAEL,cAAe;QACvCC,KAAK,EAAE;UAAEK,IAAI,EAAE;QAAE;MAAE,GAClB,IAAI,CAACC,WAAW,EAChBhB,KAAK,CAACiB,QACa,CAClB,CAAC;IAEX,CAC8B,CAAC;EAErC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","DEFAULT_CLASS","WmContentState","WmContent","constructor","props","renderWidget","createElement","style","styles","root","_background","children"],"sources":["content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardAvoidingView, Platform, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\n\nimport WmContentProps from './content.props';\nimport { DEFAULT_CLASS, WmContentStyles } from './content.styles';\n\nexport class WmContentState extends BaseComponentState<WmContentProps> {\n\n}\n\nexport default class WmContent extends BaseComponent<WmContentProps, WmContentState, WmContentStyles> {\n\n constructor(props: WmContentProps) {\n super(props, DEFAULT_CLASS, );\n }\n \n renderWidget(props: WmContentProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyCC,IAAI,QAAQ,cAAc;AACnE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAIjG,SAASC,aAAa,QAAyB,kBAAkB;AAEjE,OAAO,MAAMC,cAAc,SAASF,kBAAkB,CAAiB;AAIvE,eAAe,MAAMG,SAAS,SAASJ,aAAa,CAAkD;EAEpGK,WAAWA,CAACC,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEJ,aAAe,CAAC;EAC/B;EAEAK,YAAYA,CAACD,KAAqB,EAAE;IAClC,oBACER,KAAA,CAAAU,aAAA,CAACT,IAAI;MAACU,KAAK,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GAC3B,IAAI,CAACC,WAAW,EAChBN,KAAK,CAACO,QACH,CAAC;EAEX;AACF","ignoreList":[]}
@@ -38,7 +38,10 @@ export default class WmLeftPanel extends BaseComponent {
38
38
  this.notify('scroll', [event]);
39
39
  },
40
40
  scrollEventThrottle: 48,
41
- contentContainerStyle: this.styles.root
41
+ contentContainerStyle: [this.styles.root, {
42
+ width: "100%",
43
+ maxWidth: "100%"
44
+ }]
42
45
  }, this._background, this.renderContent(props));
43
46
  }
44
47
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","BaseComponent","BaseComponentState","WmLeftPanelProps","DEFAULT_CLASS","ScrollView","WmLeftPanelState","constructor","args","_defineProperty","WmLeftPanel","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","renderWidget","createElement","onScroll","event","notify","scrollEventThrottle","contentContainerStyle","styles","root","_background"],"sources":["left-panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLeftPanelProps from './left-panel.props';\nimport { DEFAULT_CLASS, WmLeftPanelStyles } from './left-panel.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nexport class WmLeftPanelState extends BaseComponentState<WmLeftPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmLeftPanel extends BaseComponent<WmLeftPanelProps, WmLeftPanelState, WmLeftPanelStyles> {\n\n constructor(props: WmLeftPanelProps) {\n super(props, DEFAULT_CLASS, new WmLeftPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmLeftPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmLeftPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n renderWidget(props: WmLeftPanelProps) {\n return (\n <ScrollView \n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}\n contentContainerStyle={this.styles.root}>\n {this._background}\n {this.renderContent(props)}\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAO,MAAMC,gBAAgB,SAASJ,kBAAkB,CAAmB;EAAAK,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,0BACvD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,WAAW,SAAST,aAAa,CAAwD;EAE5GM,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,CAAC;EACrD;EAEAS,aAAaA,CAAA,EAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAClD;EAEAC,aAAaA,CAACH,KAAuB,EAAE;IACrC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACC,WAAW,CAAC;YACfF,eAAe,EAAE;UACnB,CAAqB,CAAC;QACxB,CAAC,CAAC;MACJ;MACA,OAAON,KAAK,CAACI,aAAa,CAACJ,KAAK,EAAE,IAAI,CAACC,aAAa,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;IAClE;IACA,OAAOT,KAAK,CAACU,QAAQ;EACvB;EAEAC,YAAYA,CAACX,KAAuB,EAAE;IACpC,oBACEX,KAAA,CAAAuB,aAAA,CAAClB,UAAU;MACTmB,QAAQ,EAAGC,KAAK,IAAK;QAAC,IAAI,CAACC,MAAM,CAAC,QAAQ,EAAE,CAACD,KAAK,CAAC,CAAC;MAAA,CAAE;MACtDE,mBAAmB,EAAE,EAAG;MACxBC,qBAAqB,EAAE,IAAI,CAACC,MAAM,CAACC;IAAK,GACvC,IAAI,CAACC,WAAW,EAChB,IAAI,CAACjB,aAAa,CAACH,KAAK,CACf,CAAC;EAEjB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","BaseComponent","BaseComponentState","WmLeftPanelProps","DEFAULT_CLASS","ScrollView","WmLeftPanelState","constructor","args","_defineProperty","WmLeftPanel","props","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","renderWidget","createElement","onScroll","event","notify","scrollEventThrottle","contentContainerStyle","styles","root","width","maxWidth","_background"],"sources":["left-panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLeftPanelProps from './left-panel.props';\nimport { DEFAULT_CLASS, WmLeftPanelStyles } from './left-panel.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nexport class WmLeftPanelState extends BaseComponentState<WmLeftPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmLeftPanel extends BaseComponent<WmLeftPanelProps, WmLeftPanelState, WmLeftPanelStyles> {\n\n constructor(props: WmLeftPanelProps) {\n super(props, DEFAULT_CLASS, new WmLeftPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmLeftPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmLeftPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n renderWidget(props: WmLeftPanelProps) {\n return (\n <ScrollView \n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}\n contentContainerStyle={[this.styles.root, {width: \"100%\", maxWidth: \"100%\"}]}>\n {this._background}\n {this.renderContent(props)}\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAO,MAAMC,gBAAgB,SAASJ,kBAAkB,CAAmB;EAAAK,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,0BACvD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,WAAW,SAAST,aAAa,CAAwD;EAE5GM,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,CAAC;EACrD;EAEAS,aAAaA,CAAA,EAAG;IACd,IAAI,CAACC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;EAClD;EAEAC,aAAaA,CAACH,KAAuB,EAAE;IACrC,IAAIA,KAAK,CAACI,aAAa,EAAE;MACvB,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,eAAe,EAAE;QAC/BC,UAAU,CAAC,MAAM;UACf,IAAI,CAACC,WAAW,CAAC;YACfF,eAAe,EAAE;UACnB,CAAqB,CAAC;QACxB,CAAC,CAAC;MACJ;MACA,OAAON,KAAK,CAACI,aAAa,CAACJ,KAAK,EAAE,IAAI,CAACC,aAAa,CAACQ,IAAI,CAAC,IAAI,CAAC,CAAC;IAClE;IACA,OAAOT,KAAK,CAACU,QAAQ;EACvB;EAEAC,YAAYA,CAACX,KAAuB,EAAE;IACpC,oBACEX,KAAA,CAAAuB,aAAA,CAAClB,UAAU;MACTmB,QAAQ,EAAGC,KAAK,IAAK;QAAC,IAAI,CAACC,MAAM,CAAC,QAAQ,EAAE,CAACD,KAAK,CAAC,CAAC;MAAA,CAAE;MACtDE,mBAAmB,EAAE,EAAG;MACxBC,qBAAqB,EAAE,CAAC,IAAI,CAACC,MAAM,CAACC,IAAI,EAAE;QAACC,KAAK,EAAE,MAAM;QAAEC,QAAQ,EAAE;MAAM,CAAC;IAAE,GAC5E,IAAI,CAACC,WAAW,EAChB,IAAI,CAACnB,aAAa,CAACH,KAAK,CACf,CAAC;EAEjB;AACF","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { View } from 'react-native';
2
+ import { KeyboardAvoidingView, Platform, View } from 'react-native';
3
3
  import { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';
4
4
  import { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';
5
5
  import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';
@@ -7,6 +7,7 @@ import WmPageContentProps from './page-content.props';
7
7
  import { DEFAULT_CLASS } from './page-content.styles';
8
8
  import { ScrollView } from 'react-native-gesture-handler';
9
9
  import WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';
10
+ import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
10
11
  export class WmPageContentState extends BaseComponentState {}
11
12
  export default class WmPageContent extends BaseComponent {
12
13
  constructor(props) {
@@ -43,20 +44,50 @@ export default class WmPageContent extends BaseComponent {
43
44
  width: '100%',
44
45
  backgroundColor: this._showSkeleton && this.styles.skeleton.root.backgroundColor ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor
45
46
  }
46
- }, this._background, /*#__PURE__*/React.createElement(ScrollView, {
47
- contentContainerStyle: [this.styles.root, {
48
- backgroundColor: 'transparent'
49
- }],
50
- showsVerticalScrollIndicator: showScrollbar,
51
- onScroll: event => {
52
- this.notify('scroll', [event]);
53
- },
54
- scrollEventThrottle: 48
55
- }, props.children)) : /*#__PURE__*/React.createElement(View, {
47
+ }, this._background, /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Consumer, null, (insets = {
48
+ top: 0,
49
+ bottom: 0,
50
+ left: 0,
51
+ right: 0
52
+ }) => {
53
+ const keyboardOffset = (insets === null || insets === void 0 ? void 0 : insets.bottom) || 0;
54
+ const verticalOffset = Platform.OS === 'ios' ? keyboardOffset + 100 : keyboardOffset;
55
+ return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
56
+ behavior: Platform.OS === 'ios' ? 'padding' : undefined,
57
+ keyboardVerticalOffset: verticalOffset,
58
+ style: {
59
+ flex: 1
60
+ }
61
+ }, /*#__PURE__*/React.createElement(ScrollView, {
62
+ contentContainerStyle: [this.styles.root, {
63
+ backgroundColor: 'transparent'
64
+ }],
65
+ showsVerticalScrollIndicator: showScrollbar,
66
+ onScroll: event => {
67
+ this.notify('scroll', [event]);
68
+ },
69
+ scrollEventThrottle: 48
70
+ }, props.children));
71
+ })) : /*#__PURE__*/React.createElement(View, {
56
72
  style: [this.styles.root, {
57
73
  backgroundColor: this._showSkeleton ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor
58
74
  }]
59
- }, this._background, props.children);
75
+ }, /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Consumer, null, (insets = {
76
+ top: 0,
77
+ bottom: 0,
78
+ left: 0,
79
+ right: 0
80
+ }) => {
81
+ const keyboardOffset = (insets === null || insets === void 0 ? void 0 : insets.bottom) || 0;
82
+ const verticalOffset = Platform.OS === 'ios' ? keyboardOffset + 100 : keyboardOffset;
83
+ return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
84
+ behavior: Platform.OS === 'ios' ? 'padding' : undefined,
85
+ keyboardVerticalOffset: verticalOffset,
86
+ style: {
87
+ flex: 1
88
+ }
89
+ }, this._background, props.children);
90
+ }));
60
91
  }
61
92
  }
62
93
  //# sourceMappingURL=page-content.component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","isWebPreviewMode","HideMode","BaseComponent","BaseComponentState","WmPageContentProps","DEFAULT_CLASS","ScrollView","WmLottie","WmPageContentState","WmPageContent","constructor","props","hideMode","DONOT_ADD_TO_DOM","renderSkeleton","skeletonanimationresource","createElement","style","width","styles","root","content","skeleton","source","loop","autoplay","speed","skeletonanimationspeed","renderWidget","showScrollbar","scrollbarColor","scrollable","height","backgroundColor","_showSkeleton","_background","contentContainerStyle","showsVerticalScrollIndicator","onScroll","event","notify","scrollEventThrottle","children"],"sources":["page-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageContentProps from './page-content.props';\nimport { DEFAULT_CLASS, WmPageContentStyles } from './page-content.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';\n\nexport class WmPageContentState extends BaseComponentState<WmPageContentProps> {\n\n}\n\nexport default class WmPageContent extends BaseComponent<WmPageContentProps, WmPageContentState, WmPageContentStyles> {\n\n constructor(props: WmPageContentProps) {\n super(props, DEFAULT_CLASS, new WmPageContentProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n }\n\n public renderSkeleton(props: WmPageContentProps): React.ReactNode {\n if(this.props.skeletonanimationresource) {\n return <View style={[{width: '100%'}, this.styles.root]}>\n <WmLottie styles={{ content: {...this.styles.root, ...this.styles.skeleton.root} }} source={this.props.skeletonanimationresource} loop={true} autoplay={true} speed={this.props.skeletonanimationspeed}/>\n </View>\n } \n return null;\n } \n\n\n renderWidget(props: WmPageContentProps) {\n const showScrollbar = (this.styles.root as any).scrollbarColor != 'transparent';\n // return ((props.scrollable || isWebPreviewMode()) && !this._showSkeleton) ? (\n return (props.scrollable || isWebPreviewMode()) ? (\n <View style={{height: '100%', width: '100%', backgroundColor: this._showSkeleton && this.styles.skeleton.root.backgroundColor ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor}}>\n {this._background}\n <ScrollView contentContainerStyle={[this.styles.root, {backgroundColor: 'transparent'}]}\n showsVerticalScrollIndicator={showScrollbar}\n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}>\n {props.children}\n </ScrollView>\n </View>\n ) : (\n <View style={[this.styles.root, \n {backgroundColor: this._showSkeleton ? \n this.styles.skeleton.root.backgroundColor : \n this.styles.root.backgroundColor}]}>\n {this._background}\n {props.children}\n </View>\n ); \n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAC1E,SAASC,UAAU,QAAQ,8BAA8B;AACzD,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAO,MAAMC,kBAAkB,SAASL,kBAAkB,CAAqB;AAI/E,eAAe,MAAMM,aAAa,SAASP,aAAa,CAA8D;EAEpHQ,WAAWA,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEN,aAAa,EAAE,IAAID,kBAAkB,CAAC,CAAC,CAAC;IACrD,IAAI,CAACQ,QAAQ,GAAGX,QAAQ,CAACY,gBAAgB;EAC3C;EAEOC,cAAcA,CAACH,KAAyB,EAAmB;IAChE,IAAG,IAAI,CAACA,KAAK,CAACI,yBAAyB,EAAE;MACvC,oBAAOjB,KAAA,CAAAkB,aAAA,CAACjB,IAAI;QAACkB,KAAK,EAAE,CAAC;UAACC,KAAK,EAAE;QAAM,CAAC,EAAE,IAAI,CAACC,MAAM,CAACC,IAAI;MAAE,gBACvDtB,KAA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AK,CAAC+B,QACG,CACR,CAAC,gBAEP5C,KAAA,CAAAkB,aAAA,CAACjB,IAAI;MAACkB,KAAK,EAAE,CAAC,IAAI,CAACE,MAAM,CAACC,IAAI,EAC5B;QAACa,eAAe,EAAE,IAAI,CAACC,aAAa,GACpC,IAAI,CAACf,MAAM,CAACG,QAAQ,CAACF,IAAI,CAACa,eAAe,GACzC,IAAI,CAACd,MAAM,CAACC,IAAI,CAACa;MAAe,CAAC;IAAE,GAClC,IAAI,CAACE,WAAW,EAChBxB,KAAK,CAAC+B,QACH,CACP;EACH;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","KeyboardAvoidingView","Platform","View","isWebPreviewMode","HideMode","BaseComponent","BaseComponentState","WmPageContentProps","DEFAULT_CLASS","ScrollView","WmLottie","SafeAreaInsetsContext","WmPageContentState","WmPageContent","constructor","props","hideMode","DONOT_ADD_TO_DOM","renderSkeleton","skeletonanimationresource","createElement","style","width","styles","root","content","skeleton","source","loop","autoplay","speed","skeletonanimationspeed","renderWidget","showScrollbar","scrollbarColor","scrollable","height","backgroundColor","_showSkeleton","_background","Consumer","insets","top","bottom","left","right","keyboardOffset","verticalOffset","OS","behavior","undefined","keyboardVerticalOffset","flex","contentContainerStyle","showsVerticalScrollIndicator","onScroll","event","notify","scrollEventThrottle","children"],"sources":["page-content.component.tsx"],"sourcesContent":["import React from 'react';\nimport { KeyboardAvoidingView, Platform, View } from 'react-native';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport { HideMode } from '@wavemaker/app-rn-runtime/core/if.component';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmPageContentProps from './page-content.props';\nimport { DEFAULT_CLASS, WmPageContentStyles } from './page-content.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\n\nexport class WmPageContentState extends BaseComponentState<WmPageContentProps> {\n\n}\n\nexport default class WmPageContent extends BaseComponent<WmPageContentProps, WmPageContentState, WmPageContentStyles> {\n\n constructor(props: WmPageContentProps) {\n super(props, DEFAULT_CLASS, new WmPageContentProps());\n this.hideMode = HideMode.DONOT_ADD_TO_DOM;\n }\n\n public renderSkeleton(props: WmPageContentProps): React.ReactNode {\n if(this.props.skeletonanimationresource) {\n return <View style={[{width: '100%'}, this.styles.root]}>\n <WmLottie styles={{ content: {...this.styles.root, ...this.styles.skeleton.root} }} source={this.props.skeletonanimationresource} loop={true} autoplay={true} speed={this.props.skeletonanimationspeed}/>\n </View>\n } \n return null;\n } \n\n\n renderWidget(props: WmPageContentProps) {\n const showScrollbar = (this.styles.root as any).scrollbarColor != 'transparent';\n // return ((props.scrollable || isWebPreviewMode()) && !this._showSkeleton) ? (\n return (props.scrollable || isWebPreviewMode()) ? (\n <View style={{height: '100%', width: '100%', backgroundColor: this._showSkeleton && this.styles.skeleton.root.backgroundColor ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor}}>\n {this._background}\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n const keyboardOffset = insets?.bottom || 0;\n const verticalOffset = Platform.OS === 'ios' ? keyboardOffset + 100 : keyboardOffset;\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={verticalOffset}\n style={{ flex: 1 }}>\n <ScrollView contentContainerStyle={[this.styles.root, {backgroundColor: 'transparent'}]}\n showsVerticalScrollIndicator={showScrollbar}\n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}>\n {props.children}\n </ScrollView>\n </KeyboardAvoidingView>\n )}}\n </SafeAreaInsetsContext.Consumer>\n </View> \n ) : (\n <View style={[this.styles.root,\n {backgroundColor: this._showSkeleton ?\n this.styles.skeleton.root.backgroundColor : \n this.styles.root.backgroundColor}]}>\n <SafeAreaInsetsContext.Consumer>\n {(insets = { top: 0, bottom: 0, left: 0, right: 0 }) => {\n const keyboardOffset = insets?.bottom || 0;\n const verticalOffset = Platform.OS === 'ios' ? keyboardOffset + 100 : keyboardOffset;\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={verticalOffset}\n style={{ flex: 1 }}>\n {this._background}\n {props.children}\n </KeyboardAvoidingView>\n )}}\n </SafeAreaInsetsContext.Consumer>\n </View>\n );\n }\n }\n "],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,oBAAoB,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AACnE,SAASC,gBAAgB,QAAQ,sCAAsC;AACvE,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,SAASC,aAAa,QAA6B,uBAAuB;AAC1E,SAASC,UAAU,QAAQ,8BAA8B;AACzD,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE,OAAO,MAAMC,kBAAkB,SAASN,kBAAkB,CAAqB;AAI/E,eAAe,MAAMO,aAAa,SAASR,aAAa,CAA8D;EAEpHS,WAAWA,CAACC,KAAyB,EAAE;IACrC,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,kBAAkB,CAAC,CAAC,CAAC;IACrD,IAAI,CAACS,QAAQ,GAAGZ,QAAQ,CAACa,gBAAgB;EAC3C;EAEOC,cAAcA,CAACH,KAAyB,EAAmB;IAChE,IAAG,IAAI,CAACA,KAAK,CAACI,yBAAyB,EAAE;MACvC,oBAAOpB,KAAA,CAAAqB,aAAA,CAAClB,IAAI;QAACmB,KAAK,EAAE,CAAC;UAACC,KAAK,EAAE;QAAM,CAAC,EAAE,IAAI,CAACC,MAAM,CAACC,IAAI;MAAE,gBACvDzB,KAAA,CAAA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AAG9C,QAAQ,CAAC+C,EAAE,KAAK,KAAK,GAAGF,cAAc,GAAG,GAAG,GAAGA,cAAc;MACpF,oBACE/C,KAAA,CAAAqB,aAAA,CAACpB,oBAAoB;QACnBiD,QAAQ,EAAEhD,QAAQ,CAAC+C,EAAE,KAAK,KAAK,GAAG,SAAS,GAAGE,SAAU;QACxDC,sBAAsB,EAAEJ,cAAe;QACvC1B,KAAK,EAAE;UAAE+B,IAAI,EAAE;QAAE;MAAE,GAClB,IAAI,CAACb,WAAW,EAChBxB,KAAK,CAAC4C,QACa,CAAC;IACxB,CAC2B,CAC5B,CACP;EACH;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["AppConfig.ts"],"sourcesContent":["export interface Drawer {\n setContent: (c: React.ReactNode) => void;\n getContent: () => React.ReactNode;\n setAnimation: (animation: string) => void;\n getAnimation: () => string;\n}\n\nexport default interface AppConfig {\n appId: string;\n assets: any;\n appProperties: any;\n appLocale: any;\n url: string;\n loadApp: boolean;\n refresh: (complete?: boolean) => void,\n currentPage?: any;\n pages?: any[];\n landingPage: string;\n partials?: any[];\n drawer: Drawer;\n app: any;\n spinner: any;\n setDrawerContent: any;\n theme: any;\n drawerType: any;\n getServiceDefinitions: any;\n loggedInUser: any;\n selectedLocale: string;\n}"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["AppConfig.ts"],"sourcesContent":["export interface Drawer {\n setContent: (c: React.ReactNode) => void;\n getContent: () => React.ReactNode;\n setAnimation: (animation: string) => void;\n getAnimation: () => string;\n}\n\nexport default interface AppConfig {\n appId: string;\n assets: any;\n appProperties: any;\n appLocale: any;\n url: string;\n leftNavWidth: any;\n loadApp: boolean;\n refresh: (complete?: boolean) => void,\n currentPage?: any;\n pages?: any[];\n landingPage: string;\n partials?: any[];\n drawer: Drawer;\n app: any;\n spinner: any;\n setDrawerContent: any;\n theme: any;\n drawerType: any;\n getServiceDefinitions: any;\n loggedInUser: any;\n selectedLocale: string;\n diagnostics: {\n appStartTime: number,\n appReadyTime: number,\n pageStartTime: number,\n pageReadyTime: number\n }\n}"],"mappings":"","ignoreList":[]}
@@ -4,7 +4,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
4
4
  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); }
5
5
  import { assign, isUndefined, isNil } from 'lodash';
6
6
  import React from 'react';
7
- import { AccessibilityInfo, Platform } from 'react-native';
7
+ import { AccessibilityInfo, Platform, StyleSheet, View } from 'react-native';
8
8
  import * as Animatable from 'react-native-animatable';
9
9
  import ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
10
10
  import { StyleProps, getStyleName } from '@wavemaker/app-rn-runtime/styles/style-props';
@@ -22,6 +22,7 @@ import { FixedView } from './fixed-view.component';
22
22
  import { TextIdPrefixConsumer } from './testid.provider';
23
23
  import { isScreenReaderEnabled } from './accessibility';
24
24
  import { TappableContext } from './tappable.component';
25
+ import { WmComponentNode } from './wm-component-tree';
25
26
  export const WIDGET_LOGGER = ROOT_LOGGER.extend('widget');
26
27
  export const ParentContext = /*#__PURE__*/React.createContext(null);
27
28
  export class BaseComponentState {
@@ -30,6 +31,7 @@ export class BaseComponentState {
30
31
  _defineProperty(this, "animatableProps", undefined);
31
32
  _defineProperty(this, "props", {});
32
33
  _defineProperty(this, "hide", false);
34
+ _defineProperty(this, "highlight", false);
33
35
  }
34
36
  }
35
37
  export function defineStyles(styles) {
@@ -65,6 +67,7 @@ export class BaseComponent extends React.Component {
65
67
  _defineProperty(this, "hideMode", HideMode.ADD_TO_DOM);
66
68
  _defineProperty(this, "propertyProvider", void 0);
67
69
  _defineProperty(this, "proxy", void 0);
70
+ _defineProperty(this, "_INSTANCE", void 0);
68
71
  _defineProperty(this, "initialized", false);
69
72
  _defineProperty(this, "cleanup", []);
70
73
  _defineProperty(this, "theme", BASE_THEME);
@@ -82,8 +85,12 @@ export class BaseComponent extends React.Component {
82
85
  _defineProperty(this, "testIdPrefix", '');
83
86
  _defineProperty(this, "_showView", true);
84
87
  _defineProperty(this, "closestTappable", void 0);
88
+ _defineProperty(this, "componentNode", void 0);
85
89
  this.state = defaultState || {};
86
90
  this.notifier.name = this.props.name || '';
91
+ this.componentNode = new WmComponentNode({
92
+ instance: this
93
+ });
87
94
  this.propertyProvider = new PropsProvider(assign({
88
95
  show: true
89
96
  }, defaultProps), assign({}, markupProps), (name, $new, $old) => {
@@ -105,6 +112,7 @@ export class BaseComponent extends React.Component {
105
112
  });
106
113
  //@ts-ignore
107
114
  this.state.props = this.propertyProvider.get();
115
+ this._INSTANCE = this;
108
116
  //@ts-ignore
109
117
  this._showView = !this.props.deferload;
110
118
  this.propertyProvider.check();
@@ -247,11 +255,13 @@ export class BaseComponent extends React.Component {
247
255
  }
248
256
  }
249
257
  componentWillUnmount() {
258
+ var _this$parent;
250
259
  this.destroyed = true;
251
260
  if (this.props.listener && this.props.listener.onComponentDestroy) {
252
261
  this.props.listener.onComponentDestroy(this.proxy);
253
262
  }
254
263
  this.cleanup.forEach(f => f && f());
264
+ (_this$parent = this.parent) === null || _this$parent === void 0 || (_this$parent = _this$parent.componentNode) === null || _this$parent === void 0 || _this$parent.remove(this.componentNode);
255
265
  this.notifier.destroy();
256
266
  this.notifier.notify('destroy', []);
257
267
  }
@@ -294,6 +304,7 @@ export class BaseComponent extends React.Component {
294
304
  setParent(parent) {
295
305
  if (parent && this.parent !== parent) {
296
306
  this.parent = parent;
307
+ this.parent.componentNode.add(this.componentNode);
297
308
  this.notifier.setParent(parent.notifier);
298
309
  this.parentListenerDestroyers = [this.parent.subscribe('forceUpdate', () => {
299
310
  this.cleanRefresh();
@@ -341,7 +352,7 @@ export class BaseComponent extends React.Component {
341
352
  }
342
353
  setBackground() {
343
354
  const bgStyle = this.styles.root;
344
- this._background = /*#__PURE__*/React.createElement(BackgroundComponent, {
355
+ this._background = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BackgroundComponent, {
345
356
  image: bgStyle.backgroundImage,
346
357
  position: bgStyle.backgroundPosition,
347
358
  size: bgStyle.backgroundSize,
@@ -350,7 +361,22 @@ export class BaseComponent extends React.Component {
350
361
  style: {
351
362
  borderRadius: this.styles.root.borderRadius
352
363
  }
353
- });
364
+ }), this.state.highlight ? /*#__PURE__*/React.createElement(View, {
365
+ onTouchStart: () => {
366
+ this.setState({
367
+ highlight: false
368
+ });
369
+ },
370
+ style: [{
371
+ borderWidth: 2,
372
+ overflow: 'hidden',
373
+ backgroundColor: '#FFFF0033',
374
+ borderColor: 'orange',
375
+ borderStyle: 'dashed',
376
+ zIndex: 1000,
377
+ borderRadius: 0
378
+ }, StyleSheet.absoluteFill]
379
+ }) : null);
354
380
  delete this.styles.root['backgroundImage'];
355
381
  delete this.styles.root['backgroundPosition'];
356
382
  delete this.styles.root['backgroundResizeMode'];
@@ -403,9 +429,9 @@ export class BaseComponent extends React.Component {
403
429
  return /*#__PURE__*/React.createElement(AssetConsumer, null, loadAsset => {
404
430
  this.loadAsset = loadAsset;
405
431
  return /*#__PURE__*/React.createElement(ParentContext.Consumer, null, parent => {
406
- var _this$parent;
432
+ var _this$parent2;
407
433
  this.setParent(parent);
408
- this._showSkeleton = this.state.props.showskeleton !== false && (((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent._showSkeleton) || this.state.props.showskeleton === true);
434
+ this._showSkeleton = this.state.props.showskeleton !== false && (((_this$parent2 = this.parent) === null || _this$parent2 === void 0 ? void 0 : _this$parent2._showSkeleton) || this.state.props.showskeleton === true);
409
435
  return /*#__PURE__*/React.createElement(ParentContext.Provider, {
410
436
  value: this
411
437
  }, /*#__PURE__*/React.createElement(ThemeConsumer, null, theme => {