@wavemaker/app-rn-runtime 12.0.0-next.141209 → 12.0.0-next.141214

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. app-rn-runtime/components/advanced/carousel/carousel.component.js +1 -0
  2. app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
  3. app-rn-runtime/components/basic/audio/audio.component.js +9 -2
  4. app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
  5. app-rn-runtime/components/basic/audio/audio.styles.js +7 -0
  6. app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
  7. app-rn-runtime/components/basic/custom/custom.component.js +1 -1
  8. app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
  9. app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
  10. app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
  11. app-rn-runtime/components/basic/search/search.component.js +1 -1
  12. app-rn-runtime/components/basic/search/search.component.js.map +1 -1
  13. app-rn-runtime/components/basic/search/search.props.js +1 -0
  14. app-rn-runtime/components/basic/search/search.props.js.map +1 -1
  15. app-rn-runtime/components/basic/skeleton/skeleton.component.js +2 -0
  16. app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
  17. app-rn-runtime/components/basic/video/video.component.js +6 -0
  18. app-rn-runtime/components/basic/video/video.component.js.map +1 -1
  19. app-rn-runtime/components/basic/video/video.styles.js +7 -1
  20. app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
  21. app-rn-runtime/components/container/container.component.js +8 -1
  22. app-rn-runtime/components/container/container.component.js.map +1 -1
  23. app-rn-runtime/components/container/container.props.js +1 -0
  24. app-rn-runtime/components/container/container.props.js.map +1 -1
  25. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
  26. app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
  27. app-rn-runtime/components/container/tabs/tabs.component.js +3 -1
  28. app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
  29. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -0
  30. app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
  31. app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -1
  32. app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
  33. app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
  34. app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
  35. app-rn-runtime/components/input/basenumber/basenumber.component.js +19 -6
  36. app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
  37. app-rn-runtime/components/input/calendar/calendar.component.js +25 -0
  38. app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
  39. app-rn-runtime/components/input/calendar/calendar.styles.js +19 -0
  40. app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
  41. app-rn-runtime/components/input/checkbox/checkbox.component.js +23 -3
  42. app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
  43. app-rn-runtime/components/input/checkbox/checkbox.styles.js +19 -2
  44. app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
  45. app-rn-runtime/components/input/chips/chips.component.js +16 -2
  46. app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
  47. app-rn-runtime/components/input/chips/chips.styles.js +8 -0
  48. app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
  49. app-rn-runtime/components/input/currency/currency.component.js +14 -4
  50. app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
  51. app-rn-runtime/components/input/currency/currency.styles.js +43 -1
  52. app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
  53. app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -5
  54. app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
  55. app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -0
  56. app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
  57. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +13 -0
  58. app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
  59. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +7 -4
  60. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
  61. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +3 -0
  62. app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
  63. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +7 -4
  64. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
  65. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +3 -0
  66. app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -1
  67. app-rn-runtime/components/input/number/number.component.js +17 -3
  68. app-rn-runtime/components/input/number/number.component.js.map +1 -1
  69. app-rn-runtime/components/input/number/number.styles.js +24 -1
  70. app-rn-runtime/components/input/number/number.styles.js.map +1 -1
  71. app-rn-runtime/components/input/radioset/radioset.component.js +12 -7
  72. app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
  73. app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
  74. app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
  75. app-rn-runtime/components/input/radioset/radioset.styles.js +6 -0
  76. app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
  77. app-rn-runtime/components/input/select/select.component.js +11 -3
  78. app-rn-runtime/components/input/select/select.component.js.map +1 -1
  79. app-rn-runtime/components/input/select/select.styles.js +24 -0
  80. app-rn-runtime/components/input/select/select.styles.js.map +1 -1
  81. app-rn-runtime/components/input/switch/switch.component.js +13 -3
  82. app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
  83. app-rn-runtime/components/input/switch/switch.styles.js +15 -0
  84. app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
  85. app-rn-runtime/components/input/text/text.component.js +5 -2
  86. app-rn-runtime/components/input/text/text.component.js.map +1 -1
  87. app-rn-runtime/components/input/text/text.props.js +1 -0
  88. app-rn-runtime/components/input/text/text.props.js.map +1 -1
  89. app-rn-runtime/components/input/text/text.styles.js +3 -0
  90. app-rn-runtime/components/input/text/text.styles.js.map +1 -1
  91. app-rn-runtime/components/input/textarea/textarea.component.js +3 -1
  92. app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
  93. app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
  94. app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
  95. app-rn-runtime/components/input/toggle/toggle.component.js +6 -0
  96. app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
  97. app-rn-runtime/components/input/toggle/toggle.props.js +2 -0
  98. app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
  99. app-rn-runtime/components/input/toggle/toggle.styles.js +7 -0
  100. app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
  101. app-rn-runtime/components/page/content/content.component.js +4 -19
  102. app-rn-runtime/components/page/content/content.component.js.map +1 -1
  103. app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
  104. app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
  105. app-rn-runtime/components/page/page-content/page-content.component.js +43 -12
  106. app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
  107. app-rn-runtime/core/AppConfig.js.map +1 -1
  108. app-rn-runtime/core/base.component.js +31 -5
  109. app-rn-runtime/core/base.component.js.map +1 -1
  110. app-rn-runtime/core/components/textinput.component.js +9 -7
  111. app-rn-runtime/core/components/textinput.component.js.map +1 -1
  112. app-rn-runtime/core/storage.service.js +15 -0
  113. app-rn-runtime/core/storage.service.js.map +1 -1
  114. app-rn-runtime/core/wm-component-tree.js +58 -0
  115. app-rn-runtime/core/wm-component-tree.js.map +1 -0
  116. app-rn-runtime/package.json +13 -6
  117. app-rn-runtime/runtime/App.js +21 -2
  118. app-rn-runtime/runtime/App.js.map +1 -1
  119. app-rn-runtime/runtime/App.navigator.js +1 -0
  120. app-rn-runtime/runtime/App.navigator.js.map +1 -1
  121. app-rn-runtime/runtime/base-fragment.component.js +18 -0
  122. app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
  123. app-rn-runtime/runtime/base-page.component.js +38 -2
  124. app-rn-runtime/runtime/base-page.component.js.map +1 -1
  125. app-rn-runtime/runtime/base-partial.component.js +3 -0
  126. app-rn-runtime/runtime/base-partial.component.js.map +1 -1
  127. app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
  128. app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
  129. app-rn-runtime/runtime/services/app-modal.service.js +4 -4
  130. app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
  131. app-rn-runtime/styles/theme.js +5 -0
  132. app-rn-runtime/styles/theme.js.map +1 -1
  133. app-rn-runtime/styles/theme.variables.js +1 -1
  134. app-rn-runtime/styles/theme.variables.js.map +1 -1
  135. app-rn-runtime/variables/http.service.js +5 -1
  136. app-rn-runtime/variables/http.service.js.map +1 -1
  137. app-rn-runtime/variables/live-variable.js +14 -0
  138. app-rn-runtime/variables/live-variable.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","Keyboard","Platform","Text","TextInput","View","ScrollView","find","isNull","WmSearchProps","DEFAULT_CLASS","ModalConsumer","DataProvider","AccessibilityWidgetType","getAccessibilityProps","BaseDatasetComponent","BaseDatasetState","WmAnchor","WmPicture","Tappable","WmButton","get","isArray","isEmpty","isObject","AssetProvider","createSkeleton","WmSearchState","constructor","args","_defineProperty","top","left","WmSearch","props","Promise","resolve","position","view","measure","x","y","width","height","px","py","updateState","computePosition","then","isOpened","dataProvider","datavalue","query","clearSearch","invokeEventCallback","hide","dataItems","state","map","item","selected","type","updateFilteredData","queryText","_filteredData","filterOptions","entries","filteredData","minchars","length","_this$dataProvider","searchkey","updateRequired","undefined","init","invokeVariable","response","dataSet","setDataItems","filter","result","dataObject","data","isFocused","showPopover","focus","_this$widgetRef","widgetRef","onChange","value","isDefaultQuery","prevQuery","searchon","validate","setTimeout","invokeEvent","proxy","invokeChange","e","OS","cursor","target","selectionStart","onFocus","disabled","_this$state$props$que","onBlur","triggerValidation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalContentSTyles","searchInputWidth","modalContent","borderWidth","modalStyle","modal","contentStyle","isModal","onClose","dismiss","setState","hideModal","searchIconPress","onItemSelect","displayexp","displayfield","datafield","updateDatavalue","prevDatavalue","queryModel","renderSkeleton","rootStyle","searchInputWrapper","root","text","theme","skeleton","renderSearchBar","_this$state$dataItems","opts","valueExpr","createElement","style","ref","onLayout","_extends","isValid","invalid","focusedText","selectionEnd","getTestPropsForInput","SEARCH","placeholderTextColor","placeholderText","color","placeholder","autoFocus","autofocus","editable","readonly","onChangeText","bind","nativeEvent","layout","showclear","onTap","id","getTestId","clearButton","iconclass","showSearchIcon","searchButton","reset","renderSearchItem","index","imageStyles","imagewidth","getTestProps","searchItem","template","renderitempartial","Fragment","name","picturesource","imgSrc","getTestPropsForLabel","searchItemText","updateDefaultQueryModel","selectedItem","onDataItemsUpdate","componentDidMount","onPropertyChange","$new","$old","dataset","setTemplate","partialName","renderWidget","showModal","maxHeight","contentContainerStyle","dropDownContent","loadAsset","key","limit","caption","datacompletemsg","dataCompleteItem"],"sources":["search.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Keyboard, Platform, Text, TextInput, View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, isNull } from 'lodash';\n\nimport WmSearchProps from './search.props';\nimport { DEFAULT_CLASS, WmSearchStyles } from './search.styles';\nimport { ModalConsumer, ModalOptions, ModalService} from \"@wavemaker/app-rn-runtime/core/modal.service\";\nimport { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { get, isArray, isEmpty, isObject } from \"lodash-es\";\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmSearchState extends BaseDatasetState<WmSearchProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n template: string = \"\";\n position = {\n top: 0,\n left: 0\n } as DropdownPosition;\n data: any = [];\n}\n\nexport interface DropdownPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmSearch extends BaseDatasetComponent<WmSearchProps, WmSearchState, WmSearchStyles> {\n view: View = null as any;\n private prevDatavalue: any;\n private queryModel: any;\n private searchInputWidth: any;\n private isDefaultQuery: boolean = true;\n private dataProvider: DataProvider;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n private isFocused: boolean = false;\n private updateRequired: any;\n\n constructor(props: WmSearchProps) {\n super(props, DEFAULT_CLASS, new WmSearchProps(), new WmSearchState());\n this.dataProvider = new DataProvider();\n if (this.props.datavalue) {\n this.updateState({\n props: {\n query: this.props.datavalue\n }\n } as WmSearchState);\n }\n }\n\n computePosition = () => {\n return new Promise<void>((resolve) => {\n const position = {} as DropdownPosition;\n this.view.measure((x = 0, y = 0, width = 0, height = 0, px = 0, py = 0) => {\n position.left = px;\n position.top = py + height;\n this.updateState({ position: position } as WmSearchState, resolve);\n });\n });\n }\n\n clearSearch() {\n this.invokeEventCallback('onClear', [null, this]);\n this.hide();\n this.updateState({\n props: {\n query: ''\n },\n dataItems: this.state.dataItems ? this.state.dataItems.map((item: any) => {\n item.selected = false;\n return item;\n }) : []\n } as WmSearchState, () => {\n if (this.state.props.type === 'autocomplete') {\n this.updateFilteredData('');\n }\n });\n }\n\n updateFilteredData(queryText: string = '') {\n const props = this.state.props;\n const filterOptions = {\n query: queryText,\n props: props,\n entries: this.state.dataItems\n };\n let filteredData: Array<any> = [];\n if (props.minchars && queryText.length < props.minchars) {\n filteredData = [];\n } else if (props.type === 'search' && !queryText) {\n filteredData = [];\n } else {\n if (this.props.searchkey && this.updateRequired === undefined) {\n this.updateRequired = this.dataProvider.init(this);\n }\n // for service variables invoke the variable with params.\n if (this.props.searchkey && this.updateRequired && this.state.props.query !== queryText) {\n this.dataProvider.invokeVariable(this, queryText).then((response: any) => {\n if (response) {\n response = response.dataSet;\n if (isEmpty(response)) {\n filteredData = [];\n } else {\n if (isObject(response) && !isArray(response)) {\n response = [response];\n }\n this.setDataItems(response);\n }\n }\n }, () => {});\n return;\n }\n filteredData = this.dataProvider?.filter(filterOptions);\n }\n this.updateState({\n props: { result: filteredData?.map( (item: any) => item.dataObject), query: queryText },\n data: filteredData,\n } as WmSearchState);\n if (!this.state.isOpened && this.isFocused) {\n this.showPopover && this.showPopover();\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChange(value: any) {\n this.isDefaultQuery = false;\n const prevQuery = this.state.props.query;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateState({\n props: {result: [], query: value},\n data: []\n } as WmSearchState);\n } else {\n this.updateFilteredData(value);\n }\n if (value === '') {\n this.validate(value);\n this.updateState({\n props: {\n datavalue: '',\n },\n } as WmSearchState);\n if (value === prevQuery) {\n return;\n }\n }\n setTimeout(() => {\n if (this.props.invokeEvent) {\n this.props.invokeEvent('onChange', [undefined, this.proxy, value, prevQuery]);\n }\n this.invokeEventCallback('onChange', [ undefined, this.proxy, value, prevQuery ]);\n }, 300);\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.updateState({ props: { query: e.target.value } } as WmSearchState);\n }\n }\n\n onFocus() {\n this.isFocused = true;\n if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {\n this.cursor = this.state.props.query?.length || 0;\n this.updateFilteredData(this.state.props.query || '');\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n\n onBlur() {\n this.isFocused = false;\n this.validate(this.state.props.datavalue);\n if (!this.state.props.datavalue) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n public showPopover = () => {\n this.computePosition().then(() => {\n this.updateState({ isOpened: true } as WmSearchState);\n });\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmSearchStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n const modalContentSTyles = {\n width: this.searchInputWidth - 2 * (styles.modalContent.borderWidth || 0),\n left: (this.state.position.left || 0) + 2 * (styles.modalContent.borderWidth || 0) };\n o.modalStyle = {...styles.modal};\n o.contentStyle = {...styles.modalContent, ...this.state.position, ...modalContentSTyles};\n o.content = content;\n o.isModal = true;\n o.onClose = () => {\n this.hide = () => {};\n Keyboard.dismiss();\n if (this.state.isOpened) {\n this.setState({isOpened: false, modalOptions: {} as ModalOptions} as WmSearchState);\n }\n };\n this.hide = () => {\n modalService.hideModal(this.state.modalOptions);\n if (this.state.isOpened) {\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSearchState);\n }\n }\n return o;\n }\n\n searchIconPress() {\n this.isFocused = false;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateFilteredData(this.state.props.query);\n } else {\n this.onItemSelect(this.state.data[0]);\n }\n }\n\n onItemSelect(item: any) {\n this.isFocused = false;\n this.updateState({ props: {\n query: item.displayexp || item.displayfield\n }\n } as WmSearchState);\n this.validate(item.datafield);\n this.updateDatavalue(item.datafield);\n this.prevDatavalue = item.datafield;\n this.queryModel = item;\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onSelect', [null, this, item.datafield]);\n // @ts-ignore\n this.props.invokeEvent('onSubmit', [null, this]);\n } else {\n this.invokeEventCallback('onSelect', [null, this, item.datafield]);\n this.invokeEventCallback('onSubmit', [null, this]);\n }\n this.hide();\n }\n\n public renderSkeleton(props: WmSearchProps): React.ReactNode {\n \n const rootStyle = {\n ...this.styles.searchInputWrapper, \n ...this.styles.root, \n ...this.styles.text\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, rootStyle)\n }\n\n renderSearchBar() {\n const props = this.state.props;\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.props.query || '';\n return(\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View style={this.styles.root} ref={ref => {this.view = ref as View}} onLayout={() => {}}>\n <View style={this.styles.searchInputWrapper}>\n <TextInput style={[this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isOpened && this.state.dataItems?.length > 0? this.styles.focusedText : null]}\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.SEARCH, props)}\n placeholderTextColor={this.styles.placeholderText.color as any}\n placeholder={props.placeholder || 'Search'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n onChangeText={this.onChange.bind(this)}\n onChange={this.invokeChange.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onLayout={e => {this.searchInputWidth = e.nativeEvent.layout.width}}\n onBlur={this.onBlur.bind(this)}\n {...opts}>\n </TextInput>\n {props.showclear && this.state.props.query ? <WmButton onTap={this.clearSearch.bind(this)}\n id={this.getTestId('clear')}\n styles={this.styles.clearButton} iconclass={'wi wi-clear'}></WmButton> : null}\n </View>\n {props.showSearchIcon && props.type === 'search' ? <WmButton styles={this.styles.searchButton}\n id={this.getTestId('search')}\n iconclass={'wm-sl-l sl-search'} onTap={this.searchIconPress.bind(this)}></WmButton> : null}\n </View>\n );\n }\n\n reset() {\n if (this.state.props.query) {\n this.updateState({\n props: {\n query: ''\n }\n } as WmSearchState);\n }\n }\n\n renderSearchItem(item: any, index: number) {\n const props = this.state.props;\n const imageStyles = { root: {height:props.imagewidth, width:props.imagewidth}}\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item)} {...this.getTestProps(`action${index}`)}>\n <View style={this.styles.searchItem}>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : (<>\n <WmPicture id={this.getTestId(`picture${index}`)} styles={imageStyles} name={props.name + '_image'} picturesource={item.imgSrc}></WmPicture>\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.searchItemText}>{item.displayexp || item.displayfield}</Text>\n </>)}\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n this.updateState({ props: {\n query: selectedItem ? (selectedItem.displayexp || selectedItem.displayfield) : ''\n }\n } as WmSearchState);\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isFocused && this.state.dataItems.length && this.updateFilteredData(this.state.props.query);\n this.updateDefaultQueryModel();\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n this.updateState({\n props: {\n dataset: $new\n }\n } as WmSearchState);\n }\n break;\n }\n super.onPropertyChange(name, $new, $old);\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmSearchState);\n }\n\n renderWidget(props: WmSearchProps) {\n const result = this.state.data;\n return (\n <View>\n {this.renderSearchBar()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={{width: '100%', maxHeight: 200}} contentContainerStyle={this.styles.dropDownContent}>\n <AssetProvider value={this.loadAsset}>\n {result && result.map((item: any, index: any) => (\n <View key={item.key}>\n {\n (!props.limit) || (props.limit && index+1 <= props.limit) ?\n this.renderSearchItem(item, index)\n : null\n }\n {\n index === result.length - 1 ?\n <WmAnchor caption={props.datacompletemsg} styles={this.styles.dataCompleteItem}></WmAnchor> : null\n }\n </View>\n ))}\n </AssetProvider>\n </ScrollView>\n ), this.styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>\n\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AACxF,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAErC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,aAAa,QAAmC,8CAA8C;AACvG,SAASC,YAAY,QAAQ,uEAAuE;AACpG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,WAAW;AAC3D,SAASC,aAAa,QAAQ,+CAA+C;AAC7E,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,OAAO,MAAMC,aAAa,SAASX,gBAAgB,CAAgB;EAAAY,YAAA,GAAAC,IAAA;IAAA,SAAAA,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7M,KAAA,CAAAiJ,aAAA,CAACxH,aAAa;QAACgE,KAAK,EAAE,IAAI,CAACqH;MAAU,GACpC9H,MAAM,IAAIA,MAAM,CAACtB,GAAG,CAAC,CAACC,IAAS,EAAEuH,KAAU,kBAC1ClL,KAAA,CAAAiJ,aAAA,CAAC5I,IAAI;QAAC0M,GAAG,EAAEpJ,IAAI,CAACoJ;MAAI,GAEf,CAAC7K,KAAK,CAAC8K,KAAK,IAAM9K,KAAK,CAAC8K,KAAK,IAAI9B,KAAK,GAAC,CAAC,IAAIhJ,KAAK,CAAC8K,KAAM,GACvD,IAAI,CAAC/B,gBAAgB,CAACtH,IAAI,EAAEuH,KAAK,CAAC,GAChC,IAAI,EAGRA,KAAK,KAAKlG,MAAM,CAACX,MAAM,GAAG,CAAC,gBAC3BrE,KAAA,CAAAiJ,aAAA,CAAChI,QAAQ;QAACgM,OAAO,EAAE/K,KAAK,CAACgL,eAAgB;QAACpG,MAAM,EAAE,IAAI,CAACA,MAAM,CAACqG;MAAiB,CAAW,CAAC,GAAG,IAE5F,CACP,CACc,CACP,CAAC,EACZ,IAAI,CAACrG,MAAM,EAAEC,YAAY,CAAC,CAAC;MAC9B,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EAGX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","Keyboard","Platform","Text","TextInput","View","ScrollView","find","isNull","WmSearchProps","DEFAULT_CLASS","ModalConsumer","DataProvider","AccessibilityWidgetType","getAccessibilityProps","BaseDatasetComponent","BaseDatasetState","WmAnchor","WmPicture","Tappable","WmButton","get","isArray","isEmpty","isObject","AssetProvider","createSkeleton","WmSearchState","constructor","args","_defineProperty","top","left","WmSearch","props","Promise","resolve","position","view","measure","x","y","width","height","px","py","updateState","computePosition","then","isOpened","dataProvider","datavalue","query","clearSearch","invokeEventCallback","hide","dataItems","state","map","item","selected","type","updateFilteredData","queryText","_filteredData","filterOptions","entries","filteredData","minchars","length","_this$dataProvider","searchkey","updateRequired","undefined","init","invokeVariable","response","dataSet","setDataItems","filter","result","dataObject","data","isFocused","showPopover","focus","_this$widgetRef","widgetRef","onChange","value","isDefaultQuery","prevQuery","searchon","validate","setTimeout","invokeEvent","proxy","invokeChange","e","OS","cursor","target","selectionStart","onFocus","disabled","_this$state$props$que","onBlur","triggerValidation","prepareModalOptions","content","styles","modalService","o","modalOptions","modalContentSTyles","searchInputWidth","modalContent","borderWidth","modalStyle","modal","contentStyle","isModal","onClose","dismiss","setState","hideModal","searchIconPress","onItemSelect","displayexp","displayfield","datafield","updateDatavalue","prevDatavalue","queryModel","renderSkeleton","rootStyle","searchInputWrapper","root","text","theme","skeleton","renderSearchBar","_this$state$dataItems","opts","valueExpr","createElement","style","ref","onLayout","_extends","isValid","invalid","focusedText","selectionEnd","getTestPropsForInput","SEARCH","placeholderTextColor","placeholderText","color","placeholder","autoFocus","autofocus","editable","readonly","onChangeText","bind","nativeEvent","layout","showclear","onTap","id","getTestId","clearButton","iconclass","showSearchIcon","searchButton","reset","renderSearchItem","index","imageStyles","imagewidth","getTestProps","searchItem","template","renderitempartial","Fragment","name","picturesource","imgSrc","getTestPropsForLabel","searchItemText","updateDefaultQueryModel","selectedItem","onDataItemsUpdate","componentDidMount","onPropertyChange","$new","$old","dataset","setTemplate","partialName","renderWidget","showModal","maxHeight","contentContainerStyle","dropDownContent","loadAsset","key","limit","caption","datacompletemsg","dataCompleteItem"],"sources":["search.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Keyboard, Platform, Text, TextInput, View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, isNull } from 'lodash';\n\nimport WmSearchProps from './search.props';\nimport { DEFAULT_CLASS, WmSearchStyles } from './search.styles';\nimport { ModalConsumer, ModalOptions, ModalService} from \"@wavemaker/app-rn-runtime/core/modal.service\";\nimport { DataProvider } from '@wavemaker/app-rn-runtime/components/basic/search/local-data-provider';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \n\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmAnchor from '@wavemaker/app-rn-runtime/components/basic/anchor/anchor.component';\nimport WmPicture from '@wavemaker/app-rn-runtime/components/basic/picture/picture.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { get, isArray, isEmpty, isObject } from \"lodash-es\";\nimport { AssetProvider } from '@wavemaker/app-rn-runtime/core/asset.provider';\nimport { createSkeleton } from '../skeleton/skeleton.component';\n\nexport class WmSearchState extends BaseDatasetState<WmSearchProps> {\n isOpened: boolean = false;\n modalOptions = {} as ModalOptions;\n template: string = \"\";\n position = {\n top: 0,\n left: 0\n } as DropdownPosition;\n data: any = [];\n}\n\nexport interface DropdownPosition {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n}\n\nexport default class WmSearch extends BaseDatasetComponent<WmSearchProps, WmSearchState, WmSearchStyles> {\n view: View = null as any;\n private prevDatavalue: any;\n private queryModel: any;\n private searchInputWidth: any;\n private isDefaultQuery: boolean = true;\n private dataProvider: DataProvider;\n public widgetRef: TextInput | null = null;\n private cursor: any = 0;\n private isFocused: boolean = false;\n private updateRequired: any;\n\n constructor(props: WmSearchProps) {\n super(props, DEFAULT_CLASS, new WmSearchProps(), new WmSearchState());\n this.dataProvider = new DataProvider();\n if (this.props.datavalue) {\n this.updateState({\n props: {\n query: this.props.datavalue\n }\n } as WmSearchState);\n }\n }\n\n computePosition = () => {\n return new Promise<void>((resolve) => {\n const position = {} as DropdownPosition;\n this.view.measure((x = 0, y = 0, width = 0, height = 0, px = 0, py = 0) => {\n position.left = px;\n position.top = py + height;\n this.updateState({ position: position } as WmSearchState, resolve);\n });\n });\n }\n\n clearSearch() {\n this.invokeEventCallback('onClear', [null, this]);\n this.hide();\n this.updateState({\n props: {\n query: ''\n },\n dataItems: this.state.dataItems ? this.state.dataItems.map((item: any) => {\n item.selected = false;\n return item;\n }) : []\n } as WmSearchState, () => {\n if (this.state.props.type === 'autocomplete') {\n this.updateFilteredData('');\n }\n });\n }\n\n updateFilteredData(queryText: string = '') {\n const props = this.state.props;\n const filterOptions = {\n query: queryText,\n props: props,\n entries: this.state.dataItems\n };\n let filteredData: Array<any> = [];\n if (props.minchars && queryText.length < props.minchars) {\n filteredData = [];\n } else if (props.type === 'search' && !queryText) {\n filteredData = [];\n } else {\n if (this.props.searchkey && this.updateRequired === undefined) {\n this.updateRequired = this.dataProvider.init(this);\n }\n // for service variables invoke the variable with params.\n if (this.props.searchkey && this.updateRequired && this.state.props.query !== queryText) {\n this.dataProvider.invokeVariable(this, queryText).then((response: any) => {\n if (response) {\n response = response.dataSet;\n if (isEmpty(response)) {\n filteredData = [];\n } else {\n if (isObject(response) && !isArray(response)) {\n response = [response];\n }\n this.setDataItems(response);\n }\n }\n }, () => {});\n return;\n }\n filteredData = this.dataProvider?.filter(filterOptions);\n }\n this.updateState({\n props: { result: filteredData?.map( (item: any) => item.dataObject), query: queryText },\n data: filteredData,\n } as WmSearchState);\n if (!this.state.isOpened && this.isFocused) {\n this.showPopover && this.showPopover();\n }\n }\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n onChange(value: any) {\n this.isDefaultQuery = false;\n const prevQuery = this.state.props.query;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateState({\n props: {result: [], query: value},\n data: []\n } as WmSearchState);\n } else {\n this.updateFilteredData(value);\n }\n if (value === '') {\n this.validate(value);\n this.updateState({\n props: {\n datavalue: '',\n },\n } as WmSearchState);\n if (value === prevQuery) {\n return;\n }\n }\n setTimeout(() => {\n if (this.props.invokeEvent) {\n this.props.invokeEvent('onChange', [undefined, this.proxy, value, prevQuery]);\n }\n this.invokeEventCallback('onChange', [ undefined, this.proxy, value, prevQuery ]);\n }, 300);\n }\n\n invokeChange(e: any) {\n if (Platform.OS === 'web') {\n this.cursor = e.target.selectionStart;\n this.updateState({ props: { query: e.target.value } } as WmSearchState);\n }\n }\n\n onFocus() {\n this.isFocused = true;\n if (!this.state.props.disabled && this.state.props.type === 'autocomplete') {\n this.cursor = this.state.props.query?.length || 0;\n this.updateFilteredData(this.state.props.query || '');\n }\n this.invokeEventCallback('onFocus', [null, this]);\n }\n\n onBlur() {\n this.isFocused = false;\n this.validate(this.state.props.datavalue);\n if (!this.state.props.datavalue) {\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n })\n }\n this.invokeEventCallback('onBlur', [null, this]);\n }\n\n public showPopover = () => {\n this.computePosition().then(() => {\n this.updateState({ isOpened: true } as WmSearchState);\n });\n };\n\n public hide = () => {};\n\n prepareModalOptions(content: React.ReactNode, styles: WmSearchStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n const modalContentSTyles = {\n width: this.searchInputWidth - 2 * (styles.modalContent.borderWidth || 0),\n left: (this.state.position.left || 0) + 2 * (styles.modalContent.borderWidth || 0) };\n o.modalStyle = {...styles.modal};\n o.contentStyle = {...styles.modalContent, ...this.state.position, ...modalContentSTyles};\n o.content = content;\n o.isModal = true;\n o.onClose = () => {\n this.hide = () => {};\n Keyboard.dismiss();\n if (this.state.isOpened) {\n this.setState({isOpened: false, modalOptions: {} as ModalOptions} as WmSearchState);\n }\n };\n this.hide = () => {\n modalService.hideModal(this.state.modalOptions);\n if (this.state.isOpened) {\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSearchState);\n }\n }\n return o;\n }\n\n searchIconPress() {\n this.isFocused = false;\n if (this.state.props.searchon === 'onsearchiconclick') {\n this.updateFilteredData(this.state.props.query);\n } else {\n this.onItemSelect(this.state.data[0]);\n }\n }\n\n onItemSelect(item: any) {\n this.isFocused = false;\n this.updateState({ props: {\n query: item.displayexp || item.displayfield\n }\n } as WmSearchState);\n this.validate(item.datafield);\n this.updateDatavalue(item.datafield);\n this.prevDatavalue = item.datafield;\n this.queryModel = item;\n if (get(this.props, 'formfield')) {\n // @ts-ignore\n this.props.invokeEvent('onSelect', [null, this, item.datafield]);\n // @ts-ignore\n this.props.invokeEvent('onSubmit', [null, this]);\n } else {\n this.invokeEventCallback('onSelect', [null, this, item.datafield]);\n this.invokeEventCallback('onSubmit', [null, this]);\n }\n this.hide();\n }\n\n public renderSkeleton(props: WmSearchProps): React.ReactNode {\n \n const rootStyle = {\n ...this.styles.searchInputWrapper, \n ...this.styles.root, \n ...this.styles.text\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, rootStyle)\n }\n\n renderSearchBar() {\n const props = this.state.props;\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.props.query || '';\n return(\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View style={this.styles.root} ref={ref => {this.view = ref as View}} onLayout={() => {}}>\n <View style={this.styles.searchInputWrapper}>\n <TextInput style={[this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isOpened && this.state.dataItems?.length > 0? this.styles.focusedText : null]}\n ref={ref => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.SEARCH, props)}\n placeholderTextColor={this.styles.placeholderText.color as any}\n placeholder={props.placeholder || 'Search'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n onChangeText={this.onChange.bind(this)}\n onChange={this.invokeChange.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onLayout={e => {this.searchInputWidth = e.nativeEvent.layout.width}}\n onBlur={this.onBlur.bind(this)}\n {...opts}>\n </TextInput>\n {props.showclear && this.state.props.query ? <WmButton onTap={this.clearSearch.bind(this)}\n id={this.getTestId('clear')}\n styles={this.styles.clearButton} iconclass={'wi wi-clear'}></WmButton> : null}\n </View>\n {props.showSearchIcon && props.type === 'search' ? <WmButton styles={this.styles.searchButton}\n id={this.getTestId('search')}\n iconclass={props.iconclass} onTap={this.searchIconPress.bind(this)}></WmButton> : null}\n </View>\n );\n }\n\n reset() {\n if (this.state.props.query) {\n this.updateState({\n props: {\n query: ''\n }\n } as WmSearchState);\n }\n }\n\n renderSearchItem(item: any, index: number) {\n const props = this.state.props;\n const imageStyles = { root: {height:props.imagewidth, width:props.imagewidth}}\n return (\n <Tappable onTap={this.onItemSelect.bind(this, item)} {...this.getTestProps(`action${index}`)}>\n <View style={this.styles.searchItem}>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : (<>\n <WmPicture id={this.getTestId(`picture${index}`)} styles={imageStyles} name={props.name + '_image'} picturesource={item.imgSrc}></WmPicture>\n <Text {...this.getTestPropsForLabel(index + '')} style={this.styles.searchItemText}>{item.displayexp || item.displayfield}</Text>\n </>)}\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultQuery) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n this.updateState({ props: {\n query: selectedItem ? (selectedItem.displayexp || selectedItem.displayfield) : ''\n }\n } as WmSearchState);\n }\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.isFocused && this.state.dataItems.length && this.updateFilteredData(this.state.props.query);\n this.updateDefaultQueryModel();\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onPropertyChange(name: string, $new: any, $old: any) {\n switch (name) {\n case 'dataset':\n if (!isEmpty($new) && isObject($new) && !isArray($new)) {\n $new = [$new];\n this.updateState({\n props: {\n dataset: $new\n }\n } as WmSearchState);\n }\n break;\n }\n super.onPropertyChange(name, $new, $old);\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName} as WmSearchState);\n }\n\n renderWidget(props: WmSearchProps) {\n const result = this.state.data;\n return (\n <View>\n {this.renderSearchBar()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n modalService.showModal(this.prepareModalOptions((\n <ScrollView style={{width: '100%', maxHeight: 200}} contentContainerStyle={this.styles.dropDownContent}>\n <AssetProvider value={this.loadAsset}>\n {result && result.map((item: any, index: any) => (\n <View key={item.key}>\n {\n (!props.limit) || (props.limit && index+1 <= props.limit) ?\n this.renderSearchItem(item, index)\n : null\n }\n {\n index === result.length - 1 ?\n <WmAnchor caption={props.datacompletemsg} styles={this.styles.dataCompleteItem}></WmAnchor> : null\n }\n </View>\n ))}\n </AssetProvider>\n </ScrollView>\n ), this.styles, modalService));\n return null;\n }}\n </ModalConsumer>) : null}\n </View>\n\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AACxF,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,MAAM,QAAQ,QAAQ;AAErC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SAASC,aAAa,QAAmC,8CAA8C;AACvG,SAASC,YAAY,QAAQ,uEAAuE;AACpG,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAE7G,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,OAAOC,SAAS,MAAM,sEAAsE;AAC5F,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,OAAOC,QAAQ,MAAM,oEAAoE;AACzF,SAASC,GAAG,EAAEC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,WAAW;AAC3D,SAASC,aAAa,QAAQ,+CAA+C;AAC7E,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,OAAO,MAAMC,aAAa,SAASX,gB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AE;QAACC,qBAAqB,EAAE,IAAI,CAAC9F,MAAM,CAAC+F;MAAgB,gBACnG7M,KAAA,CAAAiJ,aAAA,CAACxH,aAAa;QAACgE,KAAK,EAAE,IAAI,CAACqH;MAAU,GACpC9H,MAAM,IAAIA,MAAM,CAACtB,GAAG,CAAC,CAACC,IAAS,EAAEuH,KAAU,kBAC1ClL,KAAA,CAAAiJ,aAAA,CAAC5I,IAAI;QAAC0M,GAAG,EAAEpJ,IAAI,CAACoJ;MAAI,GAEf,CAAC7K,KAAK,CAAC8K,KAAK,IAAM9K,KAAK,CAAC8K,KAAK,IAAI9B,KAAK,GAAC,CAAC,IAAIhJ,KAAK,CAAC8K,KAAM,GACvD,IAAI,CAAC/B,gBAAgB,CAACtH,IAAI,EAAEuH,KAAK,CAAC,GAChC,IAAI,EAGRA,KAAK,KAAKlG,MAAM,CAACX,MAAM,GAAG,CAAC,gBAC3BrE,KAAA,CAAAiJ,aAAA,CAAChI,QAAQ;QAACgM,OAAO,EAAE/K,KAAK,CAACgL,eAAgB;QAACpG,MAAM,EAAE,IAAI,CAACA,MAAM,CAACqG;MAAiB,CAAW,CAAC,GAAG,IAE5F,CACP,CACc,CACP,CAAC,EACZ,IAAI,CAACrG,MAAM,EAAEC,YAAY,CAAC,CAAC;MAC9B,OAAO,IAAI;IACb,CACa,CAAC,GAAI,IAClB,CAAC;EAGX;AACF","ignoreList":[]}
@@ -30,6 +30,7 @@ export default class WmSearchProps extends BaseDatasetProps {
30
30
  _defineProperty(this, "renderitempartial", void 0);
31
31
  _defineProperty(this, "skeletonheight", null);
32
32
  _defineProperty(this, "skeletonwidth", null);
33
+ _defineProperty(this, "iconclass", 'wm-sl-l sl-search');
33
34
  }
34
35
  }
35
36
  //# sourceMappingURL=search.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseDatasetProps","WmSearchProps","constructor","args","_defineProperty","undefined"],"sources":["search.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\nimport {BaseComponent} from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { AccessibilityRole } from 'react-native';\n\nexport default class WmSearchProps extends BaseDatasetProps {\n autofocus: boolean = false;\n query?: string = '';\n searchkey?: any;\n type: 'search' | 'autocomplete' = 'search';\n datacompletemsg?: string = 'No more data to load';\n placeholder?: string = 'Search';\n limit?: number = null as any;\n minchars?: number = null as any;\n imagewidth?: any = 32;\n imageheight?: any = 32;\n searchon?: string = 'typing';\n onSubmit?: any;\n onChange?: Function = null as any;\n result?: any;\n showclear: boolean = false;\n showSearchIcon: boolean = true; // internal property\n invokeEvent?: Function;\n formFieldInstance?: BaseComponent<any, any, any>;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'search';\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAIvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACrC,KAAK;IAAAA,eAAA,gBACT,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEe,QAAQ;IAAAA,eAAA,0BACf,sBAAsB;IAAAA,eAAA,sBAC1B,QAAQ;IAAAA,eAAA,gBACd,IAAI;IAAAA,eAAA,mBACD,IAAI;IAAAA,eAAA,qBACL,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA,mBACF,QAAQ;IAAAA,eAAA;IAAAA,eAAA,mBAEN,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEL,KAAK;IAAAA,eAAA,yBACA,IAAI;IAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGFC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,QAAQ;IAAAA,eAAA;IAAAA,eAAA,yBAEtB,IAAI;IAAAA,eAAA,wBACL,IAAI;EAAA;AAC/B","ignoreList":[]}
1
+ {"version":3,"names":["BaseDatasetProps","WmSearchProps","constructor","args","_defineProperty","undefined"],"sources":["search.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\nimport {BaseComponent} from \"@wavemaker/app-rn-runtime/core/base.component\";\nimport { AccessibilityRole } from 'react-native';\n\nexport default class WmSearchProps extends BaseDatasetProps {\n autofocus: boolean = false;\n query?: string = '';\n searchkey?: any;\n type: 'search' | 'autocomplete' = 'search';\n datacompletemsg?: string = 'No more data to load';\n placeholder?: string = 'Search';\n limit?: number = null as any;\n minchars?: number = null as any;\n imagewidth?: any = 32;\n imageheight?: any = 32;\n searchon?: string = 'typing';\n onSubmit?: any;\n onChange?: Function = null as any;\n result?: any;\n showclear: boolean = false;\n showSearchIcon: boolean = true; // internal property\n invokeEvent?: Function;\n formFieldInstance?: BaseComponent<any, any, any>;\n accessibilitylabel?: string = undefined;\n hint?: string = undefined;\n accessibilityrole?: AccessibilityRole = 'search';\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n iconclass?: string = 'wm-sl-l sl-search';\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAIvG,eAAe,MAAMC,aAAa,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACrC,KAAK;IAAAA,eAAA,gBACT,EAAE;IAAAA,eAAA;IAAAA,eAAA,eAEe,QAAQ;IAAAA,eAAA,0BACf,sBAAsB;IAAAA,eAAA,sBAC1B,QAAQ;IAAAA,eAAA,gBACd,IAAI;IAAAA,eAAA,mBACD,IAAI;IAAAA,eAAA,qBACL,EAAE;IAAAA,eAAA,sBACD,EAAE;IAAAA,eAAA,mBACF,QAAQ;IAAAA,eAAA;IAAAA,eAAA,mBAEN,IAAI;IAAAA,eAAA;IAAAA,eAAA,oBAEL,KAAK;IAAAA,eAAA,yBACA,IAAI;IAAE;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,6BAGFC,SAAS;IAAAD,eAAA,eACvBC,SAAS;IAAAD,eAAA,4BACe,QAAQ;IAAAA,eAAA;IAAAA,eAAA,yBAEtB,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,oBACR,mBAAmB;EAAA;AAC1C","ignoreList":[]}
@@ -80,9 +80,11 @@ export default class WmSkeleton extends BaseComponent {
80
80
  });
81
81
  }
82
82
  componentDidMount() {
83
+ super.componentDidMount();
83
84
  this.animationRunner.start();
84
85
  }
85
86
  componentWillUnmount() {
87
+ super.componentWillUnmount();
86
88
  this.animationRunner.stop();
87
89
  }
88
90
  renderWidget(props) {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Animated","Easing","StyleSheet","LinearGradient","BaseComponent","BaseComponentState","WmSkeletonProps","DEFAULT_CLASS","isUndefined","WmSkeletonState","constructor","args","_defineProperty","left","top","width","height","AnimationRunner","Value","run","counter","timing","animationValue","duration","time","speed","toValue","useNativeDriver","easing","linear","start","event","finished","setValue","stop","Math","max","getValue","WmSkeleton","props","_this$skeletonloaderR","skeletonloaderRef","measure","x","y","px","py","layout","setState","animate","componentDidMount","animationRunner","componentWillUnmount","renderWidget","_this$styles$gradient","_this$styles$gradient2","_this$styles$gradient3","outpuRange","state","deg","translateX","interpolate","inputRange","outputRange","createElement","ref","onLayout","onLayoutChange","style","styles","root","children","absoluteFill","animatedView","transform","rotate","end","colors","gradientForeground","backgroundColor","toString","gradient","locations","createSkeleton","theme","skeletonStyles","wrapper","addStyleProp","propName","mergeStyle"],"sources":["skeleton.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Animated, Easing, StyleSheet, LayoutChangeEvent, ColorValue, ViewStyle } from 'react-native';\nimport { LinearGradient } from 'expo-linear-gradient';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Theme } from '@wavemaker/app-rn-runtime/styles/theme';\n\nimport WmSkeletonProps from './skeleton.props';\nimport { DEFAULT_CLASS, WmSkeletonStyles } from './skeleton.styles';\nimport { isUndefined } from 'lodash-es';\n\nexport class WmSkeletonState extends BaseComponentState<WmSkeletonProps> {\n layout = {\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n };\n animate = false;\n}\n\nclass AnimationRunner {\n private time: number = 1000;\n public speed = 1;\n private counter = 0;\n private animationValue = new Animated.Value(0.2);\n\n public run() {\n if (this.counter == 0) {\n return;\n }\n Animated.timing(this.animationValue, {\n duration: this.time * this.speed,\n toValue: 1,\n useNativeDriver: true,\n easing: Easing.linear,\n }).start((event) => {\n if (event.finished) {\n this.animationValue.setValue(0)\n this.run();\n }\n });\n }\n\n public start() {\n this.counter++;\n if (this.counter == 1) {\n this.run();\n }\n }\n\n public stop() {\n this.counter = Math.max(--this.counter, 0);\n }\n\n public getValue() {\n return this.animationValue;\n }\n}\n\nexport default class WmSkeleton extends BaseComponent<WmSkeletonProps, WmSkeletonState, WmSkeletonStyles> {\n\n private skeletonloaderRef: any = null;\n private animationRunner = new AnimationRunner();\n\n constructor(props: WmSkeletonProps) {\n super(props, DEFAULT_CLASS, new WmSkeletonProps(), new WmSkeletonState());\n }\n\n componentDidMount(): void {\n this.animationRunner.start();\n }\n\n componentWillUnmount(): void {\n this.animationRunner.stop();\n }\n\n onLayoutChange = (event: LayoutChangeEvent) => {\n this.skeletonloaderRef?.measure((x: number, y: number, width: number, height: number, px: number, py: number) => {\n let layout = {\n left: px,\n top: py,\n width: width,\n height: height,\n };\n this.setState({\n layout: {\n ...layout as any\n }, animate: true\n });\n });\n }\n\n renderWidget(props: WmSkeletonProps) {\n let outpuRange = [-this.state.layout.width-this.state.layout.left, this.state.layout.width + this.state.layout.height];\n let deg = -20;\n let translateX = this.animationRunner.getValue().interpolate({\n inputRange: [0, 1],\n outputRange: [-50, 400]\n });\n return (\n <View ref={(ref) => { this.skeletonloaderRef = ref; }} onLayout={this.onLayoutChange}\n style={this.styles.root} >\n {props.children}\n {this.state.animate ?\n <Animated.View\n style={[\n StyleSheet.absoluteFill,\n this.styles.animatedView,\n { \n transform: [\n { translateX },\n { rotate: deg + 'deg' }\n ]\n }]}>\n <LinearGradient\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n colors={[this.styles.gradientForeground.backgroundColor?.toString() as string,\n this.styles.gradient.backgroundColor?.toString() as string,\n this.styles.gradientForeground.backgroundColor?.toString() as string]}\n locations={[0, 0.5, 1]}\n style={[this.styles.gradient, {backgroundColor: this.styles.animatedView.backgroundColor}]} />\n </Animated.View> : null}\n </View>);\n }\n}\n\nexport const createSkeleton = (theme: Theme, skeletonStyles: WmSkeletonStyles, wrapper: ViewStyle, children?: React.ReactNode) => {\n const style = {} as ViewStyle;\n const addStyleProp = (propName: any) => {\n if (!isUndefined((wrapper as any)[propName])) {\n (style as any)[propName] = (wrapper as any)[propName];\n }\n };\n addStyleProp('width');\n addStyleProp('height');\n addStyleProp('borderRadius');\n addStyleProp('borderRadius');\n addStyleProp('marginTop');\n addStyleProp('marginBottom');\n addStyleProp('marginLeft');\n addStyleProp('marginRight');\n return(<WmSkeleton styles={theme.mergeStyle(skeletonStyles, {root: style})} children={children}/>);\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAkD,cAAc;AAC3G,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SAASC,WAAW,QAAQ,WAAW;AAEvC,OAAO,MAAMC,eAAe,SAASJ,kBAAkB,CAAkB;EAAAK,YAAA,GAAAC,IAAA;IAAA,SAAAA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":["React","View","Animated","Easing","StyleSheet","LinearGradient","BaseComponent","BaseComponentState","WmSkeletonProps","DEFAULT_CLASS","isUndefined","WmSkeletonState","constructor","args","_defineProperty","left","top","width","height","AnimationRunner","Value","run","counter","timing","animationValue","duration","time","speed","toValue","useNativeDriver","easing","linear","start","event","finished","setValue","stop","Math","max","getValue","WmSkeleton","props","_this$skeletonloaderR","skeletonloaderRef","measure","x","y","px","py","layout","setState","animate","componentDidMount","animationRunner","componentWillUnmount","renderWidget","_this$styles$gradient","_this$styles$gradient2","_this$styles$gradient3","outpuRange","state","deg","translateX","interpolate","inputRange","outputRange","createElement","ref","onLayout","onLayoutChange","style","styles","root","children","absoluteFill","animatedView","transform","rotate","end","colors","gradientForeground","backgroundColor","toString","gradient","locations","createSkeleton","theme","skeletonStyles","wrapper","addStyleProp","propName","mergeStyle"],"sources":["skeleton.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Animated, Easing, StyleSheet, LayoutChangeEvent, ColorValue, ViewStyle } from 'react-native';\nimport { LinearGradient } from 'expo-linear-gradient';\n\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { Theme } from '@wavemaker/app-rn-runtime/styles/theme';\n\nimport WmSkeletonProps from './skeleton.props';\nimport { DEFAULT_CLASS, WmSkeletonStyles } from './skeleton.styles';\nimport { isUndefined } from 'lodash-es';\n\nexport class WmSkeletonState extends BaseComponentState<WmSkeletonProps> {\n layout = {\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n };\n animate = false;\n}\n\nclass AnimationRunner {\n private time: number = 1000;\n public speed = 1;\n private counter = 0;\n private animationValue = new Animated.Value(0.2);\n\n public run() {\n if (this.counter == 0) {\n return;\n }\n Animated.timing(this.animationValue, {\n duration: this.time * this.speed,\n toValue: 1,\n useNativeDriver: true,\n easing: Easing.linear,\n }).start((event) => {\n if (event.finished) {\n this.animationValue.setValue(0)\n this.run();\n }\n });\n }\n\n public start() {\n this.counter++;\n if (this.counter == 1) {\n this.run();\n }\n }\n\n public stop() {\n this.counter = Math.max(--this.counter, 0);\n }\n\n public getValue() {\n return this.animationValue;\n }\n}\n\nexport default class WmSkeleton extends BaseComponent<WmSkeletonProps, WmSkeletonState, WmSkeletonStyles> {\n\n private skeletonloaderRef: any = null;\n private animationRunner = new AnimationRunner();\n\n constructor(props: WmSkeletonProps) {\n super(props, DEFAULT_CLASS, new WmSkeletonProps(), new WmSkeletonState());\n }\n\n componentDidMount(): void {\n super.componentDidMount();\n this.animationRunner.start();\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.animationRunner.stop();\n }\n\n onLayoutChange = (event: LayoutChangeEvent) => {\n this.skeletonloaderRef?.measure((x: number, y: number, width: number, height: number, px: number, py: number) => {\n let layout = {\n left: px,\n top: py,\n width: width,\n height: height,\n };\n this.setState({\n layout: {\n ...layout as any\n }, animate: true\n });\n });\n }\n\n renderWidget(props: WmSkeletonProps) {\n let outpuRange = [-this.state.layout.width-this.state.layout.left, this.state.layout.width + this.state.layout.height];\n let deg = -20;\n let translateX = this.animationRunner.getValue().interpolate({\n inputRange: [0, 1],\n outputRange: [-50, 400]\n });\n return (\n <View ref={(ref) => { this.skeletonloaderRef = ref; }} onLayout={this.onLayoutChange}\n style={this.styles.root} >\n {props.children}\n {this.state.animate ?\n <Animated.View\n style={[\n StyleSheet.absoluteFill,\n this.styles.animatedView,\n { \n transform: [\n { translateX },\n { rotate: deg + 'deg' }\n ]\n }]}>\n <LinearGradient\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n colors={[this.styles.gradientForeground.backgroundColor?.toString() as string,\n this.styles.gradient.backgroundColor?.toString() as string,\n this.styles.gradientForeground.backgroundColor?.toString() as string]}\n locations={[0, 0.5, 1]}\n style={[this.styles.gradient, {backgroundColor: this.styles.animatedView.backgroundColor}]} />\n </Animated.View> : null}\n </View>);\n }\n}\n\nexport const createSkeleton = (theme: Theme, skeletonStyles: WmSkeletonStyles, wrapper: ViewStyle, children?: React.ReactNode) => {\n const style = {} as ViewStyle;\n const addStyleProp = (propName: any) => {\n if (!isUndefined((wrapper as any)[propName])) {\n (style as any)[propName] = (wrapper as any)[propName];\n }\n };\n addStyleProp('width');\n addStyleProp('height');\n addStyleProp('borderRadius');\n addStyleProp('borderRadius');\n addStyleProp('marginTop');\n addStyleProp('marginBottom');\n addStyleProp('marginLeft');\n addStyleProp('marginRight');\n return(<WmSkeleton styles={theme.mergeStyle(skeletonStyles, {root: style})} children={children}/>);\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAkD,cAAc;AAC3G,SAASC,cAAc,QAAQ,sBAAsB;AAErD,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAGjG,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SAASC,WAAW,QAAQ,WAAW;AAEvC,OAAO,MAAMC,eAAe,SAASJ,kBAAkB,CAAkB;EAAAK,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,iBAC9D;MACPC,IAAI,EAAE,CAAC;MACPC,GAAG,EAAE,CAAC;MACNC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE;IACV,CAAC;IAAAJ,eAAA,kBACS,KAAK;EAAA;AACjB;AAEA,MAAMK,eAAe,CAAC;EAAAP,YAAA;IAAAE,eAAA,eACG,IAAI;IAAAA,eAAA,gBACZ,CAAC;IAAAA,eAAA,kBACE,CAAC;IAAAA,eAAA,yBACM,IAAIZ,QAAQ,CAACkB,KAAK,CAAC,GAAG,CAAC;EAAA;EAEzCC,GAAGA,CAAA,EAAG;IACX,IAAI,IAAI,CAACC,OAAO,IAAI,CAAC,EAAE;MACrB;IACF;IACApB,QAAQ,CAACqB,MAAM,CAAC,IAAI,CAACC,cAAc,EAAE;MACnCC,QAAQ,EAAE,IAAI,CAACC,IAAI,GA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ACC,KAAY,EAAEC,cAAgC,EAAEC,OAAkB,EAAEf,QAA0B,KAAK;EAChI,MAAMH,KAAK,GAAG,CAAC,CAAc;EAC7B,MAAMmB,YAAY,GAAIC,QAAa,IAAK;IACtC,IAAI,CAAChF,WAAW,CAAE8E,OAAO,CAASE,QAAQ,CAAC,CAAC,EAAE;MAC3CpB,KAAK,CAASoB,QAAQ,CAAC,GAAIF,OAAO,CAASE,QAAQ,CAAC;IACvD;EACF,CAAC;EACDD,YAAY,CAAC,OAAO,CAAC;EACrBA,YAAY,CAAC,QAAQ,CAAC;EACtBA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,WAAW,CAAC;EACzBA,YAAY,CAAC,cAAc,CAAC;EAC5BA,YAAY,CAAC,YAAY,CAAC;EAC1BA,YAAY,CAAC,aAAa,CAAC;EAC3B,oBAAOzF,KAAA,CAAAkE,aAAA,CAAC1B,UAAU;IAAC+B,MAAM,EAAEe,KAAK,CAACK,UAAU,CAACJ,cAAc,EAAE;MAACf,IAAI,EAAEF;IAAK,CAAC,CAAE;IAACG,QAAQ,EAAEA;EAAS,CAAC,CAAC;AACnG,CAAC","ignoreList":[]}
@@ -10,6 +10,7 @@ import WmVideoProps from './video.props';
10
10
  import { DEFAULT_CLASS } from './video.styles';
11
11
  import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
12
12
  import { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';
13
+ import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
13
14
  export class WmVideoState extends BaseComponentState {}
14
15
  export default class WmVideo extends BaseComponent {
15
16
  constructor(props) {
@@ -35,6 +36,11 @@ export default class WmVideo extends BaseComponent {
35
36
  }
36
37
  return resource;
37
38
  }
39
+ renderSkeleton(props) {
40
+ return createSkeleton(this.theme, this.styles.skeleton, {
41
+ ...this.styles.root
42
+ });
43
+ }
38
44
  renderWidget(props) {
39
45
  return /*#__PURE__*/React.createElement(View, {
40
46
  style: this.styles.root
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","ResizeMode","Video","BaseComponent","BaseComponentState","WmVideoProps","DEFAULT_CLASS","AccessibilityWidgetType","getAccessibilityProps","isFullPathUrl","WmVideoState","WmVideo","constructor","props","_defineProperty","status","console","log","isPlaying","error","getSource","path","resource","loadAsset","uri","renderWidget","createElement","style","styles","root","_background","_extends","VIDEO","ref","video","width","height","flex","shouldPlay","autoplay","onPlaybackStatusUpdate","handlePlaybackStatus","source","mp4format","webmformat","posterSource","videoposter","useNativeControls","controls","resizeMode","CONTAIN","isLooping","loop","isMuted","muted","testID","getTestId"],"sources":["video.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { ResizeMode, Video, AVPlaybackStatus } from 'expo-av';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmVideoProps from './video.props';\nimport { DEFAULT_CLASS, WmVideoStyles } from './video.styles';\nimport { isString } from 'lodash-es';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmVideoState extends BaseComponentState<WmVideoProps> {}\n\nexport default class WmVideo extends BaseComponent<WmVideoProps, WmVideoState, WmVideoStyles> {\n\n private video: Video | null = null as any;\n\n constructor(props: WmVideoProps) {\n super(props, DEFAULT_CLASS, new WmVideoProps(), new WmVideoState());\n }\n\n getSource(path: string) {\n if (!path) {\n return null;\n }\n const resource = this.loadAsset(path);\n if (isFullPathUrl(resource as string)) {\n return {\n uri: resource\n };\n }\n return resource;\n }\n\n handlePlaybackStatus = (status: AVPlaybackStatus) => {\n if ('isPlaying' in status && typeof status === 'object') {\n console.log(status.isPlaying? 'Playing' : 'Paused');\n } else if ('error' in status) {\n console.error(`Encountered a fatal error during playback: ${status.error}`);\n }\n };\n\n renderWidget(props: WmVideoProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <Video\n {...getAccessibilityProps(AccessibilityWidgetType.VIDEO, props)}\n ref={(video) => { this.video = video; }}\n style={{ width: '100%', height: '100%', flex: 1 }}\n shouldPlay={props.autoplay}\n onPlaybackStatusUpdate={this.handlePlaybackStatus}\n source={this.getSource(\n props.mp4format\n || props.webmformat) as any}\n posterSource={ this.getSource(props.videoposter) as any }\n useNativeControls={props.controls}\n resizeMode={ResizeMode.CONTAIN}\n isLooping={props.loop}\n isMuted={props.muted}\n testID={this.getTestId('video')}\n />\n </View>); \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AACzC,SAASC,UAAU,EAAEC,KAAK,QAA0B,SAAS;AAC7D,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAE7D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,aAAa,QAAQ,sCAAsC;AAEpE,OAAO,MAAMC,YAAY,SAASN,kBAAkB,CAAe;AAEnE,eAAe,MAAMO,OAAO,SAASR,aAAa,CAA4C;EAI5FS,WAAWA,CAACC,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAEP,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,EAAE,IAAIK,YAAY,CAAC,CAAC,CAAC;IAACI,eAAA,gBAHxC,IAAI;IAAAA,eAAA,+BAmBTC,MAAwB,IAAK;MACpD,IAAI,WAAW,IAAIA,MAAM,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;QACvDC,OAAO,CAACC,GAAG,CAACF,MAAM,CAACG,SAAS,GAAE,SAAS,GAAG,QAAQ,CAAC;MACrD,CAAC,MAAM,IAAI,OAAO,IAAIH,MAAM,EAAE;QAC5BC,OAAO,CAACG,KAA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MAAM,EAAE,IAAI,CAACC,SAAS,CAAC,OAAO;IAAE,EACjC,CACG,CAAC;EACX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","ResizeMode","Video","BaseComponent","BaseComponentState","WmVideoProps","DEFAULT_CLASS","AccessibilityWidgetType","getAccessibilityProps","isFullPathUrl","createSkeleton","WmVideoState","WmVideo","constructor","props","_defineProperty","status","console","log","isPlaying","error","getSource","path","resource","loadAsset","uri","renderSkeleton","theme","styles","skeleton","root","renderWidget","createElement","style","_background","_extends","VIDEO","ref","video","width","height","flex","shouldPlay","autoplay","onPlaybackStatusUpdate","handlePlaybackStatus","source","mp4format","webmformat","posterSource","videoposter","useNativeControls","controls","resizeMode","CONTAIN","isLooping","loop","isMuted","muted","testID","getTestId"],"sources":["video.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { ResizeMode, Video, AVPlaybackStatus } from 'expo-av';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmVideoProps from './video.props';\nimport { DEFAULT_CLASS, WmVideoStyles } from './video.styles';\nimport { isString } from 'lodash-es';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmVideoState extends BaseComponentState<WmVideoProps> {}\n\nexport default class WmVideo extends BaseComponent<WmVideoProps, WmVideoState, WmVideoStyles> {\n\n private video: Video | null = null as any;\n\n constructor(props: WmVideoProps) {\n super(props, DEFAULT_CLASS, new WmVideoProps(), new WmVideoState());\n }\n\n getSource(path: string) {\n if (!path) {\n return null;\n }\n const resource = this.loadAsset(path);\n if (isFullPathUrl(resource as string)) {\n return {\n uri: resource\n };\n }\n return resource;\n }\n\n handlePlaybackStatus = (status: AVPlaybackStatus) => {\n if ('isPlaying' in status && typeof status === 'object') {\n console.log(status.isPlaying? 'Playing' : 'Paused');\n } else if ('error' in status) {\n console.error(`Encountered a fatal error during playback: ${status.error}`);\n }\n };\n\n public renderSkeleton(props: WmVideoProps): React.ReactNode {\n return createSkeleton(this.theme, this.styles.skeleton , {\n ...this.styles.root\n });\n }\n\n renderWidget(props: WmVideoProps) {\n return (\n <View style={this.styles.root}>\n {this._background}\n <Video\n {...getAccessibilityProps(AccessibilityWidgetType.VIDEO, props)}\n ref={(video) => { this.video = video; }}\n style={{ width: '100%', height: '100%', flex: 1 }}\n shouldPlay={props.autoplay}\n onPlaybackStatusUpdate={this.handlePlaybackStatus}\n source={this.getSource(\n props.mp4format\n || props.webmformat) as any}\n posterSource={ this.getSource(props.videoposter) as any }\n useNativeControls={props.controls}\n resizeMode={ResizeMode.CONTAIN}\n isLooping={props.loop}\n isMuted={props.muted}\n testID={this.getTestId('video')}\n />\n </View>); \n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,QAAQ,cAAc;AACzC,SAASC,UAAU,EAAEC,KAAK,QAA0B,SAAS;AAC7D,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,YAAY,MAAM,eAAe;AACxC,SAASC,aAAa,QAAuB,gBAAgB;AAE7D,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,aAAa,QAAQ,sCAAsC;AACpE,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO,MAAMC,YAAY,SAASP,kBAAkB,CAAe;AAEnE,eAAe,MAAMQ,OAAO,SAAST,aAAa,CAA4C;EAI5FU,WAAWA,CAACC,KAAmB,EAAE;IAC/B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,YAAY,CAAC,CAAC,EAAE,IAAIM,YAAY,CAAC,CAAC,CAAC;IAACI,eAAA,gBAHxC,IAAI;IAAAA,eAAA,+BAmBTC,MAAwB,IAAK;MACpD,IA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C6B,QAAS;MAC3BC,sBAAsB,EAAE,IAAI,CAACC,oBAAqB;MAClDC,MAAM,EAAE,IAAI,CAACzB,SAAS,CACpBP,KAAK,CAACiC,SAAS,IACZjC,KAAK,CAACkC,UAAU,CAAS;MAC9BC,YAAY,EAAG,IAAI,CAAC5B,SAAS,CAACP,KAAK,CAACoC,WAAW,CAAU;MACzDC,iBAAiB,EAAErC,KAAK,CAACsC,QAAS;MAClCC,UAAU,EAAEpD,UAAU,CAACqD,OAAQ;MAC/BC,SAAS,EAAEzC,KAAK,CAAC0C,IAAK;MACtBC,OAAO,EAAE3C,KAAK,CAAC4C,KAAM;MACrBC,MAAM,EAAE,IAAI,CAACC,SAAS,CAAC,OAAO;IAAE,EACjC,CACG,CAAC;EACX;AACF","ignoreList":[]}
@@ -7,7 +7,13 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
7
7
  height: 300,
8
8
  width: "100%"
9
9
  },
10
- text: {}
10
+ text: {},
11
+ skeleton: {
12
+ root: {
13
+ height: 300,
14
+ width: "100%"
15
+ }
16
+ }
11
17
  });
12
18
  addStyle(DEFAULT_CLASS, '', defaultStyles);
13
19
  });
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","height","width","text"],"sources":["video.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport type WmVideoStyles = BaseStyles & {};\n\nexport const DEFAULT_CLASS = 'app-video';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmVideoStyles>({\n root: {\n height: 300,\n width : \"100%\"\n },\n text: {}\n });\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAIxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAGL,YAAY,CAAgB;IAC9CM,IAAI,EAAE;MACFC,MAAM,EAAE,GAAG;MACXC,KAAK,EAAG;IACZ,CAAC;IACDC,IAAI,EAAE,CAAC;EACX,CAAC,CAAC;EACFL,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","height","width","text","skeleton"],"sources":["video.styles.ts"],"sourcesContent":["import BASE_THEME from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../skeleton/skeleton.styles';\n\nexport type WmVideoStyles = BaseStyles & {\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-video';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles = defineStyles<WmVideoStyles>({\n root: {\n height: 300,\n width : \"100%\"\n },\n text: {},\n skeleton: {\n root: {\n height: 300,\n width : \"100%\" \n }\n } as any as WmSkeletonStyles\n });\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,wCAAwC;AAC/D,SAAqBC,YAAY,QAAQ,+CAA+C;AAOxF,OAAO,MAAMC,aAAa,GAAG,WAAW;AACxCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACnD,MAAMC,aAAa,GAAGL,YAAY,CAAgB;IAC9CM,IAAI,EAAE;MACFC,MAAM,EAAE,GAAG;MACXC,KAAK,EAAG;IACZ,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,QAAQ,EAAE;MACNJ,IAAI,EAAE;QACFC,MAAM,EAAE,GAAG;QACXC,KAAK,EAAG;MACZ;IACJ;EACJ,CAAC,CAAC;EACFJ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC9C,CAAC,CAAC","ignoreList":[]}
@@ -10,6 +10,7 @@ import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
10
10
  import { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';
11
11
  import { PartialHost, PartialHostState } from './partial-host.component';
12
12
  import { createSkeleton } from '../basic/skeleton/skeleton.component';
13
+ import { ScrollView } from 'react-native-gesture-handler';
13
14
  export class WmContainerState extends PartialHostState {
14
15
  constructor(...args) {
15
16
  super(...args);
@@ -65,8 +66,14 @@ export default class WmContainer extends PartialHost {
65
66
  }, this.getBackground(), /*#__PURE__*/React.createElement(Tappable, _extends({}, this.getTestPropsForAction(), {
66
67
  target: this,
67
68
  styles: dimensions
68
- }), /*#__PURE__*/React.createElement(View, {
69
+ }), !props.scrollable ? /*#__PURE__*/React.createElement(View, {
69
70
  style: [dimensions, this.styles.content]
71
+ }, this.renderContent(props)) : /*#__PURE__*/React.createElement(ScrollView, {
72
+ style: [dimensions, this.styles.content],
73
+ onScroll: event => {
74
+ this.notify('scroll', [event]);
75
+ },
76
+ scrollEventThrottle: 48
70
77
  }, this.renderContent(props))));
71
78
  }
72
79
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","createSkeleton","WmContainerState","constructor","args","_defineProperty","WmContainer","props","getBackground","_showSkeleton","_background","renderSkeleton","showskeletonchildren","_this$props","dimensions","width","styles","root","undefined","height","skeletonStyles","skeleton","text","theme","createElement","style","opacity","_extends","getTestPropsForAction","target","content","renderContent","renderWidget","entryanimation","animation","delay","animationdelay"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ColorValue, View, ViewStyle } from 'react-native';\n\nimport WmContainerProps from './container.props';\nimport { DEFAULT_CLASS, WmContainerStyles } from './container.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { PartialHost, PartialHostState } from './partial-host.component';\nimport { createSkeleton } from '../basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../basic/skeleton/skeleton.styles';\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n \n public renderSkeleton(props: WmContainerProps): React.ReactNode {\n if(!props.showskeletonchildren) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n }; \n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n\n </View>))\n }\n return null;\n }\n\n\n renderWidget(props: WmContainerProps) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n };\n\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n return (\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={styles}>\n {this.getBackground()}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"mappings":";;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ET;IAAO,GACvF,IAAI,CAACR,aAAa,CAAC,CAAC,eACrBf,KAAA,CAAA+B,aAAA,CAAC3B,QAAQ,EAAA8B,QAAA,KAAK,IAAI,CAACC,qBAAqB,CAAC,CAAC;MAAEC,MAAM,EAAE,IAAK;MAACb,MAAM,EAAEF;IAAW,iBACzErB,KAAA,CAAA+B,aAAA,CAAC9B,IAAI;MAAC+B,KAAK,EAAE,CAACX,UAAU,EAAgB,IAAI,CAACE,MAAM,CAACc,OAAO;IAAE,GAAE,IAAI,CAACC,aAAa,CAACxB,KAAK,CAAQ,CACzF,CACE,CAAC;EAEnB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","WmContainerProps","DEFAULT_CLASS","Tappable","Animatedview","PartialHost","PartialHostState","createSkeleton","ScrollView","WmContainerState","constructor","args","_defineProperty","WmContainer","props","getBackground","_showSkeleton","_background","renderSkeleton","showskeletonchildren","_this$props","dimensions","width","styles","root","undefined","height","skeletonStyles","skeleton","text","theme","createElement","style","opacity","_extends","getTestPropsForAction","target","content","renderContent","renderWidget","entryanimation","animation","delay","animationdelay","scrollable","onScroll","event","notify","scrollEventThrottle"],"sources":["container.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ColorValue, View, ViewStyle } from 'react-native';\n\nimport WmContainerProps from './container.props';\nimport { DEFAULT_CLASS, WmContainerStyles } from './container.styles';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport { Animatedview } from '@wavemaker/app-rn-runtime/components/basic/animatedview.component';\nimport { PartialHost, PartialHostState } from './partial-host.component';\nimport { createSkeleton } from '../basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../basic/skeleton/skeleton.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nexport class WmContainerState extends PartialHostState<WmContainerProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmContainer extends PartialHost<WmContainerProps, WmContainerState, WmContainerStyles> {\n constructor(props: WmContainerProps) {\n super(props, DEFAULT_CLASS, new WmContainerProps(), new WmContainerState());\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n \n public renderSkeleton(props: WmContainerProps): React.ReactNode {\n if(!props.showskeletonchildren) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n }; \n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View>\n </Tappable>\n\n </View>))\n }\n return null;\n }\n\n\n renderWidget(props: WmContainerProps) {\n const dimensions = {\n width: this.styles.root.width ? '100%' : undefined,\n height: this.styles.root.height ? '100%' : undefined\n };\n\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n return (\n <Animatedview entryanimation={props.animation} delay={props.animationdelay} style={styles}>\n {this.getBackground()}\n <Tappable {...this.getTestPropsForAction()} target={this} styles={dimensions}>\n {!props.scrollable ? <View style={[dimensions as ViewStyle, this.styles.content]}>{this.renderContent(props)}</View> : \n <ScrollView style={[dimensions as ViewStyle, this.styles.content]}\n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}>\n {this.renderContent(props)}\n </ScrollView>}\n </Tappable>\n </Animatedview>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAqBC,IAAI,QAAmB,cAAc;AAE1D,OAAOC,gBAAgB,MAAM,mBAAmB;AAChD,SAASC,aAAa,QAA2B,oBAAoB;AACrE,SAASC,QAAQ,QAAQ,mDAAmD;AAC5E,SAASC,YAAY,QAAQ,mEAAmE;AAChG,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,0BAA0B;AACxE,SAASC,cAAc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,CAAAgC,aAAA,CAAC/B,IAAI;MAACgC,KAAK,EAAE,CAACX,UAAU,EAAgB,IAAI,CAACE,MAAM,CAACc,OAAO;IAAE,GAAE,IAAI,CAACC,aAAa,CAACxB,KAAK,CAAQ,CAAC,gBACrHf,KAAA,CAAAgC,aAAA,CAACvB,UAAU;MAACwB,KAAK,EAAE,CAACX,UAAU,EAAgB,IAAI,CAACE,MAAM,CAACc,OAAO,CAAE;MACnEQ,QAAQ,EAAGC,KAAK,IAAK;QAAC,IAAI,CAACC,MAAM,CAAC,QAAQ,EAAE,CAACD,KAAK,CAAC,CAAC;MAAA,CAAE;MACtDE,mBAAmB,EAAE;IAAG,GACvB,IAAI,CAACV,aAAa,CAACxB,KAAK,CACf,CACJ,CACE,CAAC;EAEnB;AACF","ignoreList":[]}
@@ -8,6 +8,7 @@ export default class WmContainerProps extends PartialHostProps {
8
8
  _defineProperty(this, "animation", null);
9
9
  _defineProperty(this, "animationdelay", null);
10
10
  _defineProperty(this, "onLoad", void 0);
11
+ _defineProperty(this, "scrollable", false);
11
12
  }
12
13
  }
13
14
  //# sourceMappingURL=container.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PartialHostProps","WmContainerProps","constructor","args","_defineProperty"],"sources":["container.props.ts"],"sourcesContent":["import { PartialHostProps } from './partial-host.component';\n\nexport default class WmContainerProps extends PartialHostProps {\n animation?: string = null as any;\n animationdelay?: number = null as any;\n onLoad?: Function;\n}\n"],"mappings":";;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAE3D,eAAe,MAAMC,gBAAgB,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACxC,IAAI;IAAAA,eAAA,yBACC,IAAI;IAAAA,eAAA;EAAA;AAEhC","ignoreList":[]}
1
+ {"version":3,"names":["PartialHostProps","WmContainerProps","constructor","args","_defineProperty"],"sources":["container.props.ts"],"sourcesContent":["import { PartialHostProps } from './partial-host.component';\n\nexport default class WmContainerProps extends PartialHostProps {\n animation?: string = null as any;\n animationdelay?: number = null as any;\n onLoad?: Function;\n scrollable?: Boolean = false as any;\n}\n"],"mappings":";;;AAAA,SAASA,gBAAgB,QAAQ,0BAA0B;AAE3D,eAAe,MAAMC,gBAAgB,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACxC,IAAI;IAAAA,eAAA,yBACC,IAAI;IAAAA,eAAA;IAAAA,eAAA,qBAEP,KAAK;EAAA;AAC9B","ignoreList":[]}
@@ -10,6 +10,7 @@ export default class WmTabpaneProps extends BaseProps {
10
10
  _defineProperty(this, "title", 'Tab Title');
11
11
  _defineProperty(this, "renderPartial", void 0);
12
12
  _defineProperty(this, "isPartialLoaded", false);
13
+ _defineProperty(this, "invokeVariables", true);
13
14
  }
14
15
  }
15
16
  //# sourceMappingURL=tabpane.props.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BaseProps","WmTabpaneProps","constructor","args","_defineProperty"],"sources":["tabpane.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmTabpaneProps extends BaseProps {\n children?: any;\n paneicon?: string = null as any;\n title: string = 'Tab Title';\n renderPartial?: Function;\n isPartialLoaded? = false;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,mBAEhC,IAAI;IAAAA,eAAA,gBACR,WAAW;IAAAA,eAAA;IAAAA,eAAA,0BAER,KAAK;EAAA;AAC1B","ignoreList":[]}
1
+ {"version":3,"names":["BaseProps","WmTabpaneProps","constructor","args","_defineProperty"],"sources":["tabpane.props.ts"],"sourcesContent":["import { BaseProps } from '@wavemaker/app-rn-runtime/core/base.component';\n\nexport default class WmTabpaneProps extends BaseProps {\n children?: any;\n paneicon?: string = null as any;\n title: string = 'Tab Title';\n renderPartial?: Function;\n isPartialLoaded? = false;\n invokeVariables = true;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,cAAc,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,mBAEhC,IAAI;IAAAA,eAAA,gBACR,WAAW;IAAAA,eAAA;IAAAA,eAAA,0BAER,KAAK;IAAAA,eAAA,0BACN,IAAI;EAAA;AACxB","ignoreList":[]}
@@ -173,7 +173,9 @@ export default class WmTabs extends BaseComponent {
173
173
  alignSelf: 'flex-start'
174
174
  },
175
175
  onLayout: this.setTabPaneHeights.bind(this, i)
176
- }, p);
176
+ }, /*#__PURE__*/React.cloneElement(p, {
177
+ "invokeVariables": false
178
+ }));
177
179
  }))));
178
180
  }
179
181
  renderSkeleton(props) {
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","BaseComponent","BaseComponentState","SwipeAnimation","isWebPreviewMode","WmTabsProps","DEFAULT_CLASS","WmTabheader","createSkeleton","WmTabsState","constructor","args","_defineProperty","WmTabs","props","bounds","e","_this$tabLayout","activeTabIndex","state","selectedTabIndex","w","tabLayout","width","noOfTabs","tabPanes","length","lower","center","upper","onLower","onChange","onUpper","setTabLayout","event","nativeEvent","layout","forceUpdate","goToTab","setTabPaneHeights","index","_nativeEvent$nativeEv","tabPaneHeights","height","setTabShown","tabIndex","callback","tabsShown","setTimeout","updateState","addTabPane","tabPane","paneId","newIndex","i","findIndex","t","push","removeTabPane","splice","selectTabPane","indexOf","selectedTabPane","_this$tabLayout2","position","animationView","setPosition","then","prev","_this$animationView","goToLower","next","_this$animationView2","oldIndex","deselectedTab","_onDeselect","selectedTab","_onSelect","invokeEventCallback","proxy","renderSkeletonContent","Children","toArray","children","filter","item","show","headerData","map","p","title","icon","key","createElement","style","styles","root","borderBottomWidth","onLayout","bind","tabHeader","data","showskeleton","overflow","flexDirection","flexWrap","alignSelf","renderSkeleton","showskeletonchildren","_this$props","skeletonStyles","skeleton","text","theme","opacity","onPropertyChange","name","$new","$old","selectedIndex","getBackground","_showSkeleton","_background","renderWidget","paneicon","id","getTestId","onIndexChange","flex","maxHeight","tabContent","enableGestures","enablegestures","alignItems","direction","ref","r","handlers","animationHandlers","undefined"],"sources":["tabs.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, LayoutRectangle, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmTabsProps from './tabs.props';\nimport { DEFAULT_CLASS, WmTabsStyles } from './tabs.styles';\nimport WmTabpane from './tabpane/tabpane.component';\nimport WmTabheader from './tabheader/tabheader.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTabsState extends BaseComponentState<WmTabsProps> {\n tabsShown: boolean[] = [];\n selectedTabIndex: number = 0;\n}\n\nexport default class WmTabs extends BaseComponent<WmTabsProps, WmTabsState, WmTabsStyles> {\n public tabPanes = [] as WmTabpane[];\n private newIndex = 0;\n private tabLayout: LayoutRectangle = null as any;\n private tabPaneHeights: number[] = [];\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.selectedTabIndex,\n w = this.tabLayout?.width || 0,\n noOfTabs = this.tabPanes.length;\n return {\n lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,\n center: -1 * activeTabIndex * w,\n upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w\n };\n },\n onLower: (e) => {\n this.onChange(this.state.selectedTabIndex - 1);\n },\n onUpper: (e) => {\n this.onChange(this.state.selectedTabIndex + 1);\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmTabsProps) {\n super(props, DEFAULT_CLASS, new WmTabsProps(), new WmTabsState());\n }\n\n setTabLayout(event: LayoutChangeEvent) {\n this.tabLayout = event.nativeEvent.layout;\n this.forceUpdate(() => {\n this.goToTab();\n });\n }\n\n setTabPaneHeights(index: number, nativeEvent: LayoutChangeEvent) {\n this.tabPaneHeights[index] = nativeEvent.nativeEvent.layout?.height;\n if (index === this.state.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n setTabShown(tabIndex: number, callback: () => any) {\n if (!this.state.tabsShown[tabIndex]) {\n const tabsShown = [...this.state.tabsShown];\n tabsShown[tabIndex] = true;\n setTimeout(() => {\n this.updateState({\n tabsShown: tabsShown\n } as WmTabsState, callback);\n }, 300);\n } else {\n callback && callback();\n }\n }\n\n addTabPane(tabPane: WmTabpane) {\n tabPane.paneId = `tabPane${this.newIndex++}`;\n const i = this.tabPanes.findIndex(t => t.paneId === tabPane.paneId);\n if (i >= 0) {\n this.tabPanes[i] = tabPane;\n } else {\n this.tabPanes.push(tabPane)\n }\n }\n\n removeTabPane(tabPane: WmTabpane) {\n const i = this.tabPanes.findIndex(t => t.paneId === tabPane.paneId);\n if (i >= 0) {\n this.tabPanes.splice(i, 1); \n this.newIndex--;\n }\n }\n\n selectTabPane(tabPane: WmTabpane) {\n this.goToTab(this.tabPanes.indexOf(tabPane));\n }\n\n get selectedTabPane() {\n return this.tabPanes[this.state.selectedTabIndex];\n }\n\n goToTab(index = this.state.selectedTabIndex) {\n if (index < 0 || index >= this.tabPanes.length) {\n return;\n }\n const position = -1 * index * (this.tabLayout?.width || 0);\n if(this.animationView) {\n this.animationView.setPosition(position)\n .then(() => this.onChange(index));\n } else {\n this.onChange(index);\n }\n }\n\n prev() {\n this.animationView?.goToLower();\n }\n\n next() {\n this.animationView?.goToLower();\n }\n\n onChange(newIndex: number) {\n if (newIndex < 0 || newIndex >= this.tabPanes.length) {\n return;\n }\n const oldIndex = this.state.selectedTabIndex;\n const deselectedTab = this.tabPanes[this.state.selectedTabIndex];\n this.newIndex = newIndex;\n deselectedTab?._onDeselect();\n this.updateState({\n selectedTabIndex: newIndex\n } as WmTabsState, () => {\n this.setTabShown(newIndex, () => {\n const selectedTab = this.tabPanes[newIndex];\n selectedTab?._onSelect();\n this.invokeEventCallback('onChange', [{}, this.proxy, newIndex, oldIndex]);\n });\n });\n }\n\n public renderSkeletonContent(props: WmTabsProps) {\n const tabPanes = React.Children.toArray(this.props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: '', key: `tab-${p.props.title}-${i}`}));\n return(\n <View style={[this.styles.root, { borderBottomWidth: 0}]}>\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n styles={this.styles.tabHeader}\n data={headerData}\n showskeleton={this.props.showskeleton}\n selectedTabIndex={this.state.selectedTabIndex}\n ></WmTabheader>\n <View\n //{...this.panResponder.panHandlers}\n style={{\n width: '100%',\n //height: this.tabPaneHeights[this.state.selectedTabIndex],\n overflow: 'hidden'\n }} >\n <View style={{\n flexDirection: 'row',\n flexWrap: 'nowrap'\n }}>\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {p}\n </View>);\n })}\n </View>\n </View>\n </View>\n )\n }\n\n public renderSkeleton(props: WmTabsProps){\n if(!props.showskeletonchildren) {\n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n {this.renderSkeletonContent(props)}\n </View>)) \n }\n return this.renderSkeletonContent(props);\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case \"defaultpaneindex\":\n const selectedIndex = $new || 0;\n const tabsShown: boolean[] = [];\n tabsShown[selectedIndex] = true;\n this.updateState({\n selectedTabIndex: selectedIndex,\n tabsShown: tabsShown\n } as WmTabsState);\n }\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n\n\n renderWidget(props: WmTabsProps) {\n const tabPanes = React.Children.toArray(props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: p.props.paneicon || '', key: `tab-${p.props.title}-${i}`}));\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n return (\n <View style={styles}>\n {this.getBackground()}\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n id={this.getTestId('headers')}\n styles={this.styles.tabHeader}\n data={headerData}\n selectedTabIndex={this.state.selectedTabIndex}\n onIndexChange={this.goToTab.bind(this)}\n ></WmTabheader>\n <View\n style={[{\n width: '100%',\n flex: 1\n }, this.styles.root.height ?\n (isWebPreviewMode() ? {'overflowX': 'hidden','overflowY': 'auto'} as any : {overflow: 'scroll'})\n : {\n overflow: 'hidden',\n maxHeight: this.tabPaneHeights[this.state.selectedTabIndex],\n }, this.styles.tabContent]} >\n <SwipeAnimation.View\n enableGestures={props.enablegestures}\n style={{\n flexDirection: 'row',\n flexWrap: 'nowrap',\n alignItems: 'flex-start'\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n >\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{\n width: '100%',\n height: this.styles.root.height ? undefined : 1000000,\n alignSelf: 'flex-start'}}>\n <View\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {p}\n </View>\n </View>);\n })}\n </SwipeAnimation.View>\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA6CC,IAAI,QAAQ,cAAc;AACvE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AACjG,OAAO,KAAKC,cAAc,MAAM,oDAAoD;AACpF,SAASC,gBAAgB,QAAQ,sCAAsC;AAEvE,OAAOC,WAAW,MAAM,cAAc;AACtC,SAASC,aAAa,QAAsB,eAAe;AAE3D,OAAOC,WAAW,MAAM,iCAAiC;AAEzD,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO,MAAMC,WAAW,SAASP,kBAAkB,CAAc;EAAAQ,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACxC,EAAE;IAAAA,eAAA,2BACE,CAAC;EAAA;AAC9B;AAEA,eAAe,MAAMC,MAAM,SAASZ,aAAa,CAAyC;EAyBxFS,WAAWA,CAACI,KAAkB,EAAE;IAC9B,KAAK,CAACA,KAAK,EAAER,aAAa,EAAE,IAAID,WAAW,CAAC,CAAC,EAAE,IAAII,WAAW,CAAC,CAAC,CAAC;IAACG,eAAA,mBAzBlD,EAAE;IAAAA,eAAA,mBACD,CAAC;IAAAA,eAAA,oBACiB,IAAI;IAAAA,eAAA,yBACN,EAAE;IAAAA,eAAA,wBACe,IAAI;IAAAA,eAAA,4BAC5B;MAC1BG,MAAM,EAAGC,CAAC,IAAK;QAAA,IAAAC,eAAA;QACb,MAAMC,cAAc,GAAG,IAAI,CAACC,KAAK,CAACC,gBAAgB;UAC5CC,CAAC,GAAG,EAAAJ,eAAA,OAAI,CAACK,SAAS,cAAAL,eAAA,uBAAdA,eAAA,CAAgBM,KAAK,KAAI,CAAC;UAC9BC,QAAQ,GAAG,IAA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jC,SAAS,EAAE;QAAY;MAAE,gBAC3B3G,KAAA,CAAA8F,aAAA,CAAC7F,IAAI;QACH8F,KAAK,EAAE;UAACvE,KAAK,EAAE,MAAM;UAAEmF,SAAS,EAAE;QAAY,CAAE;QAChDR,QAAQ,EAAE,IAAI,CAAC3D,iBAAiB,CAAC4D,IAAI,CAAC,IAAI,EAAE7C,CAAC;MAAE,GAE9CmC,CACG,CACF,CAAC;IACT,CAAC,CACkB,CACjB,CACF,CAAC;EAEX;AACF","ignoreList":[]}
1
+ {"version":3,"names":["React","View","BaseComponent","BaseComponentState","SwipeAnimation","isWebPreviewMode","WmTabsProps","DEFAULT_CLASS","WmTabheader","createSkeleton","WmTabsState","constructor","args","_defineProperty","WmTabs","props","bounds","e","_this$tabLayout","activeTabIndex","state","selectedTabIndex","w","tabLayout","width","noOfTabs","tabPanes","length","lower","center","upper","onLower","onChange","onUpper","setTabLayout","event","nativeEvent","layout","forceUpdate","goToTab","setTabPaneHeights","index","_nativeEvent$nativeEv","tabPaneHeights","height","setTabShown","tabIndex","callback","tabsShown","setTimeout","updateState","addTabPane","tabPane","paneId","newIndex","i","findIndex","t","push","removeTabPane","splice","selectTabPane","indexOf","selectedTabPane","_this$tabLayout2","position","animationView","setPosition","then","prev","_this$animationView","goToLower","next","_this$animationView2","oldIndex","deselectedTab","_onDeselect","selectedTab","_onSelect","invokeEventCallback","proxy","renderSkeletonContent","Children","toArray","children","filter","item","show","headerData","map","p","title","icon","key","createElement","style","styles","root","borderBottomWidth","onLayout","bind","tabHeader","data","showskeleton","overflow","flexDirection","flexWrap","alignSelf","cloneElement","renderSkeleton","showskeletonchildren","_this$props","skeletonStyles","skeleton","text","theme","opacity","onPropertyChange","name","$new","$old","selectedIndex","getBackground","_showSkeleton","_background","renderWidget","paneicon","id","getTestId","onIndexChange","flex","maxHeight","tabContent","enableGestures","enablegestures","alignItems","direction","ref","r","handlers","animationHandlers","undefined"],"sources":["tabs.component.tsx"],"sourcesContent":["import React from 'react';\nimport { LayoutChangeEvent, LayoutRectangle, View } from 'react-native';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\nimport * as SwipeAnimation from '@wavemaker/app-rn-runtime/gestures/swipe.animation';\nimport { isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\n\nimport WmTabsProps from './tabs.props';\nimport { DEFAULT_CLASS, WmTabsStyles } from './tabs.styles';\nimport WmTabpane from './tabpane/tabpane.component';\nimport WmTabheader from './tabheader/tabheader.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTabsState extends BaseComponentState<WmTabsProps> {\n tabsShown: boolean[] = [];\n selectedTabIndex: number = 0;\n}\n\nexport default class WmTabs extends BaseComponent<WmTabsProps, WmTabsState, WmTabsStyles> {\n public tabPanes = [] as WmTabpane[];\n private newIndex = 0;\n private tabLayout: LayoutRectangle = null as any;\n private tabPaneHeights: number[] = [];\n private animationView: SwipeAnimation.View | null = null as any;\n private animationHandlers = {\n bounds: (e) => {\n const activeTabIndex = this.state.selectedTabIndex,\n w = this.tabLayout?.width || 0,\n noOfTabs = this.tabPanes.length;\n return {\n lower: -1 * (activeTabIndex - (activeTabIndex === 0 ? 0 : 1)) * w,\n center: -1 * activeTabIndex * w,\n upper: -1 * (activeTabIndex + (activeTabIndex === noOfTabs - 1 ? 0 : 1)) * w\n };\n },\n onLower: (e) => {\n this.onChange(this.state.selectedTabIndex - 1);\n },\n onUpper: (e) => {\n this.onChange(this.state.selectedTabIndex + 1);\n }\n } as SwipeAnimation.Handlers;\n\n constructor(props: WmTabsProps) {\n super(props, DEFAULT_CLASS, new WmTabsProps(), new WmTabsState());\n }\n\n setTabLayout(event: LayoutChangeEvent) {\n this.tabLayout = event.nativeEvent.layout;\n this.forceUpdate(() => {\n this.goToTab();\n });\n }\n\n setTabPaneHeights(index: number, nativeEvent: LayoutChangeEvent) {\n this.tabPaneHeights[index] = nativeEvent.nativeEvent.layout?.height;\n if (index === this.state.selectedTabIndex) {\n this.forceUpdate();\n }\n }\n\n setTabShown(tabIndex: number, callback: () => any) {\n if (!this.state.tabsShown[tabIndex]) {\n const tabsShown = [...this.state.tabsShown];\n tabsShown[tabIndex] = true;\n setTimeout(() => {\n this.updateState({\n tabsShown: tabsShown\n } as WmTabsState, callback);\n }, 300);\n } else {\n callback && callback();\n }\n }\n\n addTabPane(tabPane: WmTabpane) {\n tabPane.paneId = `tabPane${this.newIndex++}`;\n const i = this.tabPanes.findIndex(t => t.paneId === tabPane.paneId);\n if (i >= 0) {\n this.tabPanes[i] = tabPane;\n } else {\n this.tabPanes.push(tabPane)\n }\n }\n\n removeTabPane(tabPane: WmTabpane) {\n const i = this.tabPanes.findIndex(t => t.paneId === tabPane.paneId);\n if (i >= 0) {\n this.tabPanes.splice(i, 1); \n this.newIndex--;\n }\n }\n\n selectTabPane(tabPane: WmTabpane) {\n this.goToTab(this.tabPanes.indexOf(tabPane));\n }\n\n get selectedTabPane() {\n return this.tabPanes[this.state.selectedTabIndex];\n }\n\n goToTab(index = this.state.selectedTabIndex) {\n if (index < 0 || index >= this.tabPanes.length) {\n return;\n }\n const position = -1 * index * (this.tabLayout?.width || 0);\n if(this.animationView) {\n this.animationView.setPosition(position)\n .then(() => this.onChange(index));\n } else {\n this.onChange(index);\n }\n }\n\n prev() {\n this.animationView?.goToLower();\n }\n\n next() {\n this.animationView?.goToLower();\n }\n\n onChange(newIndex: number) {\n if (newIndex < 0 || newIndex >= this.tabPanes.length) {\n return;\n }\n const oldIndex = this.state.selectedTabIndex;\n const deselectedTab = this.tabPanes[this.state.selectedTabIndex];\n this.newIndex = newIndex;\n deselectedTab?._onDeselect();\n this.updateState({\n selectedTabIndex: newIndex\n } as WmTabsState, () => {\n this.setTabShown(newIndex, () => {\n const selectedTab = this.tabPanes[newIndex];\n selectedTab?._onSelect();\n this.invokeEventCallback('onChange', [{}, this.proxy, newIndex, oldIndex]);\n });\n });\n }\n\n public renderSkeletonContent(props: WmTabsProps) {\n const tabPanes = React.Children.toArray(this.props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: '', key: `tab-${p.props.title}-${i}`}));\n return(\n <View style={[this.styles.root, { borderBottomWidth: 0}]}>\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n styles={this.styles.tabHeader}\n data={headerData}\n showskeleton={this.props.showskeleton}\n selectedTabIndex={this.state.selectedTabIndex}\n ></WmTabheader>\n <View\n //{...this.panResponder.panHandlers}\n style={{\n width: '100%',\n //height: this.tabPaneHeights[this.state.selectedTabIndex],\n overflow: 'hidden'\n }} >\n <View style={{\n flexDirection: 'row',\n flexWrap: 'nowrap'\n }}>\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {React.cloneElement(p, { \"invokeVariables\": false })}\n {/* {p} */}\n </View>);\n })}\n </View>\n </View>\n </View>\n )\n }\n\n public renderSkeleton(props: WmTabsProps){\n if(!props.showskeletonchildren) {\n const skeletonStyles: WmSkeletonStyles = this.props?.styles?.skeleton || { root: {}, text: {} } as WmSkeletonStyles\n return createSkeleton(this.theme, skeletonStyles, {\n ...this.styles.root\n }, (<View style={[this.styles.root, { opacity: 0 }]}>\n {this.renderSkeletonContent(props)}\n </View>)) \n }\n return this.renderSkeletonContent(props);\n }\n\n public onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case \"defaultpaneindex\":\n const selectedIndex = $new || 0;\n const tabsShown: boolean[] = [];\n tabsShown[selectedIndex] = true;\n this.updateState({\n selectedTabIndex: selectedIndex,\n tabsShown: tabsShown\n } as WmTabsState);\n }\n }\n\n getBackground(): React.JSX.Element | null {\n return this._showSkeleton ? null : this._background\n } \n\n\n renderWidget(props: WmTabsProps) {\n const tabPanes = React.Children.toArray(props.children)\n .filter((item: any, index: number) => item.props.show != false);\n const headerData = tabPanes.map((p: any, i: number) =>\n ({title: p.props.title || 'Tab Title', icon: p.props.paneicon || '', key: `tab-${p.props.title}-${i}`}));\n const styles = this._showSkeleton ? {\n ...this.styles.root,\n ...this.styles.skeleton.root\n } : this.styles.root\n return (\n <View style={styles}>\n {this.getBackground()}\n <View onLayout={this.setTabLayout.bind(this)} style={{width: '100%'}}></View>\n <WmTabheader\n id={this.getTestId('headers')}\n styles={this.styles.tabHeader}\n data={headerData}\n selectedTabIndex={this.state.selectedTabIndex}\n onIndexChange={this.goToTab.bind(this)}\n ></WmTabheader>\n <View\n style={[{\n width: '100%',\n flex: 1\n }, this.styles.root.height ?\n (isWebPreviewMode() ? {'overflowX': 'hidden','overflowY': 'auto'} as any : {overflow: 'scroll'})\n : {\n overflow: 'hidden',\n maxHeight: this.tabPaneHeights[this.state.selectedTabIndex],\n }, this.styles.tabContent]} >\n <SwipeAnimation.View\n enableGestures={props.enablegestures}\n style={{\n flexDirection: 'row',\n flexWrap: 'nowrap',\n alignItems: 'flex-start'\n }}\n direction='horizontal'\n ref={(r) => {this.animationView = r}}\n handlers = {this.animationHandlers}\n >\n {tabPanes.map((p: any, i) => {\n return (\n <View\n key={`tab-${p.props.title}-${i}`}\n style={{\n width: '100%',\n height: this.styles.root.height ? undefined : 1000000,\n alignSelf: 'flex-start'}}>\n <View\n style={{width: '100%', alignSelf: 'flex-start'}}\n onLayout={this.setTabPaneHeights.bind(this, i)}>\n {/* {this.state.tabsShown[i] ? p : null} */}\n {p}\n </View>\n </View>);\n })}\n </SwipeAnimation.View>\n </View>\n </View>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA6CC,IAAI,QAAQ,cAAc;AACvE,SAASC,aAAa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IAAI,CAAC3D,iBAAiB,CAAC4D,IAAI,CAAC,IAAI,EAAE7C,CAAC;MAAE,GAE9CmC,CACG,CACF,CAAC;IACT,CAAC,CACkB,CACjB,CACF,CAAC;EAEX;AACF","ignoreList":[]}
@@ -45,6 +45,10 @@ export default class WmWizardstep extends BaseComponent {
45
45
  setActive() {
46
46
  this.updateState({
47
47
  active: true
48
+ }, () => {
49
+ if (this.state.showContent) {
50
+ this.invokeEventCallback('onLoad', [this]);
51
+ }
48
52
  });
49
53
  }
50
54
  setInActive() {