@wavemaker/app-rn-runtime 12.0.0-next.45503 → 12.0.0-rc.5849

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +13 -2
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/carousel/carousel.props.js +1 -0
  4. app-rn-runtime/components/advanced/carousel/carousel.props.js.map +1 -1
  5. app-rn-runtime/components/advanced/carousel/carousel.styles.js +15 -0
  6. app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
  7. app-rn-runtime/components/basic/anchor/anchor.component.js +15 -5
  8. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  9. app-rn-runtime/components/basic/anchor/anchor.styles.js +3 -0
  10. app-rn-runtime/components/basic/anchor/anchor.styles.js.map +1 -1
  11. app-rn-runtime/components/basic/button/button.component.js +15 -2
  12. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  13. app-rn-runtime/components/basic/icon/icon.component.js +10 -2
  14. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  15. app-rn-runtime/components/basic/label/label.component.js +13 -3
  16. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  17. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  18. app-rn-runtime/components/basic/search/search.component.js +9 -0
  19. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  20. app-rn-runtime/components/basic/search/search.props.js +2 -0
  21. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  22. app-rn-runtime/components/basic/search/search.styles.js +5 -0
  23. app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
  24. app-rn-runtime/components/basic/skeleton/skeleton.component.js +4 -3
  25. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  26. app-rn-runtime/components/basic/skeleton/skeleton.props.js +9 -1
  27. app-rn-runtime/components/basic/skeleton/skeleton.props.js.map +1 -1
  28. app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
  29. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  30. app-rn-runtime/components/chart/area-chart/area-chart.styles.js +7 -1
  31. app-rn-runtime/components/chart/area-chart/area-chart.styles.js.map +1 -1
  32. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js +7 -1
  33. app-rn-runtime/components/chart/bar-chart/bar-chart.styles.js.map +1 -1
  34. app-rn-runtime/components/chart/basechart.component.js +23 -0
  35. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  36. app-rn-runtime/components/chart/basechart.props.js +2 -2
  37. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  38. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  39. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +1 -1
  40. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  41. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js +7 -1
  42. app-rn-runtime/components/chart/bubble-chart/bubble-chart.styles.js.map +1 -1
  43. app-rn-runtime/components/chart/column-chart/column-chart.styles.js +7 -1
  44. app-rn-runtime/components/chart/column-chart/column-chart.styles.js.map +1 -1
  45. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js +7 -1
  46. app-rn-runtime/components/chart/donut-chart/donut-chart.styles.js.map +1 -1
  47. app-rn-runtime/components/chart/line-chart/line-chart.props.js +2 -0
  48. app-rn-runtime/components/chart/line-chart/line-chart.props.js.map +1 -1
  49. app-rn-runtime/components/chart/line-chart/line-chart.styles.js +7 -1
  50. app-rn-runtime/components/chart/line-chart/line-chart.styles.js.map +1 -1
  51. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -1
  52. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  53. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js +7 -1
  54. app-rn-runtime/components/chart/pie-chart/pie-chart.styles.js.map +1 -1
  55. app-rn-runtime/components/container/accordion/accordion.component.js +58 -11
  56. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  57. app-rn-runtime/components/container/accordion/accordion.props.js.map +1 -1
  58. app-rn-runtime/components/container/accordion/accordion.styles.js +4 -0
  59. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  60. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +11 -1
  61. app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
  62. app-rn-runtime/components/container/container.component.js +36 -2
  63. app-rn-runtime/components/container/container.component.js.map +1 -1
  64. app-rn-runtime/components/container/container.styles.js +7 -0
  65. app-rn-runtime/components/container/container.styles.js.map +1 -1
  66. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js +5 -1
  67. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.component.js.map +1 -1
  68. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js +6 -1
  69. app-rn-runtime/components/container/layoutgrid/gridrow/gridrow.styles.js.map +1 -1
  70. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +28 -2
  71. app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
  72. app-rn-runtime/components/container/layoutgrid/layoutgrid.props.js.map +1 -1
  73. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js +4 -1
  74. app-rn-runtime/components/container/layoutgrid/layoutgrid.styles.js.map +1 -1
  75. app-rn-runtime/components/container/linearlayout/linearlayout.component.js +31 -5
  76. app-rn-runtime/components/container/linearlayout/linearlayout.component.js.map +1 -1
  77. app-rn-runtime/components/container/linearlayout/linearlayout.props.js.map +1 -1
  78. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js +4 -1
  79. app-rn-runtime/components/container/linearlayout/linearlayout.styles.js.map +1 -1
  80. app-rn-runtime/components/container/panel/panel.component.js +43 -4
  81. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  82. app-rn-runtime/components/container/panel/panel.props.js.map +1 -1
  83. app-rn-runtime/components/container/panel/panel.styles.js +3 -0
  84. app-rn-runtime/components/container/panel/panel.styles.js.map +1 -1
  85. app-rn-runtime/components/container/partial-host.component.js.map +1 -1
  86. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +1 -1
  87. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  88. app-rn-runtime/components/container/tabs/tabheader/tabheader.props.js.map +1 -1
  89. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
  90. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  91. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  92. app-rn-runtime/components/container/tabs/tabs.component.js +41 -5
  93. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  94. app-rn-runtime/components/container/tabs/tabs.props.js.map +1 -1
  95. app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
  96. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  97. app-rn-runtime/components/container/tile/tile.component.js +28 -2
  98. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  99. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  100. app-rn-runtime/components/container/tile/tile.styles.js +6 -1
  101. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  102. app-rn-runtime/components/container/wizard/wizard.component.js +39 -6
  103. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  104. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  105. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
  106. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  107. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
  108. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  109. app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
  110. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  111. app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
  112. app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
  113. app-rn-runtime/components/data/card/card.component.js +18 -0
  114. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  115. app-rn-runtime/components/data/card/card.styles.js +3 -0
  116. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  117. app-rn-runtime/components/data/form/form.component.js +1 -1
  118. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  119. app-rn-runtime/components/data/form/form.props.js +1 -0
  120. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  121. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  122. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  123. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
  124. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  125. app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
  126. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  127. app-rn-runtime/components/data/list/list.component.js +54 -33
  128. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  129. app-rn-runtime/components/data/list/list.props.js +1 -0
  130. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  131. app-rn-runtime/components/data/list/list.styles.js +9 -0
  132. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  133. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  134. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  135. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +21 -1
  136. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  137. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
  138. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  139. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
  140. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  141. app-rn-runtime/components/input/fileupload/fileupload.component.js +4 -2
  142. app-rn-runtime/components/input/fileupload/fileupload.component.js.map +1 -1
  143. app-rn-runtime/components/input/fileupload/fileupload.props.js +1 -0
  144. app-rn-runtime/components/input/fileupload/fileupload.props.js.map +1 -1
  145. app-rn-runtime/components/input/radioset/radioset.component.js +21 -1
  146. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  147. app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
  148. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  149. app-rn-runtime/components/input/radioset/radioset.styles.js +1 -0
  150. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  151. app-rn-runtime/components/input/text/text.component.js +21 -0
  152. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  153. app-rn-runtime/components/input/text/text.props.js +2 -0
  154. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  155. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  156. app-rn-runtime/components/input/textarea/textarea.component.js +21 -0
  157. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  158. app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
  159. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  160. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  161. app-rn-runtime/components/page/content/content.component.js +19 -4
  162. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  163. app-rn-runtime/components/page/page-content/page-content.component.js +27 -2
  164. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  165. app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
  166. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  167. app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
  168. app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
  169. app-rn-runtime/components/page/page.component.js.map +1 -1
  170. app-rn-runtime/components/page/page.props.js.map +1 -1
  171. app-rn-runtime/components/page/page.styles.js +7 -1
  172. app-rn-runtime/components/page/page.styles.js.map +1 -1
  173. app-rn-runtime/components/page/partial/partial.component.js +27 -1
  174. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  175. app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
  176. app-rn-runtime/components/page/partial/partial.styles.js +6 -1
  177. app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
  178. app-rn-runtime/components/page/tabbar/tabbar.props.js +1 -0
  179. app-rn-runtime/components/page/tabbar/tabbar.props.js.map +1 -1
  180. app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
  181. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  182. app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
  183. app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
  184. app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
  185. app-rn-runtime/core/base.component.js +3 -2
  186. app-rn-runtime/core/base.component.js.map +1 -1
  187. app-rn-runtime/core/props.provider.js +1 -1
  188. app-rn-runtime/core/props.provider.js.map +1 -1
  189. app-rn-runtime/core/tappable.component.js +10 -4
  190. app-rn-runtime/core/tappable.component.js.map +1 -1
  191. app-rn-runtime/core/utils.js +21 -0
  192. app-rn-runtime/core/utils.js.map +1 -1
  193. app-rn-runtime/package.json +6 -4
  194. app-rn-runtime/runtime/App.js +2 -7
  195. app-rn-runtime/runtime/App.js.map +1 -1
  196. app-rn-runtime/runtime/base-fragment.component.js +28 -13
  197. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  198. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  199. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  200. app-rn-runtime/runtime/services/app-security.service.js +42 -2
  201. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  202. app-rn-runtime/styles/theme.js +5 -0
  203. app-rn-runtime/styles/theme.js.map +1 -1
  204. app-rn-runtime/styles/theme.variables.js +1 -0
  205. app-rn-runtime/styles/theme.variables.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmFileuploadProps","constructor","args","_defineProperty","undefined"],"sources":["fileupload.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {AccessibilityRole} from 'react-native';\n\nexport default class WmFileuploadProps extends BaseProps {\n iconclass: string = 'wm-sl-l sl-cloud-upload';\n iconsize: number = 16;\n caption: string = 'Upload';\n selectedFiles?: any;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACnC,yBAAyB;IAAAA,eAAA,mBAC1B,EAAE;IAAAA,eAAA,kBACH,QAAQ;IAAAA,eAAA;IAAAA,eAAA,6BAEIC,SAAS;IAAAD,eAAA,eACvBC,SAAS;EAAA;AAC3B","ignoreList":[]}
1
+ {"version":3,"names":["BaseProps","WmFileuploadProps","constructor","args","_defineProperty","undefined"],"sources":["fileupload.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {AccessibilityRole} from 'react-native';\n\nexport default class WmFileuploadProps extends BaseProps {\n iconclass: string = 'wm-sl-l sl-cloud-upload';\n iconsize: number = 16;\n caption: string = 'Upload';\n selectedFiles?: any;\n contenttype?: string;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAGzE,eAAe,MAAMC,iBAAiB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACnC,yBAAyB;IAAAA,eAAA,mBAC1B,EAAE;IAAAA,eAAA,kBACH,QAAQ;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGIC,SAAS;IAAAD,eAAA,eACvBC,SAAS;EAAA;AAC3B","ignoreList":[]}
@@ -11,6 +11,8 @@ import { BaseDatasetComponent, BaseDatasetState } from '@wavemaker/app-rn-runtim
11
11
  import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
12
12
  import { find, isEqual } from 'lodash-es';
13
13
  import { isEmpty } from 'lodash';
14
+ import WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';
15
+ import { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';
14
16
  export class WmRadiosetState extends BaseDatasetState {
15
17
  constructor(...args) {
16
18
  super(...args);
@@ -57,7 +59,7 @@ export default class WmRadioset extends BaseDatasetComponent {
57
59
  styles: item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio,
58
60
  disabled: this.state.props.readonly || this.state.props.disabled
59
61
  }), !isEmpty(this.state.template) && this.props.renderitempartial ? this.props.renderitempartial(item.dataObject, index, this.state.template) : /*#__PURE__*/React.createElement(Text, _extends({
60
- style: this.styles.radioLabel
62
+ style: [this.styles.radioLabel, item.selected ? this.styles.selectedLabel : null]
61
63
  }, this.getTestPropsForLabel('caption' + index)), displayText));
62
64
  }
63
65
  setTemplate(partialName) {
@@ -85,6 +87,24 @@ export default class WmRadioset extends BaseDatasetComponent {
85
87
  style: noOfColumns === 1 ? {} : this.styles.group
86
88
  }, items && items.length ? items.map((item, index) => this.renderChild(item, index, colWidth)) : null);
87
89
  }
90
+ renderSkeleton(props) {
91
+ var _ref;
92
+ const noOfColumns = props.itemsperrow.xs || 1;
93
+ const colWidth = Math.round(100 / noOfColumns) + '%';
94
+ return [...getNumberOfEmptyObjects((_ref = props.numberofskeletonitems) !== null && _ref !== void 0 ? _ref : 5)].map(_ => {
95
+ return /*#__PURE__*/React.createElement(View, {
96
+ style: [this.styles.item, {
97
+ width: colWidth
98
+ }]
99
+ }, /*#__PURE__*/React.createElement(WmIcon, {
100
+ styles: this.styles.checkedRadio
101
+ }), /*#__PURE__*/React.createElement(WmLabel, {
102
+ styles: {
103
+ skeleton: this.styles.skeleton
104
+ }
105
+ }));
106
+ });
107
+ }
88
108
  renderWidget(props) {
89
109
  const items = this.state.dataItems;
90
110
  return /*#__PURE__*/React.createElement(ScrollView, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","TouchableOpacity","ScrollView","WmRadiosetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","find","isEqual","isEmpty","WmRadiosetState","constructor","args","_defineProperty","WmRadioset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","value","getItemKey","createElement","_extends","style","styles","width","bind","getTestPropsForAction","id","getTestId","iconclass","checkedRadio","uncheckedRadio","template","renderitempartial","dataObject","radioLabel","getTestPropsForLabel","setTemplate","partialName","renderGroupby","groupedData","accessibilityRole","length","map","groupObj","groupHeaderTitle","renderRadioButtons","data","items","noOfColumns","itemsperrow","xs","Math","round","group","renderWidget","root","horizontal","groupby"],"sources":["radioset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, DimensionValue, TouchableOpacity } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nimport WmRadiosetProps from './radioset.props';\nimport { DEFAULT_CLASS, WmRadiosetStyles } from './radioset.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { find, forEach, isEqual } from 'lodash-es';\nimport { isEmpty } from 'lodash';\n\nexport class WmRadiosetState extends BaseDatasetState<WmRadiosetProps> {\n template: string = '';\n}\n\nexport default class WmRadioset extends BaseDatasetComponent<WmRadiosetProps, WmRadiosetState, WmRadiosetStyles> {\n\n constructor(props: WmRadiosetProps) {\n super(props, DEFAULT_CLASS, new WmRadiosetProps());\n }\n\n onPress(item: any) {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n item.selected = true;\n let selectedValue: any = \"\";\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));\n const oldValue = this.state.props.datavalue;\n selectedItem.selected = item.selected;\n selectedValue = selectedItem.selected ? selectedItem.datafield : null;\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmRadiosetState,() => {\n this.computeDisplayValue();\n this.invokeEventCallback('onChange', [ undefined, this.proxy, selectedValue, oldValue ]);\n });\n }\n\n renderChild(item: any, index: any, colWidth: DimensionValue) {\n const displayText = item.displayexp || item.displayfield;\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n return (\n <TouchableOpacity style={[\n this.styles.item,\n item.selected ? this.styles.selectedItem : null,\n {width: colWidth}]} onPress={this.onPress.bind(this, item)} key={item.key} {...this.getTestPropsForAction(\"radio\"+index)}>\n <WmIcon id={this.getTestId('radiobutton' + index)} iconclass=\"wi wi-fiber-manual-record\" styles={item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio} disabled={this.state.props.readonly || this.state.props.disabled}></WmIcon>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : <Text style={this.styles.radioLabel} {...this.getTestPropsForLabel('caption'+index)}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName } as WmRadiosetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View accessibilityRole='radiogroup'>\n {groupedData && groupedData.length\n ? groupedData.map((groupObj: any, index: any) => {\n return(\n <View key={groupObj.key}>\n <Text style={this.styles.groupHeaderTitle}>{groupObj.key}</Text>\n {this.renderRadioButtons(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderRadioButtons(items: any) {\n const props = this.state.props;\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n return(\n <View style={noOfColumns === 1 ? {} : this.styles.group}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index, colWidth)): null}\n </View>)\n }\n\n renderWidget(props: WmRadiosetProps) {\n const items = this.state.dataItems;\n return (\n <ScrollView style={this.styles.root}>\n <ScrollView horizontal={true}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </ScrollView>\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAkBC,gBAAgB,QAAQ,cAAc;AAC3E,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AAGnF,SAASC,IAAI,EAAWC,OAAO,QAAQ,WAAW;AAClD,SAASC,OAAO,QAAQ,QAAQ;AAEhC,OAAO,MAAMC,eAAe,SAASL,gBAAgB,CAAkB;EAAAM,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBAClD,EAAE;EAAA;AACvB;AAEA,eAAe,MAAMC,UAAU,SAASV,oBAAoB,CAAqD;EAE/GO,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEZ,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,CAAC;EACpD;EAEAc,OAAOA,CAACC,IAAS,EAAE;IACjB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,QAAQ,IAAI,IAAI,CAACD,KAAK,CAACH,KAAK,CAACK,QAAQ,EAAE;MAC1D;IACF;IACA,IAA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E,CAAC;EACX;EAEAyC,YAAYA,CAAChE,KAAsB,EAAE;IACnC,MAAMyD,KAAK,GAAG,IAAI,CAACtD,KAAK,CAACQ,SAAS;IAClC,oBACE7B,KAAA,CAAA+C,aAAA,CAAC3C,UAAU;MAAC6C,KAAK,EAAE,IAAI,CAACC,MAAM,CAACiC;IAAK,gBAClCnF,KAAA,CAAA+C,aAAA,CAAC3C,UAAU;MAACgF,UAAU,EAAE;IAAK,GAC1BlE,KAAK,CAACmE,OAAO,IAAI,IAAI,CAACnB,aAAa,CAAC,CAAC,EACrC,CAAChD,KAAK,CAACmE,OAAO,IAAI,IAAI,CAACZ,kBAAkB,CAACE,KAAK,CACtC,CACF,CAAC;EAEjB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","TouchableOpacity","ScrollView","WmRadiosetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","find","isEqual","isEmpty","WmLabel","getNumberOfEmptyObjects","WmRadiosetState","constructor","args","_defineProperty","WmRadioset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","value","getItemKey","createElement","_extends","style","styles","width","bind","getTestPropsForAction","id","getTestId","iconclass","checkedRadio","uncheckedRadio","template","renderitempartial","dataObject","radioLabel","selectedLabel","getTestPropsForLabel","setTemplate","partialName","renderGroupby","groupedData","accessibilityRole","length","map","groupObj","groupHeaderTitle","renderRadioButtons","data","items","noOfColumns","itemsperrow","xs","Math","round","group","renderSkeleton","_ref","numberofskeletonitems","_","skeleton","renderWidget","root","horizontal","groupby"],"sources":["radioset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, DimensionValue, TouchableOpacity } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nimport WmRadiosetProps from './radioset.props';\nimport { DEFAULT_CLASS, WmRadiosetStyles } from './radioset.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { find, forEach, isEqual } from 'lodash-es';\nimport { isEmpty } from 'lodash';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmRadiosetState extends BaseDatasetState<WmRadiosetProps> {\n template: string = '';\n}\n\nexport default class WmRadioset extends BaseDatasetComponent<WmRadiosetProps, WmRadiosetState, WmRadiosetStyles> {\n\n constructor(props: WmRadiosetProps) {\n super(props, DEFAULT_CLASS, new WmRadiosetProps());\n }\n\n onPress(item: any) {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n item.selected = true;\n let selectedValue: any = \"\";\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));\n const oldValue = this.state.props.datavalue;\n selectedItem.selected = item.selected;\n selectedValue = selectedItem.selected ? selectedItem.datafield : null;\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmRadiosetState,() => {\n this.computeDisplayValue();\n this.invokeEventCallback('onChange', [ undefined, this.proxy, selectedValue, oldValue ]);\n });\n }\n\n renderChild(item: any, index: any, colWidth: DimensionValue) {\n const displayText = item.displayexp || item.displayfield;\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n return (\n <TouchableOpacity style={[\n this.styles.item,\n item.selected ? this.styles.selectedItem : null,\n {width: colWidth}]} onPress={this.onPress.bind(this, item)} key={item.key} {...this.getTestPropsForAction(\"radio\"+index)}>\n <WmIcon id={this.getTestId('radiobutton' + index)} iconclass=\"wi wi-fiber-manual-record\" styles={item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio} disabled={this.state.props.readonly || this.state.props.disabled}></WmIcon>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : <Text style={[this.styles.radioLabel, item.selected ? this.styles.selectedLabel : null]} {...this.getTestPropsForLabel('caption'+index)}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName } as WmRadiosetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View accessibilityRole='radiogroup'>\n {groupedData && groupedData.length\n ? groupedData.map((groupObj: any, index: any) => {\n return(\n <View key={groupObj.key}>\n <Text style={this.styles.groupHeaderTitle}>{groupObj.key}</Text>\n {this.renderRadioButtons(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderRadioButtons(items: any) {\n const props = this.state.props;\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n return(\n <View style={noOfColumns === 1 ? {} : this.styles.group}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index, colWidth)): null}\n </View>)\n }\n\n public renderSkeleton(props: WmRadiosetProps): React.ReactNode {\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n\n return [...getNumberOfEmptyObjects(props.numberofskeletonitems as number ?? 5)].map(_ => {\n return <View style={[this.styles.item, {width: colWidth}]}>\n <WmIcon styles={this.styles.checkedRadio}/>\n <WmLabel styles={{ skeleton: this.styles.skeleton }}/>\n </View>\n })\n\n }\n\n renderWidget(props: WmRadiosetProps) {\n const items = this.state.dataItems;\n return (\n <ScrollView style={this.styles.root}>\n <ScrollView horizontal={true}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </ScrollView>\n </ScrollView>\n );\n }\n}\n"],"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OAAO,CAAC,GAAGjE,uBAAuB,EAAAwE,IAAA,GAAClE,KAAK,CAACmE,qBAAqB,cAAAD,IAAA,cAAAA,IAAA,GAAc,CAAC,CAAC,CAAC,CAACb,GAAG,CAACe,CAAC,IAAI;MACvF,oBAAOxF,KAAA,CAAAiD,aAAA,CAAChD,IAAI;QAACkD,KAAK,EAAE,CAAC,IAAI,CAACC,MAAM,CAAC9B,IAAI,EAAE;UAAC+B,KAAK,EAAEV;QAAQ,CAAC;MAAE,gBACxD3C,KAAA,CAAAiD,aAAA,CAACxC,MAAM;QAAC2C,MAAM,EAAE,IAAI,CAACA,MAAM,CAACO;MAAa,CAAC,CAAC,eAC3C3D,KAAA,CAAAiD,aAAA,CAACpC,OAAO;QAACuC,MAAM,EAAE;UAAEqC,QAAQ,EAAE,IAAI,CAACrC,MAAM,CAACqC;QAAS;MAAE,CAAC,CACjD,CAAC;IACT,CAAC,CAAC;EAEJ;EAEAC,YAAYA,CAACtE,KAAsB,EAAE;IACnC,MAAM0D,KAAK,GAAG,IAAI,CAACvD,KAAK,CAACQ,SAAS;IAClC,oBACE/B,KAAA,CAAAiD,aAAA,CAAC7C,UAAU;MAAC+C,KAAK,EAAE,IAAI,CAACC,MAAM,CAACuC;IAAK,gBAClC3F,KAAA,CAAAiD,aAAA,CAAC7C,UAAU;MAACwF,UAAU,EAAE;IAAK,GAC1BxE,KAAK,CAACyE,OAAO,IAAI,IAAI,CAACxB,aAAa,CAAC,CAAC,EACrC,CAACjD,KAAK,CAACyE,OAAO,IAAI,IAAI,CAACjB,kBAAkB,CAACE,KAAK,CACtC,CACF,CAAC;EAEjB;AACF","ignoreList":[]}
@@ -13,6 +13,7 @@ export default class WmRadiosetProps extends BaseDatasetProps {
13
13
  lg: 1
14
14
  });
15
15
  _defineProperty(this, "renderitempartial", void 0);
16
+ _defineProperty(this, "numberofskeletonitems", void 0);
16
17
  }
17
18
  }
18
19
  //# sourceMappingURL=radioset.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseDatasetProps","WmRadiosetProps","constructor","args","_defineProperty","xs","sm","md","lg"],"sources":["radioset.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmRadiosetProps extends BaseDatasetProps {\n dataset: any = 'Option 1, Option 2, Option 3';\n itemsperrow = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 1,\n };\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAEvG,eAAe,MAAMC,eAAe,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAC7C,8BAA8B;IAAAA,eAAA,sBAC9B;MACbC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE;IACP,CAAC;IAAAJ,eAAA;EAAA;AAEF","ignoreList":[]}
1
+ {"version":3,"names":["BaseDatasetProps","WmRadiosetProps","constructor","args","_defineProperty","xs","sm","md","lg"],"sources":["radioset.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmRadiosetProps extends BaseDatasetProps {\n dataset: any = 'Option 1, Option 2, Option 3';\n itemsperrow = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 1,\n };\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n numberofskeletonitems?: number | string\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAEvG,eAAe,MAAMC,eAAe,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAC7C,8BAA8B;IAAAA,eAAA,sBAC9B;MACbC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE;IACP,CAAC;IAAAJ,eAAA;IAAAA,eAAA;EAAA;AAGF","ignoreList":[]}
@@ -26,6 +26,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
26
26
  marginTop: 8
27
27
  },
28
28
  selectedItem: {},
29
+ selectedLabel: {},
29
30
  radioLabel: {
30
31
  alignSelf: 'center',
31
32
  fontFamily: themeVariables.baseFont,
@@ -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","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 '../../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 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,g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MACDwB,IAAI,EAAG;QACLjC,KAAK,EAAEJ,cAAc,CAACK,YAAY;QAClCmC,OAAO,EAAE;MACX;IACN;EACF,CAAC,CAAC;EAEAvC,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACLC,KAAK,EAAEJ,cAAc,CAACyC,oBAAoB;MAC1CH,OAAO,EAAE;IACX;EACF,CAAC,CAAC;EAEFrC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,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","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,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Y,EAAE,EAAE;QAChBE,WAAW,EAAE,OAAO;QACpBC,WAAW,EAAE,CAAC;QACdC,WAAW,EAAEpC,cAAc,CAACqC;MAC9B,CAAC;MACD/B,IAAI,EAAE;QACJO,QAAQ,EAAE;MACZ,CAAC;MACDyB,IAAI,EAAG;QACLlC,KAAK,EAAEJ,cAAc,CAACK,YAAY;QAClCoC,OAAO,EAAE;MACX;IACN;EACF,CAAC,CAAC;EAEAxC,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACLC,KAAK,EAAEJ,cAAc,CAAC0C,oBAAoB;MAC1CH,OAAO,EAAE;IACX;EACF,CAAC,CAAC;EAEFtC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
@@ -7,6 +7,7 @@ import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput
7
7
  import { BaseInputComponent, BaseInputState } from "@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component";
8
8
  import { isNull } from 'lodash';
9
9
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
10
+ import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
10
11
  export class WmTextState extends BaseInputState {}
11
12
  export default class WmText extends BaseInputComponent {
12
13
  constructor(props) {
@@ -20,6 +21,26 @@ export default class WmText extends BaseInputComponent {
20
21
  classes.push(super.getStyleClassName());
21
22
  return classes.join(' ');
22
23
  }
24
+ renderSkeleton(props) {
25
+ let skeletonWidth, skeletonHeight;
26
+ if (this.props.skeletonwidth == "0") {
27
+ skeletonWidth = 0;
28
+ } else {
29
+ var _this$styles$root;
30
+ skeletonWidth = this.props.skeletonwidth || ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.width);
31
+ }
32
+ if (this.props.skeletonheight == "0") {
33
+ skeletonHeight = 0;
34
+ } else {
35
+ var _this$styles$root2;
36
+ skeletonHeight = this.props.skeletonheight || ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height);
37
+ }
38
+ return createSkeleton(this.theme, this.styles.skeleton, {
39
+ ...this.styles.root,
40
+ width: skeletonWidth,
41
+ height: skeletonHeight
42
+ });
43
+ }
23
44
  renderWidget(props) {
24
45
  var _this$state$textValue;
25
46
  let opts = {};
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","WmTextProps","DEFAULT_CLASS","WMTextInput","BaseInputComponent","BaseInputState","isNull","AccessibilityWidgetType","getAccessibilityProps","WmTextState","WmText","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXT","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","styles","activeFloatingLabelStyle","activeFloatingLabel","placeholderTextColor","placeholderText","color","style","root","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 { 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'; \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 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"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAC3D,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,kBAAkB,EAAEC,cAA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AAI,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,CAACjC,MAAM,CAACQ,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","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"],"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;I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AAI,GAAG,KAAM;MAC7EC,aAAa,EAAE1D,KAAK,CAAC0D,aAAc;MACnCD,QAAQ,EAAEzD,KAAK,CAACyD,QAAS;MACzBE,SAAS,EAAE3D,KAAK,CAAC4D,QAAS;MAC1BC,WAAW,EAAE7D,KAAK,CAAC6D,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,CAACzD,MAAM,CAACgC,IAAI,CAAC0B,UAAU,KAAK;IAAO,EAC/D,CAAC;EAER;AACF","ignoreList":[]}
@@ -7,6 +7,8 @@ export default class WmTextProps extends BaseInputProps {
7
7
  super(...args);
8
8
  _defineProperty(this, "floatinglabel", void 0);
9
9
  _defineProperty(this, "placeholder", 'Enter text');
10
+ _defineProperty(this, "skeletonheight", null);
11
+ _defineProperty(this, "skeletonwidth", null);
10
12
  }
11
13
  }
12
14
  //# 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}\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;EAAA;AACpC","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}\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 +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 '../../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,W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List":[]}
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":[]}
@@ -7,6 +7,7 @@ import { BaseInputComponent, BaseInputState } from '@wavemaker/app-rn-runtime/co
7
7
  import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';
8
8
  import { isNull } from 'lodash';
9
9
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
10
+ import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
10
11
  export class WmTextareaState extends BaseInputState {}
11
12
  export default class WmTextarea extends BaseInputComponent {
12
13
  constructor(props) {
@@ -20,6 +21,26 @@ export default class WmTextarea extends BaseInputComponent {
20
21
  classes.push(super.getStyleClassName());
21
22
  return classes.join(' ');
22
23
  }
24
+ renderSkeleton(props) {
25
+ let skeletonWidth, skeletonHeight;
26
+ if (this.props.skeletonwidth == "0") {
27
+ skeletonWidth = 0;
28
+ } else {
29
+ var _this$styles$root;
30
+ skeletonWidth = this.props.skeletonwidth || ((_this$styles$root = this.styles.root) === null || _this$styles$root === void 0 ? void 0 : _this$styles$root.width);
31
+ }
32
+ if (this.props.skeletonheight == "0") {
33
+ skeletonHeight = 0;
34
+ } else {
35
+ var _this$styles$root2;
36
+ skeletonHeight = this.props.skeletonheight || ((_this$styles$root2 = this.styles.root) === null || _this$styles$root2 === void 0 ? void 0 : _this$styles$root2.height);
37
+ }
38
+ return createSkeleton(this.theme, this.styles.skeleton, {
39
+ ...this.styles.root,
40
+ width: skeletonWidth,
41
+ height: skeletonHeight
42
+ });
43
+ }
23
44
  renderWidget(props) {
24
45
  var _this$state$textValue;
25
46
  let opts = {};
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","WMTextInput","isNull","AccessibilityWidgetType","getAccessibilityProps","WmTextareaState","WmTextarea","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXTAREA","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","styles","placeholderText","color","style","root","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 { Platform, TextInput, View } 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'; \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 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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BAAkB;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,CAAChC,MAAM,CAACK,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","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,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,yBAAyB,CAAC;IACzC;IACAH,O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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":[]}
@@ -7,6 +7,8 @@ export default class WmTextareaProps extends BaseInputProps {
7
7
  super(...args);
8
8
  _defineProperty(this, "floatinglabel", void 0);
9
9
  _defineProperty(this, "placeholder", 'Place your text');
10
+ _defineProperty(this, "skeletonheight", null);
11
+ _defineProperty(this, "skeletonwidth", null);
10
12
  }
11
13
  }
12
14
  //# sourceMappingURL=textarea.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseInputProps","WmTextareaProps","constructor","args","_defineProperty"],"sources":["textarea.props.ts"],"sourcesContent":["import BaseInputProps from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props';\n\nexport default class WmTextareaProps extends BaseInputProps {\n floatinglabel?: string;\n placeholder: string = 'Place your text';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,eAAe,SAASD,cAAc,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,sBAEpC,iBAAiB;EAAA;AACzC","ignoreList":[]}
1
+ {"version":3,"names":["BaseInputProps","WmTextareaProps","constructor","args","_defineProperty"],"sources":["textarea.props.ts"],"sourcesContent":["import BaseInputProps from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props';\n\nexport default class WmTextareaProps extends BaseInputProps {\n floatinglabel?: string;\n placeholder: string = 'Place your text';\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,eAAe,SAASD,cAAc,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,sBAEpC,iBAAiB;IAAAA,eAAA,yBACb,IAAI;IAAAA,eAAA,wBACL,IAAI;EAAA;AAC/B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","isString","TouchableOpacity","Text","View","Dimensions","Animated","PanResponder","BaseComponent","BaseComponentState","ModalConsumer","WmAnchor","WmPopoverProps","DEFAULT_CLASS","WmContainer","AccessibilityWidgetType","getAccessibilityProps","ScrollView","GestureHandlerRootView","WmPopoverState","constructor","args","_defineProperty","WmPopover","props","Value","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderMove","_","gestureState","dy","Number","styles","popover","minHeight","dragY","setValue","onPanResponderRelease","timing","toValue","maxHeight","duration","useNativeDriver","start","e","position","state","type","windowDimensions","get","view","measure","x","y","width","height","px","py","popoverwidth","parseInt","left","top","updateState","isOpened","invokeEventCallback","stopPropagation","autoopen","showPopover","getDefaultStyles","isActionSheet","theme","getStyle","defaultClass","renderPopoverContent","dimensions","createElement","style","mergeStyle","onScroll","event","notify","scrollEventThrottle","accessible","accessibilityViewIsModal","title","_extends","getTestPropsForAction","activeOpacity","onPress","autoclose","hide","popoverContent","root","onLoad","renderPartial","p","children","onPropertyChange","name","$new","$old","prepareModalOptions","content","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","centered","animation","contentanimation","onClose","setState","isPartialLoaded","hideModal","renderWidget","popoverheight","onLayout","computePosition","ref","POVOVER","_background","id","getTestId","caption","badgevalue","iconclass","iconposition","iconheight","iconwidth","iconmargin","iconurl","link","onTap","showModal","panResponder","panHandlers"],"sources":["popover.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isString } from 'lodash-es';\nimport { LayoutChangeEvent, TouchableOpacity, Text, View, Dimensions, Animated, PanResponder } from 'react-native';\nimport { BaseComponent, BaseComponentState, BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { SyntheticEvent } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\n\nimport WmPopoverProps from './popover.props';\nimport { DEFAULT_CLASS, WmPopoverStyles } from './popover.styles';\nimport WmContainer from '../../container/container.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { ScrollView, GestureHandlerRootView } from 'react-native-gesture-handler';\n\nexport class WmPopoverState extends BaseComponentState<WmPopoverProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n position = {} as PopoverPosition;\n isPartialLoaded = false;\n}\n\nexport interface PopoverPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmPopover extends BaseComponent<WmPopoverProps, WmPopoverState, WmPopoverStyles> {\n\n view: View = null as any;\n dragY = new Animated.Value(0);\n\n constructor(props: WmPopoverProps) {\n super(props, DEFAULT_CLASS, new WmPopoverProps(), new WmPopoverState());\n\n if (this.state.props.autoopen) {\n this.showPopover(); \n }\n }\n\n public panResponder = PanResponder.create({\n onStartShouldSetPanResponder: () => true,\n onMoveShouldSetPanResponder: () => true,\n onPanResponderMove: (_, gestureState) => {\n if (gestureState.dy > 0 && gestureState.dy < Number(this.styles.popover.minHeight)) {\n this.dragY.setValue(Number(this.styles.popover.minHeight) - gestureState.dy);\n }\n },\n onPanResponderRelease: (_, gestureState) => {\n if (gestureState.dy < -50) {\n Animated.timing(this.dragY, {\n toValue: Number(this.styles.popover.maxHeight),\n duration: 500,\n useNativeDriver: false,\n }).start();\n } else {\n Animated.timing(this.dragY, {\n toValue: Number(this.styles.popover.minHeight),\n duration: 500,\n useNativeDriver: false,\n }).start();\n }\n },\n });\n \n getDefaultStyles() {\n const isActionSheet = this.state.props.type === 'action-sheet';\n return this.theme.getStyle(`${this.defaultClass} ${isActionSheet ? 'app-popover-action-sheet' : ''}`);\n }\n\n private computePosition = (e: LayoutChangeEvent) => {\n const position = {} as PopoverPosition;\n if (this.state.props.type === 'dropdown') {\n const windowDimensions = Dimensions.get('window');\n this.view.measure((x, y, width, height, px, py) => {\n let popoverwidth = this.state.props.popoverwidth as any;\n if (popoverwidth && isString(popoverwidth)) {\n popoverwidth = parseInt(popoverwidth);\n }\n position.left = px;\n if (px + popoverwidth > windowDimensions.width) {\n position.left = px + width - popoverwidth;\n }\n position.top = py + height;\n this.updateState({position: position} as WmPopoverState);\n });\n }\n };\n\n public renderPopoverContent (props : WmPopoverProps , styles : WmPopoverStyles, dimensions: any) {\n return (\n <ScrollView style={props.type === \"action-sheet\" ? {dimensions} : this.theme.mergeStyle(styles.popover, dimensions)} \n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}\n accessible={props.type !== \"dropdown\"} accessibilityViewIsModal>\n {props.title ? (<Text style={styles.title}>{props.title}</Text>): null}\n <TouchableOpacity \n {...this.getTestPropsForAction('outercontent')}\n activeOpacity={1} onPress={() => {\n props.autoclose === 'always' && this.hide()\n }} style={styles.popoverContent.root}>\n <WmContainer\n styles={styles.popoverContent}\n onLoad={() => this.invokeEventCallback('onLoad', [this])}\n {... props.renderPartial ? {\n renderPartial : (p: any, onLoad: Function) => {\n return props.renderPartial && props.renderPartial(props, onLoad);\n }\n } : {}}>\n {props.renderPartial ? null : props.children}\n </WmContainer>\n </TouchableOpacity>\n </ScrollView>\n )}\n\n public showPopover = (e?: SyntheticEvent) => {\n this.updateState({ isOpened: true } as WmPopoverState);\n this.invokeEventCallback('onShow', [e, this]);\n e?.stopPropagation();\n };\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case \"autoopen\":\n if($new){\n this.showPopover && this.showPopover()\n }\n else{\n this.hide && this.hide()\n }\n }\n }\n\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmPopoverStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent, ...this.state.position};\n o.content = content;\n o.isModal = this.state.props.autoclose !== 'disabled';\n o.centered = true;\n o.animation = this.state.props.contentanimation || 'slideInUp';\n o.onClose = () => {\n this.hide = () => {};\n this.setState({ isOpened: false, isPartialLoaded: false, modalOptions: {} as ModalOptions });\n this.invokeEventCallback('onHide', [null, this]);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmPopoverProps) {\n let dimensions = {} as any;\n const styles = this.theme.mergeStyle(this.theme.getStyle('popover-' + props.type), this.styles);\n if (props.type === 'dropdown') {\n if (props.popoverwidth) {\n dimensions.width = props.popoverwidth;\n styles.modalContent.width = props.popoverwidth;\n }\n if (props.popoverheight) {\n dimensions.height = props.popoverheight;\n }\n }\n return (\n <View style={styles.root} onLayout={this.computePosition} ref={ref => {this.view = ref as View}} {...getAccessibilityProps(AccessibilityWidgetType.POVOVER, props)}>\n {this._background}\n <WmAnchor\n id={this.getTestId('trigger')}\n animation={props.animation}\n caption={props.caption}\n badgevalue={props.badgevalue}\n iconclass={props.iconclass}\n iconposition={props.iconposition}\n iconheight={props.iconheight}\n iconwidth={props.iconwidth}\n iconmargin={props.iconmargin}\n iconurl={props.iconurl}\n styles={styles.link}\n onTap={this.showPopover}/>\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions(props.type === 'action-sheet' ? (\n <Animated.View style= {[styles.popover,{ height: this.dragY }]} {...this.panResponder.panHandlers}>\n <GestureHandlerRootView>\n {this.renderPopoverContent(props, styles, dimensions)}\n </GestureHandlerRootView>\n </Animated.View>\n ): (this.renderPopoverContent(props, styles, dimensions)), styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>);\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAA4BC,gBAAgB,EAAEC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,YAAY,QAAQ,cAAc;AAClH,SAASC,aAAa,EAAEC,kBAAkB,QAAmB,+CAA+C;AAG5G,SAASC,aAAa,QAAoC,8CAA8C;AACxG,OAAOC,QAAQ,MAAM,oEAAoE;AAEzF,OAAOC,cAAc,MAAM,iBAAiB;AAC5C,SAASC,aAAa,QAAyB,kBAAkB;AACjE,OAAOC,WAAW,MAAM,qCAAqC;AAC7D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,UAAU,EAAEC,sBAAsB,QAAQ,8BAA8B;AAEjF,OAAO,MAAMC,cAAc,SAASV,kBAAkB,CAAiB;EAAAW,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBACjD,KAAK;IAAAA,eAAA,uBACV,CAAC,CAAC;IAAAA,eAAA,mBACN,CAAC,CAAC;IAAAA,eAAA,0BACK,KAAK;EAAA;AACzB;AASA,eAAe,MAAMC,SAAS,SAASf,aAAa,CAAkD;EAKpGY,WAAWA,CAACI,KAAqB,EAAE;IACjC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,cAAc,CAAC,CAAC,EAAE,IAAIO,cAAc,CAAC,CAAC,CAAC;IAACG,eAAA,eAJ7D,IAAI;IAAAA,eAAA,gBACT,IAAIhB,QAA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7I,KAAA,CAAA6E,aAAA,CAAC3D,sBAAsB,QACvB,IAAI,CAACyD,oBAAoB,CAACnD,KAAK,EAAEU,MAAM,EAAE0C,UAAU,CAC5B,CACR,CAAC,GAChB,IAAI,CAACD,oBAAoB,CAACnD,KAAK,EAAEU,MAAM,EAAE0C,UAAU,CAAE,EAAE1C,MAAM,EAAEuE,YAAY,CAAC,CAAC;MACjF,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EACX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","isString","TouchableOpacity","Text","View","Dimensions","Animated","PanResponder","BaseComponent","BaseComponentState","ModalConsumer","WmAnchor","WmPopoverProps","DEFAULT_CLASS","WmContainer","AccessibilityWidgetType","getAccessibilityProps","ScrollView","GestureHandlerRootView","WmPopoverState","constructor","args","_defineProperty","WmPopover","props","Value","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderMove","_","gestureState","dy","Number","styles","popover","minHeight","dragY","setValue","onPanResponderRelease","timing","toValue","maxHeight","duration","useNativeDriver","start","e","position","state","type","windowDimensions","get","view","measure","x","y","width","height","px","py","popoverwidth","parseInt","left","top","updateState","isOpened","invokeEventCallback","stopPropagation","autoopen","showPopover","getDefaultStyles","isActionSheet","theme","getStyle","defaultClass","renderPopoverContent","dimensions","createElement","style","mergeStyle","onScroll","event","notify","scrollEventThrottle","accessible","accessibilityViewIsModal","title","_extends","getTestPropsForAction","activeOpacity","onPress","autoclose","hide","popoverContent","root","onLoad","renderPartial","p","children","onPropertyChange","name","$new","$old","prepareModalOptions","content","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","centered","animation","contentanimation","onClose","setState","isPartialLoaded","hideModal","renderWidget","popoverheight","onLayout","computePosition","ref","POVOVER","_background","id","getTestId","caption","badgevalue","iconclass","iconposition","iconheight","iconwidth","iconmargin","iconurl","link","onTap","showModal","panResponder","panHandlers"],"sources":["popover.component.tsx"],"sourcesContent":["import React from 'react';\nimport { isString } from 'lodash-es';\nimport { LayoutChangeEvent, TouchableOpacity, Text, View, Dimensions, Animated, PanResponder } from 'react-native';\nimport { BaseComponent, BaseComponentState, BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport { SyntheticEvent } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\n\nimport WmPopoverProps from './popover.props';\nimport { DEFAULT_CLASS, WmPopoverStyles } from './popover.styles';\nimport WmContainer from '../../container/container.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { ScrollView, GestureHandlerRootView } from 'react-native-gesture-handler';\n\nexport class WmPopoverState extends BaseComponentState<WmPopoverProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n position = {} as PopoverPosition;\n isPartialLoaded = false;\n}\n\nexport interface PopoverPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmPopover extends BaseComponent<WmPopoverProps, WmPopoverState, WmPopoverStyles> {\n\n view: View = null as any;\n dragY = new Animated.Value(0);\n\n constructor(props: WmPopoverProps) {\n super(props, DEFAULT_CLASS, new WmPopoverProps(), new WmPopoverState());\n\n if (this.state.props.autoopen) {\n this.showPopover(); \n }\n }\n\n public panResponder = PanResponder.create({\n onStartShouldSetPanResponder: () => true,\n onMoveShouldSetPanResponder: () => true,\n onPanResponderMove: (_, gestureState) => {\n if (gestureState.dy > 0 && gestureState.dy < Number(this.styles.popover.minHeight)) {\n this.dragY.setValue(Number(this.styles.popover.minHeight) - gestureState.dy);\n }\n },\n onPanResponderRelease: (_, gestureState) => {\n if (gestureState.dy < -50) {\n Animated.timing(this.dragY, {\n toValue: Number(this.styles.popover.maxHeight),\n duration: 500,\n useNativeDriver: false,\n }).start();\n } else {\n Animated.timing(this.dragY, {\n toValue: Number(this.styles.popover.minHeight),\n duration: 500,\n useNativeDriver: false,\n }).start();\n }\n },\n });\n \n getDefaultStyles() {\n const isActionSheet = this.state.props.type === 'action-sheet';\n return this.theme.getStyle(`${this.defaultClass} ${isActionSheet ? 'app-popover-action-sheet' : ''}`);\n }\n\n private computePosition = (e: LayoutChangeEvent) => {\n const position = {} as PopoverPosition;\n if (this.state.props.type === 'dropdown') {\n const windowDimensions = Dimensions.get('window');\n this.view.measure((x, y, width, height, px, py) => {\n let popoverwidth = this.state.props.popoverwidth as any;\n if (popoverwidth && isString(popoverwidth)) {\n popoverwidth = parseInt(popoverwidth);\n }\n position.left = px;\n if (px + popoverwidth > windowDimensions.width) {\n position.left = px + width - popoverwidth;\n }\n position.top = py + height;\n this.updateState({position: position} as WmPopoverState);\n });\n }\n };\n\n public renderPopoverContent (props : WmPopoverProps , styles : WmPopoverStyles, dimensions: any) {\n return (\n <ScrollView style={props.type === \"action-sheet\" ? {dimensions} : this.theme.mergeStyle(styles.popover, dimensions)} \n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}\n accessible={props.type !== \"dropdown\"} accessibilityViewIsModal>\n {props.title ? (<Text style={styles.title}>{props.title}</Text>): null}\n <TouchableOpacity \n {...this.getTestPropsForAction('outercontent')}\n activeOpacity={1} onPress={() => {\n props.autoclose === 'always' && this.hide()\n }} style={styles.popoverContent.root}>\n <WmContainer\n styles={styles.popoverContent}\n onLoad={() => this.invokeEventCallback('onLoad', [this])}\n {...props.renderPartial ? {\n renderPartial: (p: any, onLoad: Function) => {\n return props.renderPartial && props.renderPartial(props, onLoad);\n }\n } : {}}>\n {props.renderPartial ? null : props.children}\n </WmContainer>\n </TouchableOpacity>\n </ScrollView>\n )}\n\n public showPopover = (e?: SyntheticEvent) => {\n this.updateState({ isOpened: true } as WmPopoverState);\n this.invokeEventCallback('onShow', [e, this]);\n e?.stopPropagation();\n };\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case \"autoopen\":\n if($new){\n this.showPopover && this.showPopover()\n }\n else{\n this.hide && this.hide()\n }\n }\n }\n\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmPopoverStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent, ...this.state.position};\n o.content = content;\n o.isModal = this.state.props.autoclose !== 'disabled';\n o.centered = true;\n o.animation = this.state.props.contentanimation || 'slideInUp';\n o.onClose = () => {\n this.hide = () => {};\n this.setState({ isOpened: false, isPartialLoaded: false, modalOptions: {} as ModalOptions });\n this.invokeEventCallback('onHide', [null, this]);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n renderWidget(props: WmPopoverProps) {\n let dimensions = {} as any;\n const styles = this.theme.mergeStyle(this.theme.getStyle('popover-' + props.type), this.styles);\n if (props.type === 'dropdown') {\n if (props.popoverwidth) {\n dimensions.width = props.popoverwidth;\n styles.modalContent.width = props.popoverwidth;\n }\n if (props.popoverheight) {\n dimensions.height = props.popoverheight;\n }\n }\n return (\n <View style={styles.root} onLayout={this.computePosition} ref={ref => {this.view = ref as View}} {...getAccessibilityProps(AccessibilityWidgetType.POVOVER, props)}>\n {this._background}\n <WmAnchor\n id={this.getTestId('trigger')}\n animation={props.animation}\n caption={props.caption}\n badgevalue={props.badgevalue}\n iconclass={props.iconclass}\n iconposition={props.iconposition}\n iconheight={props.iconheight}\n iconwidth={props.iconwidth}\n iconmargin={props.iconmargin}\n iconurl={props.iconurl}\n styles={styles.link}\n onTap={this.showPopover}/>\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions(props.type === 'action-sheet' ? (\n <Animated.View style= {[styles.popover,{ height: this.dragY }]} {...this.panResponder.panHandlers}>\n <GestureHandlerRootView>\n {this.renderPopoverContent(props, styles, dimensions)}\n </GestureHandlerRootView>\n </Animated.View>\n ): (this.renderPopoverContent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AAE,EAAE1C,MAAM,EAAEuE,YAAY,CAAC,CAAC;MACjF,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EACX;AACF","ignoreList":[]}
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import { View } from 'react-native';
2
+ import { KeyboardAvoidingView, 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';
4
5
  import { DEFAULT_CLASS } from './content.styles';
5
6
  export class WmContentState extends BaseComponentState {}
6
7
  export default class WmContent extends BaseComponent {
@@ -8,9 +9,23 @@ export default class WmContent extends BaseComponent {
8
9
  super(props, DEFAULT_CLASS);
9
10
  }
10
11
  renderWidget(props) {
11
- return /*#__PURE__*/React.createElement(View, {
12
- style: this.styles.root
13
- }, this._background, props.children);
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
+ });
14
29
  }
15
30
  }
16
31
  //# sourceMappingURL=content.component.js.map
@@ -1 +1 @@
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 { View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\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,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,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":[]}
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":[]}
@@ -6,19 +6,42 @@ import { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/cor
6
6
  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
+ import WmLottie from '@wavemaker/app-rn-runtime/components/basic/lottie/lottie.component';
9
10
  export class WmPageContentState extends BaseComponentState {}
10
11
  export default class WmPageContent extends BaseComponent {
11
12
  constructor(props) {
12
13
  super(props, DEFAULT_CLASS, new WmPageContentProps());
13
14
  this.hideMode = HideMode.DONOT_ADD_TO_DOM;
14
15
  }
16
+ renderSkeleton(props) {
17
+ if (this.props.skeletonanimationresource) {
18
+ return /*#__PURE__*/React.createElement(View, {
19
+ style: [{
20
+ width: '100%'
21
+ }, this.styles.root]
22
+ }, /*#__PURE__*/React.createElement(WmLottie, {
23
+ styles: {
24
+ content: {
25
+ ...this.styles.root,
26
+ ...this.styles.skeleton.root
27
+ }
28
+ },
29
+ source: this.props.skeletonanimationresource,
30
+ loop: true,
31
+ autoplay: true,
32
+ speed: this.props.skeletonanimationspeed
33
+ }));
34
+ }
35
+ return null;
36
+ }
15
37
  renderWidget(props) {
16
38
  const showScrollbar = this.styles.root.scrollbarColor != 'transparent';
39
+ // return ((props.scrollable || isWebPreviewMode()) && !this._showSkeleton) ? (
17
40
  return props.scrollable || isWebPreviewMode() ? /*#__PURE__*/React.createElement(View, {
18
41
  style: {
19
42
  height: '100%',
20
43
  width: '100%',
21
- backgroundColor: this.styles.root.backgroundColor
44
+ backgroundColor: this._showSkeleton && this.styles.skeleton.root.backgroundColor ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor
22
45
  }
23
46
  }, this._background, /*#__PURE__*/React.createElement(ScrollView, {
24
47
  contentContainerStyle: [this.styles.root, {
@@ -30,7 +53,9 @@ export default class WmPageContent extends BaseComponent {
30
53
  },
31
54
  scrollEventThrottle: 48
32
55
  }, props.children)) : /*#__PURE__*/React.createElement(View, {
33
- style: this.styles.root
56
+ style: [this.styles.root, {
57
+ backgroundColor: this._showSkeleton ? this.styles.skeleton.root.backgroundColor : this.styles.root.backgroundColor
58
+ }]
34
59
  }, this._background, props.children);
35
60
  }
36
61
  }