@builder.io/sdk-react-native 1.1.1 → 1.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/lib/browser/commonjs/blocks/embed/component-info.js +1 -23
- package/lib/browser/commonjs/blocks/embed/component-info.js.map +1 -1
- package/lib/browser/commonjs/constants/sdk-version.js +1 -1
- package/lib/browser/module/blocks/embed/component-info.js +1 -23
- package/lib/browser/module/blocks/embed/component-info.js.map +1 -1
- package/lib/browser/module/constants/sdk-version.js +1 -1
- package/lib/browser/typescript/constants/sdk-version.d.ts +1 -1
- package/lib/edge/commonjs/blocks/embed/component-info.js +1 -23
- package/lib/edge/commonjs/blocks/embed/component-info.js.map +1 -1
- package/lib/edge/commonjs/constants/sdk-version.js +1 -1
- package/lib/edge/module/blocks/embed/component-info.js +1 -23
- package/lib/edge/module/blocks/embed/component-info.js.map +1 -1
- package/lib/edge/module/constants/sdk-version.js +1 -1
- package/lib/edge/typescript/constants/sdk-version.d.ts +1 -1
- package/lib/node/commonjs/blocks/embed/component-info.js +1 -23
- package/lib/node/commonjs/blocks/embed/component-info.js.map +1 -1
- package/lib/node/commonjs/constants/sdk-version.js +1 -1
- package/lib/node/module/blocks/embed/component-info.js +1 -23
- package/lib/node/module/blocks/embed/component-info.js.map +1 -1
- package/lib/node/module/constants/sdk-version.js +1 -1
- package/lib/node/typescript/constants/sdk-version.d.ts +1 -1
- package/package.json +1 -1
- package/src/blocks/embed/component-info.ts +1 -24
- package/src/constants/sdk-version.ts +1 -1
|
@@ -4,8 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.componentInfo = void 0;
|
|
7
|
-
// Provided by the web app as a local variable in onChange functions
|
|
8
|
-
|
|
9
7
|
const componentInfo = exports.componentInfo = {
|
|
10
8
|
shouldReceiveBuilderProps: {
|
|
11
9
|
builderBlock: false,
|
|
@@ -20,27 +18,7 @@ const componentInfo = exports.componentInfo = {
|
|
|
20
18
|
type: 'url',
|
|
21
19
|
required: true,
|
|
22
20
|
defaultValue: '',
|
|
23
|
-
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
24
|
-
onChange: options => {
|
|
25
|
-
const url = options.get('url');
|
|
26
|
-
if (url) {
|
|
27
|
-
options.set('content', 'Loading...');
|
|
28
|
-
const apiKey = _iframelyApiKey;
|
|
29
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then(res => res.json()).then(data => {
|
|
30
|
-
if (options.get('url') === url) {
|
|
31
|
-
if (data.html) {
|
|
32
|
-
options.set('content', data.html);
|
|
33
|
-
} else {
|
|
34
|
-
options.set('content', 'Invalid url, please try another');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}).catch(_err => {
|
|
38
|
-
options.set('content', 'There was an error embedding this URL, please try again or another URL');
|
|
39
|
-
});
|
|
40
|
-
} else {
|
|
41
|
-
options.delete('content');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
21
|
+
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
44
22
|
}, {
|
|
45
23
|
name: 'content',
|
|
46
24
|
type: 'html',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["componentInfo","exports","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","
|
|
1
|
+
{"version":3,"names":["componentInfo","exports","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","hideFromUI"],"sourceRoot":"../../../../../src","sources":["blocks/embed/component-info.ts"],"mappings":";;;;;;AACO,MAAMA,aAA4B,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC1CE,yBAAyB,EAAE;IACzBC,YAAY,EAAE,KAAK;IACnBC,cAAc,EAAE,KAAK;IACrBC,iBAAiB,EAAE,KAAK;IACxBC,oBAAoB,EAAE;EACxB,CAAC;EACDC,IAAI,EAAE,OAAO;EACbC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE,CAAC;IACPF,IAAI,EAAE,KAAK;IACXG,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE,IAAI;IACdC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;EACd,CAAC,EAAE;IACDN,IAAI,EAAE,SAAS;IACfG,IAAI,EAAE,MAAM;IACZE,YAAY,EAAE,2EAA2E;IACzFE,UAAU,EAAE;EACd,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// Provided by the web app as a local variable in onChange functions
|
|
2
|
-
|
|
3
1
|
export const componentInfo = {
|
|
4
2
|
shouldReceiveBuilderProps: {
|
|
5
3
|
builderBlock: false,
|
|
@@ -14,27 +12,7 @@ export const componentInfo = {
|
|
|
14
12
|
type: 'url',
|
|
15
13
|
required: true,
|
|
16
14
|
defaultValue: '',
|
|
17
|
-
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
18
|
-
onChange: options => {
|
|
19
|
-
const url = options.get('url');
|
|
20
|
-
if (url) {
|
|
21
|
-
options.set('content', 'Loading...');
|
|
22
|
-
const apiKey = _iframelyApiKey;
|
|
23
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then(res => res.json()).then(data => {
|
|
24
|
-
if (options.get('url') === url) {
|
|
25
|
-
if (data.html) {
|
|
26
|
-
options.set('content', data.html);
|
|
27
|
-
} else {
|
|
28
|
-
options.set('content', 'Invalid url, please try another');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}).catch(_err => {
|
|
32
|
-
options.set('content', 'There was an error embedding this URL, please try again or another URL');
|
|
33
|
-
});
|
|
34
|
-
} else {
|
|
35
|
-
options.delete('content');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
15
|
+
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
38
16
|
}, {
|
|
39
17
|
name: 'content',
|
|
40
18
|
type: 'html',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["componentInfo","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","
|
|
1
|
+
{"version":3,"names":["componentInfo","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","hideFromUI"],"sourceRoot":"../../../../../src","sources":["blocks/embed/component-info.ts"],"mappings":"AACA,OAAO,MAAMA,aAA4B,GAAG;EAC1CC,yBAAyB,EAAE;IACzBC,YAAY,EAAE,KAAK;IACnBC,cAAc,EAAE,KAAK;IACrBC,iBAAiB,EAAE,KAAK;IACxBC,oBAAoB,EAAE;EACxB,CAAC;EACDC,IAAI,EAAE,OAAO;EACbC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE,CAAC;IACPF,IAAI,EAAE,KAAK;IACXG,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE,IAAI;IACdC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;EACd,CAAC,EAAE;IACDN,IAAI,EAAE,SAAS;IACfG,IAAI,EAAE,MAAM;IACZE,YAAY,EAAE,2EAA2E;IACzFE,UAAU,EAAE;EACd,CAAC;AACH,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.1.
|
|
1
|
+
export const SDK_VERSION = "1.1.2";
|
|
2
2
|
//# sourceMappingURL=sdk-version.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.1.
|
|
1
|
+
export declare const SDK_VERSION = "1.1.2";
|
|
2
2
|
//# sourceMappingURL=sdk-version.d.ts.map
|
|
@@ -4,8 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.componentInfo = void 0;
|
|
7
|
-
// Provided by the web app as a local variable in onChange functions
|
|
8
|
-
|
|
9
7
|
const componentInfo = exports.componentInfo = {
|
|
10
8
|
shouldReceiveBuilderProps: {
|
|
11
9
|
builderBlock: false,
|
|
@@ -20,27 +18,7 @@ const componentInfo = exports.componentInfo = {
|
|
|
20
18
|
type: 'url',
|
|
21
19
|
required: true,
|
|
22
20
|
defaultValue: '',
|
|
23
|
-
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
24
|
-
onChange: options => {
|
|
25
|
-
const url = options.get('url');
|
|
26
|
-
if (url) {
|
|
27
|
-
options.set('content', 'Loading...');
|
|
28
|
-
const apiKey = _iframelyApiKey;
|
|
29
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then(res => res.json()).then(data => {
|
|
30
|
-
if (options.get('url') === url) {
|
|
31
|
-
if (data.html) {
|
|
32
|
-
options.set('content', data.html);
|
|
33
|
-
} else {
|
|
34
|
-
options.set('content', 'Invalid url, please try another');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}).catch(_err => {
|
|
38
|
-
options.set('content', 'There was an error embedding this URL, please try again or another URL');
|
|
39
|
-
});
|
|
40
|
-
} else {
|
|
41
|
-
options.delete('content');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
21
|
+
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
44
22
|
}, {
|
|
45
23
|
name: 'content',
|
|
46
24
|
type: 'html',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["componentInfo","exports","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","
|
|
1
|
+
{"version":3,"names":["componentInfo","exports","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","hideFromUI"],"sourceRoot":"../../../../../src","sources":["blocks/embed/component-info.ts"],"mappings":";;;;;;AACO,MAAMA,aAA4B,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC1CE,yBAAyB,EAAE;IACzBC,YAAY,EAAE,KAAK;IACnBC,cAAc,EAAE,KAAK;IACrBC,iBAAiB,EAAE,KAAK;IACxBC,oBAAoB,EAAE;EACxB,CAAC;EACDC,IAAI,EAAE,OAAO;EACbC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE,CAAC;IACPF,IAAI,EAAE,KAAK;IACXG,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE,IAAI;IACdC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;EACd,CAAC,EAAE;IACDN,IAAI,EAAE,SAAS;IACfG,IAAI,EAAE,MAAM;IACZE,YAAY,EAAE,2EAA2E;IACzFE,UAAU,EAAE;EACd,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// Provided by the web app as a local variable in onChange functions
|
|
2
|
-
|
|
3
1
|
export const componentInfo = {
|
|
4
2
|
shouldReceiveBuilderProps: {
|
|
5
3
|
builderBlock: false,
|
|
@@ -14,27 +12,7 @@ export const componentInfo = {
|
|
|
14
12
|
type: 'url',
|
|
15
13
|
required: true,
|
|
16
14
|
defaultValue: '',
|
|
17
|
-
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
18
|
-
onChange: options => {
|
|
19
|
-
const url = options.get('url');
|
|
20
|
-
if (url) {
|
|
21
|
-
options.set('content', 'Loading...');
|
|
22
|
-
const apiKey = _iframelyApiKey;
|
|
23
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then(res => res.json()).then(data => {
|
|
24
|
-
if (options.get('url') === url) {
|
|
25
|
-
if (data.html) {
|
|
26
|
-
options.set('content', data.html);
|
|
27
|
-
} else {
|
|
28
|
-
options.set('content', 'Invalid url, please try another');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}).catch(_err => {
|
|
32
|
-
options.set('content', 'There was an error embedding this URL, please try again or another URL');
|
|
33
|
-
});
|
|
34
|
-
} else {
|
|
35
|
-
options.delete('content');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
15
|
+
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
38
16
|
}, {
|
|
39
17
|
name: 'content',
|
|
40
18
|
type: 'html',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["componentInfo","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","
|
|
1
|
+
{"version":3,"names":["componentInfo","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","hideFromUI"],"sourceRoot":"../../../../../src","sources":["blocks/embed/component-info.ts"],"mappings":"AACA,OAAO,MAAMA,aAA4B,GAAG;EAC1CC,yBAAyB,EAAE;IACzBC,YAAY,EAAE,KAAK;IACnBC,cAAc,EAAE,KAAK;IACrBC,iBAAiB,EAAE,KAAK;IACxBC,oBAAoB,EAAE;EACxB,CAAC;EACDC,IAAI,EAAE,OAAO;EACbC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE,CAAC;IACPF,IAAI,EAAE,KAAK;IACXG,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE,IAAI;IACdC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;EACd,CAAC,EAAE;IACDN,IAAI,EAAE,SAAS;IACfG,IAAI,EAAE,MAAM;IACZE,YAAY,EAAE,2EAA2E;IACzFE,UAAU,EAAE;EACd,CAAC;AACH,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.1.
|
|
1
|
+
export const SDK_VERSION = "1.1.2";
|
|
2
2
|
//# sourceMappingURL=sdk-version.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.1.
|
|
1
|
+
export declare const SDK_VERSION = "1.1.2";
|
|
2
2
|
//# sourceMappingURL=sdk-version.d.ts.map
|
|
@@ -4,8 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.componentInfo = void 0;
|
|
7
|
-
// Provided by the web app as a local variable in onChange functions
|
|
8
|
-
|
|
9
7
|
const componentInfo = exports.componentInfo = {
|
|
10
8
|
shouldReceiveBuilderProps: {
|
|
11
9
|
builderBlock: false,
|
|
@@ -20,27 +18,7 @@ const componentInfo = exports.componentInfo = {
|
|
|
20
18
|
type: 'url',
|
|
21
19
|
required: true,
|
|
22
20
|
defaultValue: '',
|
|
23
|
-
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
24
|
-
onChange: options => {
|
|
25
|
-
const url = options.get('url');
|
|
26
|
-
if (url) {
|
|
27
|
-
options.set('content', 'Loading...');
|
|
28
|
-
const apiKey = _iframelyApiKey;
|
|
29
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then(res => res.json()).then(data => {
|
|
30
|
-
if (options.get('url') === url) {
|
|
31
|
-
if (data.html) {
|
|
32
|
-
options.set('content', data.html);
|
|
33
|
-
} else {
|
|
34
|
-
options.set('content', 'Invalid url, please try another');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}).catch(_err => {
|
|
38
|
-
options.set('content', 'There was an error embedding this URL, please try again or another URL');
|
|
39
|
-
});
|
|
40
|
-
} else {
|
|
41
|
-
options.delete('content');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
21
|
+
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
44
22
|
}, {
|
|
45
23
|
name: 'content',
|
|
46
24
|
type: 'html',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["componentInfo","exports","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","
|
|
1
|
+
{"version":3,"names":["componentInfo","exports","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","hideFromUI"],"sourceRoot":"../../../../../src","sources":["blocks/embed/component-info.ts"],"mappings":";;;;;;AACO,MAAMA,aAA4B,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC1CE,yBAAyB,EAAE;IACzBC,YAAY,EAAE,KAAK;IACnBC,cAAc,EAAE,KAAK;IACrBC,iBAAiB,EAAE,KAAK;IACxBC,oBAAoB,EAAE;EACxB,CAAC;EACDC,IAAI,EAAE,OAAO;EACbC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE,CAAC;IACPF,IAAI,EAAE,KAAK;IACXG,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE,IAAI;IACdC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;EACd,CAAC,EAAE;IACDN,IAAI,EAAE,SAAS;IACfG,IAAI,EAAE,MAAM;IACZE,YAAY,EAAE,2EAA2E;IACzFE,UAAU,EAAE;EACd,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// Provided by the web app as a local variable in onChange functions
|
|
2
|
-
|
|
3
1
|
export const componentInfo = {
|
|
4
2
|
shouldReceiveBuilderProps: {
|
|
5
3
|
builderBlock: false,
|
|
@@ -14,27 +12,7 @@ export const componentInfo = {
|
|
|
14
12
|
type: 'url',
|
|
15
13
|
required: true,
|
|
16
14
|
defaultValue: '',
|
|
17
|
-
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
18
|
-
onChange: options => {
|
|
19
|
-
const url = options.get('url');
|
|
20
|
-
if (url) {
|
|
21
|
-
options.set('content', 'Loading...');
|
|
22
|
-
const apiKey = _iframelyApiKey;
|
|
23
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then(res => res.json()).then(data => {
|
|
24
|
-
if (options.get('url') === url) {
|
|
25
|
-
if (data.html) {
|
|
26
|
-
options.set('content', data.html);
|
|
27
|
-
} else {
|
|
28
|
-
options.set('content', 'Invalid url, please try another');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}).catch(_err => {
|
|
32
|
-
options.set('content', 'There was an error embedding this URL, please try again or another URL');
|
|
33
|
-
});
|
|
34
|
-
} else {
|
|
35
|
-
options.delete('content');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
15
|
+
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
38
16
|
}, {
|
|
39
17
|
name: 'content',
|
|
40
18
|
type: 'html',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["componentInfo","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","
|
|
1
|
+
{"version":3,"names":["componentInfo","shouldReceiveBuilderProps","builderBlock","builderContext","builderComponents","builderLinkComponent","name","static","inputs","type","required","defaultValue","helperText","hideFromUI"],"sourceRoot":"../../../../../src","sources":["blocks/embed/component-info.ts"],"mappings":"AACA,OAAO,MAAMA,aAA4B,GAAG;EAC1CC,yBAAyB,EAAE;IACzBC,YAAY,EAAE,KAAK;IACnBC,cAAc,EAAE,KAAK;IACrBC,iBAAiB,EAAE,KAAK;IACxBC,oBAAoB,EAAE;EACxB,CAAC;EACDC,IAAI,EAAE,OAAO;EACbC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE,CAAC;IACPF,IAAI,EAAE,KAAK;IACXG,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE,IAAI;IACdC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;EACd,CAAC,EAAE;IACDN,IAAI,EAAE,SAAS;IACfG,IAAI,EAAE,MAAM;IACZE,YAAY,EAAE,2EAA2E;IACzFE,UAAU,EAAE;EACd,CAAC;AACH,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.1.
|
|
1
|
+
export const SDK_VERSION = "1.1.2";
|
|
2
2
|
//# sourceMappingURL=sdk-version.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.1.
|
|
1
|
+
export declare const SDK_VERSION = "1.1.2";
|
|
2
2
|
//# sourceMappingURL=sdk-version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-react-native",
|
|
3
3
|
"description": "Builder.io SDK for React Native",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.2",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/react-native",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { ComponentInfo } from '../../types/components';
|
|
2
|
-
|
|
3
|
-
// Provided by the web app as a local variable in onChange functions
|
|
4
|
-
declare const _iframelyApiKey: string;
|
|
5
2
|
export const componentInfo: ComponentInfo = {
|
|
6
3
|
shouldReceiveBuilderProps: {
|
|
7
4
|
builderBlock: false,
|
|
@@ -16,27 +13,7 @@ export const componentInfo: ComponentInfo = {
|
|
|
16
13
|
type: 'url',
|
|
17
14
|
required: true,
|
|
18
15
|
defaultValue: '',
|
|
19
|
-
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
20
|
-
onChange: (options: Map<string, any>): void | Promise<void> => {
|
|
21
|
-
const url = options.get('url');
|
|
22
|
-
if (url) {
|
|
23
|
-
options.set('content', 'Loading...');
|
|
24
|
-
const apiKey = _iframelyApiKey;
|
|
25
|
-
return fetch(`https://iframe.ly/api/iframely?url=${url}&api_key=${apiKey}`).then(res => res.json()).then(data => {
|
|
26
|
-
if (options.get('url') === url) {
|
|
27
|
-
if (data.html) {
|
|
28
|
-
options.set('content', data.html);
|
|
29
|
-
} else {
|
|
30
|
-
options.set('content', 'Invalid url, please try another');
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}).catch(_err => {
|
|
34
|
-
options.set('content', 'There was an error embedding this URL, please try again or another URL');
|
|
35
|
-
});
|
|
36
|
-
} else {
|
|
37
|
-
options.delete('content');
|
|
38
|
-
}
|
|
39
|
-
}
|
|
16
|
+
helperText: 'e.g. enter a youtube url, google map, etc'
|
|
40
17
|
}, {
|
|
41
18
|
name: 'content',
|
|
42
19
|
type: 'html',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.1.
|
|
1
|
+
export const SDK_VERSION = "1.1.2"
|