@wavemaker/app-rn-runtime 11.6.1-rc.5513 → 11.6.1-rc.5518
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.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +7 -9
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.component.js +11 -27
- app-rn-runtime/components/advanced/webview/webview.component.js.map +1 -1
- app-rn-runtime/components/advanced/webview/webview.props.js +1 -0
- app-rn-runtime/components/advanced/webview/webview.props.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.component.js +1 -2
- app-rn-runtime/components/basic/anchor/anchor.component.js.map +1 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js +0 -1
- app-rn-runtime/components/basic/anchor/anchor.props.js.map +1 -1
- app-rn-runtime/components/basic/button/button.component.js +15 -2
- app-rn-runtime/components/basic/button/button.component.js.map +1 -1
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js +4 -9
- app-rn-runtime/components/basic/buttongroup/buttongroup.styles.js.map +1 -1
- app-rn-runtime/components/basic/label/label.component.js +29 -41
- app-rn-runtime/components/basic/label/label.component.js.map +1 -1
- app-rn-runtime/components/basic/label/label.styles.js +4 -1
- app-rn-runtime/components/basic/label/label.styles.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +2 -8
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +0 -1
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +0 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +8 -11
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js +0 -6
- app-rn-runtime/components/chart/bar-chart/bar-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js +2 -0
- app-rn-runtime/components/chart/bar-chart/bar-chart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.component.js +6 -19
- app-rn-runtime/components/chart/basechart.component.js.map +1 -1
- app-rn-runtime/components/chart/basechart.props.js +2 -4
- app-rn-runtime/components/chart/basechart.props.js.map +1 -1
- app-rn-runtime/components/chart/basechart.styles.js +1 -7
- app-rn-runtime/components/chart/basechart.styles.js.map +1 -1
- app-rn-runtime/components/chart/line-chart/line-chart.component.js +3 -5
- app-rn-runtime/components/chart/line-chart/line-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js +16 -44
- app-rn-runtime/components/chart/stack-chart/stack-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js +0 -1
- app-rn-runtime/components/chart/stack-chart/stack-chart.props.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +1 -10
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +0 -1
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js +1 -1
- app-rn-runtime/components/container/tabs/tabheader/tabheader.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +12 -2
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +8 -13
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +2 -24
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js +0 -6
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.component.js +1 -0
- app-rn-runtime/components/data/form/form-action/form-action.component.js.map +1 -1
- app-rn-runtime/components/data/form/form-action/form-action.props.js +1 -0
- app-rn-runtime/components/data/form/form-action/form-action.props.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +1 -5
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.component.js +64 -8
- app-rn-runtime/components/data/list/list.component.js.map +1 -1
- app-rn-runtime/components/data/list/list.props.js +1 -0
- app-rn-runtime/components/data/list/list.props.js.map +1 -1
- app-rn-runtime/components/data/list/list.styles.js +0 -3
- app-rn-runtime/components/data/list/list.styles.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +2 -2
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +5 -5
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +5 -5
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +35 -5
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +9 -18
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js +0 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.props.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +39 -10
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.component.js +1 -1
- app-rn-runtime/components/input/composite/composite.component.js.map +1 -1
- app-rn-runtime/components/input/composite/composite.props.js +1 -1
- app-rn-runtime/components/input/composite/composite.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +17 -3
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.props.js +1 -0
- app-rn-runtime/components/input/currency/currency.props.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +19 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +68 -6
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.component.js +8 -0
- app-rn-runtime/components/input/epoch/date/date.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/date/date.styles.js +16 -0
- app-rn-runtime/components/input/epoch/date/date.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js +8 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +1 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +49 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.component.js +8 -0
- app-rn-runtime/components/input/epoch/time/time.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/time/time.styles.js +16 -0
- app-rn-runtime/components/input/epoch/time/time.styles.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +11 -1
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.props.js +1 -0
- app-rn-runtime/components/input/number/number.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +17 -0
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +2 -6
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/slider/slider.component.js +3 -2
- app-rn-runtime/components/input/slider/slider.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +11 -0
- app-rn-runtime/components/input/text/text.component.js.map +1 -1
- app-rn-runtime/components/input/text/text.props.js +1 -0
- app-rn-runtime/components/input/text/text.props.js.map +1 -1
- app-rn-runtime/components/input/text/text.styles.js +17 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +11 -0
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.props.js +1 -0
- app-rn-runtime/components/input/textarea/textarea.props.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +17 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +3 -2
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js +1 -6
- app-rn-runtime/components/navigation/appnavbar/appnavbar.component.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js +0 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js +0 -6
- app-rn-runtime/components/navigation/appnavbar/appnavbar.styles.js.map +1 -1
- app-rn-runtime/components/navigation/navbar/navbar.props.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.component.js.map +1 -1
- app-rn-runtime/components/navigation/navitem/navitem.props.js.map +1 -1
- app-rn-runtime/components/navigation/popover/popover.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +2 -0
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/curve.js +84 -0
- app-rn-runtime/components/page/tabbar/curve.js.map +1 -0
- app-rn-runtime/components/page/tabbar/tabbar.component.js +43 -9
- app-rn-runtime/components/page/tabbar/tabbar.component.js.map +1 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js +54 -1
- app-rn-runtime/components/page/tabbar/tabbar.styles.js.map +1 -1
- app-rn-runtime/core/base.component.js +17 -5
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/floatinglabel.component.js +45 -0
- app-rn-runtime/core/components/floatinglabel.component.js.map +1 -0
- app-rn-runtime/core/components/textinput.component.js +9 -1
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/formatters.js +1 -14
- app-rn-runtime/core/formatters.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +36 -49
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/gestures/swipe.animation.js +34 -1
- app-rn-runtime/gestures/swipe.animation.js.map +1 -1
- app-rn-runtime/package.json +5 -3
- app-rn-runtime/runtime/App.js +13 -7
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +2 -1
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +11 -3
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +23 -8
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/runtime/services/webprocess.service.js +1 -0
- app-rn-runtime/runtime/services/webprocess.service.js.map +1 -1
- app-rn-runtime/styles/background.component.js +12 -1
- app-rn-runtime/styles/background.component.js.map +1 -1
- app-rn-runtime/styles/theme.js +32 -12
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +7 -3
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/device/device/network-info.operation.js +23 -3
- app-rn-runtime/variables/device/device/network-info.operation.js.map +1 -1
- app-rn-runtime/variables/device/operation.provider.js.map +1 -1
- app-rn-runtime/variables/device-variable.js +1 -1
- app-rn-runtime/variables/device-variable.js.map +1 -1
- app-rn-runtime/variables/model-variable.js +1 -2
- app-rn-runtime/variables/model-variable.js.map +1 -1
|
@@ -71,9 +71,17 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
71
71
|
marginTop: -32,
|
|
72
72
|
paddingBottom: 14
|
|
73
73
|
},
|
|
74
|
-
activeTabLabel: {}
|
|
74
|
+
activeTabLabel: {},
|
|
75
|
+
centerHubItem: {},
|
|
76
|
+
centerHubIcon: {},
|
|
77
|
+
centerHubLabel: {}
|
|
75
78
|
});
|
|
76
79
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
|
80
|
+
addStyle('tabbar-spacer', '', {
|
|
81
|
+
root: {
|
|
82
|
+
height: 96
|
|
83
|
+
}
|
|
84
|
+
});
|
|
77
85
|
addStyle(DEFAULT_CLASS + '-1', '', {
|
|
78
86
|
root: {
|
|
79
87
|
height: undefined
|
|
@@ -96,5 +104,50 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
|
96
104
|
marginTop: 0
|
|
97
105
|
}
|
|
98
106
|
});
|
|
107
|
+
addStyle('clipped-tabbar', '', {
|
|
108
|
+
root: {
|
|
109
|
+
backgroundColor: themeVariables.transparent,
|
|
110
|
+
marginTop: -88
|
|
111
|
+
},
|
|
112
|
+
menu: {
|
|
113
|
+
backgroundColor: themeVariables.transparent
|
|
114
|
+
},
|
|
115
|
+
centerHubItem: {
|
|
116
|
+
width: 70,
|
|
117
|
+
height: 70,
|
|
118
|
+
shadowColor: 'grey',
|
|
119
|
+
shadowOpacity: 0.1,
|
|
120
|
+
opacity: 1,
|
|
121
|
+
shadowOffset: {
|
|
122
|
+
width: 2,
|
|
123
|
+
height: 0
|
|
124
|
+
},
|
|
125
|
+
shadowRadius: 2,
|
|
126
|
+
borderRadius: 35,
|
|
127
|
+
position: 'absolute',
|
|
128
|
+
bottom: 53,
|
|
129
|
+
alignItems: 'center',
|
|
130
|
+
justifyContent: 'center',
|
|
131
|
+
backgroundColor: themeVariables.centerHubItemColor,
|
|
132
|
+
left: themeVariables.maxWidth / 2 - 35
|
|
133
|
+
},
|
|
134
|
+
centerHubIcon: {
|
|
135
|
+
root: {
|
|
136
|
+
alignSelf: 'center',
|
|
137
|
+
paddingBottom: 0,
|
|
138
|
+
borderBottomColor: themeVariables.transparent,
|
|
139
|
+
borderBottomWidth: 0
|
|
140
|
+
},
|
|
141
|
+
icon: {
|
|
142
|
+
fontSize: 24,
|
|
143
|
+
color: themeVariables.centerHubIconColor
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
centerHubLabel: {
|
|
147
|
+
color: themeVariables.centerHubLabelColor,
|
|
148
|
+
marginTop: 0,
|
|
149
|
+
paddingBottom: 4
|
|
150
|
+
}
|
|
151
|
+
});
|
|
99
152
|
});
|
|
100
153
|
//# sourceMappingURL=tabbar.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","height","text","menu","flexDirection","backgroundColor","tabbarBackgroundColor","justifyContent","alignItems","modalContent","moreMenu","width","getStyle","shadowOffset","shadowOpacity","shadowRadius","moreMenuRow","paddingTop","paddingBottom","tabItem","minWidth","opacity","activeTabItem","tabIcon","alignSelf","borderBottomColor","transparent","borderBottomWidth","icon","fontSize","color","tabbarIconColor","activeTabIcon","tabLabel","fontWeight","textAlign","fontFamily","baseFont","marginTop","activeTabLabel","undefined","borderTopWidth","borderTopColor"],"sources":["tabbar.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 { WmIconStyles } from '../../basic/icon/icon.styles';\n\nexport type WmTabbarStyles = BaseStyles & {\n menu: AllStyle,\n modalContent: AllStyle,\n moreMenu: AllStyle,\n moreMenuRow: AllStyle,\n tabItem: AllStyle,\n activeTabItem: AllStyle,\n tabIcon: WmIconStyles,\n activeTabIcon: WmIconStyles,\n tabLabel: AllStyle,\n activeTabLabel: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-tabbar';\n BASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTabbarStyles = defineStyles<WmTabbarStyles>({\n root: {\n height: 88\n },\n text: {},\n menu: {\n height: '100%',\n flexDirection: 'row',\n backgroundColor: themeVariables.tabbarBackgroundColor,\n justifyContent: 'space-around',\n alignItems: 'flex-end',\n },\n modalContent: {},\n moreMenu: {\n width: '100%',\n flexDirection: 'column-reverse',\n justifyContent: 'flex-end',\n backgroundColor: themeVariables.tabbarBackgroundColor,\n ...BASE_THEME.getStyle('elevate1').root,\n shadowOffset: {\n width: 0,\n height: -6\n },\n shadowOpacity: 0.3,\n shadowRadius: 6\n },\n moreMenuRow: {\n flexDirection: 'row-reverse',\n justifyContent: 'space-around',\n width: '100%',\n paddingTop: 4,\n paddingBottom: 4\n },\n tabItem: {\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n minWidth: 60,\n opacity: 0.4\n },\n activeTabItem: {\n opacity: 1\n },\n tabIcon: {\n root: {\n alignSelf: 'center',\n paddingBottom: 32,\n borderBottomColor: themeVariables.transparent,\n borderBottomWidth: 4\n },\n icon: {\n fontSize: 36,\n color: themeVariables.tabbarIconColor\n }\n } as WmIconStyles,\n activeTabIcon: {\n root: {\n borderBottomColor: themeVariables.tabbarIconColor,\n }\n } as WmIconStyles,\n tabLabel: {\n fontSize: 14,\n fontWeight: '500',\n color: themeVariables.tabbarIconColor,\n textAlign: 'center',\n fontFamily: themeVariables.baseFont,\n marginTop: -32,\n paddingBottom: 14\n },\n activeTabLabel: {}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS+ '-1', '', {\n root: {\n height: undefined\n },\n tabItem: {\n justifyContent: 'space-between' \n },\n activeTabItem: {\n borderTopWidth: 4,\n borderTopColor: themeVariables.tabbarIconColor\n },\n tabIcon: {\n root: {\n paddingTop: 8,\n paddingBottom: 8,\n borderBottomWidth: 0\n }\n },\n tabLabel: {\n marginTop: 0\n }\n } as WmTabbarStyles);\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","height","text","menu","flexDirection","backgroundColor","tabbarBackgroundColor","justifyContent","alignItems","modalContent","moreMenu","width","getStyle","shadowOffset","shadowOpacity","shadowRadius","moreMenuRow","paddingTop","paddingBottom","tabItem","minWidth","opacity","activeTabItem","tabIcon","alignSelf","borderBottomColor","transparent","borderBottomWidth","icon","fontSize","color","tabbarIconColor","activeTabIcon","tabLabel","fontWeight","textAlign","fontFamily","baseFont","marginTop","activeTabLabel","centerHubItem","centerHubIcon","centerHubLabel","undefined","borderTopWidth","borderTopColor","shadowColor","borderRadius","position","bottom","centerHubItemColor","left","maxWidth","centerHubIconColor","centerHubLabelColor"],"sources":["tabbar.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 { WmIconStyles } from '../../basic/icon/icon.styles';\n\nexport type WmTabbarStyles = BaseStyles & {\n menu: AllStyle,\n modalContent: AllStyle,\n moreMenu: AllStyle,\n moreMenuRow: AllStyle,\n tabItem: AllStyle,\n activeTabItem: AllStyle,\n tabIcon: WmIconStyles,\n activeTabIcon: WmIconStyles,\n tabLabel: AllStyle,\n activeTabLabel: AllStyle,\n centerHubItem: AllStyle,\n centerHubIcon: WmIconStyles,\n centerHubLabel: AllStyle\n};\n\nexport const DEFAULT_CLASS = 'app-tabbar';\n BASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmTabbarStyles = defineStyles<WmTabbarStyles>({\n root: {\n height: 88\n },\n text: {},\n menu: {\n height: '100%',\n flexDirection: 'row',\n backgroundColor: themeVariables.tabbarBackgroundColor,\n justifyContent: 'space-around',\n alignItems: 'flex-end',\n },\n modalContent: {},\n moreMenu: {\n width: '100%',\n flexDirection: 'column-reverse',\n justifyContent: 'flex-end',\n backgroundColor: themeVariables.tabbarBackgroundColor,\n ...BASE_THEME.getStyle('elevate1').root,\n shadowOffset: {\n width: 0,\n height: -6\n },\n shadowOpacity: 0.3,\n shadowRadius: 6\n },\n moreMenuRow: {\n flexDirection: 'row-reverse',\n justifyContent: 'space-around',\n width: '100%',\n paddingTop: 4,\n paddingBottom: 4\n },\n tabItem: {\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n minWidth: 60,\n opacity: 0.4\n },\n activeTabItem: {\n opacity: 1\n },\n tabIcon: {\n root: {\n alignSelf: 'center',\n paddingBottom: 32,\n borderBottomColor: themeVariables.transparent,\n borderBottomWidth: 4\n },\n icon: {\n fontSize: 36,\n color: themeVariables.tabbarIconColor\n }\n } as WmIconStyles,\n activeTabIcon: {\n root: {\n borderBottomColor: themeVariables.tabbarIconColor,\n }\n } as WmIconStyles,\n tabLabel: {\n fontSize: 14,\n fontWeight: '500',\n color: themeVariables.tabbarIconColor,\n textAlign: 'center',\n fontFamily: themeVariables.baseFont,\n marginTop: -32,\n paddingBottom: 14\n },\n activeTabLabel: {},\n centerHubItem: {},\n centerHubIcon: {} as WmIconStyles, \n centerHubLabel:{}\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle('tabbar-spacer', '', {\n root: {\n height: 96\n }\n });\n addStyle(DEFAULT_CLASS+ '-1', '', {\n root: {\n height: undefined\n },\n tabItem: {\n justifyContent: 'space-between' \n },\n activeTabItem: {\n borderTopWidth: 4,\n borderTopColor: themeVariables.tabbarIconColor\n },\n tabIcon: {\n root: {\n paddingTop: 8,\n paddingBottom: 8,\n borderBottomWidth: 0\n }\n },\n tabLabel: {\n marginTop: 0\n }\n } as WmTabbarStyles);\n addStyle('clipped-tabbar', '', {\n root:{\n backgroundColor: themeVariables.transparent,\n marginTop: -88\n },\n menu: {\n backgroundColor: themeVariables.transparent\n },\n centerHubItem: {\n width: 70,\n height: 70,\n shadowColor: 'grey',\n shadowOpacity: 0.1,\n opacity: 1,\n shadowOffset: { width: 2, height: 0 },\n shadowRadius: 2,\n borderRadius: 35,\n position: 'absolute',\n bottom: 53,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: themeVariables.centerHubItemColor,\n left: (themeVariables.maxWidth/2) - 35\n },\n centerHubIcon: {\n root: {\n alignSelf: 'center',\n paddingBottom: 0,\n borderBottomColor: themeVariables.transparent,\n borderBottomWidth: 0 \n },\n icon: {\n fontSize: 24,\n color: themeVariables.centerHubIconColor\n }\n } as WmIconStyles, \n centerHubLabel:{\n color: themeVariables.centerHubLabelColor,\n marginTop: 0,\n paddingBottom: 4\n }\n })\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAmBxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACrCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACvD,MAAMC,aAA6B,GAAGL,YAAY,CAAiB;IAC/DM,IAAI,EAAE;MACFC,MAAM,EAAE;IACZ,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,IAAI,EAAE;MACFF,MAAM,EAAE,MAAM;MACdG,aAAa,EAAE,KAAK;MACpBC,eAAe,EAAER,cAAc,CAACS,qBAAqB;MACrDC,cAAc,EAAE,cAAc;MAC9BC,UAAU,EAAE;IAChB,CAAC;IACDC,YAAY,EAAE,CAAC,CAAC;IAChBC,QAAQ,EAAE;MACNC,KAAK,EAAE,MAAM;MACbP,aAAa,EAAE,gBAAgB;MAC/BG,cAAc,EAAE,UAAU;MAC1BF,eAAe,EAAER,cAAc,CAACS,qBAAqB;MACrD,GAAGb,UAAU,CAACmB,QAAQ,CAAC,UAAU,CAAC,CAACZ,IAAI;MACvCa,YAAY,EAAE;QACVF,KAAK,EAAE,CAAC;QACRV,MAAM,EAAE,CAAC;MACb,CAAC;MACDa,aAAa,EAAE,GAAG;MAClBC,YAAY,EAAE;IAClB,CAAC;IACDC,WAAW,EAAE;MACTZ,aAAa,EAAE,aAAa;MAC5BG,cAAc,EAAE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QAC7CC,iBAAiB,EAAE;MACvB,CAAC;MACDC,IAAI,EAAE;QACFC,QAAQ,EAAE,EAAE;QACZC,KAAK,EAAGjC,cAAc,CAACwD;MAC3B;IACJ,CAAiB;IACjBX,cAAc,EAAC;MACXZ,KAAK,EAAGjC,cAAc,CAACyD,mBAAmB;MAC1ChB,SAAS,EAAE,CAAC;MACZpB,aAAa,EAAE;IACnB;EACJ,CAAC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -51,6 +51,7 @@ export class BaseProps extends StyleProps {
|
|
|
51
51
|
_defineProperty(this, "listener", null);
|
|
52
52
|
_defineProperty(this, "showindevice", null);
|
|
53
53
|
_defineProperty(this, "showskeleton", false);
|
|
54
|
+
_defineProperty(this, "deferload", false);
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
export class BaseComponent extends React.Component {
|
|
@@ -76,6 +77,7 @@ export class BaseComponent extends React.Component {
|
|
|
76
77
|
_defineProperty(this, "loadAsset", null);
|
|
77
78
|
_defineProperty(this, "i18nService", injector.I18nService.get());
|
|
78
79
|
_defineProperty(this, "testIdPrefix", '');
|
|
80
|
+
_defineProperty(this, "_showView", true);
|
|
79
81
|
this.state = defaultState || {};
|
|
80
82
|
this.notifier.name = this.props.name || '';
|
|
81
83
|
this.propertyProvider = new PropsProvider(assign({
|
|
@@ -93,12 +95,14 @@ export class BaseComponent extends React.Component {
|
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
if (name === 'showskeleton' && this.initialized) {
|
|
96
|
-
this.cleanRefresh();
|
|
98
|
+
setTimeout(() => this.cleanRefresh(), 100);
|
|
97
99
|
}
|
|
98
100
|
this.onPropertyChange(name, $new, $old);
|
|
99
101
|
});
|
|
100
102
|
//@ts-ignore
|
|
101
103
|
this.state.props = this.propertyProvider.get();
|
|
104
|
+
//@ts-ignore
|
|
105
|
+
this._showView = !this.props.deferload;
|
|
102
106
|
this.propertyProvider.check();
|
|
103
107
|
//@ts-ignore
|
|
104
108
|
this.proxy = new Proxy(this, {
|
|
@@ -258,6 +262,9 @@ export class BaseComponent extends React.Component {
|
|
|
258
262
|
}
|
|
259
263
|
}
|
|
260
264
|
}
|
|
265
|
+
showView() {
|
|
266
|
+
return this.isVisible();
|
|
267
|
+
}
|
|
261
268
|
isVisible() {
|
|
262
269
|
const show = this.state.props.show;
|
|
263
270
|
return show !== false && show !== 'false' && show !== '0' && !isNil(show);
|
|
@@ -363,6 +370,9 @@ export class BaseComponent extends React.Component {
|
|
|
363
370
|
testID: id
|
|
364
371
|
};
|
|
365
372
|
}
|
|
373
|
+
getStyleClassName() {
|
|
374
|
+
return this.state.props.classname;
|
|
375
|
+
}
|
|
366
376
|
getTestPropsForInput(suffix) {
|
|
367
377
|
return this.getTestProps(suffix || 'i');
|
|
368
378
|
}
|
|
@@ -393,18 +403,20 @@ export class BaseComponent extends React.Component {
|
|
|
393
403
|
}
|
|
394
404
|
render() {
|
|
395
405
|
const props = this.state.props;
|
|
396
|
-
if (this.state.hide || !this.isVisible() && this.hideMode === HideMode.DONOT_ADD_TO_DOM) {
|
|
397
|
-
return null;
|
|
398
|
-
}
|
|
399
406
|
this.isFixed = false;
|
|
400
407
|
const selectedLocale = this.i18nService.getSelectedLocale();
|
|
401
408
|
return this.getDependenciesFromContext(() => {
|
|
402
409
|
WIDGET_LOGGER.info(() => `${this.props.name || this.constructor.name} is rendering.`);
|
|
410
|
+
this._showView = this._showView || this.showView();
|
|
411
|
+
if (this.state.hide || !this.isVisible() && this.hideMode === HideMode.DONOT_ADD_TO_DOM || !this._showView) {
|
|
412
|
+
return null;
|
|
413
|
+
}
|
|
414
|
+
const classname = this.getStyleClassName();
|
|
403
415
|
this.styles = this.theme.mergeStyle(this.getDefaultStyles(), {
|
|
404
416
|
text: this.theme.getStyle('app-' + selectedLocale)
|
|
405
417
|
}, {
|
|
406
418
|
text: this.theme.getStyle(this.defaultClass + '-' + selectedLocale)
|
|
407
|
-
}, props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null, this.isRTL ? this.theme.getStyle(this.defaultClass + '-rtl') : null,
|
|
419
|
+
}, props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null, this.isRTL ? this.theme.getStyle(this.defaultClass + '-rtl') : null, classname && this.theme.getStyle(classname), props.showindevice && this.theme.getStyle('d-all-none ' + props.showindevice.map(d => `d-${d}-flex`).join(' ')), this.props.styles, {
|
|
408
420
|
root: this.styleOverrides,
|
|
409
421
|
text: this.styleOverrides
|
|
410
422
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["assign","isUndefined","isNil","React","Platform","Animatable","ThemeVariables","StyleProps","getStyleName","BackgroundComponent","injector","ROOT_LOGGER","deepCopy","BASE_THEME","ThemeConsumer","ThemeEvent","EventNotifier","PropsProvider","assignIn","HideMode","AssetConsumer","FixedView","TextIdPrefixConsumer","WIDGET_LOGGER","extend","ParentContext","createContext","BaseComponentState","constructor","_defineProperty","undefined","defineStyles","styles","text","fontFamily","INSTANCE","baseFont","userSelect","BaseProps","arguments","BaseComponent","Component","markupProps","defaultClass","defaultProps","defaultState","ADD_TO_DOM","createElement","Fragment","I18nService","get","state","notifier","name","props","propertyProvider","show","$new","$old","debug","initialized","styleName","styleOverrides","cleanRefresh","onPropertyChange","check","proxy","Proxy","target","prop","receiver","propName","toString","has","Reflect","set","value","updateState","cleanup","push","updateStateTimeouts","forEach","v","clearTimeout","theme","subscribe","CHANGE","forceUpdate","destroyParentListeners","event","fn","notify","args","isRTL","i18nService","isRTLLocale","animate","setState","animationId","Date","now","animatableProps","setProp","setPropDefault","setDefault","getDefaultStyles","getStyle","reset","newPartialState","callback","destroyed","stateFn","oldState","oldProps","newState","Object","keys","k","onUpdateState","_this$props$listener","_this$props$listener2","listener","onComponentChange","timeoutId","setTimeout","splice","indexOf","shouldComponentUpdate","nextProps","nextState","nextContext","key","componentDidMount","onComponentInit","componentWillAttach","isFixed","hide","componentWillDetach","componentWillUnmount","onComponentDestroy","f","destroy","componentDidUpdate","prevProps","prevState","snapshot","invokeEventCallback","eventName","callBack","map","a","apply","e","console","error","isVisible","refresh","renderSkeleton","parentListenerDestroyers","setParent","parent","copyStyles","property","from","to","renderFixedContainer","style","rootStyle","left","top","bottom","right","width","height","root","mergeStyle","addAnimation","renderWidget","n","View","_extends","setBackground","bgStyle","_background","image","backgroundImage","position","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","borderRadius","getTestId","suffix","id","testIdPrefix","getTestProps","OS","accessibilityLabel","testID","accessible","getTestPropsForInput","getTestPropsForAction","getTestPropsForLabel","getDependenciesFromContext","loadAsset","Consumer","_this$parent","_showSkeleton","showskeleton","Provider","render","hideMode","DONOT_ADD_TO_DOM","selectedLocale","getSelectedLocale","info","disabled","classname","showindevice","d","join","hasOwnProperty","backgroundColor","eleToRender"],"sources":["base.component.tsx"],"sourcesContent":["import { assign, isUndefined, isNil } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { I18nManager, Platform, TextStyle, ViewStyle } from 'react-native';\nimport * as Application from 'expo-application';\nimport { AnimatableProperties } from 'react-native-animatable';\nimport * as Animatable from 'react-native-animatable';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { StyleProps, getStyleName } from '@wavemaker/app-rn-runtime/styles/style-props';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { ROOT_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';\nimport { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport BASE_THEME, { NamedStyles, AllStyle, ThemeConsumer, ThemeEvent, Theme } from '../styles/theme';\nimport EventNotifier from './event-notifier';\nimport { PropsProvider } from './props.provider';\nimport { assignIn } from 'lodash-es';\nimport { HideMode } from './if.component';\nimport { AssetConsumer } from './asset.provider';\nimport { FixedView } from './fixed-view.component';\nimport { TextIdPrefixConsumer } from './testid.provider';\n\nexport const WIDGET_LOGGER = ROOT_LOGGER.extend('widget');\n\nexport const ParentContext = React.createContext(null as any);\n\nexport class BaseComponentState<T extends BaseProps> {\n public animationId?: number = 0;\n public animatableProps?: AnimatableProperties<ViewStyle> = undefined;\n public props = {} as T;\n public hide? = false;\n}\n\nexport type BaseStyles = NamedStyles<any> & {\n root: AllStyle,\n text: TextStyle & {userSelect?: 'none'| 'text'}\n}\n\nexport function defineStyles<T>(styles: T): T {\n return deepCopy({\n text: {\n fontFamily: ThemeVariables.INSTANCE.baseFont,\n userSelect: 'text'\n }\n }, styles);\n}\n\nexport interface LifecycleListener {\n onComponentChange?: (c: BaseComponent<any, any, any>) => void;\n onComponentInit?: (c: BaseComponent<any, any, any>) => void;\n onComponentDestroy?: (c: BaseComponent<any, any, any>) => void;\n}\n\nexport class BaseProps extends StyleProps {\n id?: string = null as any;\n name?: string = null as any;\n key?: any = null as any;\n disabled? = false;\n show? = true as Boolean | String | Number;\n styles?: any = null;\n classname?: string = null as any;\n listener?: LifecycleListener = null as any;\n showindevice?: ('xs'|'sm'|'md'|'lg'|'xl'|'xxl')[] = null as any;\n showskeleton?: boolean = false;\n}\n\nexport abstract class BaseComponent<T extends BaseProps, S extends BaseComponentState<T>, L extends BaseStyles> extends React.Component<T, S> {\n public styles: L = null as any;\n public hideMode = HideMode.ADD_TO_DOM;\n private propertyProvider: PropsProvider<T>;\n public proxy: BaseComponent<T, S, L>;\n public initialized = false;\n public cleanup = [] as Function[];\n public theme = BASE_THEME;\n public updateStateTimeouts= [] as NodeJS.Timeout[];\n public parent: BaseComponent<any, any, any> = null as any;\n public destroyed = false;\n public _showSkeleton = false;\n public isFixed = false;\n private notifier = new EventNotifier();\n private parentListenerDestroyers = [] as Function[];\n public _background = <></>;\n private styleOverrides = {} as any;\n public loadAsset: (path: string) => number | string = null as any;\n private i18nService = injector.I18nService.get();\n public testIdPrefix = '';\n\n constructor(markupProps: T, public defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps);\n this.state = (defaultState || {} as S);\n this.notifier.name = this.props.name || '';\n this.propertyProvider = new PropsProvider<T>(\n assign({show: true}, defaultProps),\n assign({}, markupProps),\n (name: string, $new: any, $old: any) => {\n WIDGET_LOGGER.debug(() => `${this.props.name || this.constructor.name}: ${name} changed from ${$old} to ${$new}`);\n if (this.initialized) {\n const styleName = getStyleName(name);\n if (styleName) {\n if ($new === undefined) {\n delete this.styleOverrides[styleName];\n } else {\n this.styleOverrides[styleName] = $new;\n }\n }\n }\n if (name === 'showskeleton' && this.initialized) {\n this.cleanRefresh();\n }\n this.onPropertyChange(name, $new, $old);\n });\n //@ts-ignore\n this.state.props =this.propertyProvider.get();\n this.propertyProvider.check();\n //@ts-ignore\n this.proxy = (new Proxy(this, {\n get: (target, prop, receiver): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n //@ts-ignore\n return this.state.props[propName];\n }\n return Reflect.get(target, prop, receiver);\n },\n set: (target: any, prop, value: any): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n // @ts-ignore\n const props = {} as any;\n props[propName] = value;\n this.updateState({\n props: props\n } as S);\n return true;\n } else {\n return Reflect.set(target, prop, value);\n }\n }\n }));\n this.cleanup.push(() => {\n this.updateStateTimeouts.forEach(v => clearTimeout(v));\n });\n this.cleanup.push(this.theme.subscribe(ThemeEvent.CHANGE, () => {\n this.forceUpdate();\n }));\n this.cleanup.push(() => {\n this.destroyParentListeners();\n });\n }\n\n public subscribe(event: string, fn: Function) {\n return this.notifier.subscribe(event, fn);\n }\n\n public notify(event: string, args: any[]) {\n return this.notifier.notify(event, args);\n }\n\n public get isRTL(){\n return this.i18nService.isRTLLocale();\n }\n\n public animate(props: AnimatableProperties<ViewStyle>) {\n this.setState({\n animationId: Date.now(),\n animatableProps: props\n });\n }\n\n setProp(propName: string, value: any) {\n this.propertyProvider.set(propName, value);\n this.updateState({props:{}} as S);\n }\n\n setPropDefault(propName: string, value: any) {\n this.propertyProvider.setDefault(propName, value);\n }\n \n onPropertyChange(name: string, $new: any, $old: any) { \n }\n \n getDefaultStyles() {\n return this.theme.getStyle(this.defaultClass);\n }\n\n reset() {\n\n }\n\n updateState(newPartialState: S, callback?: ()=>void) {\n if (this.destroyed) {\n return;\n }\n const stateFn = (oldState: S) => {\n const oldProps = oldState.props;\n const newState = this.initialized ? assignIn({}, oldState, newPartialState) : assignIn(oldState, newPartialState);\n if (newPartialState.props) {\n Object.keys(newPartialState.props).forEach((k) => {\n //@ts-ignore\n oldProps[k] = newState.props[k];\n });\n newState.props = oldProps;\n }\n return newState;\n };\n const onUpdateState = () => {\n callback && callback();\n this.props.listener?.onComponentChange\n && this.props.listener?.onComponentChange(this);\n }\n if (!this.initialized) {\n this.state = stateFn(this.state);\n onUpdateState();\n } else {\n const timeoutId = setTimeout(() => {\n this.setState(stateFn, onUpdateState);\n this.updateStateTimeouts.splice(this.updateStateTimeouts.indexOf(timeoutId), 1);\n });\n this.updateStateTimeouts.push(timeoutId);\n }\n }\n\n shouldComponentUpdate(nextProps: T, nextState: S, nextContext: any) {\n if (this.propertyProvider.check(nextProps)) {\n return true;\n }\n for(let key in nextState) {\n if(key !== 'props' && (!(key in this.state) || nextState[key] !== this.state[key])) {\n return true;\n }\n }\n\n for(let key in this.state) {\n if(key !== 'props' && (!(key in nextState) || this.state[key] !== nextState[key])) {\n return true;\n }\n }\n return false;\n }\n\n componentDidMount() {\n if (this.props.listener && this.props.listener.onComponentInit) {\n this.props.listener.onComponentInit(this.proxy);\n }\n this.initialized = true;\n }\n\n componentWillAttach() {\n if (this.isFixed) {\n this.setState({hide: false});\n }\n }\n\n componentWillDetach() {\n if (this.isFixed) {\n this.setState({hide: true});\n }\n }\n\n componentWillUnmount() {\n this.destroyed = true;\n if (this.props.listener && this.props.listener.onComponentDestroy) {\n this.props.listener.onComponentDestroy(this.proxy);\n }\n this.cleanup.forEach(f => f && f());\n this.notifier.destroy();\n this.notifier.notify('destroy', []);\n }\n \n componentDidUpdate(prevProps: Readonly<T>, prevState: Readonly<S>, snapshot?: any): void {\n if (this.propertyProvider.check(this.props)) {\n this.forceUpdate();\n }\n }\n\n invokeEventCallback(eventName: string, args: any[]) {\n //@ts-ignore\n const callBack: Function = this.props[eventName];\n args = args && args.map(a => (a === this) ? this.proxy : a)\n if (callBack) {\n try {\n return callBack.apply(this.proxy, args);\n } catch(e) {\n console.error(e);\n }\n }\n }\n\n isVisible() {\n const show = this.state.props.show;\n return show !== false && show !== 'false' && show !== '0' && !isNil(show);\n }\n\n protected abstract renderWidget(props: T): ReactNode;\n\n public refresh() {\n this.forceUpdate();\n }\n\n public cleanRefresh() {\n this.forceUpdate(() => this.notifier.notify('forceUpdate', []));\n }\n \n public renderSkeleton (props: T): ReactNode {\n return null;\n }\n\n public destroyParentListeners() {\n this.parentListenerDestroyers.map(fn => fn());\n }\n\n private setParent(parent: BaseComponent<any, any, any>) {\n if (parent && this.parent !== parent) {\n this.parent = parent;\n this.notifier.setParent(parent.notifier);\n this.parentListenerDestroyers = [\n this.parent.subscribe('forceUpdate', () => {\n this.cleanRefresh();\n }),\n this.parent.subscribe('destroy', () => {\n this.destroyParentListeners();\n })\n ];\n }\n }\n\n copyStyles(property: string, from: any, to: any) {\n if (!isUndefined(from[property])) {\n to[property] = from[property];\n }\n }\n\n renderFixedContainer(props: T) {\n const style = {} as ViewStyle;\n const rootStyle = {\n left: 0,\n top: 0,\n bottom: 0,\n right: 0,\n width: \"100%\",\n height: \"100%\"\n } as ViewStyle;\n this.copyStyles('left', this.styles.root, style);\n this.copyStyles('top', this.styles.root, style);\n this.copyStyles('right', this.styles.root, style);\n this.copyStyles('bottom', this.styles.root, style);\n this.copyStyles('width', this.styles.root, style);\n this.copyStyles('height', this.styles.root, style);\n this.styles = this.theme.mergeStyle(this.styles, {root: rootStyle});\n return (<FixedView style={style} theme={this.theme}>{this.addAnimation(this.renderWidget(props))}</FixedView>);\n }\n\n private addAnimation(n: ReactNode) {\n if (!this.state.animatableProps) {\n return n;\n }\n return (<Animatable.View key={this.state.animationId} {...this.state.animatableProps}>{n}</Animatable.View>);\n }\n \n private setBackground() {\n const bgStyle = this.styles.root as any;\n this._background = (\n <BackgroundComponent \n image={bgStyle.backgroundImage}\n position={bgStyle.backgroundPosition}\n size={bgStyle.backgroundSize}\n repeat={bgStyle.backgroundRepeat}\n resizeMode={bgStyle.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}>\n </BackgroundComponent>\n );\n delete (this.styles.root as any)['backgroundImage'];\n delete (this.styles.root as any)['backgroundPosition'];\n delete (this.styles.root as any)['backgroundResizeMode'];\n delete (this.styles.root as any)['backgroundSize'];\n delete (this.styles.root as any)['backgroundRepeat'];\n }\n\n public getTestId(suffix?: string) {\n let id = this.props.id || this.props.name;\n if (this.testIdPrefix) {\n id = this.testIdPrefix + '_' + id;\n }\n if (suffix) {\n id = id + '_' + suffix;\n }\n return id;\n }\n\n public getTestProps(suffix?: string) {\n let id = this.getTestId(suffix);\n if (Platform.OS === 'android' || Platform.OS === 'web') {\n return {\n accessibilityLabel: id,\n testID: id\n };\n }\n return {\n accessible: false,\n testID: id\n };\n }\n\n public getTestPropsForInput(suffix?: string) {\n return this.getTestProps(suffix || 'i');\n }\n\n public getTestPropsForAction(suffix?: string) {\n return this.getTestProps(suffix || 'a');\n }\n\n public getTestPropsForLabel(suffix?: string) {\n return this.getTestProps(suffix || 'l');\n }\n\n private getDependenciesFromContext(fn: () => ReactNode) {\n return (\n <TextIdPrefixConsumer>\n {(testIdPrefix) => {\n this.testIdPrefix = testIdPrefix || '';\n return (<AssetConsumer>\n {(loadAsset) => {\n this.loadAsset = loadAsset;\n return (<ParentContext.Consumer>\n {(parent) => {\n this.setParent(parent);\n this._showSkeleton = this.parent?._showSkeleton \n || !!this.state.props.showskeleton;\n return (\n <ParentContext.Provider value={this}>\n <ThemeConsumer>\n {(theme) => { \n this.theme = theme || BASE_THEME;\n return fn();\n }}\n </ThemeConsumer>\n </ParentContext.Provider>);\n }} \n </ParentContext.Consumer>);\n }}\n </AssetConsumer>);\n }}\n </TextIdPrefixConsumer>); \n }\n \n public render(): ReactNode {\n const props = this.state.props;\n if (this.state.hide || (!this.isVisible() && this.hideMode === HideMode.DONOT_ADD_TO_DOM)) {\n return null;\n }\n this.isFixed = false;\n const selectedLocale = this.i18nService.getSelectedLocale();\n return this.getDependenciesFromContext(() => {\n WIDGET_LOGGER.info(() => `${this.props.name || this.constructor.name} is rendering.`);\n this.styles = this.theme.mergeStyle(\n this.getDefaultStyles(),\n {text: this.theme.getStyle('app-' + selectedLocale)},\n {text: this.theme.getStyle(this.defaultClass + '-' + selectedLocale)},\n props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null,\n this.isRTL ? this.theme.getStyle(this.defaultClass + '-rtl') : null,\n props.classname && this.theme.getStyle(props.classname),\n props.showindevice && this.theme.getStyle('d-all-none ' + props.showindevice.map(d => `d-${d}-flex`).join(' ')),\n this.props.styles,\n {\n root: this.styleOverrides,\n text: this.styleOverrides\n });\n if (this.styles.root.hasOwnProperty('_background')) {\n delete this.styles.root.backgroundColor;\n }\n if (!this.isVisible()) {\n assign(this.styles, this.theme.getStyle('hidden'))\n }\n let eleToRender = (this._showSkeleton && this.renderSkeleton(props));\n if (eleToRender) {\n return eleToRender;\n }\n this.setBackground();\n this.isFixed = (this.styles.root.position as any) === 'fixed';\n if (this.isFixed) {\n this.styles.root.position = undefined;\n return this.renderFixedContainer(props);\n }\n return this.addAnimation(this.renderWidget(this.state.props)); \n });\n }\n}\n"],"mappings":";;;;AAAA,SAASA,MAAM,EAAEC,WAAW,EAAEC,KAAK,QAAQ,QAAQ;AACnD,OAAOC,KAAK,MAAqB,OAAO;AACxC,SAAsBC,QAAQ,QAA8B,cAAc;AAG1E,OAAO,KAAKC,UAAU,MAAM,yBAAyB;AACrD,OAAOC,cAAc,MAAM,kDAAkD;AAC7E,SAASC,UAAU,EAAEC,YAAY,QAAQ,8CAA8C;AACvF,SAASC,mBAAmB,QAAQ,uDAAuD;AAC3F,OAAOC,QAAQ,M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AO,EAAE;QACd,IAAI,CAACvG,MAAM,CAAC8I,IAAI,CAACY,QAAQ,GAAI5J,SAAS;QACtC,OAAO,IAAI,CAACuI,oBAAoB,CAAC/G,KAAK,CAAC;MAC3C;MACA,OAAO,IAAI,CAAC0H,YAAY,CAAC,IAAI,CAACC,YAAY,CAAC,IAAI,CAAC9H,KAAK,CAACG,KAAK,CAAC,CAAC;IACjE,CAAC,CAAC;EACN;AACJ"}
|
|
1
|
+
{"version":3,"names":["assign","isUndefined","isNil","React","Platform","Animatable","ThemeVariables","StyleProps","getStyleName","BackgroundComponent","injector","ROOT_LOGGER","deepCopy","BASE_THEME","ThemeConsumer","ThemeEvent","EventNotifier","PropsProvider","assignIn","HideMode","AssetConsumer","FixedView","TextIdPrefixConsumer","WIDGET_LOGGER","extend","ParentContext","createContext","BaseComponentState","constructor","_defineProperty","undefined","defineStyles","styles","text","fontFamily","INSTANCE","baseFont","userSelect","BaseProps","arguments","BaseComponent","Component","markupProps","defaultClass","defaultProps","defaultState","ADD_TO_DOM","createElement","Fragment","I18nService","get","state","notifier","name","props","propertyProvider","show","$new","$old","debug","initialized","styleName","styleOverrides","setTimeout","cleanRefresh","onPropertyChange","_showView","deferload","check","proxy","Proxy","target","prop","receiver","propName","toString","has","Reflect","set","value","updateState","cleanup","push","updateStateTimeouts","forEach","v","clearTimeout","theme","subscribe","CHANGE","forceUpdate","destroyParentListeners","event","fn","notify","args","isRTL","i18nService","isRTLLocale","animate","setState","animationId","Date","now","animatableProps","setProp","setPropDefault","setDefault","getDefaultStyles","getStyle","reset","newPartialState","callback","destroyed","stateFn","oldState","oldProps","newState","Object","keys","k","onUpdateState","_this$props$listener","_this$props$listener2","listener","onComponentChange","timeoutId","splice","indexOf","shouldComponentUpdate","nextProps","nextState","nextContext","key","componentDidMount","onComponentInit","componentWillAttach","isFixed","hide","componentWillDetach","componentWillUnmount","onComponentDestroy","f","destroy","componentDidUpdate","prevProps","prevState","snapshot","invokeEventCallback","eventName","callBack","map","a","apply","e","console","error","showView","isVisible","refresh","renderSkeleton","parentListenerDestroyers","setParent","parent","copyStyles","property","from","to","renderFixedContainer","style","rootStyle","left","top","bottom","right","width","height","root","mergeStyle","addAnimation","renderWidget","n","View","_extends","setBackground","bgStyle","_background","image","backgroundImage","position","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","borderRadius","getTestId","suffix","id","testIdPrefix","getTestProps","OS","accessibilityLabel","testID","accessible","getStyleClassName","classname","getTestPropsForInput","getTestPropsForAction","getTestPropsForLabel","getDependenciesFromContext","loadAsset","Consumer","_this$parent","_showSkeleton","showskeleton","Provider","render","selectedLocale","getSelectedLocale","info","hideMode","DONOT_ADD_TO_DOM","disabled","showindevice","d","join","hasOwnProperty","backgroundColor","eleToRender"],"sources":["base.component.tsx"],"sourcesContent":["import { assign, isUndefined, isNil } from 'lodash';\nimport React, { ReactNode } from 'react';\nimport { I18nManager, Platform, TextStyle, ViewStyle } from 'react-native';\nimport * as Application from 'expo-application';\nimport { AnimatableProperties } from 'react-native-animatable';\nimport * as Animatable from 'react-native-animatable';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { StyleProps, getStyleName } from '@wavemaker/app-rn-runtime/styles/style-props';\nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\nimport { ROOT_LOGGER } from '@wavemaker/app-rn-runtime/core/logger';\nimport { deepCopy, isWebPreviewMode } from '@wavemaker/app-rn-runtime/core/utils';\nimport BASE_THEME, { NamedStyles, AllStyle, ThemeConsumer, ThemeEvent, Theme } from '../styles/theme';\nimport EventNotifier from './event-notifier';\nimport { PropsProvider } from './props.provider';\nimport { assignIn } from 'lodash-es';\nimport { HideMode } from './if.component';\nimport { AssetConsumer } from './asset.provider';\nimport { FixedView } from './fixed-view.component';\nimport { TextIdPrefixConsumer } from './testid.provider';\n\nexport const WIDGET_LOGGER = ROOT_LOGGER.extend('widget');\n\nexport const ParentContext = React.createContext(null as any);\n\nexport class BaseComponentState<T extends BaseProps> {\n public animationId?: number = 0;\n public animatableProps?: AnimatableProperties<ViewStyle> = undefined;\n public props = {} as T;\n public hide? = false;\n}\n\nexport type BaseStyles = NamedStyles<any> & {\n root: AllStyle,\n text: TextStyle & {userSelect?: 'none'| 'text'}\n}\n\nexport function defineStyles<T>(styles: T): T {\n return deepCopy({\n text: {\n fontFamily: ThemeVariables.INSTANCE.baseFont,\n userSelect: 'text'\n }\n }, styles);\n}\n\nexport interface LifecycleListener {\n onComponentChange?: (c: BaseComponent<any, any, any>) => void;\n onComponentInit?: (c: BaseComponent<any, any, any>) => void;\n onComponentDestroy?: (c: BaseComponent<any, any, any>) => void;\n}\n\nexport class BaseProps extends StyleProps {\n id?: string = null as any;\n name?: string = null as any;\n key?: any = null as any;\n disabled? = false;\n show? = true as Boolean | String | Number;\n styles?: any = null;\n classname?: string = null as any;\n listener?: LifecycleListener = null as any;\n showindevice?: ('xs'|'sm'|'md'|'lg'|'xl'|'xxl')[] = null as any;\n showskeleton?: boolean = false;\n deferload?: boolean = false;\n}\n\nexport abstract class BaseComponent<T extends BaseProps, S extends BaseComponentState<T>, L extends BaseStyles> extends React.Component<T, S> {\n public styles: L = null as any;\n public hideMode = HideMode.ADD_TO_DOM;\n private propertyProvider: PropsProvider<T>;\n public proxy: BaseComponent<T, S, L>;\n public initialized = false;\n public cleanup = [] as Function[];\n public theme = BASE_THEME;\n public updateStateTimeouts= [] as NodeJS.Timeout[];\n public parent: BaseComponent<any, any, any> = null as any;\n public destroyed = false;\n public _showSkeleton = false;\n public isFixed = false;\n private notifier = new EventNotifier();\n private parentListenerDestroyers = [] as Function[];\n public _background = <></>;\n private styleOverrides = {} as any;\n public loadAsset: (path: string) => number | string = null as any;\n private i18nService = injector.I18nService.get();\n public testIdPrefix = '';\n private _showView = true;\n\n constructor(markupProps: T, public defaultClass: string, defaultProps?: T, defaultState?: S) {\n super(markupProps);\n this.state = (defaultState || {} as S);\n this.notifier.name = this.props.name || '';\n this.propertyProvider = new PropsProvider<T>(\n assign({show: true}, defaultProps),\n assign({}, markupProps),\n (name: string, $new: any, $old: any) => {\n WIDGET_LOGGER.debug(() => `${this.props.name || this.constructor.name}: ${name} changed from ${$old} to ${$new}`);\n if (this.initialized) {\n const styleName = getStyleName(name);\n if (styleName) {\n if ($new === undefined) {\n delete this.styleOverrides[styleName];\n } else {\n this.styleOverrides[styleName] = $new;\n }\n }\n }\n if (name === 'showskeleton' && this.initialized) {\n setTimeout(() => this.cleanRefresh(), 100);\n }\n this.onPropertyChange(name, $new, $old);\n });\n //@ts-ignore\n this.state.props =this.propertyProvider.get();\n //@ts-ignore\n this._showView = !this.props.deferload;\n this.propertyProvider.check();\n //@ts-ignore\n this.proxy = (new Proxy(this, {\n get: (target, prop, receiver): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n //@ts-ignore\n return this.state.props[propName];\n }\n return Reflect.get(target, prop, receiver);\n },\n set: (target: any, prop, value: any): any => {\n const propName = prop.toString();\n if (this.propertyProvider.has(propName)) {\n // @ts-ignore\n const props = {} as any;\n props[propName] = value;\n this.updateState({\n props: props\n } as S);\n return true;\n } else {\n return Reflect.set(target, prop, value);\n }\n }\n }));\n this.cleanup.push(() => {\n this.updateStateTimeouts.forEach(v => clearTimeout(v));\n });\n this.cleanup.push(this.theme.subscribe(ThemeEvent.CHANGE, () => {\n this.forceUpdate();\n }));\n this.cleanup.push(() => {\n this.destroyParentListeners();\n });\n }\n\n public subscribe(event: string, fn: Function) {\n return this.notifier.subscribe(event, fn);\n }\n\n public notify(event: string, args: any[]) {\n return this.notifier.notify(event, args);\n }\n\n public get isRTL(){\n return this.i18nService.isRTLLocale();\n }\n\n public animate(props: AnimatableProperties<ViewStyle>) {\n this.setState({\n animationId: Date.now(),\n animatableProps: props\n });\n }\n\n setProp(propName: string, value: any) {\n this.propertyProvider.set(propName, value);\n this.updateState({props:{}} as S);\n }\n\n setPropDefault(propName: string, value: any) {\n this.propertyProvider.setDefault(propName, value);\n }\n \n onPropertyChange(name: string, $new: any, $old: any) { \n }\n \n getDefaultStyles() {\n return this.theme.getStyle(this.defaultClass);\n }\n\n reset() {\n\n }\n\n updateState(newPartialState: S, callback?: ()=>void) {\n if (this.destroyed) {\n return;\n }\n const stateFn = (oldState: S) => {\n const oldProps = oldState.props;\n const newState = this.initialized ? assignIn({}, oldState, newPartialState) : assignIn(oldState, newPartialState);\n if (newPartialState.props) {\n Object.keys(newPartialState.props).forEach((k) => {\n //@ts-ignore\n oldProps[k] = newState.props[k];\n });\n newState.props = oldProps;\n }\n return newState;\n };\n const onUpdateState = () => {\n callback && callback();\n this.props.listener?.onComponentChange\n && this.props.listener?.onComponentChange(this);\n }\n if (!this.initialized) {\n this.state = stateFn(this.state);\n onUpdateState();\n } else {\n const timeoutId = setTimeout(() => {\n this.setState(stateFn, onUpdateState);\n this.updateStateTimeouts.splice(this.updateStateTimeouts.indexOf(timeoutId), 1);\n });\n this.updateStateTimeouts.push(timeoutId);\n }\n }\n\n shouldComponentUpdate(nextProps: T, nextState: S, nextContext: any) {\n if (this.propertyProvider.check(nextProps)) {\n return true;\n }\n for(let key in nextState) {\n if(key !== 'props' && (!(key in this.state) || nextState[key] !== this.state[key])) {\n return true;\n }\n }\n\n for(let key in this.state) {\n if(key !== 'props' && (!(key in nextState) || this.state[key] !== nextState[key])) {\n return true;\n }\n }\n return false;\n }\n\n componentDidMount() {\n if (this.props.listener && this.props.listener.onComponentInit) {\n this.props.listener.onComponentInit(this.proxy);\n }\n this.initialized = true;\n }\n\n componentWillAttach() {\n if (this.isFixed) {\n this.setState({hide: false});\n }\n }\n\n componentWillDetach() {\n if (this.isFixed) {\n this.setState({hide: true});\n }\n }\n\n componentWillUnmount() {\n this.destroyed = true;\n if (this.props.listener && this.props.listener.onComponentDestroy) {\n this.props.listener.onComponentDestroy(this.proxy);\n }\n this.cleanup.forEach(f => f && f());\n this.notifier.destroy();\n this.notifier.notify('destroy', []);\n }\n \n componentDidUpdate(prevProps: Readonly<T>, prevState: Readonly<S>, snapshot?: any): void {\n if (this.propertyProvider.check(this.props)) {\n this.forceUpdate();\n }\n }\n\n invokeEventCallback(eventName: string, args: any[]) {\n //@ts-ignore\n const callBack: Function = this.props[eventName];\n args = args && args.map(a => (a === this) ? this.proxy : a)\n if (callBack) {\n try {\n return callBack.apply(this.proxy, args);\n } catch(e) {\n console.error(e);\n }\n }\n }\n\n showView() {\n return this.isVisible();\n }\n\n isVisible() {\n const show = this.state.props.show;\n return show !== false && show !== 'false' && show !== '0' && !isNil(show);\n }\n\n protected abstract renderWidget(props: T): ReactNode;\n\n public refresh() {\n this.forceUpdate();\n }\n\n public cleanRefresh() {\n this.forceUpdate(() => this.notifier.notify('forceUpdate', []));\n }\n \n public renderSkeleton (props: T): ReactNode {\n return null;\n }\n\n public destroyParentListeners() {\n this.parentListenerDestroyers.map(fn => fn());\n }\n\n private setParent(parent: BaseComponent<any, any, any>) {\n if (parent && this.parent !== parent) {\n this.parent = parent;\n this.notifier.setParent(parent.notifier);\n this.parentListenerDestroyers = [\n this.parent.subscribe('forceUpdate', () => {\n this.cleanRefresh();\n }),\n this.parent.subscribe('destroy', () => {\n this.destroyParentListeners();\n })\n ];\n }\n }\n\n copyStyles(property: string, from: any, to: any) {\n if (!isUndefined(from[property])) {\n to[property] = from[property];\n }\n }\n\n renderFixedContainer(props: T) {\n const style = {} as ViewStyle;\n const rootStyle = {\n left: 0,\n top: 0,\n bottom: 0,\n right: 0,\n width: \"100%\",\n height: \"100%\"\n } as ViewStyle;\n this.copyStyles('left', this.styles.root, style);\n this.copyStyles('top', this.styles.root, style);\n this.copyStyles('right', this.styles.root, style);\n this.copyStyles('bottom', this.styles.root, style);\n this.copyStyles('width', this.styles.root, style);\n this.copyStyles('height', this.styles.root, style);\n this.styles = this.theme.mergeStyle(this.styles, {root: rootStyle});\n return (<FixedView style={style} theme={this.theme}>{this.addAnimation(this.renderWidget(props))}</FixedView>);\n }\n\n private addAnimation(n: ReactNode) {\n if (!this.state.animatableProps) {\n return n;\n }\n return (<Animatable.View key={this.state.animationId} {...this.state.animatableProps}>{n}</Animatable.View>);\n }\n \n private setBackground() {\n const bgStyle = this.styles.root as any;\n this._background = (\n <BackgroundComponent \n image={bgStyle.backgroundImage}\n position={bgStyle.backgroundPosition}\n size={bgStyle.backgroundSize}\n repeat={bgStyle.backgroundRepeat}\n resizeMode={bgStyle.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}>\n </BackgroundComponent>\n );\n delete (this.styles.root as any)['backgroundImage'];\n delete (this.styles.root as any)['backgroundPosition'];\n delete (this.styles.root as any)['backgroundResizeMode'];\n delete (this.styles.root as any)['backgroundSize'];\n delete (this.styles.root as any)['backgroundRepeat'];\n }\n\n public getTestId(suffix?: string) {\n let id = this.props.id || this.props.name;\n if (this.testIdPrefix) {\n id = this.testIdPrefix + '_' + id;\n }\n if (suffix) {\n id = id + '_' + suffix;\n }\n return id;\n }\n\n public getTestProps(suffix?: string) {\n let id = this.getTestId(suffix);\n if (Platform.OS === 'android' || Platform.OS === 'web') {\n return {\n accessibilityLabel: id,\n testID: id\n };\n }\n return {\n accessible: false,\n testID: id\n };\n }\n\n public getStyleClassName() {\n return this.state.props.classname;\n }\n\n public getTestPropsForInput(suffix?: string) {\n return this.getTestProps(suffix || 'i');\n }\n\n public getTestPropsForAction(suffix?: string) {\n return this.getTestProps(suffix || 'a');\n }\n\n public getTestPropsForLabel(suffix?: string) {\n return this.getTestProps(suffix || 'l');\n }\n\n private getDependenciesFromContext(fn: () => ReactNode) {\n return (\n <TextIdPrefixConsumer>\n {(testIdPrefix) => {\n this.testIdPrefix = testIdPrefix || '';\n return (<AssetConsumer>\n {(loadAsset) => {\n this.loadAsset = loadAsset;\n return (<ParentContext.Consumer>\n {(parent) => {\n this.setParent(parent);\n this._showSkeleton = this.parent?._showSkeleton \n || !!this.state.props.showskeleton;\n return (\n <ParentContext.Provider value={this}>\n <ThemeConsumer>\n {(theme) => { \n this.theme = theme || BASE_THEME;\n return fn();\n }}\n </ThemeConsumer>\n </ParentContext.Provider>);\n }} \n </ParentContext.Consumer>);\n }}\n </AssetConsumer>);\n }}\n </TextIdPrefixConsumer>); \n }\n \n public render(): ReactNode {\n const props = this.state.props;\n this.isFixed = false;\n const selectedLocale = this.i18nService.getSelectedLocale();\n return this.getDependenciesFromContext(() => {\n WIDGET_LOGGER.info(() => `${this.props.name || this.constructor.name} is rendering.`);\n this._showView = this._showView || this.showView();\n if (this.state.hide \n || (!this.isVisible() && this.hideMode === HideMode.DONOT_ADD_TO_DOM)\n || !this._showView) {\n return null;\n }\n const classname = this.getStyleClassName();\n this.styles = this.theme.mergeStyle(\n this.getDefaultStyles(),\n {text: this.theme.getStyle('app-' + selectedLocale)},\n {text: this.theme.getStyle(this.defaultClass + '-' + selectedLocale)},\n props.disabled ? this.theme.getStyle(this.defaultClass + '-disabled') : null,\n this.isRTL ? this.theme.getStyle(this.defaultClass + '-rtl') : null,\n classname && this.theme.getStyle(classname),\n props.showindevice && this.theme.getStyle('d-all-none ' + props.showindevice.map(d => `d-${d}-flex`).join(' ')),\n this.props.styles,\n {\n root: this.styleOverrides,\n text: this.styleOverrides\n });\n if (this.styles.root.hasOwnProperty('_background')) {\n delete this.styles.root.backgroundColor;\n }\n if (!this.isVisible()) {\n assign(this.styles, this.theme.getStyle('hidden'))\n }\n let eleToRender = (this._showSkeleton && this.renderSkeleton(props));\n if (eleToRender) {\n return eleToRender;\n }\n this.setBackground();\n this.isFixed = (this.styles.root.position as any) === 'fixed';\n if (this.isFixed) {\n this.styles.root.position = undefined;\n return this.renderFixedContainer(props);\n }\n return this.addAnimation(this.renderWidget(this.state.props)); \n });\n }\n}\n"],"mappings":";;;;AAAA,SAASA,MAAM,EAAEC,WAAW,EAAEC,KAAK,QAAQ,QAAQ;AACnD,OAAOC,KAAK,MAAqB,OAAO;AACxC,SAAsBC,QAAQ,QAA8B,cAAc;AAG1E,OAAO,KAAKC,UAAU,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,EAAE,IAAI,CAAC6B;MACf,CAAC,CAAC;MACN,IAAI,IAAI,CAAC9B,MAAM,CAACiJ,IAAI,CAACoD,cAAc,CAAC,aAAa,CAAC,EAAE;QAChD,OAAO,IAAI,CAACrM,MAAM,CAACiJ,IAAI,CAACqD,eAAe;MAC3C;MACA,IAAI,CAAC,IAAI,CAACxE,SAAS,CAAC,CAAC,EAAE;QACnB9J,MAAM,CAAC,IAAI,CAACgC,MAAM,EAAE,IAAI,CAACuD,KAAK,CAACsB,QAAQ,CAAC,QAAQ,CAAC,CAAC;MACtD;MACA,IAAI0H,WAAW,GAAI,IAAI,CAACf,aAAa,IAAI,IAAI,CAACxD,cAAc,CAAC1G,KAAK,CAAE;MACpE,IAAIiL,WAAW,EAAE;QACb,OAAOA,WAAW;MACtB;MACA,IAAI,CAAC/C,aAAa,CAAC,CAAC;MACpB,IAAI,CAAC/C,OAAO,GAAI,IAAI,CAACzG,MAAM,CAACiJ,IAAI,CAACY,QAAQ,KAAa,OAAO;MAC7D,IAAI,IAAI,CAACpD,OAAO,EAAE;QACd,IAAI,CAACzG,MAAM,CAACiJ,IAAI,CAACY,QAAQ,GAAI/J,SAAS;QACtC,OAAO,IAAI,CAAC0I,oBAAoB,CAAClH,KAAK,CAAC;MAC3C;MACA,OAAO,IAAI,CAAC6H,YAAY,CAAC,IAAI,CAACC,YAAY,CAAC,IAAI,CAACjI,KAAK,CAACG,KAAK,CAAC,CAAC;IACjE,CAAC,CAAC;EACN;AACJ"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { Animated, Text } from 'react-native';
|
|
3
|
+
import { Theme } from '@wavemaker/app-rn-runtime/styles/theme';
|
|
4
|
+
export const FloatingLabel = props => {
|
|
5
|
+
var _props$style, _props$style2;
|
|
6
|
+
const width = ((_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.width) || 160;
|
|
7
|
+
const [labelPositionX] = useState(new Animated.Value(0));
|
|
8
|
+
const [labelPositionY] = useState(new Animated.Value(0));
|
|
9
|
+
const [labelScale] = useState(new Animated.Value(1));
|
|
10
|
+
const fontSize = ((_props$style2 = props.style) === null || _props$style2 === void 0 ? void 0 : _props$style2.fontSize) || 16;
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
Animated.parallel([Animated.timing(labelPositionX, {
|
|
13
|
+
toValue: props.moveUp ? -1 * 0.1 * width : 0,
|
|
14
|
+
duration: 200,
|
|
15
|
+
useNativeDriver: true
|
|
16
|
+
}), Animated.timing(labelPositionY, {
|
|
17
|
+
toValue: props.moveUp ? -1 * fontSize : 0,
|
|
18
|
+
duration: 200,
|
|
19
|
+
useNativeDriver: true
|
|
20
|
+
}), Animated.timing(labelScale, {
|
|
21
|
+
toValue: props.moveUp ? 0.8 : 1,
|
|
22
|
+
duration: 200,
|
|
23
|
+
useNativeDriver: true
|
|
24
|
+
})]).start();
|
|
25
|
+
}, [props.moveUp]);
|
|
26
|
+
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
27
|
+
style: [{
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
zIndex: 1,
|
|
30
|
+
width: width,
|
|
31
|
+
transform: [{
|
|
32
|
+
translateY: labelPositionY
|
|
33
|
+
}, {
|
|
34
|
+
translateX: labelPositionX
|
|
35
|
+
}, {
|
|
36
|
+
scale: labelScale
|
|
37
|
+
}]
|
|
38
|
+
}, props.style],
|
|
39
|
+
pointerEvents: "none"
|
|
40
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
41
|
+
style: Theme.BASE.getTextStyle(props.style),
|
|
42
|
+
ellipsizeMode: "tail"
|
|
43
|
+
}, props.label));
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=floatinglabel.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","Animated","Text","Theme","FloatingLabel","props","_props$style","_props$style2","width","style","labelPositionX","Value","labelPositionY","labelScale","fontSize","parallel","timing","toValue","moveUp","duration","useNativeDriver","start","createElement","View","position","zIndex","transform","translateY","translateX","scale","pointerEvents","BASE","getTextStyle","ellipsizeMode","label"],"sources":["floatinglabel.component.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Animated, TextStyle, Text} from 'react-native';\n\nimport { Theme } from '@wavemaker/app-rn-runtime/styles/theme';\n\nexport const FloatingLabel = (props: {\n label?: string,\n style?: TextStyle\n moveUp: boolean,\n }) => {\n const width = (props.style?.width as number) || 160;\n const [labelPositionX] = useState(new Animated.Value(0));\n const [labelPositionY] = useState(new Animated.Value(0));\n const [labelScale] = useState(new Animated.Value(1));\n const fontSize = (props.style?.fontSize || 16);\n useEffect(() => {\n Animated.parallel([\n Animated.timing(labelPositionX, {\n toValue: props.moveUp ? -1 * 0.1 * width : 0,\n duration: 200,\n useNativeDriver: true,\n }),\n Animated.timing(labelPositionY, {\n toValue: props.moveUp ? -1 * fontSize : 0,\n duration: 200,\n useNativeDriver: true,\n }),\n Animated.timing(labelScale, {\n toValue: props.moveUp ? 0.8 : 1,\n duration: 200,\n useNativeDriver: true,\n })\n ]).start();\n }, [props.moveUp]);\n return (\n <Animated.View style={[{\n position: 'absolute',\n zIndex: 1,\n width: width,\n transform: [\n {translateY: labelPositionY},\n {translateX: labelPositionX},\n {scale: labelScale}\n ]},\n props.style\n ]}\n pointerEvents=\"none\">\n <Text\n style={Theme.BASE.getTextStyle(props.style)}\n ellipsizeMode=\"tail\">\n {props.label}\n </Text>\n </Animated.View>\n );\n };\n "],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,QAAQ,EAAaC,IAAI,QAAO,cAAc;AAEvD,SAASC,KAAK,QAAQ,wCAAwC;AAE9D,OAAO,MAAMC,aAAa,GAAIC,KAI3B,IAAK;EAAA,IAAAC,YAAA,EAAAC,aAAA;EACJ,MAAMC,KAAK,GAAG,EAAAF,YAAA,GAACD,KAAK,CAACI,KAAK,cAAAH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rB,QAAQ,CAACsB,IAAI;IAACd,KAAK,EAAE,CAAC;MACnBe,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAE,CAAC;MACTjB,KAAK,EAAEA,KAAK;MACZkB,SAAS,EAAE,CACP;QAACC,UAAU,EAAEf;MAAc,CAAC,EAC5B;QAACgB,UAAU,EAAElB;MAAc,CAAC,EAC5B;QAACmB,KAAK,EAAEhB;MAAU,CAAC;IACtB,CAAC,EACFR,KAAK,CAACI,KAAK,CACb;IACFqB,aAAa,EAAC;EAAM,gBAClBhC,KAAA,CAAAwB,aAAA,CAACpB,IAAI;IACHO,KAAK,EAAEN,KAAK,CAAC4B,IAAI,CAACC,YAAY,CAAC3B,KAAK,CAACI,KAAK,CAAE;IAC5CwB,aAAa,EAAC;EAAM,GACnB5B,KAAK,CAAC6B,KACH,CACO,CAAC;AAEtB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
3
3
|
import { Animated, Platform, Text, TextInput, View } from 'react-native';
|
|
4
4
|
import { isArray } from 'lodash';
|
|
5
5
|
import IMask from 'imask';
|
|
6
|
+
import { FloatingLabel } from './floatinglabel.component';
|
|
6
7
|
const WmCursor = /*#__PURE__*/React.memo(props => {
|
|
7
8
|
const opacityAnimation = useRef(new Animated.Value(0.5)).current;
|
|
8
9
|
const runAnimation = useCallback(() => {
|
|
@@ -124,7 +125,14 @@ export const WMTextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
124
125
|
opts[valueExpr] = value.current;
|
|
125
126
|
const textStyle = Object.assign({}, ...(isArray(props.style) ? props.style : [props.style]));
|
|
126
127
|
const hideInput = props.displayformat || props.maskchar;
|
|
127
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
128
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, props.floatingLabel ? /*#__PURE__*/React.createElement(FloatingLabel, {
|
|
129
|
+
moveUp: !!(value.current || isInputFocused || displayValue),
|
|
130
|
+
label: props.floatingLabel ?? props.placeholder,
|
|
131
|
+
style: {
|
|
132
|
+
...(props.floatingLabelStyle || []),
|
|
133
|
+
...(isInputFocused ? props.activeFloatingLabelStyle || {} : {})
|
|
134
|
+
}
|
|
135
|
+
}) : null, /*#__PURE__*/React.createElement(TextInput, _extends({}, props, hideInput ? opts : {}, {
|
|
128
136
|
placeholder: props.floatingLabel || displayValue ? '' : props.placeholder,
|
|
129
137
|
style: [props.style, hideInput ? {
|
|
130
138
|
color: 'transparent',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useRef","useState","Animated","Platform","Text","TextInput","View","isArray","IMask","WmCursor","memo","props","opacityAnimation","Value","current","runAnimation","timing","toValue","duration","useNativeDriver","start","createElement","style","backgroundColor","color","width","marginHorizontal","height","opacity","WMTextInput","forwardRef","ref","selectRange","setSelectRange","isInputFocused","setIsInputFocused","iMask","setIMask","displayCursor","setDisplayCursor","value","x","forceUpdate","displayValue","setDisplayValue","element","displayformat","MaskedPattern","mask","skipInvalid","lazy","definitions","typedValue","defaultValue","onChangeText","setTimeout","OS","maskchar","_element$current","setSelectionRange","length","onSelectionChange","e","_e$nativeEvent","selection","nativeEvent","allowContentSelection","end","text","_value","substring","slice","formattedValue","replace","valueExpr","opts","textStyle","Object","assign","hideInput","Fragment","_extends","placeholder","floatingLabel","borderColor","zIndex","onFocus","_props$onFocus","call","target","onBlur","_props$onBlur","caretHidden","selectionColor","cursorColor","onChange","contextMenuHidden","display","flexDirection","alignItems","marginTop","minHeight","undefined","padding","fontFamily","fontSize","fontWeight"],"sources":["textinput.component.tsx"],"sourcesContent":["import React, { ForwardedRef, useCallback, useEffect, useRef, useState } from 'react';\nimport { Animated, Platform, Text, TextInput, TextInputProps, TextStyle, View } from 'react-native';\nimport { isArray } from 'lodash';\nimport IMask from 'imask';\n\ninterface SelectRange {\n start: number,\n end: number\n}\n\nconst WmCursor = React.memo((props: {\n color: string,\n height: number\n}) => {\n const opacityAnimation = useRef(new Animated.Value(0.5)).current;\n const runAnimation = useCallback(() => {\n Animated.timing(opacityAnimation, {\n toValue: 0.2,\n duration: 500,\n useNativeDriver: true\n }).start(() => {\n Animated.timing(opacityAnimation, {\n toValue: 0.6,\n duration: 500,\n useNativeDriver: true\n }).start(runAnimation);\n });\n }, []);\n useEffect(() => {\n runAnimation();\n }, []);\n return (\n <Animated.View style={{\n backgroundColor: props.color,\n width: 2,\n marginHorizontal: 1,\n height: props.height,\n opacity: opacityAnimation\n }}></Animated.View>\n );\n});\n\nexport const WMTextInput = React.forwardRef((props: (TextInputProps & \n {allowContentSelection: boolean,\n displayformat: string,\n maskchar: string,\n floatingLabel: string\n floatingLabelStyle: TextStyle,\n activeFloatingLabelStyle: TextStyle\n }), \n ref: ForwardedRef<TextInput>) => {\n const [selectRange, setSelectRange] = useState<SelectRange>(null as any);\n const [isInputFocused, setIsInputFocused] = useState(false);\n const [iMask, setIMask] = useState(null as any);\n const [displayCursor, setDisplayCursor] = useState(false);\n const value = useRef(props.value || '');\n const [x, forceUpdate] = useState(1);\n const [displayValue, setDisplayValue] = useState('');\n const element = useRef(null as any);\n // iMask initialization\n useEffect(() => {\n const iMask: any = props.displayformat ? new IMask.MaskedPattern({\n mask: props.displayformat,\n skipInvalid: true,\n lazy: false,\n definitions: {\n '9': /\\d/,\n 'A': /[a-zA-Z]/,\n 'a': /[a-z]/,\n '*': /\\w/\n }\n }) : null;\n if (iMask) {\n iMask.typedValue = value;\n setDisplayValue(iMask.displayValue)\n setIMask(iMask);\n }\n },[props.displayformat]);\n // set default value\n useEffect(() => {\n const defaultValue = props.defaultValue || props.value || '';\n if (!value.current) {\n value.current = defaultValue;\n onChangeText(defaultValue);\n }\n },[props.defaultValue, props.value]);\n // set cursor position in windows\n useEffect(() => {\n setTimeout(() => {\n if (Platform.OS === 'web' && (props.displayformat || props.maskchar)) {\n element?.current?.setSelectionRange(value.current.length, value.current.length);\n }\n }, 100);\n }, [value.current, props]);\n const onSelectionChange = useCallback((e: any) => {\n if (Platform.OS !== 'android') {\n return;\n }\n const selection = e?.nativeEvent?.selection;\n if (!props.allowContentSelection\n && selection\n && selection.end - selection.start > 0) {\n setSelectRange({\n start: value.current.length + 2,\n end: value.current.length + 2\n });\n } else if (selectRange && selectRange.end > 0){\n setSelectRange(null as any);\n }\n }, [props.allowContentSelection, value]);\n // when text changes\n const onChangeText = useCallback((text: string) => {\n if (!(iMask || props.maskchar)) {\n value.current = text;\n props.onChangeText && props.onChangeText(text);\n return;\n }\n let _value = value.current || '';\n if (value.current.length - text.length > 0) {\n _value = _value.substring(0, _value.length - (value.current.length - text.length));\n } else if (text.length - value.current.length > 0) {\n _value += text.slice(-1 * (text.length - value.current.length));\n }\n let formattedValue = _value;\n if(props.maskchar) {\n formattedValue = (_value.replace(/./g, props.maskchar));\n }\n if (iMask) {\n iMask.typedValue = _value;\n formattedValue = iMask.displayValue;\n }\n if (formattedValue !== displayValue) {\n value.current = _value;\n props.onChangeText && props.onChangeText(_value);\n }\n forceUpdate(x+ 1);\n setDisplayValue(formattedValue);\n }, [iMask, value, displayValue, props.onChangeText]);\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n const opts = {} as any;\n opts[valueExpr] = value.current;\n const textStyle = Object.assign({}, ...isArray(props.style) ? props.style: [props.style]);\n const hideInput = props.displayformat || props.maskchar;\n return (\n <>\n {/*props.floatingLabel ? (\n <FloatingLabel\n moveUp={!!(value.current || isInputFocused || displayValue)}\n label={props.floatingLabel ?? props.placeholder} \n style={{\n ...(props.floatingLabelStyle || []),\n ...(isInputFocused ? (props.activeFloatingLabelStyle || {}) : {})\n }}/>\n ) : null*/}\n <TextInput\n {...props}\n {...hideInput ? opts: {}}\n placeholder={props.floatingLabel || displayValue ? '' : props.placeholder }\n style={[props.style, hideInput ? {\n color: 'transparent', \n backgroundColor: 'transparent',\n borderColor: 'transparent',\n zIndex: 1\n } : {}]}\n onFocus={(e) => {\n props.onFocus?.(e);\n setIsInputFocused(true);\n setDisplayCursor(true);\n element.current = e.target;\n }}\n onBlur={(e) => {\n props?.onBlur?.(e);\n setIsInputFocused(false);\n setDisplayCursor(false);\n }}\n ref={ref}\n selection={selectRange}\n onSelectionChange={onSelectionChange}\n caretHidden={!!selectRange?.end}\n onChangeText={(text) => {\n onChangeText(text);\n }}\n {...hideInput ? {\n selectionColor: 'transparent',\n cursorColor: 'transparent',\n onChange : () => {}\n }: {}}\n contextMenuHidden={!props.allowContentSelection}\n ></TextInput>\n {\n hideInput ? (\n <View style={[props.style, {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n marginTop: -1 * (textStyle.height || textStyle.minHeight || 0)\n + (textStyle.marginTop || 0)}]}>\n <Text style={{ \n width: undefined,\n backgroundColor: 'transparent', \n borderColor: 'transparent',\n padding: 0,\n display: 'flex',\n color: textStyle.color,\n fontFamily: textStyle.fontFamily,\n fontSize: textStyle.fontSize,\n fontWeight: textStyle.fontWeight\n }}>\n {displayValue}\n </Text>\n {\n (displayCursor && !props.displayformat) ? React.createElement(WmCursor, {\n color: textStyle.color || '#000000',\n height: textStyle.fontSize || 14\n }) : null\n }\n </View>\n ) : null\n }\n </>\n );\n});"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACrF,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAA6BC,IAAI,QAAQ,cAAc;AACnG,SAASC,OAAO,QAAQ,QAAQ;AAChC,OAAOC,KAAK,MAAM,OAAO;AAOzB,MAAMC,QAAQ,gBAAGZ,KAAK,CAACa,IAAI,CAAEC,KAG5B,IAAK;EACJ,MAAMC,gBAAgB,GAAGZ,MAAM,CAAC,IAAIE,QAAQ,CAACW,KAAK,CAAC,GAAG,CAAC,CAAC,CAACC,OAAO;EAChE,MAAMC,YAAY,GAAGjB,WAAW,CAAC,MAAM;IACrCI,QAAQ,CAAC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ChB/E,eAAe,EAAE,aAAa;MAC9B6D,WAAW,EAAE,aAAa;MAC1BmB,OAAO,EAAE,CAAC;MACVN,OAAO,EAAE,MAAM;MACfzE,KAAK,EAAEoD,SAAS,CAACpD,KAAK;MACtBgF,UAAU,EAAE5B,SAAS,CAAC4B,UAAU;MAChCC,QAAQ,EAAE7B,SAAS,CAAC6B,QAAQ;MAC5BC,UAAU,EAAE9B,SAAS,CAAC8B;IACtB;EAAE,GACD/D,YACG,CAAC,EAEJL,aAAa,IAAI,CAAC3B,KAAK,CAACmC,aAAa,gBAAIjD,KAAK,CAACwB,aAAa,CAACZ,QAAQ,EAAE;IACtEe,KAAK,EAAEoD,SAAS,CAACpD,KAAK,IAAI,SAAS;IACnCG,MAAM,EAAEiD,SAAS,CAAC6B,QAAQ,IAAI;EAChC,CAAC,CAAC,GAAG,IAEH,CAAC,GACL,IAEN,CAAC;AAET,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useRef","useState","Animated","Platform","Text","TextInput","View","isArray","IMask","FloatingLabel","WmCursor","memo","props","opacityAnimation","Value","current","runAnimation","timing","toValue","duration","useNativeDriver","start","createElement","style","backgroundColor","color","width","marginHorizontal","height","opacity","WMTextInput","forwardRef","ref","selectRange","setSelectRange","isInputFocused","setIsInputFocused","iMask","setIMask","displayCursor","setDisplayCursor","value","x","forceUpdate","displayValue","setDisplayValue","element","displayformat","MaskedPattern","mask","skipInvalid","lazy","definitions","typedValue","defaultValue","onChangeText","setTimeout","OS","maskchar","_element$current","setSelectionRange","length","onSelectionChange","e","_e$nativeEvent","selection","nativeEvent","allowContentSelection","end","text","_value","substring","slice","formattedValue","replace","valueExpr","opts","textStyle","Object","assign","hideInput","Fragment","floatingLabel","moveUp","label","placeholder","floatingLabelStyle","activeFloatingLabelStyle","_extends","borderColor","zIndex","onFocus","_props$onFocus","call","target","onBlur","_props$onBlur","caretHidden","selectionColor","cursorColor","onChange","contextMenuHidden","display","flexDirection","alignItems","marginTop","minHeight","undefined","padding","fontFamily","fontSize","fontWeight"],"sources":["textinput.component.tsx"],"sourcesContent":["import React, { ForwardedRef, useCallback, useEffect, useRef, useState } from 'react';\nimport { Animated, Platform, Text, TextInput, TextInputProps, TextStyle, View } from 'react-native';\nimport { isArray } from 'lodash';\nimport IMask from 'imask';\nimport { FloatingLabel } from './floatinglabel.component';\n\ninterface SelectRange {\n start: number,\n end: number\n}\n\nconst WmCursor = React.memo((props: {\n color: string,\n height: number\n}) => {\n const opacityAnimation = useRef(new Animated.Value(0.5)).current;\n const runAnimation = useCallback(() => {\n Animated.timing(opacityAnimation, {\n toValue: 0.2,\n duration: 500,\n useNativeDriver: true\n }).start(() => {\n Animated.timing(opacityAnimation, {\n toValue: 0.6,\n duration: 500,\n useNativeDriver: true\n }).start(runAnimation);\n });\n }, []);\n useEffect(() => {\n runAnimation();\n }, []);\n return (\n <Animated.View style={{\n backgroundColor: props.color,\n width: 2,\n marginHorizontal: 1,\n height: props.height,\n opacity: opacityAnimation\n }}></Animated.View>\n );\n});\n\nexport const WMTextInput = React.forwardRef((props: (TextInputProps & \n {allowContentSelection: boolean,\n displayformat: string,\n maskchar: string,\n floatingLabel: string\n floatingLabelStyle: TextStyle,\n activeFloatingLabelStyle: TextStyle\n }), \n ref: ForwardedRef<TextInput>) => {\n const [selectRange, setSelectRange] = useState<SelectRange>(null as any);\n const [isInputFocused, setIsInputFocused] = useState(false);\n const [iMask, setIMask] = useState(null as any);\n const [displayCursor, setDisplayCursor] = useState(false);\n const value = useRef(props.value || '');\n const [x, forceUpdate] = useState(1);\n const [displayValue, setDisplayValue] = useState('');\n const element = useRef(null as any);\n // iMask initialization\n useEffect(() => {\n const iMask: any = props.displayformat ? new IMask.MaskedPattern({\n mask: props.displayformat,\n skipInvalid: true,\n lazy: false,\n definitions: {\n '9': /\\d/,\n 'A': /[a-zA-Z]/,\n 'a': /[a-z]/,\n '*': /\\w/\n }\n }) : null;\n if (iMask) {\n iMask.typedValue = value;\n setDisplayValue(iMask.displayValue)\n setIMask(iMask);\n }\n },[props.displayformat]);\n // set default value\n useEffect(() => {\n const defaultValue = props.defaultValue || props.value || '';\n if (!value.current) {\n value.current = defaultValue;\n onChangeText(defaultValue);\n }\n },[props.defaultValue, props.value]);\n // set cursor position in windows\n useEffect(() => {\n setTimeout(() => {\n if (Platform.OS === 'web' && (props.displayformat || props.maskchar)) {\n element?.current?.setSelectionRange(value.current.length, value.current.length);\n }\n }, 100);\n }, [value.current, props]);\n const onSelectionChange = useCallback((e: any) => {\n if (Platform.OS !== 'android') {\n return;\n }\n const selection = e?.nativeEvent?.selection;\n if (!props.allowContentSelection\n && selection\n && selection.end - selection.start > 0) {\n setSelectRange({\n start: value.current.length + 2,\n end: value.current.length + 2\n });\n } else if (selectRange && selectRange.end > 0){\n setSelectRange(null as any);\n }\n }, [props.allowContentSelection, value]);\n // when text changes\n const onChangeText = useCallback((text: string) => {\n if (!(iMask || props.maskchar)) {\n value.current = text;\n props.onChangeText && props.onChangeText(text);\n return;\n }\n let _value = value.current || '';\n if (value.current.length - text.length > 0) {\n _value = _value.substring(0, _value.length - (value.current.length - text.length));\n } else if (text.length - value.current.length > 0) {\n _value += text.slice(-1 * (text.length - value.current.length));\n }\n let formattedValue = _value;\n if(props.maskchar) {\n formattedValue = (_value.replace(/./g, props.maskchar));\n }\n if (iMask) {\n iMask.typedValue = _value;\n formattedValue = iMask.displayValue;\n }\n if (formattedValue !== displayValue) {\n value.current = _value;\n props.onChangeText && props.onChangeText(_value);\n }\n forceUpdate(x+ 1);\n setDisplayValue(formattedValue);\n }, [iMask, value, displayValue, props.onChangeText]);\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n const opts = {} as any;\n opts[valueExpr] = value.current;\n const textStyle = Object.assign({}, ...isArray(props.style) ? props.style: [props.style]);\n const hideInput = props.displayformat || props.maskchar;\n return (\n <>\n {props.floatingLabel ? (\n <FloatingLabel\n moveUp={!!(value.current || isInputFocused || displayValue)}\n label={props.floatingLabel ?? props.placeholder} \n style={{\n ...(props.floatingLabelStyle || []),\n ...(isInputFocused ? (props.activeFloatingLabelStyle || {}) : {})\n }}/>\n ) : null}\n <TextInput\n {...props}\n {...hideInput ? opts: {}}\n placeholder={props.floatingLabel || displayValue ? '' : props.placeholder }\n style={[props.style, hideInput ? {\n color: 'transparent', \n backgroundColor: 'transparent',\n borderColor: 'transparent',\n zIndex: 1\n } : {}]}\n onFocus={(e) => {\n props.onFocus?.(e);\n setIsInputFocused(true);\n setDisplayCursor(true);\n element.current = e.target;\n }}\n onBlur={(e) => {\n props?.onBlur?.(e);\n setIsInputFocused(false);\n setDisplayCursor(false);\n }}\n ref={ref}\n selection={selectRange}\n onSelectionChange={onSelectionChange}\n caretHidden={!!selectRange?.end}\n onChangeText={(text) => {\n onChangeText(text);\n }}\n {...hideInput ? {\n selectionColor: 'transparent',\n cursorColor: 'transparent',\n onChange : () => {}\n }: {}}\n contextMenuHidden={!props.allowContentSelection}\n ></TextInput>\n {\n hideInput ? (\n <View style={[props.style, {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n marginTop: -1 * (textStyle.height || textStyle.minHeight || 0)\n + (textStyle.marginTop || 0)}]}>\n <Text style={{ \n width: undefined,\n backgroundColor: 'transparent', \n borderColor: 'transparent',\n padding: 0,\n display: 'flex',\n color: textStyle.color,\n fontFamily: textStyle.fontFamily,\n fontSize: textStyle.fontSize,\n fontWeight: textStyle.fontWeight\n }}>\n {displayValue}\n </Text>\n {\n (displayCursor && !props.displayformat) ? React.createElement(WmCursor, {\n color: textStyle.color || '#000000',\n height: textStyle.fontSize || 14\n }) : null\n }\n </View>\n ) : null\n }\n </>\n );\n});"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACrF,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAA6BC,IAAI,QAAQ,cAAc;AACnG,SAASC,OAAO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AI;EAChC,CAAC,CAAC,GAAG,IAEH,CAAC,GACL,IAEN,CAAC;AAET,CAAC,CAAC"}
|
|
@@ -57,18 +57,5 @@ export class StringToNumberFormatter {
|
|
|
57
57
|
return parseInt(input);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
return {
|
|
62
|
-
format: function (input) {
|
|
63
|
-
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
64
|
-
params[_key - 1] = arguments[_key];
|
|
65
|
-
}
|
|
66
|
-
const output = defaultFormatter.format(input, ...params);
|
|
67
|
-
const customFormatter = formatters.get(`custom.${key}`);
|
|
68
|
-
return customFormatter ? customFormatter.format(output, ...params) : output;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
const formatters = new Map([['numberToString', createFormatter('numberToString', new NumberToStringFormatter())], ['prefix', createFormatter('prefix', new PrependFormatter())], ['suffix', createFormatter('suffix', new AppendFormatter())], ['stringToNumber', createFormatter('stringToNumber', new StringToNumberFormatter())], ['timeFromNow', createFormatter('timeFromNow', new TimeFromNowFormatter())], ['toDate', createFormatter('toDate', new DateToStringFormatter())], ['toCurrency', createFormatter('toCurrency', new CurrencyFormatter())]]);
|
|
73
|
-
export default formatters;
|
|
60
|
+
export default new Map([['numberToString', new NumberToStringFormatter()], ['prefix', new PrependFormatter()], ['suffix', new AppendFormatter()], ['stringToNumber', new StringToNumberFormatter()], ['timeFromNow', new TimeFromNowFormatter()], ['toDate', new DateToStringFormatter()], ['toCurrency', new CurrencyFormatter()]]);
|
|
74
61
|
//# sourceMappingURL=formatters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["parseInt","moment","CURRENCY_INFO","injector","DateToStringFormatter","format","input","getTime","replace","_moment","isValid","toString","PrependFormatter","prefix","undefined","AppendFormatter","suffix","NumberToStringFormatter","fractionSize","i18nService","I18nService","get","selectedLocale","getSelectedLocale","formatCurrency","Intl","NumberFormat","minimumFractionDigits","maximumFractionDigits","isNaN","CurrencyFormatter","data","currencySymbol","fracSize","_currencySymbol","symbol","_val","isNegativeNumber","startsWith","TimeFromNowFormatter","timestamp","fromNow","StringToNumberFormatter","
|
|
1
|
+
{"version":3,"names":["parseInt","moment","CURRENCY_INFO","injector","DateToStringFormatter","format","input","getTime","replace","_moment","isValid","toString","PrependFormatter","prefix","undefined","AppendFormatter","suffix","NumberToStringFormatter","fractionSize","i18nService","I18nService","get","selectedLocale","getSelectedLocale","formatCurrency","Intl","NumberFormat","minimumFractionDigits","maximumFractionDigits","isNaN","CurrencyFormatter","data","currencySymbol","fracSize","_currencySymbol","symbol","_val","isNegativeNumber","startsWith","TimeFromNowFormatter","timestamp","fromNow","StringToNumberFormatter","Map"],"sources":["formatters.ts"],"sourcesContent":["import { parseInt } from 'lodash';\nimport moment from 'moment';\nimport { CURRENCY_INFO, Currency } from './constants/currency-constants';\nimport { DateFormatter } from '@wavemaker/variables/src/types/date-formatter';\nimport injector from '@wavemaker/app-rn-runtime/core/injector';\n\nexport interface Formatter {\n format: (input: any, ...params: any) => any;\n}\n\nexport class DateToStringFormatter implements DateFormatter {\n\n public format(input: Date, format: string): string {\n if (!input) {\n return '';\n }\n if (format === 'timestamp') {\n return input.getTime() + '';\n }\n format = format.replace(/d/g, 'D');\n const _moment = moment(input, [\n \"M/D/YYYY\", \"M-D-YYYY\", \"M.D.YYYY\",\n \"M/DD/YYYY\", \"M-DD-YYYY\", \"M.DD.YYYY\",\n \"YYYY/M/D\", \"YYYY-M-D\", \"YYYY.M.D\",\n \"MM/D/YYYY\", \"MM-D-YYYY\", \"MM.D.YYYY\",\n \"M/D/YY\", \"M-D-YY\", \"M.D.YY\", \"D MMM YYYY\",\n \"MM/DD/YYYY\", \"MM-DD-YYYY\", \"MM.DD.YYYY\",\n \"YYYY/MM/DD\", \"YYYY-MM-DD\", \"YYYY.MM.DD\",\n \"MM/DD/YY\", \"MM-DD-YY\", \"MM.DD.YY\", \"DD MMM YYYY\"\n ], true);\n return _moment.isValid() ? _moment.format(format) : input.toString();\n }\n}\n\nexport class PrependFormatter implements Formatter {\n\n public format(input: any, prefix: string): string {\n return (prefix || '') + (input !== null || input != undefined ? input : '');\n }\n}\n\nexport class AppendFormatter implements Formatter {\n\n public format(input: any, suffix: string): string {\n return (input !== null || input != undefined ? input : '') + (suffix || '');\n }\n}\n\nexport class NumberToStringFormatter implements Formatter {\n\n public format(input: number, fractionSize: number): string {\n const i18nService = injector.I18nService.get();\n const selectedLocale = i18nService.getSelectedLocale();\n let formatCurrency = new Intl.NumberFormat(selectedLocale,{\n minimumFractionDigits: fractionSize,\n maximumFractionDigits: fractionSize,\n });\n return isNaN(input) ? '': formatCurrency.format(input);\n }\n}\n\nexport class CurrencyFormatter implements Formatter {\n\n public format(data: number, currencySymbol: string, fracSize: number) {\n const _currencySymbol = ((((CURRENCY_INFO as any)[currencySymbol]) || {}) as Currency).symbol || currencySymbol || '';\n let _val = new NumberToStringFormatter().format(data, fracSize);\n const isNegativeNumber = _val.startsWith('-');\n if (isNegativeNumber) {\n _val = _val.replace('-','');\n }\n return _val ? isNegativeNumber ? '-'+ _currencySymbol +_val :_currencySymbol + _val : '';\n }\n}\n\nexport class TimeFromNowFormatter implements Formatter {\n public format(timestamp: Date) {\n return timestamp ? moment(timestamp).fromNow() : undefined;\n }\n}\n\nexport class StringToNumberFormatter implements Formatter {\n public format(input: string) {\n return parseInt(input);\n }\n}\n\nexport default new Map<string, Formatter>([\n ['numberToString', new NumberToStringFormatter()],\n ['prefix', new PrependFormatter()],\n ['suffix', new AppendFormatter()],\n ['stringToNumber', new StringToNumberFormatter()],\n ['timeFromNow', new TimeFromNowFormatter()],\n ['toDate', new DateToStringFormatter()],\n ['toCurrency', new CurrencyFormatter()]\n]);\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,MAAM,MAAM,QAAQ;AAC3B,SAASC,aAAa,QAAkB,gCAAgC;AAEx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