@kiosinc/commons-rn 0.14.0 → 0.15.1
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/lib/commonjs/constants/index.js +2 -2
- package/lib/commonjs/constants/index.js.map +1 -1
- package/lib/commonjs/localization/translations/en.json +1 -0
- package/lib/commonjs/screens/Auth/Login.js +0 -1
- package/lib/commonjs/screens/Auth/Login.js.map +1 -1
- package/lib/commonjs/screens/Auth/ResetPassword.js +3 -2
- package/lib/commonjs/screens/Auth/ResetPassword.js.map +1 -1
- package/lib/commonjs/screens/SelectBusiness/SelectBusiness.js +12 -1
- package/lib/commonjs/screens/SelectBusiness/SelectBusiness.js.map +1 -1
- package/lib/commonjs/screens/TermsOfService/TermsOfService.js +21 -4
- package/lib/commonjs/screens/TermsOfService/TermsOfService.js.map +1 -1
- package/lib/commonjs/types/commons.js +2 -0
- package/lib/commonjs/types/commons.js.map +1 -0
- package/lib/module/constants/index.js +2 -2
- package/lib/module/constants/index.js.map +1 -1
- package/lib/module/localization/translations/en.json +1 -0
- package/lib/module/screens/Auth/Login.js +0 -1
- package/lib/module/screens/Auth/Login.js.map +1 -1
- package/lib/module/screens/Auth/ResetPassword.js +3 -2
- package/lib/module/screens/Auth/ResetPassword.js.map +1 -1
- package/lib/module/screens/SelectBusiness/SelectBusiness.js +12 -1
- package/lib/module/screens/SelectBusiness/SelectBusiness.js.map +1 -1
- package/lib/module/screens/TermsOfService/TermsOfService.js +22 -5
- package/lib/module/screens/TermsOfService/TermsOfService.js.map +1 -1
- package/lib/module/types/commons.js +2 -0
- package/lib/module/types/commons.js.map +1 -0
- package/lib/typescript/src/api/customer.d.ts +1 -1
- package/lib/typescript/src/api/customer.d.ts.map +1 -1
- package/lib/typescript/src/constants/index.d.ts +2 -2
- package/lib/typescript/src/constants/index.d.ts.map +1 -1
- package/lib/typescript/src/helpers/businessHours.d.ts +1 -1
- package/lib/typescript/src/helpers/businessHours.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useCustomer.d.ts +1 -1
- package/lib/typescript/src/hooks/useCustomer.d.ts.map +1 -1
- package/lib/typescript/src/localization/index.d.ts +1 -0
- package/lib/typescript/src/localization/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/Auth/Login.d.ts.map +1 -1
- package/lib/typescript/src/screens/Auth/ResetPassword.d.ts.map +1 -1
- package/lib/typescript/src/screens/SavedCards/CardRow.d.ts +1 -1
- package/lib/typescript/src/screens/SavedCards/CardRow.d.ts.map +1 -1
- package/lib/typescript/src/screens/SavedCards/SavedCards.d.ts +1 -1
- package/lib/typescript/src/screens/SavedCards/SavedCards.d.ts.map +1 -1
- package/lib/typescript/src/screens/SelectBusiness/SelectBusiness.d.ts.map +1 -1
- package/lib/typescript/src/screens/TermsOfService/TermsOfService.d.ts.map +1 -1
- package/lib/typescript/src/types/commons.d.ts +58 -0
- package/lib/typescript/src/types/commons.d.ts.map +1 -0
- package/lib/typescript/src/utils/checkout.d.ts +1 -1
- package/lib/typescript/src/utils/checkout.d.ts.map +1 -1
- package/package.json +9 -7
- package/src/api/customer.ts +1 -1
- package/src/constants/index.ts +2 -2
- package/src/helpers/businessHours.ts +1 -1
- package/src/hooks/useCustomer.ts +1 -1
- package/src/localization/translations/en.json +1 -0
- package/src/screens/Auth/Login.tsx +0 -1
- package/src/screens/Auth/ResetPassword.tsx +3 -6
- package/src/screens/SavedCards/CardRow.tsx +1 -1
- package/src/screens/SavedCards/SavedCards.tsx +1 -1
- package/src/screens/SelectBusiness/SelectBusiness.tsx +12 -1
- package/src/screens/TermsOfService/TermsOfService.tsx +39 -22
- package/src/types/commons.ts +64 -0
- package/src/utils/checkout.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BottomSheet","Button","IconButton","ParentView","Text","View","React","useTranslation","ActivityIndicator","useTheme","WebView","StyleSheet","
|
|
1
|
+
{"version":3,"names":["BottomSheet","Button","IconButton","ParentView","Snackbar","Text","View","React","useTranslation","ActivityIndicator","useTheme","WebView","StyleSheet","DeviceInfo","useSingleSnapBottomSheetRef","useLogout","useTermsOfService","CloseBottomSheet","bottomSheetRef","t","handleLogout","createElement","close","pressBehavior","ref","px","bg","flex","my","variant","pt","color","mode","onPress","TermsOfService","useAgreeTermsOfService","useTermsOfServiceURL","mutate","agreeTermsOfService","isLoading","theme","data","url","appVersion","getVersion","resolvedUrl","useMemo","undefined","separator","includes","encodeURIComponent","flexDirection","alignItems","iconColor","colors","onSurfaceVariant","backgroundColor","icon","expand","style","styles","view","mx","borderWidth","borderColor","borderRadius","padding","justifyContent","size","startInLoadingState","renderLoading","bottom","left","position","right","top","javaScriptEnabled","cacheEnabled","source","uri","height","onError","show","title","loading","create"],"sourceRoot":"../../../../src","sources":["screens/TermsOfService/TermsOfService.tsx"],"mappings":"AAAA,SACEA,WAAW,EACXC,MAAM,EACNC,UAAU,EACVC,UAAU,EACVC,QAAQ,EACRC,IAAI,EACJC,IAAI,QACC,kBAAkB;AACzB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,iBAAiB,EAAEC,QAAQ,QAAQ,oBAAoB;AAChE,OAAOC,OAAO,MAAM,sBAAsB;AAC1C,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,UAAU,MAAM,0BAA0B;AACjD,SAEEC,2BAA2B,QACtB,yCAAyC;AAChD,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,iBAAiB,QAAQ,aAAa;AAM/C,OAAO,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC;AAAsC,CAAC,KAAK;EAC7E,MAAM;IAAEC;EAAE,CAAC,GAAGX,cAAc,CAAC,CAAC;EAC9B,MAAM;IAAEY;EAAa,CAAC,GAAGL,SAAS,CAAC,CAAC;EAEpC,oBACER,KAAA,CAAAc,aAAA,CAACrB,WAAW;IACVsB,KAAK,EAAEJ,cAAc,CAACI,KAAM;IAC5BC,aAAa,EAAC,OAAO;IACrBC,GAAG,E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
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/commons.ts"],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Address, ConnectSquareCustomerRequest, SaveCardRequest } from '
|
|
1
|
+
import { Address, ConnectSquareCustomerRequest, SaveCardRequest } from '../types/commons';
|
|
2
2
|
export declare const getCustomer: (userId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
3
3
|
export declare const createCustomer: ({ uid, address, isAgreementUpdated, }: {
|
|
4
4
|
uid: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../../../src/api/customer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,4BAA4B,EAC5B,eAAe,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"customer.d.ts","sourceRoot":"","sources":["../../../../src/api/customer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,4BAA4B,EAC5B,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAI1B,eAAO,MAAM,WAAW,WAAkB,MAAM,qDAE/C,CAAC;AAEF,eAAO,MAAM,cAAc;SAKpB,MAAM;;;sDAWZ,CAAC;AAEF,eAAO,MAAM,qBAAqB;SAI3B,MAAM;WACJ;QACL,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;KACjC;sDAQF,CAAC;AAEF,eAAO,MAAM,mBAAmB;SAIzB,MAAM;aACF,OAAO;sDAQjB,CAAC;AAEF,eAAO,MAAM,gBAAgB;SAItB,MAAM;WACJ,eAAe;sDAQvB,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAC1B,MAAM,SACJ,4BAA4B,qDAQpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAC3B,MAAM,SACJ,4BAA4B,qDAQpC,CAAC;AAEF,eAAO,MAAM,kBAAkB,QAAe,MAAM,cAAc,MAAM,qDAOvE,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAAsB,MAAM,qDAI3D,CAAC"}
|
|
@@ -2,6 +2,6 @@ export declare const EMAIL_REGEX: RegExp;
|
|
|
2
2
|
export declare const MMKV_KEYS: {
|
|
3
3
|
BUSINESS_ID: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const PRIVACY_POLICY = "https://www.onlumina.com/privacy";
|
|
6
|
-
export declare const TERMS_OF_SERVICE = "https://www.onlumina.com/tos";
|
|
5
|
+
export declare const PRIVACY_POLICY = "https://www.onlumina.com/legal/privacy";
|
|
6
|
+
export declare const TERMS_OF_SERVICE = "https://www.onlumina.com/legal/tos";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QACsK,CAAC;AAE/L,eAAO,MAAM,SAAS;;CAErB,CAAC;AAEF,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QACsK,CAAC;AAE/L,eAAO,MAAM,SAAS;;CAErB,CAAC;AAEF,eAAO,MAAM,cAAc,2CAA2C,CAAC;AACvE,eAAO,MAAM,gBAAgB,uCAAuC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"businessHours.d.ts","sourceRoot":"","sources":["../../../../src/helpers/businessHours.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"businessHours.d.ts","sourceRoot":"","sources":["../../../../src/helpers/businessHours.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG/C,eAAO,MAAM,gBAAgB,QAAS,MAAM,KAAG,MAW9C,CAAC;AAEF,eAAO,MAAM,gBAAgB,SAAU,MAAM,KAAG,MAY/C,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,aAAa,GAAG,aAAa,GAAG,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,cAAc,YAChB,MAAM,EAAE,GAAG,IAAI,cACZ,MAAM,KACjB,WAqIF,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAIF,eAAO,MAAM,mBAAmB,YACrB,MAAM,EAAE,GAAG,IAAI,KACvB,kBAAkB,EAqBpB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Address, SaveCardRequest } from '
|
|
1
|
+
import { Address, SaveCardRequest } from '../types/commons';
|
|
2
2
|
export declare const useCustomerQueries: () => {
|
|
3
3
|
useFetchCustomer: () => import("@tanstack/react-query").UseQueryResult<any, unknown>;
|
|
4
4
|
useCreateCustomer: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCustomer.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCustomer.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useCustomer.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCustomer.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE5D,eAAO,MAAM,kBAAkB;;;;kBAyCE,MAAM;qBAAW,MAAM;;;;;;kBAgCvB,MAAM;qBAAW,MAAM;;uBAhBnC,MAAM,GAAG,IAAI;uBACb,MAAM,GAAG,IAAI;8BACN,MAAM,GAAG,IAAI;;;;;;kBA0CR,MAAM;qBAAW,MAAM;;;;;2CAsCb,MAAM;2CAwBN,MAAM;;;kBA2ChB,MAAM;qBAAW,MAAM;;;;;;kBA6BvB,MAAM;qBAAW,MAAM;;;;;;kBAqCvB,MAAM;qBAAW,MAAM;;;;;;kBA4BvB,MAAM;qBAAW,MAAM;;;;uCAgBjB;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE;CAgB3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/localization/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/localization/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAExB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Login.d.ts","sourceRoot":"","sources":["../../../../../src/screens/Auth/Login.tsx"],"names":[],"mappings":";AAqCA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Login.d.ts","sourceRoot":"","sources":["../../../../../src/screens/Auth/Login.tsx"],"names":[],"mappings":";AAqCA,eAAO,MAAM,KAAK,mBA+FjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPassword.d.ts","sourceRoot":"","sources":["../../../../../src/screens/Auth/ResetPassword.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResetPassword.d.ts","sourceRoot":"","sources":["../../../../../src/screens/Auth/ResetPassword.tsx"],"names":[],"mappings":";AA0BA,eAAO,MAAM,aAAa,mBAkGzB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CustomerCardPayment } from '
|
|
2
|
+
import { CustomerCardPayment } from '../../types/commons';
|
|
3
3
|
export declare const CardRow: ({ card, onDelete, onSelect, isSelectable, isSelected, isDisabled, isApplePay, }: {
|
|
4
4
|
card?: CustomerCardPayment | undefined;
|
|
5
5
|
onDelete?: ((id: string) => void) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardRow.d.ts","sourceRoot":"","sources":["../../../../../src/screens/SavedCards/CardRow.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CardRow.d.ts","sourceRoot":"","sources":["../../../../../src/screens/SavedCards/CardRow.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,eAAO,MAAM,OAAO;;qBAUF,MAAM,KAAK,IAAI;iCACH,MAAM,KAAK,IAAI;kBAC7B,OAAO;gBACT,OAAO;gBACP,OAAO;;iBAkGpB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CustomerCardPayment } from '
|
|
2
|
+
import { CustomerCardPayment } from '../../types/commons';
|
|
3
3
|
export declare const SavedCards: ({ onCheckout, showApplePay, total, }: {
|
|
4
4
|
onCheckout?: ((selectedCard: CustomerCardPayment | 'ApplePay') => void) | undefined;
|
|
5
5
|
total?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SavedCards.d.ts","sourceRoot":"","sources":["../../../../../src/screens/SavedCards/SavedCards.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SavedCards.d.ts","sourceRoot":"","sources":["../../../../../src/screens/SavedCards/SavedCards.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,eAAO,MAAM,UAAU;iCAKO,mBAAmB,GAAG,UAAU,KAAK,IAAI;;;iBAqLtE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBusiness.d.ts","sourceRoot":"","sources":["../../../../../src/screens/SelectBusiness/SelectBusiness.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SelectBusiness.d.ts","sourceRoot":"","sources":["../../../../../src/screens/SelectBusiness/SelectBusiness.tsx"],"names":[],"mappings":";AA4EA,eAAO,MAAM,cAAc,mBA0I1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TermsOfService.d.ts","sourceRoot":"","sources":["../../../../../src/screens/TermsOfService/TermsOfService.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"TermsOfService.d.ts","sourceRoot":"","sources":["../../../../../src/screens/TermsOfService/TermsOfService.tsx"],"names":[],"mappings":";AAeA,OAAO,EACL,yBAAyB,EAE1B,MAAM,yCAAyC,CAAC;AAIjD,KAAK,qBAAqB,GAAG;IAC3B,cAAc,EAAE,yBAAyB,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,gBAAgB,uBAAwB,qBAAqB,gBA0BzE,CAAC;AAEF,eAAO,MAAM,cAAc,mBA8E1B,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface Document {
|
|
2
|
+
id: string;
|
|
3
|
+
Id: string;
|
|
4
|
+
created: string;
|
|
5
|
+
updated: string;
|
|
6
|
+
}
|
|
7
|
+
export type Period = {
|
|
8
|
+
open: {
|
|
9
|
+
day: number;
|
|
10
|
+
time: string;
|
|
11
|
+
};
|
|
12
|
+
close: {
|
|
13
|
+
day: number;
|
|
14
|
+
time: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type Address = {
|
|
18
|
+
zip: string;
|
|
19
|
+
state: string;
|
|
20
|
+
addressLine1: string;
|
|
21
|
+
city: string;
|
|
22
|
+
addressLine2: string;
|
|
23
|
+
country: string;
|
|
24
|
+
};
|
|
25
|
+
export interface SaveCardRequest {
|
|
26
|
+
sourceId: string;
|
|
27
|
+
verificationToken?: string;
|
|
28
|
+
idempotentKey: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ConnectSquareCustomerRequest {
|
|
31
|
+
uid: string;
|
|
32
|
+
businessId: string;
|
|
33
|
+
idempotentKey: string;
|
|
34
|
+
}
|
|
35
|
+
export interface CardDetailsProps {
|
|
36
|
+
bin: string;
|
|
37
|
+
cardBrand: string;
|
|
38
|
+
cardType: string;
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
expMonth: number;
|
|
41
|
+
expYear: number;
|
|
42
|
+
fingerprint: string;
|
|
43
|
+
last4: string;
|
|
44
|
+
merchantId: string;
|
|
45
|
+
prepaidType: string;
|
|
46
|
+
version: number;
|
|
47
|
+
}
|
|
48
|
+
export interface CustomerPaymentProps {
|
|
49
|
+
type: 'card';
|
|
50
|
+
linkedObjectId: string;
|
|
51
|
+
provider: string;
|
|
52
|
+
}
|
|
53
|
+
export interface CustomerCardPayment extends CustomerPaymentProps, Document {
|
|
54
|
+
uid: string;
|
|
55
|
+
cardDetails: CardDetailsProps;
|
|
56
|
+
id: string;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=commons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commons.d.ts","sourceRoot":"","sources":["../../../../src/types/commons.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,EAAE;QACL,GAAG,E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checkout.d.ts","sourceRoot":"","sources":["../../../../src/utils/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../../../src/utils/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,eAAO,MAAM,WAAW,SAAU,mBAAmB,WAEpD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiosinc/commons-rn",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Common Code",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -34,6 +34,9 @@
|
|
|
34
34
|
"clean": "del-cli lib",
|
|
35
35
|
"prepare": "bob build",
|
|
36
36
|
"release": "release-it",
|
|
37
|
+
"tsc": "tsc -p tsconfig.json",
|
|
38
|
+
"clean-lib": "rm -rf ./lib",
|
|
39
|
+
"pre-publish": "rm -rf ./lib && tsc",
|
|
37
40
|
"yalc:publish": "yarn prepare && rm -rf ~/.yalc/packages && yalc publish --private",
|
|
38
41
|
"test-in-remy": "yarn yalc:publish && (cd ../remy && yalc add @kiosinc/commons-rn)",
|
|
39
42
|
"test-in-git": "yarn yalc:publish && (cd ../git && yalc add @kiosinc/commons-rn)",
|
|
@@ -55,16 +58,13 @@
|
|
|
55
58
|
"url": "https://github.com/kiosinc/@kiosinc/commons-rn/issues"
|
|
56
59
|
},
|
|
57
60
|
"homepage": "https://github.com/kiosinc/@kiosinc/commons-rn#readme",
|
|
58
|
-
"publishConfig": {
|
|
59
|
-
"registry": "https://registry.npmjs.org/"
|
|
60
|
-
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@commitlint/config-conventional": "^17.0.2",
|
|
63
63
|
"@evilmartians/lefthook": "^1.5.0",
|
|
64
64
|
"@react-native-community/netinfo": "^11.4.1",
|
|
65
65
|
"@react-native-firebase/auth": "^20.3.0",
|
|
66
66
|
"@react-native/eslint-config": "^0.72.2",
|
|
67
|
-
"@react-navigation/native": "^
|
|
67
|
+
"@react-navigation/native": "^7.1.17",
|
|
68
68
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
69
69
|
"@shopify/flash-list": "^1.5.0",
|
|
70
70
|
"@types/color": "^3.0.6",
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"react-native-fast-image": "^8.6.3",
|
|
90
90
|
"react-native-gesture-handler": "^2.13.4",
|
|
91
91
|
"react-native-mmkv": "^2.10.2",
|
|
92
|
+
"react-native-pager-view": "^6.5.1",
|
|
92
93
|
"react-native-reanimated": "^3.5.4",
|
|
93
94
|
"react-native-safe-area-context": "^4.7.4",
|
|
94
95
|
"react-native-square-in-app-payments": "^1.7.5",
|
|
@@ -103,13 +104,14 @@
|
|
|
103
104
|
},
|
|
104
105
|
"peerDependencies": {
|
|
105
106
|
"@react-native-community/netinfo": "*",
|
|
106
|
-
"@react-navigation/native": "^
|
|
107
|
+
"@react-navigation/native": "^7.1.17",
|
|
107
108
|
"@shopify/flash-list": "^1.5.0",
|
|
108
109
|
"react": "*",
|
|
109
110
|
"react-native": "*",
|
|
110
111
|
"react-native-fast-image": "^8.6.3",
|
|
111
112
|
"react-native-gesture-handler": "^2.13.4",
|
|
112
113
|
"react-native-mmkv": "^2.10.2",
|
|
114
|
+
"react-native-pager-view": ">=6.0.0",
|
|
113
115
|
"react-native-reanimated": "^3.5.4",
|
|
114
116
|
"react-native-safe-area-context": "^4.7.4",
|
|
115
117
|
"react-native-vector-icons": "*"
|
|
@@ -201,7 +203,7 @@
|
|
|
201
203
|
"dependencies": {
|
|
202
204
|
"@gorhom/bottom-sheet": "^4.6.1",
|
|
203
205
|
"@hookform/resolvers": "^3.3.2",
|
|
204
|
-
"@kiosinc/commons-types": "^0.0
|
|
206
|
+
"@kiosinc/commons-types": "^0.2.0",
|
|
205
207
|
"@material/material-color-utilities": "^0.3.0",
|
|
206
208
|
"@react-native-firebase/firestore": "^20.3.0",
|
|
207
209
|
"@react-native-firebase/messaging": "^20.3.0",
|
package/src/api/customer.ts
CHANGED
package/src/constants/index.ts
CHANGED
|
@@ -5,5 +5,5 @@ export const MMKV_KEYS = {
|
|
|
5
5
|
BUSINESS_ID: 'BUSINESS_ID',
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
-
export const PRIVACY_POLICY = 'https://www.onlumina.com/privacy';
|
|
9
|
-
export const TERMS_OF_SERVICE = 'https://www.onlumina.com/tos';
|
|
8
|
+
export const PRIVACY_POLICY = 'https://www.onlumina.com/legal/privacy';
|
|
9
|
+
export const TERMS_OF_SERVICE = 'https://www.onlumina.com/legal/tos';
|
package/src/hooks/useCustomer.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { useMMKVString } from 'react-native-mmkv';
|
|
|
19
19
|
import { MMKV_KEYS } from '../constants';
|
|
20
20
|
import { queryKeys } from './queryKeys';
|
|
21
21
|
import firebase from '@react-native-firebase/auth';
|
|
22
|
-
import { Address, SaveCardRequest } from '
|
|
22
|
+
import { Address, SaveCardRequest } from '../types/commons';
|
|
23
23
|
|
|
24
24
|
export const useCustomerQueries = () => {
|
|
25
25
|
const queryClient = useQueryClient();
|
|
@@ -83,7 +83,6 @@ export const Login = () => {
|
|
|
83
83
|
<View flexGrow={1} flexShrink={1} pt="24">
|
|
84
84
|
<Tab.Navigator
|
|
85
85
|
screenOptions={{
|
|
86
|
-
animationEnabled: false,
|
|
87
86
|
tabBarIndicatorStyle: tabBarStyles.tabBarIndicatorStyle,
|
|
88
87
|
tabBarStyle: {
|
|
89
88
|
backgroundColor: theme.colors.background,
|
|
@@ -8,11 +8,8 @@ import {
|
|
|
8
8
|
Alert,
|
|
9
9
|
View,
|
|
10
10
|
} from '../../components';
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
useNavigation,
|
|
14
|
-
useTheme,
|
|
15
|
-
} from '@react-navigation/native';
|
|
11
|
+
import { type NavigationProp, useNavigation } from '@react-navigation/native';
|
|
12
|
+
import { useTheme } from 'react-native-paper';
|
|
16
13
|
import React from 'react';
|
|
17
14
|
import { useTranslation } from 'react-i18next';
|
|
18
15
|
import { Controller, useForm } from 'react-hook-form';
|
|
@@ -53,7 +50,7 @@ export const ResetPassword = () => {
|
|
|
53
50
|
return (
|
|
54
51
|
<View pt={'24'}>
|
|
55
52
|
<View alignSelf={'center'}>
|
|
56
|
-
<AlertSVG fill={theme.colors.
|
|
53
|
+
<AlertSVG fill={theme.colors.onSurface} />
|
|
57
54
|
</View>
|
|
58
55
|
<Text variant="titleMedium" textAlign={'center'} py={'16'}>
|
|
59
56
|
{t('commons.resetPasswordWarningAlert.title')}
|
|
@@ -4,7 +4,7 @@ import ApplePayIcon from '../../assets/icons/apple_pay.svg';
|
|
|
4
4
|
import { RadioButton, useTheme } from 'react-native-paper';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { getCardName } from '../../utils/checkout';
|
|
7
|
-
import { CustomerCardPayment } from '
|
|
7
|
+
import { CustomerCardPayment } from '../../types/commons';
|
|
8
8
|
import { getVectorIcon } from '../../helpers/getVectorIcon';
|
|
9
9
|
|
|
10
10
|
export const CardRow = ({
|
|
@@ -15,7 +15,7 @@ import { onStartCardEntry } from '../../utils/square';
|
|
|
15
15
|
import { useCustomerQueries } from '../../hooks/useCustomer';
|
|
16
16
|
import { useCheckCustomer } from '../../hooks/useCheckCustomer';
|
|
17
17
|
import { CardRow } from './CardRow';
|
|
18
|
-
import { CustomerCardPayment } from '
|
|
18
|
+
import { CustomerCardPayment } from '../../types/commons';
|
|
19
19
|
import { useApplePay } from './useApplePay';
|
|
20
20
|
|
|
21
21
|
export const SavedCards = ({
|
|
@@ -25,6 +25,7 @@ import { useQueryClient } from '@tanstack/react-query';
|
|
|
25
25
|
import { CreateBusinessBottomSheet } from './CreateBusinessBottomSheet';
|
|
26
26
|
import { useBusinesses, useLogout } from '../../hooks';
|
|
27
27
|
import { MMKV_KEYS } from '../../constants';
|
|
28
|
+
import { queryKeys } from '../../hooks/queryKeys';
|
|
28
29
|
import { getAvatarLetter, useSingleSnapBottomSheetRef } from '../../utils';
|
|
29
30
|
|
|
30
31
|
const BusinessCard = ({
|
|
@@ -167,7 +168,17 @@ export const SelectBusiness = () => {
|
|
|
167
168
|
if (navigation.canGoBack()) {
|
|
168
169
|
navigation.goBack();
|
|
169
170
|
}
|
|
170
|
-
|
|
171
|
+
// Invalidate business-scoped queries only. ToS queries
|
|
172
|
+
// (TERMS_AND_CONDITIONS, TERMS_AND_CONDITIONS_URL) are
|
|
173
|
+
// intentionally excluded — acceptance state is per-user,
|
|
174
|
+
// not per-business, so clearing it would re-prompt on
|
|
175
|
+
// every business swap.
|
|
176
|
+
queryClient.invalidateQueries([queryKeys.BUSINESSES]);
|
|
177
|
+
queryClient.invalidateQueries([queryKeys.CUSTOMER]);
|
|
178
|
+
queryClient.invalidateQueries([queryKeys.CARDS]);
|
|
179
|
+
queryClient.invalidateQueries([queryKeys.PROGRAM]);
|
|
180
|
+
queryClient.invalidateQueries([queryKeys.LOYALTY]);
|
|
181
|
+
queryClient.invalidateQueries([queryKeys.REWARDS]);
|
|
171
182
|
setBusinessId(item.id);
|
|
172
183
|
}}
|
|
173
184
|
business={item}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
Button,
|
|
4
4
|
IconButton,
|
|
5
5
|
ParentView,
|
|
6
|
+
Snackbar,
|
|
6
7
|
Text,
|
|
7
8
|
View,
|
|
8
9
|
} from '../../components';
|
|
@@ -11,7 +12,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
11
12
|
import { ActivityIndicator, useTheme } from 'react-native-paper';
|
|
12
13
|
import WebView from 'react-native-webview';
|
|
13
14
|
import { StyleSheet } from 'react-native';
|
|
14
|
-
import
|
|
15
|
+
import DeviceInfo from 'react-native-device-info';
|
|
15
16
|
import {
|
|
16
17
|
TSingleSnapBottomSheetRef,
|
|
17
18
|
useSingleSnapBottomSheetRef,
|
|
@@ -58,6 +59,12 @@ export const TermsOfService = () => {
|
|
|
58
59
|
const bottomSheetRef = useSingleSnapBottomSheetRef();
|
|
59
60
|
const { t } = useTranslation();
|
|
60
61
|
const { data: url } = useTermsOfServiceURL();
|
|
62
|
+
const appVersion = DeviceInfo.getVersion();
|
|
63
|
+
const resolvedUrl = React.useMemo(() => {
|
|
64
|
+
if (!url) return undefined;
|
|
65
|
+
const separator = url.includes('?') ? '&' : '?';
|
|
66
|
+
return `${url}${separator}v=${encodeURIComponent(appVersion)}`;
|
|
67
|
+
}, [url, appVersion]);
|
|
61
68
|
|
|
62
69
|
return (
|
|
63
70
|
<ParentView flex={1}>
|
|
@@ -79,33 +86,43 @@ export const TermsOfService = () => {
|
|
|
79
86
|
borderRadius="12"
|
|
80
87
|
padding="8"
|
|
81
88
|
>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
{resolvedUrl == null ? (
|
|
90
|
+
<View alignItems="center" justifyContent="center" flex={1}>
|
|
91
|
+
<ActivityIndicator size="large" />
|
|
92
|
+
</View>
|
|
93
|
+
) : (
|
|
94
|
+
<WebView
|
|
95
|
+
startInLoadingState
|
|
96
|
+
renderLoading={() => (
|
|
97
|
+
<View
|
|
98
|
+
alignItems="center"
|
|
99
|
+
bottom={0}
|
|
100
|
+
justifyContent="center"
|
|
101
|
+
left={0}
|
|
102
|
+
position="absolute"
|
|
103
|
+
right={0}
|
|
104
|
+
top={0}
|
|
105
|
+
>
|
|
106
|
+
<ActivityIndicator size="large" />
|
|
107
|
+
</View>
|
|
108
|
+
)}
|
|
109
|
+
javaScriptEnabled={true}
|
|
110
|
+
cacheEnabled={false}
|
|
111
|
+
source={{ uri: resolvedUrl }}
|
|
112
|
+
/>
|
|
113
|
+
)}
|
|
102
114
|
</View>
|
|
103
115
|
<Button
|
|
104
116
|
mx="16"
|
|
105
117
|
mode="contained"
|
|
106
118
|
my="16"
|
|
107
119
|
height={40}
|
|
108
|
-
onPress={() =>
|
|
120
|
+
onPress={() =>
|
|
121
|
+
agreeTermsOfService(undefined, {
|
|
122
|
+
onError: () =>
|
|
123
|
+
Snackbar.show({ title: t('commons.acceptTermsError') }),
|
|
124
|
+
})
|
|
125
|
+
}
|
|
109
126
|
loading={isLoading}
|
|
110
127
|
>
|
|
111
128
|
{t('commons.acceptTerms')}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export interface Document {
|
|
2
|
+
id: string;
|
|
3
|
+
Id: string;
|
|
4
|
+
created: string;
|
|
5
|
+
updated: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type Period = {
|
|
9
|
+
open: {
|
|
10
|
+
day: number;
|
|
11
|
+
time: string;
|
|
12
|
+
};
|
|
13
|
+
close: {
|
|
14
|
+
day: number;
|
|
15
|
+
time: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type Address = {
|
|
20
|
+
zip: string;
|
|
21
|
+
state: string;
|
|
22
|
+
addressLine1: string;
|
|
23
|
+
city: string;
|
|
24
|
+
addressLine2: string;
|
|
25
|
+
country: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export interface SaveCardRequest {
|
|
29
|
+
sourceId: string;
|
|
30
|
+
verificationToken?: string;
|
|
31
|
+
idempotentKey: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ConnectSquareCustomerRequest {
|
|
35
|
+
uid: string;
|
|
36
|
+
businessId: string;
|
|
37
|
+
idempotentKey: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface CardDetailsProps {
|
|
41
|
+
bin: string;
|
|
42
|
+
cardBrand: string;
|
|
43
|
+
cardType: string;
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
expMonth: number;
|
|
46
|
+
expYear: number;
|
|
47
|
+
fingerprint: string;
|
|
48
|
+
last4: string;
|
|
49
|
+
merchantId: string;
|
|
50
|
+
prepaidType: string;
|
|
51
|
+
version: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface CustomerPaymentProps {
|
|
55
|
+
type: 'card';
|
|
56
|
+
linkedObjectId: string;
|
|
57
|
+
provider: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface CustomerCardPayment extends CustomerPaymentProps, Document {
|
|
61
|
+
uid: string;
|
|
62
|
+
cardDetails: CardDetailsProps;
|
|
63
|
+
id: string;
|
|
64
|
+
}
|
package/src/utils/checkout.ts
CHANGED