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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) 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 +2 -2
  87. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  88. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +11 -1
  89. app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
  90. app-rn-runtime/components/container/tabs/tabs.component.js +38 -5
  91. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  92. app-rn-runtime/components/container/tabs/tabs.styles.js +4 -1
  93. app-rn-runtime/components/container/tabs/tabs.styles.js.map +1 -1
  94. app-rn-runtime/components/container/tile/tile.component.js +28 -2
  95. app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
  96. app-rn-runtime/components/container/tile/tile.props.js.map +1 -1
  97. app-rn-runtime/components/container/tile/tile.styles.js +6 -1
  98. app-rn-runtime/components/container/tile/tile.styles.js.map +1 -1
  99. app-rn-runtime/components/container/wizard/wizard.component.js +39 -6
  100. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  101. app-rn-runtime/components/container/wizard/wizard.props.js.map +1 -1
  102. app-rn-runtime/components/container/wizard/wizard.styles.js +3 -0
  103. app-rn-runtime/components/container/wizard/wizard.styles.js.map +1 -1
  104. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -1
  105. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  106. app-rn-runtime/components/data/card/card-content/card-content.component.js +6 -2
  107. app-rn-runtime/components/data/card/card-content/card-content.component.js.map +1 -1
  108. app-rn-runtime/components/data/card/card-content/card-content.styles.js +4 -1
  109. app-rn-runtime/components/data/card/card-content/card-content.styles.js.map +1 -1
  110. app-rn-runtime/components/data/card/card.component.js +18 -0
  111. app-rn-runtime/components/data/card/card.component.js.map +1 -1
  112. app-rn-runtime/components/data/card/card.styles.js +3 -0
  113. app-rn-runtime/components/data/card/card.styles.js.map +1 -1
  114. app-rn-runtime/components/data/form/form.component.js +1 -1
  115. app-rn-runtime/components/data/form/form.component.js.map +1 -1
  116. app-rn-runtime/components/data/form/form.props.js +1 -0
  117. app-rn-runtime/components/data/form/form.props.js.map +1 -1
  118. app-rn-runtime/components/data/list/list-template/list-template.component.js +15 -1
  119. app-rn-runtime/components/data/list/list-template/list-template.component.js.map +1 -1
  120. app-rn-runtime/components/data/list/list-template/list-template.props.js +1 -0
  121. app-rn-runtime/components/data/list/list-template/list-template.props.js.map +1 -1
  122. app-rn-runtime/components/data/list/list-template/list-template.styles.js +11 -1
  123. app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
  124. app-rn-runtime/components/data/list/list.component.js +32 -24
  125. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  126. app-rn-runtime/components/data/list/list.props.js +1 -0
  127. app-rn-runtime/components/data/list/list.props.js.map +1 -1
  128. app-rn-runtime/components/data/list/list.styles.js +9 -0
  129. app-rn-runtime/components/data/list/list.styles.js.map +1 -1
  130. app-rn-runtime/components/dialogs/dialog/dialog.styles.js.map +1 -1
  131. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  132. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +21 -1
  133. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  134. app-rn-runtime/components/input/checkboxset/checkboxset.props.js +1 -0
  135. app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
  136. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
  137. app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
  138. app-rn-runtime/components/input/radioset/radioset.component.js +21 -1
  139. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  140. app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
  141. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  142. app-rn-runtime/components/input/radioset/radioset.styles.js +1 -0
  143. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  144. app-rn-runtime/components/input/text/text.component.js +21 -0
  145. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  146. app-rn-runtime/components/input/text/text.props.js +2 -0
  147. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  148. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  149. app-rn-runtime/components/input/textarea/textarea.component.js +21 -0
  150. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  151. app-rn-runtime/components/input/textarea/textarea.props.js +2 -0
  152. app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
  153. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  154. app-rn-runtime/components/page/content/content.component.js +19 -4
  155. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  156. app-rn-runtime/components/page/page-content/page-content.component.js +27 -2
  157. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  158. app-rn-runtime/components/page/page-content/page-content.props.js +2 -2
  159. app-rn-runtime/components/page/page-content/page-content.props.js.map +1 -1
  160. app-rn-runtime/components/page/page-content/page-content.styles.js +6 -1
  161. app-rn-runtime/components/page/page-content/page-content.styles.js.map +1 -1
  162. app-rn-runtime/components/page/page.component.js.map +1 -1
  163. app-rn-runtime/components/page/page.props.js.map +1 -1
  164. app-rn-runtime/components/page/page.styles.js +7 -1
  165. app-rn-runtime/components/page/page.styles.js.map +1 -1
  166. app-rn-runtime/components/page/partial/partial.component.js +27 -1
  167. app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
  168. app-rn-runtime/components/page/partial/partial.props.js.map +1 -1
  169. app-rn-runtime/components/page/partial/partial.styles.js +6 -1
  170. app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
  171. app-rn-runtime/components/prefab/prefab-container.component.js +27 -1
  172. app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
  173. app-rn-runtime/components/prefab/prefab-container.props.js.map +1 -1
  174. app-rn-runtime/components/prefab/prefab-container.styles.js +6 -1
  175. app-rn-runtime/components/prefab/prefab-container.styles.js.map +1 -1
  176. app-rn-runtime/core/base.component.js +3 -2
  177. app-rn-runtime/core/base.component.js.map +1 -1
  178. app-rn-runtime/core/props.provider.js +0 -1
  179. app-rn-runtime/core/props.provider.js.map +1 -1
  180. app-rn-runtime/core/tappable.component.js +10 -4
  181. app-rn-runtime/core/tappable.component.js.map +1 -1
  182. app-rn-runtime/core/utils.js +5 -0
  183. app-rn-runtime/core/utils.js.map +1 -1
  184. app-rn-runtime/package.json +3 -3
  185. app-rn-runtime/runtime/App.js +2 -7
  186. app-rn-runtime/runtime/App.js.map +1 -1
  187. app-rn-runtime/runtime/base-fragment.component.js +28 -13
  188. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  189. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  190. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  191. app-rn-runtime/runtime/services/app-security.service.js +17 -1
  192. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  193. app-rn-runtime/styles/theme.js +5 -0
  194. app-rn-runtime/styles/theme.js.map +1 -1
  195. app-rn-runtime/styles/theme.variables.js +1 -0
  196. app-rn-runtime/styles/theme.variables.js.map +1 -1
@@ -42,6 +42,7 @@ export default class WmListProps extends BaseProps {
42
42
  md: 1,
43
43
  lg: 1
44
44
  });
45
+ _defineProperty(this, "numberofskeletonitems", void 0);
45
46
  }
46
47
  }
47
48
  //# sourceMappingURL=list.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","BaseProps","View","WmListProps","constructor","args","_defineProperty","createElement","$item","$index","xs","sm","md","lg"],"sources":["list.props.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { View } from 'react-native';\n\nexport default class WmListProps extends BaseProps {\n formRef: any;\n iconclass: string = null as any;\n deferload = false;\n ondemandmessage = 'Load More';\n title: string = null as any;\n subheading: string = null as any;\n dataset = [] as any;\n maxnumberofitems = 50;\n children? = null as any;\n renderItem: any = () => (<View/>);\n loadingicon: string = null as any;\n loadingdatamsg = 'Loading...';\n multiselect = false;\n nodatamessage = 'No data found';\n loadingdata = false;\n selectfirstitem = false;\n selectionlimit = -1;\n disableitem: Function | boolean = ($item: any, $index: any) => false;\n itemkey?: ($item: any, $index: any) => any = null as any;\n direction: 'horizontal' | 'vertical' = 'vertical';\n groupby: string = null as any;\n match: string = null as any;\n orderby: string = null as any;\n dateformat: string = null as any;\n selecteditem = null as any;\n navigation : 'Scroll' | 'On-Demand' | 'None' = 'None';\n itemclass: ($item: any, $index: any) => string = null as any;\n getNextPageData: ($event: any, $list: any, page: number) => Promise<any> = null as any;\n pagesize = 20;\n itemsperrow = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 1,\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,+CAA+C;AACzE,SAASC,IAAI,QAAQ,cAAc;AAEnC,eAAe,MAAMC,WAAW,SAASF,SAAS,CAAC;EAAAG,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,oBAE3B,IAAI;IAAAA,eAAA,oBACZ,KAAK;IAAAA,eAAA,0BACC,WAAW;IAAAA,eAAA,gBACb,IAAI;IAAAA,eAAA,qBACC,IAAI;IAAAA,eAAA,kBACf,EAAE;IAAAA,eAAA,2BACO,EAAE;IAAAA,eAAA,mBACT,IAAI;IAAAA,eAAA,qBACE,mBAAON,KAAA,CAAAO,aAAA,CAACL,IAAI,MAAC,CAAE;IAAAI,eAAA,sBACX,IAAI;IAAAA,eAAA,yBACT,YAAY;IAAAA,eAAA,sBACf,KAAK;IAAAA,eAAA,wBACH,eAAe;IAAAA,eAAA,sBACjB,KAAK;IAAAA,eAAA,0BACD,KAAK;IAAAA,eAAA,yBACN,CAAC,CAAC;IAAAA,eAAA,sBACe,CAACE,KAAU,EAAEC,MAAW,KAAK,KAAK;IAAAH,eAAA,kBACvB,IAAI;IAAAA,eAAA,oBACV,UAAU;IAAAA,eAAA,kBAC/B,IAAI;IAAAA,eAAA,gBACN,IAAI;IAAAA,eAAA,kBACF,IAAI;IAAAA,eAAA,qBACD,IAAI;IAAAA,eAAA,uBACV,IAAI;IAAAA,eAAA,qBAC4B,MAAM;IAAAA,eAAA,oBACJ,IAAI;IAAAA,eAAA,0BACsB,IAAI;IAAAA,eAAA,mBACpE,EAAE;IAAAA,eAAA,sBACE;MACZI,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE;IACP,CAAC;EAAA;AACL","ignoreList":[]}
1
+ {"version":3,"names":["React","BaseProps","View","WmListProps","constructor","args","_defineProperty","createElement","$item","$index","xs","sm","md","lg"],"sources":["list.props.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { View } from 'react-native';\n\nexport default class WmListProps extends BaseProps {\n formRef: any;\n iconclass: string = null as any;\n deferload = false;\n ondemandmessage = 'Load More';\n title: string = null as any;\n subheading: string = null as any;\n dataset = [] as any;\n maxnumberofitems = 50;\n children? = null as any;\n renderItem: any = () => (<View/>);\n loadingicon: string = null as any;\n loadingdatamsg = 'Loading...';\n multiselect = false;\n nodatamessage = 'No data found';\n loadingdata = false;\n selectfirstitem = false;\n selectionlimit = -1;\n disableitem: Function | boolean = ($item: any, $index: any) => false;\n itemkey?: ($item: any, $index: any) => any = null as any;\n direction: 'horizontal' | 'vertical' = 'vertical';\n groupby: string = null as any;\n match: string = null as any;\n orderby: string = null as any;\n dateformat: string = null as any;\n selecteditem = null as any;\n navigation : 'Scroll' | 'On-Demand' | 'None' = 'None';\n itemclass: ($item: any, $index: any) => string = null as any;\n getNextPageData: ($event: any, $list: any, page: number) => Promise<any> = null as any;\n pagesize = 20;\n itemsperrow = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 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.registerStyle((themeVariables, addStyle) => {
101
101
  color: themeVariables.primaryColor,
102
102
  fontSize: 16
103
103
  }
104
+ },
105
+ skeleton: {
106
+ root: {
107
+ shadowColor: 'transparent',
108
+ paddingTop: 0,
109
+ paddingBottom: 0,
110
+ paddingLeft: 0,
111
+ paddingRight: 0
112
+ }
104
113
  }
105
114
  });
106
115
  addStyle(DEFAULT_CLASS, '', defaultStyles);
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","listIcon","marginTop","marginRight","groupHeading","backgroundColor","groupHeadingBgColor","fontSize","paddingLeft","paddingRight","lineHeight","fontFamily","baseFont","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","heading","padding","marginBottom","listHeaderBgColor","title","listTitleColor","fontWeight","subheading","emptyMessage","onDemandMessage","paddingVertical","width","textAlign","group","item","getStyle","shadowColor","flexDirection","paddingTop","paddingBottom","minHeight","itemBgColor","borderColor","selectedItemBorderColor","borderRadius","borderStyle","selectedItem","selectedIcon","position","right","top","primaryColor","minWidth","borderBottomWidth","borderBottomColor","listDividerColor","borderRightWidth","borderRightColor"],"sources":["list.styles.ts"],"sourcesContent":["import { TextStyle, ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmLabelStyles } from '@wavemaker/app-rn-runtime/components/basic/label/label.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmListStyles = BaseStyles & {\n heading: AllStyle,\n groupHeading: TextStyle,\n listIcon: WmIconStyles,\n loadingIcon: WmIconStyles,\n title: WmLabelStyles,\n subheading: WmLabelStyles,\n emptyMessage: WmLabelStyles,\n onDemandMessage: WmLabelStyles,\n item: AllStyle,\n selectedItem: AllStyle,\n selectedIcon: WmIconStyles,\n group: AllStyle,\n};\n\nexport const DEFAULT_CLASS = 'app-list';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmListStyles = defineStyles({\n root: {},\n text: {},\n listIcon: {\n root: {\n marginTop: 10,\n marginRight: 8\n }\n } as WmIconStyles,\n groupHeading: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\n },\n loadingIcon: {\n root: {\n flex: 1,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16\n },\n text: {\n color: themeVariables.listSubTitleColor\n }\n } as WmIconStyles,\n heading : {\n padding: 8,\n marginBottom: 6,\n backgroundColor: themeVariables.listHeaderBgColor\n },\n title: {\n text: {\n color: themeVariables.listTitleColor,\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n lineHeight: 24,\n fontWeight: '400' \n }\n } as WmLabelStyles,\n subheading: {\n text: {\n fontSize: 14,\n lineHeight: 20,\n fontFamily: themeVariables.baseFont,\n fontWeight: '400',\n color: themeVariables.listSubTitleColor\n }\n } as WmLabelStyles,\n emptyMessage: {\n root: {\n flex: 1,\n alignSelf: 'center',\n fontSize: 16,\n lineHeight: 18,\n color: themeVariables.listSubTitleColor\n }\n } as WmLabelStyles,\n onDemandMessage: {\n root: {\n paddingVertical: 8,\n width: '100%'\n } as ViewStyle,\n text: {\n textAlign: 'center',\n color: themeVariables.listSubTitleColor\n }\n } as WmLabelStyles,\n group: {\n marginBottom: 16,\n },\n item: {\n ...BASE_THEME.getStyle('elevate1').root,\n shadowColor: 'rgba(0, 0, 0, 0.3)',\n paddingLeft: 4,\n paddingRight: 4,\n flex: 1,\n flexDirection: 'row',\n paddingTop: 4,\n paddingBottom: 4,\n minHeight: 56,\n backgroundColor: themeVariables.itemBgColor,\n borderColor: themeVariables.selectedItemBorderColor,\n borderRadius: 6,\n borderStyle: 'solid',\n },\n selectedItem : {} as AllStyle,\n selectedIcon : {\n root: {\n position: 'absolute',\n right: 0,\n top: 0\n },\n text: {\n color: themeVariables.primaryColor,\n fontSize: 16\n }\n } as WmIconStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n\n addStyle('app-horizontal-list', '', {\n groupHeading: {\n minWidth: 120,\n backgroundColor: themeVariables.groupHeadingBgColor,\n },\n item: {\n marginRight: 6,\n borderColor: themeVariables.selectedItemBorderColor,\n }\n } as WmListStyles);\n\n addStyle('app-vertical-list', '', {\n item: {\n marginBottom: 6,\n width: '100%',\n borderBottomWidth: 0,\n borderBottomColor: themeVariables.listDividerColor,\n }\n } as any as WmListStyles);\n\n addStyle('app-horizontal-list-dense', '', {\n item: {\n marginRight: 0,\n borderRadius: 0,\n borderRightWidth: 1,\n borderRightColor: 'rgba(0,0,0,0.05)'\n } as ViewStyle\n } as WmListStyles);\n\n addStyle('app-list-dense', '', {\n item: {\n marginBottom: 0,\n borderRadius: 0,\n borderBottomWidth: 1,\n borderBottomColor: 'rgba(0,0,0,0.05)'\n } as ViewStyle\n } as WmListStyles);\n});\n"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAmBxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNF,IAAI,EAAE;QACFG,SAAS,EAAE,EAAE;QACbC,WAAW,EAAE;MACjB;IACJ,CAAiB;IACjBC,YAAY,EAAE;MACVC,eAAe,EAAET,cAAc,CAACU,mBAAmB;MACnDC,QAAQ,EAAE,EAAE;MACZC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAE,EAAE;MACdC,UAAU,EAAEf,cAAc,CAACgB;I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WAAW,EAAE,CAAC;MACdwC,YAAY,EAAE,CAAC;MACfY,gBAAgB,EAAE,CAAC;MACnBC,gBAAgB,EAAE;IACtB;EACJ,CAAiB,CAAC;EAElB3D,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAC3BoC,IAAI,EAAE;MACFZ,YAAY,EAAE,CAAC;MACfsB,YAAY,EAAE,CAAC;MACfS,iBAAiB,EAAE,CAAC;MACpBC,iBAAiB,EAAE;IACvB;EACJ,CAAiB,CAAC;AACtB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","listIcon","marginTop","marginRight","groupHeading","backgroundColor","groupHeadingBgColor","fontSize","paddingLeft","paddingRight","lineHeight","fontFamily","baseFont","loadingIcon","flex","alignSelf","justifyContent","color","listSubTitleColor","heading","padding","marginBottom","listHeaderBgColor","title","listTitleColor","fontWeight","subheading","emptyMessage","onDemandMessage","paddingVertical","width","textAlign","group","item","getStyle","shadowColor","flexDirection","paddingTop","paddingBottom","minHeight","itemBgColor","borderColor","selectedItemBorderColor","borderRadius","borderStyle","selectedItem","selectedIcon","position","right","top","primaryColor","skeleton","minWidth","borderBottomWidth","borderBottomColor","listDividerColor","borderRightWidth","borderRightColor"],"sources":["list.styles.ts"],"sourcesContent":["import { TextStyle, ViewStyle } from 'react-native';\nimport BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmLabelStyles } from '@wavemaker/app-rn-runtime/components/basic/label/label.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmListStyles = BaseStyles & {\n heading: AllStyle,\n groupHeading: TextStyle,\n listIcon: WmIconStyles,\n loadingIcon: WmIconStyles,\n title: WmLabelStyles,\n subheading: WmLabelStyles,\n emptyMessage: WmLabelStyles,\n onDemandMessage: WmLabelStyles,\n item: AllStyle,\n selectedItem: AllStyle,\n selectedIcon: WmIconStyles,\n group: AllStyle,\n skeleton: WmSkeletonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-list';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmListStyles = defineStyles({\n root: {},\n text: {},\n listIcon: {\n root: {\n marginTop: 10,\n marginRight: 8\n }\n } as WmIconStyles,\n groupHeading: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\n },\n loadingIcon: {\n root: {\n flex: 1,\n alignSelf: 'center',\n justifyContent: 'center',\n fontSize: 16\n },\n text: {\n color: themeVariables.listSubTitleColor\n }\n } as WmIconStyles,\n heading : {\n padding: 8,\n marginBottom: 6,\n backgroundColor: themeVariables.listHeaderBgColor\n },\n title: {\n text: {\n color: themeVariables.listTitleColor,\n fontSize: 16,\n fontFamily: themeVariables.baseFont,\n lineHeight: 24,\n fontWeight: '400' \n }\n } as WmLabelStyles,\n subheading: {\n text: {\n fontSize: 14,\n lineHeight: 20,\n fontFamily: themeVariables.baseFont,\n fontWeight: '400',\n color: themeVariables.listSubTitleColor\n }\n } as WmLabelStyles,\n emptyMessage: {\n root: {\n flex: 1,\n alignSelf: 'center',\n fontSize: 16,\n lineHeight: 18,\n color: themeVariables.listSubTitleColor\n }\n } as WmLabelStyles,\n onDemandMessage: {\n root: {\n paddingVertical: 8,\n width: '100%'\n } as ViewStyle,\n text: {\n textAlign: 'center',\n color: themeVariables.listSubTitleColor\n }\n } as WmLabelStyles,\n group: {\n marginBottom: 16,\n },\n item: {\n ...BASE_THEME.getStyle('elevate1').root,\n shadowColor: 'rgba(0, 0, 0, 0.3)',\n paddingLeft: 4,\n paddingRight: 4,\n flex: 1,\n flexDirection: 'row',\n paddingTop: 4,\n paddingBottom: 4,\n minHeight: 56,\n backgroundColor: themeVariables.itemBgColor,\n borderColor: themeVariables.selectedItemBorderColor,\n borderRadius: 6,\n borderStyle: 'solid',\n },\n selectedItem : {} as AllStyle,\n selectedIcon : {\n root: {\n position: 'absolute',\n right: 0,\n top: 0\n },\n text: {\n color: themeVariables.primaryColor,\n fontSize: 16\n }\n } as WmIconStyles,\n skeleton: {\n root: {\n shadowColor: 'transparent',\n paddingTop: 0,\n paddingBottom: 0, \n paddingLeft: 0,\n paddingRight: 0, \n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n\n addStyle('app-horizontal-list', '', {\n groupHeading: {\n minWidth: 120,\n backgroundColor: themeVariables.groupHeadingBgColor,\n },\n item: {\n marginRight: 6,\n borderColor: themeVariables.selectedItemBorderColor,\n }\n } as WmListStyles);\n\n addStyle('app-vertical-list', '', {\n item: {\n marginBottom: 6,\n width: '100%',\n borderBottomWidth: 0,\n borderBottomColor: themeVariables.listDividerColor,\n }\n } as any as WmListStyles);\n\n addStyle('app-horizontal-list-dense', '', {\n item: {\n marginRight: 0,\n borderRadius: 0,\n borderRightWidth: 1,\n borderRightColor: 'rgba(0,0,0,0.05)'\n } as ViewStyle\n } as WmListStyles);\n\n addStyle('app-list-dense', '', {\n item: {\n marginBottom: 0,\n borderRadius: 0,\n borderBottomWidth: 1,\n borderBottomColor: 'rgba(0,0,0,0.05)'\n } as ViewStyle\n } as WmListStyles);\n});\n"],"mappings":"AACA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAqBxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA2B,GAAGL,YAAY,CAAC;IAC7CM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EA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AAQ,EAAE,GAAG;MACb/C,eAAe,EAAET,cAAc,CAACU;IACpC,CAAC;IACD2B,IAAI,EAAE;MACF9B,WAAW,EAAE,CAAC;MACdsC,WAAW,EAAE7C,cAAc,CAAC8C;IAChC;EACJ,CAAiB,CAAC;EAElB7C,QAAQ,CAAC,mBAAmB,EAAE,EAAE,EAAE;IAC9BoC,IAAI,EAAE;MACFZ,YAAY,EAAE,CAAC;MACfS,KAAK,EAAE,MAAM;MACbuB,iBAAiB,EAAE,CAAC;MACpBC,iBAAiB,EAAE1D,cAAc,CAAC2D;IACtC;EACJ,CAAwB,CAAC;EAEzB1D,QAAQ,CAAC,2BAA2B,EAAE,EAAE,EAAE;IACtCoC,IAAI,EAAE;MACF9B,WAAW,EAAE,CAAC;MACdwC,YAAY,EAAE,CAAC;MACfa,gBAAgB,EAAE,CAAC;MACnBC,gBAAgB,EAAE;IACtB;EACJ,CAAiB,CAAC;EAElB5D,QAAQ,CAAC,gBAAgB,EAAE,EAAE,EAAE;IAC3BoC,IAAI,EAAE;MACFZ,YAAY,EAAE,CAAC;MACfsB,YAAY,EAAE,CAAC;MACfU,iBAAiB,EAAE,CAAC;MACpBC,iBAAiB,EAAE;IACvB;EACJ,CAAiB,CAAC;AACtB,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minWidth","paddingTop","paddingBottom","paddingLeft","paddingRight","elevation","width","maxHeight","maxModalHeight","backgroundColor","dialogBackgroundColor","borderRadius","text","modal","modalContent","undefined","icon","alignSelf","fontFamily","baseFont","fontSize","fontWeight","color","dialogLabelColor","dialogIconColor","header","flexDirection","borderStyle","borderColor","dialogBorderColor","headerLabel","flex","justifyContent","alignItems","closeBtn","minHeight","marginBottom","rippleColor","transparent","dialogCloseIconColor"],"sources":["dialog.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmButtonStyles } from '../../basic/button/button.styles';\n\nexport type WmDialogStyles = BaseStyles & {\n modal: ViewStyle,\n modalContent: ViewStyle,\n icon: WmIconStyles,\n closeBtn: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-dialog';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmDialogStyles = defineStyles<WmDialogStyles>({\n root: {\n minWidth: 320,\n paddingTop: 24,\n paddingBottom: 24,\n paddingLeft: 24,\n paddingRight: 24,\n elevation: 6,\n width: '90%',\n maxHeight: themeVariables.maxModalHeight,\n backgroundColor: themeVariables.dialogBackgroundColor,\n borderRadius: 28,\n },\n text: {},\n modal: {},\n modalContent: {\n width: undefined\n },\n icon: {\n root: {\n alignSelf: 'center',\n },\n text: {\n fontFamily: themeVariables.baseFont,\n fontSize: 24,\n fontWeight: '400',\n color : themeVariables.dialogLabelColor,\n },\n icon: {\n fontSize: 24,\n color: themeVariables.dialogIconColor\n }\n } as WmIconStyles,\n header: {\n flexDirection: 'row',\n borderStyle: 'solid',\n borderColor: themeVariables.dialogBorderColor\n },\n headerLabel: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center',\n paddingBottom: 16,\n },\n closeBtn: {\n root: {\n alignSelf: 'flex-end',\n backgroundColor: 'transparent',\n borderRadius: 8,\n paddingRight: 8,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 8,\n minHeight: 0,\n marginBottom: 22,\n rippleColor: themeVariables.transparent\n },\n icon : {\n root: {\n alignItems: 'center',\n },\n icon: {\n paddingRight: 0\n },\n text: {\n color: themeVariables.dialogCloseIconColor,\n fontSize: 14\n }\n }\n } as WmButtonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"A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;MACNnC,IAAI,EAAE;QACFkB,SAAS,EAAE,UAAU;QACrBR,eAAe,EAAE,aAAa;QAC9BE,YAAY,EAAE,CAAC;QACfP,YAAY,EAAE,CAAC;QACfH,UAAU,EAAE,CAAC;QACbC,aAAa,EAAE,CAAC;QAChBC,WAAW,EAAE,CAAC;QACdgC,SAAS,EAAE,CAAC;QACZC,YAAY,EAAE,EAAE;QAChBC,WAAW,EAAEzC,cAAc,CAAC0C;MAChC,CAAC;MACDtB,IAAI,EAAG;QACHjB,IAAI,EAAE;UACFkC,UAAU,EAAE;QAChB,CAAC;QACDjB,IAAI,EAAE;UACFZ,YAAY,EAAE;QAClB,CAAC;QACDQ,IAAI,EAAE;UACFU,KAAK,EAAE1B,cAAc,CAAC2C,oBAAoB;UAC1CnB,QAAQ,EAAE;QACd;MACJ;IACJ;EACJ,CAAC,CAAC;EAEFvB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minWidth","paddingTop","paddingBottom","paddingLeft","paddingRight","elevation","width","maxHeight","maxModalHeight","backgroundColor","dialogBackgroundColor","borderRadius","text","modal","modalContent","undefined","icon","alignSelf","fontFamily","baseFont","fontSize","fontWeight","color","dialogLabelColor","dialogIconColor","header","flexDirection","borderStyle","borderColor","dialogBorderColor","headerLabel","flex","justifyContent","alignItems","closeBtn","minHeight","marginBottom","rippleColor","transparent","dialogCloseIconColor"],"sources":["dialog.styles.ts"],"sourcesContent":["import { ViewStyle } from 'react-native';\nimport BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\nimport { WmButtonStyles } from '@wavemaker/app-rn-runtime/components/basic/button/button.styles';\n\nexport type WmDialogStyles = BaseStyles & {\n modal: ViewStyle,\n modalContent: ViewStyle,\n icon: WmIconStyles,\n closeBtn: WmButtonStyles\n};\n\nexport const DEFAULT_CLASS = 'app-dialog';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmDialogStyles = defineStyles<WmDialogStyles>({\n root: {\n minWidth: 320,\n paddingTop: 24,\n paddingBottom: 24,\n paddingLeft: 24,\n paddingRight: 24,\n elevation: 6,\n width: '90%',\n maxHeight: themeVariables.maxModalHeight,\n backgroundColor: themeVariables.dialogBackgroundColor,\n borderRadius: 28,\n },\n text: {},\n modal: {},\n modalContent: {\n width: undefined\n },\n icon: {\n root: {\n alignSelf: 'center',\n },\n text: {\n fontFamily: themeVariables.baseFont,\n fontSize: 24,\n fontWeight: '400',\n color : themeVariables.dialogLabelColor,\n },\n icon: {\n fontSize: 24,\n color: themeVariables.dialogIconColor\n }\n } as WmIconStyles,\n header: {\n flexDirection: 'row',\n borderStyle: 'solid',\n borderColor: themeVariables.dialogBorderColor\n },\n headerLabel: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center',\n paddingBottom: 16,\n },\n closeBtn: {\n root: {\n alignSelf: 'flex-end',\n backgroundColor: 'transparent',\n borderRadius: 8,\n paddingRight: 8,\n paddingTop: 8,\n paddingBottom: 8,\n paddingLeft: 8,\n minHeight: 0,\n marginBottom: 22,\n rippleColor: themeVariables.transparent\n },\n icon : {\n root: {\n alignItems: 'center',\n },\n icon: {\n paddingRight: 0\n },\n text: {\n color: themeVariables.dialogCloseIconColor,\n fontSize: 14\n }\n }\n } as WmButtonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AACA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAWxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,K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AC;QAChBC,WAAW,EAAE,CAAC;QACdgC,SAAS,EAAE,CAAC;QACZC,YAAY,EAAE,EAAE;QAChBC,WAAW,EAAEzC,cAAc,CAAC0C;MAChC,CAAC;MACDtB,IAAI,EAAG;QACHjB,IAAI,EAAE;UACFkC,UAAU,EAAE;QAChB,CAAC;QACDjB,IAAI,EAAE;UACFZ,YAAY,EAAE;QAClB,CAAC;QACDQ,IAAI,EAAE;UACFU,KAAK,EAAE1B,cAAc,CAAC2C,oBAAoB;UAC1CnB,QAAQ,EAAE;QACd;MACJ;IACJ;EACJ,CAAC,CAAC;EAEFvB,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","flexDirection","alignContent","text","alignSelf","fontFamily","baseFont","fontSize","color","labelDefaultColor","marginLeft","skeleton","width","height","checkicon","borderRadius","backgroundColor","primaryColor","justifyContent","alignItems","borderColor","checkedBorderColor","icon","checkedIconColor","padding","uncheckicon","borderWidth","uncheckedBorderColor","uncheckedBgColor","opacity","checkedDisabledColor"],"sources":["checkbox.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 '../../basic/icon/icon.styles';\n\nexport type WmCheckboxStyles = BaseStyles & {\n skeleton: WmSkeletonStyles;\n checkicon: WmIconStyles;\n uncheckicon: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-checkbox';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCheckboxStyles = defineStyles({\n root: {\n flexDirection: 'row',\n alignContent: 'center',\n },\n text: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8\n },\n skeleton: {\n root: {\n width: '100%',\n height: 16\n }\n } as any as WmSkeletonStyles,\n checkicon : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 4,\n backgroundColor: themeVariables.primaryColor,\n justifyContent: 'center',\n alignItems: 'center',\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 18,\n },\n icon : {\n color: themeVariables.checkedIconColor,\n padding: 0\n }\n } as WmIconStyles,\n uncheckicon : {\n root: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderRadius: 4,\n borderColor: themeVariables.uncheckedBorderColor,\n backgroundColor: themeVariables.uncheckedBgColor,\n },\n text: {},\n icon : {\n color: 'transparent',\n }\n } as WmIconStyles,\n });\n\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.8\n },\n text : {\n color: themeVariables.checkedDisabledColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n });\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAUxF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACJC,SAAS,EAAE,QAAQ;MACnBC,UAAU,EAAER,cAAc,CAACS,QAAQ;MACnCC,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEX,cAAc,CAACY,iBAAiB;MACvCC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRX,IAAI,EAAE;QACJY,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE;MACV;IACF,CAA4B;IAC5BC,SAAS,EAAG;MACVd,IAAI,EAAE;QACJY,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVE,YAAY,EAAE,CAAC;QACfC,eAAe,EAAEnB,cAAc,CAACoB,YAAY;QAC5CC,cAAc,EAAE,QAAQ;QACxBC,UAAU,EAAE,QAAQ;QACpBC,WAAW,EAAEvB,cAAc,CAACwB;MAC9B,CAAC;MACDlB,IAAI,EAAE;QACJI,QAAQ,EAAE;MACZ,CAAC;MACDe,IAAI,EAAG;QACLd,KAAK,EAAEX,cAAc,CAAC0B,gBAAgB;QACtCC,OAAO,EAAE;MACX;IACJ,CAAiB;IACfC,WAAW,EAAG;MACZzB,IAAI,EAAE;QACJY,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVa,WAAW,EAAE,CAAC;QACdX,YAAY,EAAE,CAAC;QACfK,WAAW,EAAEvB,cAAc,CAAC8B,oBAAoB;QAChDX,eAAe,EAAEnB,cAAc,CAAC+B;MAClC,CAAC;MACDzB,IAAI,EAAE,CAAC,CAAC;MACRmB,IAAI,EAAG;QACLd,KAAK,EAAE;MACT;IACJ;EACA,CAAC,CAAC;EAGJV,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACL6B,OAAO,EAAE;IACX,CAAC;IACD1B,IAAI,EAAG;MACLK,KAAK,EAAEX,cAAc,CAACiC;IACxB;EACF,CAAC,CAAC;EAEFhC,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","flexDirection","alignContent","text","alignSelf","fontFamily","baseFont","fontSize","color","labelDefaultColor","marginLeft","skeleton","width","height","checkicon","borderRadius","backgroundColor","primaryColor","justifyContent","alignItems","borderColor","checkedBorderColor","icon","checkedIconColor","padding","uncheckicon","borderWidth","uncheckedBorderColor","uncheckedBgColor","opacity","checkedDisabledColor"],"sources":["checkbox.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 WmCheckboxStyles = BaseStyles & {\n skeleton: WmSkeletonStyles;\n checkicon: WmIconStyles;\n uncheckicon: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-checkbox';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCheckboxStyles = defineStyles({\n root: {\n flexDirection: 'row',\n alignContent: 'center',\n },\n text: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8\n },\n skeleton: {\n root: {\n width: '100%',\n height: 16\n }\n } as any as WmSkeletonStyles,\n checkicon : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 4,\n backgroundColor: themeVariables.primaryColor,\n justifyContent: 'center',\n alignItems: 'center',\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 18,\n },\n icon : {\n color: themeVariables.checkedIconColor,\n padding: 0\n }\n } as WmIconStyles,\n uncheckicon : {\n root: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderRadius: 4,\n borderColor: themeVariables.uncheckedBorderColor,\n backgroundColor: themeVariables.uncheckedBgColor,\n },\n text: {},\n icon : {\n color: 'transparent',\n }\n } as WmIconStyles,\n });\n\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n opacity: 0.8\n },\n text : {\n color: themeVariables.checkedDisabledColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n });\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,Y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C;EAGJV,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACL6B,OAAO,EAAE;IACX,CAAC;IACD1B,IAAI,EAAG;MACLK,KAAK,EAAEX,cAAc,CAACiC;IACxB;EACF,CAAC,CAAC;EAEFhC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
@@ -11,6 +11,8 @@ import { DEFAULT_CLASS } from './checkboxset.styles';
11
11
  import { BaseDatasetComponent, BaseDatasetState } from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';
12
12
  import WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';
13
13
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
14
+ import { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';
15
+ import WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';
14
16
  export class WmCheckboxsetState extends BaseDatasetState {
15
17
  constructor(...args) {
16
18
  super(...args);
@@ -68,7 +70,7 @@ export default class WmCheckboxset extends BaseDatasetComponent {
68
70
  disabled: props.readonly || props.disabled,
69
71
  id: this.getTestId('item' + index)
70
72
  }), !isEmpty(this.state.template) && this.props.renderitempartial ? this.props.renderitempartial(item.dataObject, index, this.state.template) : /*#__PURE__*/React.createElement(Text, _extends({}, this.getTestPropsForLabel(index + ''), {
71
- style: this.styles.text
73
+ style: [this.styles.text, item.selected ? this.styles.selectedLabel : null]
72
74
  }), displayText));
73
75
  }
74
76
  computeDisplayValue() {
@@ -112,6 +114,24 @@ export default class WmCheckboxset extends BaseDatasetComponent {
112
114
  }
113
115
  }, items && items.length ? items.map((item, index) => this.renderChild(item, index, colWidth)) : null);
114
116
  }
117
+ renderSkeleton(props) {
118
+ var _ref;
119
+ const noOfColumns = props.itemsperrow.xs || 1;
120
+ const colWidth = Math.round(100 / noOfColumns) + '%';
121
+ return [...getNumberOfEmptyObjects((_ref = props.numberofskeletonitems) !== null && _ref !== void 0 ? _ref : 3)].map(_ => {
122
+ return /*#__PURE__*/React.createElement(View, {
123
+ style: [this.styles.item, {
124
+ width: colWidth
125
+ }]
126
+ }, /*#__PURE__*/React.createElement(WmIcon, {
127
+ styles: this.styles.checkicon
128
+ }), /*#__PURE__*/React.createElement(WmLabel, {
129
+ styles: {
130
+ root: this.styles.text
131
+ }
132
+ }));
133
+ });
134
+ }
115
135
  renderWidget(props) {
116
136
  const items = this.state.dataItems;
117
137
  return /*#__PURE__*/React.createElement(ScrollView, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Text","View","TouchableOpacity","ScrollView","find","forEach","isEqual","isEmpty","WmCheckboxsetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","AccessibilityWidgetType","getAccessibilityProps","WmCheckboxsetState","constructor","args","_defineProperty","WmCheckboxset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","push","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","createElement","_extends","getTestPropsForAction","style","styles","checkedItem","width","bind","CHECKBOX","hint","checked","accessibilityRole","accessibilityLabel","iconclass","checkicon","uncheckicon","id","getTestId","template","renderitempartial","dataObject","getTestPropsForLabel","text","displayValue","filter","map","updateDatavalue","value","Promise","resolve","setTemplate","partialName","renderGroupby","groupedData","length","groupObj","groupHeaderTitle","renderCheckboxses","data","items","noOfColumns","itemsperrow","xs","Math","round","flexWrap","flexDirection","renderWidget","root","horizontal","groupby"],"sources":["checkboxset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity, DimensionValue } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, forEach, isEqual, isEmpty } from 'lodash';\nimport WmCheckboxsetProps from './checkboxset.props';\nimport {\n DEFAULT_CLASS,\n\n WmCheckboxsetStyles,\n} from './checkboxset.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 { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\n\nexport class WmCheckboxsetState extends BaseDatasetState<WmCheckboxsetProps> {\n isValid: boolean = true;\n template: string = \"\";\n}\n\nexport default class WmCheckboxset extends BaseDatasetComponent<WmCheckboxsetProps, WmCheckboxsetState, WmCheckboxsetStyles> {\n constructor(props: WmCheckboxsetProps) {\n super(props, DEFAULT_CLASS, new WmCheckboxsetProps());\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 = !item.selected;\n const 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 forEach(this.state.dataItems, (item) => {\n if (item.selected) {\n selectedValue.push(item.datafield);\n }\n });\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmCheckboxsetState,\n () => {\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 props = this.state.props;\n const displayText = item.displayexp || item.displayfield;\n return (\n <TouchableOpacity {...this.getTestPropsForAction(index + '')}\n style={[this.styles.item, item.selected ? this.styles.checkedItem : null, {width: colWidth}]}\n onPress={this.onPress.bind(this, item)} key={item.key} {...getAccessibilityProps(AccessibilityWidgetType.CHECKBOX, {hint: props?.hint, checked: item.selected})} accessibilityRole='checkbox' accessibilityLabel={`Checkbox for ${displayText}`}>\n <WmIcon iconclass=\"wi wi-check\" styles={item.selected? this.styles.checkicon : this.styles.uncheckicon} disabled={props.readonly || props.disabled} id={this.getTestId('item'+index)}/>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) :\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.text}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n computeDisplayValue() {\n this.updateState({\n props: {\n displayValue: ((this.state.dataItems || [] as any)\n .filter((item: any) => item.selected)\n .map((item: any) => item.displayexp || item.displayfield)) || ''\n }\n } as WmCheckboxsetState);\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmCheckboxsetState);\n return Promise.resolve();\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmCheckboxsetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View>\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.renderCheckboxses(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderCheckboxses(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(<View style = { noOfColumns === 1 ? {} : {flexWrap: 'wrap', flexDirection: 'row'}}>\n {items && items.length\n ? items.map((item: any, index: any) => this.renderChild(item, index, colWidth))\n : null}\n </View>)\n }\n renderWidget(props: WmCheckboxsetProps) {\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.renderCheckboxses(items)}\n </ScrollView>\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAwB,cAAc;AAC3E,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,OAAO,EAAEC,OAAO,E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AQ,EAAE,MAAM;QAAEC,aAAa,EAAE;MAAK;IAAE,GACtFP,KAAK,IAAIA,KAAK,CAACL,MAAM,GAClBK,KAAK,CAACd,GAAG,CAAC,CAACnD,IAAS,EAAEqB,KAAU,KAAK,IAAI,CAACD,WAAW,CAACpB,IAAI,EAAEqB,KAAK,EAAEC,QAAQ,CAAC,CAAC,GAC7E,IACA,CAAC;EACT;EACAmD,YAAYA,CAAC3E,KAAyB,EAAE;IACtC,MAAMmE,KAAK,GAAG,IAAI,CAAChE,KAAK,CAACQ,SAAS;IAClC,oBACEhC,KAAA,CAAAiD,aAAA,CAAC7C,UAAU;MAACgD,KAAK,EAAE,IAAI,CAACC,MAAM,CAAC4C;IAAK,gBAClCjG,KAAA,CAAAiD,aAAA,CAAC7C,UAAU;MAAC8F,UAAU,EAAE;IAAK,GAC1B7E,KAAK,CAAC8E,OAAO,IAAI,IAAI,CAAClB,aAAa,CAAC,CAAC,EACrC,CAAC5D,KAAK,CAAC8E,OAAO,IAAI,IAAI,CAACb,iBAAiB,CAACE,KAAK,CACrC,CACF,CAAC;EAEjB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Text","View","TouchableOpacity","ScrollView","find","forEach","isEqual","isEmpty","WmCheckboxsetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","AccessibilityWidgetType","getAccessibilityProps","getNumberOfEmptyObjects","WmLabel","WmCheckboxsetState","constructor","args","_defineProperty","WmCheckboxset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","push","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","createElement","_extends","getTestPropsForAction","style","styles","checkedItem","width","bind","CHECKBOX","hint","checked","accessibilityRole","accessibilityLabel","iconclass","checkicon","uncheckicon","id","getTestId","template","renderitempartial","dataObject","getTestPropsForLabel","text","selectedLabel","displayValue","filter","map","updateDatavalue","value","Promise","resolve","setTemplate","partialName","renderGroupby","groupedData","length","groupObj","groupHeaderTitle","renderCheckboxses","data","items","noOfColumns","itemsperrow","xs","Math","round","flexWrap","flexDirection","renderSkeleton","_ref","numberofskeletonitems","_","root","renderWidget","horizontal","groupby"],"sources":["checkboxset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View, TouchableOpacity, DimensionValue } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, forEach, isEqual, isEmpty } from 'lodash';\nimport WmCheckboxsetProps from './checkboxset.props';\nimport {\n DEFAULT_CLASS,\n\n WmCheckboxsetStyles,\n} from './checkboxset.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 { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\n\nexport class WmCheckboxsetState extends BaseDatasetState<WmCheckboxsetProps> {\n isValid: boolean = true;\n template: string = \"\";\n}\n\nexport default class WmCheckboxset extends BaseDatasetComponent<WmCheckboxsetProps, WmCheckboxsetState, WmCheckboxsetStyles> {\n constructor(props: WmCheckboxsetProps) {\n super(props, DEFAULT_CLASS, new WmCheckboxsetProps());\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 = !item.selected;\n const 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 forEach(this.state.dataItems, (item) => {\n if (item.selected) {\n selectedValue.push(item.datafield);\n }\n });\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmCheckboxsetState,\n () => {\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 props = this.state.props;\n const displayText = item.displayexp || item.displayfield;\n return (\n <TouchableOpacity {...this.getTestPropsForAction(index + '')}\n style={[this.styles.item, item.selected ? this.styles.checkedItem : null, {width: colWidth}]}\n onPress={this.onPress.bind(this, item)} key={item.key} {...getAccessibilityProps(AccessibilityWidgetType.CHECKBOX, {hint: props?.hint, checked: item.selected})} accessibilityRole='checkbox' accessibilityLabel={`Checkbox for ${displayText}`}>\n <WmIcon iconclass=\"wi wi-check\" styles={item.selected? this.styles.checkicon : this.styles.uncheckicon} disabled={props.readonly || props.disabled} id={this.getTestId('item'+index)}/>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) :\n <Text {...this.getTestPropsForLabel(index + '')} style={[this.styles.text, item.selected ? this.styles.selectedLabel: null]}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n computeDisplayValue() {\n this.updateState({\n props: {\n displayValue: ((this.state.dataItems || [] as any)\n .filter((item: any) => item.selected)\n .map((item: any) => item.displayexp || item.displayfield)) || ''\n }\n } as WmCheckboxsetState);\n }\n\n updateDatavalue(value: any) {\n this.updateState({ props: { datavalue: value }} as WmCheckboxsetState);\n return Promise.resolve();\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmCheckboxsetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View>\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.renderCheckboxses(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderCheckboxses(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(<View style = {noOfColumns === 1 ? {} : {flexWrap: 'wrap', flexDirection: 'row'}}>\n {items && items.length\n ? items.map((item: any, index: any) => this.renderChild(item, index, colWidth))\n : null}\n </View>)\n }\n\n public renderSkeleton(props: WmCheckboxsetProps): 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 ?? 3)].map(_ => {\n return <View style={[this.styles.item, {width: colWidth}]}>\n <WmIcon styles={this.styles.checkicon}/>\n <WmLabel styles={{ root: this.styles.text }}/>\n </View>\n })\n }\n\n renderWidget(props: WmCheckboxsetProps) {\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.renderCheckboxses(items)}\n </ScrollView>\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAwB,cAAc;AAC3E,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAGC,OAAO,QAAQ,QAAQ;AACzD,OAAOC,kBAAkB,MAAM,qBAAqB;AACpD,SACEC,aAAa,QAGR,sBAAsB;AAC7B,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AACnF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,uBAAuB,QAAQ,sCAAsC;AAC9E,OAAOC,OAAO,MAAM,kEAAkE;AAEtF,OAAO,MAAMC,kBAAkB,SAASN,gBAAgB,CAAqB;EAAAO,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBACxD,IAAI;IAAAA,eAAA,mBACJ,EAAE;EAAA;AACv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ends BaseDatasetProps {
15
15
  lg: 1
16
16
  });
17
17
  _defineProperty(this, "renderitempartial", void 0);
18
+ _defineProperty(this, "numberofskeletonitems", void 0);
18
19
  }
19
20
  }
20
21
  //# sourceMappingURL=checkboxset.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseDatasetProps","WmCheckboxsetProps","constructor","args","_defineProperty","xs","sm","md","lg"],"sources":["checkboxset.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmCheckboxsetProps extends BaseDatasetProps {\n dataset: any = 'Option 1, Option 2, Option 3';\n displayValue: any = '';\n required: boolean = false;\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,kBAAkB,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAChD,8BAA8B;IAAAA,eAAA,uBACzB,EAAE;IAAAA,eAAA,mBACF,KAAK;IAAAA,eAAA,sBACV;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","WmCheckboxsetProps","constructor","args","_defineProperty","xs","sm","md","lg"],"sources":["checkboxset.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmCheckboxsetProps extends BaseDatasetProps {\n dataset: any = 'Option 1, Option 2, Option 3';\n displayValue: any = '';\n required: boolean = false;\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,kBAAkB,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAChD,8BAA8B;IAAAA,eAAA,uBACzB,EAAE;IAAAA,eAAA,mBACF,KAAK;IAAAA,eAAA,sBACV;MACbC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE;IACP,CAAC;IAAAJ,eAAA;IAAAA,eAAA;EAAA;AAGF","ignoreList":[]}
@@ -20,6 +20,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
20
20
  fontFamily: themeVariables.baseFont
21
21
  },
22
22
  checkedItem: {},
23
+ selectedLabel: {},
23
24
  item: {
24
25
  flexDirection: 'row',
25
26
  alignContent: 'center',
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","text","alignSelf","fontFamily","baseFont","fontSize","color","labelDefaultColor","marginLeft","groupHeaderTitle","backgroundColor","groupHeadingBgColor","paddingLeft","paddingRight","lineHeight","checkedItem","item","flexDirection","alignContent","marginRight","marginTop","skeleton","width","height","checkicon","borderRadius","primaryColor","justifyContent","alignItems","borderColor","checkedBorderColor","icon","checkedIconColor","padding","uncheckicon","borderWidth","uncheckedBorderColor","opacity","checkedDisabledColor"],"sources":["checkboxset.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 '../../basic/icon/icon.styles';\n\nexport type WmCheckboxsetStyles = BaseStyles & {\n groupHeaderTitle: AllStyle;\n item: AllStyle;\n skeleton: WmSkeletonStyles;\n checkicon: WmIconStyles;\n checkedItem: AllStyle;\n uncheckicon: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-checkboxset';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCheckboxsetStyles = defineStyles({\n root: {},\n text: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8,\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 checkedItem: {} as AllStyle,\n item: {\n flexDirection: 'row',\n alignContent: 'center',\n marginRight: -20,\n marginTop: 8\n } as AllStyle,\n skeleton: {\n root: {\n width: '100%',\n height: 16\n }\n } as any as WmSkeletonStyles,\n checkicon : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 4,\n backgroundColor: themeVariables.primaryColor,\n justifyContent: 'center',\n alignItems: 'center',\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 18,\n },\n icon : {\n color: themeVariables.checkedIconColor,\n padding: 0\n }\n } as WmIconStyles,\n uncheckicon : {\n root: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderRadius: 4,\n borderColor: themeVariables.uncheckedBorderColor,\n },\n text: {},\n icon : {\n color: 'transparent',\n }\n } as WmIconStyles,\n });\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {\n opacity: 0.8\n },\n text : {\n color: themeVariables.checkedDisabledColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAaxF,OAAO,MAAMC,aAAa,GAAG,iBAAiB;AAC9CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC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AE,CAAC;QACdV,YAAY,EAAE,CAAC;QACfI,WAAW,EAAEhC,cAAc,CAACuC;MAC9B,CAAC;MACDnC,IAAI,EAAE,CAAC,CAAC;MACR8B,IAAI,EAAG;QACLzB,KAAK,EAAE;MACT;IACJ;EACA,CAAC,CAAC;EAEFR,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAE;MACJqC,OAAO,EAAE;IACX,CAAC;IACDpC,IAAI,EAAG;MACLK,KAAK,EAAET,cAAc,CAACyC;IACxB;EACF,CAAC,CAAC;EAEFxC,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","text","alignSelf","fontFamily","baseFont","fontSize","color","labelDefaultColor","marginLeft","groupHeaderTitle","backgroundColor","groupHeadingBgColor","paddingLeft","paddingRight","lineHeight","checkedItem","selectedLabel","item","flexDirection","alignContent","marginRight","marginTop","skeleton","width","height","checkicon","borderRadius","primaryColor","justifyContent","alignItems","borderColor","checkedBorderColor","icon","checkedIconColor","padding","uncheckicon","borderWidth","uncheckedBorderColor","opacity","checkedDisabledColor"],"sources":["checkboxset.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 WmCheckboxsetStyles = BaseStyles & {\n groupHeaderTitle: AllStyle;\n item: AllStyle;\n skeleton: WmSkeletonStyles;\n checkicon: WmIconStyles;\n checkedItem: AllStyle;\n uncheckicon: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-checkboxset';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmCheckboxsetStyles = defineStyles({\n root: {},\n text: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8,\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 checkedItem: {} as AllStyle,\n selectedLabel: {} as AllStyle,\n item: {\n flexDirection: 'row',\n alignContent: 'center',\n marginRight: -20,\n marginTop: 8\n } as AllStyle,\n skeleton: {\n root: {\n width: '100%',\n height: 16\n }\n } as any as WmSkeletonStyles,\n checkicon : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 4,\n backgroundColor: themeVariables.primaryColor,\n justifyContent: 'center',\n alignItems: 'center',\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 18,\n },\n icon : {\n color: themeVariables.checkedIconColor,\n padding: 0\n }\n } as WmIconStyles,\n uncheckicon : {\n root: {\n width: 20,\n height: 20,\n borderWidth: 2,\n borderRadius: 4,\n borderColor: themeVariables.uncheckedBorderColor,\n },\n text: {},\n icon : {\n color: 'transparent',\n }\n } as WmIconStyles,\n });\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {\n opacity: 0.8\n },\n text : {\n color: themeVariables.checkedDisabledColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAaxF,OAAO,MAAMC,aAAa,GAAG,iBAAiB;AAC9CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAAkC,GAAGL,YAAY,CAAC;IACpDM,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE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MAC9B,CAAC;MACDpC,IAAI,EAAE,CAAC,CAAC;MACR+B,IAAI,EAAG;QACL1B,KAAK,EAAE;MACT;IACJ;EACA,CAAC,CAAC;EAEFR,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAE;MACJsC,OAAO,EAAE;IACX,CAAC;IACDrC,IAAI,EAAG;MACLK,KAAK,EAAET,cAAc,CAAC0C;IACxB;EACF,CAAC,CAAC;EAEFzC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","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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AACC,KAAK,CAAC,GAAG,GAAEJ,WAAW,CAAC,GAAG,GAAqB;IACrE,oBACE5E,KAAA,CAAA+C,aAAA,CAAC9C,IAAI;MAACgD,KAAK,EAAE2B,WAAW,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC1B,MAAM,CAAC+B;IAAM,GACrDN,KAAK,IAAIA,KAAK,CAACN,MAAM,GACpBM,KAAK,CAACL,GAAG,CAAC,CAAClD,IAAS,EAAEoB,KAAU,KAAK,IAAI,CAACD,WAAW,CAACnB,IAAI,EAAEoB,KAAK,EAAEC,QAAQ,CAAC,CAAC,GAAE,IAC7E,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"],"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;AAChC,OAAOC,OAAO,MAAM,kEAAkE;AACtF,SAASC,uBAAuB,QAAQ,sCAAsC;AAE9E,OAAO,MAAMC,eAAe,SAASP,gBAAgB,CAAkB;EAAAQ,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBAClD,EAAE;EAAA;AACvB;AAEA,eAAe,MAAMC,UAAU,SAASZ,oBAAoB,CAAqD;EAE/GS,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEd,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,CAAC;EACpD;EAEAgB,OAAOA,CAACC,IAAS,EAAE;IACjB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,QAAQ,IAAI,IAAI,CAACD,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,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":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dC,WAAW,EAAEnC,cAAc,CAACoC;MAC9B,CAAC;MACD9B,IAAI,EAAE,CAAC,CAAC;MACR+B,IAAI,EAAE;QACJC,OAAO,EAAE;MACX;IACF,CAAiB;IACjBC,YAAY,EAAG;MACbpC,IAAI,EAAE;QACJ0B,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE,EAAE;QAChBE,WAAW,EAAE,OAAO;QACpBC,WAAW,EAAE,CAAC;QACdC,WAAW,EAAEnC,cAAc,CAACoC;MAC9B,CAAC;MACD9B,IAAI,EAAE;QACJO,QAAQ,EAAE;MACZ,CAAC;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,CAACK;IACxB,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,KAAK,EAAE;MACLC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE;IACZ,CAAC;IACDC,gBAAgB,EAAE;MAChBC,eAAe,EAAEX,cAAc,CAACY,mBAAmB;MACnDC,QAAQ,EAAE,EAAE;MACZC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAE,EAAE;MACdC,UAAU,EAAEjB,cAAc,CAACkB;IAC7B,CAAa;IACbC,IAAI,EAAE;MACJX,aAAa,EAAE,KAAK;MACpBY,YAAY,EAAE,QAAQ;MACtBC,WAAW,EAAE,CAAC,EAAE;MAChBC,SAAS,EAAE;IACb,CAAa;IACbC,YAAY,EAAE,CAAC,CAAa;IAC5BC,aAAa,EAAE,CAAC,CAAa;IAC7BC,UAAU,EAAE;MACRC,SAAS,EAAE,QAAQ;MACnBT,UAAU,EAAEjB,cAAc,CAACkB,QAAQ;MACnCL,QAAQ,EAAE,EAAE;MACZT,KAAK,EAAEJ,cAAc,CAAC2B,iBAAiB;MACvCC,UAAU,EAAE;IAChB,CAAa;IACbC,QAAQ,EAAE;MACR1B,IAAI,EAAE;QACJ2B,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE;MAChB;IACF,CAA4B;IAC5BC,cAAc,EAAE;MACd9B,IAAI,EAAE;QACJ2B,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,EAAE,EAAE;QAChBE,WAAW,EAAE,OAAO;QACpBC,WAAW,EAAE,CAAC;QACdC,WAAW,EAAEpC,cAAc,CAACqC;MAC9B,CAAC;MACD/B,IAAI,EAAE,CAAC,CAAC;MACRgC,IAAI,EAAE;QACJC,OAAO,EAAE;MACX;IACF,CAAiB;IACjBC,YAAY,EAAG;MACbrC,IAAI,EAAE;QACJ2B,KAAK,EAAE,EAAE;QACTC,MAAM,EAAE,EAAE;QACVC,YAAY,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,cAAc,QAAQ,0EAA0E;AAC7H,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,OAAO,MAAMC,WAAW,SAASJ,cAAc,CAAc;AAG7D,eAAe,MAAMK,MAAM,SAASN,kBAAkB,CAAyC;EAE7FO,WAAWA,CAACC,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAEV,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,EAAE,IAAIQ,WAAW,CAAC,CAAC,CAAC;EACnE;EAEOI,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,qBAAqB,CAAC;IACrC;IACAH,OAAO,CAACG,IAAI,CAAC,KAAK,CAACJ,iBAAiB,CAAC,CAAC,CAAC;IACvC,OAAOC,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;EAC1B;EAEAC,YAAYA,CAACP,KAAkB,EAAE;IAAA,IAAAQ,qBAAA;IAC/B,IAAIC,IAAS,GAAG,CAAC,CAAC;IAClB,MAAMC,SAAS,GAAGtB,QAAQ,CAACuB,EAAE,KAAK,KAAK,GAAG,OAAO,GAAG,cAAc;IAClEF,IAAI,CA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1C,KAAK,CAAC2C,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,eAAe,EAAE5C,KAAK,CAAC6C,IAAI,KAAK,UAAU,IAAI,CAAC7C,KAAK,CAAC8C,QAAQ,GAAG,IAAI,GAAG,KAAM;MAC7EC,aAAa,EAAE/C,KAAK,CAAC+C,aAAc;MACnCD,QAAQ,EAAE9C,KAAK,CAAC8C,QAAS;MACzBE,SAAS,EAAEhD,KAAK,CAACiD,QAAS;MAC1BC,WAAW,EAAElD,KAAK,CAACkD,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,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;EA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IAAI,CAACjC,MAAM,CAACkC,OAAO,CAAE;MAC3FC,YAAY,EAAE,IAAI,CAAC5C,KAAK,CAAC4C,YAAa;MACtCC,YAAY,EAAEhD,KAAK,CAACiD,YAAY,GAAG,UAAU,GAAG,KAAM;MACtDC,SAAS,EAAElD,KAAK,CAACmD,SAAU;MAC3BC,QAAQ,EAAEpD,KAAK,CAACqD,QAAQ,IAAIrD,KAAK,CAACsD,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,eAAe,EAAEvD,KAAK,CAACwD,IAAI,KAAK,UAAU,IAAI,CAACxD,KAAK,CAACyD,QAAQ,GAAG,IAAI,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":[]}