@wavemaker/app-rn-runtime 12.0.0-next.45032 → 12.0.0-next.45501

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +18 -3
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
  4. app-rn-runtime/components/basic/anchor/anchor.component.js +2 -2
  5. app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
  6. app-rn-runtime/components/basic/animatedview.component.js +6 -2
  7. app-rn-runtime/components/basic/animatedview.component.js.map +1 -1
  8. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  9. app-rn-runtime/components/basic/button/button.component.js +5 -4
  10. app-rn-runtime/components/basic/button/button.component.js.map +1 -1
  11. app-rn-runtime/components/basic/icon/icon.component.js +4 -4
  12. app-rn-runtime/components/basic/icon/icon.component.js.map +1 -1
  13. app-rn-runtime/components/basic/label/label.component.js.map +1 -1
  14. app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
  15. app-rn-runtime/components/basic/message/message.component.js.map +1 -1
  16. app-rn-runtime/components/basic/picture/picture.component.js +1 -2
  17. app-rn-runtime/components/basic/picture/picture.component.js.map +1 -1
  18. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js +2 -2
  19. app-rn-runtime/components/basic/progress-bar/progress-bar.component.js.map +1 -1
  20. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js +5 -5
  21. app-rn-runtime/components/basic/progress-circle/progress-circle.component.js.map +1 -1
  22. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  23. app-rn-runtime/components/basic/spinner/spinner.component.js +2 -3
  24. app-rn-runtime/components/basic/spinner/spinner.component.js.map +1 -1
  25. app-rn-runtime/components/basic/spinner/spinner.styles.js +3 -2
  26. app-rn-runtime/components/basic/spinner/spinner.styles.js.map +1 -1
  27. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  28. app-rn-runtime/components/basic/video/video.styles.js +4 -1
  29. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  30. app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
  31. app-rn-runtime/components/chart/basechart.component.js +31 -2
  32. app-rn-runtime/components/chart/basechart.component.js.map +1 -1
  33. app-rn-runtime/components/chart/basechart.props.js +1 -0
  34. app-rn-runtime/components/chart/basechart.props.js.map +1 -1
  35. app-rn-runtime/components/chart/basechart.styles.js +4 -0
  36. app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
  37. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js +15 -3
  38. app-rn-runtime/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
  39. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +4 -1
  40. app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
  41. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +37 -11
  42. app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
  43. app-rn-runtime/components/container/accordion/accordion.component.js +3 -1
  44. app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
  45. app-rn-runtime/components/container/accordion/accordion.styles.js +1 -0
  46. app-rn-runtime/components/container/accordion/accordion.styles.js.map +1 -1
  47. app-rn-runtime/components/container/layoutgrid/gridcolumn/gridcolumn.component.js.map +1 -1
  48. app-rn-runtime/components/container/panel/panel.component.js +4 -2
  49. app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
  50. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +2 -3
  51. app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
  52. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  53. app-rn-runtime/components/container/wizard/wizard.component.js +27 -11
  54. app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
  55. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  56. app-rn-runtime/components/data/list/list.component.js.map +1 -1
  57. app-rn-runtime/components/dialogs/dialog/dialog.component.js +5 -3
  58. app-rn-runtime/components/dialogs/dialog/dialog.component.js.map +1 -1
  59. app-rn-runtime/components/input/basedataset/basedataset.component.js.map +1 -1
  60. app-rn-runtime/components/input/baseinput/baseinput.component.js +11 -4
  61. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  62. app-rn-runtime/components/input/baseinput/baseinput.props.js +1 -0
  63. app-rn-runtime/components/input/baseinput/baseinput.props.js.map +1 -1
  64. app-rn-runtime/components/input/basenumber/basenumber.component.js +25 -12
  65. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  66. app-rn-runtime/components/input/basenumber/basenumber.props.js +2 -0
  67. app-rn-runtime/components/input/basenumber/basenumber.props.js.map +1 -1
  68. app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -6
  69. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  70. app-rn-runtime/components/input/checkboxset/checkboxset.component.js +3 -2
  71. app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
  72. app-rn-runtime/components/input/chips/chips.component.js +3 -2
  73. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  74. app-rn-runtime/components/input/currency/currency.component.js +16 -1
  75. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  76. app-rn-runtime/components/input/epoch/base-datetime.component.js +22 -5
  77. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  78. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js +123 -12
  79. app-rn-runtime/components/input/epoch/wheel-date-picker.component.js.map +1 -1
  80. app-rn-runtime/components/input/epoch/wheelpicker/wheelpicker.component.js.map +1 -1
  81. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +4 -0
  82. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  83. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +2 -0
  84. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  85. app-rn-runtime/components/input/number/number.component.js +6 -3
  86. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  87. app-rn-runtime/components/input/radioset/radioset.component.js +6 -6
  88. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  89. app-rn-runtime/components/input/select/select.component.js +23 -9
  90. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  91. app-rn-runtime/components/input/switch/switch.component.js +2 -2
  92. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  93. app-rn-runtime/components/input/toggle/toggle.component.js +2 -4
  94. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  95. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +2 -2
  96. app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
  97. app-rn-runtime/components/navigation/basenav/basenav.component.js.map +1 -1
  98. app-rn-runtime/components/navigation/navitem/navitem.component.js +2 -3
  99. app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
  100. app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
  101. app-rn-runtime/components/page/tabbar/curve.js.map +1 -1
  102. app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
  103. app-rn-runtime/core/base.component.js +2 -1
  104. app-rn-runtime/core/base.component.js.map +1 -1
  105. app-rn-runtime/core/components/textinput.component.js +4 -3
  106. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  107. app-rn-runtime/core/formatters.js.map +1 -1
  108. app-rn-runtime/core/key.extractor.js.map +1 -1
  109. app-rn-runtime/core/props.provider.js +3 -0
  110. app-rn-runtime/core/props.provider.js.map +1 -1
  111. app-rn-runtime/core/storage.service.js.map +1 -1
  112. app-rn-runtime/core/tappable.component.js +26 -25
  113. app-rn-runtime/core/tappable.component.js.map +1 -1
  114. app-rn-runtime/core/ui-preferences.context.js +7 -0
  115. app-rn-runtime/core/ui-preferences.context.js.map +1 -0
  116. app-rn-runtime/core/utils.js +66 -4
  117. app-rn-runtime/core/utils.js.map +1 -1
  118. app-rn-runtime/package.json +28 -7
  119. app-rn-runtime/runtime/App.js +2 -1
  120. app-rn-runtime/runtime/App.js.map +1 -1
  121. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  122. app-rn-runtime/runtime/base-fragment.component.js +15 -0
  123. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  124. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  125. app-rn-runtime/runtime/base-prefab.component.js.map +1 -1
  126. app-rn-runtime/runtime/navigator/stack.navigator.js.map +1 -1
  127. app-rn-runtime/runtime/services/app-i18n.service.js +10 -0
  128. app-rn-runtime/runtime/services/app-i18n.service.js.map +1 -1
  129. app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
  130. app-rn-runtime/runtime/services/app-spinner.service.js +1 -1
  131. app-rn-runtime/runtime/services/app-spinner.service.js.map +1 -1
  132. app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
  133. app-rn-runtime/runtime/watcher.js.map +1 -1
  134. app-rn-runtime/styles/background.component.js +1 -0
  135. app-rn-runtime/styles/background.component.js.map +1 -1
  136. app-rn-runtime/styles/style-prop.validator.js.map +1 -1
  137. app-rn-runtime/styles/theme.js.map +1 -1
  138. app-rn-runtime/variables/base-variable.js.map +1 -1
  139. app-rn-runtime/variables/device/file/upload-file.operation.js.map +1 -1
  140. app-rn-runtime/variables/device-variable.js.map +1 -1
  141. app-rn-runtime/variables/service-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["parseInt","moment","CURRENCY_INFO","injector","DateToStringFormatter","format","input","replaceAll","_moment","ISO_8601","Math","floor","valueOf","toString","utc","isValid","PrependFormatter","prefix","undefined","AppendFormatter","suffix","NumberToStringFormatter","fractionSize","i18nService","I18nService","get","selectedLocale","getSelectedLocale","formatCurrency","Intl","NumberFormat","minimumFractionDigits","maximumFractionDigits","isNaN","CurrencyFormatter","data","currencySymbol","fracSize","_currencySymbol","symbol","_val","isNegativeNumber","startsWith","replace","TimeFromNowFormatter","timestamp","fromNow","StringToNumberFormatter","createFormatter","key","defaultFormatter","params","output","customFormatter","formatters","Map"],"sources":["formatters.ts"],"sourcesContent":["import { parseInt } from 'lodash';\nimport moment from 'moment';\nimport { CURRENCY_INFO, Currency } from './constants/currency-constants';\nimport { DateFormatter } from '@wavemaker/variables/src/types/date-formatter';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport interface Formatter {\n format: (input: any, ...params: any) => any;\n}\n\nexport class DateToStringFormatter implements DateFormatter {\n public format(input: Date, format: string): string {\n \n if (!input) return '';\n\n format = format.replaceAll('y', 'Y').replaceAll('d', 'D').replaceAll('E','d');\n let _moment = moment(input, [\n moment.ISO_8601,\n \"YYYY\",\n \"YYYY-MM\",\n \"YYYYMMDD\",\n \"YYYY-MM-DD\",\n \"YYYY-MM-DDTHH\",\n \"YYYY-MM-DDTHH:mm\",\n \"YYYY-MM-DDTHH:mm:ss\",\n \"YYYY-MM-DDTHH:mm:ss.SSS\",\n \"YYYY-MM-DD HH:mm:ss\",\n \"MM/DD/YYYY\",\n \"MM-DD-YYYY\",\n \"YYYY/MM/DD\",\n \"YYYY/MM\",\n \"D MMM YYYY\",\n \"MMM D YYYY\",\n \"MMMM D YYYY\",\n \"D MMMM YYYY\",\n \"D-MMM-YYYY\",\n \"D/MMM/YYYY\",\n \"YYYY-WWW\", \n \"YYYY-WWW-E\",\n \"YYYY-DDD\",\n \"YYYY-DDDTHH\",\n \"YYYY-DDDTHH:mm\",\n \"YYYY-DDDTHH:mm:ss\",\n \"YYYY-DDDTHH:mm:ss.SSS\",\n \"YYYY-DDD HH:mm:ss\",\n \"YYYY-MM-DDTHH:mm:ssZ\",\n \"YYYY-MM-DDTHH:mm:ss+00:00\",\n \"YYYY-MM-DDTHH:mm:ss-00:00\",\n \"YYYY-MM-DDTHH:mm:ss.SSSZ\",\n \"YYYY-MM-DDTHH:mm:ss.SSS+00:00\",\n \"YYYY-MM-DDTHH:mm:ss.SSS-00:00\",\n \"ddd, DD MMM YYYY HH:mm:ss ZZ\",\n \"DD MMM YYYY HH:mm:ss ZZ\",\n ], true);\n\n if (format === 'timestamp')\n return Math.floor(_moment.valueOf() / 1000).toString();\n\n if (format === 'UTC')\n return moment.utc(input).toString();\n\n return _moment.isValid() ? _moment.format(format) : input.toString();\n }\n}\n\nexport class PrependFormatter implements Formatter {\n\n public format(input: any, prefix: string): string {\n return (prefix || '') + (input !== null || input != undefined ? input : '');\n }\n}\n\nexport class AppendFormatter implements Formatter {\n\n public format(input: any, suffix: string): string {\n return (input !== null || input != undefined ? input : '') + (suffix || '');\n }\n}\n\nexport class NumberToStringFormatter implements Formatter {\n\n public format(input: number, fractionSize: number): string {\n const i18nService = injector.I18nService.get();\n const selectedLocale = i18nService.getSelectedLocale();\n let formatCurrency = new Intl.NumberFormat(selectedLocale,{\n minimumFractionDigits: fractionSize,\n maximumFractionDigits: fractionSize,\n });\n return isNaN(input) ? '': formatCurrency.format(input);\n }\n}\n\nexport class CurrencyFormatter implements Formatter {\n\n public format(data: number, currencySymbol: string, fracSize: number) {\n const _currencySymbol = ((((CURRENCY_INFO as any)[currencySymbol]) || {}) as Currency).symbol || currencySymbol || '';\n let _val = new NumberToStringFormatter().format(data, fracSize);\n const isNegativeNumber = _val.startsWith('-');\n if (isNegativeNumber) {\n _val = _val.replace('-','');\n }\n return _val ? isNegativeNumber ? '-'+ _currencySymbol +_val :_currencySymbol + _val : '';\n }\n}\n\nexport class TimeFromNowFormatter implements Formatter {\n public format(timestamp: Date) {\n return timestamp ? moment(timestamp).fromNow() : undefined;\n }\n}\n\nexport class StringToNumberFormatter implements Formatter {\n public format(input: string) {\n return parseInt(input);\n }\n}\n\nconst createFormatter = (key: string, defaultFormatter: Formatter) => {\n return {\n format: (input: any, ...params: any) => {\n const output = defaultFormatter.format(input, ...params);\n const customFormatter = formatters.get(`custom.${key}`);\n return customFormatter ? customFormatter.format(output, ...params): output;\n }\n };\n};\n\nconst formatters = new Map<string, Formatter>([\n ['numberToString', createFormatter('numberToString' , new NumberToStringFormatter())],\n ['prefix', createFormatter('prefix', new PrependFormatter())],\n ['suffix', createFormatter('suffix', new AppendFormatter())],\n ['stringToNumber', createFormatter('stringToNumber',new StringToNumberFormatter())],\n ['timeFromNow', createFormatter('timeFromNow', new TimeFromNowFormatter())],\n ['toDate', createFormatter('toDate', new DateToStringFormatter())],\n ['toCurrency', createFormatter('toCurrency', new CurrencyFormatter())]\n]);\n\nexport default formatters;"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAASC,aAAa,QAAkB,gCAAgC;AAExE,OAAOC,QAAQ,MAAM,yCAAyC;AAM9D,OAAO,MAAMC,qBAAqB,CAA0B;EACjDC,MAAMA,CAACC,KAAW,EAAED,MAAc,EAAU;IAE/C,IAAI,CAACC,KAAK,EAAE,OAAO,EAAE;IAErBD,MAAM,GAAGA,MAAM,CAACE,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAACA,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAACA,UAAU,CAAC,GAAG,EAAC,GAAG,CAAC;IAC7E,IAAIC,OAAO,GAAGP,MAAM,CAACK,KAAK,EAAE,CACxBL,MAAM,CAACQ,QAAQ,EACf,MAAM,EACN,SAAS,EACT,UAAU,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,+BAA+B,EAC/B,+BAA+B,E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M,CAAC;MACxD,MAAME,eAAe,GAAGC,UAAU,CAAC7B,GAAG,CAAE,UAASwB,GAAI,EAAC,CAAC;MACvD,OAAOI,eAAe,GAAGA,eAAe,CAAChD,MAAM,CAAC+C,MAAM,EAAE,GAAGD,MAAM,CAAC,GAAEC,MAAM;IAC9E;EACJ,CAAC;AACL,CAAC;AAED,MAAME,UAAU,GAAG,IAAIC,GAAG,CAAoB,CAC1C,CAAC,gBAAgB,EAAEP,eAAe,CAAC,gBAAgB,EAAG,IAAI3B,uBAAuB,CAAC,CAAC,CAAC,CAAC,EACrF,CAAC,QAAQ,EAAE2B,eAAe,CAAC,QAAQ,EAAE,IAAIhC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAC7D,CAAC,QAAQ,EAAEgC,eAAe,CAAC,QAAQ,EAAE,IAAI7B,eAAe,CAAC,CAAC,CAAC,CAAC,EAC5D,CAAC,gBAAgB,EAAE6B,eAAe,CAAC,gBAAgB,EAAC,IAAID,uBAAuB,CAAC,CAAC,CAAC,CAAC,EACnF,CAAC,aAAa,EAAEC,eAAe,CAAC,aAAa,EAAE,IAAIJ,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC3E,CAAC,QAAQ,EAAEI,eAAe,CAAC,QAAQ,EAAE,IAAI5C,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAClE,CAAC,YAAY,EAAE4C,eAAe,CAAC,YAAY,EAAE,IAAId,iBAAiB,CAAC,CAAC,CAAC,CAAC,CACzE,CAAC;AAEF,eAAeoB,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["parseInt","moment","CURRENCY_INFO","injector","DateToStringFormatter","format","input","replaceAll","_moment","ISO_8601","Math","floor","valueOf","toString","utc","isValid","PrependFormatter","prefix","undefined","AppendFormatter","suffix","NumberToStringFormatter","fractionSize","i18nService","I18nService","get","selectedLocale","getSelectedLocale","formatCurrency","Intl","NumberFormat","minimumFractionDigits","maximumFractionDigits","isNaN","CurrencyFormatter","data","currencySymbol","fracSize","_currencySymbol","symbol","_val","isNegativeNumber","startsWith","replace","TimeFromNowFormatter","timestamp","fromNow","StringToNumberFormatter","createFormatter","key","defaultFormatter","params","output","customFormatter","formatters","Map"],"sources":["formatters.ts"],"sourcesContent":["import { parseInt } from 'lodash';\nimport moment from 'moment';\nimport { CURRENCY_INFO, Currency } from './constants/currency-constants';\nimport { DateFormatter } from '@wavemaker/variables/src/types/date-formatter';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport interface Formatter {\n format: (input: any, ...params: any) => any;\n}\n\nexport class DateToStringFormatter implements DateFormatter {\n public format(input: Date, format: string): string {\n \n if (!input) return '';\n\n format = format.replaceAll('y', 'Y').replaceAll('d', 'D').replaceAll('E','d');\n let _moment = moment(input, [\n moment.ISO_8601,\n \"YYYY\",\n \"YYYY-MM\",\n \"YYYYMMDD\",\n \"YYYY-MM-DD\",\n \"YYYY-MM-DDTHH\",\n \"YYYY-MM-DDTHH:mm\",\n \"YYYY-MM-DDTHH:mm:ss\",\n \"YYYY-MM-DDTHH:mm:ss.SSS\",\n \"YYYY-MM-DD HH:mm:ss\",\n \"MM/DD/YYYY\",\n \"MM-DD-YYYY\",\n \"YYYY/MM/DD\",\n \"YYYY/MM\",\n \"D MMM YYYY\",\n \"MMM D YYYY\",\n \"MMMM D YYYY\",\n \"D MMMM YYYY\",\n \"D-MMM-YYYY\",\n \"D/MMM/YYYY\",\n \"YYYY-WWW\", \n \"YYYY-WWW-E\",\n \"YYYY-DDD\",\n \"YYYY-DDDTHH\",\n \"YYYY-DDDTHH:mm\",\n \"YYYY-DDDTHH:mm:ss\",\n \"YYYY-DDDTHH:mm:ss.SSS\",\n \"YYYY-DDD HH:mm:ss\",\n \"YYYY-MM-DDTHH:mm:ssZ\",\n \"YYYY-MM-DDTHH:mm:ss+00:00\",\n \"YYYY-MM-DDTHH:mm:ss-00:00\",\n \"YYYY-MM-DDTHH:mm:ss.SSSZ\",\n \"YYYY-MM-DDTHH:mm:ss.SSS+00:00\",\n \"YYYY-MM-DDTHH:mm:ss.SSS-00:00\",\n \"ddd, DD MMM YYYY HH:mm:ss ZZ\",\n \"DD MMM YYYY HH:mm:ss ZZ\",\n ], true);\n\n if (format === 'timestamp')\n return Math.floor(_moment.valueOf() / 1000).toString();\n\n if (format === 'UTC')\n return moment.utc(input).toString();\n\n return _moment.isValid() ? _moment.format(format) : input.toString();\n }\n}\n\nexport class PrependFormatter implements Formatter {\n\n public format(input: any, prefix: string): string {\n return (prefix || '') + (input !== null || input != undefined ? input : '');\n }\n}\n\nexport class AppendFormatter implements Formatter {\n\n public format(input: any, suffix: string): string {\n return (input !== null || input != undefined ? input : '') + (suffix || '');\n }\n}\n\nexport class NumberToStringFormatter implements Formatter {\n\n public format(input: number, fractionSize: number): string {\n const i18nService = injector.I18nService.get();\n const selectedLocale = i18nService.getSelectedLocale();\n let formatCurrency = new Intl.NumberFormat(selectedLocale,{\n minimumFractionDigits: fractionSize,\n maximumFractionDigits: fractionSize,\n });\n return isNaN(input) ? '': formatCurrency.format(input);\n }\n}\n\nexport class CurrencyFormatter implements Formatter {\n\n public format(data: number, currencySymbol: string, fracSize: number) {\n const _currencySymbol = ((((CURRENCY_INFO as any)[currencySymbol]) || {}) as Currency).symbol || currencySymbol || '';\n let _val = new NumberToStringFormatter().format(data, fracSize);\n const isNegativeNumber = _val.startsWith('-');\n if (isNegativeNumber) {\n _val = _val.replace('-','');\n }\n return _val ? isNegativeNumber ? '-'+ _currencySymbol +_val :_currencySymbol + _val : '';\n }\n}\n\nexport class TimeFromNowFormatter implements Formatter {\n public format(timestamp: Date) {\n return timestamp ? moment(timestamp).fromNow() : undefined;\n }\n}\n\nexport class StringToNumberFormatter implements Formatter {\n public format(input: string) {\n return parseInt(input);\n }\n}\n\nconst createFormatter = (key: string, defaultFormatter: Formatter) => {\n return {\n format: (input: any, ...params: any) => {\n const output = defaultFormatter.format(input, ...params);\n const customFormatter = formatters.get(`custom.${key}`);\n return customFormatter ? customFormatter.format(output, ...params): output;\n }\n };\n};\n\nconst formatters = new Map<string, Formatter>([\n ['numberToString', createFormatter('numberToString' , new NumberToStringFormatter())],\n ['prefix', createFormatter('prefix', new PrependFormatter())],\n ['suffix', createFormatter('suffix', new AppendFormatter())],\n ['stringToNumber', createFormatter('stringToNumber',new StringToNumberFormatter())],\n ['timeFromNow', createFormatter('timeFromNow', new TimeFromNowFormatter())],\n ['toDate', createFormatter('toDate', new DateToStringFormatter())],\n ['toCurrency', createFormatter('toCurrency', new CurrencyFormatter())]\n]);\n\nexport default formatters;"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAASC,aAAa,QAAkB,gCAAgC;AAExE,OAAOC,QAAQ,MAAM,yCAAyC;AAM9D,OAAO,MAAMC,qBAAqB,CAA0B;EACjDC,MAAMA,CAACC,KAAW,EAAED,MAAc,EAAU;IAE/C,IAAI,CAACC,KAAK,EAAE,OAAO,EAAE;IAErBD,MAAM,GAAGA,MAAM,CAACE,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAACA,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAACA,UAAU,CAAC,GAAG,EAAC,GAAG,CAAC;IAC7E,IAAIC,OAAO,GAAGP,MAAM,CAACK,KAAK,EAAE,CACxBL,MAAM,CAACQ,QAAQ,EACf,MAAM,EACN,SAAS,EACT,UAAU,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,+BAA+B,EA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E,GAAG6C,MAAM,CAAC;MACxD,MAAME,eAAe,GAAGC,UAAU,CAAC7B,GAAG,CAAC,UAAUwB,GAAG,EAAE,CAAC;MACvD,OAAOI,eAAe,GAAGA,eAAe,CAAChD,MAAM,CAAC+C,MAAM,EAAE,GAAGD,MAAM,CAAC,GAAEC,MAAM;IAC9E;EACJ,CAAC;AACL,CAAC;AAED,MAAME,UAAU,GAAG,IAAIC,GAAG,CAAoB,CAC1C,CAAC,gBAAgB,EAAEP,eAAe,CAAC,gBAAgB,EAAG,IAAI3B,uBAAuB,CAAC,CAAC,CAAC,CAAC,EACrF,CAAC,QAAQ,EAAE2B,eAAe,CAAC,QAAQ,EAAE,IAAIhC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAC7D,CAAC,QAAQ,EAAEgC,eAAe,CAAC,QAAQ,EAAE,IAAI7B,eAAe,CAAC,CAAC,CAAC,CAAC,EAC5D,CAAC,gBAAgB,EAAE6B,eAAe,CAAC,gBAAgB,EAAC,IAAID,uBAAuB,CAAC,CAAC,CAAC,CAAC,EACnF,CAAC,aAAa,EAAEC,eAAe,CAAC,aAAa,EAAE,IAAIJ,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC3E,CAAC,QAAQ,EAAEI,eAAe,CAAC,QAAQ,EAAE,IAAI5C,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAClE,CAAC,YAAY,EAAE4C,eAAe,CAAC,YAAY,EAAE,IAAId,iBAAiB,CAAC,CAAC,CAAC,CAAC,CACzE,CAAC;AAEF,eAAeoB,UAAU","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["DefaultKeyExtractor","constructor","_defineProperty","Map","getKey","o","create","k","store","get","Date","now","nextKey","set","clear"],"sources":["key.extractor.ts"],"sourcesContent":["export class DefaultKeyExtractor {\n store = new Map<any, string>();\n nextKey = 1;\n \n getKey(o : any, create = false) {\n let k = this.store.get(o);\n if (!k && create) {\n k = `key:${Date.now()}:${this.nextKey++}`;\n this.store.set(o, k)\n }\n return k;\n }\n \n clear() {\n this.store = new Map();\n }\n}"],"mappings":";;;AAAA,OAAO,MAAMA,mBAAmB,CAAC;EAAAC,YAAA;IAAAC,eAAA,gBACrB,IAAIC,GAAG,CAAc,CAAC;IAAAD,eAAA,kBACpB,CAAC;EAAA;EAEXE,MAAMA,CAACC,CAAO,EAAEC,MAAM,GAAG,KAAK,EAAE;IAC9B,IAAIC,CAAC,GAAG,IAAI,CAACC,KAAK,CAACC,GAAG,CAACJ,CAAC,CAAC;IACzB,IAAI,CAACE,CAAC,IAAID,MAAM,EAAE;MAChBC,CAAC,GAAI,OAAMG,IAAI,CAACC,GAAG,CAAC,CAAE,IAAG,IAAI,CAACC,OAAO,EAAG,EAAC;MACzC,IAAI,CAACJ,KAAK,CAACK,GAAG,CAACR,CAAC,EAAEE,CAAC,CAAC;IACtB;IACA,OAAOA,CAAC;EACV;EAEAO,KAAKA,CAAA,EAAG;IACN,IAAI,CAACN,KAAK,GAAG,IAAIL,GAAG,CAAC,CAAC;EACxB;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["DefaultKeyExtractor","constructor","_defineProperty","Map","getKey","o","create","k","store","get","Date","now","nextKey","set","clear"],"sources":["key.extractor.ts"],"sourcesContent":["export class DefaultKeyExtractor {\n store = new Map<any, string>();\n nextKey = 1;\n \n getKey(o : any, create = false) {\n let k = this.store.get(o);\n if (!k && create) {\n k = `key:${Date.now()}:${this.nextKey++}`;\n this.store.set(o, k)\n }\n return k;\n }\n \n clear() {\n this.store = new Map();\n }\n}"],"mappings":";;;AAAA,OAAO,MAAMA,mBAAmB,CAAC;EAAAC,YAAA;IAAAC,eAAA,gBACrB,IAAIC,GAAG,CAAc,CAAC;IAAAD,eAAA,kBACpB,CAAC;EAAA;EAEXE,MAAMA,CAACC,CAAO,EAAEC,MAAM,GAAG,KAAK,EAAE;IAC9B,IAAIC,CAAC,GAAG,IAAI,CAACC,KAAK,CAACC,GAAG,CAACJ,CAAC,CAAC;IACzB,IAAI,CAACE,CAAC,IAAID,MAAM,EAAE;MAChBC,CAAC,GAAG,OAAOG,IAAI,CAACC,GAAG,CAAC,CAAC,IAAI,IAAI,CAACC,OAAO,EAAE,EAAE;MACzC,IAAI,CAACJ,KAAK,CAACK,GAAG,CAACR,CAAC,EAAEE,CAAC,CAAC;IACtB;IACA,OAAOA,CAAC;EACV;EAEAO,KAAKA,CAAA,EAAG;IACN,IAAI,CAACN,KAAK,GAAG,IAAIL,GAAG,CAAC,CAAC;EACxB;AACJ","ignoreList":[]}
@@ -46,6 +46,9 @@ export class PropsProvider {
46
46
  setDefault(propName, value) {
47
47
  this.defaultProps[propName] = value;
48
48
  }
49
+ overrideProp(propName, value) {
50
+ this.overriddenProps[propName] = value;
51
+ }
49
52
  check(nextProps) {
50
53
  if (!nextProps) {
51
54
  nextProps = assign({}, this.defaultProps, this.initprops);
@@ -1 +1 @@
1
- {"version":3,"names":["assign","isNil","PropsProvider","constructor","defaultProps","initprops","onChange","name","$new","$old","_defineProperty","Object","keys","forEach","k","propertyNames","propsProxy","Proxy","get","target","prop","receiver","propName","toString","value","overriddenProps","hasOwnProperty","oldProps","set","has","isDirty","oldValue","setDefault","check","nextProps","result","reduce","b","flag"],"sources":["props.provider.ts"],"sourcesContent":["import { assign, isNil } from \"lodash-es\";\nimport { BaseProps } from \"./base.component\";\n\nexport class PropsProvider<T extends BaseProps> {\n private oldProps: any = {};\n private overriddenProps: any = {};\n private propsProxy: T;\n private isDirty = false;\n private propertyNames = {} as any;\n\n constructor(private defaultProps: T, private initprops: T, private onChange = (name: string, $new: any, $old: any) => {}) {\n this.initprops = this.initprops || {};\n Object.keys(defaultProps).forEach(k => this.propertyNames[k] = true);\n Object.keys(initprops).forEach(k => this.propertyNames[k] = true);\n //@ts-ignore\n this.propsProxy = (new Proxy({}, {\n get: (target, prop, receiver): any => {\n const propName = prop.toString();\n let value = (this.defaultProps as any)[propName];\n if (this.overriddenProps.hasOwnProperty(propName)) {\n value = this.overriddenProps[propName];\n } else if (this.oldProps.hasOwnProperty(propName)) {\n value = this.oldProps[propName];\n }\n return value;\n },\n set: (target: any, prop, value: any): any => {\n const propName = prop.toString();\n if (!this.has(propName)) {\n return true;\n }\n this.isDirty = this.isDirty || this.overriddenProps[propName] !== value;\n this.overriddenProps[propName] = value;\n if (this.oldProps[propName] !== value) {\n const oldValue = this.oldProps[propName];\n this.onChange(propName, value, oldValue);\n this.oldProps[propName] = value;\n }\n return true;\n }\n }));\n }\n\n setDefault(propName: string, value: any) {\n (this.defaultProps as any)[propName] = value;\n }\n\n check(nextProps?: T) {\n if (!nextProps) {\n nextProps = assign({}, this.defaultProps, this.initprops);\n }\n const result = Object.keys(nextProps).reduce((b, k) => {\n let flag = false;\n //@ts-ignore\n const value = nextProps[k];\n const oldValue = this.oldProps[k];\n if (isNil(this.overriddenProps[k])\n && (!this.oldProps.hasOwnProperty(k)\n || this.oldProps[k] !== value)) {\n this.oldProps[k] = value;\n this.onChange(k, value, oldValue);\n flag = true;\n }\n return b || flag;\n }, false) || this.isDirty;\n\n this.isDirty = false;\n return result;\n }\n\n // sets the property. But, value gets overriden when the original prop changes.\n set(name: string, value: any) {\n this.oldProps[name] = value;\n const oldValue = this.oldProps[name];\n if(oldValue !== value) {\n this.oldProps[name] = value;\n this.onChange(name, value, oldValue);\n }\n }\n\n has(propName: string) {\n return !!this.propertyNames[propName];\n }\n\n get() {\n return this.propsProxy;\n }\n}\n"],"mappings":";;;AAAA,SAASA,MAAM,EAAEC,KAAK,QAAQ,WAAW;AAGzC,OAAO,MAAMC,aAAa,CAAsB;EAO5CC,WAAWA,CAASC,YAAe,EAAUC,SAAY,EAAUC,QAAQ,GAAGA,CAACC,IAAY,EAAEC,IAAS,EAAEC,IAAS,KAAK,CAAC,CAAC,EAAE;IAAA,KAAtGL,YAAe,GAAfA,YAAe;IAAA,KAAUC,SAAY,GAAZA,SAAY;IAAA,KAAUC,QAAQ,GAARA,QAAQ;IAAAI,eAAA,mBANnD,CAAC,CAAC;IAAAA,eAAA,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AC,GAAGU,KAAK;QACxB,IAAI,CAAClB,QAAQ,CAACQ,CAAC,EAAEU,KAAK,EAAEO,QAAQ,CAAC;QACjCO,IAAI,GAAG,IAAI;MACf;MACA,OAAOD,CAAC,IAAIC,IAAI;IACpB,CAAC,EAAE,KAAK,CAAC,IAAI,IAAI,CAACR,OAAO;IAE3B,IAAI,CAACA,OAAO,GAAG,KAAK;IACpB,OAAOK,MAAM;EACf;;EAEA;EACAP,GAAGA,CAACrB,IAAY,EAAEiB,KAAU,EAAE;IAC1B,IAAI,CAACG,QAAQ,CAACpB,IAAI,CAAC,GAAGiB,KAAK;IAC3B,MAAMO,QAAQ,GAAG,IAAI,CAACJ,QAAQ,CAACpB,IAAI,CAAC;IACpC,IAAGwB,QAAQ,KAAKP,KAAK,EAAE;MACnB,IAAI,CAACG,QAAQ,CAACpB,IAAI,CAAC,GAAGiB,KAAK;MAC3B,IAAI,CAAClB,QAAQ,CAACC,IAAI,EAAEiB,KAAK,EAAEO,QAAQ,CAAC;IACxC;EACJ;EAEAF,GAAGA,CAACP,QAAgB,EAAE;IAClB,OAAO,CAAC,CAAC,IAAI,CAACP,aAAa,CAACO,QAAQ,CAAC;EACzC;EAEAJ,GAAGA,CAAA,EAAG;IACF,OAAO,IAAI,CAACF,UAAU;EAC1B;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["assign","isNil","PropsProvider","constructor","defaultProps","initprops","onChange","name","$new","$old","_defineProperty","Object","keys","forEach","k","propertyNames","propsProxy","Proxy","get","target","prop","receiver","propName","toString","value","overriddenProps","hasOwnProperty","oldProps","set","has","isDirty","oldValue","setDefault","overrideProp","check","nextProps","result","reduce","b","flag"],"sources":["props.provider.ts"],"sourcesContent":["import { assign, isNil } from \"lodash-es\";\nimport { BaseProps } from \"./base.component\";\n\nexport class PropsProvider<T extends BaseProps> {\n private oldProps: any = {};\n private overriddenProps: any = {};\n private propsProxy: T;\n private isDirty = false;\n private propertyNames = {} as any;\n\n constructor(private defaultProps: T, private initprops: T, private onChange = (name: string, $new: any, $old: any) => {}) {\n this.initprops = this.initprops || {};\n Object.keys(defaultProps).forEach(k => this.propertyNames[k] = true);\n Object.keys(initprops).forEach(k => this.propertyNames[k] = true);\n //@ts-ignore\n this.propsProxy = (new Proxy({}, {\n get: (target, prop, receiver): any => {\n const propName = prop.toString();\n let value = (this.defaultProps as any)[propName];\n if (this.overriddenProps.hasOwnProperty(propName)) {\n value = this.overriddenProps[propName];\n } else if (this.oldProps.hasOwnProperty(propName)) {\n value = this.oldProps[propName];\n }\n return value;\n },\n set: (target: any, prop, value: any): any => {\n const propName = prop.toString();\n if (!this.has(propName)) {\n return true;\n }\n this.isDirty = this.isDirty || this.overriddenProps[propName] !== value;\n this.overriddenProps[propName] = value;\n if (this.oldProps[propName] !== value) {\n const oldValue = this.oldProps[propName];\n this.onChange(propName, value, oldValue);\n this.oldProps[propName] = value;\n }\n return true;\n }\n }));\n }\n\n setDefault(propName: string, value: any) {\n (this.defaultProps as any)[propName] = value;\n }\n overrideProp(propName: string, value: any) {\n (this.overriddenProps as any)[propName] = value;\n }\n\n check(nextProps?: T) {\n if (!nextProps) {\n nextProps = assign({}, this.defaultProps, this.initprops);\n }\n const result = Object.keys(nextProps).reduce((b, k) => {\n let flag = false;\n //@ts-ignore\n const value = nextProps[k];\n const oldValue = this.oldProps[k];\n if (isNil(this.overriddenProps[k])\n && (!this.oldProps.hasOwnProperty(k)\n || this.oldProps[k] !== value)) {\n this.oldProps[k] = value;\n this.onChange(k, value, oldValue);\n flag = true;\n }\n return b || flag;\n }, false) || this.isDirty;\n\n this.isDirty = false;\n return result;\n }\n\n // sets the property. But, value gets overriden when the original prop changes.\n set(name: string, value: any) {\n this.oldProps[name] = value;\n const oldValue = this.oldProps[name];\n if(oldValue !== value) {\n this.oldProps[name] = value;\n this.onChange(name, value, oldValue);\n }\n }\n\n has(propName: string) {\n return !!this.propertyNames[propName];\n }\n\n get() {\n return this.propsProxy;\n }\n}\n"],"mappings":";;;AAAA,SAASA,M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AAU;EAC1B;AACJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["AsyncStorage","StorageService","constructor","_defineProperty","getKey","key","target","getItem","callback","setItem","value","removeItem"],"sources":["storage.service.ts"],"sourcesContent":["import AsyncStorage from '@react-native-async-storage/async-storage';\n\nexport class StorageService {\n public target = 'GLOBAL';\n\n private getKey(key: string) {\n return `${this.target}_${key}`;\n }\n \n getItem(key: string, callback?: (error?: Error | null, result?: string | null) => void): Promise<string | null> {\n return AsyncStorage.getItem(this.getKey(key), callback);\n }\n setItem(key: string, value: string, callback?: (error?: Error | null) => void): Promise<void> {\n return AsyncStorage.setItem(this.getKey(key), value, callback);\n }\n removeItem(key: string, callback?: (error?: Error | null) => void): Promise<void> {\n return AsyncStorage.removeItem(this.getKey(key), callback);\n }\n}\n\nexport default new StorageService();\n"],"mappings":";;;AAAA,OAAOA,YAAY,MAAM,2CAA2C;AAEpE,OAAO,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAAC,eAAA,iBACV,QAAQ;EAAA;EAEhBC,MAAMA,CAACC,GAAW,EAAE;IAC1B,OAAQ,GAAE,IAAI,CAACC,MAAO,IAAGD,GAAI,EAAC;EAChC;EAEAE,OAAOA,CAACF,GAAW,EAAEG,QAAiE,EAA0B;IAC9G,OAAOR,YAAY,CAACO,OAAO,CAAC,IAAI,CAACH,MAAM,CAACC,GAAG,CAAC,EAAEG,QAAQ,CAAC;EACzD;EACAC,OAAOA,CAACJ,GAAW,EAAEK,KAAa,EAAEF,QAAyC,EAAiB;IAC5F,OAAOR,YAAY,CAACS,OAAO,CAAC,IAAI,CAACL,MAAM,CAACC,GAAG,CAAC,EAAEK,KAAK,EAAEF,QAAQ,CAAC;EAChE;EACAG,UAAUA,CAACN,GAAW,EAAEG,QAAyC,EAAiB;IAChF,OAAOR,YAAY,CAACW,UAAU,CAAC,IAAI,CAACP,MAAM,CAACC,GAAG,CAAC,EAAEG,QAAQ,CAAC;EAC5D;AACF;AAEA,eAAe,IAAIP,cAAc,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["AsyncStorage","StorageService","constructor","_defineProperty","getKey","key","target","getItem","callback","setItem","value","removeItem"],"sources":["storage.service.ts"],"sourcesContent":["import AsyncStorage from '@react-native-async-storage/async-storage';\n\nexport class StorageService {\n public target = 'GLOBAL';\n\n private getKey(key: string) {\n return `${this.target}_${key}`;\n }\n \n getItem(key: string, callback?: (error?: Error | null, result?: string | null) => void): Promise<string | null> {\n return AsyncStorage.getItem(this.getKey(key), callback);\n }\n setItem(key: string, value: string, callback?: (error?: Error | null) => void): Promise<void> {\n return AsyncStorage.setItem(this.getKey(key), value, callback);\n }\n removeItem(key: string, callback?: (error?: Error | null) => void): Promise<void> {\n return AsyncStorage.removeItem(this.getKey(key), callback);\n }\n}\n\nexport default new StorageService();\n"],"mappings":";;;AAAA,OAAOA,YAAY,MAAM,2CAA2C;AAEpE,OAAO,MAAMC,cAAc,CAAC;EAAAC,YAAA;IAAAC,eAAA,iBACV,QAAQ;EAAA;EAEhBC,MAAMA,CAACC,GAAW,EAAE;IAC1B,OAAO,GAAG,IAAI,CAACC,MAAM,IAAID,GAAG,EAAE;EAChC;EAEAE,OAAOA,CAACF,GAAW,EAAEG,QAAiE,EAA0B;IAC9G,OAAOR,YAAY,CAACO,OAAO,CAAC,IAAI,CAACH,MAAM,CAACC,GAAG,CAAC,EAAEG,QAAQ,CAAC;EACzD;EACAC,OAAOA,CAACJ,GAAW,EAAEK,KAAa,EAAEF,QAAyC,EAAiB;IAC5F,OAAOR,YAAY,CAACS,OAAO,CAAC,IAAI,CAACL,MAAM,CAACC,GAAG,CAAC,EAAEK,KAAK,EAAEF,QAAQ,CAAC;EAChE;EACAG,UAAUA,CAACN,GAAW,EAAEG,QAAyC,EAAiB;IAChF,OAAOR,YAAY,CAACW,UAAU,CAAC,IAAI,CAACP,MAAM,CAACC,GAAG,CAAC,EAAEG,QAAQ,CAAC;EAC5D;AACF;AAEA,eAAe,IAAIP,cAAc,CAAC,CAAC","ignoreList":[]}
@@ -3,11 +3,12 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
4
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from "react";
6
- import { Platform, View } from "react-native";
6
+ import { Platform, View, TouchableOpacity } from "react-native";
7
7
  import { get } from "lodash";
8
8
  import injector from "./injector";
9
9
  import { TouchableRipple } from "react-native-paper";
10
10
  export const TappableContext = /*#__PURE__*/React.createContext(null);
11
+ import { UIPreferencesConsumer } from "./ui-preferences.context";
11
12
  export class SyntheticEvent {
12
13
  constructor() {
13
14
  // as the event is being used in onPress, onPressOut and onLongTap the TapEvent is renamed to SyntheticEvent
@@ -107,33 +108,33 @@ export class Tappable extends React.Component {
107
108
  }
108
109
  render() {
109
110
  const target = this.props.target;
111
+ const commonProps = {
112
+ ...(Platform.OS === 'android' || Platform.OS === 'web' ? {
113
+ accessibilityLabel: this.props.testID,
114
+ testID: this.props.testID
115
+ } : {
116
+ // accessible: false,
117
+ testID: this.props.testID
118
+ }),
119
+ ...this.props.accessibilityProps,
120
+ disabled: get(target === null || target === void 0 ? void 0 : target.proxy, 'disabled'),
121
+ style: this.props.styles,
122
+ onPress: e => {
123
+ var _e$target;
124
+ if ((e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.tagName) === 'INPUT') {
125
+ return;
126
+ }
127
+ this.onPress(new SyntheticEvent());
128
+ },
129
+ onLongPress: e => this.onLongTap(new SyntheticEvent()),
130
+ onPressOut: e => this.onPressOut(new SyntheticEvent())
131
+ };
110
132
  if (target !== null && target !== void 0 && target.props.onTap || target !== null && target !== void 0 && target.props.onLongtap || target !== null && target !== void 0 && target.props.onDoubletap || this.props.onTap || this.props.onLongTap || this.props.onDoubleTap) {
111
- return /*#__PURE__*/React.createElement(TappableContext.Consumer, null, parent => {
112
- this.setParent(parent);
113
- return /*#__PURE__*/React.createElement(TappableContext.Provider, {
114
- value: this
115
- }, /*#__PURE__*/React.createElement(TouchableRipple, _extends({
133
+ return /*#__PURE__*/React.createElement(UIPreferencesConsumer, null, preferences => {
134
+ return preferences.enableRipple != false ? /*#__PURE__*/React.createElement(TouchableRipple, _extends({
116
135
  rippleColor: this.props.rippleColor,
117
136
  borderless: true
118
- }, Platform.OS === 'android' || Platform.OS === 'web' ? {
119
- accessibilityLabel: this.props.testID,
120
- testID: this.props.testID
121
- } : {
122
- // accessible: false,
123
- testID: this.props.testID
124
- }, this.props.accessibilityProps, {
125
- disabled: get(target === null || target === void 0 ? void 0 : target.proxy, 'disabled'),
126
- style: this.props.styles,
127
- onPress: e => {
128
- var _e$target;
129
- if ((e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.tagName) === 'INPUT') {
130
- return;
131
- }
132
- this.onPress(new SyntheticEvent());
133
- },
134
- onLongPress: e => this.onLongTap(new SyntheticEvent()),
135
- onPressOut: e => this.onPressOut(new SyntheticEvent())
136
- }), /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children)));
137
+ }, commonProps), /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children)) : /*#__PURE__*/React.createElement(TouchableOpacity, commonProps, /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children));
137
138
  });
138
139
  }
139
140
  return /*#__PURE__*/React.createElement(View, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Platform","View","get","injector","TouchableRipple","TappableContext","createContext","SyntheticEvent","constructor","_defineProperty","stopPropagation","propagationEnabled","Tappable","Component","props","triggerTap","e","_this$parent","target","onTap","invokeEventCallback","parent","onPress","_this$props$target","lastPress","Date","now","onTouchStart","currentTime","tapDelta","lastTap","isLongTap","_injector$FOCUSED_ELE","FOCUSED_ELEMENT","blur","lastDoubleTap","onDoubleTap","setTimeout","_this$parent2","onLongTap","_this$props$target2","_this$parent3","onPressOut","onTouchEnd","_this$props$target3","_this$parent4","setParent","render","onLongtap","onDoubletap","createElement","Consumer","Provider","value","_extends","rippleColor","borderless","OS","accessibilityLabel","testID","accessibilityProps","disabled","proxy","style","styles","_e$target","tagName","onLongPress","Fragment","children"],"sources":["tappable.component.tsx"],"sourcesContent":["import { BaseComponent } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport React from \"react\";\nimport { GestureResponderEvent, Platform, View } from \"react-native\";\nimport { get } from \"lodash\";\nimport injector from \"./injector\";\nimport { TouchableRipple } from \"react-native-paper\";\nimport ThemeVariables from \"../styles/theme.variables\";\nimport { isDefined } from \"./utils\";\n\nexport const TappableContext = React.createContext<Tappable>(null as any);\n\ninterface TappableProps {\n testID?: string;\n children?: any\n styles?: any;\n target?: BaseComponent<any, any, any>;\n onTap?: (e: any) => void;\n onLongTap?: (e: any) => void; \n onDoubleTap?: (e: any) => void;\n onTouchStart? : (e: any) => void;\n onTouchEnd? : (e: any) => void;\n rippleColor?: string;\n accessibilityProps?: any;\n}\n\nexport class SyntheticEvent {\n // as the event is being used in onPress, onPressOut and onLongTap the TapEvent is renamed to SyntheticEvent\n propagationEnabled = true;\n \n constructor() {\n\n }\n\n stopPropagation() {\n this.propagationEnabled = false;\n }\n}\n\nexport class Tappable extends React.Component<TappableProps, any> {\n private lastPress = 0;\n private lastTap = 0;\n private lastDoubleTap = 0;\n private isLongTap = false;\n private parent:Tappable = null as any;\n \n constructor(props: any) {\n super(props);\n }\n\n async triggerTap(e = new SyntheticEvent()) {\n if (!e.propagationEnabled) {\n return;\n }\n const target = this.props.target;\n if (this.props.onTap) {\n await this.props.onTap(e);\n } else {\n await target?.invokeEventCallback('onTap', [e, target]);\n }\n this.parent?.triggerTap(e);\n }\n\n onPress(e: SyntheticEvent): void { \n this.lastPress = Date.now();\n const target = this.props.target;\n this.props.onTouchStart && this.props.onTouchStart(e);\n this.props.target?.invokeEventCallback('onTouchstart', [e, this.props.target]);\n const currentTime = Date.now();\n const tapDelta = currentTime - this.lastTap;\n if (this.isLongTap) {\n this.isLongTap = false;\n return;\n }\n if (e.propagationEnabled) {\n injector.FOCUSED_ELEMENT.get()?.blur();\n if(this.lastDoubleTap !== this.lastTap \n && tapDelta < 500) {\n this.props.onDoubleTap && this.props.onDoubleTap(e);\n setTimeout(() => {\n target?.invokeEventCallback('onDoubletap', [e, target]);\n }, 200);\n this.lastDoubleTap = currentTime;\n }\n setTimeout(() => {\n if (!e.propagationEnabled) {\n return;\n }\n if (this.props.onTap) {\n this.props.onTap(e);\n } else {\n target?.invokeEventCallback('onTap', [e, target]);\n }\n this.parent?.onPress(e);\n }, 200);\n this.lastTap = currentTime;\n }\n }\n\n onLongTap(e: SyntheticEvent): void {\n if(!e.propagationEnabled){\n return;\n }\n this.props.onLongTap && this.props.onLongTap(e);\n setTimeout(() => {\n this.props.target?.invokeEventCallback('onLongtap', [e, this.props.target]);\n this.parent?.onPressOut(e);\n }, 200);\n this.isLongTap = true;\n }\n \n onPressOut(e: SyntheticEvent): void {\n if(!e.propagationEnabled){\n return;\n } \n this.props.onTouchEnd && this.props.onTouchEnd(e);\n setTimeout(() => {\n this.props.target?.invokeEventCallback('onTouchend', [e, this.props.target]);\n this.parent?.onPressOut(e);\n }, 200);\n this.isLongTap = false;\n }\n private setParent(parent: Tappable) {\n if (parent && this.parent !== parent) {\n this.parent = parent;\n }\n }\n\n render() {\n const target = this.props.target;\n if (target?.props.onTap \n || target?.props.onLongtap \n || target?.props.onDoubletap \n || this.props.onTap \n || this.props.onLongTap \n || this.props.onDoubleTap) {\n return (\n <TappableContext.Consumer>{(parent) => {\n this.setParent(parent);\n return( <TappableContext.Provider value={this}>\n <TouchableRipple\n rippleColor={this.props.rippleColor}\n borderless = {true}\n {...(Platform.OS === 'android' || Platform.OS === 'web') ? {\n accessibilityLabel: this.props.testID,\n testID: this.props.testID\n }: {\n // accessible: false,\n testID: this.props.testID\n }} \n {...this.props.accessibilityProps}\n disabled={get(target?.proxy, 'disabled')}\n style={this.props.styles}\n onPress={(e?: GestureResponderEvent) => {\n if ((e?.target as any)?.tagName === 'INPUT') {\n return;\n }\n this.onPress(new SyntheticEvent())\n }}\n onLongPress={(e?: GestureResponderEvent) => this.onLongTap(new SyntheticEvent())}\n onPressOut={(e?: GestureResponderEvent) => this.onPressOut(new SyntheticEvent())}>\n <>{this.props.children}</>\n </TouchableRipple>\n </TappableContext.Provider>)}}</TappableContext.Consumer>\n \n );\n }\n return (<View style={this.props.styles}>{this.props.children}</View>);\n }\n}\n"],"mappings":";;;;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAgCC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AACpE,SAASC,GAAG,QAAQ,QAAQ;AAC5B,OAAOC,QAAQ,MAAM,YAAY;AACjC,SAASC,eAAe,QAAQ,oBAAoB;AAIpD,OAAO,MAAMC,eAAe,gBAAGN,KAAK,CAACO,aAAa,CAAW,IAAW,CAAC;AAgBzE,OAAO,MAAMC,cAAc,CAAC;EAIxBC,WAAWA,CAAA,EAAG;IAHd;IAAAC,eAAA,6BACqB,IAAI;EAIzB;EAEAC,eAAeA,CAAA,EAAG;IACd,IAAI,CAACC,kBAAkB,GAAG,KAAK;EACnC;AACJ;AAEA,OAAO,MAAMC,QAAQ,SAASb,KAAK,CAACc,SAAS,CAAqB;EAO9DL,WAAWA,CAACM,KAAU,EAAE;IACpB,KAAK,CAACA,KAAK,CAAC;IAACL,eAAA,oBAPG,CAAC;IAAAA,eAAA,kBACH,CAAC;IAAAA,eAAA,wBACK,CAAC;IAAAA,eAAA,oBACL,KAAK;IAAAA,eAAA,iBACC,IAAI;EAI9B;EAEA,MAAMM,UAAUA,CAACC,CAAC,GAAG,IAAIT,cAAc,CAAC,CAAC,EAAE;IAAA,IAAAU,YAAA;IACvC,IAAI,CAACD,CAAC,CAACL,kBAAkB,E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OAAO,MAAK,OAAO,EAAE;cACzC;YACJ;YACA,IAAI,CAAC5C,OAAO,CAAC,IAAIf,cAAc,CAAC,CAAC,CAAC;UACtC,CAAE;UACF4D,WAAW,EAAGnD,CAAyB,IAAK,IAAI,CAACuB,SAAS,CAAC,IAAIhC,cAAc,CAAC,CAAC,CAAE;UACjFmC,UAAU,EAAG1B,CAAyB,IAAK,IAAI,CAAC0B,UAAU,CAAC,IAAInC,cAAc,CAAC,CAAC;QAAE,iBAC7ER,KAAA,CAAAmD,aAAA,CAAAnD,KAAA,CAAAqE,QAAA,QAAG,IAAI,CAACtD,KAAK,CAACuD,QAAW,CACZ,CACS,CAAC;MAAC,CAA4B,CAAC;IAGjE;IACA,oBAAQtE,KAAA,CAAAmD,aAAA,CAACjD,IAAI;MAAC8D,KAAK,EAAE,IAAI,CAACjD,KAAK,CAACkD;IAAO,GAAE,IAAI,CAAClD,KAAK,CAACuD,QAAe,CAAC;EACxE;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","View","TouchableOpacity","get","injector","TouchableRipple","TappableContext","createContext","UIPreferencesConsumer","SyntheticEvent","constructor","_defineProperty","stopPropagation","propagationEnabled","Tappable","Component","props","triggerTap","e","_this$parent","target","onTap","invokeEventCallback","parent","onPress","_this$props$target","lastPress","Date","now","onTouchStart","currentTime","tapDelta","lastTap","isLongTap","_injector$FOCUSED_ELE","FOCUSED_ELEMENT","blur","lastDoubleTap","onDoubleTap","setTimeout","_this$parent2","onLongTap","_this$props$target2","_this$parent3","onPressOut","onTouchEnd","_this$props$target3","_this$parent4","setParent","render","commonProps","OS","accessibilityLabel","testID","accessibilityProps","disabled","proxy","style","styles","_e$target","tagName","onLongPress","onLongtap","onDoubletap","createElement","preferences","enableRipple","_extends","rippleColor","borderless","Fragment","children"],"sources":["tappable.component.tsx"],"sourcesContent":["import { BaseComponent } from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport React from \"react\";\nimport { GestureResponderEvent, Platform, View, TouchableOpacity } from \"react-native\";\nimport { get } from \"lodash\";\nimport injector from \"./injector\";\nimport { TouchableRipple } from \"react-native-paper\";\nimport ThemeVariables from \"../styles/theme.variables\";\nimport { isDefined } from \"./utils\";\n\nexport const TappableContext = React.createContext<Tappable>(null as any);\nimport { UIPreferencesConsumer, UI_PREFERENCES } from \"./ui-preferences.context\";\n\ninterface TappableProps {\n testID?: string;\n children?: any\n styles?: any;\n target?: BaseComponent<any, any, any>;\n onTap?: (e: any) => void;\n onLongTap?: (e: any) => void; \n onDoubleTap?: (e: any) => void;\n onTouchStart? : (e: any) => void;\n onTouchEnd? : (e: any) => void;\n rippleColor?: string;\n accessibilityProps?: any;\n}\n\nexport class SyntheticEvent {\n // as the event is being used in onPress, onPressOut and onLongTap the TapEvent is renamed to SyntheticEvent\n propagationEnabled = true;\n \n constructor() {\n\n }\n\n stopPropagation() {\n this.propagationEnabled = false;\n }\n}\n\nexport class Tappable extends React.Component<TappableProps, any> {\n private lastPress = 0;\n private lastTap = 0;\n private lastDoubleTap = 0;\n private isLongTap = false;\n private parent:Tappable = null as any;\n \n constructor(props: any) {\n super(props);\n }\n\n async triggerTap(e = new SyntheticEvent()) {\n if (!e.propagationEnabled) {\n return;\n }\n const target = this.props.target;\n if (this.props.onTap) {\n await this.props.onTap(e);\n } else {\n await target?.invokeEventCallback('onTap', [e, target]);\n }\n this.parent?.triggerTap(e);\n }\n\n onPress(e: SyntheticEvent): void { \n this.lastPress = Date.now();\n const target = this.props.target;\n this.props.onTouchStart && this.props.onTouchStart(e);\n this.props.target?.invokeEventCallback('onTouchstart', [e, this.props.target]);\n const currentTime = Date.now();\n const tapDelta = currentTime - this.lastTap;\n if (this.isLongTap) {\n this.isLongTap = false;\n return;\n }\n if (e.propagationEnabled) {\n injector.FOCUSED_ELEMENT.get()?.blur();\n if(this.lastDoubleTap !== this.lastTap \n && tapDelta < 500) {\n this.props.onDoubleTap && this.props.onDoubleTap(e);\n setTimeout(() => {\n target?.invokeEventCallback('onDoubletap', [e, target]);\n }, 200);\n this.lastDoubleTap = currentTime;\n }\n setTimeout(() => {\n if (!e.propagationEnabled) {\n return;\n }\n if (this.props.onTap) {\n this.props.onTap(e);\n } else {\n target?.invokeEventCallback('onTap', [e, target]);\n }\n this.parent?.onPress(e);\n }, 200);\n this.lastTap = currentTime;\n }\n }\n\n onLongTap(e: SyntheticEvent): void {\n if(!e.propagationEnabled){\n return;\n }\n this.props.onLongTap && this.props.onLongTap(e);\n setTimeout(() => {\n this.props.target?.invokeEventCallback('onLongtap', [e, this.props.target]);\n this.parent?.onPressOut(e);\n }, 200);\n this.isLongTap = true;\n }\n \n onPressOut(e: SyntheticEvent): void {\n if(!e.propagationEnabled){\n return;\n } \n this.props.onTouchEnd && this.props.onTouchEnd(e);\n setTimeout(() => {\n this.props.target?.invokeEventCallback('onTouchend', [e, this.props.target]);\n this.parent?.onPressOut(e);\n }, 200);\n this.isLongTap = false;\n }\n private setParent(parent: Tappable) {\n if (parent && this.parent !== parent) {\n this.parent = parent;\n }\n }\n\n render() {\n const target = this.props.target;\n const commonProps = {\n ...(Platform.OS === 'android' || Platform.OS === 'web') ? {\n accessibilityLabel: this.props.testID,\n testID: this.props.testID\n }: {\n // accessible: false,\n testID: this.props.testID\n },\n ...this.props.accessibilityProps,\n disabled:get(target?.proxy, 'disabled'),\n style:this.props.styles,\n onPress:(e?: GestureResponderEvent) => {\n if ((e?.target as any)?.tagName === 'INPUT') {\n return;\n }\n this.onPress(new SyntheticEvent())\n },\n onLongPress:(e?: GestureResponderEvent) => this.onLongTap(new SyntheticEvent()),\n onPressOut:(e?: GestureResponderEvent) => this.onPressOut(new SyntheticEvent())\n };\n if (target?.props.onTap \n || target?.props.onLongtap \n || target?.props.onDoubletap \n || this.props.onTap \n || this.props.onLongTap \n || this.props.onDoubleTap) {\n return (\n <UIPreferencesConsumer>\n {(preferences: UI_PREFERENCES) => {\n return preferences.enableRipple != false ? (\n <TouchableRipple rippleColor={this.props.rippleColor} borderless={true} {...commonProps}>\n <>{this.props.children}</>\n </TouchableRipple>): (\n <TouchableOpacity {...commonProps}>\n <>{this.props.children}</>\n </TouchableOpacity>);\n }}\n </UIPreferencesConsumer>\n );\n }\n return (<View style={this.props.styles}>{this.props.children}</View>);\n }\n}\n"],"mappings":";;;;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAgCC,QAAQ,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AACtF,SAASC,GAAG,QAAQ,QAAQ;AAC5B,OAAOC,QAAQ,MAAM,YAAY;AACjC,SAASC,eAAe,QAAQ,oBAAoB;AAIpD,OAAO,MAAMC,eAAe,gBAAGP,KAAK,CAACQ,aAAa,CAAW,IAAW,CAAC;AACzE,SAASC,qBAAqB,QAAwB,0BAA0B;AAgBhF,OAAO,MAAMC,cAAc,CAAC;EAIxBC,WAAWA,CAAA,EAAG;IAHd;IAAAC,eAAA,6BACqB,IAAI;EAIzB;EAEAC,eAAeA,CAAA,EAAG;IACd,IAAI,CAACC,kBAAkB,GAAG,KAAK;EACnC;AACJ;AAEA,OAAO,MAAMC,QAAQ,SAASf,KAAK,CAACgB,SAAS,CAAqB;EAO9DL,WAAWA,CAACM,KAAU,EAAE;IACpB,KAAK,CAACA,KAAK,CAAC;IAACL,eAAA,oBAPG,CAAC;IAAAA,eAAA,kBACH,CAAC;IAAAA,eAAA,wBACK,CAAC;IAAAA,eAAA,oBACL,KAAK;IAAAA,eAAA,iBACC,IAAI;EAI9B;EAEA,MAAMM,UAAUA,CAACC,CAAC,GAAG,IAAIT,cAAc,CAAC,CAAC,EAAE;IAAA,IAAAU,YAAA;IACvC,IAAI,CAACD,CAAC,CAACL,kBAAkB,EAAE;MACvB;IACJ;IACA,MAAMO,MAAM,GAAG,IAAI,CAACJ,KAAK,CAACI,MAAM;IAChC,IAAI,IAAI,CAACJ,KAAK,CAACK,KAAK,EAAE;MAClB,MAAM,IAAI,CAACL,KAAK,CAACK,KAAK,CAACH,CAAC,CAAC;IAC7B,CAAC,MAAM;MACH,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,UAAU,EAAE;QAAK,GAAKnB,WAAW,gBACnFnD,KAAA,CAAAiE,aAAA,CAAAjE,KAAA,CAAAuE,QAAA,QAAG,IAAI,CAACtD,KAAK,CAACuD,QAAW,CACZ,CAAC,gBAClBxE,KAAA,CAAAiE,aAAA,CAAC9D,gBAAgB,EAAKgD,WAAW,eAC7BnD,KAAA,CAAAiE,aAAA,CAAAjE,KAAA,CAAAuE,QAAA,QAAG,IAAI,CAACtD,KAAK,CAACuD,QAAW,CACX,CAAE;MACxB,CACmB,CAAC;IAE5B;IACA,oBAAQxE,KAAA,CAAAiE,aAAA,CAAC/D,IAAI;MAACwD,KAAK,EAAE,IAAI,CAACzC,KAAK,CAAC0C;IAAO,GAAE,IAAI,CAAC1C,KAAK,CAACuD,QAAe,CAAC;EACxE;AACJ","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ const UIPreferencesContext = /*#__PURE__*/React.createContext({
3
+ enableRipple: true
4
+ });
5
+ export const UIPreferencesProvider = UIPreferencesContext.Provider;
6
+ export const UIPreferencesConsumer = UIPreferencesContext.Consumer;
7
+ //# sourceMappingURL=ui-preferences.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","UIPreferencesContext","createContext","enableRipple","UIPreferencesProvider","Provider","UIPreferencesConsumer","Consumer"],"sources":["ui-preferences.context.ts"],"sourcesContent":["import React from \"react\";\n\nexport interface UI_PREFERENCES {\n enableRipple: boolean;\n}\n \nconst UIPreferencesContext = React.createContext<UI_PREFERENCES>({enableRipple: true});\n\nexport const UIPreferencesProvider = UIPreferencesContext.Provider;\nexport const UIPreferencesConsumer = UIPreferencesContext.Consumer;"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAMzB,MAAMC,oBAAoB,gBAAGD,KAAK,CAACE,aAAa,CAAiB;EAACC,YAAY,EAAE;AAAI,CAAC,CAAC;AAEtF,OAAO,MAAMC,qBAAqB,GAAGH,oBAAoB,CAACI,QAAQ;AAClE,OAAO,MAAMC,qBAAqB,GAAGL,oBAAoB,CAACM,QAAQ","ignoreList":[]}
@@ -335,19 +335,26 @@ export function removeUndefinedKeys(obj) {
335
335
  function getDaysInMonth(month, year) {
336
336
  return new Date(year, month, 0).getDate();
337
337
  }
338
- export const getDates = (month = 0,
338
+ export const getDates = (startDate, endDate, month = 0,
339
339
  // zero-based
340
340
  year = new Date().getFullYear()) => {
341
341
  const daysInMonth = getDaysInMonth(month, year);
342
342
  const dates = Array.from({
343
343
  length: daysInMonth
344
344
  }, (v, i) => i + 1);
345
- return dates;
345
+ const datesInRange = dates.filter(date => date >= startDate);
346
+ return datesInRange;
346
347
  };
347
348
  export const monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
348
- export const getMonths = () => {
349
+ export const getMonths = (startMonth, endMonth) => {
349
350
  const months = monthNames.map(name => name.substring(0, 3));
350
- return months;
351
+ const monthRange = months.filter((_, index) => index >= startMonth);
352
+ return monthRange;
353
+ };
354
+ export const getMonthIndex = (monthName, shortName = true) => {
355
+ const months = shortName ? monthNames.map(name => name.substring(0, 3)) : monthNames;
356
+ const monthNumber = months.findIndex(name => name === monthName);
357
+ return monthNumber;
351
358
  };
352
359
  export const getYearRange = (startYear = 1950, endYear = 2060) => {
353
360
  const years = [];
@@ -443,4 +450,59 @@ export const parseLinearGradient = gradient => {
443
450
  end
444
451
  };
445
452
  };
453
+ export const validateInputOnDevice = (value, type) => {
454
+ var _value$match;
455
+ const isCurrencyField = type === 'currency';
456
+ let isValidText = true;
457
+ let validText = value;
458
+
459
+ // * no alphabets except E, may contain E only once
460
+ if (/[a-df-zA-DF-Z]/.test(value) || !/^[^eE]*[eE]?[^eE]*$/.test(value)) {
461
+ isValidText = false;
462
+ validText = validText.replace(/[a-df-zA-DF-Z]/g, '');
463
+ validText = validText.replace(/([eE])\1+/g, 'e');
464
+ }
465
+
466
+ // * currency only: check for negative number
467
+ if (isCurrencyField && (Number(value) < 0 || /-/g.test(value))) {
468
+ isValidText = false;
469
+ validText = validText.replace(/-/g, '');
470
+ }
471
+
472
+ // * number only: not more than one minus and doesn't end with minus (-)
473
+ if (!isCurrencyField && Number((_value$match = value.match(/-/g)) === null || _value$match === void 0 ? void 0 : _value$match.length) > 1 || /\w-/.test(value)) {
474
+ isValidText = false;
475
+ validText = validText.replace(/-/g, '');
476
+ validText = validText.replace(/\w-/g, '');
477
+ }
478
+
479
+ // * check for more than one decimal point
480
+ if (/^\d*\.\d*\..*$/.test(value)) {
481
+ isValidText = false;
482
+ validText = validText.replace(/\.(?=\.*\.)/g, '');
483
+ }
484
+
485
+ // * check for spaces and comma
486
+ if (/[\s,]/.test(value)) {
487
+ isValidText = false;
488
+ validText = validText.replace(/[\s,]/, '');
489
+ }
490
+ return {
491
+ isValidText,
492
+ validText
493
+ };
494
+ };
495
+ export const isDateFormatAsPerPattern = (datePattern, dateString) => {
496
+ try {
497
+ var _date$format;
498
+ // * format dateString as per datePattern
499
+ const date = moment(dateString, datePattern, true);
500
+
501
+ // * check date is valid and matches the format
502
+ return date.isValid() && typeof dateString === 'string' && (dateString === null || dateString === void 0 ? void 0 : dateString.toUpperCase()) === ((_date$format = date.format(datePattern)) === null || _date$format === void 0 ? void 0 : _date$format.toUpperCase());
503
+ } catch (error) {
504
+ // * if not able to parse date string
505
+ return false;
506
+ }
507
+ };
446
508
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","moment","FileSystem","isFunction","includes","isUndefined","isNull","orderBy","groupBy","toLower","get","forEach","sortBy","cloneDeep","keys","values","isArray","isString","isNumber","ThemeVariables","GROUP_BY_OPTIONS","ALPHABET","WORD","OTHERS","TIME_ROLLUP_OPTIONS","HOUR","DAY","WEEK","MONTH","YEAR","_deepCopy","o1","o2","o","Object","k","v","deepCopy","objects","toBoolean","val","undefined","toNumber","parseFloat","e","encodeUrl","url","splits","split","hash","params","length","map","p","encodeURIComponent","join","encodeURI","isWebPreviewMode","OS","isDevMode","__DEV__","widgetsWithUndefinedValue","isAndroid","test","window","navigator","userAgent","isIos","getGroupKey","fieldDef","groupby","widgetScope","innerItem","apply","proxy","getGroupedData","fieldDefs","match","orderby","dateFormat","groupKey","groupedLiData","concatStr","toString","trim","substr","replace","format","getSortedGroupedData","getOrderedDataset","dataSet","items","fields","directions","obj","item","push","_groupedData","groupkey","index","liData","key","data","_groupIndex","isDefined","unStringify","defaultVal","number","parseInt","isNaN","retryIfFails","fn","interval","maxRetries","onBeforeRetry","Promise","resolve","retryCount","tryFn","reject","errorFn","errArgs","arguments","setTimeout","then","retry","getAbortableDefer","_defer","promise","onAbort","isAborted","abort","validateField","props","value","requiredCheck","regexCheck","required","errorType","isValid","regexp","condition","RegExp","maxchars","mindate","Date","datavalue","startOf","toDate","maxdate","endOf","countDecimalDigits","numberString","decimalMatch","decimalDigits","formatCompactNumber","isNegative","formattedNumber","toFixed","toBase64","path","readAsStringAsync","encoding","DATASET_WIDGETS","Set","isDataSetWidget","widget","has","isFullPathUrl","startsWith","removeUndefinedKeys","getDaysInMonth","month","year","getDate","getDates","getFullYear","daysInMonth","dates","Array","from","i","monthNames","getMonths","months","name","substring","getYearRange","startYear","endYear","years","getDateObject","date","getHours","hours","hour","paddedHour","String","padStart","get24Hours","getMinutes","minutes","minute","paddedMinute","getTimeIndicators","getDateTimeObject","getGradientStartEnd","angle","angleLowerCase","toLowerCase","start","x","y","end","parseLinearGradient","gradient","color1","color2","linearGradientRegex","hasLinearGradient","matches","INSTANCE","primaryColor"],"sources":["utils.ts"],"sourcesContent":["import { Platform } from 'react-native';\nimport moment from \"moment\";\nimport * as FileSystem from \"expo-file-system\";\nimport { isFunction, includes, isUndefined, isNull, orderBy, groupBy, toLower, get, forEach, sortBy, cloneDeep, keys, values, isArray, isString, isNumber} from 'lodash';\nimport ThemeVariables from '../styles/theme.variables';\n\ndeclare const window: any;\nconst GROUP_BY_OPTIONS = {\n ALPHABET: 'alphabet',\n WORD: 'word',\n OTHERS: 'Others'\n};\nconst TIME_ROLLUP_OPTIONS = {\n HOUR: 'hour',\n DAY: 'day',\n WEEK: 'week',\n MONTH: 'month',\n YEAR: 'year'\n};\n\nconst _deepCopy = (o1: any, ...o2: any) => {\n o2.forEach((o: any) => {\n if (o) {\n Object.keys(o).forEach(k => {\n const v = o[k];\n if (v && !isString(v) && !isArray(v) && typeof v === 'object') {\n o1[k] = _deepCopy(o1[k] || {}, o[k]);\n } else {\n o1[k] = _deepCopy(v);\n }\n });\n }\n });\n return o1;\n};\n\nexport const deepCopy = (...objects: any) => _deepCopy({}, ...objects);\n\nexport const toBoolean = (val: any) => {\n return val === true\n || val === 'true'\n || !(val === false\n || val === null\n || val === undefined\n || val === '');\n};\n\nexport const toNumber = (val: any) => {\n try {\n return parseFloat(val) || 0;\n } catch(e) {\n return 0;\n }\n};\n\n/**\n * this method encodes the url and returns the encoded string\n */\n export const encodeUrl = (url: string): string => {\n let splits = url.split('#');\n const hash = splits[1];\n splits = splits[0].split('?');\n let params = '';\n if (splits.length > 1) {\n params = splits[1].split('&')\n .map(p => p.split('='))\n .map(p => p[0] +'=' + encodeURIComponent(p[1]))\n .join('&');\n }\n return encodeURI(splits[0]) + (params ? '?' + params: '') + (hash ? '#'+ hash : '');\n};\n\nexport const isWebPreviewMode = () => Platform.OS === 'web';\n\nexport const isDevMode = () => isWebPreviewMode() || __DEV__;\n\nexport const widgetsWithUndefinedValue = ['checkbox', 'toggle'];\n\nexport const isAndroid = () => (Platform.OS === 'android' || (Platform.OS === 'web' && /android/i.test(window.navigator.userAgent)));\n\nexport const isIos = () => (Platform.OS === 'ios' || (Platform.OS === 'web' && /iPhone|iPad/i.test(window.navigator.userAgent)));\n\nconst getGroupKey = (fieldDef: any, groupby: string, widgetScope: any, innerItem?: any) => isFunction(groupby) ? groupby.apply(widgetScope.proxy, [innerItem ? fieldDef[innerItem] : fieldDef]) : get(innerItem ? fieldDef[innerItem] : fieldDef, groupby);\n\n/**\n * This method prepares the grouped data.\n *\n * @param fieldDefs array of objects i.e. dataset\n * @param groupby string groupby\n * @param match string match\n * @param orderby string orderby\n * @param dateFormat string date format\n */\nexport const getGroupedData = (fieldDefs: any, groupby: string, match: string, orderby: string, dateFormat: string, widgetScope: any, innerItem?: any) => {\n\n // handling case-in-sensitive scenario\n // ordering the data based on groupby field. If there is innerItem then apply orderby using the innerItem's containing the groupby field.\n fieldDefs = orderBy(fieldDefs, fieldDef => {\n const groupKey = getGroupKey(fieldDef, groupby, widgetScope, innerItem);\n if (groupKey) {\n return toLower(groupKey);\n }\n return '';\n });\n\n // extract the grouped data based on the field obtained from 'groupDataByField'.\n const groupedLiData = groupBy(fieldDefs, function (fieldDef) {\n let concatStr = getGroupKey(fieldDef, groupby, widgetScope, innerItem);\n // by default set the undefined groupKey as 'others'\n if (isUndefined(concatStr) || isNull(concatStr) || concatStr.toString().trim() === '') {\n return GROUP_BY_OPTIONS.OTHERS;\n }\n // if match prop is alphabetic ,get the starting alphabet of the word as key.\n if (match === GROUP_BY_OPTIONS.ALPHABET) {\n concatStr = concatStr.substr(0, 1);\n }\n\n // if match contains the time options then get the concatStr using 'getTimeRolledUpString'\n if (includes(values(TIME_ROLLUP_OPTIONS), match)) {\n dateFormat = dateFormat && dateFormat.replace(/d/g, 'D');\n dateFormat = dateFormat && dateFormat.replace(/y/g, 'Y');\n concatStr = moment(concatStr).format(dateFormat);\n }\n\n return concatStr;\n });\n\n return getSortedGroupedData(groupedLiData, groupby, orderby, innerItem);\n};\n\n/**\n * function to get the ordered dataset based on the given orderby\n */\nexport const getOrderedDataset = (dataSet: any, orderby: string, innerItem?: any) => {\n if (!orderBy) {\n return cloneDeep(dataSet);\n }\n\n // The order by only works when the dataset contains list of objects.\n const items = orderby && orderby.split(','),\n fields: any = [],\n directions: any = [];\n items && items.forEach( obj => {\n const item = obj.split(':');\n fields.push(innerItem ? innerItem + '.' + item[0] : item[0]);\n directions.push(item[1]);\n });\n return orderBy(dataSet, fields, directions);\n};\n\n\n/**\n * This method returns sorted data based to groupkey.\n * Returns a array of objects, each object containing key which is groupKey and data is the sorted data which is sorted by groupby field in the data.\n *\n * @param groupedLiData, grouped data object with key as the groupKey and its value as the array of objects grouped under the groupKey.\n * @param groupBy, string groupby property\n * @returns {any[]}\n */\nexport const getSortedGroupedData = (groupedLiData: any, groupBy: string, orderby: string, innerItem?: any) => {\n const _groupedData: any = [];\n forEach(keys(groupedLiData), (groupkey, index) => {\n const liData = getOrderedDataset(groupedLiData[groupkey], orderby, innerItem);\n _groupedData.push({\n key: groupkey,\n data: sortBy(liData, data => {\n data._groupIndex = index;\n return get(data, groupBy) || get(data[innerItem], groupBy);\n })\n });\n });\n return _groupedData;\n};\n\nexport const isDefined = (v: any) => typeof v !== 'undefined';\n\n// try to convert the chekedvalue and unchecked values to boolean/number\nexport const unStringify = (val: any, defaultVal?: boolean) => {\n if (val === null) {\n return defaultVal;\n }\n\n if (val === true || val === 'true') {\n return true;\n }\n\n if (val === false || val === 'false') {\n return false;\n }\n\n const number = parseInt(val, 10);\n if (!isNaN(number)) {\n return number;\n }\n return val;\n};\n\n/**\n * This function invokes the given the function (fn) until the function successfully executes or the maximum number\n * of retries is reached or onBeforeRetry returns false.\n *\n * @param fn - a function that is needs to be invoked. The function can also return a promise as well.\n * @param interval - minimum time gap between successive retries. This argument should be greater or equal to 0.\n * @param maxRetries - maximum number of retries. This argument should be greater than 0. For all other values,\n * maxRetries is infinity.\n * @param onBeforeRetry - a callback function that will be invoked before re-invoking again. This function can\n * return false or a promise that is resolved to false to stop further retry attempts.\n * @returns {*} a promise that is resolved when fn is success (or) maximum retry attempts reached\n * (or) onBeforeRetry returned false.\n */\nexport const retryIfFails = (fn: Function, interval: number, maxRetries: number, onBeforeRetry = () => Promise.resolve(false)) => {\n let retryCount = 0;\n const tryFn = () => {\n retryCount++;\n if (isFunction(fn)) {\n return fn();\n }\n };\n maxRetries = (isNumber(maxRetries) && maxRetries > 0 ? maxRetries : 0);\n interval = (isNumber(interval) && interval > 0 ? interval : 0);\n return new Promise((resolve, reject) => {\n const errorFn = function () {\n const errArgs = arguments;\n setTimeout(() => {\n Promise.resolve().then(() => onBeforeRetry()).then(function (retry) {\n if (retry !== false && (!maxRetries || retryCount <= maxRetries)) {\n Promise.resolve().then(() => tryFn()).then(resolve, errorFn);\n } else {\n reject(errArgs);\n }\n }, () => reject(errArgs));\n }, interval);\n };\n Promise.resolve().then(() => tryFn()).then(resolve, errorFn);\n });\n};\n\n/**\n * Promise of a defer created using this function, has abort function that will reject the defer when called.\n * @returns {*} angular defer object\n */\nexport const getAbortableDefer = () => {\n const _defer: any = {\n promise: null,\n reject: null,\n resolve: null,\n onAbort: () => { },\n isAborted: false\n };\n _defer.promise = new Promise((resolve, reject) => {\n _defer.resolve = resolve;\n _defer.reject = reject;\n });\n _defer.promise.abort = () => {\n _defer.onAbort && _defer.onAbort();\n _defer.reject('aborted');\n _defer.isAborted = true;\n };\n return _defer;\n};\n\nexport const validateField = (props: any, value: any) => {\n let requiredCheck = true, regexCheck = true;\n if (props.required) {\n if (isArray(value)) {\n requiredCheck = value.length === 0 ? false : true\n } else {\n requiredCheck = !value ? false : true\n }\n if (!requiredCheck) {\n return {\n errorType : 'required',\n isValid: false\n }\n }\n }\n if (value && props.regexp) {\n const condition = new RegExp(\"^\" + props.regexp + \"$\", 'g');\n regexCheck = condition.test(value);\n if (!regexCheck) {\n return {\n errorType : 'regexp',\n isValid: false\n }\n }\n }\n if (value && props.maxchars && value.length > props.maxchars) {\n return {\n errorType : 'maxchars',\n isValid: false\n }\n\n }\n if (value && props.mindate && new Date(props.datavalue) < moment(props.mindate).startOf('day').toDate()) {\n return {\n errorType : 'mindate',\n isValid: false\n }\n }\n if (value && props.maxdate && new Date(props.datavalue) > moment(props.maxdate).endOf('day').toDate()) {\n return {\n errorType : 'maxdate',\n isValid: false\n }\n }\n\n return {\n isValid: true\n }\n};\n\nexport const countDecimalDigits = (number: number | string) => {\n if (!number) return 0;\n\n // * convert the number to a string\n const numberString = number.toString();\n \n // * regular expression to match and count the decimal digits\n const decimalMatch = numberString.match(/\\.(\\d+)/);\n\n if (decimalMatch) {\n const decimalDigits = decimalMatch[1];\n return decimalDigits.length;\n } else {\n return 0; // * no decimal digits found\n }\n}\n\nexport const formatCompactNumber = (number: number) => {\n const isNegative = number < 0;\n number = isNegative ? number * -1 : number;\n let formattedNumber = number + '';\n if (number >= 1000 && number < 1_000_000) {\n formattedNumber = (number / 1000).toFixed(1).replace(/\\.0$/, \"\") + \"K\";\n } else if (number >= 1_000_000 && number < 1_000_000_000) {\n formattedNumber = (number / 1_000_000).toFixed(1).replace(/\\.0$/, \"\") + \"M\";\n } else if (number >= 1_000_000_000 && number < 1_000_000_000_000) {\n formattedNumber = (number / 1_000_000_000).toFixed(1).replace(/\\.0$/, \"\") + \"B\";\n } else if (number >= 1_000_000_000_000 && number < 1_000_000_000_000_000) {\n formattedNumber = (number / 1_000_000_000_000).toFixed(1).replace(/\\.0$/, \"\") + \"T\";\n }\n return (isNegative ? '-' : '') + formattedNumber;\n}\n\nexport const toBase64 = function(path: string) {\n return FileSystem.readAsStringAsync(path, { encoding: 'base64' });\n};\n\nconst DATASET_WIDGETS = new Set([ 'select', 'checkboxset', 'radioset', 'switch', 'autocomplete', 'chips', 'typeahead', 'rating']);\nexport const isDataSetWidget = (widget: any) => {\n return DATASET_WIDGETS.has(widget);\n};\nexport const isFullPathUrl = (url: string) => {\n return isString(url) &&\n (url.startsWith('data:') \n || url.startsWith('http:') \n || url.startsWith('https:') \n || url.startsWith('file:'));\n};\n\nexport function removeUndefinedKeys(obj: any) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n } else if (typeof obj[key] === 'object') {\n // * if the value is an object, recursively call the function\n removeUndefinedKeys(obj[key]);\n }\n }\n\n return obj;\n}\n// * get total number of days in a month of a year\nfunction getDaysInMonth(month: number, year: number) {\n return new Date(year, month, 0).getDate();\n}\n\nexport const getDates = (\n month = 0, // zero-based\n year = new Date().getFullYear(),\n) => {\n const daysInMonth = getDaysInMonth(month, year);\n const dates = Array.from({length: daysInMonth}, (v, i) => i + 1);\n\n return dates;\n};\n\nexport const monthNames = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\n\nexport const getMonths = () => {\n const months = monthNames.map(name => name.substring(0, 3));\n\n return months;\n};\n\nexport const getYearRange = (\n startYear: number = 1950,\n endYear: number = 2060,\n) => {\n const years = [];\n for (let year = startYear; year <= endYear; ++year) {\n years.push(year);\n }\n\n return years;\n};\n\nexport const getDateObject = (date: number, month: number, year: number) => {\n // * month is zero-based\n return new Date(year, month, date);\n};\n\nexport const getHours = () => {\n const hours = [];\n for (let hour = 1; hour <= 12; ++hour) {\n const paddedHour = String(hour).padStart(2, '0');\n hours.push(paddedHour);\n }\n\n return hours;\n}\n\nexport const get24Hours = () => {\n const hours = [];\n for (let hour = 0; hour <= 23; ++hour) {\n const paddedHour = String(hour).padStart(2, '0');\n hours.push(paddedHour);\n }\n\n return hours;\n}\n\nexport const getMinutes = () => {\n const minutes = [];\n for (let minute = 0; minute <= 59; ++minute) {\n const paddedMinute = String(minute).padStart(2, '0');\n minutes.push(paddedMinute);\n }\n\n return minutes;\n}\n\nexport const getTimeIndicators = () => {\n return ['AM', 'PM'];\n}\n\nexport const getDateTimeObject = (date: number, month: number, year: number, hour: number, minute: number) => {\n // * month is zero-based\n return new Date(year, month, date, hour, minute);\n};\n\nexport const getGradientStartEnd = (angle: string) => {\n const angleLowerCase = angle?.toLowerCase();\n let start = { x: 0, y: 1 };\n let end = { x: 1, y: 1 };\n\n if (angle === '0deg' || angleLowerCase === 'to top') {\n end.x = 0;\n end.y = 0;\n } else if (angle === '90deg' || angleLowerCase === 'to right') {\n start.x = 0;\n } else if (angle === '180deg' || angleLowerCase === 'to bottom') {\n start.y = 0;\n end.x = 0;\n end.y = 1;\n } else if (angle === '270deg' || angleLowerCase === 'to left') {\n start.x = 1;\n end.x = 0;\n } else {\n // other angle\n }\n\n return {start, end}\n}\n\nexport const parseLinearGradient = (gradient: string) => {\n let angle = '', color1 = '', color2 = '';\n const linearGradientRegex = /linear-gradient\\(([^,]+),\\s*([^,]+),\\s*([^)]+)\\)/;\n const hasLinearGradient = linearGradientRegex.test(gradient);\n\n const matches = gradient?.match(linearGradientRegex);\n angle = matches?.[1] || '90deg';\n const {start, end} = getGradientStartEnd(angle)\n color1 = matches?.[2] || ThemeVariables.INSTANCE.primaryColor;\n color2 = matches?.[3] || ThemeVariables.INSTANCE.primaryColor;\n\n return {hasLinearGradient, color1, color2, start, end};\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,MAAM,MAAM,QAAQ;AAC3B,OAAO,KAAKC,UAAU,MAAM,kBAAkB;AAC9C,SAASC,UAAU,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,GAAG,EAAEC,OAAO,EAAEC,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,QAAO,QAAQ;AACxK,OAAOC,cAAc,MAAM,2BAA2B;AAGtD,MAAMC,gBAAgB,GAAG;EACvBC,QAAQ,EAAE,UAAU;EACpBC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE;AACV,CAAC;AACD,MAAMC,mBAAmB,GAAG;EAC1BC,IAAI,EAAE,MAAM;EACZC,GAAG,EAAE,KAAK;EACVC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE;AACR,CAAC;AAED,MAAMC,SAAS,GAAGA,CAACC,EAAO,EAAE,GAAGC,EAAO,KAAK;EACvCA,EAAE,CAACrB,OAAO,CAAEsB,CAAM,IAAK;IACnB,IAAIA,CAAC,EAAE;MACHC,MAAM,CAACpB,IAAI,CAACmB,CAAC,CAAC,CAACtB,OAAO,CAACwB,CAAC,IAAI;QACxB,MAAMC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CAACF,CAAC,GAAG,CAAC;EACX,CAAC,MAAM;IACL;EAAA;EAGF,OAAO;IAACD,KAAK;IAAEG;EAAG,CAAC;AACrB,CAAC;AAED,OAAO,MAAMC,mBAAmB,GAAIC,QAAgB,IAAK;EACvD,IAAIR,KAAK,GAAG,EAAE;IAAES,MAAM,GAAG,EAAE;IAAEC,MAAM,GAAG,EAAE;EACxC,MAAMC,mBAAmB,GAAG,kDAAkD;EAC9E,MAAMC,iBAAiB,GAAGD,mBAAmB,CAAC3J,IAAI,CAACwJ,QAAQ,CAAC;EAE5D,MAAMK,OAAO,GAAGL,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAE1I,KAAK,CAAC6I,mBAAmB,CAAC;EACpDX,KAAK,GAAG,CAAAa,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAG,CAAC,CAAC,KAAI,OAAO;EAC/B,MAAM;IAACV,KAAK;IAAEG;EAAG,CAAC,GAAGP,mBAAmB,CAACC,KAAK,CAAC;EAC/CS,MAAM,GAAG,CAAAI,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAG,CAAC,CAAC,KAAIzM,cAAc,CAAC0M,QAAQ,CAACC,YAAY;EAC7DL,MAAM,GAAG,CAAAG,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAG,CAAC,CAAC,KAAIzM,cAAc,CAAC0M,QAAQ,CAACC,YAAY;EAE7D,OAAO;IAACH,iBAAiB;IAAEH,MAAM;IAAEC,MAAM;IAAEP,KAAK;IAAEG;EAAG,CAAC;AACxD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Platform","moment","FileSystem","isFunction","includes","isUndefined","isNull","orderBy","groupBy","toLower","get","forEach","sortBy","cloneDeep","keys","values","isArray","isString","isNumber","ThemeVariables","GROUP_BY_OPTIONS","ALPHABET","WORD","OTHERS","TIME_ROLLUP_OPTIONS","HOUR","DAY","WEEK","MONTH","YEAR","_deepCopy","o1","o2","o","Object","k","v","deepCopy","objects","toBoolean","val","undefined","toNumber","parseFloat","e","encodeUrl","url","splits","split","hash","params","length","map","p","encodeURIComponent","join","encodeURI","isWebPreviewMode","OS","isDevMode","__DEV__","widgetsWithUndefinedValue","isAndroid","test","window","navigator","userAgent","isIos","getGroupKey","fieldDef","groupby","widgetScope","innerItem","apply","proxy","getGroupedData","fieldDefs","match","orderby","dateFormat","groupKey","groupedLiData","concatStr","toString","trim","substr","replace","format","getSortedGroupedData","getOrderedDataset","dataSet","items","fields","directions","obj","item","push","_groupedData","groupkey","index","liData","key","data","_groupIndex","isDefined","unStringify","defaultVal","number","parseInt","isNaN","retryIfFails","fn","interval","maxRetries","onBeforeRetry","Promise","resolve","retryCount","tryFn","reject","errorFn","errArgs","arguments","setTimeout","then","retry","getAbortableDefer","_defer","promise","onAbort","isAborted","abort","validateField","props","value","requiredCheck","regexCheck","required","errorType","isValid","regexp","condition","RegExp","maxchars","mindate","Date","datavalue","startOf","toDate","maxdate","endOf","countDecimalDigits","numberString","decimalMatch","decimalDigits","formatCompactNumber","isNegative","formattedNumber","toFixed","toBase64","path","readAsStringAsync","encoding","DATASET_WIDGETS","Set","isDataSetWidget","widget","has","isFullPathUrl","startsWith","removeUndefinedKeys","getDaysInMonth","month","year","getDate","getDates","startDate","endDate","getFullYear","daysInMonth","dates","Array","from","i","datesInRange","filter","date","monthNames","getMonths","startMonth","endMonth","months","name","substring","monthRange","_","getMonthIndex","monthName","shortName","monthNumber","findIndex","getYearRange","startYear","endYear","years","getDateObject","getHours","hours","hour","paddedHour","String","padStart","get24Hours","getMinutes","minutes","minute","paddedMinute","getTimeIndicators","getDateTimeObject","getGradientStartEnd","angle","angleLowerCase","toLowerCase","start","x","y","end","parseLinearGradient","gradient","color1","color2","linearGradientRegex","hasLinearGradient","matches","INSTANCE","primaryColor","validateInputOnDevice","type","_value$match","isCurrencyField","isValidText","validText","Number","isDateFormatAsPerPattern","datePattern","dateString","_date$format","toUpperCase","error"],"sources":["utils.ts"],"sourcesContent":["import { Platform } from 'react-native';\nimport moment from \"moment\";\nimport * as FileSystem from \"expo-file-system\";\nimport { isFunction, includes, isUndefined, isNull, orderBy, groupBy, toLower, get, forEach, sortBy, cloneDeep, keys, values, isArray, isString, isNumber} from 'lodash';\nimport ThemeVariables from '../styles/theme.variables';\n\ndeclare const window: any;\nconst GROUP_BY_OPTIONS = {\n ALPHABET: 'alphabet',\n WORD: 'word',\n OTHERS: 'Others'\n};\nconst TIME_ROLLUP_OPTIONS = {\n HOUR: 'hour',\n DAY: 'day',\n WEEK: 'week',\n MONTH: 'month',\n YEAR: 'year'\n};\n\nconst _deepCopy = (o1: any, ...o2: any) => {\n o2.forEach((o: any) => {\n if (o) {\n Object.keys(o).forEach(k => {\n const v = o[k];\n if (v && !isString(v) && !isArray(v) && typeof v === 'object') {\n o1[k] = _deepCopy(o1[k] || {}, o[k]);\n } else {\n o1[k] = _deepCopy(v);\n }\n });\n }\n });\n return o1;\n};\n\nexport const deepCopy = (...objects: any) => _deepCopy({}, ...objects);\n\nexport const toBoolean = (val: any) => {\n return val === true\n || val === 'true'\n || !(val === false\n || val === null\n || val === undefined\n || val === '');\n};\n\nexport const toNumber = (val: any) => {\n try {\n return parseFloat(val) || 0;\n } catch(e) {\n return 0;\n }\n};\n\n/**\n * this method encodes the url and returns the encoded string\n */\n export const encodeUrl = (url: string): string => {\n let splits = url.split('#');\n const hash = splits[1];\n splits = splits[0].split('?');\n let params = '';\n if (splits.length > 1) {\n params = splits[1].split('&')\n .map(p => p.split('='))\n .map(p => p[0] +'=' + encodeURIComponent(p[1]))\n .join('&');\n }\n return encodeURI(splits[0]) + (params ? '?' + params: '') + (hash ? '#'+ hash : '');\n};\n\nexport const isWebPreviewMode = () => Platform.OS === 'web';\n\nexport const isDevMode = () => isWebPreviewMode() || __DEV__;\n\nexport const widgetsWithUndefinedValue = ['checkbox', 'toggle'];\n\nexport const isAndroid = () => (Platform.OS === 'android' || (Platform.OS === 'web' && /android/i.test(window.navigator.userAgent)));\n\nexport const isIos = () => (Platform.OS === 'ios' || (Platform.OS === 'web' && /iPhone|iPad/i.test(window.navigator.userAgent)));\n\nconst getGroupKey = (fieldDef: any, groupby: string, widgetScope: any, innerItem?: any) => isFunction(groupby) ? groupby.apply(widgetScope.proxy, [innerItem ? fieldDef[innerItem] : fieldDef]) : get(innerItem ? fieldDef[innerItem] : fieldDef, groupby);\n\n/**\n * This method prepares the grouped data.\n *\n * @param fieldDefs array of objects i.e. dataset\n * @param groupby string groupby\n * @param match string match\n * @param orderby string orderby\n * @param dateFormat string date format\n */\nexport const getGroupedData = (fieldDefs: any, groupby: string, match: string, orderby: string, dateFormat: string, widgetScope: any, innerItem?: any) => {\n\n // handling case-in-sensitive scenario\n // ordering the data based on groupby field. If there is innerItem then apply orderby using the innerItem's containing the groupby field.\n fieldDefs = orderBy(fieldDefs, fieldDef => {\n const groupKey = getGroupKey(fieldDef, groupby, widgetScope, innerItem);\n if (groupKey) {\n return toLower(groupKey);\n }\n return '';\n });\n\n // extract the grouped data based on the field obtained from 'groupDataByField'.\n const groupedLiData = groupBy(fieldDefs, function (fieldDef) {\n let concatStr = getGroupKey(fieldDef, groupby, widgetScope, innerItem);\n // by default set the undefined groupKey as 'others'\n if (isUndefined(concatStr) || isNull(concatStr) || concatStr.toString().trim() === '') {\n return GROUP_BY_OPTIONS.OTHERS;\n }\n // if match prop is alphabetic ,get the starting alphabet of the word as key.\n if (match === GROUP_BY_OPTIONS.ALPHABET) {\n concatStr = concatStr.substr(0, 1);\n }\n\n // if match contains the time options then get the concatStr using 'getTimeRolledUpString'\n if (includes(values(TIME_ROLLUP_OPTIONS), match)) {\n dateFormat = dateFormat && dateFormat.replace(/d/g, 'D');\n dateFormat = dateFormat && dateFormat.replace(/y/g, 'Y');\n concatStr = moment(concatStr).format(dateFormat);\n }\n\n return concatStr;\n });\n\n return getSortedGroupedData(groupedLiData, groupby, orderby, innerItem);\n};\n\n/**\n * function to get the ordered dataset based on the given orderby\n */\nexport const getOrderedDataset = (dataSet: any, orderby: string, innerItem?: any) => {\n if (!orderBy) {\n return cloneDeep(dataSet);\n }\n\n // The order by only works when the dataset contains list of objects.\n const items = orderby && orderby.split(','),\n fields: any = [],\n directions: any = [];\n items && items.forEach( obj => {\n const item = obj.split(':');\n fields.push(innerItem ? innerItem + '.' + item[0] : item[0]);\n directions.push(item[1]);\n });\n return orderBy(dataSet, fields, directions);\n};\n\n\n/**\n * This method returns sorted data based to groupkey.\n * Returns a array of objects, each object containing key which is groupKey and data is the sorted data which is sorted by groupby field in the data.\n *\n * @param groupedLiData, grouped data object with key as the groupKey and its value as the array of objects grouped under the groupKey.\n * @param groupBy, string groupby property\n * @returns {any[]}\n */\nexport const getSortedGroupedData = (groupedLiData: any, groupBy: string, orderby: string, innerItem?: any) => {\n const _groupedData: any = [];\n forEach(keys(groupedLiData), (groupkey, index) => {\n const liData = getOrderedDataset(groupedLiData[groupkey], orderby, innerItem);\n _groupedData.push({\n key: groupkey,\n data: sortBy(liData, data => {\n data._groupIndex = index;\n return get(data, groupBy) || get(data[innerItem], groupBy);\n })\n });\n });\n return _groupedData;\n};\n\nexport const isDefined = (v: any) => typeof v !== 'undefined';\n\n// try to convert the chekedvalue and unchecked values to boolean/number\nexport const unStringify = (val: any, defaultVal?: boolean) => {\n if (val === null) {\n return defaultVal;\n }\n\n if (val === true || val === 'true') {\n return true;\n }\n\n if (val === false || val === 'false') {\n return false;\n }\n\n const number = parseInt(val, 10);\n if (!isNaN(number)) {\n return number;\n }\n return val;\n};\n\n/**\n * This function invokes the given the function (fn) until the function successfully executes or the maximum number\n * of retries is reached or onBeforeRetry returns false.\n *\n * @param fn - a function that is needs to be invoked. The function can also return a promise as well.\n * @param interval - minimum time gap between successive retries. This argument should be greater or equal to 0.\n * @param maxRetries - maximum number of retries. This argument should be greater than 0. For all other values,\n * maxRetries is infinity.\n * @param onBeforeRetry - a callback function that will be invoked before re-invoking again. This function can\n * return false or a promise that is resolved to false to stop further retry attempts.\n * @returns {*} a promise that is resolved when fn is success (or) maximum retry attempts reached\n * (or) onBeforeRetry returned false.\n */\nexport const retryIfFails = (fn: Function, interval: number, maxRetries: number, onBeforeRetry = () => Promise.resolve(false)) => {\n let retryCount = 0;\n const tryFn = () => {\n retryCount++;\n if (isFunction(fn)) {\n return fn();\n }\n };\n maxRetries = (isNumber(maxRetries) && maxRetries > 0 ? maxRetries : 0);\n interval = (isNumber(interval) && interval > 0 ? interval : 0);\n return new Promise((resolve, reject) => {\n const errorFn = function () {\n const errArgs = arguments;\n setTimeout(() => {\n Promise.resolve().then(() => onBeforeRetry()).then(function (retry) {\n if (retry !== false && (!maxRetries || retryCount <= maxRetries)) {\n Promise.resolve().then(() => tryFn()).then(resolve, errorFn);\n } else {\n reject(errArgs);\n }\n }, () => reject(errArgs));\n }, interval);\n };\n Promise.resolve().then(() => tryFn()).then(resolve, errorFn);\n });\n};\n\n/**\n * Promise of a defer created using this function, has abort function that will reject the defer when called.\n * @returns {*} angular defer object\n */\nexport const getAbortableDefer = () => {\n const _defer: any = {\n promise: null,\n reject: null,\n resolve: null,\n onAbort: () => { },\n isAborted: false\n };\n _defer.promise = new Promise((resolve, reject) => {\n _defer.resolve = resolve;\n _defer.reject = reject;\n });\n _defer.promise.abort = () => {\n _defer.onAbort && _defer.onAbort();\n _defer.reject('aborted');\n _defer.isAborted = true;\n };\n return _defer;\n};\n\nexport const validateField = (props: any, value: any) => {\n let requiredCheck = true, regexCheck = true;\n if (props.required) {\n if (isArray(value)) {\n requiredCheck = value.length === 0 ? false : true\n } else {\n requiredCheck = !value ? false : true\n }\n if (!requiredCheck) {\n return {\n errorType : 'required',\n isValid: false\n }\n }\n }\n if (value && props.regexp) {\n const condition = new RegExp(\"^\" + props.regexp + \"$\", 'g');\n regexCheck = condition.test(value);\n if (!regexCheck) {\n return {\n errorType : 'regexp',\n isValid: false\n }\n }\n }\n if (value && props.maxchars && value.length > props.maxchars) {\n return {\n errorType : 'maxchars',\n isValid: false\n }\n\n }\n if (value && props.mindate && new Date(props.datavalue) < moment(props.mindate).startOf('day').toDate()) {\n return {\n errorType : 'mindate',\n isValid: false\n }\n }\n if (value && props.maxdate && new Date(props.datavalue) > moment(props.maxdate).endOf('day').toDate()) {\n return {\n errorType : 'maxdate',\n isValid: false\n }\n }\n\n return {\n isValid: true\n }\n};\n\nexport const countDecimalDigits = (number: number | string) => {\n if (!number) return 0;\n\n // * convert the number to a string\n const numberString = number.toString();\n \n // * regular expression to match and count the decimal digits\n const decimalMatch = numberString.match(/\\.(\\d+)/);\n\n if (decimalMatch) {\n const decimalDigits = decimalMatch[1];\n return decimalDigits.length;\n } else {\n return 0; // * no decimal digits found\n }\n}\n\nexport const formatCompactNumber = (number: number) => {\n const isNegative = number < 0;\n number = isNegative ? number * -1 : number;\n let formattedNumber = number + '';\n if (number >= 1000 && number < 1_000_000) {\n formattedNumber = (number / 1000).toFixed(1).replace(/\\.0$/, \"\") + \"K\";\n } else if (number >= 1_000_000 && number < 1_000_000_000) {\n formattedNumber = (number / 1_000_000).toFixed(1).replace(/\\.0$/, \"\") + \"M\";\n } else if (number >= 1_000_000_000 && number < 1_000_000_000_000) {\n formattedNumber = (number / 1_000_000_000).toFixed(1).replace(/\\.0$/, \"\") + \"B\";\n } else if (number >= 1_000_000_000_000 && number < 1_000_000_000_000_000) {\n formattedNumber = (number / 1_000_000_000_000).toFixed(1).replace(/\\.0$/, \"\") + \"T\";\n }\n return (isNegative ? '-' : '') + formattedNumber;\n}\n\nexport const toBase64 = function(path: string) {\n return FileSystem.readAsStringAsync(path, { encoding: 'base64' });\n};\n\nconst DATASET_WIDGETS = new Set([ 'select', 'checkboxset', 'radioset', 'switch', 'autocomplete', 'chips', 'typeahead', 'rating']);\nexport const isDataSetWidget = (widget: any) => {\n return DATASET_WIDGETS.has(widget);\n};\nexport const isFullPathUrl = (url: string) => {\n return isString(url) &&\n (url.startsWith('data:') \n || url.startsWith('http:') \n || url.startsWith('https:') \n || url.startsWith('file:'));\n};\n\nexport function removeUndefinedKeys(obj: any) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n } else if (typeof obj[key] === 'object') {\n // * if the value is an object, recursively call the function\n removeUndefinedKeys(obj[key]);\n }\n }\n\n return obj;\n}\n// * get total number of days in a month of a year\nfunction getDaysInMonth(month: number, year: number) {\n return new Date(year, month, 0).getDate();\n}\n\nexport const getDates = (\n startDate: number,\n endDate: number,\n month = 0, // zero-based\n year = new Date().getFullYear(),\n) => {\n const daysInMonth = getDaysInMonth(month, year);\n const dates = Array.from({length: daysInMonth}, (v, i) => i + 1);\n\n const datesInRange = dates.filter(date => date >= startDate);\n\n return datesInRange;\n};\n\nexport const monthNames = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\n\nexport const getMonths = (startMonth: number, endMonth: number) => {\n const months = monthNames.map(name => name.substring(0, 3));\n const monthRange = months.filter((_, index) => index >= startMonth)\n\n return monthRange;\n};\n\nexport const getMonthIndex = (monthName: string, shortName: boolean = true) => {\n const months = shortName ? monthNames.map(name => name.substring(0, 3)) : monthNames;\n const monthNumber = months.findIndex((name) => name === monthName);\n\n return monthNumber;\n}\n\nexport const getYearRange = (\n startYear: number = 1950,\n endYear: number = 2060,\n) => {\n const years = [];\n for (let year = startYear; year <= endYear; ++year) {\n years.push(year);\n }\n\n return years;\n};\n\nexport const getDateObject = (date: number, month: number, year: number) => {\n // * month is zero-based\n return new Date(year, month, date);\n};\n\nexport const getHours = () => {\n const hours = [];\n for (let hour = 1; hour <= 12; ++hour) {\n const paddedHour = String(hour).padStart(2, '0');\n hours.push(paddedHour);\n }\n\n return hours;\n}\n\nexport const get24Hours = () => {\n const hours = [];\n for (let hour = 0; hour <= 23; ++hour) {\n const paddedHour = String(hour).padStart(2, '0');\n hours.push(paddedHour);\n }\n\n return hours;\n}\n\nexport const getMinutes = () => {\n const minutes = [];\n for (let minute = 0; minute <= 59; ++minute) {\n const paddedMinute = String(minute).padStart(2, '0');\n minutes.push(paddedMinute);\n }\n\n return minutes;\n}\n\nexport const getTimeIndicators = () => {\n return ['AM', 'PM'];\n}\n\nexport const getDateTimeObject = (date: number, month: number, year: number, hour: number, minute: number) => {\n // * month is zero-based\n return new Date(year, month, date, hour, minute);\n};\n\nexport const getGradientStartEnd = (angle: string) => {\n const angleLowerCase = angle?.toLowerCase();\n let start = { x: 0, y: 1 };\n let end = { x: 1, y: 1 };\n\n if (angle === '0deg' || angleLowerCase === 'to top') {\n end.x = 0;\n end.y = 0;\n } else if (angle === '90deg' || angleLowerCase === 'to right') {\n start.x = 0;\n } else if (angle === '180deg' || angleLowerCase === 'to bottom') {\n start.y = 0;\n end.x = 0;\n end.y = 1;\n } else if (angle === '270deg' || angleLowerCase === 'to left') {\n start.x = 1;\n end.x = 0;\n } else {\n // other angle\n }\n\n return {start, end}\n}\n\nexport const parseLinearGradient = (gradient: string) => {\n let angle = '', color1 = '', color2 = '';\n const linearGradientRegex = /linear-gradient\\(([^,]+),\\s*([^,]+),\\s*([^)]+)\\)/;\n const hasLinearGradient = linearGradientRegex.test(gradient);\n\n const matches = gradient?.match(linearGradientRegex);\n angle = matches?.[1] || '90deg';\n const {start, end} = getGradientStartEnd(angle)\n color1 = matches?.[2] || ThemeVariables.INSTANCE.primaryColor;\n color2 = matches?.[3] || ThemeVariables.INSTANCE.primaryColor;\n\n return {hasLinearGradient, color1, color2, start, end};\n}\n\nexport const validateInputOnDevice = (value: string, type: 'number' | 'currency') => {\n const isCurrencyField = type === 'currency';\n let isValidText = true;\n let validText = value;\n \n // * no alphabets except E, may contain E only once\n if (/[a-df-zA-DF-Z]/.test(value) || !/^[^eE]*[eE]?[^eE]*$/.test(value)) {\n isValidText = false;\n validText = validText.replace(/[a-df-zA-DF-Z]/g, '');\n validText = validText.replace(/([eE])\\1+/g, 'e');\n }\n\n // * currency only: check for negative number\n if (isCurrencyField && (Number(value) < 0 || /-/g.test(value))) {\n isValidText = false;\n validText = validText.replace(/-/g, '');\n }\n\n // * number only: not more than one minus and doesn't end with minus (-)\n if (!isCurrencyField && (Number(value.match(/-/g)?.length) > 1) || /\\w-/.test(value)) {\n isValidText = false;\n validText = validText.replace(/-/g, '');\n validText = validText.replace(/\\w-/g, '');\n }\n\n // * check for more than one decimal point\n if (/^\\d*\\.\\d*\\..*$/.test(value)) {\n isValidText = false;\n validText = validText.replace(/\\.(?=\\.*\\.)/g, '');\n }\n\n // * check for spaces and comma\n if (/[\\s,]/.test(value)) {\n isValidText = false;\n validText = validText.replace(/[\\s,]/, '');\n }\n\n return {isValidText, validText};\n}\n\nexport const isDateFormatAsPerPattern = (\n datePattern?: string,\n dateString?: string | Date\n) => {\n try {\n // * format dateString as per datePattern\n const date = moment(dateString, datePattern, true);\n\n // * check date is valid and matches the format\n return date.isValid() && typeof dateString === 'string' && dateString?.toUpperCase() === date.format(datePattern)?.toUpperCase();\n } catch (error) {\n // * if not able to parse date string\n return false;\n }\n};\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,MAAM,MAAM,QAAQ;AAC3B,OAAO,KAAKC,UAAU,MAAM,kBAAkB;AAC9C,SAASC,UAAU,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,EAAEC,GAAG,EAAEC,OAAO,EAAEC,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,QAAO,QAAQ;AACxK,OAAOC,cAAc,MAAM,2BAA2B;AAGtD,MAAMC,gBAAgB,GAAG;EACvBC,QAAQ,EAAE,UAAU;EACpBC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE;AACV,CAAC;AACD,MAAMC,mBAAmB,GAAG;EAC1BC,IAAI,EAAE,MAAM;EACZC,GAAG,EAAE,KAAK;EACVC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE;AACR,CAAC;AAED,MAAMC,SAAS,GAAGA,C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