@qore-id/react-native-qoreid-sdk 1.0.7 → 1.0.8
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/index.js +22 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +23 -2
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +2 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +23 -2
package/lib/commonjs/index.js
CHANGED
|
@@ -8,6 +8,7 @@ var _exportNames = {
|
|
|
8
8
|
};
|
|
9
9
|
exports.QoreIdButton = void 0;
|
|
10
10
|
var _reactNative = require("react-native");
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
12
|
var _utils = require("./utils");
|
|
12
13
|
Object.keys(_utils).forEach(function (key) {
|
|
13
14
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -20,6 +21,26 @@ Object.keys(_utils).forEach(function (key) {
|
|
|
20
21
|
}
|
|
21
22
|
});
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
//Safe fail implementation for iOS
|
|
26
|
+
const QoreIdButtonIOS = initialData => {
|
|
27
|
+
console.info('No implementation for iOS');
|
|
28
|
+
return initialData.render && initialData.render({
|
|
29
|
+
onPress: () => {}
|
|
30
|
+
}) || /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
31
|
+
style: {
|
|
32
|
+
flex: 1,
|
|
33
|
+
justifyContent: 'center',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
paddingHorizontal: 10,
|
|
36
|
+
paddingVertical: 5
|
|
37
|
+
}
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
39
|
+
style: {
|
|
40
|
+
color: 'blue'
|
|
41
|
+
}
|
|
42
|
+
}, "Start QoreID"));
|
|
43
|
+
};
|
|
44
|
+
const QoreIdButton = _reactNative.Platform.OS === 'android' ? require('./qoreIdButton.android').QoreIdButton : QoreIdButtonIOS; // (require('./qoreIdButton.ios').QoreIdButton as React.FC<IQoreIdButton>);
|
|
24
45
|
exports.QoreIdButton = QoreIdButton;
|
|
25
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","QoreIdButton","Platform","OS"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","obj","__esModule","default","QoreIdButtonIOS","initialData","console","info","render","onPress","createElement","TouchableOpacity","style","flex","justifyContent","alignItems","paddingHorizontal","paddingVertical","Text","color","QoreIdButton","Platform","OS"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AA4BA,IAAAG,MAAA,GAAAH,OAAA;AAAAI,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAAwB,SAAAL,uBAAAc,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AA1BxB;AACA,MAAMG,eAAwC,GAAIC,WAAW,IAAK;EAChEC,OAAO,CAACC,IAAI,CAAC,2BAA2B,CAAC;EACzC,OACGF,WAAW,CAACG,MAAM,IAAIH,WAAW,CAACG,MAAM,CAAC;IAAEC,OAAO,EAAEA,CAAA,KAAM,CAAC;EAAE,CAAC,CAAC,iBAC9DvB,MAAA,CAAAiB,OAAA,CAAAO,aAAA,CAAC1B,YAAA,CAAA2B,gBAAgB;IACfC,KAAK,EAAE;MACLC,IAAI,EAAE,CAAC;MACPC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAE;IACnB;EAAE,gBAEF/B,MAAA,CAAAiB,OAAA,CAAAO,aAAA,CAAC1B,YAAA,CAAAkC,IAAI;IAACN,KAAK,EAAE;MAAEO,KAAK,EAAE;IAAO;EAAE,GAAC,cAAY,CAAO,CAEtD;AAEL,CAAC;AAEM,MAAMC,YAAY,GACvBC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACpBrC,OAAO,CAAC,wBAAwB,CAAC,CAC/BmC,YAAY,GACdhB,eAA2C,CAAC,CAAC;AAAAP,OAAA,CAAAuB,YAAA,GAAAA,YAAA"}
|
package/lib/module/index.js
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
|
-
import { Platform } from 'react-native';
|
|
2
|
-
|
|
1
|
+
import { Platform, Text, TouchableOpacity } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
//Safe fail implementation for iOS
|
|
5
|
+
const QoreIdButtonIOS = initialData => {
|
|
6
|
+
console.info('No implementation for iOS');
|
|
7
|
+
return initialData.render && initialData.render({
|
|
8
|
+
onPress: () => {}
|
|
9
|
+
}) || /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
10
|
+
style: {
|
|
11
|
+
flex: 1,
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
paddingHorizontal: 10,
|
|
15
|
+
paddingVertical: 5
|
|
16
|
+
}
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
18
|
+
style: {
|
|
19
|
+
color: 'blue'
|
|
20
|
+
}
|
|
21
|
+
}, "Start QoreID"));
|
|
22
|
+
};
|
|
23
|
+
export const QoreIdButton = Platform.OS === 'android' ? require('./qoreIdButton.android').QoreIdButton : QoreIdButtonIOS; // (require('./qoreIdButton.ios').QoreIdButton as React.FC<IQoreIdButton>);
|
|
3
24
|
|
|
4
25
|
export * from './utils';
|
|
5
26
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","QoreIdButton","OS","require"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["Platform","Text","TouchableOpacity","React","QoreIdButtonIOS","initialData","console","info","render","onPress","createElement","style","flex","justifyContent","alignItems","paddingHorizontal","paddingVertical","color","QoreIdButton","OS","require"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAE/D,OAAOC,KAAK,MAAM,OAAO;;AAEzB;AACA,MAAMC,eAAwC,GAAIC,WAAW,IAAK;EAChEC,OAAO,CAACC,IAAI,CAAC,2BAA2B,CAAC;EACzC,OACGF,WAAW,CAACG,MAAM,IAAIH,WAAW,CAACG,MAAM,CAAC;IAAEC,OAAO,EAAEA,CAAA,KAAM,CAAC;EAAE,CAAC,CAAC,iBAC9DN,KAAA,CAAAO,aAAA,CAACR,gBAAgB;IACfS,KAAK,EAAE;MACLC,IAAI,EAAE,CAAC;MACPC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,iBAAiB,EAAE,EAAE;MACrBC,eAAe,EAAE;IACnB;EAAE,gBAEFb,KAAA,CAAAO,aAAA,CAACT,IAAI;IAACU,KAAK,EAAE;MAAEM,KAAK,EAAE;IAAO;EAAE,GAAC,cAAY,CAAO,CAEtD;AAEL,CAAC;AAED,OAAO,MAAMC,YAAY,GACvBlB,QAAQ,CAACmB,EAAE,KAAK,SAAS,GACpBC,OAAO,CAAC,wBAAwB,CAAC,CAC/BF,YAAY,GACdd,eAA2C,CAAC,CAAC;;AAEpD,cAAc,SAAS"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { IQoreIdButton } from './types';
|
|
3
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const QoreIdButton: React.FC<IQoreIdButton<JSX.Element>>;
|
|
4
4
|
export * from './utils';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B,eAAO,MAAM,YAAY,sCAIyB,CAAC;AAEnD,cAAc,SAAS,CAAC"}
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
|
-
import { Platform } from 'react-native';
|
|
1
|
+
import { Platform, Text, TouchableOpacity } from 'react-native';
|
|
2
2
|
import type { IQoreIdButton } from './types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
//Safe fail implementation for iOS
|
|
6
|
+
const QoreIdButtonIOS: React.FC<IQoreIdButton> = (initialData) => {
|
|
7
|
+
console.info('No implementation for iOS');
|
|
8
|
+
return (
|
|
9
|
+
(initialData.render && initialData.render({ onPress: () => {} })) || (
|
|
10
|
+
<TouchableOpacity
|
|
11
|
+
style={{
|
|
12
|
+
flex: 1,
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
paddingHorizontal: 10,
|
|
16
|
+
paddingVertical: 5,
|
|
17
|
+
}}
|
|
18
|
+
>
|
|
19
|
+
<Text style={{ color: 'blue' }}>Start QoreID</Text>
|
|
20
|
+
</TouchableOpacity>
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
};
|
|
3
24
|
|
|
4
25
|
export const QoreIdButton =
|
|
5
26
|
Platform.OS === 'android'
|
|
6
27
|
? (require('./qoreIdButton.android')
|
|
7
28
|
.QoreIdButton as React.FC<IQoreIdButton>)
|
|
8
|
-
: (
|
|
29
|
+
: (QoreIdButtonIOS as React.FC<IQoreIdButton>); // (require('./qoreIdButton.ios').QoreIdButton as React.FC<IQoreIdButton>);
|
|
9
30
|
|
|
10
31
|
export * from './utils';
|