react-native-google-mobile-ads 12.1.1 → 12.1.2
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/android/src/main/java/io/invertase/googlemobileads/ReactNativeGoogleMobileAdsBannerAdViewManager.java +25 -22
- package/lib/commonjs/common/index.js +1 -140
- package/lib/commonjs/common/index.js.map +1 -1
- package/lib/commonjs/common/validate.js +0 -89
- package/lib/commonjs/common/validate.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/common/index.js +1 -78
- package/lib/module/common/index.js.map +1 -1
- package/lib/module/common/validate.js +0 -81
- package/lib/module/common/validate.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/common/index.d.ts +0 -26
- package/lib/typescript/common/index.d.ts.map +1 -1
- package/lib/typescript/common/validate.d.ts +0 -35
- package/lib/typescript/common/validate.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/common/index.ts +1 -81
- package/src/common/validate.ts +0 -98
- package/src/version.ts +1 -1
- package/lib/commonjs/common/Base64.js +0 -102
- package/lib/commonjs/common/Base64.js.map +0 -1
- package/lib/commonjs/common/MutatableParams.js +0 -50
- package/lib/commonjs/common/MutatableParams.js.map +0 -1
- package/lib/commonjs/common/ReferenceBase.js +0 -49
- package/lib/commonjs/common/ReferenceBase.js.map +0 -1
- package/lib/commonjs/common/deeps.js +0 -85
- package/lib/commonjs/common/deeps.js.map +0 -1
- package/lib/commonjs/common/id.js +0 -72
- package/lib/commonjs/common/id.js.map +0 -1
- package/lib/commonjs/common/path.js +0 -125
- package/lib/commonjs/common/path.js.map +0 -1
- package/lib/commonjs/common/promise.js +0 -64
- package/lib/commonjs/common/promise.js.map +0 -1
- package/lib/commonjs/common/serialize.js +0 -48
- package/lib/commonjs/common/serialize.js.map +0 -1
- package/lib/module/common/Base64.js +0 -93
- package/lib/module/common/Base64.js.map +0 -1
- package/lib/module/common/MutatableParams.js +0 -43
- package/lib/module/common/MutatableParams.js.map +0 -1
- package/lib/module/common/ReferenceBase.js +0 -42
- package/lib/module/common/ReferenceBase.js.map +0 -1
- package/lib/module/common/deeps.js +0 -79
- package/lib/module/common/deeps.js.map +0 -1
- package/lib/module/common/id.js +0 -65
- package/lib/module/common/id.js.map +0 -1
- package/lib/module/common/path.js +0 -110
- package/lib/module/common/path.js.map +0 -1
- package/lib/module/common/promise.js +0 -58
- package/lib/module/common/promise.js.map +0 -1
- package/lib/module/common/serialize.js +0 -41
- package/lib/module/common/serialize.js.map +0 -1
- package/lib/typescript/common/Base64.d.ts +0 -15
- package/lib/typescript/common/Base64.d.ts.map +0 -1
- package/lib/typescript/common/MutatableParams.d.ts +0 -10
- package/lib/typescript/common/MutatableParams.d.ts.map +0 -1
- package/lib/typescript/common/ReferenceBase.d.ts +0 -12
- package/lib/typescript/common/ReferenceBase.d.ts.map +0 -1
- package/lib/typescript/common/deeps.d.ts +0 -19
- package/lib/typescript/common/deeps.d.ts.map +0 -1
- package/lib/typescript/common/id.d.ts +0 -12
- package/lib/typescript/common/id.d.ts.map +0 -1
- package/lib/typescript/common/path.d.ts +0 -44
- package/lib/typescript/common/path.d.ts.map +0 -1
- package/lib/typescript/common/promise.d.ts +0 -14
- package/lib/typescript/common/promise.d.ts.map +0 -1
- package/lib/typescript/common/serialize.d.ts +0 -6
- package/lib/typescript/common/serialize.d.ts.map +0 -1
- package/src/common/Base64.ts +0 -114
- package/src/common/MutatableParams.ts +0 -50
- package/src/common/ReferenceBase.ts +0 -45
- package/src/common/deeps.ts +0 -88
- package/src/common/id.ts +0 -74
- package/src/common/path.ts +0 -114
- package/src/common/promise.ts +0 -66
- package/src/common/serialize.ts +0 -43
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
import * as Base64 from './Base64';
|
|
2
|
-
export * from './id';
|
|
3
|
-
export * from './path';
|
|
4
|
-
export * from './promise';
|
|
5
1
|
export * from './validate';
|
|
6
|
-
export { Base64 };
|
|
7
|
-
export { ReferenceBase } from './ReferenceBase';
|
|
8
|
-
export declare function getDataUrlParts(dataUrlString: string): {
|
|
9
|
-
base64String: undefined;
|
|
10
|
-
mediaType: undefined;
|
|
11
|
-
} | {
|
|
12
|
-
base64String: string;
|
|
13
|
-
mediaType: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function once<T>(fn: () => void, context: unknown): (this: T, ...args: []) => void;
|
|
16
|
-
export declare function isError(value: unknown): boolean;
|
|
17
2
|
export declare function hasOwnProperty(target: unknown, property: PropertyKey): boolean;
|
|
18
3
|
export declare function isPropertySet(target: unknown, property: PropertyKey): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Remove a trailing forward slash from a string if it exists
|
|
21
|
-
*
|
|
22
|
-
* @param string
|
|
23
|
-
* @returns {*}
|
|
24
|
-
*/
|
|
25
|
-
export declare function stripTrailingSlash(string: string): string;
|
|
26
|
-
export declare const isIOS: boolean;
|
|
27
|
-
export declare const isAndroid: boolean;
|
|
28
|
-
export declare function tryJSONParse(string: string): any;
|
|
29
|
-
export declare function tryJSONStringify(data: unknown): string | null;
|
|
30
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAiBA,cAAc,YAAY,CAAC;AAG3B,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,WAEpE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,WAKnE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare function objectKeyValuesAreStrings(object: Record<string, unknown>): boolean;
|
|
2
1
|
/**
|
|
3
2
|
* Simple is null check.
|
|
4
3
|
*
|
|
@@ -13,13 +12,6 @@ export declare function isNull(value: unknown): boolean;
|
|
|
13
12
|
* @returns {boolean}
|
|
14
13
|
*/
|
|
15
14
|
export declare function isObject(value: unknown): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Simple is date check
|
|
18
|
-
* https://stackoverflow.com/a/44198641
|
|
19
|
-
* @param value
|
|
20
|
-
* @returns {boolean}
|
|
21
|
-
*/
|
|
22
|
-
export declare function isDate(value: number): boolean | 0;
|
|
23
15
|
/**
|
|
24
16
|
* Simple is function check
|
|
25
17
|
*
|
|
@@ -33,24 +25,6 @@ export declare function isFunction(value: unknown): boolean;
|
|
|
33
25
|
* @return {boolean}
|
|
34
26
|
*/
|
|
35
27
|
export declare function isString(value: unknown): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Simple is number check
|
|
38
|
-
* @param value
|
|
39
|
-
* @return {boolean}
|
|
40
|
-
*/
|
|
41
|
-
export declare function isNumber(value: unknown): value is number;
|
|
42
|
-
/**
|
|
43
|
-
* Simple finite check
|
|
44
|
-
* @param value
|
|
45
|
-
* @returns {boolean}
|
|
46
|
-
*/
|
|
47
|
-
export declare function isFinite(value: unknown): boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Simple integer check
|
|
50
|
-
* @param value
|
|
51
|
-
* @returns {boolean}
|
|
52
|
-
*/
|
|
53
|
-
export declare function isInteger(value: unknown): boolean;
|
|
54
28
|
/**
|
|
55
29
|
* Simple is boolean check
|
|
56
30
|
*
|
|
@@ -70,13 +44,6 @@ export declare function isArray(value: unknown): boolean;
|
|
|
70
44
|
* @returns {boolean}
|
|
71
45
|
*/
|
|
72
46
|
export declare function isUndefined(value: unknown): value is undefined;
|
|
73
|
-
/**
|
|
74
|
-
* /^[a-zA-Z0-9_]+$/
|
|
75
|
-
*
|
|
76
|
-
* @param value
|
|
77
|
-
* @returns {boolean}
|
|
78
|
-
*/
|
|
79
|
-
export declare function isAlphaNumericUnderscore(value: string): boolean;
|
|
80
47
|
export declare function isValidUrl(url: string): boolean;
|
|
81
48
|
/**
|
|
82
49
|
* Array includes
|
|
@@ -86,6 +53,4 @@ export declare function isValidUrl(url: string): boolean;
|
|
|
86
53
|
* @returns {boolean}
|
|
87
54
|
*/
|
|
88
55
|
export declare function isOneOf(value: unknown, oneOf?: unknown[]): boolean;
|
|
89
|
-
export declare function noop(): void;
|
|
90
|
-
export declare function validateOptionalNativeDependencyExists(firebaseJsonKey: string, apiName: string, nativeFnExists: boolean): void;
|
|
91
56
|
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/common/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/common/validate.ts"],"names":[],"mappings":"AAiBA;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,WAEpC;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,WAEtC;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,WAExC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,WAEtC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,WAEvC;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,WAErC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D;AAQD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,WAErC;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,OAAO,EAAO,WAK5D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "12.1.
|
|
1
|
+
export declare const SDK_VERSION = "12.1.2";
|
|
2
2
|
export { default, MobileAds } from './MobileAds';
|
|
3
3
|
export { AdsConsentDebugGeography } from './AdsConsentDebugGeography';
|
|
4
4
|
export { AdsConsentPurposes } from './AdsConsentPurposes';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "12.1.
|
|
1
|
+
export declare const version = "12.1.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-google-mobile-ads",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.2",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Google Mobile Ads is an easy way to monetize mobile apps with targeted, in-app advertising.",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
package/src/common/index.ts
CHANGED
|
@@ -15,55 +15,8 @@
|
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Platform } from 'react-native';
|
|
19
|
-
import * as Base64 from './Base64';
|
|
20
|
-
import { isString, isUndefined } from './validate';
|
|
21
|
-
|
|
22
|
-
export * from './id';
|
|
23
|
-
export * from './path';
|
|
24
|
-
export * from './promise';
|
|
25
18
|
export * from './validate';
|
|
26
|
-
|
|
27
|
-
export { Base64 };
|
|
28
|
-
export { ReferenceBase } from './ReferenceBase';
|
|
29
|
-
|
|
30
|
-
export function getDataUrlParts(dataUrlString: string) {
|
|
31
|
-
const isBase64 = dataUrlString.includes(';base64');
|
|
32
|
-
let [mediaType, base64String] = dataUrlString.split(',');
|
|
33
|
-
if (!mediaType || !base64String) {
|
|
34
|
-
return { base64String: undefined, mediaType: undefined };
|
|
35
|
-
}
|
|
36
|
-
mediaType = mediaType.replace('data:', '').replace(';base64', '');
|
|
37
|
-
if (base64String && base64String.includes('%')) {
|
|
38
|
-
base64String = decodeURIComponent(base64String);
|
|
39
|
-
}
|
|
40
|
-
if (!isBase64) {
|
|
41
|
-
base64String = Base64.btoa(base64String);
|
|
42
|
-
}
|
|
43
|
-
return { base64String, mediaType };
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function once<T>(fn: () => void, context: unknown): (this: T, ...args: []) => void {
|
|
47
|
-
let onceResult: unknown;
|
|
48
|
-
let ranOnce = false;
|
|
49
|
-
|
|
50
|
-
return function onceInner(...args: []) {
|
|
51
|
-
if (!ranOnce) {
|
|
52
|
-
ranOnce = true;
|
|
53
|
-
onceResult = fn.apply(context || this, args);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return onceResult;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function isError(value: unknown) {
|
|
61
|
-
if (Object.prototype.toString.call(value) === '[object Error]') {
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return value instanceof Error;
|
|
66
|
-
}
|
|
19
|
+
import { isUndefined } from './validate';
|
|
67
20
|
|
|
68
21
|
export function hasOwnProperty(target: unknown, property: PropertyKey) {
|
|
69
22
|
return Object.hasOwnProperty.call(target, property);
|
|
@@ -75,36 +28,3 @@ export function isPropertySet(target: unknown, property: PropertyKey) {
|
|
|
75
28
|
!isUndefined((target as Record<PropertyKey, unknown>)[property])
|
|
76
29
|
);
|
|
77
30
|
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Remove a trailing forward slash from a string if it exists
|
|
81
|
-
*
|
|
82
|
-
* @param string
|
|
83
|
-
* @returns {*}
|
|
84
|
-
*/
|
|
85
|
-
export function stripTrailingSlash(string: string) {
|
|
86
|
-
if (!isString(string)) {
|
|
87
|
-
return string;
|
|
88
|
-
}
|
|
89
|
-
return string.endsWith('/') ? string.slice(0, -1) : string;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export const isIOS = Platform.OS === 'ios';
|
|
93
|
-
|
|
94
|
-
export const isAndroid = Platform.OS === 'android';
|
|
95
|
-
|
|
96
|
-
export function tryJSONParse(string: string) {
|
|
97
|
-
try {
|
|
98
|
-
return string && JSON.parse(string);
|
|
99
|
-
} catch (jsonError) {
|
|
100
|
-
return string;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export function tryJSONStringify(data: unknown) {
|
|
105
|
-
try {
|
|
106
|
-
return JSON.stringify(data);
|
|
107
|
-
} catch (jsonError) {
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
}
|
package/src/common/validate.ts
CHANGED
|
@@ -15,27 +15,6 @@
|
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Platform } from 'react-native';
|
|
19
|
-
|
|
20
|
-
const AlphaNumericUnderscore = /^[a-zA-Z0-9_]+$/;
|
|
21
|
-
|
|
22
|
-
export function objectKeyValuesAreStrings(object: Record<string, unknown>) {
|
|
23
|
-
if (!isObject(object)) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const entries = Object.entries(object);
|
|
28
|
-
|
|
29
|
-
for (let i = 0; i < entries.length; i++) {
|
|
30
|
-
const [key, value] = entries[i];
|
|
31
|
-
if (!isString(key) || !isString(value)) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
18
|
/**
|
|
40
19
|
* Simple is null check.
|
|
41
20
|
*
|
|
@@ -56,17 +35,6 @@ export function isObject(value: unknown) {
|
|
|
56
35
|
return value ? typeof value === 'object' && !Array.isArray(value) && !isNull(value) : false;
|
|
57
36
|
}
|
|
58
37
|
|
|
59
|
-
/**
|
|
60
|
-
* Simple is date check
|
|
61
|
-
* https://stackoverflow.com/a/44198641
|
|
62
|
-
* @param value
|
|
63
|
-
* @returns {boolean}
|
|
64
|
-
*/
|
|
65
|
-
export function isDate(value: number) {
|
|
66
|
-
// use the global isNaN() and not Number.isNaN() since it will validate an Invalid Date
|
|
67
|
-
return value && Object.prototype.toString.call(value) === '[object Date]' && !isNaN(value);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
38
|
/**
|
|
71
39
|
* Simple is function check
|
|
72
40
|
*
|
|
@@ -86,33 +54,6 @@ export function isString(value: unknown) {
|
|
|
86
54
|
return typeof value === 'string';
|
|
87
55
|
}
|
|
88
56
|
|
|
89
|
-
/**
|
|
90
|
-
* Simple is number check
|
|
91
|
-
* @param value
|
|
92
|
-
* @return {boolean}
|
|
93
|
-
*/
|
|
94
|
-
export function isNumber(value: unknown): value is number {
|
|
95
|
-
return typeof value === 'number';
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Simple finite check
|
|
100
|
-
* @param value
|
|
101
|
-
* @returns {boolean}
|
|
102
|
-
*/
|
|
103
|
-
export function isFinite(value: unknown) {
|
|
104
|
-
return Number.isFinite(value);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Simple integer check
|
|
109
|
-
* @param value
|
|
110
|
-
* @returns {boolean}
|
|
111
|
-
*/
|
|
112
|
-
export function isInteger(value: unknown) {
|
|
113
|
-
return Number.isInteger(value);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
57
|
/**
|
|
117
58
|
* Simple is boolean check
|
|
118
59
|
*
|
|
@@ -141,16 +82,6 @@ export function isUndefined(value: unknown): value is undefined {
|
|
|
141
82
|
return typeof value === 'undefined';
|
|
142
83
|
}
|
|
143
84
|
|
|
144
|
-
/**
|
|
145
|
-
* /^[a-zA-Z0-9_]+$/
|
|
146
|
-
*
|
|
147
|
-
* @param value
|
|
148
|
-
* @returns {boolean}
|
|
149
|
-
*/
|
|
150
|
-
export function isAlphaNumericUnderscore(value: string) {
|
|
151
|
-
return AlphaNumericUnderscore.test(value);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
85
|
/**
|
|
155
86
|
* URL test
|
|
156
87
|
* @param url
|
|
@@ -174,32 +105,3 @@ export function isOneOf(value: unknown, oneOf: unknown[] = []) {
|
|
|
174
105
|
}
|
|
175
106
|
return oneOf.includes(value);
|
|
176
107
|
}
|
|
177
|
-
|
|
178
|
-
export function noop() {
|
|
179
|
-
// noop-🐈
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export function validateOptionalNativeDependencyExists(
|
|
183
|
-
firebaseJsonKey: string,
|
|
184
|
-
apiName: string,
|
|
185
|
-
nativeFnExists: boolean,
|
|
186
|
-
) {
|
|
187
|
-
if (nativeFnExists) {
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
let errorMessage =
|
|
191
|
-
"You attempted to use an optional API that's not enabled natively. \n\n To enable ";
|
|
192
|
-
|
|
193
|
-
errorMessage += apiName;
|
|
194
|
-
errorMessage += ` please set the 'react-native' -> '${firebaseJsonKey}' key to true in your firebase.json file`;
|
|
195
|
-
|
|
196
|
-
if (Platform.OS === 'android') {
|
|
197
|
-
errorMessage += ' and rebuild your Android app.';
|
|
198
|
-
} else {
|
|
199
|
-
errorMessage +=
|
|
200
|
-
', re-run pod install and rebuild your iOS app. ' +
|
|
201
|
-
"If you're not using Pods then make sure you've have downloaded the necessary Firebase iOS SDK dependencies for this API.";
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
throw new Error(errorMessage);
|
|
205
|
-
}
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '12.1.
|
|
2
|
+
export const version = '12.1.2';
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.atob = atob;
|
|
7
|
-
exports.btoa = btoa;
|
|
8
|
-
exports.fromData = fromData;
|
|
9
|
-
var _binaryToBase = _interopRequireDefault(require("react-native/Libraries/Utilities/binaryToBase64"));
|
|
10
|
-
var _promise = require("./promise");
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
/* eslint-disable no-bitwise */
|
|
13
|
-
/* global Blob, FileReader */
|
|
14
|
-
/*
|
|
15
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
16
|
-
*
|
|
17
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18
|
-
* you may not use this library except in compliance with the License.
|
|
19
|
-
* You may obtain a copy of the License at
|
|
20
|
-
*
|
|
21
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
-
*
|
|
23
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
24
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
25
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
26
|
-
* See the License for the specific language governing permissions and
|
|
27
|
-
* limitations under the License.
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
const CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* window.btoa
|
|
35
|
-
*/
|
|
36
|
-
function btoa(input) {
|
|
37
|
-
let map;
|
|
38
|
-
let i = 0;
|
|
39
|
-
let block = 0;
|
|
40
|
-
let output = '';
|
|
41
|
-
for (block = 0, i = 0, map = CHARS; input.charAt(i | 0) || (map = '=', i % 1); output += map.charAt(63 & block >> 8 - i % 1 * 8)) {
|
|
42
|
-
const charCode = input.charCodeAt(i += 3 / 4);
|
|
43
|
-
if (charCode > 0xff) {
|
|
44
|
-
throw new Error("'RNFirebase.Base64.btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");
|
|
45
|
-
}
|
|
46
|
-
block = block << 8 | charCode;
|
|
47
|
-
}
|
|
48
|
-
return output;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* window.atob
|
|
53
|
-
*/
|
|
54
|
-
function atob(input) {
|
|
55
|
-
let i = 0;
|
|
56
|
-
let bc = 0;
|
|
57
|
-
let bs = 0;
|
|
58
|
-
let buffer;
|
|
59
|
-
let output = '';
|
|
60
|
-
const str = input.replace(/[=]+$/, '');
|
|
61
|
-
if (str.length % 4 === 1) {
|
|
62
|
-
throw new Error("'RNFirebase.Base64.atob' failed: The string to be decoded is not correctly encoded.");
|
|
63
|
-
}
|
|
64
|
-
for (bc = 0, bs = 0, i = 0; buffer = str.charAt(i++); ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0) {
|
|
65
|
-
buffer = CHARS.indexOf(buffer);
|
|
66
|
-
}
|
|
67
|
-
return output;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Converts a Blob, ArrayBuffer or Uint8Array to a base64 string.
|
|
72
|
-
*/
|
|
73
|
-
function fromData(data) {
|
|
74
|
-
if (data instanceof Blob) {
|
|
75
|
-
const fileReader = new FileReader();
|
|
76
|
-
const {
|
|
77
|
-
resolve,
|
|
78
|
-
reject,
|
|
79
|
-
promise
|
|
80
|
-
} = (0, _promise.promiseDefer)();
|
|
81
|
-
fileReader.readAsDataURL(data);
|
|
82
|
-
fileReader.onloadend = function onloadend() {
|
|
83
|
-
resolve({
|
|
84
|
-
string: fileReader.result,
|
|
85
|
-
format: 'data_url'
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
fileReader.onerror = function onerror(event) {
|
|
89
|
-
fileReader.abort();
|
|
90
|
-
reject(event);
|
|
91
|
-
};
|
|
92
|
-
return promise;
|
|
93
|
-
}
|
|
94
|
-
if (data instanceof ArrayBuffer || data instanceof Uint8Array) {
|
|
95
|
-
return Promise.resolve({
|
|
96
|
-
string: (0, _binaryToBase.default)(data),
|
|
97
|
-
format: 'base64'
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
throw new Error("'RNFirebase.Base64.fromData' failed: Unknown data type.");
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=Base64.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_binaryToBase","_interopRequireDefault","require","_promise","obj","__esModule","default","CHARS","btoa","input","map","i","block","output","charAt","charCode","charCodeAt","Error","atob","bc","bs","buffer","str","replace","length","String","fromCharCode","indexOf","fromData","data","Blob","fileReader","FileReader","resolve","reject","promise","promiseDefer","readAsDataURL","onloadend","string","result","format","onerror","event","abort","ArrayBuffer","Uint8Array","Promise","binaryToBase64"],"sourceRoot":"../../../src","sources":["common/Base64.ts"],"mappings":"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"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.MutatableParams = void 0;
|
|
7
|
-
var _deeps = require("./deeps");
|
|
8
|
-
/*
|
|
9
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
10
|
-
*
|
|
11
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
-
* you may not use this library except in compliance with the License.
|
|
13
|
-
* You may obtain a copy of the License at
|
|
14
|
-
*
|
|
15
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
-
*
|
|
17
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
-
* See the License for the specific language governing permissions and
|
|
21
|
-
* limitations under the License.
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
class MutatableParams {
|
|
26
|
-
constructor(parentInstance) {
|
|
27
|
-
if (parentInstance) {
|
|
28
|
-
this._mutatableParams = parentInstance._mutatableParams;
|
|
29
|
-
this._parentInstance = parentInstance;
|
|
30
|
-
} else {
|
|
31
|
-
this._mutatableParams = {};
|
|
32
|
-
this._parentInstance = this;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
set(param, value) {
|
|
36
|
-
(0, _deeps.deepSet)(this._mutatableParams, param, value);
|
|
37
|
-
return this._parentInstance;
|
|
38
|
-
}
|
|
39
|
-
get(param) {
|
|
40
|
-
return (0, _deeps.deepGet)(this._mutatableParams, param, '.');
|
|
41
|
-
}
|
|
42
|
-
toJSON() {
|
|
43
|
-
return Object.assign({}, this._mutatableParams);
|
|
44
|
-
}
|
|
45
|
-
validate() {
|
|
46
|
-
// do nothing
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.MutatableParams = MutatableParams;
|
|
50
|
-
//# sourceMappingURL=MutatableParams.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_deeps","require","MutatableParams","constructor","parentInstance","_mutatableParams","_parentInstance","set","param","value","deepSet","get","deepGet","toJSON","Object","assign","validate","exports"],"sourceRoot":"../../../src","sources":["common/MutatableParams.ts"],"mappings":";;;;;;AAiBA,IAAAA,MAAA,GAAAC,OAAA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMC,eAAe,CAAC;EAI3BC,WAAWA,CAACC,cAA+B,EAAE;IAC3C,IAAIA,cAAc,EAAE;MAClB,IAAI,CAACC,gBAAgB,GAAGD,cAAc,CAACC,gBAAgB;MACvD,IAAI,CAACC,eAAe,GAAGF,cAAc;IACvC,CAAC,MAAM;MACL,IAAI,CAACC,gBAAgB,GAAG,CAAC,CAAC;MAC1B,IAAI,CAACC,eAAe,GAAG,IAAI;IAC7B;EACF;EAEAC,GAAGA,CAACC,KAAa,EAAEC,KAAc,EAAE;IACjC,IAAAC,cAAO,EAAC,IAAI,CAACL,gBAAgB,EAAEG,KAAK,EAAEC,KAAK,CAAC;IAC5C,OAAO,IAAI,CAACH,eAAe;EAC7B;EAEAK,GAAGA,CAACH,KAAa,EAAE;IACjB,OAAO,IAAAI,cAAO,EAAC,IAAI,CAACP,gBAAgB,EAAEG,KAAK,EAAE,GAAG,CAAC;EACnD;EAEAK,MAAMA,CAAA,EAAG;IACP,OAAOC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAACV,gBAAgB,CAAC;EACjD;EAEAW,QAAQA,CAAA,EAAG;IACT;EAAA;AAEJ;AAACC,OAAA,CAAAf,eAAA,GAAAA,eAAA"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ReferenceBase = void 0;
|
|
7
|
-
/*
|
|
8
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
9
|
-
*
|
|
10
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
* you may not use this library except in compliance with the License.
|
|
12
|
-
* You may obtain a copy of the License at
|
|
13
|
-
*
|
|
14
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
* See the License for the specific language governing permissions and
|
|
20
|
-
* limitations under the License.
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
class ReferenceBase {
|
|
25
|
-
constructor(_path) {
|
|
26
|
-
let path = _path;
|
|
27
|
-
if (path) {
|
|
28
|
-
path = path.length > 1 && path.endsWith('/') ? path.substring(0, path.length - 1) : path;
|
|
29
|
-
if (path.startsWith('/') && path.length > 1) {
|
|
30
|
-
path = path.substring(1, path.length);
|
|
31
|
-
}
|
|
32
|
-
} else {
|
|
33
|
-
path = '/';
|
|
34
|
-
}
|
|
35
|
-
this.path = path;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* The last part of a Reference's path (after the last '/')
|
|
40
|
-
* The key of a root Reference is null.
|
|
41
|
-
* @type {String}
|
|
42
|
-
* {@link https://firebase.google.com/docs/reference/js/firebase.database.Reference#key}
|
|
43
|
-
*/
|
|
44
|
-
get key() {
|
|
45
|
-
return this.path === '/' ? null : this.path.substring(this.path.lastIndexOf('/') + 1);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.ReferenceBase = ReferenceBase;
|
|
49
|
-
//# sourceMappingURL=ReferenceBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ReferenceBase","constructor","_path","path","length","endsWith","substring","startsWith","key","lastIndexOf","exports"],"sourceRoot":"../../../src","sources":["common/ReferenceBase.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMA,aAAa,CAAC;EAGzBC,WAAWA,CAACC,KAAa,EAAE;IACzB,IAAIC,IAAI,GAAGD,KAAK;IAEhB,IAAIC,IAAI,EAAE;MACRA,IAAI,GAAGA,IAAI,CAACC,MAAM,GAAG,CAAC,IAAID,IAAI,CAACE,QAAQ,CAAC,GAAG,CAAC,GAAGF,IAAI,CAACG,SAAS,CAAC,CAAC,EAAEH,IAAI,CAACC,MAAM,GAAG,CAAC,CAAC,GAAGD,IAAI;MACxF,IAAIA,IAAI,CAACI,UAAU,CAAC,GAAG,CAAC,IAAIJ,IAAI,CAACC,MAAM,GAAG,CAAC,EAAE;QAC3CD,IAAI,GAAGA,IAAI,CAACG,SAAS,CAAC,CAAC,EAAEH,IAAI,CAACC,MAAM,CAAC;MACvC;IACF,CAAC,MAAM;MACLD,IAAI,GAAG,GAAG;IACZ;IAEA,IAAI,CAACA,IAAI,GAAGA,IAAI;EAClB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIK,GAAGA,CAAA,EAAG;IACR,OAAO,IAAI,CAACL,IAAI,KAAK,GAAG,GAAG,IAAI,GAAG,IAAI,CAACA,IAAI,CAACG,SAAS,CAAC,IAAI,CAACH,IAAI,CAACM,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;EACvF;AACF;AAACC,OAAA,CAAAV,aAAA,GAAAA,aAAA"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.deepGet = deepGet;
|
|
7
|
-
exports.deepSet = deepSet;
|
|
8
|
-
var _validate = require("./validate");
|
|
9
|
-
/*
|
|
10
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
11
|
-
*
|
|
12
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
-
* you may not use this library except in compliance with the License.
|
|
14
|
-
* You may obtain a copy of the License at
|
|
15
|
-
*
|
|
16
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
-
*
|
|
18
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
-
* See the License for the specific language governing permissions and
|
|
22
|
-
* limitations under the License.
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Deep get a value from an object.
|
|
28
|
-
* @website https://github.com/Salakar/deeps
|
|
29
|
-
* @param object
|
|
30
|
-
* @param path
|
|
31
|
-
* @param joiner
|
|
32
|
-
* @returns {*}
|
|
33
|
-
*/
|
|
34
|
-
function deepGet(object, path) {
|
|
35
|
-
let joiner = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '/';
|
|
36
|
-
if (!(0, _validate.isObject)(object) && !Array.isArray(object)) {
|
|
37
|
-
return undefined;
|
|
38
|
-
}
|
|
39
|
-
const keys = path.split(joiner);
|
|
40
|
-
let i = 0;
|
|
41
|
-
let value;
|
|
42
|
-
const len = keys.length;
|
|
43
|
-
while (i < len) {
|
|
44
|
-
const key = keys[i++];
|
|
45
|
-
if (!object || !Object.hasOwnProperty.call(object, key)) {
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
value = object[key];
|
|
49
|
-
}
|
|
50
|
-
return value;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Deep set a value
|
|
55
|
-
* @param object
|
|
56
|
-
* @param path
|
|
57
|
-
* @param value
|
|
58
|
-
* @param initPaths
|
|
59
|
-
* @param joiner
|
|
60
|
-
*/
|
|
61
|
-
function deepSet(object, path, value) {
|
|
62
|
-
let initPaths = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
63
|
-
let joiner = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '.';
|
|
64
|
-
if (!(0, _validate.isObject)(object)) {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
const keys = path.split(joiner);
|
|
68
|
-
let i = 0;
|
|
69
|
-
let _object = object;
|
|
70
|
-
const len = keys.length - 1;
|
|
71
|
-
while (i < len) {
|
|
72
|
-
const key = keys[i++];
|
|
73
|
-
if (initPaths && !Object.hasOwnProperty.call(object, key)) {
|
|
74
|
-
_object[key] = {};
|
|
75
|
-
}
|
|
76
|
-
_object = _object[key];
|
|
77
|
-
}
|
|
78
|
-
if ((0, _validate.isObject)(_object) || (0, _validate.isArray)(_object) && !Number.isNaN(keys[i])) {
|
|
79
|
-
_object[keys[i]] = value;
|
|
80
|
-
} else {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=deeps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_validate","require","deepGet","object","path","joiner","arguments","length","undefined","isObject","Array","isArray","keys","split","i","value","len","key","Object","hasOwnProperty","call","deepSet","initPaths","_object","Number","isNaN"],"sourceRoot":"../../../src","sources":["common/deeps.ts"],"mappings":";;;;;;;AAiBA,IAAAA,SAAA,GAAAC,OAAA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,OAAOA,CAACC,MAA+B,EAAEC,IAAY,EAAgB;EAAA,IAAdC,MAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,GAAG;EACjF,IAAI,CAAC,IAAAG,kBAAQ,EAACN,MAAM,CAAC,IAAI,CAACO,KAAK,CAACC,OAAO,CAACR,MAAM,CAAC,EAAE;IAC/C,OAAOK,SAAS;EAClB;EACA,MAAMI,IAAI,GAAGR,IAAI,CAACS,KAAK,CAACR,MAAM,CAAC;EAE/B,IAAIS,CAAC,GAAG,CAAC;EACT,IAAIC,KAAK;EACT,MAAMC,GAAG,GAAGJ,IAAI,CAACL,MAAM;EAEvB,OAAOO,CAAC,GAAGE,GAAG,EAAE;IACd,MAAMC,GAAG,GAAGL,IAAI,CAACE,CAAC,EAAE,CAAC;IACrB,IAAI,CAACX,MAAM,IAAI,CAACe,MAAM,CAACC,cAAc,CAACC,IAAI,CAACjB,MAAM,EAAEc,GAAG,CAAC,EAAE;MACvD,OAAOT,SAAS;IAClB;IACAO,KAAK,GAAGZ,MAAM,CAACc,GAAG,CAAC;EACrB;EAEA,OAAOF,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASM,OAAOA,CACrBlB,MAA+B,EAC/BC,IAAY,EACZW,KAAc,EAGd;EAAA,IAFAO,SAAS,GAAAhB,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAAA,IAChBD,MAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,GAAG;EAEZ,IAAI,CAAC,IAAAG,kBAAQ,EAACN,MAAM,CAAC,EAAE;IACrB,OAAO,KAAK;EACd;EACA,MAAMS,IAAI,GAAGR,IAAI,CAACS,KAAK,CAACR,MAAM,CAAC;EAE/B,IAAIS,CAAC,GAAG,CAAC;EACT,IAAIS,OAAO,GAAGpB,MAAM;EACpB,MAAMa,GAAG,GAAGJ,IAAI,CAACL,MAAM,GAAG,CAAC;EAE3B,OAAOO,CAAC,GAAGE,GAAG,EAAE;IACd,MAAMC,GAAG,GAAGL,IAAI,CAACE,CAAC,EAAE,CAAC;IACrB,IAAIQ,SAAS,IAAI,CAACJ,MAAM,CAACC,cAAc,CAACC,IAAI,CAACjB,MAAM,EAAEc,GAAG,CAAC,EAAE;MACzDM,OAAO,CAACN,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB;IACAM,OAAO,GAAGA,OAAO,CAACN,GAAG,CAA4B;EACnD;EAEA,IAAI,IAAAR,kBAAQ,EAACc,OAAO,CAAC,IAAK,IAAAZ,iBAAO,EAACY,OAAO,CAAC,IAAI,CAACC,MAAM,CAACC,KAAK,CAACb,IAAI,CAACE,CAAC,CAAC,CAAE,EAAE;IACrES,OAAO,CAACX,IAAI,CAACE,CAAC,CAAC,CAAC,GAAGC,KAAK;EAC1B,CAAC,MAAM;IACL,OAAO,KAAK;EACd;EAEA,OAAO,IAAI;AACb"}
|