@wavemaker/app-rn-runtime 12.0.0-next.140535 → 12.0.0-next.140537
Sign up to get free protection for your applications and to get access to all the features.
- app-rn-runtime/components/advanced/carousel/carousel.component.js +7 -7
- app-rn-runtime/components/advanced/carousel/carousel.component.js.map +1 -1
- app-rn-runtime/components/advanced/carousel/carousel.styles.js +3 -3
- app-rn-runtime/components/advanced/carousel/carousel.styles.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.component.js +9 -2
- app-rn-runtime/components/basic/audio/audio.component.js.map +1 -1
- app-rn-runtime/components/basic/audio/audio.styles.js +7 -0
- app-rn-runtime/components/basic/audio/audio.styles.js.map +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js +1 -1
- app-rn-runtime/components/basic/custom/custom.component.js.map +1 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js +3 -1
- app-rn-runtime/components/basic/lottie/lottie.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.component.js +6 -9
- app-rn-runtime/components/basic/search/search.component.js.map +1 -1
- app-rn-runtime/components/basic/search/search.props.js +1 -0
- app-rn-runtime/components/basic/search/search.props.js.map +1 -1
- app-rn-runtime/components/basic/search/search.styles.js +1 -2
- app-rn-runtime/components/basic/search/search.styles.js.map +1 -1
- app-rn-runtime/components/basic/skeleton/skeleton.component.js +2 -0
- app-rn-runtime/components/basic/skeleton/skeleton.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.component.js +6 -0
- app-rn-runtime/components/basic/video/video.component.js.map +1 -1
- app-rn-runtime/components/basic/video/video.styles.js +7 -1
- app-rn-runtime/components/basic/video/video.styles.js.map +1 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js +2 -1
- app-rn-runtime/components/chart/area-chart/area-chart.component.js.map +1 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js +2 -1
- app-rn-runtime/components/chart/pie-chart/pie-chart.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordion.component.js +14 -7
- app-rn-runtime/components/container/accordion/accordion.component.js.map +1 -1
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js +7 -0
- app-rn-runtime/components/container/accordion/accordionpane/accordionpane.component.js.map +1 -1
- app-rn-runtime/components/container/container.component.js +8 -1
- app-rn-runtime/components/container/container.component.js.map +1 -1
- app-rn-runtime/components/container/container.props.js +1 -0
- app-rn-runtime/components/container/container.props.js.map +1 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js +2 -1
- app-rn-runtime/components/container/layoutgrid/layoutgrid.component.js.map +1 -1
- app-rn-runtime/components/container/panel/panel.component.js +2 -1
- app-rn-runtime/components/container/panel/panel.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js +7 -0
- app-rn-runtime/components/container/tabs/tabpane/tabpane.component.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js +1 -0
- app-rn-runtime/components/container/tabs/tabpane/tabpane.props.js.map +1 -1
- app-rn-runtime/components/container/tabs/tabs.component.js +14 -4
- app-rn-runtime/components/container/tabs/tabs.component.js.map +1 -1
- app-rn-runtime/components/container/tile/tile.component.js +5 -1
- app-rn-runtime/components/container/tile/tile.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizard.component.js +12 -4
- app-rn-runtime/components/container/wizard/wizard.component.js.map +1 -1
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js +4 -0
- app-rn-runtime/components/container/wizard/wizardstep/wizardstep.component.js.map +1 -1
- app-rn-runtime/components/data/card/card.styles.js.map +1 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js +2 -1
- app-rn-runtime/components/data/form/form-field/form-field.component.js.map +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js +1 -1
- app-rn-runtime/components/data/list/list-template/list-template.styles.js.map +1 -1
- app-rn-runtime/components/input/baseinput/baseinput.component.js +46 -10
- app-rn-runtime/components/input/baseinput/baseinput.component.js.map +1 -1
- app-rn-runtime/components/input/basenumber/basenumber.component.js +19 -6
- app-rn-runtime/components/input/basenumber/basenumber.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.component.js +25 -0
- app-rn-runtime/components/input/calendar/calendar.component.js.map +1 -1
- app-rn-runtime/components/input/calendar/calendar.styles.js +19 -0
- app-rn-runtime/components/input/calendar/calendar.styles.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.component.js +23 -3
- app-rn-runtime/components/input/checkbox/checkbox.component.js.map +1 -1
- app-rn-runtime/components/input/checkbox/checkbox.styles.js +19 -2
- app-rn-runtime/components/input/checkbox/checkbox.styles.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.component.js.map +1 -1
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js +1 -0
- app-rn-runtime/components/input/checkboxset/checkboxset.styles.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.component.js +16 -2
- app-rn-runtime/components/input/chips/chips.component.js.map +1 -1
- app-rn-runtime/components/input/chips/chips.styles.js +8 -0
- app-rn-runtime/components/input/chips/chips.styles.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.component.js +14 -4
- app-rn-runtime/components/input/currency/currency.component.js.map +1 -1
- app-rn-runtime/components/input/currency/currency.styles.js +43 -1
- app-rn-runtime/components/input/currency/currency.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/base-datetime.component.js +26 -5
- app-rn-runtime/components/input/epoch/base-datetime.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js +6 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js +13 -0
- app-rn-runtime/components/input/epoch/datetime/datetime.styles.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js +7 -4
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js +3 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/date/date-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js +7 -4
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map +1 -1
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js +3 -0
- app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.props.js.map +1 -1
- app-rn-runtime/components/input/number/number.component.js +17 -3
- app-rn-runtime/components/input/number/number.component.js.map +1 -1
- app-rn-runtime/components/input/number/number.styles.js +24 -1
- app-rn-runtime/components/input/number/number.styles.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.component.js +13 -8
- app-rn-runtime/components/input/radioset/radioset.component.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.props.js +1 -0
- app-rn-runtime/components/input/radioset/radioset.props.js.map +1 -1
- app-rn-runtime/components/input/radioset/radioset.styles.js +7 -0
- app-rn-runtime/components/input/radioset/radioset.styles.js.map +1 -1
- app-rn-runtime/components/input/select/select.component.js +11 -3
- app-rn-runtime/components/input/select/select.component.js.map +1 -1
- app-rn-runtime/components/input/select/select.styles.js +24 -0
- app-rn-runtime/components/input/select/select.styles.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.component.js +13 -3
- app-rn-runtime/components/input/switch/switch.component.js.map +1 -1
- app-rn-runtime/components/input/switch/switch.styles.js +15 -0
- app-rn-runtime/components/input/switch/switch.styles.js.map +1 -1
- app-rn-runtime/components/input/text/text.component.js +5 -2
- 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 +3 -0
- app-rn-runtime/components/input/text/text.styles.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.component.js +3 -1
- app-rn-runtime/components/input/textarea/textarea.component.js.map +1 -1
- app-rn-runtime/components/input/textarea/textarea.styles.js +3 -0
- app-rn-runtime/components/input/textarea/textarea.styles.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.component.js +6 -0
- app-rn-runtime/components/input/toggle/toggle.component.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.props.js +2 -0
- app-rn-runtime/components/input/toggle/toggle.props.js.map +1 -1
- app-rn-runtime/components/input/toggle/toggle.styles.js +7 -0
- app-rn-runtime/components/input/toggle/toggle.styles.js.map +1 -1
- app-rn-runtime/components/page/content/content.component.js.map +1 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js +4 -1
- app-rn-runtime/components/page/left-panel/left-panel.component.js.map +1 -1
- app-rn-runtime/components/page/page-content/page-content.component.js +43 -12
- app-rn-runtime/components/page/page-content/page-content.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.component.js +6 -1
- app-rn-runtime/components/page/partial/partial.component.js.map +1 -1
- app-rn-runtime/components/page/partial/partial.styles.js.map +1 -1
- app-rn-runtime/components/prefab/prefab-container.component.js +5 -1
- app-rn-runtime/components/prefab/prefab-container.component.js.map +1 -1
- app-rn-runtime/core/AppConfig.js.map +1 -1
- app-rn-runtime/core/base.component.js +31 -5
- app-rn-runtime/core/base.component.js.map +1 -1
- app-rn-runtime/core/components/textinput.component.js +9 -7
- app-rn-runtime/core/components/textinput.component.js.map +1 -1
- app-rn-runtime/core/props.provider.js +0 -1
- app-rn-runtime/core/props.provider.js.map +1 -1
- app-rn-runtime/core/storage.service.js +15 -0
- app-rn-runtime/core/storage.service.js.map +1 -1
- app-rn-runtime/core/tappable.component.js +10 -4
- app-rn-runtime/core/tappable.component.js.map +1 -1
- app-rn-runtime/core/wm-component-tree.js +58 -0
- app-rn-runtime/core/wm-component-tree.js.map +1 -0
- app-rn-runtime/package.json +13 -6
- app-rn-runtime/runtime/App.js +23 -9
- app-rn-runtime/runtime/App.js.map +1 -1
- app-rn-runtime/runtime/App.navigator.js +1 -0
- app-rn-runtime/runtime/App.navigator.js.map +1 -1
- app-rn-runtime/runtime/base-fragment.component.js +18 -0
- app-rn-runtime/runtime/base-fragment.component.js.map +1 -1
- app-rn-runtime/runtime/base-page.component.js +38 -2
- app-rn-runtime/runtime/base-page.component.js.map +1 -1
- app-rn-runtime/runtime/base-partial.component.js +3 -0
- app-rn-runtime/runtime/base-partial.component.js.map +1 -1
- app-rn-runtime/runtime/navigator/drawer.navigator.js +19 -10
- app-rn-runtime/runtime/navigator/drawer.navigator.js.map +1 -1
- app-rn-runtime/runtime/services/app-modal.service.js +4 -4
- app-rn-runtime/runtime/services/app-modal.service.js.map +1 -1
- app-rn-runtime/runtime/services/app-security.service.js +17 -1
- app-rn-runtime/runtime/services/app-security.service.js.map +1 -1
- app-rn-runtime/styles/theme.js +10 -0
- app-rn-runtime/styles/theme.js.map +1 -1
- app-rn-runtime/styles/theme.variables.js +1 -1
- app-rn-runtime/styles/theme.variables.js.map +1 -1
- app-rn-runtime/variables/http.service.js +5 -1
- app-rn-runtime/variables/http.service.js.map +1 -1
- app-rn-runtime/variables/live-variable.js +14 -0
- app-rn-runtime/variables/live-variable.js.map +1 -1
app-rn-runtime/components/input/epoch/wheelpickermodal/time/time-picker-modal.component.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Modal","Text","TouchableWithoutFeedback","View","WmWheelTimePicker","WmButton","DEFAULT_CLASS","BaseComponent","BaseComponentState","WmTimePickerModalProps","WmTimePickerModalState","constructor","args","_defineProperty","Date","WmTimePickerModal","props","renderWidget","is24Hour","isVisible","onClose","onCancel","onSelect","selectedTime","state","styles","createElement","animationType","transparent","visible","onRequestClose","onDismiss","style","root","flex1","onPress","container","header","selectedDateTime","onTimeChange","time","setState","buttonWrapper","cancelBtn","caption","onTap","selectBtn","setSeconds"],"sources":["time-picker-modal.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Modal, Text, TouchableWithoutFeedback, View } from 'react-native';\nimport WmWheelTimePicker from '../../wheel-time-picker.component';\nimport WmButton from '../../../../basic/button/button.component';\nimport {\n DEFAULT_CLASS,\n WmDateTimePickerModalStyles,\n} from '../styles/datetime-picker-modal.styles';\nimport {\n BaseComponent,\n BaseComponentState,\n} from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmTimePickerModalProps from './time-picker-modal.props';\n\nexport class WmTimePickerModalState extends BaseComponentState<WmTimePickerModalProps> {\n selectedTime: Date = new Date();\n}\n\nexport class WmTimePickerModal extends BaseComponent<\n WmTimePickerModalProps,\n WmTimePickerModalState,\n WmDateTimePickerModalStyles\n> {\n constructor(props: WmTimePickerModalProps) {\n super(props, DEFAULT_CLASS, new WmTimePickerModalProps());\n }\n\n renderWidget(props: WmTimePickerModalProps) {\n const { is24Hour, isVisible, onClose, onCancel, onSelect } = this.props;\n const { selectedTime } = this.state;\n const { styles } = this;\n\n return (\n <Modal\n animationType=\"fade\"\n transparent={true}\n visible={isVisible}\n onRequestClose={onClose}\n onDismiss={onClose}\n >\n <View style={styles.root}>\n <TouchableWithoutFeedback style={styles.flex1} onPress={onClose}>\n <View style={styles.flex1} />\n </TouchableWithoutFeedback>\n <View style={styles.container}>\n <Text style={styles.header}>
|
1
|
+
{"version":3,"names":["React","Modal","Text","TouchableWithoutFeedback","View","WmWheelTimePicker","WmButton","DEFAULT_CLASS","BaseComponent","BaseComponentState","WmTimePickerModalProps","WmTimePickerModalState","constructor","args","_defineProperty","Date","WmTimePickerModal","props","renderWidget","is24Hour","isVisible","onClose","onCancel","onSelect","timeheadertitle","timeconfirmationtitle","timecanceltitle","selectedTime","state","styles","createElement","animationType","transparent","visible","onRequestClose","onDismiss","style","root","flex1","onPress","container","header","selectedDateTime","onTimeChange","time","setState","buttonWrapper","cancelBtn","caption","onTap","selectBtn","setSeconds"],"sources":["time-picker-modal.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Modal, Text, TouchableWithoutFeedback, View } from 'react-native';\nimport WmWheelTimePicker from '../../wheel-time-picker.component';\nimport WmButton from '../../../../basic/button/button.component';\nimport {\n DEFAULT_CLASS,\n WmDateTimePickerModalStyles,\n} from '../styles/datetime-picker-modal.styles';\nimport {\n BaseComponent,\n BaseComponentState,\n} from '@wavemaker/app-rn-runtime/core/base.component';\nimport WmTimePickerModalProps from './time-picker-modal.props';\n\nexport class WmTimePickerModalState extends BaseComponentState<WmTimePickerModalProps> {\n selectedTime: Date = new Date();\n}\n\nexport class WmTimePickerModal extends BaseComponent<\n WmTimePickerModalProps,\n WmTimePickerModalState,\n WmDateTimePickerModalStyles\n> {\n constructor(props: WmTimePickerModalProps) {\n super(props, DEFAULT_CLASS, new WmTimePickerModalProps());\n }\n\n renderWidget(props: WmTimePickerModalProps) {\n const { is24Hour, isVisible, onClose, onCancel, onSelect, timeheadertitle, timeconfirmationtitle, timecanceltitle } = this.props;\n const { selectedTime } = this.state;\n const { styles } = this;\n\n return (\n <Modal\n animationType=\"fade\"\n transparent={true}\n visible={isVisible}\n onRequestClose={onClose}\n onDismiss={onClose}\n >\n <View style={styles.root}>\n <TouchableWithoutFeedback style={styles.flex1} onPress={onClose}>\n <View style={styles.flex1} />\n </TouchableWithoutFeedback>\n <View style={styles.container}>\n <Text style={styles.header}>{timeheadertitle}</Text>\n <WmWheelTimePicker\n selectedTime={this.props.selectedDateTime || selectedTime}\n is24Hour={is24Hour}\n onTimeChange={(time) => {\n this.setState({ selectedTime: time });\n }}\n />\n <View style={styles.buttonWrapper}>\n <WmButton\n styles={styles.cancelBtn}\n caption={timecanceltitle}\n onTap={onCancel}\n />\n <WmButton\n styles={styles.selectBtn}\n caption={timeconfirmationtitle}\n onTap={() => onSelect?.(selectedTime || this.props.selectedDateTime || new Date().setSeconds(0))}\n />\n </View>\n </View>\n </View>\n </Modal>\n );\n }\n}\n\nexport default WmTimePickerModal;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,IAAI,EAAEC,wBAAwB,EAAEC,IAAI,QAAQ,cAAc;AAC1E,OAAOC,iBAAiB,M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AM,CAAE,CACJ,CAAC,eAC3BtC,KAAA,CAAA8B,aAAA,CAAC1B,IAAI;MAACgC,KAAK,EAAEP,MAAM,CAACW;IAAU,gBAC5BxC,KAAA,CAAA8B,aAAA,CAAC5B,IAAI;MAACkC,KAAK,EAAEP,MAAM,CAACY;IAAO,GAAEjB,eAAsB,CAAC,eACpDxB,KAAA,CAAA8B,aAAA,CAACzB,iBAAiB;MAChBsB,YAAY,EAAE,IAAI,CAACV,KAAK,CAACyB,gBAAgB,IAAIf,YAAa;MAC1DR,QAAQ,EAAEA,QAAS;MACnBwB,YAAY,EAAGC,IAAI,IAAK;QACtB,IAAI,CAACC,QAAQ,CAAC;UAAElB,YAAY,EAAEiB;QAAK,CAAC,CAAC;MACvC;IAAE,CACH,CAAC,eACF5C,KAAA,CAAA8B,aAAA,CAAC1B,IAAI;MAACgC,KAAK,EAAEP,MAAM,CAACiB;IAAc,gBAChC9C,KAAA,CAAA8B,aAAA,CAACxB,QAAQ;MACPuB,MAAM,EAAEA,MAAM,CAACkB,SAAU;MACzBC,OAAO,EAAEtB,eAAgB;MACzBuB,KAAK,EAAE3B;IAAS,CACjB,CAAC,eACFtB,KAAA,CAAA8B,aAAA,CAACxB,QAAQ;MACPuB,MAAM,EAAEA,MAAM,CAACqB,SAAU;MACzBF,OAAO,EAAEvB,qBAAsB;MAC/BwB,KAAK,EAAEA,CAAA,KAAM1B,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGI,YAAY,IAAI,IAAI,CAACV,KAAK,CAACyB,gBAAgB,IAAI,IAAI3B,IAAI,CAAC,CAAC,CAACoC,UAAU,CAAC,CAAC,CAAC;IAAE,CAClG,CACG,CACF,CACF,CACD,CAAC;EAEZ;AACF;AAEA,eAAenC,iBAAiB","ignoreList":[]}
|
@@ -11,6 +11,9 @@ export default class WmTimePickerModalProps extends BaseProps {
|
|
11
11
|
_defineProperty(this, "onClose", void 0);
|
12
12
|
_defineProperty(this, "onSelect", void 0);
|
13
13
|
_defineProperty(this, "onCancel", void 0);
|
14
|
+
_defineProperty(this, "timeheadertitle", "Select Time");
|
15
|
+
_defineProperty(this, "timeconfirmationtitle", "Select");
|
16
|
+
_defineProperty(this, "timecanceltitle", "Cancel");
|
14
17
|
}
|
15
18
|
}
|
16
19
|
//# sourceMappingURL=time-picker-modal.props.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseProps","WmTimePickerModalProps","constructor","args","_defineProperty"],"sources":["time-picker-modal.props.ts"],"sourcesContent":["import { BaseProps } from \"@wavemaker/app-rn-runtime/core/base.component\";\n\nexport default class WmTimePickerModalProps extends BaseProps {\n isVisible: boolean = false;\n selectedDateTime?: any;\n is24Hour?: boolean = true;\n onClose?: () => void;\n onSelect?: (time: Date) => void;\n onCancel?: () => void;\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,sBAAsB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACvC,KAAK;IAAAA,eAAA;IAAAA,eAAA,mBAEL,IAAI;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;EAAA;
|
1
|
+
{"version":3,"names":["BaseProps","WmTimePickerModalProps","constructor","args","_defineProperty"],"sources":["time-picker-modal.props.ts"],"sourcesContent":["import { BaseProps } from \"@wavemaker/app-rn-runtime/core/base.component\";\n\nexport default class WmTimePickerModalProps extends BaseProps {\n isVisible: boolean = false;\n selectedDateTime?: any;\n is24Hour?: boolean = true;\n onClose?: () => void;\n onSelect?: (time: Date) => void;\n onCancel?: () => void;\n timeheadertitle?: string = \"Select Time\";\n timeconfirmationtitle?: string = \"Select\";\n timecanceltitle?: string = \"Cancel\";\n}\n"],"mappings":";;;AAAA,SAASA,SAAS,QAAQ,+CAA+C;AAEzE,eAAe,MAAMC,sBAAsB,SAASD,SAAS,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,oBACvC,KAAK;IAAAA,eAAA;IAAAA,eAAA,mBAEL,IAAI;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,0BAIE,aAAa;IAAAA,eAAA,gCACP,QAAQ;IAAAA,eAAA,0BACd,QAAQ;EAAA;AACrC","ignoreList":[]}
|
@@ -3,13 +3,14 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
4
4
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
5
|
import React from 'react';
|
6
|
-
import { Platform } from 'react-native';
|
6
|
+
import { Platform, View } from 'react-native';
|
7
7
|
import { isNull } from 'lodash';
|
8
8
|
import WmNumberProps from './number.props';
|
9
9
|
import { DEFAULT_CLASS } from './number.styles';
|
10
10
|
import { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';
|
11
11
|
import { BaseNumberComponent, BaseNumberState } from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';
|
12
12
|
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
13
|
+
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
13
14
|
export class WmNumberState extends BaseNumberState {
|
14
15
|
constructor(...args) {
|
15
16
|
super(...args);
|
@@ -28,12 +29,23 @@ export default class WmNumber extends BaseNumberComponent {
|
|
28
29
|
classes.push(super.getStyleClassName());
|
29
30
|
return classes.join(' ');
|
30
31
|
}
|
32
|
+
renderTextSkeleton() {
|
33
|
+
return this.props.floatinglabel ? /*#__PURE__*/React.createElement(View, {
|
34
|
+
style: {
|
35
|
+
...this.styles.root
|
36
|
+
}
|
37
|
+
}, createSkeleton(this.theme, {}, {
|
38
|
+
...this.styles.skeletonLabel.root
|
39
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, createSkeleton(this.theme, {}, {
|
40
|
+
...this.styles.skeleton.root
|
41
|
+
}));
|
42
|
+
}
|
31
43
|
renderWidget(props) {
|
32
44
|
var _this$state$textValue;
|
33
45
|
let opts = {};
|
34
46
|
const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';
|
35
47
|
opts[valueExpr] = ((_this$state$textValue = this.state.textValue) === null || _this$state$textValue === void 0 ? void 0 : _this$state$textValue.toString()) || '';
|
36
|
-
return /*#__PURE__*/React.createElement(WMTextInput, _extends({}, this.getTestPropsForInput(), getAccessibilityProps(AccessibilityWidgetType.NUMBER, props), {
|
48
|
+
return this._showSkeleton ? this.renderTextSkeleton() : /*#__PURE__*/React.createElement(WMTextInput, _extends({}, this.getTestPropsForInput(), getAccessibilityProps(AccessibilityWidgetType.NUMBER, props), {
|
37
49
|
ref: ref => {
|
38
50
|
this.widgetRef = ref;
|
39
51
|
// @ts-ignore
|
@@ -46,8 +58,10 @@ export default class WmNumber extends BaseNumberComponent {
|
|
46
58
|
floatingLabel: props.floatinglabel,
|
47
59
|
floatingLabelStyle: this.styles.floatingLabel,
|
48
60
|
activeFloatingLabelStyle: this.styles.activeFloatingLabel,
|
49
|
-
|
61
|
+
isInputFocused: this.state.isInputFocused,
|
62
|
+
style: [this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}],
|
50
63
|
keyboardType: "numeric",
|
64
|
+
background: this._background,
|
51
65
|
placeholderTextColor: this.styles.placeholderText.color,
|
52
66
|
autoFocus: props.autofocus,
|
53
67
|
editable: props.disabled || props.readonly ? false : true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Platform","isNull","WmNumberProps","DEFAULT_CLASS","WMTextInput","BaseNumberComponent","BaseNumberState","AccessibilityWidgetType","getAccessibilityProps","WmNumberState","constructor","args","_defineProperty","WmNumber","props","getStyleClassName","classes","state","floatinglabel","push","join","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","
|
1
|
+
{"version":3,"names":["React","Platform","View","isNull","WmNumberProps","DEFAULT_CLASS","WMTextInput","BaseNumberComponent","BaseNumberState","AccessibilityWidgetType","getAccessibilityProps","createSkeleton","WmNumberState","constructor","args","_defineProperty","WmNumber","props","getStyleClassName","classes","state","floatinglabel","push","join","renderTextSkeleton","createElement","style","styles","root","theme","skeletonLabel","Fragment","skeleton","renderWidget","_this$state$textValue","opts","valueExpr","OS","textValue","toString","_showSkeleton","_extends","getTestPropsForInput","NUMBER","ref","widgetRef","selectionStart","selectionEnd","cursor","floatingLabel","floatingLabelStyle","activeFloatingLabelStyle","activeFloatingLabel","isInputFocused","isValid","invalid","focused","keyboardType","background","_background","placeholderTextColor","placeholderText","color","autoFocus","autofocus","editable","disabled","readonly","placeholder","onBlur","event","bind","displayValue","onFocus","onKeyPress","validateInputEntry","onChangeText","text","onChange","invokeChange","allowContentSelection","userSelect","customDisplayValue"],"sources":["number.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Platform, View } from 'react-native';\nimport { isNull } from 'lodash';\n\nimport WmNumberProps from './number.props';\nimport { DEFAULT_CLASS, WmNumberStyles } from './number.styles';\nimport { WMTextInput } from '@wavemaker/app-rn-runtime/core/components/textinput.component';\nimport {\n BaseNumberComponent,\n BaseNumberState\n} from '@wavemaker/app-rn-runtime/components/input/basenumber/basenumber.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport class WmNumberState extends BaseNumberState<WmNumberProps> {\n keyboardType: any;\n}\n\nexport default class WmNumber extends BaseNumberComponent<WmNumberProps, WmNumberState, WmNumberStyles> {\n\n constructor(props: WmNumberProps) {\n super(props, DEFAULT_CLASS, new WmNumberProps(), new WmNumberState());\n }\n\n public getStyleClassName(): string | undefined {\n const classes = [];\n if (this.state.props.floatinglabel) {\n classes.push('app-number-with-label'); \n }\n classes.push(super.getStyleClassName());\n return classes.join(' ');\n }\n\n public renderTextSkeleton(): React.ReactNode { \n return this.props.floatinglabel ? \n <View style={{...this.styles.root}}>{createSkeleton(this.theme, {} as WmSkeletonStyles, {...this.styles.skeletonLabel.root})}</View>\n :<>{createSkeleton(this.theme, {} as WmSkeletonStyles, {\n ...this.styles.skeleton.root,\n })}</> \n }\n\n renderWidget(props: WmNumberProps) {\n let opts: any = {};\n const valueExpr = Platform.OS === 'web' ? 'value' : 'defaultValue';\n opts[valueExpr] = this.state.textValue?.toString() || '';\n return (this._showSkeleton ? this.renderTextSkeleton() : \n <WMTextInput\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(AccessibilityWidgetType.NUMBER, props)}\n ref={(ref: any) => {this.widgetRef = ref;\n // @ts-ignore\n if (ref && !isNull(ref.selectionStart) && !isNull(ref.selectionEnd)) {\n // @ts-ignore\n ref.selectionStart = ref.selectionEnd = this.cursor;\n }}}\n {...opts}\n floatingLabel={props.floatinglabel}\n floatingLabelStyle={this.styles.floatingLabel}\n activeFloatingLabelStyle={this.styles.activeFloatingLabel}\n isInputFocused={ this.state.isInputFocused }\n style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, this.state.isInputFocused ? this.styles.focused : {}]}\n keyboardType=\"numeric\"\n background={this._background}\n placeholderTextColor={this.styles.placeholderText.color as any}\n autoFocus={props.autofocus}\n editable={props.disabled || props.readonly ? false : true}\n placeholder={props.placeholder}\n onBlur={(event)=>{this.onBlur.bind(this)(event, !!props.displayValue)}}\n onFocus={this.onFocus.bind(this)}\n onKeyPress={this.validateInputEntry.bind(this)}\n onChangeText={(text) => {\n this.onChangeText.bind(this)(text, 'number', !!props.displayValue);\n }}\n onChange={this.invokeChange.bind(this)}\n all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FM,QAAQ,EAAE,IAAI,CAACC,YAAY,CAACR,IAAI,CAAC,IAAI,CAAE;MACvCS,qBAAqB,EAAE,IAAI,CAACrD,MAAM,CAACkD,IAAI,CAACI,UAAU,KAAK,MAAO;MAC9DC,kBAAkB,EAAEjE,KAAK,CAACuD;IAAa,EACxC,CAAC;EACJ;AACF","ignoreList":[]}
|
@@ -22,12 +22,35 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
22
22
|
invalid: {
|
23
23
|
borderBottomColor: themeVariables.inputInvalidBorderColor
|
24
24
|
},
|
25
|
+
focused: {
|
26
|
+
borderColor: themeVariables.inputFocusBorderColor
|
27
|
+
},
|
25
28
|
placeholderText: {
|
26
29
|
color: themeVariables.inputPlaceholderColor
|
27
30
|
},
|
28
31
|
floatingLabel: {},
|
29
32
|
activeFloatingLabel: {},
|
30
|
-
skeleton: {
|
33
|
+
skeleton: {
|
34
|
+
root: {
|
35
|
+
borderRadius: 6,
|
36
|
+
paddingLeft: 16,
|
37
|
+
paddingRight: 16,
|
38
|
+
minHeight: 42,
|
39
|
+
paddingTop: 8,
|
40
|
+
paddingBottom: 8,
|
41
|
+
width: '100%',
|
42
|
+
height: 40
|
43
|
+
}
|
44
|
+
},
|
45
|
+
skeletonLabel: {
|
46
|
+
root: {
|
47
|
+
bottom: 12,
|
48
|
+
left: 16,
|
49
|
+
width: 80,
|
50
|
+
height: 16,
|
51
|
+
borderRadius: 4
|
52
|
+
}
|
53
|
+
}
|
31
54
|
});
|
32
55
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|
33
56
|
addStyle(DEFAULT_CLASS + '-disabled', '', {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","paddingLeft","paddingRight","text","fontSize","textAlign","invalid","borderBottomColor","inputInvalidBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","minHeight","paddingTop","paddingBottom","borderWidth","borderStyle","borderColor","inputBorderColor","backgroundColor","inputBackgroundColor","borderRadius","paddingLeft","paddingRight","text","fontSize","textAlign","invalid","borderBottomColor","inputInvalidBorderColor","focused","inputFocusBorderColor","placeholderText","color","inputPlaceholderColor","floatingLabel","activeFloatingLabel","skeleton","width","height","skeletonLabel","bottom","left","inputDisabledBgColor","position","top","floatingLabelColor","activeFloatingLabelColor"],"sources":["number.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport type WmNumberStyles = BaseStyles & {\n invalid: AllStyle;\n focused: AllStyle;\n placeholderText: AllStyle;\n floatingLabel: AllStyle;\n activeFloatingLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n skeletonLabel: WmSkeletonStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-number';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmNumberStyles = defineStyles<WmNumberStyles>({\n root: {\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: themeVariables.inputBorderColor,\n backgroundColor: themeVariables.inputBackgroundColor,\n borderRadius: 6,\n paddingLeft: 16,\n paddingRight: 16\n },\n text: {\n fontSize: 16,\n textAlign: 'left'\n },\n invalid: {\n borderBottomColor: themeVariables.inputInvalidBorderColor\n },\n focused : {\n borderColor: themeVariables.inputFocusBorderColor,\n },\n placeholderText: {\n color: themeVariables.inputPlaceholderColor\n },\n floatingLabel: {},\n activeFloatingLabel: {},\n skeleton: {\n root:{\n borderRadius: 6,\n paddingLeft: 16,\n paddingRight: 16,\n minHeight: 42,\n paddingTop: 8,\n paddingBottom: 8,\n width: '100%',\n height: 40,\n },\n } as any as WmSkeletonStyles,\n skeletonLabel: {\n root: {\n bottom: 12,\n left: 16,\n width:80,\n height:16,\n borderRadius:4\n }\n } as any as WmSkeletonStyles\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n backgroundColor: themeVariables.inputDisabledBgColor\n }\n });\n addStyle(DEFAULT_CLASS + '-rtl', '', {\n root : {\n textAlign: 'right'\n }\n });\n addStyle(DEFAULT_CLASS + '-with-label', '', {\n root: {\n minHeight: 48\n },\n floatingLabel: {\n position: 'absolute',\n top: 12,\n left: 16,\n fontSize: 14,\n color: themeVariables.floatingLabelColor\n },\n activeFloatingLabel: {\n color: themeVariables.activeFloatingLabelColor\n }\n });\n});\n\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAaxF,OAAO,MAAMC,aAAa,GAAG,YAAY;AACzCF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA6B,GAAGL,YAAY,CAAiB;IAC/DM,IAAI,EAAE;MACJC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE,CAAC;MACbC,aAAa,EAAE,CAAC;MAChBC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE,OAAO;MACpBC,WAAW,EAAET,cAAc,CAACU,gBAAgB;MAC5CC,eAAe,EAAEX,cAAc,CAACY,oBAAoB;MACpDC,YAAY,EAAE,CAAC;MACfC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE;IAChB,CAAC;IACDC,IAAI,EAAE;MACJC,QAAQ,EAAE,EAAE;MACZC,SAAS,EAAE;IACb,CAAC;IACDC,OAAO,EAAE;MACPC,iBAAiB,EAAEpB,cAAc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V,mBAAmB,EAAE;MACnBH,KAAK,EAAEzB,cAAc,CAACuC;IACxB;EACF,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
@@ -47,10 +47,11 @@ export default class WmRadioset extends BaseDatasetComponent {
|
|
47
47
|
renderChild(item, index, colWidth) {
|
48
48
|
const displayText = item.displayexp || item.displayfield;
|
49
49
|
const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;
|
50
|
+
const itemStyle = colWidth ? [{
|
51
|
+
width: colWidth
|
52
|
+
}, this.styles.item] : [this.styles.noscrollitem];
|
50
53
|
return /*#__PURE__*/React.createElement(TouchableOpacity, _extends({
|
51
|
-
style: [
|
52
|
-
width: colWidth
|
53
|
-
}],
|
54
|
+
style: [itemStyle, item.selected ? this.styles.selectedItem : null],
|
54
55
|
onPress: this.onPress.bind(this, item),
|
55
56
|
key: item.key
|
56
57
|
}, this.getTestPropsForAction("radio" + index)), /*#__PURE__*/React.createElement(WmIcon, {
|
@@ -59,7 +60,7 @@ export default class WmRadioset extends BaseDatasetComponent {
|
|
59
60
|
styles: item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio,
|
60
61
|
disabled: this.state.props.readonly || this.state.props.disabled
|
61
62
|
}), !isEmpty(this.state.template) && this.props.renderitempartial ? this.props.renderitempartial(item.dataObject, index, this.state.template) : /*#__PURE__*/React.createElement(Text, _extends({
|
62
|
-
style: this.styles.radioLabel
|
63
|
+
style: [this.styles.radioLabel, item.selected ? this.styles.selectedLabel : null]
|
63
64
|
}, this.getTestPropsForLabel('caption' + index)), displayText));
|
64
65
|
}
|
65
66
|
setTemplate(partialName) {
|
@@ -83,9 +84,11 @@ export default class WmRadioset extends BaseDatasetComponent {
|
|
83
84
|
const props = this.state.props;
|
84
85
|
const noOfColumns = props.itemsperrow.xs || 1;
|
85
86
|
const colWidth = Math.round(100 / noOfColumns) + '%';
|
86
|
-
return /*#__PURE__*/React.createElement(View, {
|
87
|
+
return props.radiosetscroll ? /*#__PURE__*/React.createElement(View, {
|
87
88
|
style: noOfColumns === 1 ? {} : this.styles.group
|
88
|
-
}, items && items.length ? items.map((item, index) => this.renderChild(item, index, colWidth)) : null)
|
89
|
+
}, items && items.length ? items.map((item, index) => this.renderChild(item, index, colWidth)) : null) : /*#__PURE__*/React.createElement(View, {
|
90
|
+
style: [this.styles.group]
|
91
|
+
}, items && items.length ? items.map((item, index) => this.renderChild(item, index)) : null);
|
89
92
|
}
|
90
93
|
renderSkeleton(props) {
|
91
94
|
var _ref;
|
@@ -107,11 +110,13 @@ export default class WmRadioset extends BaseDatasetComponent {
|
|
107
110
|
}
|
108
111
|
renderWidget(props) {
|
109
112
|
const items = this.state.dataItems;
|
110
|
-
return /*#__PURE__*/React.createElement(ScrollView, {
|
113
|
+
return props.radiosetscroll ? /*#__PURE__*/React.createElement(ScrollView, {
|
111
114
|
style: this.styles.root
|
112
115
|
}, /*#__PURE__*/React.createElement(ScrollView, {
|
113
116
|
horizontal: true
|
114
|
-
}, props.groupby && this.renderGroupby(), !props.groupby && this.renderRadioButtons(items)))
|
117
|
+
}, props.groupby && this.renderGroupby(), !props.groupby && this.renderRadioButtons(items))) : /*#__PURE__*/React.createElement(View, {
|
118
|
+
style: [this.styles.root]
|
119
|
+
}, props.groupby && this.renderGroupby(), !props.groupby && this.renderRadioButtons(items));
|
115
120
|
}
|
116
121
|
}
|
117
122
|
//# sourceMappingURL=radioset.component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","View","Text","TouchableOpacity","ScrollView","WmRadiosetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","find","isEqual","isEmpty","WmLabel","getNumberOfEmptyObjects","WmRadiosetState","constructor","args","_defineProperty","WmRadioset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","value","getItemKey","createElement","_extends","style","styles","width","bind","getTestPropsForAction","id","getTestId","iconclass","checkedRadio","uncheckedRadio","template","renderitempartial","dataObject","radioLabel","getTestPropsForLabel","setTemplate","partialName","renderGroupby","groupedData","accessibilityRole","length","map","groupObj","groupHeaderTitle","renderRadioButtons","data","items","noOfColumns","itemsperrow","xs","Math","round","group","renderSkeleton","_ref","numberofskeletonitems","_","skeleton","renderWidget","root","horizontal","groupby"],"sources":["radioset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, DimensionValue, TouchableOpacity } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nimport WmRadiosetProps from './radioset.props';\nimport { DEFAULT_CLASS, WmRadiosetStyles } from './radioset.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { find, forEach, isEqual } from 'lodash-es';\nimport { isEmpty } from 'lodash';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmRadiosetState extends BaseDatasetState<WmRadiosetProps> {\n template: string = '';\n}\n\nexport default class WmRadioset extends BaseDatasetComponent<WmRadiosetProps, WmRadiosetState, WmRadiosetStyles> {\n\n constructor(props: WmRadiosetProps) {\n super(props, DEFAULT_CLASS, new WmRadiosetProps());\n }\n\n onPress(item: any) {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n item.selected = true;\n let selectedValue: any = \"\";\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));\n const oldValue = this.state.props.datavalue;\n selectedItem.selected = item.selected;\n selectedValue = selectedItem.selected ? selectedItem.datafield : null;\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmRadiosetState,() => {\n this.computeDisplayValue();\n this.invokeEventCallback('onChange', [ undefined, this.proxy, selectedValue, oldValue ]);\n });\n }\n\n renderChild(item: any, index: any, colWidth: DimensionValue) {\n const displayText = item.displayexp || item.displayfield;\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n return (\n <TouchableOpacity style={[\n this.styles.item,\n item.selected ? this.styles.selectedItem : null,\n {width: colWidth}]} onPress={this.onPress.bind(this, item)} key={item.key} {...this.getTestPropsForAction(\"radio\"+index)}>\n <WmIcon id={this.getTestId('radiobutton' + index)} iconclass=\"wi wi-fiber-manual-record\" styles={item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio} disabled={this.state.props.readonly || this.state.props.disabled}></WmIcon>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : <Text style={this.styles.radioLabel} {...this.getTestPropsForLabel('caption'+index)}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName } as WmRadiosetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View accessibilityRole='radiogroup'>\n {groupedData && groupedData.length\n ? groupedData.map((groupObj: any, index: any) => {\n return(\n <View key={groupObj.key}>\n <Text style={this.styles.groupHeaderTitle}>{groupObj.key}</Text>\n {this.renderRadioButtons(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderRadioButtons(items: any) {\n const props = this.state.props;\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n return(\n <View style={noOfColumns === 1 ? {} : this.styles.group}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index, colWidth)): null}\n </View>)\n }\n\n public renderSkeleton(props: WmRadiosetProps): React.ReactNode {\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n\n return [...getNumberOfEmptyObjects(props.numberofskeletonitems as number ?? 5)].map(_ => {\n return <View style={[this.styles.item, {width: colWidth}]}>\n <WmIcon styles={this.styles.checkedRadio}/>\n <WmLabel styles={{ skeleton: this.styles.skeleton }}/>\n </View>\n })\n\n }\n\n renderWidget(props: WmRadiosetProps) {\n const items = this.state.dataItems;\n return (\n <ScrollView style={this.styles.root}>\n <ScrollView horizontal={true}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </ScrollView>\n </ScrollView>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAkBC,gBAAgB,QAAQ,cAAc;AAC3E,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAOC,eAAe,MAAM,kBAAkB;AAC9C,SAASC,aAAa,QAA0B,mBAAmB;AACnE,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM,MAAM,gEAAgE;AAGnF,SAASC,IAAI,EAAWC,OAAO,QAAQ,WAAW;AAClD,SAASC,OAAO,QAAQ,QAAQ;AAChC,OAAOC,OAAO,MAAM,kEAAkE;AACtF,SAASC,uBAAuB,QAAQ,sCAAsC;AAE9E,OAAO,MAAMC,eAAe,SAASP,gBAAgB,CAAkB;EAAAQ,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,mBAClD,EAAE;EAAA;AACvB;AAEA,eAAe,MAAMC,UAAU,SAASZ,oBAAoB,CAAqD;EAE/GS,WAAWA,CAACI,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,EAAEd,aAAa,EAAE,IAAID,eAAe,CAAC,CAAC,CAAC;EACpD;EAEAgB,OAAOA,CAACC,IAAS,EAAE;IACjB,IAAI,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,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C,EACrC,CAAChD,KAAK,CAACwE,OAAO,IAAI,IAAI,CAACjB,kBAAkB,CAACE,KAAK,CACtC,CACF,CAAC;EAEjB;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","View","Text","TouchableOpacity","ScrollView","WmRadiosetProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","find","isEqual","isEmpty","WmLabel","getNumberOfEmptyObjects","WmRadiosetState","constructor","args","_defineProperty","WmRadioset","props","onPress","item","state","disabled","readonly","invokeEventCallback","proxy","selected","selectedValue","selectedItem","dataItems","d","key","oldValue","datavalue","datafield","validate","updateState","computeDisplayValue","undefined","renderChild","index","colWidth","displayText","displayexp","displayfield","value","getItemKey","itemStyle","width","styles","noscrollitem","createElement","_extends","style","bind","getTestPropsForAction","id","getTestId","iconclass","checkedRadio","uncheckedRadio","template","renderitempartial","dataObject","radioLabel","selectedLabel","getTestPropsForLabel","setTemplate","partialName","renderGroupby","groupedData","accessibilityRole","length","map","groupObj","groupHeaderTitle","renderRadioButtons","data","items","noOfColumns","itemsperrow","xs","Math","round","radiosetscroll","group","renderSkeleton","_ref","numberofskeletonitems","_","skeleton","renderWidget","root","horizontal","groupby"],"sources":["radioset.component.tsx"],"sourcesContent":["import React from 'react';\nimport { View, Text, DimensionValue, TouchableOpacity } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\n\nimport WmRadiosetProps from './radioset.props';\nimport { DEFAULT_CLASS, WmRadiosetStyles } from './radioset.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport WmSkeleton, { createSkeleton } from '../../basic/skeleton/skeleton.component';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';\nimport { find, forEach, isEqual } from 'lodash-es';\nimport { isEmpty } from 'lodash';\nimport WmLabel from '@wavemaker/app-rn-runtime/components/basic/label/label.component';\nimport { getNumberOfEmptyObjects } from '@wavemaker/app-rn-runtime/core/utils';\n\nexport class WmRadiosetState extends BaseDatasetState<WmRadiosetProps> {\n template: string = '';\n}\n\nexport default class WmRadioset extends BaseDatasetComponent<WmRadiosetProps, WmRadiosetState, WmRadiosetStyles> {\n\n constructor(props: WmRadiosetProps) {\n super(props, DEFAULT_CLASS, new WmRadiosetProps());\n }\n\n onPress(item: any) {\n if (this.state.props.disabled || this.state.props.readonly) {\n return;\n }\n this.invokeEventCallback('onTap', [null, this.proxy]);\n item.selected = true;\n let selectedValue: any = \"\";\n const selectedItem = find(this.state.dataItems, d => isEqual(d.key, item.key));\n const oldValue = this.state.props.datavalue;\n selectedItem.selected = item.selected;\n selectedValue = selectedItem.selected ? selectedItem.datafield : null;\n this.validate(selectedValue);\n this.updateState({ props: { datavalue: selectedValue }} as WmRadiosetState,() => {\n this.computeDisplayValue();\n this.invokeEventCallback('onChange', [ undefined, this.proxy, selectedValue, oldValue ]);\n });\n }\n\n renderChild(item: any, index: any, colWidth?: DimensionValue) {\n const displayText = item.displayexp || item.displayfield;\n const value = this.state.props.datafield === 'All Fields' ? this.getItemKey(item.datafield) : item.datafield;\n const itemStyle = colWidth ? [{ width: colWidth }, this.styles.item] \n : [this.styles.noscrollitem];\n return (\n <TouchableOpacity style={[\n itemStyle,\n item.selected ? this.styles.selectedItem : null]}\n onPress={this.onPress.bind(this, item)} key={item.key} {...this.getTestPropsForAction(\"radio\"+index)}>\n <WmIcon id={this.getTestId('radiobutton' + index)} iconclass=\"wi wi-fiber-manual-record\" styles={item.selected ? this.styles.checkedRadio : this.styles.uncheckedRadio} disabled={this.state.props.readonly || this.state.props.disabled}></WmIcon>\n {!isEmpty(this.state.template) && this.props.renderitempartial ?\n this.props.renderitempartial(item.dataObject, index, this.state.template) : <Text style={[this.styles.radioLabel, item.selected ? this.styles.selectedLabel : null]} {...this.getTestPropsForLabel('caption'+index)}>{displayText}</Text>}\n </TouchableOpacity>)\n }\n\n setTemplate(partialName: any) {\n this.updateState({ template: partialName } as WmRadiosetState);\n }\n\n renderGroupby() {\n const groupedData = this.state.groupedData;\n return (\n <View accessibilityRole='radiogroup'>\n {groupedData && groupedData.length\n ? groupedData.map((groupObj: any, index: any) => {\n return(\n <View key={groupObj.key}>\n <Text style={this.styles.groupHeaderTitle}>{groupObj.key}</Text>\n {this.renderRadioButtons(groupObj.data)}\n </View>)\n })\n : null}\n </View>\n );\n }\n\n renderRadioButtons(items: any) {\n const props = this.state.props;\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n return props.radiosetscroll ? (\n <View style={noOfColumns === 1 ? {} : this.styles.group}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index, colWidth)): null}\n </View>\n ) : (\n <View style={[this.styles.group]}>\n {items && items.length ?\n items.map((item: any, index: any) => this.renderChild(item, index)): null}\n </View>\n )\n }\n\n public renderSkeleton(props: WmRadiosetProps): React.ReactNode {\n const noOfColumns = props.itemsperrow.xs || 1;\n const colWidth = Math.round(100/ noOfColumns) + '%' as DimensionValue;\n\n return [...getNumberOfEmptyObjects(props.numberofskeletonitems as number ?? 5)].map(_ => {\n return <View style={[this.styles.item, {width: colWidth}]}>\n <WmIcon styles={this.styles.checkedRadio}/>\n <WmLabel styles={{ skeleton: this.styles.skeleton }}/>\n </View>\n })\n\n }\n\n renderWidget(props: WmRadiosetProps) {\n const items = this.state.dataItems;\n return props.radiosetscroll ? (\n <ScrollView style={this.styles.root}>\n <ScrollView horizontal={true}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </ScrollView>\n </ScrollView>\n ) : (\n <View style={[this.styles.root]}>\n {props.groupby && this.renderGroupby()}\n {!props.groupby && this.renderRadioButtons(items)}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,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1B3E,KAAK,CAAC4E,OAAO,IAAI,IAAI,CAACzB,aAAa,CAAC,CAAC,EACrC,CAACnD,KAAK,CAAC4E,OAAO,IAAI,IAAI,CAAClB,kBAAkB,CAACE,KAAK,CACtC,CACF,CAAC,gBAEbhF,KAAA,CAAAqD,aAAA,CAACpD,IAAI;MAACsD,KAAK,EAAE,CAAC,IAAI,CAACJ,MAAM,CAAC2C,IAAI;IAAE,GAC7B1E,KAAK,CAAC4E,OAAO,IAAI,IAAI,CAACzB,aAAa,CAAC,CAAC,EACrC,CAACnD,KAAK,CAAC4E,OAAO,IAAI,IAAI,CAAClB,kBAAkB,CAACE,KAAK,CAC5C,CACP;EACH;AACF","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseDatasetProps","WmRadiosetProps","constructor","args","_defineProperty","xs","sm","md","lg"],"sources":["radioset.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmRadiosetProps extends BaseDatasetProps {\n dataset: any = 'Option 1, Option 2, Option 3';\n itemsperrow = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 1,\n };\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n numberofskeletonitems?: number | string\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAEvG,eAAe,MAAMC,eAAe,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAC7C,8BAA8B;IAAAA,eAAA,sBAC9B;MACbC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE;IACP,CAAC;IAAAJ,eAAA;IAAAA,eAAA;EAAA;
|
1
|
+
{"version":3,"names":["BaseDatasetProps","WmRadiosetProps","constructor","args","_defineProperty","xs","sm","md","lg"],"sources":["radioset.props.ts"],"sourcesContent":["import BaseDatasetProps from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.props';\n\nexport default class WmRadiosetProps extends BaseDatasetProps {\n dataset: any = 'Option 1, Option 2, Option 3';\n itemsperrow = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 1,\n };\n radiosetscroll: boolean = true;\n renderitempartial?: (item: any, index: number, partialName: string)=> React.ReactNode;\n numberofskeletonitems?: number | string\n}\n"],"mappings":";;;AAAA,OAAOA,gBAAgB,MAAM,0EAA0E;AAEvG,eAAe,MAAMC,eAAe,SAASD,gBAAgB,CAAC;EAAAE,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,kBAC7C,8BAA8B;IAAAA,eAAA,sBAC9B;MACbC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE,CAAC;MACLC,EAAE,EAAE;IACP,CAAC;IAAAJ,eAAA,yBACyB,IAAI;IAAAA,eAAA;IAAAA,eAAA;EAAA;AAG/B","ignoreList":[]}
|
@@ -25,7 +25,14 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
25
25
|
marginRight: -20,
|
26
26
|
marginTop: 8
|
27
27
|
},
|
28
|
+
noscrollitem: {
|
29
|
+
flexDirection: 'row',
|
30
|
+
alignContent: 'center',
|
31
|
+
marginTop: 8,
|
32
|
+
marginLeft: 16
|
33
|
+
},
|
28
34
|
selectedItem: {},
|
35
|
+
selectedLabel: {},
|
29
36
|
radioLabel: {
|
30
37
|
alignSelf: 'center',
|
31
38
|
fontFamily: themeVariables.baseFont,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","checkedColor","text","group","flexDirection","flexWrap","groupHeaderTitle","backgroundColor","groupHeadingBgColor","fontSize","paddingLeft","paddingRight","lineHeight","fontFamily","baseFont","item","alignContent","marginRight","marginTop","selectedItem","radioLabel","alignSelf","labelDefaultColor","
|
1
|
+
{"version":3,"names":["BASE_THEME","defineStyles","DEFAULT_CLASS","registerStyle","themeVariables","addStyle","defaultStyles","root","color","checkedColor","text","group","flexDirection","flexWrap","groupHeaderTitle","backgroundColor","groupHeadingBgColor","fontSize","paddingLeft","paddingRight","lineHeight","fontFamily","baseFont","item","alignContent","marginRight","marginTop","noscrollitem","marginLeft","selectedItem","selectedLabel","radioLabel","alignSelf","labelDefaultColor","skeleton","width","height","borderRadius","uncheckedRadio","borderStyle","borderWidth","borderColor","checkedBorderColor","icon","opacity","checkedRadio","padding","checkedDisabledColor"],"sources":["radioset.styles.ts"],"sourcesContent":["import BASE_THEME, { AllStyle } from '@wavemaker/app-rn-runtime/styles/theme';\nimport { BaseStyles, defineStyles } from '@wavemaker/app-rn-runtime/core/base.component';\nimport { WmSkeletonStyles } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.styles';\nimport { WmIconStyles } from '@wavemaker/app-rn-runtime/components/basic/icon/icon.styles';\n\nexport type WmRadiosetStyles = BaseStyles & {\n group: AllStyle,\n groupHeaderTitle: AllStyle;\n item: AllStyle;\n selectedItem: AllStyle;\n radioLabel: AllStyle;\n skeleton: WmSkeletonStyles;\n uncheckedRadio: WmIconStyles;\n checkedRadio: WmIconStyles;\n};\n\nexport const DEFAULT_CLASS = 'app-radioset';\nBASE_THEME.registerStyle((themeVariables, addStyle) => {\n const defaultStyles: WmRadiosetStyles = defineStyles({\n root: {\n color: themeVariables.checkedColor\n },\n text: {},\n group: {\n flexDirection: 'row',\n flexWrap: 'wrap'\n },\n groupHeaderTitle: {\n backgroundColor: themeVariables.groupHeadingBgColor,\n fontSize: 16,\n paddingLeft: 8,\n paddingRight: 8,\n lineHeight: 40,\n fontFamily: themeVariables.baseFont\n } as AllStyle,\n item: {\n flexDirection: 'row',\n alignContent: 'center',\n marginRight: -20,\n marginTop: 8\n } as AllStyle,\n noscrollitem:{\n flexDirection: 'row',\n alignContent: 'center',\n marginTop: 8, \n marginLeft: 16 \n } as AllStyle,\n selectedItem: {} as AllStyle,\n selectedLabel: {} as AllStyle,\n radioLabel: {\n alignSelf: 'center',\n fontFamily: themeVariables.baseFont,\n fontSize: 16,\n color: themeVariables.labelDefaultColor,\n marginLeft: 8\n } as AllStyle,\n skeleton: {\n root: {\n width: '100%',\n height: 16,\n borderRadius: 4,\n }\n } as any as WmSkeletonStyles,\n uncheckedRadio: {\n root: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 2,\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {},\n icon: {\n opacity: 0,\n }\n } as WmIconStyles,\n checkedRadio : {\n root: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderStyle: \"solid\",\n borderWidth: 2,\n borderColor: themeVariables.checkedBorderColor,\n },\n text: {\n fontSize: 16,\n },\n icon : {\n color: themeVariables.checkedColor,\n padding: 0,\n }\n } as WmIconStyles\n});\n\n addStyle(DEFAULT_CLASS + '-disabled', '', {\n root : {\n color: themeVariables.checkedDisabledColor,\n opacity: 0.8\n }\n });\n\n addStyle(DEFAULT_CLASS, '', defaultStyles);\n});\n"],"mappings":"AAAA,OAAOA,UAAU,MAAoB,wCAAwC;AAC7E,SAAqBC,YAAY,QAAQ,+CAA+C;AAexF,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3CF,UAAU,CAACG,aAAa,CAAC,CAACC,cAAc,EAAEC,QAAQ,KAAK;EACrD,MAAMC,aAA+B,GAAGL,YAAY,CAAC;IACjDM,IAAI,EAAE;MACJC,KAAK,EAAEJ,cAAc,CAACK;IACxB,CAAC;IACDC,IAAI,EAAE,CAAC,CAAC;IACRC,KAAK,EAAE;MACLC,aAAa,EAAE,KAAK;MACpBC,QAAQ,EAAE;IACZ,CAAC;IACDC,gBAAgB,EAAE;MAChBC,eAAe,EAAEX,cAAc,CAACY,mBAAmB;MACnDC,QAAQ,EAAE,EAAE;MACZC,WAAW,EAAE,CAAC;MACdC,YAAY,EAAE,CAAC;MACfC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,EAAE;MACZ,CAAC;MACD0B,IAAI,EAAG;QACLnC,KAAK,EAAEJ,cAAc,CAACK,YAAY;QAClCqC,OAAO,EAAE;MACX;IACN;EACF,CAAC,CAAC;EAEAzC,QAAQ,CAACH,aAAa,GAAG,WAAW,EAAE,EAAE,EAAE;IACxCK,IAAI,EAAG;MACLC,KAAK,EAAEJ,cAAc,CAAC2C,oBAAoB;MAC1CH,OAAO,EAAE;IACX;EACF,CAAC,CAAC;EAEFvC,QAAQ,CAACH,aAAa,EAAE,EAAE,EAAEI,aAAa,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
|
@@ -16,6 +16,7 @@ import { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';
|
|
16
16
|
import ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';
|
17
17
|
import { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility';
|
18
18
|
import { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';
|
19
|
+
import { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';
|
19
20
|
export class WmSelectState extends BaseDatasetState {
|
20
21
|
constructor(...args) {
|
21
22
|
super(...args);
|
@@ -89,6 +90,11 @@ export default class WmSelect extends BaseDatasetComponent {
|
|
89
90
|
var _this$widgetRef;
|
90
91
|
this === null || this === void 0 || (_this$widgetRef = this.widgetRef) === null || _this$widgetRef === void 0 || _this$widgetRef.focus();
|
91
92
|
}
|
93
|
+
renderSkeletonForText() {
|
94
|
+
return createSkeleton(this.theme, {}, {
|
95
|
+
...this.styles.textSkeleton.root
|
96
|
+
});
|
97
|
+
}
|
92
98
|
renderSelect() {
|
93
99
|
const props = this.state.props;
|
94
100
|
const select = this.styles.root;
|
@@ -101,7 +107,9 @@ export default class WmSelect extends BaseDatasetComponent {
|
|
101
107
|
React.createElement(View, {
|
102
108
|
style: [this.styles.root, this.state.isValid ? {} : this.styles.invalid, {
|
103
109
|
backgroundColor: props.disabled ? this.styles.disabledText.backgroundColor : this.styles.root.backgroundColor
|
104
|
-
}
|
110
|
+
}, this._showSkeleton ? {
|
111
|
+
justifyContent: 'space-between'
|
112
|
+
} : {}],
|
105
113
|
ref: ref => {
|
106
114
|
this.view = ref;
|
107
115
|
},
|
@@ -115,7 +123,7 @@ export default class WmSelect extends BaseDatasetComponent {
|
|
115
123
|
style: {
|
116
124
|
borderRadius: this.styles.root.borderRadius
|
117
125
|
}
|
118
|
-
}) : null, /*#__PURE__*/React.createElement(Text, _extends({
|
126
|
+
}) : null, this._showSkeleton && (this.state.props.displayValue || props.placeholder) ? this.renderSkeletonForText() : /*#__PURE__*/React.createElement(Text, _extends({
|
119
127
|
style: [this.styles.text, this.state.props.displayValue ? {} : {
|
120
128
|
color: this.styles.placeholderText.color
|
121
129
|
}],
|
@@ -125,7 +133,7 @@ export default class WmSelect extends BaseDatasetComponent {
|
|
125
133
|
}, this.getTestPropsForInput(), getAccessibilityProps(AccessibilityWidgetType.SELECT, props), {
|
126
134
|
onPress: this.onPress.bind(this)
|
127
135
|
}), this.state.props.displayValue || props.placeholder || ' '), /*#__PURE__*/React.createElement(WmButton, {
|
128
|
-
styles: this.styles.arrowButton,
|
136
|
+
styles: this._showSkeleton ? this.styles.arrowButtonSkeleton.root : this.styles.arrowButton,
|
129
137
|
iconclass: 'wi wi-keyboard-arrow-down',
|
130
138
|
onTap: this.onPress.bind(this),
|
131
139
|
hint: props === null || props === void 0 ? void 0 : props.hint
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","Text","View","ScrollView","find","isEmpty","WmSelectProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","ModalConsumer","WmButton","Tappable","ThemeVariables","AccessibilityWidgetType","getAccessibilityProps","BackgroundComponent","WmSelectState","constructor","args","_defineProperty","WmSelect","props","updateState","isOpened","onPress","event","state","disabled","showPopover","invokeEventCallback","proxy","onPropertyChange","name","$new","$old","isNaN","displayValue","placeholder","prepareModalOptions","content","styles","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","centered","onClose","hide","isDefaultValue","validate","setTimeout","triggerValidation","setState","hideModal","focus","_this$widgetRef","widgetRef","renderSelect","select","root","createElement","style","isValid","invalid","backgroundColor","disabledText","ref","view","onLayout","backgroundImage","image","position","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","borderRadius","_extends","text","color","placeholderText","getTestPropsForInput","SELECT","bind","arrowButton","iconclass","onTap","hint","isSelected","item","val","datafield","dataObject","datavalue","onItemSelect","isPlaceholder","onChange","renderSelectItem","index","isLast","selected","getTestPropsForAction","accessibilityProps","expanded","selectItem","lastSelectItem","selectedItem","getTestPropsForLabel","selectItemText","selectedItemText","displayexp","displayfield","id","getTestId","theme","mergeStyle","checkIcon","opacity","updateDefaultQueryModel","dataItems","length","componentDidMount","onDataItemsUpdate","renderWidget","_background","items","showModal","width","maxHeight","INSTANCE","maxModalHeight","contentContainerStyle","dropDownContent","key","map"],"sources":["select.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, isEmpty } from 'lodash';\n\nimport WmSelectProps from './select.props';\nimport { DEFAULT_CLASS, WmSelectStyles } from './select.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\n\nexport class WmSelectState extends BaseDatasetState<WmSelectProps> {\n modalOptions = {} as ModalOptions;\n isOpened: boolean = false;\n selectedValue: any = '';\n}\n\nexport default class WmSelect extends BaseDatasetComponent<WmSelectProps, WmSelectState, WmSelectStyles> {\n constructor(props: WmSelectProps) {\n super(props, DEFAULT_CLASS, new WmSelectProps(), new WmSelectState());\n }\n view: View = null as any;\n public widgetRef: Text | null = null;\n private isDefaultValue: boolean = true;\n\n onPress(event: any) {\n if (this.state.props.disabled) {\n return;\n }\n if (!this.state.isOpened) {\n this.showPopover();\n }\n this.invokeEventCallback('onFocus', [event, this.proxy]);\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'datavalue':\n if (isNaN($new) && isEmpty($new)) {\n this.updateState({\n props: {\n displayValue: this.state.props.placeholder || ''\n }\n } as WmSelectState);\n }\n }\n }\n\n prepareModalOptions(content: React.ReactNode, styles: WmSelectStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent};\n o.content = content;\n o.isModal = true;\n o.centered = true;\n o.onClose = () => {\n this.hide = () => {};\n if (this.isDefaultValue && this.state.props.displayValue === '') {\n this.validate(this.state.props.displayValue);\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n }, 0);\n }\n this.invokeEventCallback('onBlur', [{}, this.proxy]);\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSelectState);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n public showPopover = () => {\n this.updateState({ isOpened: true } as WmSelectState);\n };\n\n public hide = () => {};\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n renderSelect() {\n const props = this.state.props;\n const select = this.styles.root as any;\n return (\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View\n style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, { backgroundColor: props.disabled ? this.styles.disabledText.backgroundColor : this.styles.root.backgroundColor}]}\n ref={(ref) => {\n this.view = ref as View;\n }}\n onLayout={() => {}}>\n {select.backgroundImage ? (<BackgroundComponent\n image={select.backgroundImage}\n position={select.backgroundPosition || 'center'}\n size={select.backgroundSize || 'contain'}\n repeat={select.backgroundRepeat || 'no-repeat'}\n resizeMode={select.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}\n ></BackgroundComponent>) : null }\n <Text\n style={[this.styles.text,\n this.state.props.displayValue ? {} : {color: this.styles.placeholderText.color}]}\n ref={(ref) => {\n this.widgetRef = ref;\n }}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.SELECT,\n props\n )}\n onPress={this.onPress.bind(this)}>\n {this.state.props.displayValue || props.placeholder || ' '}\n </Text>\n <WmButton\n styles={this.styles.arrowButton}\n iconclass={'wi wi-keyboard-arrow-down'}\n onTap={this.onPress.bind(this)}\n hint={props?.hint}\n />\n </View>\n );\n }\n\n isSelected(item: any) {\n const val = this.state.props.datafield === 'All Fields' ? item.dataObject : item.datafield;\n return this.state.props.datavalue === val;\n }\n\n onItemSelect(item: any, isPlaceholder?: boolean) {\n this.isDefaultValue = false;\n this.onChange(isPlaceholder ? '' : this.state.props.datafield === 'All Fields' ? item.dataObject : item.datafield);\n this.hide();\n }\n\n renderSelectItem(item: any, index: number, isPlaceholder: boolean, isLast: boolean) {\n let selected = this.isSelected(item);\n return (\n <Tappable {...this.getTestPropsForAction('selectitem'+index)} onTap={this.onItemSelect.bind(this, item, isPlaceholder)} \n accessibilityProps={{...getAccessibilityProps(\n AccessibilityWidgetType.SELECT,\n {...this.props, expanded: this.state.isOpened}\n )}}>\n <View style={[this.styles.selectItem, isLast ? this.styles.lastSelectItem : null, selected ? this.styles.selectedItem : null ]}>\n <Text {...this.getTestPropsForLabel('label'+index)} style={[this.styles.selectItemText, {color: isPlaceholder ? this.styles.placeholderText.color : selected ? this.styles.selectedItemText.color : this.styles.selectItemText.color}]}>\n {isPlaceholder ? this.state.props.placeholder : (item.displayexp || item.displayfield)}\n </Text>\n <WmIcon id={this.getTestId('checkicon' + index)} iconclass='wi wi-check' styles={this.theme.mergeStyle(this.styles.checkIcon, {\n root: {\n opacity: !isPlaceholder && selected ? 1 : 0\n }\n })}></WmIcon>\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultValue) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n selectedItem && this.updateState({\n props: {\n displayValue: selectedItem.displayexp || selectedItem.displayfield || ''\n }\n } as WmSelectState);\n }\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.updateDefaultQueryModel();\n }\n\n renderWidget(props: WmSelectProps) {\n return (\n <View>\n {this._background}\n {this.renderSelect()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n const items = this.state.dataItems;\n modalService.showModal(\n this.prepareModalOptions(\n <ScrollView style={{width: '100%', maxHeight: ThemeVariables.INSTANCE.maxModalHeight}} contentContainerStyle={this.styles.dropDownContent}>\n {props.placeholder ?\n <View key={props.name + '_placeholder'} style={this.styles.placeholderText}>\n {this.renderSelectItem({}, 0, true, false)}\n </View>\n : null}\n {items && items.map((item: any, index: number) => (\n <View key={item.key}>\n {this.renderSelectItem(item, index, false, index === items.length - 1)}\n </View>\n ))}\n </ScrollView>,\n this.styles,\n modalService\n )\n );\n return null;\n }}\n </ModalConsumer>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,OAAO,QAAQ,QAAQ;AAEtC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,i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AAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CACrC,CAAC,GACL,IAAI,EACL4B,KAAK,IAAIA,KAAK,CAACS,GAAG,CAAC,CAAC7C,IAAS,EAAES,KAAa,kBAC3C3G,KAAA,CAAAkE,aAAA,CAAChE,IAAI;QAAC4I,GAAG,EAAE5C,IAAI,CAAC4C;MAAI,GACjB,IAAI,CAACpC,gBAAgB,CAACR,IAAI,EAAES,KAAK,EAAE,KAAK,EAAEA,KAAK,KAAK2B,KAAK,CAACL,MAAM,GAAG,CAAC,CACjE,CACP,CACO,CAAC,EACb,IAAI,CAACvF,MAAM,EACXC,YACF,CACF,CAAC;MACD,OAAO,IAAI;IACb,CACa,CAAC,GACd,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
1
|
+
{"version":3,"names":["React","Text","View","ScrollView","find","isEmpty","WmSelectProps","DEFAULT_CLASS","BaseDatasetComponent","BaseDatasetState","WmIcon","ModalConsumer","WmButton","Tappable","ThemeVariables","AccessibilityWidgetType","getAccessibilityProps","BackgroundComponent","createSkeleton","WmSelectState","constructor","args","_defineProperty","WmSelect","props","updateState","isOpened","onPress","event","state","disabled","showPopover","invokeEventCallback","proxy","onPropertyChange","name","$new","$old","isNaN","displayValue","placeholder","prepareModalOptions","content","styles","modalService","o","modalOptions","modalStyle","modal","contentStyle","modalContent","isModal","centered","onClose","hide","isDefaultValue","validate","setTimeout","triggerValidation","setState","hideModal","focus","_this$widgetRef","widgetRef","renderSkeletonForText","theme","textSkeleton","root","renderSelect","select","createElement","style","isValid","invalid","backgroundColor","disabledText","_showSkeleton","justifyContent","ref","view","onLayout","backgroundImage","image","position","backgroundPosition","size","backgroundSize","repeat","backgroundRepeat","resizeMode","backgroundResizeMode","borderRadius","_extends","text","color","placeholderText","getTestPropsForInput","SELECT","bind","arrowButtonSkeleton","arrowButton","iconclass","onTap","hint","isSelected","item","val","datafield","dataObject","datavalue","onItemSelect","isPlaceholder","onChange","renderSelectItem","index","isLast","selected","getTestPropsForAction","accessibilityProps","expanded","selectItem","lastSelectItem","selectedItem","getTestPropsForLabel","selectItemText","selectedItemText","displayexp","displayfield","id","getTestId","mergeStyle","checkIcon","opacity","updateDefaultQueryModel","dataItems","length","componentDidMount","onDataItemsUpdate","renderWidget","_background","items","showModal","width","maxHeight","INSTANCE","maxModalHeight","contentContainerStyle","dropDownContent","key","map"],"sources":["select.component.tsx"],"sourcesContent":["import React from 'react';\nimport { DimensionValue, Text, View } from 'react-native';\nimport { ScrollView } from 'react-native-gesture-handler';\nimport { find, isEmpty } from 'lodash';\n\nimport WmSelectProps from './select.props';\nimport { DEFAULT_CLASS, WmSelectStyles } from './select.styles';\nimport {\n BaseDatasetComponent,\n BaseDatasetState\n} from '@wavemaker/app-rn-runtime/components/input/basedataset/basedataset.component';\nimport WmIcon from '@wavemaker/app-rn-runtime/components/basic/icon/icon.component';\nimport { ModalConsumer, ModalOptions, ModalService } from '@wavemaker/app-rn-runtime/core/modal.service';\nimport WmButton from '@wavemaker/app-rn-runtime/components/basic/button/button.component';\nimport { Tappable } from '@wavemaker/app-rn-runtime/core/tappable.component';\nimport ThemeVariables from '@wavemaker/app-rn-runtime/styles/theme.variables';\nimport { AccessibilityWidgetType, getAccessibilityProps } from '@wavemaker/app-rn-runtime/core/accessibility'; \nimport { BackgroundComponent } from '@wavemaker/app-rn-runtime/styles/background.component';\nimport { createSkeleton } from '@wavemaker/app-rn-runtime/components/basic/skeleton/skeleton.component';\nimport { WmSkeletonStyles } from '../../basic/skeleton/skeleton.styles';\n\nexport class WmSelectState extends BaseDatasetState<WmSelectProps> {\n modalOptions = {} as ModalOptions;\n isOpened: boolean = false;\n selectedValue: any = '';\n}\n\nexport default class WmSelect extends BaseDatasetComponent<WmSelectProps, WmSelectState, WmSelectStyles> {\n constructor(props: WmSelectProps) {\n super(props, DEFAULT_CLASS, new WmSelectProps(), new WmSelectState());\n }\n view: View = null as any;\n public widgetRef: Text | null = null;\n private isDefaultValue: boolean = true;\n\n onPress(event: any) {\n if (this.state.props.disabled) {\n return;\n }\n if (!this.state.isOpened) {\n this.showPopover();\n }\n this.invokeEventCallback('onFocus', [event, this.proxy]);\n }\n\n onPropertyChange(name: string, $new: any, $old: any): void {\n super.onPropertyChange(name, $new, $old);\n switch(name) {\n case 'datavalue':\n if (isNaN($new) && isEmpty($new)) {\n this.updateState({\n props: {\n displayValue: this.state.props.placeholder || ''\n }\n } as WmSelectState);\n }\n }\n }\n\n prepareModalOptions(content: React.ReactNode, styles: WmSelectStyles, modalService: ModalService) {\n const o = this.state.modalOptions;\n o.modalStyle = styles.modal;\n o.contentStyle = {...styles.modalContent};\n o.content = content;\n o.isModal = true;\n o.centered = true;\n o.onClose = () => {\n this.hide = () => {};\n if (this.isDefaultValue && this.state.props.displayValue === '') {\n this.validate(this.state.props.displayValue);\n setTimeout(() => {\n this.props.triggerValidation && this.props.triggerValidation();\n }, 0);\n }\n this.invokeEventCallback('onBlur', [{}, this.proxy]);\n this.setState({ isOpened: false, modalOptions: {} as ModalOptions } as WmSelectState);\n };\n this.hide = () => modalService.hideModal(this.state.modalOptions);\n return o;\n }\n\n public showPopover = () => {\n this.updateState({ isOpened: true } as WmSelectState);\n };\n\n public hide = () => {};\n\n focus() {\n this?.widgetRef?.focus();\n }\n\n private renderSkeletonForText(){\n return createSkeleton(this.theme, {} as WmSkeletonStyles, {\n ...this.styles.textSkeleton.root\n });\n }\n\n renderSelect() {\n const props = this.state.props;\n const select = this.styles.root as any;\n return (\n /*\n * onLayout function is required.\n * https://github.com/naoufal/react-native-accordion/pull/19/files\n */\n <View\n style={[this.styles.root, this.state.isValid ? {} : this.styles.invalid, { backgroundColor: props.disabled ? this.styles.disabledText.backgroundColor : this.styles.root.backgroundColor}, \n this._showSkeleton ? { justifyContent: 'space-between' } : {}]}\n ref={(ref) => {\n this.view = ref as View;\n }}\n onLayout={() => {}}>\n {select.backgroundImage ? (<BackgroundComponent\n image={select.backgroundImage}\n position={select.backgroundPosition || 'center'}\n size={select.backgroundSize || 'contain'}\n repeat={select.backgroundRepeat || 'no-repeat'}\n resizeMode={select.backgroundResizeMode}\n style={{borderRadius: this.styles.root.borderRadius}}\n ></BackgroundComponent>) : null }\n {this._showSkeleton && (this.state.props.displayValue || props.placeholder)? this.renderSkeletonForText() : <Text\n style={[this.styles.text,\n this.state.props.displayValue ? {} : {color: this.styles.placeholderText.color}]}\n ref={(ref) => {\n this.widgetRef = ref;\n }}\n {...this.getTestPropsForInput()}\n {...getAccessibilityProps(\n AccessibilityWidgetType.SELECT,\n props\n )}\n onPress={this.onPress.bind(this)}>\n {this.state.props.displayValue || props.placeholder || ' '}\n </Text>}\n <WmButton\n styles={this._showSkeleton ? this.styles.arrowButtonSkeleton.root : this.styles.arrowButton}\n iconclass={'wi wi-keyboard-arrow-down'}\n onTap={this.onPress.bind(this)}\n hint={props?.hint}\n />\n </View>\n );\n }\n\n isSelected(item: any) {\n const val = this.state.props.datafield === 'All Fields' ? item.dataObject : item.datafield;\n return this.state.props.datavalue === val;\n }\n\n onItemSelect(item: any, isPlaceholder?: boolean) {\n this.isDefaultValue = false;\n this.onChange(isPlaceholder ? '' : this.state.props.datafield === 'All Fields' ? item.dataObject : item.datafield);\n this.hide();\n }\n\n renderSelectItem(item: any, index: number, isPlaceholder: boolean, isLast: boolean) {\n let selected = this.isSelected(item);\n return (\n <Tappable {...this.getTestPropsForAction('selectitem'+index)} onTap={this.onItemSelect.bind(this, item, isPlaceholder)} \n accessibilityProps={{...getAccessibilityProps(\n AccessibilityWidgetType.SELECT,\n {...this.props, expanded: this.state.isOpened}\n )}}>\n <View style={[this.styles.selectItem, isLast ? this.styles.lastSelectItem : null, selected ? this.styles.selectedItem : null ]}>\n <Text {...this.getTestPropsForLabel('label'+index)} style={[this.styles.selectItemText, {color: isPlaceholder ? this.styles.placeholderText.color : selected ? this.styles.selectedItemText.color : this.styles.selectItemText.color}]}>\n {isPlaceholder ? this.state.props.placeholder : (item.displayexp || item.displayfield)}\n </Text>\n <WmIcon id={this.getTestId('checkicon' + index)} iconclass='wi wi-check' styles={this.theme.mergeStyle(this.styles.checkIcon, {\n root: {\n opacity: !isPlaceholder && selected ? 1 : 0\n }\n })}></WmIcon>\n </View>\n </Tappable>\n );\n }\n\n updateDefaultQueryModel() {\n if (this.state.dataItems && this.state.dataItems.length && this.isDefaultValue) {\n const selectedItem = find(this.state.dataItems, (item) => item.selected);\n selectedItem && this.updateState({\n props: {\n displayValue: selectedItem.displayexp || selectedItem.displayfield || ''\n }\n } as WmSelectState);\n }\n }\n\n componentDidMount() {\n super.componentDidMount();\n this.updateDefaultQueryModel();\n }\n\n onDataItemsUpdate() {\n super.onDataItemsUpdate();\n this.updateDefaultQueryModel();\n }\n\n renderWidget(props: WmSelectProps) {\n return (\n <View>\n {this._background}\n {this.renderSelect()}\n {this.state.isOpened ? (\n <ModalConsumer>\n {(modalService: ModalService) => {\n const items = this.state.dataItems;\n modalService.showModal(\n this.prepareModalOptions(\n <ScrollView style={{width: '100%', maxHeight: ThemeVariables.INSTANCE.maxModalHeight}} contentContainerStyle={this.styles.dropDownContent}>\n {props.placeholder ?\n <View key={props.name + '_placeholder'} style={this.styles.placeholderText}>\n {this.renderSelectItem({}, 0, true, false)}\n </View>\n : null}\n {items && items.map((item: any, index: number) => (\n <View key={item.key}>\n {this.renderSelectItem(item, index, false, index === items.length - 1)}\n </View>\n ))}\n </ScrollView>,\n this.styles,\n modalService\n )\n );\n return null;\n }}\n </ModalConsumer>\n ) : null}\n </View>\n );\n }\n}\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,IAAI,EAAEC,OAAO,QAAQ,QAAQ;AAEtC,OAAOC,aAAa,MAAM,gBAAgB;AAC1C,SAASC,aAAa,QAAwB,iBAAiB;AAC/D,SACEC,oBAAoB,EACpBC,gBAAgB,QACX,8EAA8E;AACrF,OAAOC,MAAM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IAAI,CAACpG,mBAAmB,eACtBzC,KAAA,CAAAsE,aAAA,CAACnE,UAAU;QAACoE,KAAK,EAAE;UAACuE,KAAK,EAAE,MAAM;UAAEC,SAAS,EAAEjI,cAAc,CAACkI,QAAQ,CAACC;QAAc,CAAE;QAACC,qBAAqB,EAAE,IAAI,CAACvG,MAAM,CAACwG;MAAgB,GACvI3H,KAAK,CAACgB,WAAW,gBAChBxC,KAAA,CAAAsE,aAAA,CAACpE,IAAI;QAACkJ,GAAG,EAAE5H,KAAK,CAACW,IAAI,GAAG,cAAe;QAACoC,KAAK,EAAE,IAAI,CAAC5B,MAAM,CAACoD;MAAgB,GACxE,IAAI,CAACkB,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CACrC,CAAC,GACL,IAAI,EACL2B,KAAK,IAAIA,KAAK,CAACS,GAAG,CAAC,CAAC5C,IAAS,EAAES,KAAa,kBAC3ClH,KAAA,CAAAsE,aAAA,CAACpE,IAAI;QAACkJ,GAAG,EAAE3C,IAAI,CAAC2C;MAAI,GACjB,IAAI,CAACnC,gBAAgB,CAACR,IAAI,EAAES,KAAK,EAAE,KAAK,EAAEA,KAAK,KAAK0B,KAAK,CAACL,MAAM,GAAG,CAAC,CACjE,CACP,CACO,CAAC,EACb,IAAI,CAAC5F,MAAM,EACXC,YACF,CACF,CAAC;MACD,OAAO,IAAI;IACb,CACa,CAAC,GACd,IACA,CAAC;EAEX;AACF","ignoreList":[]}
|
@@ -84,6 +84,30 @@ BASE_THEME.registerStyle((themeVariables, addStyle) => {
|
|
84
84
|
justifyContent: 'center',
|
85
85
|
backgroundColor: 'transparent'
|
86
86
|
}
|
87
|
+
},
|
88
|
+
skeleton: {
|
89
|
+
root: {
|
90
|
+
minWidth: 0,
|
91
|
+
width: 120,
|
92
|
+
height: 16,
|
93
|
+
borderRadius: 4,
|
94
|
+
marginRight: 8,
|
95
|
+
padding: 0
|
96
|
+
}
|
97
|
+
},
|
98
|
+
arrowButtonSkeleton: {
|
99
|
+
root: {
|
100
|
+
width: 24,
|
101
|
+
height: 24,
|
102
|
+
borderRadius: 12
|
103
|
+
}
|
104
|
+
},
|
105
|
+
textSkeleton: {
|
106
|
+
root: {
|
107
|
+
width: 100,
|
108
|
+
height: 16,
|
109
|
+
borderRadius: 8
|
110
|
+
}
|
87
111
|
}
|
88
112
|
});
|
89
113
|
addStyle(DEFAULT_CLASS, '', defaultStyles);
|