Skip to content

Commit 58de833

Browse files
SK-2050: fix types issue in the build
1 parent 155c908 commit 58de833

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
"description": "Skyflow React Native SDK",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",
7-
"types": "lib/typescript/index.d.ts",
7+
"types": "lib/typescript/src/index.d.ts",
8+
"exports": {
9+
".": {
10+
"types": "./lib/typescript/src/index.d.ts",
11+
"import": "./lib/module/index.js",
12+
"require": "./lib/commonjs/index.js"
13+
}
14+
},
815
"react-native": "src/index",
916
"source": "src/index",
1017
"files": [
@@ -29,7 +36,7 @@
2936
"prepare": "bob build",
3037
"example": "yarn --cwd example",
3138
"bootstrap": "yarn example && yarn && yarn example pods",
32-
"build": "bob build"
39+
"build": "bob build && cp -r assets lib/ && cp package.json lib/"
3340
},
3441
"keywords": [
3542
"react-native",

src/components/RevealElement/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import SKYFLOW_ERROR_CODE from "../../utils/skyflow-error-code";
1010
import { formatInputFieldValue } from "../../utils/helpers";
1111
import { DEFAULT_INPUT_FIELD_TRANSLATION } from "../../core/constants";
1212

13-
const RevealElement = forwardRef<SkyflowRevealElementRef, RevealElementProps>((props, ref) => {
13+
const RevealElement = forwardRef<SkyflowRevealElementRef | null, RevealElementProps>((props, ref) => {
1414
const { container, label, format, translation, ...rest } = props;
1515

1616
const [element, setElement] = React.useState<RevealSkyflowElement | undefined>(undefined);

src/core-utils/collect/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import _ from 'lodash';
77
import Skyflow from '../../core/Skyflow';
88
import SkyflowError from '../../utils/skyflow-error';
99
import SKYFLOW_ERROR_CODE from '../../utils/skyflow-error-code';
10-
import { ElementType, IInsertRecord, IInsertResponse } from '../../../src/utils/constants';
10+
import { ElementType, IInsertRecord, IInsertResponse } from '../../utils/constants';
1111
import omit from 'lodash/omit';
1212
const set = require('set-value');
1313

src/utils/constants/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import type CollectContainer from '../../core/CollectContainer';
55
import RevealContainer from '../../core/RevealContainer';
6-
import { CardType } from '../../../src/core/constants';
6+
import { CardType } from '../../core/constants';
77

88
export interface IConfig {
99
vaultID: string;
@@ -118,6 +118,7 @@ export interface RevealElementProps {
118118
errorTextStyles?: StylesBaseVariant;
119119
redaction?: RedactionType;
120120
testID?: string;
121+
id?: string;
121122
}
122123

123124
export enum MessageType {

0 commit comments

Comments
 (0)