@jescon-technologies/react-native-ui-kit 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common/ErrorBoundary.d.ts +15 -0
- package/dist/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/Common/ErrorBoundary.js +64 -0
- package/dist/Common/ErrorBoundary.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/src/Common/ErrorBoundary.d.ts +15 -0
- package/dist/src/Common/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/Common/ErrorBoundary.js +64 -0
- package/dist/src/Common/ErrorBoundary.js.map +1 -0
- package/package.json +17 -5
- package/.gitattributes +0 -2
- package/index.d.ts +0 -66
- package/index.js +0 -66
- package/src/Alerts/AAlert.js +0 -137
- package/src/Alerts/AAlertIOS.js +0 -97
- package/src/Alerts/ABlink.js +0 -40
- package/src/Common/ErrorBoundary.tsx +0 -73
- package/src/Common/Icons.js +0 -49
- package/src/Common/NetworkServiceCall.js +0 -265
- package/src/CommonStyle/CommonTheme.js +0 -11
- package/src/CommonStyle/ComponentFunctions.js +0 -632
- package/src/CommonStyle/PopupStyle.js +0 -146
- package/src/CommonStyle/commonStyle.js +0 -93
- package/src/CommonStyle/componentStyle.js +0 -545
- package/src/CommonStyle/optionListStyles.js +0 -175
- package/src/Components/ByProductPage.js +0 -200
- package/src/Components/CDropDownListNew.js +0 -153
- package/src/Components/CSupplierList.js +0 -88
- package/src/Components/CVerificationCard.js +0 -2822
- package/src/Components/CustomButton.js +0 -67
- package/src/Components/CustomCard.js +0 -127
- package/src/Components/CustomTextInput.js +0 -47
- package/src/Components/EquipmentPage.js +0 -313
- package/src/Components/FilterInput.Copy.js +0 -723
- package/src/Components/FilterInput.js +0 -569
- package/src/Components/HSubHeading.js +0 -68
- package/src/Components/HeaderCard.js +0 -40
- package/src/Components/MoreOptionsScreen.js +0 -251
- package/src/Components/NonSwipableProductCard.js +0 -226
- package/src/Components/NonSwipableSupplierCard.js +0 -348
- package/src/Components/ProductCard.js +0 -1336
- package/src/Components/QualityProductCard.js +0 -1059
- package/src/Components/RateProductCard.js +0 -1452
- package/src/Components/RawMaterial.js +0 -261
- package/src/Components/SDropDownEdited.js +0 -549
- package/src/Components/SDropDownNew.js +0 -529
- package/src/Components/SHelpDescription.js +0 -147
- package/src/Components/STextInputNew.js +0 -510
- package/src/Components/SearchProductCard.js +0 -470
- package/src/Components/StageByProduct.js +0 -199
- package/src/Components/SupplierCard.js +0 -243
- package/src/Components/SupplierInvoiceCard.js +0 -405
- package/src/Components/SwipableSupplierCard.js +0 -136
- package/src/Components/TagTemplate.js +0 -74
- package/src/Components/WrappedComponent.js +0 -25
- package/src/Custom/CBooking.js +0 -944
- package/src/Custom/CBookingPostpone.js +0 -1822
- package/src/Custom/CCalendar.js +0 -560
- package/src/Custom/CCard.js +0 -880
- package/src/Custom/CDetailCard.js +0 -205
- package/src/Custom/CHelpImage.js +0 -52
- package/src/Custom/CReport.js +0 -569
- package/src/Custom/CScrollView.js +0 -73
- package/src/Custom/CSignature.js +0 -112
- package/src/Custom/CSliderMenu.js +0 -339
- package/src/Custom/CSupplierCard.js +0 -99
- package/src/Custom/CTemplateCard.js +0 -438
- package/src/Custom/CTokenAllocation.js +0 -1402
- package/src/Custom/CTokenListOverlay.js +0 -122
- package/src/Custom/CWardStatus.js +0 -444
- package/src/Custom/Charts/CBarChart.js +0 -218
- package/src/Custom/Charts/CDashBoardList.js +0 -133
- package/src/Custom/Charts/CDashBoardTable.js +0 -172
- package/src/Custom/Charts/CLineChart.js +0 -193
- package/src/Custom/Charts/CPieChart.js +0 -186
- package/src/Custom/Loader.js +0 -182
- package/src/Custom/OUserView.js +0 -1121
- package/src/Custom/PreviewDosage.js +0 -115
- package/src/Custom/SearchLoader.js +0 -32
- package/src/Custom/TableComponent/CActivityTable.js +0 -707
- package/src/Custom/TableComponent/CMoreButtonTable.js +0 -197
- package/src/Custom/TableComponent/CTable.js +0 -185
- package/src/Custom/TableComponent/CTextBody.js +0 -40
- package/src/Custom/TableComponent/CTextHeader.js +0 -17
- package/src/Custom/TableComponent/PreviewPrescriptionNew.js +0 -1011
- package/src/Custom/TableComponent/SDropdownTable.js +0 -491
- package/src/Custom/TableComponent/TagTable.js +0 -1200
- package/src/CustomComponents/CAddColumn.js +0 -140
- package/src/CustomComponents/CAssessmentDelete.js +0 -307
- package/src/CustomComponents/CAwesomeButton.js +0 -83
- package/src/CustomComponents/CAwesomeMoreButton.js +0 -54
- package/src/CustomComponents/CBackHandler.js +0 -273
- package/src/CustomComponents/CCalendar.js +0 -243
- package/src/CustomComponents/CCommentOverlay.js +0 -202
- package/src/CustomComponents/CComments.js +0 -162
- package/src/CustomComponents/CContainerView.js +0 -24
- package/src/CustomComponents/CCustomTextInput.js +0 -336
- package/src/CustomComponents/CDetailView.js +0 -40
- package/src/CustomComponents/CDropDownList.js +0 -153
- package/src/CustomComponents/CDropdownSelect.js +0 -555
- package/src/CustomComponents/CFooterView.js +0 -42
- package/src/CustomComponents/CImagePickerSave.js +0 -316
- package/src/CustomComponents/CModalOverlay.js +0 -91
- package/src/CustomComponents/CNetworkStatus.js +0 -327
- package/src/CustomComponents/CNotesInstructions.js +0 -1000
- package/src/CustomComponents/COverlay.js +0 -81
- package/src/CustomComponents/CRemarks.js +0 -176
- package/src/CustomComponents/CRowAdd.js +0 -143
- package/src/CustomComponents/CSummaryDropDown.js +0 -327
- package/src/CustomComponents/CText.js +0 -9
- package/src/CustomComponents/CVectorIcon.js +0 -34
- package/src/CustomComponents/HtmlContentViewer.js +0 -65
- package/src/CustomComponents/PdfContentViewer.js +0 -90
- package/src/CustomComponents/SDropDownDosage.js +0 -1087
- package/src/CustomComponents/SwipableProductCard.js +0 -246
- package/src/CustomComponents/SwipableProductImageCard.js +0 -254
- package/src/CustomComponents/WorkOrderDetails.js +0 -1216
- package/src/CustomComponents/WorkOrderDetailsPage.js +0 -1213
- package/src/HOC/ConfirmOverlay.js +0 -192
- package/src/HOC/HHeading.js +0 -70
- package/src/HOC/HMoreButton.js +0 -88
- package/src/HOC/HNatureHeading.js +0 -402
- package/src/HOC/HOCIcons.js +0 -80
- package/src/HOC/HOverlayCentered.js +0 -140
- package/src/HOC/HShadowButton.js +0 -45
- package/src/HOC/HShadowCountButton.js +0 -82
- package/src/HOC/OptionOverlay.js +0 -48
- package/src/Json/Chart.json +0 -818
- package/src/Json/Consultation.json +0 -622
- package/src/Json/CreditBill.json +0 -490
- package/src/Json/Dropdown.json +0 -216
- package/src/Json/DropdownConsultation.json +0 -228
- package/src/Json/DynamicReports.json +0 -623
- package/src/Json/Footer.json +0 -79
- package/src/Media/AudioScreen.js +0 -342
- package/src/Media/BarcodeScan.js +0 -145
- package/src/Media/CAudioPlay.js +0 -228
- package/src/Media/CCaptureImageWithoutEdit.js +0 -330
- package/src/Media/CImageGallery.js +0 -289
- package/src/Media/CImageZoom.js +0 -82
- package/src/Media/CSingleImage.js +0 -391
- package/src/Media/CSketchCanvas.js +0 -76
- package/src/Media/CVideoPlay.js +0 -31
- package/src/Media/DocumentScreen.js +0 -362
- package/src/Media/DrawingScreen.js +0 -578
- package/src/Media/ImageScreen.js +0 -309
- package/src/Media/RecordAudio.js +0 -250
- package/src/Media/RecordVideo.js +0 -223
- package/src/Media/VideoScreen.js +0 -378
- package/src/Navigation/PageNavigation.js +0 -224
- package/src/Navigation/useFocusEffect.js +0 -2
- package/src/Navigation/useFocusEffect.native.js +0 -1
- package/src/Navigation/useFocusEffect.web.js +0 -1
- package/src/Navigation/useIsFocused.js +0 -1
- package/src/Navigation/useIsFocused.native.js +0 -1
- package/src/Navigation/useIsFocused.web.js +0 -1
- package/src/Navigation/useNavigation.js +0 -2
- package/src/Navigation/useNavigation.native.js +0 -1
- package/src/Navigation/useNavigation.web.js +0 -1
- package/src/Screens/CMedications.js +0 -528
- package/src/Screens/CWebViewGallery.js +0 -203
- package/src/Screens/ChartScan.js +0 -279
- package/src/Screens/ChartScreenNew.js +0 -1579
- package/src/Screens/Consultation.js +0 -1500
- package/src/Screens/Dashboard.js +0 -778
- package/src/Screens/FileExplorer.js +0 -288
- package/src/Screens/Footer.js +0 -340
- package/src/Screens/ForgotPassword.js +0 -288
- package/src/Screens/HeaderBlock.js +0 -353
- package/src/Screens/Login.js +0 -328
- package/src/Screens/Notification.js +0 -149
- package/src/Screens/OcrScreen.js +0 -20
- package/src/Screens/PdfPreview.js +0 -507
- package/src/Screens/RegistrationDetails.js +0 -467
- package/src/Screens/SearchScreen.js +0 -582
- package/src/Screens/Splash.js +0 -788
- package/src/Screens/SwipeLeftView.js +0 -1867
- package/src/StaticComponents/SAlphabet.js +0 -47
- package/src/StaticComponents/SCheckBox.js +0 -42
- package/src/StaticComponents/SDatePicker.js +0 -208
- package/src/StaticComponents/SDatePickerLabel.js +0 -253
- package/src/StaticComponents/SDatePickerNew.js +0 -258
- package/src/StaticComponents/SDateTimePickerNew.js +0 -381
- package/src/StaticComponents/SDropDownGenerate.js +0 -450
- package/src/StaticComponents/SDropDownHoc.js +0 -636
- package/src/StaticComponents/SDropDownIcon.js +0 -500
- package/src/StaticComponents/SMenuBox.js +0 -131
- package/src/StaticComponents/SOverlay.js +0 -177
- package/src/StaticComponents/SOverlayTextInput.js +0 -109
- package/src/StaticComponents/SSearch.js +0 -438
- package/src/StaticComponents/SSearchBar.js +0 -53
- package/src/StaticComponents/SSpeedDial.js +0 -303
- package/src/StaticComponents/STextInput.js +0 -289
- package/src/StaticComponents/STextInputProps.js +0 -36
- package/src/StaticComponents/STimePicker.js +0 -171
- package/src/StaticComponents/STimingDropDownNew.js +0 -1585
- package/src/StaticComponents/STimingSwitch.js +0 -34
- package/src/layout/CContainerView.js +0 -21
- package/src/layout/CDetailView.js +0 -81
- package/src/layout/HeaderBlock.js +0 -353
- package/src/layout/INVLoginLayout.js +0 -657
- package/src/layout/Loader.js +0 -176
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ErrorInfo, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
interface State {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare class ErrorBoundary extends React.Component<Props, State> {
|
|
9
|
+
constructor(props: Props);
|
|
10
|
+
static getDerivedStateFromError(_: Error): State;
|
|
11
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
12
|
+
render(): any;
|
|
13
|
+
}
|
|
14
|
+
export default ErrorBoundary;
|
|
15
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/Common/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWpD,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAC3C,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK;IAKhD,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAMpD,MAAM;CAwBP;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const normalize = (size) => size;
|
|
9
|
+
const notifyMessage = (message, type) => {
|
|
10
|
+
if (__DEV__) {
|
|
11
|
+
console.warn(message, type);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
class ErrorBoundary extends react_1.default.Component {
|
|
15
|
+
constructor(props) {
|
|
16
|
+
super(props);
|
|
17
|
+
this.state = { hasError: false };
|
|
18
|
+
}
|
|
19
|
+
static getDerivedStateFromError(_) {
|
|
20
|
+
// Update state so the next render will show the fallback UI.
|
|
21
|
+
return { hasError: true };
|
|
22
|
+
}
|
|
23
|
+
componentDidCatch(error, errorInfo) {
|
|
24
|
+
// You can also log the error to an error reporting service
|
|
25
|
+
// console.log('componentDidCatch ', error, ' ', errorInfo);
|
|
26
|
+
notifyMessage("ERROR : " + error + ' ' + errorInfo, 2);
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
if (this.state.hasError) {
|
|
30
|
+
// You can render any custom fallback UI
|
|
31
|
+
return (<react_native_1.View style={styles.container}>
|
|
32
|
+
<react_native_1.View style={{ width: '100%', }}>
|
|
33
|
+
<react_native_1.Image source={{ uri: "https://t4.ftcdn.net/jpg/05/24/04/51/360_F_524045110_UXnCx4GEDapddDi5tdlY96s4g0MxHRvt.jpg" }} resizeMode="cover" style={{ height: normalize(200) }}/>
|
|
34
|
+
</react_native_1.View>
|
|
35
|
+
<react_native_1.Text style={styles.message}>
|
|
36
|
+
Something went wrong.{'\n'} Our team has taken a note of this issue.
|
|
37
|
+
</react_native_1.Text>
|
|
38
|
+
{/* <Button
|
|
39
|
+
title="Try Again"
|
|
40
|
+
onPress={() => CodePush.restartApp()}
|
|
41
|
+
/> */}
|
|
42
|
+
|
|
43
|
+
</react_native_1.View>);
|
|
44
|
+
}
|
|
45
|
+
return this.props.children;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.default = ErrorBoundary;
|
|
49
|
+
const styles = react_native_1.StyleSheet.create({
|
|
50
|
+
container: {
|
|
51
|
+
flex: 1,
|
|
52
|
+
justifyContent: 'center',
|
|
53
|
+
alignItems: 'center',
|
|
54
|
+
backgroundColor: '#fff'
|
|
55
|
+
},
|
|
56
|
+
message: {
|
|
57
|
+
fontSize: normalize(16),
|
|
58
|
+
color: 'black',
|
|
59
|
+
marginBottom: 20,
|
|
60
|
+
textAlign: 'center',
|
|
61
|
+
paddingHorizontal: 10,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/Common/ErrorBoundary.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAoD;AACpD,+CAA6D;AAE7D,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC;AAEzC,MAAM,aAAa,GAAG,CAAC,OAAe,EAAE,IAAa,EAAE,EAAE;IACvD,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC,CAAC;AAUF,MAAM,aAAc,SAAQ,eAAK,CAAC,SAAuB;IACvD,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,CAAQ;QACtC,6DAA6D;QAC7D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED,iBAAiB,CAAC,KAAY,EAAE,SAAoB;QAClD,2DAA2D;QAC3D,4DAA4D;QAC5D,aAAa,CAAC,UAAU,GAAG,KAAK,GAAG,GAAG,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC;IACzD,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACxB,wCAAwC;YACxC,OAAO,CACL,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;UAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAC9B;YAAA,CAAC,oBAAK,CACJ,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,2FAA2F,EAAE,CAAC,CAC7G,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,EACzD;UAAA,EAAE,mBAAI,CACN;UAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAC1B;iCAAqB,CAAC,IAAI,CAAE;UAC9B,EAAE,mBAAI,CACN;UAAA,CAAC;;;qBAGI,CAEP;;QAAA,EAAE,mBAAI,CAAC,CACR,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF;AAED,kBAAe,aAAa,CAAC;AAE7B,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,MAAM;KACxB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAC;QACvB,KAAK,EAAE,OAAO;QACd,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,QAAQ;QACnB,iBAAiB,EAAE,EAAE;KACtB;CACF,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,eAAe,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ErrorBoundary_1 = __importDefault(require("./src/Common/ErrorBoundary"));
|
|
7
|
+
exports.default = ErrorBoundary_1.default;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;AAAA,+EAAuD;AACvD,kBAAe,uBAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ErrorInfo, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
interface State {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare class ErrorBoundary extends React.Component<Props, State> {
|
|
9
|
+
constructor(props: Props);
|
|
10
|
+
static getDerivedStateFromError(_: Error): State;
|
|
11
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
12
|
+
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
13
|
+
}
|
|
14
|
+
export default ErrorBoundary;
|
|
15
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/Common/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAapD,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAC3C,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK;IAKhD,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAMpD,MAAM;CAwBP;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const normalize = (size) => size;
|
|
9
|
+
const notifyMessage = (message, type) => {
|
|
10
|
+
if (__DEV__) {
|
|
11
|
+
console.warn(message, type);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
class ErrorBoundary extends react_1.default.Component {
|
|
15
|
+
constructor(props) {
|
|
16
|
+
super(props);
|
|
17
|
+
this.state = { hasError: false };
|
|
18
|
+
}
|
|
19
|
+
static getDerivedStateFromError(_) {
|
|
20
|
+
// Update state so the next render will show the fallback UI.
|
|
21
|
+
return { hasError: true };
|
|
22
|
+
}
|
|
23
|
+
componentDidCatch(error, errorInfo) {
|
|
24
|
+
// You can also log the error to an error reporting service
|
|
25
|
+
// console.log('componentDidCatch ', error, ' ', errorInfo);
|
|
26
|
+
notifyMessage("ERROR : " + error + ' ' + errorInfo, 2);
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
if (this.state.hasError) {
|
|
30
|
+
// You can render any custom fallback UI
|
|
31
|
+
return (<react_native_1.View style={styles.container}>
|
|
32
|
+
<react_native_1.View style={{ width: '100%', }}>
|
|
33
|
+
<react_native_1.Image source={{ uri: "https://t4.ftcdn.net/jpg/05/24/04/51/360_F_524045110_UXnCx4GEDapddDi5tdlY96s4g0MxHRvt.jpg" }} resizeMode="cover" style={{ height: normalize(200) }}/>
|
|
34
|
+
</react_native_1.View>
|
|
35
|
+
<react_native_1.Text style={styles.message}>
|
|
36
|
+
Something went wrong.{'\n'} Our team has taken a note of this issue.
|
|
37
|
+
</react_native_1.Text>
|
|
38
|
+
{/* <Button
|
|
39
|
+
title="Try Again"
|
|
40
|
+
onPress={() => CodePush.restartApp()}
|
|
41
|
+
/> */}
|
|
42
|
+
|
|
43
|
+
</react_native_1.View>);
|
|
44
|
+
}
|
|
45
|
+
return this.props.children;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.default = ErrorBoundary;
|
|
49
|
+
const styles = react_native_1.StyleSheet.create({
|
|
50
|
+
container: {
|
|
51
|
+
flex: 1,
|
|
52
|
+
justifyContent: 'center',
|
|
53
|
+
alignItems: 'center',
|
|
54
|
+
backgroundColor: '#fff'
|
|
55
|
+
},
|
|
56
|
+
message: {
|
|
57
|
+
fontSize: normalize(16),
|
|
58
|
+
color: 'black',
|
|
59
|
+
marginBottom: 20,
|
|
60
|
+
textAlign: 'center',
|
|
61
|
+
paddingHorizontal: 10,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/Common/ErrorBoundary.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAoD;AACpD,+CAA6D;AAI7D,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC;AAEzC,MAAM,aAAa,GAAG,CAAC,OAAe,EAAE,IAAa,EAAE,EAAE;IACvD,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC,CAAC;AAUF,MAAM,aAAc,SAAQ,eAAK,CAAC,SAAuB;IACvD,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,CAAQ;QACtC,6DAA6D;QAC7D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED,iBAAiB,CAAC,KAAY,EAAE,SAAoB;QAClD,2DAA2D;QAC3D,4DAA4D;QAC5D,aAAa,CAAC,UAAU,GAAG,KAAK,GAAG,GAAG,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC;IACzD,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACxB,wCAAwC;YACxC,OAAO,CACL,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;UAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAC9B;YAAA,CAAC,oBAAK,CACJ,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,2FAA2F,EAAE,CAAC,CAC7G,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,EACzD;UAAA,EAAE,mBAAI,CACN;UAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAC1B;iCAAqB,CAAC,IAAI,CAAE;UAC9B,EAAE,mBAAI,CACN;UAAA,CAAC;;;qBAGI,CAEP;;QAAA,EAAE,mBAAI,CAAC,CACR,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF;AAED,kBAAe,aAAa,CAAC;AAE7B,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,MAAM;KACxB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAC;QACvB,KAAK,EAAE,OAAO;QACd,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,QAAQ;QACnB,iBAAiB,EAAE,EAAE;KACtB;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jescon-technologies/react-native-ui-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "A React Native module for Jescon Technologies that provides react-native-ui-kit",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "index.d.ts",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"prepublishOnly": "npm run build",
|
|
8
10
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
11
|
},
|
|
10
12
|
"keywords": [
|
|
@@ -22,7 +24,17 @@
|
|
|
22
24
|
"url": "https://github.com/dpraful/react-native-ui-kit/issues"
|
|
23
25
|
},
|
|
24
26
|
"devDependencies": {
|
|
27
|
+
"@types/react": "^19.2.14",
|
|
28
|
+
"@types/react-native": "^0.72.8",
|
|
29
|
+
"typescript": "^5.0.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
25
32
|
"react": "^18.0.0",
|
|
26
33
|
"react-native": "^0.69.0"
|
|
27
|
-
}
|
|
28
|
-
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"LICENSE",
|
|
38
|
+
"README.md"
|
|
39
|
+
]
|
|
40
|
+
}
|
package/.gitattributes
DELETED
package/index.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// Alerts
|
|
2
|
-
export const AAlert: any;
|
|
3
|
-
export const AAlertIOS: any;
|
|
4
|
-
export const ABlink: any;
|
|
5
|
-
|
|
6
|
-
// Common
|
|
7
|
-
export const ErrorBoundary: any;
|
|
8
|
-
export const Icons: any;
|
|
9
|
-
export const NetworkServiceCall: any;
|
|
10
|
-
|
|
11
|
-
// HOC (Higher Order Components)
|
|
12
|
-
export const ConfirmOverlay: any;
|
|
13
|
-
export const HHeading: any;
|
|
14
|
-
export const HMoreButton: any;
|
|
15
|
-
export const HNatureHeading: any;
|
|
16
|
-
export const HOCIcons: any;
|
|
17
|
-
export const HOverlayCentered: any;
|
|
18
|
-
export const HShadowButton: any;
|
|
19
|
-
export const HShadowCountButton: any;
|
|
20
|
-
export const OptionOverlay: any;
|
|
21
|
-
|
|
22
|
-
// Layout
|
|
23
|
-
export const CContainerView: any;
|
|
24
|
-
export const CDetailView: any;
|
|
25
|
-
export const HeaderBlock: any;
|
|
26
|
-
export const INVLoginLayout: any;
|
|
27
|
-
export const Loader: any;
|
|
28
|
-
|
|
29
|
-
// Media
|
|
30
|
-
export const AudioScreen: any;
|
|
31
|
-
export const BarcodeScan: any;
|
|
32
|
-
export const CAudioPlay: any;
|
|
33
|
-
export const CCaptureImageWithoutEdit: any;
|
|
34
|
-
export const CImageGallery: any;
|
|
35
|
-
export const CImageZoom: any;
|
|
36
|
-
export const CSingleImage: any;
|
|
37
|
-
export const CSketchCanvas: any;
|
|
38
|
-
export const CVideoPlay: any;
|
|
39
|
-
export const DocumentScreen: any;
|
|
40
|
-
export const DrawingScreen: any;
|
|
41
|
-
export const ImageScreen: any;
|
|
42
|
-
export const RecordAudio: any;
|
|
43
|
-
export const RecordVideo: any;
|
|
44
|
-
export const VideoScreen: any;
|
|
45
|
-
|
|
46
|
-
// Static Components
|
|
47
|
-
export const SAlphabet: any;
|
|
48
|
-
export const SCheckBox: any;
|
|
49
|
-
export const SDatePicker: any;
|
|
50
|
-
export const SDatePickerLabel: any;
|
|
51
|
-
export const SDatePickerNew: any;
|
|
52
|
-
export const SDateTimePickerNew: any;
|
|
53
|
-
export const SDropDownGenerate: any;
|
|
54
|
-
export const SDropDownHoc: any;
|
|
55
|
-
export const SDropDownIcon: any;
|
|
56
|
-
export const SMenuBox: any;
|
|
57
|
-
export const SOverlay: any;
|
|
58
|
-
export const SOverlayTextInput: any;
|
|
59
|
-
export const SSearch: any;
|
|
60
|
-
export const SSearchBar: any;
|
|
61
|
-
export const SSpeedDial: any;
|
|
62
|
-
export const STextInput: any;
|
|
63
|
-
export const STextInputProps: any;
|
|
64
|
-
export const STimePicker: any;
|
|
65
|
-
export const STimingDropDownNew: any;
|
|
66
|
-
export const STimingSwitch: any;
|
package/index.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// Alerts
|
|
2
|
-
export { default as AAlert } from './src/Alerts/AAlert';
|
|
3
|
-
export { default as AAlertIOS } from './src/Alerts/AAlertIOS';
|
|
4
|
-
export { default as ABlink } from './src/Alerts/ABlink';
|
|
5
|
-
|
|
6
|
-
// Common
|
|
7
|
-
export { default as ErrorBoundary } from './src/Common/ErrorBoundary';
|
|
8
|
-
export { default as Icons } from './src/Common/Icons'
|
|
9
|
-
export { default as NetworkServiceCall } from './src/Common/NetworkServiceCall';
|
|
10
|
-
|
|
11
|
-
// HOC (Higher Order Components)
|
|
12
|
-
export { default as ConfirmOverlay } from './src/HOC/ConfirmOverlay';
|
|
13
|
-
export { default as HHeading } from './src/HOC/HHeading';
|
|
14
|
-
export { default as HMoreButton } from './src/HOC/HMoreButton';
|
|
15
|
-
export { default as HNatureHeading } from './src/HOC/HNatureHeading';
|
|
16
|
-
export { default as HOCIcons } from './src/HOC/HOCIcons';
|
|
17
|
-
export { default as HOverlayCentered } from './src/HOC/HOverlayCentered';
|
|
18
|
-
export { default as HShadowButton } from './src/HOC/HShadowButton';
|
|
19
|
-
export { default as HShadowCountButton } from './src/HOC/HShadowCountButton';
|
|
20
|
-
export { default as OptionOverlay } from './src/HOC/OptionOverlay';
|
|
21
|
-
|
|
22
|
-
// Layout
|
|
23
|
-
export { default as CContainerView } from './src/layout/CContainerView';
|
|
24
|
-
export { default as CDetailView } from './src/layout/CDetailView';
|
|
25
|
-
export { default as HeaderBlock } from './src/layout/HeaderBlock';
|
|
26
|
-
export { default as INVLoginLayout } from './src/layout/INVLoginLayout';
|
|
27
|
-
export { default as Loader } from './src/layout/Loader';
|
|
28
|
-
|
|
29
|
-
// Media
|
|
30
|
-
export { default as AudioScreen } from './src/Media/AudioScreen';
|
|
31
|
-
export { default as BarcodeScan } from './src/Media/BarcodeScan';
|
|
32
|
-
export { default as CAudioPlay } from './src/Media/CAudioPlay';
|
|
33
|
-
export { default as CCaptureImageWithoutEdit } from './src/Media/CCaptureImageWithoutEdit';
|
|
34
|
-
export { default as CImageGallery } from './src/Media/CImageGallery';
|
|
35
|
-
export { default as CImageZoom } from './src/Media/CImageZoom';
|
|
36
|
-
export { default as CSingleImage } from './src/Media/CSingleImage';
|
|
37
|
-
export { default as CSketchCanvas } from './src/Media/CSketchCanvas';
|
|
38
|
-
export { default as CVideoPlay } from './src/Media/CVideoPlay';
|
|
39
|
-
export { default as DocumentScreen } from './src/Media/DocumentScreen';
|
|
40
|
-
export { default as DrawingScreen } from './src/Media/DrawingScreen';
|
|
41
|
-
export { default as ImageScreen } from './src/Media/ImageScreen';
|
|
42
|
-
export { default as RecordAudio } from './src/Media/RecordAudio';
|
|
43
|
-
export { default as RecordVideo } from './src/Media/RecordVideo';
|
|
44
|
-
export { default as VideoScreen } from './src/Media/VideoScreen';
|
|
45
|
-
|
|
46
|
-
// Static Components
|
|
47
|
-
export { default as SAlphabet } from './src/StaticComponents/SAlphabet';
|
|
48
|
-
export { default as SCheckBox } from './src/StaticComponents/SCheckBox';
|
|
49
|
-
export { default as SDatePicker } from './src/StaticComponents/SDatePicker';
|
|
50
|
-
export { default as SDatePickerLabel } from './src/StaticComponents/SDatePickerLabel';
|
|
51
|
-
export { default as SDatePickerNew } from './src/StaticComponents/SDatePickerNew';
|
|
52
|
-
export { default as SDateTimePickerNew } from './src/StaticComponents/SDateTimePickerNew';
|
|
53
|
-
export { default as SDropDownGenerate } from './src/StaticComponents/SDropDownGenerate';
|
|
54
|
-
export { default as SDropDownHoc } from './src/StaticComponents/SDropDownHoc';
|
|
55
|
-
export { default as SDropDownIcon } from './src/StaticComponents/SDropDownIcon';
|
|
56
|
-
export { default as SMenuBox } from './src/StaticComponents/SMenuBox';
|
|
57
|
-
export { default as SOverlay } from './src/StaticComponents/SOverlay';
|
|
58
|
-
export { default as SOverlayTextInput } from './src/StaticComponents/SOverlayTextInput';
|
|
59
|
-
export { default as SSearch } from './src/StaticComponents/SSearch';
|
|
60
|
-
export { default as SSearchBar } from './src/StaticComponents/SSearchBar';
|
|
61
|
-
export { default as SSpeedDial } from './src/StaticComponents/SSpeedDial';
|
|
62
|
-
export { default as STextInput } from './src/StaticComponents/STextInput';
|
|
63
|
-
export { default as STextInputProps } from './src/StaticComponents/STextInputProps';
|
|
64
|
-
export { default as STimePicker } from './src/StaticComponents/STimePicker';
|
|
65
|
-
export { default as STimingDropDownNew } from './src/StaticComponents/STimingDropDownNew';
|
|
66
|
-
export { default as STimingSwitch } from './src/StaticComponents/STimingSwitch';
|
package/src/Alerts/AAlert.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import React, { useState, memo, useEffect } from 'react';
|
|
2
|
-
import { View, Dimensions, Text, TouchableOpacity, StyleSheet, TextInput, Platform, Image } from 'react-native';
|
|
3
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
4
|
-
import Icons from '../Common/Icons';
|
|
5
|
-
import { ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
6
|
-
import { normalize } from '../CommonStyle/ComponentFunctions';
|
|
7
|
-
import CModalOverlay from '../CustomComponents/CModalOverlay';
|
|
8
|
-
|
|
9
|
-
export default function AAlert(props) {
|
|
10
|
-
const [overlay, setOverlay] = useState(true)
|
|
11
|
-
const [data] = useState({
|
|
12
|
-
...props.data,
|
|
13
|
-
"bgcolor": getBgColor(props.data.datavalue),
|
|
14
|
-
"durartion": getDurarion(props.data.datavalue)
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
setTimeout(() => {
|
|
19
|
-
props.close(false)
|
|
20
|
-
setOverlay(false)
|
|
21
|
-
}, data.durartion)
|
|
22
|
-
}, []);
|
|
23
|
-
|
|
24
|
-
function getBgColor(key) {
|
|
25
|
-
switch (key) {
|
|
26
|
-
case 1: return "#0ca004"
|
|
27
|
-
case 2: return "#f44e4e"
|
|
28
|
-
case 3: return "#bfbf18"
|
|
29
|
-
case 4: return "#d88304"
|
|
30
|
-
default: return Global.AppTheme.primary_color
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function getTransparentColor(key) {
|
|
35
|
-
switch (key) {
|
|
36
|
-
case 1: return "rgba(0, 90, 0, 0.2)"
|
|
37
|
-
case 2: return "rgba(90, 0, 0, 0.2)"
|
|
38
|
-
case 3: return "rgba(249, 242, 172, 0.2)"
|
|
39
|
-
case 4: return "rgba(249, 212, 167, 0.2)"
|
|
40
|
-
default: return "rgba(0, 0, 0, 0.2)"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function getDurarion(key) {
|
|
45
|
-
switch (key) {
|
|
46
|
-
case 1: return 2000
|
|
47
|
-
case 2: return 2000
|
|
48
|
-
case 3: return 2000
|
|
49
|
-
case 4: return 2000
|
|
50
|
-
default: return 2000
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function getPopupContainerStyleIOS() {
|
|
55
|
-
return {
|
|
56
|
-
...styles.overlaystyle,
|
|
57
|
-
backgroundColor: ValueCheck(data.bgcolor) ? data.bgcolor : '#fff',
|
|
58
|
-
bottom: normalize(100),
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<CModalOverlay
|
|
64
|
-
visible={overlay}
|
|
65
|
-
onClose={() => setOverlay(false)}
|
|
66
|
-
animationType="fadeInUp"
|
|
67
|
-
// containerStyle={{ backgroundColor: 'rgba(0, 0, 0, 0.00)' }}
|
|
68
|
-
animationDuration={500}
|
|
69
|
-
closeOnTouchOutside={false}
|
|
70
|
-
containerStyle={{ width: '100%', backgroundColor: getTransparentColor(data.datavalue) }}
|
|
71
|
-
childrenWrapperStyle={getPopupContainerStyleIOS()}>
|
|
72
|
-
|
|
73
|
-
<TouchableOpacity
|
|
74
|
-
style={{ position: 'absolute', right: normalize(15), zIndex: 1, top: normalize(5) }}
|
|
75
|
-
onPress={() => setOverlay(false, props.close(false))}>
|
|
76
|
-
<Icons.AntDesign name={"closecircleo"} size={normalize(15)} color={"#fff"} />
|
|
77
|
-
</TouchableOpacity>
|
|
78
|
-
<View style={{ flexDirection: 'row', width: '100%', borderWidth: 0 }}>
|
|
79
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', borderWidth: 0, justifyContent: 'center' }}>
|
|
80
|
-
<Image
|
|
81
|
-
style={{
|
|
82
|
-
borderWidth: 0,
|
|
83
|
-
height: normalize(30),
|
|
84
|
-
width: normalize(30),
|
|
85
|
-
borderRadius: normalize(50),
|
|
86
|
-
}}
|
|
87
|
-
resizeMode={'stretch'}
|
|
88
|
-
source={require('../../../../../android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png')}
|
|
89
|
-
/>
|
|
90
|
-
<Icons.Entypo
|
|
91
|
-
color={"#fff"}
|
|
92
|
-
name={'info'}
|
|
93
|
-
size={normalize(15)}
|
|
94
|
-
style={{
|
|
95
|
-
borderWidth: 0
|
|
96
|
-
}}
|
|
97
|
-
/>
|
|
98
|
-
</View>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', flex: 1 }}>
|
|
103
|
-
|
|
104
|
-
<Text
|
|
105
|
-
adjustsFontSizeToFit
|
|
106
|
-
style={{
|
|
107
|
-
color: "#fff",
|
|
108
|
-
fontWeight: 'bold',
|
|
109
|
-
fontSize: normalize(16),
|
|
110
|
-
paddingLeft: normalize(7),
|
|
111
|
-
}}>
|
|
112
|
-
{ValueCheck(data.displaytext) ? data.displaytext : ''}
|
|
113
|
-
</Text>
|
|
114
|
-
</View>
|
|
115
|
-
</View>
|
|
116
|
-
</CModalOverlay>
|
|
117
|
-
);
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
function getClose() {
|
|
121
|
-
setOverlay(false)
|
|
122
|
-
props.close != undefined ? props.close(false) : null
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const styles = StyleSheet.create({
|
|
128
|
-
overlaystyle: {
|
|
129
|
-
position: 'absolute',
|
|
130
|
-
width: Dimensions.get('window').width,
|
|
131
|
-
borderRadius: normalize(30),
|
|
132
|
-
borderWidth: 2,
|
|
133
|
-
borderColor: '#e0e0e0',
|
|
134
|
-
},
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
|
package/src/Alerts/AAlertIOS.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import React, { useState, memo, useEffect } from 'react';
|
|
2
|
-
import { View, Dimensions, Text, TouchableOpacity, StyleSheet, TextInput, Platform, Image } from 'react-native';
|
|
3
|
-
import { Global } from '../../../../../src/Common/Global';
|
|
4
|
-
import Icons from '../Common/Icons'
|
|
5
|
-
import { ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
6
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
7
|
-
|
|
8
|
-
export default function AAlertIOS(props) {
|
|
9
|
-
const [overlay, setOverlay] = useState(true)
|
|
10
|
-
const [data] = useState({
|
|
11
|
-
...props.data,
|
|
12
|
-
"bgcolor": getBgColor(props.data.datavalue),
|
|
13
|
-
"durartion": getDurarion(props.data.datavalue)
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
setTimeout(() => {
|
|
18
|
-
props.close(false)
|
|
19
|
-
setOverlay(false)
|
|
20
|
-
}, data.durartion)
|
|
21
|
-
}, []);
|
|
22
|
-
|
|
23
|
-
function getBgColor(key) {
|
|
24
|
-
switch (key) {
|
|
25
|
-
case 1: return "#0ca004"
|
|
26
|
-
case 2: return "#f44e4e"
|
|
27
|
-
case 3: return "#bfbf18"
|
|
28
|
-
case 4: return "#d88304"
|
|
29
|
-
default: return Global.AppTheme.primary_color
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function getDurarion(key) {
|
|
34
|
-
switch (key) {
|
|
35
|
-
case 1: return 2500
|
|
36
|
-
case 2: return 2500
|
|
37
|
-
case 3: return 2500
|
|
38
|
-
case 4: return 2500
|
|
39
|
-
default: return 2500
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<View style={{ position: 'absolute', bottom: normalize(80), zIndex: 1 }}>
|
|
45
|
-
<View style={{
|
|
46
|
-
flexDirection: 'row', backgroundColor: data.bgcolor,
|
|
47
|
-
width: Dimensions.get('screen').width, paddingHorizontal: normalize(10),
|
|
48
|
-
paddingVertical: normalize(10), borderRadius: normalize(10),
|
|
49
|
-
borderWidth: normalize(2), borderColor: '#fff'
|
|
50
|
-
}}>
|
|
51
|
-
<Image
|
|
52
|
-
style={{
|
|
53
|
-
height: normalize(30),
|
|
54
|
-
width: normalize(30),
|
|
55
|
-
borderRadius: normalize(50),
|
|
56
|
-
alignSelf: 'flex-start'
|
|
57
|
-
}}
|
|
58
|
-
resizeMode={'stretch'}
|
|
59
|
-
source={require('../../../../../android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png')}
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', paddingLeft: normalize(15) }}>
|
|
63
|
-
<Icons.Entypo
|
|
64
|
-
color={"#fff"}
|
|
65
|
-
name={'info'}
|
|
66
|
-
size={normalize(15)}
|
|
67
|
-
/>
|
|
68
|
-
<Text
|
|
69
|
-
adjustsFontSizeToFit
|
|
70
|
-
style={{
|
|
71
|
-
color: "#fff",
|
|
72
|
-
fontWeight: 'bold',
|
|
73
|
-
fontSize: normalize(16),
|
|
74
|
-
paddingLeft: normalize(7),
|
|
75
|
-
paddingRight: normalize(30),
|
|
76
|
-
}}>
|
|
77
|
-
{ValueCheck(data.displaytext) ? data.displaytext : ''}
|
|
78
|
-
</Text>
|
|
79
|
-
</View>
|
|
80
|
-
</View>
|
|
81
|
-
</View>
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const styles = StyleSheet.create({
|
|
88
|
-
overlaystyle: {
|
|
89
|
-
position: 'absolute',
|
|
90
|
-
width: Dimensions.get('window').width,
|
|
91
|
-
borderRadius: normalize(15),
|
|
92
|
-
borderWidth: 2,
|
|
93
|
-
borderColor: '#e0e0e0',
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
|
package/src/Alerts/ABlink.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react'
|
|
2
|
-
import { Animated, View } from 'react-native'
|
|
3
|
-
|
|
4
|
-
export default class ABlink extends Component {
|
|
5
|
-
|
|
6
|
-
constructor(props) {
|
|
7
|
-
super(props);
|
|
8
|
-
this.fadeAnimation = new Animated.Value(0);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
componentDidMount() {
|
|
12
|
-
Animated.loop(
|
|
13
|
-
Animated.sequence([
|
|
14
|
-
Animated.timing(this.fadeAnimation, {
|
|
15
|
-
toValue: 0,
|
|
16
|
-
duration: this.props.duration,
|
|
17
|
-
useNativeDriver: true,
|
|
18
|
-
}),
|
|
19
|
-
Animated.timing(this.fadeAnimation, {
|
|
20
|
-
toValue: 1,
|
|
21
|
-
duration: this.props.duration,
|
|
22
|
-
useNativeDriver: true,
|
|
23
|
-
})
|
|
24
|
-
]),
|
|
25
|
-
{
|
|
26
|
-
iterations: this.props.repeat_count
|
|
27
|
-
}
|
|
28
|
-
).start();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
render() {
|
|
32
|
-
return (
|
|
33
|
-
<View style={{ ...this.props.style }}>
|
|
34
|
-
<Animated.View style={{ opacity: this.fadeAnimation }}>
|
|
35
|
-
{this.props.children}
|
|
36
|
-
</Animated.View>
|
|
37
|
-
</View>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
}
|