@wavemaker/app-rn-runtime 11.14.1-32.647748 → 11.14.1-33.647787
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/advanced/carousel/carousel.component.js +1 -1
- package/components/advanced/carousel/carousel.component.js.map +1 -1
- package/components/advanced/webview/webview.component.js +1 -1
- package/components/advanced/webview/webview.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.component.js +240 -33
- package/components/basic/bottomsheet/bottomsheet.component.js.map +1 -1
- package/components/basic/bottomsheet/bottomsheet.styles.js +0 -3
- package/components/basic/bottomsheet/bottomsheet.styles.js.map +1 -1
- package/components/basic/label/label.component.js +13 -24
- package/components/basic/label/label.component.js.map +1 -1
- package/components/basic/label/label.props.js +1 -0
- package/components/basic/label/label.props.js.map +1 -1
- package/components/basic/progress-circle/progress-circle.component.js +3 -3
- package/components/basic/progress-circle/progress-circle.component.js.map +1 -1
- package/components/chart/area-chart/area-chart.component.js +27 -10
- package/components/chart/area-chart/area-chart.component.js.map +1 -1
- package/components/chart/bar-chart/bar-chart.component.js +39 -7
- package/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- package/components/chart/bar-chart/bar-chart.props.js +1 -0
- package/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- package/components/chart/basechart.component.js +8 -15
- package/components/chart/basechart.component.js.map +1 -1
- package/components/chart/basechart.props.js +1 -0
- package/components/chart/basechart.props.js.map +1 -1
- package/components/chart/bubble-chart/bubble-chart.component.js +23 -6
- package/components/chart/bubble-chart/bubble-chart.component.js.map +1 -1
- package/components/chart/line-chart/line-chart.component.js +22 -5
- package/components/chart/line-chart/line-chart.component.js.map +1 -1
- package/components/chart/pie-chart/pie-chart.component.js +15 -4
- package/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- package/components/chart/stack-chart/stack-chart.component.js +1 -1
- package/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- package/components/container/accordion/accordionpane/accordionpane.component.js +6 -4
- package/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- package/components/container/container.component.js +207 -14
- package/components/container/container.component.js.map +1 -1
- package/components/container/container.props.js +6 -0
- package/components/container/container.props.js.map +1 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js +32 -4
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.component.js.map +1 -1
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js +1 -0
- package/components/container/linearlayout/linearlayoutitem/linearlayoutitem.props.js.map +1 -1
- package/components/container/panel/panel.component.js +1 -1
- package/components/container/panel/panel.component.js.map +1 -1
- package/components/container/tabs/tabpane/tabpane.component.js +1 -1
- package/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- package/components/container/tabs/tabs.component.js +62 -29
- package/components/container/tabs/tabs.component.js.map +1 -1
- package/components/container/tabs/tabs.props.js +1 -0
- package/components/container/tabs/tabs.props.js.map +1 -1
- package/components/container/wizard/wizard.component.js +3 -5
- package/components/container/wizard/wizard.component.js.map +1 -1
- package/components/container/wizard/wizard.props.js +0 -1
- package/components/container/wizard/wizard.props.js.map +1 -1
- package/components/container/wizard/wizard.styles.js +3 -1
- package/components/container/wizard/wizard.styles.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.component.js +4 -23
- package/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- package/components/container/wizard/wizardstep/wizardstep.props.js +0 -2
- package/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- package/components/data/form/form-field/form-field.component.js +26 -1
- package/components/data/form/form-field/form-field.component.js.map +1 -1
- package/components/data/form/form-field/form-field.props.js +3 -0
- package/components/data/form/form-field/form-field.props.js.map +1 -1
- package/components/data/form/form.component.js +11 -3
- package/components/data/form/form.component.js.map +1 -1
- package/components/data/form/form.props.js +1 -0
- package/components/data/form/form.props.js.map +1 -1
- package/components/data/list/list.component.js +6 -3
- package/components/data/list/list.component.js.map +1 -1
- package/components/dialogs/dialog/dialog.component.js +1 -1
- package/components/dialogs/dialog/dialog.component.js.map +1 -1
- package/components/dialogs/dialogcontent/dialogcontent.component.js +1 -2
- package/components/dialogs/dialogcontent/dialogcontent.component.js.map +1 -1
- package/components/input/baseinput/baseinput.component.js +30 -3
- package/components/input/baseinput/baseinput.component.js.map +1 -1
- package/components/input/baseinput/baseinput.props.js +1 -0
- package/components/input/baseinput/baseinput.props.js.map +1 -1
- package/components/input/basenumber/basenumber.component.js +18 -3
- package/components/input/basenumber/basenumber.component.js.map +1 -1
- package/components/input/basenumber/basenumber.props.js +2 -0
- package/components/input/basenumber/basenumber.props.js.map +1 -1
- package/components/input/calendar/calendar.component.js +5 -1
- package/components/input/calendar/calendar.component.js.map +1 -1
- package/components/input/calendar/views/month-view.js +8 -1
- package/components/input/calendar/views/month-view.js.map +1 -1
- package/components/input/checkboxset/checkboxset.component.js +2 -2
- package/components/input/checkboxset/checkboxset.component.js.map +1 -1
- package/components/input/currency/currency.component.js +2 -0
- package/components/input/currency/currency.component.js.map +1 -1
- package/components/input/currency/currency.styles.js +10 -1
- package/components/input/currency/currency.styles.js.map +1 -1
- package/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +6 -1
- package/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- package/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +6 -1
- package/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
- package/components/input/number/number.component.js +2 -0
- package/components/input/number/number.component.js.map +1 -1
- package/components/input/number/number.styles.js +4 -0
- package/components/input/number/number.styles.js.map +1 -1
- package/components/input/radioset/radioset.component.js +4 -6
- package/components/input/radioset/radioset.component.js.map +1 -1
- package/components/input/text/text.component.js +13 -2
- package/components/input/text/text.component.js.map +1 -1
- package/components/input/text/text.props.js +1 -1
- package/components/input/text/text.props.js.map +1 -1
- package/components/input/text/text.styles.js +17 -0
- package/components/input/text/text.styles.js.map +1 -1
- package/components/input/textarea/textarea.component.js +3 -2
- package/components/input/textarea/textarea.component.js.map +1 -1
- package/components/input/textarea/textarea.styles.js +4 -0
- package/components/input/textarea/textarea.styles.js.map +1 -1
- package/components/page/left-panel/left-panel.component.js +1 -1
- package/components/page/left-panel/left-panel.component.js.map +1 -1
- package/components/page/page-content/page-content.component.js +157 -17
- package/components/page/page-content/page-content.component.js.map +1 -1
- package/components/page/page-content/page-content.props.js +4 -0
- package/components/page/page-content/page-content.props.js.map +1 -1
- package/components/page/page-content/pull-to-refresh.component.js +288 -0
- package/components/page/page-content/pull-to-refresh.component.js.map +1 -0
- package/core/AppConfig.js.map +1 -1
- package/core/base.component.js +37 -5
- package/core/base.component.js.map +1 -1
- package/core/components/error-fallback/error-fallback.component.js +18 -50
- package/core/components/error-fallback/error-fallback.component.js.map +1 -1
- package/core/components/error-fallback/error-fallback.styles.js +1 -4
- package/core/components/error-fallback/error-fallback.styles.js.map +1 -1
- package/core/components/textinput.component.js +27 -8
- package/core/components/textinput.component.js.map +1 -1
- package/core/environment.js +25 -0
- package/core/environment.js.map +1 -0
- package/core/error-boundary.component.js +2 -46
- package/core/error-boundary.component.js.map +1 -1
- package/core/fixed-view.component.js +19 -2
- package/core/fixed-view.component.js.map +1 -1
- package/core/sticky-wrapper.js +37 -34
- package/core/sticky-wrapper.js.map +1 -1
- package/core/tappable.component.js +110 -16
- package/core/tappable.component.js.map +1 -1
- package/core/viewport.js +13 -8
- package/core/viewport.js.map +1 -1
- package/gestures/carousel-swipe.animation.js +1 -1
- package/gestures/carousel-swipe.animation.js.map +1 -1
- package/npm-shrinkwrap.json +383 -219
- package/package-lock.json +383 -219
- package/package.json +5 -6
- package/runtime/App.js +31 -181
- package/runtime/App.js.map +1 -1
- package/runtime/App.navigator.js +1 -4
- package/runtime/App.navigator.js.map +1 -1
- package/runtime/base-fragment.component.js +29 -5
- package/runtime/base-fragment.component.js.map +1 -1
- package/runtime/base-page.component.js +4 -12
- package/runtime/base-page.component.js.map +1 -1
- package/runtime/navigator/drawer.navigator.js +2 -0
- package/runtime/navigator/drawer.navigator.js.map +1 -1
- package/runtime/navigator/stack.navigator.js +17 -2
- package/runtime/navigator/stack.navigator.js.map +1 -1
- package/runtime/services/app-security.service.js +19 -40
- package/runtime/services/app-security.service.js.map +1 -1
- package/runtime/services/device/scan-service.js +12 -34
- package/runtime/services/device/scan-service.js.map +1 -1
- package/runtime/services/webprocess.service.js +3 -8
- package/runtime/services/webprocess.service.js.map +1 -1
- package/styles/background.component.js +61 -2
- package/styles/background.component.js.map +1 -1
- package/styles/style-prop.validator.js +4 -0
- package/styles/style-prop.validator.js.map +1 -1
- package/styles/style-props.js +2 -0
- package/styles/style-props.js.map +1 -1
- package/styles/theme.js +27 -2
- package/styles/theme.js.map +1 -1
- package/styles/theme.variables.js +2 -0
- package/styles/theme.variables.js.map +1 -1
- package/core/advanced-promise-rejection-tracker.js +0 -207
- package/core/advanced-promise-rejection-tracker.js.map +0 -1
- package/core/global-error-handler.service.js +0 -177
- package/core/global-error-handler.service.js.map +0 -1
- package/runtime/services/browser.constants.js +0 -3
- package/runtime/services/browser.constants.js.map +0 -1
- package/runtime/services/browser.service.js +0 -321
- package/runtime/services/browser.service.js.map +0 -1
- package/runtime/services/external-auth-callback.service.js +0 -44
- package/runtime/services/external-auth-callback.service.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","paddingLeft","paddingRight","text","fontSize","textAlign","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","width","height","skeletonLabel","bottom","left","flex","minWidth","maxWidth","inputDisabledBgColor","position","top","floatingLabelColor","activeFloatingLabelColor"],"sources":["number.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport type WmNumberStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n skeletonLabel: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-number';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmNumberStyles = defineStyles<WmNumberStyles>({\n root: {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n paddingLeft: 16,\n paddingRight: 16\n },\n text: {\n fontSize: 16,\n textAlign: 'left'\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n skeleton: {\n root:{\n borderRadius: 6,\n paddingLeft: 16,\n paddingRight: 16,\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n width: '100%',\n height: 40,\n },\n } as any as WmSkeletonStyles,\n skeletonLabel: {\n root: {\n bottom: 12,\n left: 16,\n width:80,\n height:16,\n borderRadius:4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n \n // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles\n addStyle('form-number-input-horizontal', '', {\n root: {\n flex: 1,\n minWidth: 0, // Allow shrinking below intrinsic content size if needed\n maxWidth: '100%'\n },\n text: {}\n } as BaseStyles);\n \n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root : {\n textAlign: 'right'\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});\n\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","paddingLeft","paddingRight","text","fontSize","textAlign","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","inactiveFloatingLabel","skeleton","width","height","skeletonLabel","bottom","left","flex","minWidth","maxWidth","inputDisabledBgColor","position","top","floatingLabelColor","activeFloatingLabelColor"],"sources":["number.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport type WmNumberStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n inactiveFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n skeletonLabel: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-number';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmNumberStyles = defineStyles<WmNumberStyles>({\n root: {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n paddingLeft: 16,\n paddingRight: 16\n },\n text: {\n fontSize: 16,\n textAlign: 'left'\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n inactiveFloatingLabel: {},\n skeleton: {\n root:{\n borderRadius: 6,\n paddingLeft: 16,\n paddingRight: 16,\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n width: '100%',\n height: 40,\n },\n } as any as WmSkeletonStyles,\n skeletonLabel: {\n root: {\n bottom: 12,\n left: 16,\n width:80,\n height:16,\n borderRadius:4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n \n // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles\n addStyle('form-number-input-horizontal', '', {\n root: {\n flex: 1,\n minWidth: 0, // Allow shrinking below intrinsic content size if needed\n maxWidth: '100%'\n },\n text: {}\n } as BaseStyles);\n \n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root : {\n textAlign: 'right'\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n },\n inactiveFloatingLabel: {\n color: themeVariables.floatingLabelColor\n }\n });\n});\n\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAA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ACF;EACJ,CAAC,CAAC;EAEFZ,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;;EAE1C;EACAD,QAAQ,CAAC,8BAA8B,EAAE,EAAE,EAAE;IAC3CE,IAAI,EAAE;MACJiC,IAAI,EAAE,CAAC;MACPC,QAAQ,EAAE,CAAC;MAAE;MACbC,QAAQ,EAAE;IACZ,CAAC;IACDtB,IAAI,EAAE,CAAC;EACT,CAAe,CAAC;EAEhBf,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACtCK,IAAI,EAAG;MACLQ,eAAe,EAAEX,cAAc,CAACuC;IAClC;EACJ,CAAC,CAAC;EACFtC,QAAQ,CAACH,aAAa,GAAG,MAAM,EAAE,EAAE,EAAE;IACjCK,IAAI,EAAG;MACLe,SAAS,EAAE;IACb;EACJ,CAAC,CAAC;EACFjB,QAAQ,CAACH,aAAa,GAAG,aAAa,EAAE,EAAE,EAAE;IAC1CK,IAAI,EAAE;MACJC,SAAS,EAAE;IACb,CAAC;IACDuB,aAAa,EAAE;MACba,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,EAAE;MACPN,IAAI,EAAE,EAAE;MACRlB,QAAQ,EAAE,EAAE;MACZQ,KAAK,EAAEzB,cAAc,CAAC0C;IACxB,CAAC;IACDd,mBAAmB,EAAE;MACnBH,KAAK,EAAEzB,cAAc,CAAC2C;IACxB,CAAC;IACDd,qBAAqB,EAAE;MACrBJ,KAAK,EAAEzB,cAAc,CAAC0C;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -63,7 +63,7 @@ export default class WmRadioset extends BaseDatasetComponent {
|
|
|
63
63
|
style: [itemStyle, item.selected ? this.styles.selectedItem : null],
|
|
64
64
|
onPress: this.onPress.bind(this, item),
|
|
65
65
|
key: item.key
|
|
66
|
-
},
|
|
66
|
+
}, this.getTestPropsForAction("radio" + index), accessibilityProps), /*#__PURE__*/React.createElement(WmIcon, {
|
|
67
67
|
id: this.getTestId('radiobutton' + index),
|
|
68
68
|
iconclass: "wi wi-fiber-manual-record",
|
|
69
69
|
styles: item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio,
|
|
@@ -126,7 +126,7 @@ export default class WmRadioset extends BaseDatasetComponent {
|
|
|
126
126
|
accessible: false,
|
|
127
127
|
bounces: false,
|
|
128
128
|
alwaysBounceVertical: false
|
|
129
|
-
}, /*#__PURE__*/React.createElement(ScrollView, _extends({
|
|
129
|
+
}, this.showSpinner(), /*#__PURE__*/React.createElement(ScrollView, _extends({
|
|
130
130
|
horizontal: true,
|
|
131
131
|
style: this.isRTL && Platform.OS == 'android' ? {
|
|
132
132
|
transform: [{
|
|
@@ -138,12 +138,10 @@ export default class WmRadioset extends BaseDatasetComponent {
|
|
|
138
138
|
scaleX: -1
|
|
139
139
|
}]
|
|
140
140
|
} : {}
|
|
141
|
-
}, getAccessibilityProps(AccessibilityWidgetType.RADIOSET, this.props), {
|
|
142
|
-
accessible: false
|
|
143
|
-
}), props.groupby && this.renderGroupby(), !props.groupby && this.renderRadioButtons(items))) : /*#__PURE__*/React.createElement(View, _extends({
|
|
141
|
+
}, getAccessibilityProps(AccessibilityWidgetType.RADIOSET, this.props)), props.groupby && this.renderGroupby(), !props.groupby && this.renderRadioButtons(items))) : /*#__PURE__*/React.createElement(View, _extends({
|
|
144
142
|
style: [this.styles.root],
|
|
145
143
|
onLayout: event => this.handleLayout(event)
|
|
146
|
-
}, getAccessibilityProps(AccessibilityWidgetType.RADIOSET, this.props)), props.groupby && this.renderGroupby(), !props.groupby && this.renderRadioButtons(items));
|
|
144
|
+
}, getAccessibilityProps(AccessibilityWidgetType.RADIOSET, this.props)), this.showSpinner(), props.groupby && this.renderGroupby(), !props.groupby && this.renderRadioButtons(items));
|
|
147
145
|
}
|
|
148
146
|
}
|
|
149
147
|
//# sourceMappingURL=radioset.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","TouchableOpacity","Platform","ScrollView","WmRadiosetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","AccessibilityWidgetType","getAccessibilityProps","find","isEqual","isEmpty","WmLabel","getNumberOfEmptyObjects","WmRadiosetState","constructor","args","_defineProperty","WmRadioset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","value","getItemKey","itemStyle","width","styles","noscrollitem","accessibilityProps","accessibilityLabel","accessibilityRole","accessibilityState","createElement","_extends","style","bind","getTestPropsForAction","id","getTestId","iconclass","checkedRadio","uncheckedRadio","accessible","template","renderitempartial","dataObject","radioLabel","selectedLabel","getTestPropsForLabel","setTemplate","partialName","renderGroupby","groupedData","length","map","groupObj","groupHeaderTitle","renderRadioButtons","data","items","noOfColumns","itemsperrow","xs","Math","round","radiosetscroll","group","renderSkeleton","_ref","numberofskeletonitems","_","skeleton","renderWidget","root","onLayout","event","handleLayout","bounces","alwaysBounceVertical","horizontal","isRTL","OS","transform","scaleX","contentContainerStyle","RADIOSET","groupby"],"sources":["radioset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, DimensionValue, TouchableOpacity, Platform, AccessibilityRole } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nimport WmRadiosetProps from './radioset.props';\nimport { DEFAULT_CLASS, WmRadiosetStyles } from './radioset.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { find, forEach, isEqual } from 'lodash-es';\nimport { isEmpty } from 'lodash';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmRadiosetState extends BaseDatasetState<WmRadiosetProps> {\n template: string = '';\n}\n\nexport default class WmRadioset extends BaseDatasetComponent<WmRadiosetProps, WmRadiosetState, WmRadiosetStyles> {\n\n constructor(props: WmRadiosetProps) {\n super(props, DEFAULT_CLASS, new WmRadiosetProps());\n }\n\n onPress(item: any) {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n item.selected = true;\n let selectedValue: any = \"\";\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));\n const oldValue = this.state.props.datavalue;\n selectedItem.selected = item.selected;\n selectedValue = selectedItem.selected ? selectedItem.datafield : null;\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmRadiosetState,() => {\n this.computeDisplayValue();\n this.invokeEventCallback('onChange', [ undefined, this.proxy, selectedValue, oldValue ]);\n });\n }\n\n renderChild(item: any, index: any, colWidth?: DimensionValue) {\n const displayText = item.displayexp || item.displayfield;\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n const itemStyle = colWidth ? [{ width: colWidth }, this.styles.item] \n : [this.styles.noscrollitem];\n const accessibilityProps = { accessibilityLabel: displayText ,\n accessibilityRole: 'radio' as AccessibilityRole,\n accessibilityState: {\n disabled: this.props.readonly || this.props.disabled,\n selected: item.selected,\n }\n }\n return (\n <TouchableOpacity style={[\n itemStyle,\n item.selected ? this.styles.selectedItem : null]}\n onPress={this.onPress.bind(this, item)} key={item.key} {...accessibilityProps} {...this.getTestPropsForAction(\"radio\"+index)}>\n <WmIcon id={this.getTestId('radiobutton' + index)} iconclass=\"wi wi-fiber-manual-record\" styles={item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio} disabled={this.state.props.readonly || this.state.props.disabled} accessible={false}></WmIcon>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : <Text style={[this.styles.radioLabel, item.selected ? this.styles.selectedLabel : null]} {...this.getTestPropsForLabel('caption'+index)}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName } as WmRadiosetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View accessibilityRole='radiogroup'>\n {groupedData && groupedData.length\n ? groupedData.map((groupObj: any, index: any) => {\n return(\n <View key={groupObj.key}>\n <Text style={this.styles.groupHeaderTitle}>{groupObj.key}</Text>\n {this.renderRadioButtons(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderRadioButtons(items: any) {\n const props = this.state.props;\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n return props.radiosetscroll ? (\n <View style={noOfColumns === 1 ? {} : this.styles.group}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index, colWidth)): null}\n </View>\n ) : (\n <View style={[this.styles.group]}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index)): null}\n </View>\n )\n }\n\n public renderSkeleton(props: WmRadiosetProps): React.ReactNode {\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n\n return [...getNumberOfEmptyObjects(props.numberofskeletonitems as number ?? 5)].map(_ => {\n return <View style={[this.styles.item, {width: colWidth}]}>\n <WmIcon styles={this.styles.checkedRadio}/>\n <WmLabel styles={{ skeleton: this.styles.skeleton }}/>\n </View>\n })\n\n }\n\n renderWidget(props: WmRadiosetProps) {\n const items = this.state.dataItems;\n return props.radiosetscroll ? (\n <ScrollView style={this.styles.root} onLayout={(event) => this.handleLayout(event)} accessible={false}\n bounces={false}\n alwaysBounceVertical={false}\n >\n <ScrollView horizontal={true}\n style={this.isRTL && Platform.OS == 'android' ? { transform: [{ scaleX: -1 }] } : {}}\n contentContainerStyle={this.isRTL && Platform.OS == 'android' ? { transform: [{ scaleX: -1 }] } : {}}\n {...getAccessibilityProps(AccessibilityWidgetType.RADIOSET, this.props)}\n accessible={false}\n >\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </ScrollView>\n </ScrollView>\n ) : (\n <View style={[this.styles.root]} onLayout={(event) => this.handleLayout(event)} {...getAccessibilityProps(AccessibilityWidgetType.RADIOSET, this.props)}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAkBC,gBAAgB,EAAEC,QAAQ,QAA2B,cAAc;AACxG,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AAEnF,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,IAAI,EAAWC,OAAO,QAAQ,WAAW;AAClD,SAASC,OAAO,QAAQ,QAAQ;AAChC,OAAOC,OAAO,MAAM,kEAAkE;AACtF,SAASC,uBAAuB,QAAQ,sCAAsC;AAE9E,OAAO,MAAMC,eAAe,SAAST,gBAAgB,CAAkB;EAAAU,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBAClD,EAAE;EAAA;AACvB;AAEA,eAAe,MAAMC,UAAU,SAASd,oBAAoB,CAAqD;EAE/GW,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEhB,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,CAAC;EACpD;EAEAkB,OAAOA,CAACC,IAAS,EAAE;IACjB,IAAI,IAAI,CAACC,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AAI,SAAS,GAAG;QAAEC,SAAS,EAAE,CAAC;UAAEC,MAAM,EAAE,CAAC;QAAE,CAAC;MAAE,CAAC,GAAG,CAAC;IAAE,GACjGnG,qBAAqB,CAACD,uBAAuB,CAACsG,QAAQ,EAAE,IAAI,CAAC1F,KAAK,CAAC;MACvE+C,UAAU,EAAE;IAAM,IAEjB/C,KAAK,CAAC2F,OAAO,IAAI,IAAI,CAACnC,aAAa,CAAC,CAAC,EACrC,CAACxD,KAAK,CAAC2F,OAAO,IAAI,IAAI,CAAC7B,kBAAkB,CAACE,KAAK,CACtC,CACF,CAAC,gBAEbvF,KAAA,CAAA4D,aAAA,CAAC3D,IAAI,EAAA4D,QAAA;MAACC,KAAK,EAAE,CAAC,IAAI,CAACR,MAAM,CAAC+C,IAAI,CAAE;MAACC,QAAQ,EAAGC,KAAK,IAAK,IAAI,CAACC,YAAY,CAACD,KAAK;IAAE,GAAK3F,qBAAqB,CAACD,uBAAuB,CAACsG,QAAQ,EAAE,IAAI,CAAC1F,KAAK,CAAC,GACpJA,KAAK,CAAC2F,OAAO,IAAI,IAAI,CAACnC,aAAa,CAAC,CAAC,EACrC,CAACxD,KAAK,CAAC2F,OAAO,IAAI,IAAI,CAAC7B,kBAAkB,CAACE,KAAK,CAC5C,CACP;EACH;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","View","Text","TouchableOpacity","Platform","ScrollView","WmRadiosetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","AccessibilityWidgetType","getAccessibilityProps","find","isEqual","isEmpty","WmLabel","getNumberOfEmptyObjects","WmRadiosetState","constructor","args","_defineProperty","WmRadioset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","value","getItemKey","itemStyle","width","styles","noscrollitem","accessibilityProps","accessibilityLabel","accessibilityRole","accessibilityState","createElement","_extends","style","bind","getTestPropsForAction","id","getTestId","iconclass","checkedRadio","uncheckedRadio","accessible","template","renderitempartial","dataObject","radioLabel","selectedLabel","getTestPropsForLabel","setTemplate","partialName","renderGroupby","groupedData","length","map","groupObj","groupHeaderTitle","renderRadioButtons","data","items","noOfColumns","itemsperrow","xs","Math","round","radiosetscroll","group","renderSkeleton","_ref","numberofskeletonitems","_","skeleton","renderWidget","root","onLayout","event","handleLayout","bounces","alwaysBounceVertical","showSpinner","horizontal","isRTL","OS","transform","scaleX","contentContainerStyle","RADIOSET","groupby"],"sources":["radioset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, DimensionValue, TouchableOpacity, Platform, AccessibilityRole } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nimport WmRadiosetProps from './radioset.props';\nimport { DEFAULT_CLASS, WmRadiosetStyles } from './radioset.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { find, forEach, isEqual } from 'lodash-es';\nimport { isEmpty } from 'lodash';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmRadiosetState extends BaseDatasetState<WmRadiosetProps> {\n template: string = '';\n}\n\nexport default class WmRadioset extends BaseDatasetComponent<WmRadiosetProps, WmRadiosetState, WmRadiosetStyles> {\n\n constructor(props: WmRadiosetProps) {\n super(props, DEFAULT_CLASS, new WmRadiosetProps());\n }\n\n onPress(item: any) {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n item.selected = true;\n let selectedValue: any = \"\";\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));\n const oldValue = this.state.props.datavalue;\n selectedItem.selected = item.selected;\n selectedValue = selectedItem.selected ? selectedItem.datafield : null;\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmRadiosetState,() => {\n this.computeDisplayValue();\n this.invokeEventCallback('onChange', [ undefined, this.proxy, selectedValue, oldValue ]);\n });\n }\n\n renderChild(item: any, index: any, colWidth?: DimensionValue) {\n const displayText = item.displayexp || item.displayfield;\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n const itemStyle = colWidth ? [{ width: colWidth }, this.styles.item] \n : [this.styles.noscrollitem];\n const accessibilityProps = { accessibilityLabel: displayText ,\n accessibilityRole: 'radio' as AccessibilityRole,\n accessibilityState: {\n disabled: this.props.readonly || this.props.disabled,\n selected: item.selected,\n }\n }\n return (\n <TouchableOpacity style={[\n itemStyle,\n item.selected ? this.styles.selectedItem : null]}\n onPress={this.onPress.bind(this, item)} key={item.key} {...this.getTestPropsForAction(\"radio\"+index)} {...accessibilityProps}>\n <WmIcon id={this.getTestId('radiobutton' + index)} iconclass=\"wi wi-fiber-manual-record\" styles={item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio} disabled={this.state.props.readonly || this.state.props.disabled} accessible={false}></WmIcon>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : <Text style={[this.styles.radioLabel, item.selected ? this.styles.selectedLabel : null]} {...this.getTestPropsForLabel('caption'+index)}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName } as WmRadiosetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View accessibilityRole='radiogroup'>\n {groupedData && groupedData.length\n ? groupedData.map((groupObj: any, index: any) => {\n return(\n <View key={groupObj.key}>\n <Text style={this.styles.groupHeaderTitle}>{groupObj.key}</Text>\n {this.renderRadioButtons(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderRadioButtons(items: any) {\n const props = this.state.props;\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n return props.radiosetscroll ? (\n <View style={noOfColumns === 1 ? {} : this.styles.group}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index, colWidth)): null}\n </View>\n ) : (\n <View style={[this.styles.group]}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index)): null}\n </View>\n )\n }\n\n public renderSkeleton(props: WmRadiosetProps): React.ReactNode {\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n\n return [...getNumberOfEmptyObjects(props.numberofskeletonitems as number ?? 5)].map(_ => {\n return <View style={[this.styles.item, {width: colWidth}]}>\n <WmIcon styles={this.styles.checkedRadio}/>\n <WmLabel styles={{ skeleton: this.styles.skeleton }}/>\n </View>\n })\n\n }\n\n renderWidget(props: WmRadiosetProps) {\n const items = this.state.dataItems;\n return props.radiosetscroll ? (\n <ScrollView style={this.styles.root} onLayout={(event) => this.handleLayout(event)} accessible={false}\n bounces={false}\n alwaysBounceVertical={false}\n >\n {this.showSpinner()}\n <ScrollView horizontal={true}\n style={this.isRTL && Platform.OS == 'android' ? { transform: [{ scaleX: -1 }] } : {}}\n contentContainerStyle={this.isRTL && Platform.OS == 'android' ? { transform: [{ scaleX: -1 }] } : {}}\n {...getAccessibilityProps(AccessibilityWidgetType.RADIOSET, this.props)}\n >\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </ScrollView>\n </ScrollView>\n ) : (\n <View style={[this.styles.root]} onLayout={(event) => this.handleLayout(event)} {...getAccessibilityProps(AccessibilityWidgetType.RADIOSET, this.props)}>\n {this.showSpinner()}\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n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AACE,KAAK,CACtC,CACF,CAAC,gBAEbvF,KAAA,CAAA4D,aAAA,CAAC3D,IAAI,EAAA4D,QAAA;MAACC,KAAK,EAAE,CAAC,IAAI,CAACR,MAAM,CAAC+C,IAAI,CAAE;MAACC,QAAQ,EAAGC,KAAK,IAAK,IAAI,CAACC,YAAY,CAACD,KAAK;IAAE,GAAK3F,qBAAqB,CAACD,uBAAuB,CAACuG,QAAQ,EAAE,IAAI,CAAC3F,KAAK,CAAC,GACpJ,IAAI,CAACoF,WAAW,CAAC,CAAC,EAClBpF,KAAK,CAAC4F,OAAO,IAAI,IAAI,CAACpC,aAAa,CAAC,CAAC,EACrC,CAACxD,KAAK,CAAC4F,OAAO,IAAI,IAAI,CAAC9B,kBAAkB,CAACE,KAAK,CAC5C,CACP;EACH;AACF","ignoreList":[]}
|
|
@@ -21,6 +21,14 @@ export default class WmText extends BaseInputComponent {
|
|
|
21
21
|
classes.push(super.getStyleClassName());
|
|
22
22
|
return classes.join(' ');
|
|
23
23
|
}
|
|
24
|
+
onChangeText(text) {
|
|
25
|
+
if (!this.props.uppercase) {
|
|
26
|
+
super.onChangeText(text);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const s = text == null ? '' : String(text);
|
|
30
|
+
super.onChangeText(s ? s.toUpperCase() : s);
|
|
31
|
+
}
|
|
24
32
|
renderSkeleton(props) {
|
|
25
33
|
let skeletonWidth, skeletonHeight;
|
|
26
34
|
if (this.props.skeletonwidth == "0") {
|
|
@@ -42,7 +50,7 @@ export default class WmText extends BaseInputComponent {
|
|
|
42
50
|
});
|
|
43
51
|
}
|
|
44
52
|
renderWidget(props) {
|
|
45
|
-
var _this$state$textValue
|
|
53
|
+
var _this$state$textValue;
|
|
46
54
|
let opts = {};
|
|
47
55
|
const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';
|
|
48
56
|
opts[valueExpr] = ((_this$state$textValue = this.state.textValue) === null || _this$state$textValue === void 0 ? void 0 : _this$state$textValue.toString()) || '';
|
|
@@ -59,6 +67,7 @@ export default class WmText extends BaseInputComponent {
|
|
|
59
67
|
floatingLabel: props.floatinglabel,
|
|
60
68
|
floatingLabelStyle: this.styles.floatingLabel,
|
|
61
69
|
activeFloatingLabelStyle: this.styles.activeFloatingLabel,
|
|
70
|
+
inactiveFloatingLabelStyle: this.styles.inactiveFloatingLabel,
|
|
62
71
|
placeholderTextColor: this.styles.placeholderText.color,
|
|
63
72
|
isInputFocused: this.state.isInputFocused,
|
|
64
73
|
style: [this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}],
|
|
@@ -70,15 +79,17 @@ export default class WmText extends BaseInputComponent {
|
|
|
70
79
|
displayformat: props.displayformat,
|
|
71
80
|
background: this._background,
|
|
72
81
|
maskchar: props.maskchar,
|
|
73
|
-
maxLength:
|
|
82
|
+
maxLength: props.maxchars,
|
|
74
83
|
placeholder: props.placeholder,
|
|
75
84
|
onBlur: this.onBlur.bind(this),
|
|
76
85
|
onFocus: this.onFocus.bind(this),
|
|
77
86
|
onKeyPress: this.onKeyPress.bind(this),
|
|
87
|
+
onSubmitEditing: this.onSubmitEditing.bind(this),
|
|
78
88
|
onChangeText: this.onChangeText.bind(this),
|
|
79
89
|
onChange: this.invokeChange.bind(this),
|
|
80
90
|
allowContentSelection: this.styles.text.userSelect === 'text',
|
|
81
91
|
autoCapitalize: props.autocapitalize,
|
|
92
|
+
returnKeyType: props.returnkeytype,
|
|
82
93
|
handleLayout: this.handleLayout
|
|
83
94
|
}));
|
|
84
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","WmTextProps","DEFAULT_CLASS","WMTextInput","BaseInputComponent","BaseInputState","isNull","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmTextState","WmText","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","styles","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","_this$state$textValue","_props$maxchars","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXT","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","placeholderTextColor","placeholderText","color","isInputFocused","style","text","isValid","invalid","focused","keyboardType","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","secureTextEntry","type","maskchar","displayformat","background","_background","maxLength","maxchars","undefined","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect","autoCapitalize","autocapitalize","handleLayout"],"sources":["text.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform } from 'react-native';\n\nimport WmTextProps from './text.props';\nimport { DEFAULT_CLASS, WmTextStyles } from './text.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { BaseInputComponent, BaseInputState } from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component\";\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTextState extends BaseInputState<WmTextProps> {\n}\n\nexport default class WmText extends BaseInputComponent<WmTextProps, WmTextState, WmTextStyles> {\n\n constructor(props: WmTextProps) {\n super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-text-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public renderSkeleton(props: WmTextProps): React.ReactNode { \n let skeletonWidth, skeletonHeight;\n \n if(this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height;\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n })\n }\n\n renderWidget(props: WmTextProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXT,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n placeholderTextColor={this.styles.placeholderText.color as any}\n isInputFocused={ this.state.isInputFocused }\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]}\n keyboardType={this.state.keyboardType}\n autoComplete={props.autocomplete === \"true\" ? \"username\" : props.autocomplete === \"false\" ? \"off\" : props.autocomplete}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n secureTextEntry={props.type === 'password' && !props.maskchar ? true : false}\n displayformat={props.displayformat}\n background={this._background}\n maskchar={props.maskchar}\n maxLength={props.maxchars ?? undefined} \n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n autoCapitalize={props.autocapitalize}\n handleLayout={this.handleLayout}\n />\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK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,CAACiE,QAAQ,cAAA3C,eAAA,cAAAA,eAAA,GAAI4C,SAAU;MACvCC,WAAW,EAAEnE,KAAK,CAACmE,WAAY;MAC/BC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAAC/D,MAAM,CAACkC,IAAI,CAAC8B,UAAU,KAAK,MAAO;MAC9DC,cAAc,EAAE7E,KAAK,CAAC8E,cAAe;MACrCC,YAAY,EAAE,IAAI,CAACA;IAAa,EACjC,CAAC;EAER;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Platform","WmTextProps","DEFAULT_CLASS","WMTextInput","BaseInputComponent","BaseInputState","isNull","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmTextState","WmText","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","onChangeText","text","uppercase","s","String","toUpperCase","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","styles","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","_extends","getTestPropsForInput","TEXT","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","inactiveFloatingLabelStyle","inactiveFloatingLabel","placeholderTextColor","placeholderText","color","isInputFocused","style","isValid","invalid","focused","keyboardType","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","secureTextEntry","type","maskchar","displayformat","background","_background","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onSubmitEditing","onChange","invokeChange","allowContentSelection","userSelect","autoCapitalize","autocapitalize","returnKeyType","returnkeytype","handleLayout"],"sources":["text.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform } from 'react-native';\n\nimport WmTextProps from './text.props';\nimport { DEFAULT_CLASS, WmTextStyles } from './text.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { BaseInputComponent, BaseInputState } from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component\";\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTextState extends BaseInputState<WmTextProps> {\n}\n\nexport default class WmText extends BaseInputComponent<WmTextProps, WmTextState, WmTextStyles> {\n\n constructor(props: WmTextProps) {\n super(props, DEFAULT_CLASS, new WmTextProps(), new WmTextState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-text-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public onChangeText(text: any) {\n if (!this.props.uppercase) {\n super.onChangeText(text);\n return;\n }\n const s = text == null ? '' : String(text);\n super.onChangeText(s ? s.toUpperCase() : s);\n }\n\n public renderSkeleton(props: WmTextProps): React.ReactNode { \n let skeletonWidth, skeletonHeight;\n \n if(this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height;\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n })\n }\n\n renderWidget(props: WmTextProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXT,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n inactiveFloatingLabelStyle={this.styles.inactiveFloatingLabel}\n placeholderTextColor={this.styles.placeholderText.color as any}\n isInputFocused={ this.state.isInputFocused }\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]}\n keyboardType={this.state.keyboardType}\n autoComplete={props.autocomplete === \"true\" ? \"username\" : props.autocomplete === \"false\" ? \"off\" : props.autocomplete}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n secureTextEntry={props.type === 'password' && !props.maskchar ? true : false}\n displayformat={props.displayformat}\n background={this._background}\n maskchar={props.maskchar}\n maxLength={props.maxchars}\n placeholder={props.placeholder}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onSubmitEditing={this.onSubmitEditing.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n autoCapitalize={props.autocapitalize}\n returnKeyType={props.returnkeytype}\n handleLayout={this.handleLayout}\n />\n );\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,QAAQ,cAAc;AAEvD,OAAOC,WAAW,MAAM,cAAc;AACtC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,GAAG,KAAK,GAAG,IAAK;MAC1DC,eAAe,EAAEhE,KAAK,CAACiE,IAAI,KAAK,UAAU,IAAI,CAACjE,KAAK,CAACkE,QAAQ,GAAG,IAAI,GAAG,KAAM;MAC7EC,aAAa,EAAEnE,KAAK,CAACmE,aAAc;MACnCC,UAAU,EAAE,IAAI,CAACC,WAAY;MAC7BH,QAAQ,EAAElE,KAAK,CAACkE,QAAS;MACzBI,SAAS,EAAEtE,KAAK,CAACuE,QAAS;MAC1BC,WAAW,EAAExE,KAAK,CAACwE,WAAY;MAC/BC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,eAAe,EAAE,IAAI,CAACA,eAAe,CAACH,IAAI,CAAC,IAAI,CAAE;MACjDnE,YAAY,EAAE,IAAI,CAACA,YAAY,CAACmE,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAAC9D,MAAM,CAACV,IAAI,CAACyE,UAAU,KAAK,MAAO;MAC9DC,cAAc,EAAElF,KAAK,CAACmF,cAAe;MACrCC,aAAa,EAAEpF,KAAK,CAACqF,aAAc;MACnCC,YAAY,EAAE,IAAI,CAACA;IAAa,EACjC,CAAC;EAER;AACF","ignoreList":[]}
|
|
@@ -10,8 +10,8 @@ export default class WmTextProps extends BaseInputProps {
|
|
|
10
10
|
_defineProperty(this, "skeletonheight", null);
|
|
11
11
|
_defineProperty(this, "skeletonwidth", null);
|
|
12
12
|
_defineProperty(this, "autocapitalize", 'none');
|
|
13
|
+
_defineProperty(this, "uppercase", false);
|
|
13
14
|
_defineProperty(this, "returnkeytype", 'auto');
|
|
14
|
-
_defineProperty(this, "onSubmitEditing", () => {});
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=text.props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseInputProps","WmTextProps","constructor","args","_defineProperty"],"sources":["text.props.ts"],"sourcesContent":["import BaseInputProps from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props\";\n\nexport default class WmTextProps extends BaseInputProps {\n floatinglabel?: string;\n placeholder: string = 'Enter text';\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n autocapitalize?: string = 'none';\n returnkeytype: 'auto' | 'next' | 'done' = 'auto';\n
|
|
1
|
+
{"version":3,"names":["BaseInputProps","WmTextProps","constructor","args","_defineProperty"],"sources":["text.props.ts"],"sourcesContent":["import BaseInputProps from \"@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.props\";\n\nexport default class WmTextProps extends BaseInputProps {\n floatinglabel?: string;\n placeholder: string = 'Enter text';\n skeletonheight?: string = null as any;\n skeletonwidth?: string = null as any;\n autocapitalize?: string = 'none';\n uppercase?: boolean = false;\n returnkeytype: 'auto' | 'next' | 'done' = 'auto';\n}\n"],"mappings":";;;AAAA,OAAOA,cAAc,MAAM,sEAAsE;AAEjG,eAAe,MAAMC,WAAW,SAASD,cAAc,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;IAAAA,eAAA,sBAEhC,YAAY;IAAAA,eAAA,yBACR,IAAI;IAAAA,eAAA,wBACL,IAAI;IAAAA,eAAA,yBACH,MAAM;IAAAA,eAAA,oBACV,KAAK;IAAAA,eAAA,wBACe,MAAM;EAAA;AAClD","ignoreList":[]}
|
|
@@ -30,6 +30,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
30
30
|
},
|
|
31
31
|
floatingLabel: {},
|
|
32
32
|
activeFloatingLabel: {},
|
|
33
|
+
inactiveFloatingLabel: {},
|
|
33
34
|
skeleton: {
|
|
34
35
|
root: {
|
|
35
36
|
width: '100%',
|
|
@@ -82,6 +83,22 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
82
83
|
},
|
|
83
84
|
activeFloatingLabel: {
|
|
84
85
|
color: themeVariables.activeFloatingLabelColor
|
|
86
|
+
},
|
|
87
|
+
inactiveFloatingLabel: {
|
|
88
|
+
color: themeVariables.floatingLabelColor
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
addStyle('app-input', '', {
|
|
92
|
+
root: {},
|
|
93
|
+
text: {},
|
|
94
|
+
invalid: {},
|
|
95
|
+
focused: {},
|
|
96
|
+
placeholderText: {},
|
|
97
|
+
floatingLabel: {},
|
|
98
|
+
activeFloatingLabel: {},
|
|
99
|
+
inactiveFloatingLabel: {},
|
|
100
|
+
skeleton: {
|
|
101
|
+
root: {}
|
|
85
102
|
}
|
|
86
103
|
});
|
|
87
104
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","paddingLeft","paddingRight","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","width","height","flex","minWidth","maxWidth","inputDisabledBgColor","textAlign","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["text.styles.ts"],"sourcesContent":["import BASE_THEME, {AllStyle, Theme} from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport {ColorValue} from \"react-native\";\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTextStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-text';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextStyles = defineStyles({\n
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","paddingLeft","paddingRight","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","text","fontSize","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","inactiveFloatingLabel","skeleton","width","height","flex","minWidth","maxWidth","inputDisabledBgColor","textAlign","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["text.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle, Theme } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { ColorValue } from \"react-native\";\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\n\nexport type WmTextStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n inactiveFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-text';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextStyles = defineStyles({\n root: {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n paddingLeft: 16,\n paddingRight: 16,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont\n },\n text: {\n fontSize: 16\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focused: {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n inactiveFloatingLabel: {},\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n \n // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles\n addStyle('form-text-input-horizontal', '', {\n root: {\n flex: 1, \n minWidth: 0, \n maxWidth: '100%',\n },\n text: {\n }\n } as BaseStyles);\n \n // Password widgets use the text component but have their own widget type\n addStyle('form-password-input-horizontal', '', {\n root: {\n flex: 1, \n minWidth: 0, \n maxWidth: '100%',\n },\n text: {}\n } as BaseStyles);\n \n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root: {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root: {\n textAlign: 'right'\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48,\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor,\n },\n inactiveFloatingLabel: {\n color: themeVariables.floatingLabelColor,\n }\n });\n addStyle('app-input', '', {\n root: {},\n text: {},\n invalid: {\n },\n focused: {},\n placeholderText: {},\n floatingLabel: {},\n activeFloatingLabel: {},\n inactiveFloatingLabel: {},\n skeleton: {\n root: {}\n } as any as WmSkeletonStyles\n });\n});"],"mappings":"AAAA,OAAOA,UAAU,MAA2B,wCAAwC;AACpF,SAAqBC,YAAY,QAAQ,+CAA+C;AAcxF,OAAO,MAAMC,aAAa,GAAG,UAAU;AACvCF,UAAU,CAAC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extarea extends BaseInputComponent {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
renderWidget(props) {
|
|
45
|
-
var _this$state$textValue
|
|
45
|
+
var _this$state$textValue;
|
|
46
46
|
let opts = {};
|
|
47
47
|
const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';
|
|
48
48
|
opts[valueExpr] = ((_this$state$textValue = this.state.textValue) === null || _this$state$textValue === void 0 ? void 0 : _this$state$textValue.toString()) || '';
|
|
@@ -66,10 +66,11 @@ export default class WmTextarea extends BaseInputComponent {
|
|
|
66
66
|
floatingLabel: props.floatinglabel,
|
|
67
67
|
floatingLabelStyle: this.styles.floatingLabel,
|
|
68
68
|
activeFloatingLabelStyle: this.styles.activeFloatingLabel,
|
|
69
|
+
inactiveFloatingLabelStyle: this.styles.inactiveFloatingLabel,
|
|
69
70
|
autoComplete: props.autocomplete ? 'username' : 'off',
|
|
70
71
|
autoFocus: props.autofocus,
|
|
71
72
|
editable: props.disabled || props.readonly ? false : true,
|
|
72
|
-
maxLength:
|
|
73
|
+
maxLength: props.maxchars,
|
|
73
74
|
placeholder: props.placeholder || 'Place your text',
|
|
74
75
|
onBlur: this.onBlur.bind(this),
|
|
75
76
|
onFocus: this.onFocus.bind(this),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","Text","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","WMTextInput","isNull","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmTextareaState","WmTextarea","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","styles","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","_this$state$textValue","
|
|
1
|
+
{"version":3,"names":["React","Platform","Text","WmTextareaProps","DEFAULT_CLASS","BaseInputComponent","BaseInputState","WMTextInput","isNull","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmTextareaState","WmTextarea","constructor","props","getStyleClassName","classes","state","floatinglabel","push","join","renderSkeleton","skeletonWidth","skeletonHeight","skeletonwidth","_this$styles$root","styles","root","width","skeletonheight","_this$styles$root2","height","theme","skeleton","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","createElement","Fragment","_extends","getTestPropsForInput","TEXTAREA","ref","widgetRef","selectionStart","selectionEnd","cursor","placeholderTextColor","placeholderText","color","isInputFocused","style","text","isValid","invalid","focused","multiline","numberOfLines","background","_background","keyboardType","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","inactiveFloatingLabelStyle","inactiveFloatingLabel","autoComplete","autocomplete","autoFocus","autofocus","editable","disabled","readonly","maxLength","maxchars","placeholder","onBlur","bind","onFocus","onKeyPress","onChangeText","onChange","invokeChange","allowContentSelection","userSelect","handleLayout","limitdisplaytext","helpText"],"sources":["textarea.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform,Text } from 'react-native';\nimport WmTextareaProps from './textarea.props';\nimport { DEFAULT_CLASS, WmTextareaStyles } from './textarea.styles';\nimport {\n BaseInputComponent,\n BaseInputState\n} from '@wavemaker/app-rn-runtime/components/input/baseinput/baseinput.component';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport { isNull } from 'lodash';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\n\nexport class WmTextareaState extends BaseInputState<WmTextareaProps> {}\n\nexport default class WmTextarea extends BaseInputComponent<WmTextareaProps, WmTextareaState, WmTextareaStyles> {\n\n constructor(props: WmTextareaProps) {\n super(props, DEFAULT_CLASS, new WmTextareaProps(), new WmTextareaState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-textarea-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public renderSkeleton(props: WmTextareaProps): React.ReactNode {\n let skeletonWidth, skeletonHeight;\n if(this.props.skeletonwidth == \"0\") {\n skeletonWidth = 0\n } else {\n skeletonWidth = this.props.skeletonwidth || this.styles.root?.width\n }\n\n if(this.props.skeletonheight == \"0\") {\n skeletonHeight = 0\n } else {\n skeletonHeight = this.props.skeletonheight || this.styles.root?.height;\n }\n\n return createSkeleton(this.theme, this.styles.skeleton, {\n ...this.styles.root,\n width: skeletonWidth as DimensionValue,\n height: skeletonHeight as DimensionValue\n });\n }\n\n renderWidget(props: WmTextareaProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return ( \n <>\n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.TEXTAREA,\n props\n )}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n placeholderTextColor={this.styles.placeholderText.color as any}\n isInputFocused={ this.state.isInputFocused }\n style={[this.styles.root, this.styles.text, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]}\n multiline={true}\n numberOfLines={4}\n background={this._background}\n keyboardType={this.state.keyboardType}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n inactiveFloatingLabelStyle={this.styles.inactiveFloatingLabel}\n autoComplete={props.autocomplete ? 'username' : 'off'}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n maxLength={props.maxchars}\n placeholder={props.placeholder || 'Place your text'}\n onBlur={this.onBlur.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.onKeyPress.bind(this)}\n onChangeText={this.onChangeText.bind(this)}\n onChange={this.invokeChange.bind(this)}\n allowContentSelection={this.styles.text.userSelect === 'text'}\n handleLayout={this.handleLayout}\n />\n { (props.maxchars && props.limitdisplaytext) && <Text\n style={[\n this.styles.helpText\n ]} > \n {props.limitdisplaytext} \n </Text>}\n </>);\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,QAAQ,EAACC,IAAI,QAAQ,cAAc;AAC5D,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,kBAAkB,EAClBC,cAAc,QACT,0EAA0E;AACjF,SAASC,WAAW,QAAQ,+DAA+D;AAC3F,SAASC,MAAM,QAAQ,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,qBAAqB,QAAQ,8CAA8C;AAC7G,SAASC,cAAc,QAAQ,wEAAwE;AAEvG,OAAO,MAAMC,eAAe,SAASN,cAAc,CAAkB;AAErE,eAAe,MAAMO,UAAU,SAASR,kBAAkB,CAAqD;EAE7GS,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEX,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,EAAE,IAAIS,eAAe,CAAC,CAAC,CAAC;EAC3E;EAEOI,iBAAiBA,CAAA,EAAuB;IAC7C,MAAMC,OAAO,GAAG,EAAE;IAClB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,aAAa,EAAE;MAClCF,OAAO,CAACG,IAAI,CAAC,yBAAyB,CAAC;IACzC;IACAH,OAAO,CAACG,IAAI,CAAC,KAAK,CAACJ,iBAAiB,CAAC,CAAC,CAAC;IACvC,OAAOC,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;EAC1B;EAEOC,cAAcA,CAACP,KAAsB,EAAmB;IAC7D,IAAIQ,aAAa,EAAEC,cAAc;IACjC,IAAG,IAAI,CAACT,KAAK,CAACU,aAAa,IAAI,GAAG,EAAE;MAClCF,aAAa,GAAG,CAAC;IACnB,CAAC,MA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K,CAAC+D,QAAQ,GAAG,KAAK,GAAG,IAAK;MAC1DC,SAAS,EAAEhE,KAAK,CAACiE,QAAS;MAC1BC,WAAW,EAAElE,KAAK,CAACkE,WAAW,IAAI,iBAAkB;MACpDC,MAAM,EAAE,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC,IAAI,CAAE;MAC/BC,OAAO,EAAE,IAAI,CAACA,OAAO,CAACD,IAAI,CAAC,IAAI,CAAE;MACjCE,UAAU,EAAE,IAAI,CAACA,UAAU,CAACF,IAAI,CAAC,IAAI,CAAE;MACvCG,YAAY,EAAE,IAAI,CAACA,YAAY,CAACH,IAAI,CAAC,IAAI,CAAE;MAC3CI,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACL,IAAI,CAAC,IAAI,CAAE;MACvCM,qBAAqB,EAAE,IAAI,CAAC9D,MAAM,CAAC8B,IAAI,CAACiC,UAAU,KAAK,MAAO;MAC9DC,YAAY,EAAE,IAAI,CAACA;IAAa,EACjC,CAAC,EACE5E,KAAK,CAACiE,QAAQ,IAAIjE,KAAK,CAAC6E,gBAAgB,iBAAK5F,KAAA,CAAA0C,aAAA,CAACxC,IAAI;MAClDsD,KAAK,EAAE,CACL,IAAI,CAAC7B,MAAM,CAACkE,QAAQ;IACpB,GACA9E,KAAK,CAAC6E,gBACN,CACJ,CAAC;EACL;AACF","ignoreList":[]}
|
|
@@ -20,6 +20,7 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
20
20
|
},
|
|
21
21
|
floatingLabel: {},
|
|
22
22
|
activeFloatingLabel: {},
|
|
23
|
+
inactiveFloatingLabel: {},
|
|
23
24
|
invalid: {
|
|
24
25
|
borderBottomColor: 'red'
|
|
25
26
|
},
|
|
@@ -78,6 +79,9 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
78
79
|
},
|
|
79
80
|
activeFloatingLabel: {
|
|
80
81
|
color: themeVariables.activeFloatingLabelColor
|
|
82
|
+
},
|
|
83
|
+
inactiveFloatingLabel: {
|
|
84
|
+
color: themeVariables.floatingLabelColor
|
|
81
85
|
}
|
|
82
86
|
});
|
|
83
87
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","ThemeVariables","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","minHeight","text","fontSize","textAlignVertical","floatingLabel","activeFloatingLabel","invalid","borderBottomColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","helpText","marginTop","textAlign","INSTANCE","textAreaHelpTextColor","flex","minWidth","maxWidth","inputDisabledBgColor","paddingTop","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["textarea.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport type WmTextareaStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n helpText:AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-textarea';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextareaStyles = defineStyles({\n root: {\n padding:12,\n borderWidth:1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont,\n minHeight: 160,\n },\n text: {\n fontSize: 16,\n textAlignVertical: 'top'\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n invalid: {\n borderBottomColor: 'red'\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 84,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles,\n helpText:{\n marginTop:5,\n textAlign:'right',\n fontSize: 13,\n color: ThemeVariables.INSTANCE.textAreaHelpTextColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n \n // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles\n addStyle('form-textarea-input-horizontal', '', {\n root: {\n flex: 1,\n minWidth: 0, // Allow shrinking below intrinsic content size if needed\n maxWidth: '100%', // Prevent overflow\n },\n text: {}\n } as BaseStyles);\n \n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n })\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n text:{\n paddingTop: 24\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,OAAOC,cAAc,MAAM,kDAAkD;
|
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","ThemeVariables","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","padding","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","fontFamily","baseFont","minHeight","text","fontSize","textAlignVertical","floatingLabel","activeFloatingLabel","inactiveFloatingLabel","invalid","borderBottomColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","skeleton","width","height","helpText","marginTop","textAlign","INSTANCE","textAreaHelpTextColor","flex","minWidth","maxWidth","inputDisabledBgColor","paddingTop","position","top","left","floatingLabelColor","activeFloatingLabelColor"],"sources":["textarea.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\n\nexport type WmTextareaStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n inactiveFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n helpText:AllStyle;\n};\n\nexport const DEFAULT_CLASS = 'app-textarea';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTextareaStyles = defineStyles({\n root: {\n padding:12,\n borderWidth:1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n fontFamily: themeVariables.baseFont,\n minHeight: 160,\n },\n text: {\n fontSize: 16,\n textAlignVertical: 'top'\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n inactiveFloatingLabel: {},\n invalid: {\n borderBottomColor: 'red'\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n skeleton: {\n root: {\n width: '100%',\n height: 84,\n borderRadius: 4\n }\n } as any as WmSkeletonStyles,\n helpText:{\n marginTop:5,\n textAlign:'right',\n fontSize: 13,\n color: ThemeVariables.INSTANCE.textAreaHelpTextColor\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n \n // Add horizontal form input styles for horizontal form field layouts - positioned early to avoid overriding more specific styles\n addStyle('form-textarea-input-horizontal', '', {\n root: {\n flex: 1,\n minWidth: 0, // Allow shrinking below intrinsic content size if needed\n maxWidth: '100%', // Prevent overflow\n },\n text: {}\n } as BaseStyles);\n \n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root:{\n textAlign: 'right'\n }\n })\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n text:{\n paddingTop: 24\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n },\n inactiveFloatingLabel: {\n color: themeVariables.floatingLabelColor\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAExF,OAAOC,cAAc,MAAM,kDAAkD;AAa7E,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CH,UAAU,CAACI,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGN,YAAY,CAAC;IACjDO,IAAI,EAAE;MACJC,OAAO,EAAC,EAAE;MACVC,WAAW,EAAC,CAAC;MACbC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAEP,cAAc,CAACQ,gBAAgB;MAC5CC,eAAe,EAAET,cAAc,CAACU,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,UAAU,EAAEZ,cAAc,CAACa,QAAQ;MACnCC,SAAS,EAAE;IACb,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,iBAAiB,EAAE;IACrB,CAAC;IACDC,aAAa,EAAE,CAAC,CAAC;IACjBC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,qBAAqB,EAAE,CAAC,CAAC;IACzBC,OAAO,EAAE;MACPC,iBAAiB,EAAE;IACrB,CAAC;IACDC,OAAO,EAAG;MACRhB,WAAW,EAAEP,cAAc,CAACwB;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;IACxB,CAAC;IACDzB,qBAAqB,EAAE;MACrBM,KAAK,EAAE1B,cAAc,CAAC4C;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","BaseComponent","BaseComponentState","WmLeftPanelProps","DEFAULT_CLASS","ScrollView","SafeAreaInsetsContext","injector","WmLeftPanelState","constructor","args","_defineProperty","WmLeftPanel","props","get","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","renderWidget","createElement","Consumer","insets","top","bottom","left","right","_this$appConfig","paddingTopVal","styles","root","paddingTop","padding","isEdgeToEdgeApp","appConfig","edgeToEdgeConfig","stylesWithFs","onScroll","event","notify","scrollEventThrottle","contentContainerStyle","width","maxWidth","_background"],"sources":["left-panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLeftPanelProps from './left-panel.props';\nimport { DEFAULT_CLASS, WmLeftPanelStyles } from './left-panel.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { FixedViewContainer } from '@wavemaker/app-rn-runtime/core/fixed-view.component';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\n\nexport class WmLeftPanelState extends BaseComponentState<WmLeftPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmLeftPanel extends BaseComponent<WmLeftPanelProps, WmLeftPanelState, WmLeftPanelStyles> {\n private appConfig = injector.get<AppConfig>('APP_CONFIG');\n \n constructor(props: WmLeftPanelProps) {\n super(props, DEFAULT_CLASS, new WmLeftPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmLeftPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmLeftPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n renderWidget(props: WmLeftPanelProps) {\n return (\n <SafeAreaInsetsContext.Consumer>{(insets = { top: 0, bottom: 0, left: 0, right: 0 })=>{\n const paddingTopVal = this.styles.root.paddingTop || this.styles.root.padding;\n const isEdgeToEdgeApp = !!this.appConfig?.edgeToEdgeConfig?.isEdgeToEdgeApp;\n const stylesWithFs = isEdgeToEdgeApp ? {paddingTop: (paddingTopVal || 0) as number + (insets?.top || 0) as number} : {}\n return (\n <ScrollView \n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}\n contentContainerStyle={[this.styles.root, {width: \"100%\", maxWidth: \"100%\"},stylesWithFs]}>\n {this._background}\n {this.renderContent(props)}\n </ScrollView>\n )\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,OAAOC,QAAQ,MAAM,yCAAyC;AAG9D,OAAO,MAAMC,gBAAgB,SAASN,kBAAkB,CAAmB;EAAAO,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,0BACvD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,WAAW,SAASX,aAAa,CAAwD;EAG5GQ,WAAWA,CAACI,KAAuB,EAAE;IACnC,KAAK,CAACA,KAAK,EAAET,aAAa,EAAE,IAAID,gBAAgB,CAAC,CAAC,CAAC;IAACQ,eAAA,oBAHlCJ,QAAQ,CAACO,GAAG,CAAY,YAAY,CAAC;EAIzD;EAEAC,a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KAAA,CAAA0B,aAAA,CAACrB,UAAU;QACTsC,QAAQ,EAAGC,KAAK,IAAK;UAAC,IAAI,CAACC,MAAM,CAAC,QAAQ,EAAE,CAACD,KAAK,CAAC,CAAC;QAAA,CAAE;QACtDE,mBAAmB,EAAE,EAAG;QACxBC,qBAAqB,EAAE,CAAC,IAAI,CAACZ,MAAM,CAACC,IAAI,EAAE;UAACY,KAAK,EAAE,MAAM;UAAEC,QAAQ,EAAE;QAAM,CAAC,EAACP,YAAY;MAAE,
|
|
1
|
+
{"version":3,"names":["React","BaseComponent","BaseComponentState","WmLeftPanelProps","DEFAULT_CLASS","ScrollView","SafeAreaInsetsContext","injector","WmLeftPanelState","constructor","args","_defineProperty","WmLeftPanel","props","get","onPartialLoad","invokeEventCallback","renderContent","renderPartial","state","isPartialLoaded","setTimeout","updateState","bind","children","renderWidget","createElement","Consumer","insets","top","bottom","left","right","_this$appConfig","paddingTopVal","styles","root","paddingTop","padding","isEdgeToEdgeApp","appConfig","edgeToEdgeConfig","stylesWithFs","onScroll","event","notify","scrollEventThrottle","contentContainerStyle","width","maxWidth","showSpinner","_background"],"sources":["left-panel.component.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseComponent, BaseComponentState } from '@wavemaker/app-rn-runtime/core/base.component';\n\nimport WmLeftPanelProps from './left-panel.props';\nimport { DEFAULT_CLASS, WmLeftPanelStyles } from './left-panel.styles';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { FixedViewContainer } from '@wavemaker/app-rn-runtime/core/fixed-view.component';\nimport { SafeAreaInsetsContext } from 'react-native-safe-area-context';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport AppConfig from '@wavemaker/app-rn-runtime/core/AppConfig';\n\nexport class WmLeftPanelState extends BaseComponentState<WmLeftPanelProps> {\n isPartialLoaded = false;\n}\n\nexport default class WmLeftPanel extends BaseComponent<WmLeftPanelProps, WmLeftPanelState, WmLeftPanelStyles> {\n private appConfig = injector.get<AppConfig>('APP_CONFIG');\n \n constructor(props: WmLeftPanelProps) {\n super(props, DEFAULT_CLASS, new WmLeftPanelProps());\n }\n\n onPartialLoad() {\n this.invokeEventCallback('onLoad', [null, this]);\n }\n\n renderContent(props: WmLeftPanelProps) {\n if (props.renderPartial) {\n if (!this.state.isPartialLoaded) {\n setTimeout(() => {\n this.updateState({\n isPartialLoaded: true\n } as WmLeftPanelState);\n });\n }\n return props.renderPartial(props, this.onPartialLoad.bind(this));\n }\n return props.children;\n }\n\n renderWidget(props: WmLeftPanelProps) {\n return (\n <SafeAreaInsetsContext.Consumer>{(insets = { top: 0, bottom: 0, left: 0, right: 0 })=>{\n const paddingTopVal = this.styles.root.paddingTop || this.styles.root.padding;\n const isEdgeToEdgeApp = !!this.appConfig?.edgeToEdgeConfig?.isEdgeToEdgeApp;\n const stylesWithFs = isEdgeToEdgeApp ? {paddingTop: (paddingTopVal || 0) as number + (insets?.top || 0) as number} : {}\n return (\n <ScrollView \n onScroll={(event) => {this.notify('scroll', [event])}}\n scrollEventThrottle={48}\n contentContainerStyle={[this.styles.root, {width: \"100%\", maxWidth: \"100%\"},stylesWithFs]}>\n {this.showSpinner()}\n {this._background}\n {this.renderContent(props)}\n </ScrollView>\n )\n }}\n </SafeAreaInsetsContext.Consumer>\n );\n }\n}\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,+CAA+C;AAEjG,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,aAAa,QAA2B,qBAAqB;AACtE,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,OAAOC,QAAQ,MAAM,yCAAyC;AAG9D,OAAO,MAAMC,gBAAgB,SAASN,kBAAkB,CAAmB;EAAAO,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,0BACvD,KAAK;EAAA;AACzB;AAEA,eAAe,MAAMC,WAAW,SAASX,aAAa,CAA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