@builder.io/sdk-react-native 1.1.0 → 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/browser/typescript/types/components.d.ts +10 -0
- package/lib/browser/typescript/types/components.d.ts.map +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/edge/typescript/types/components.d.ts +10 -0
- package/lib/edge/typescript/types/components.d.ts.map +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/lib/node/typescript/types/components.d.ts +10 -0
- package/lib/node/typescript/types/components.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blocks/embed/component-info.ts +1 -24
- package/src/constants/sdk-version.ts +1 -1
- package/src/types/components.ts +11 -0
|
@@ -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
|
|
@@ -105,6 +105,16 @@ export interface ComponentInfo {
|
|
|
105
105
|
*/
|
|
106
106
|
requiredPermissions?: Array<Permission>;
|
|
107
107
|
hidden?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* When overriding built-in components, if you don't want any special behavior that
|
|
110
|
+
* the original has, set this to `true` to skip the default behavior
|
|
111
|
+
*
|
|
112
|
+
* Default behaviors include special "virtual options", such as a custom
|
|
113
|
+
* aspect ratio editor for Images, or a special column editor for Columns
|
|
114
|
+
*
|
|
115
|
+
* Learn more about overriding built-in components here: https://www.builder.io/c/docs/custom-components-overriding
|
|
116
|
+
*/
|
|
117
|
+
override?: boolean;
|
|
108
118
|
/**
|
|
109
119
|
* Whether or not the component should receive SDK-related props.
|
|
110
120
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/types/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,OAAO,GAAG,KAAK,CAAC;IACpD,aAAa,CAAC,EAAE;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC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E7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,iBAAiB,CAAC,EAAE;QAClB,+FAA+F;QAC/F,OAAO,EAAE,MAAM,CAAC;QAChB,mEAAmE;QACnE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB;;;;;;;;;WASG;QACH,KAAK,CAAC,EAAE,GAAG,CAAC;KACb,CAAC;IAEF;;OAEG;IACH,cAAc,CAAC,EAAE;QACf,2GAA2G;QAC3G,OAAO,EAAE,MAAM,CAAC;QAChB,uFAAuF;QACvF,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;;;;;;;;WASG;QACH,KAAK,CAAC,EAAE,GAAG,CAAC;KACb,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAGxC,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,yBAAyB,CAAC,EAAE;QAC1B;;;;WAIG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QAEvB;;;;;;WAMG;QACH,cAAc,CAAC,EAAE,OAAO,CAAC;QAEzB;;;;WAIG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAE5B;;;;WAIG;QACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC,CAAC;CACH;AACD,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAA"}
|
|
@@ -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
|
|
@@ -105,6 +105,16 @@ export interface ComponentInfo {
|
|
|
105
105
|
*/
|
|
106
106
|
requiredPermissions?: Array<Permission>;
|
|
107
107
|
hidden?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* When overriding built-in components, if you don't want any special behavior that
|
|
110
|
+
* the original has, set this to `true` to skip the default behavior
|
|
111
|
+
*
|
|
112
|
+
* Default behaviors include special "virtual options", such as a custom
|
|
113
|
+
* aspect ratio editor for Images, or a special column editor for Columns
|
|
114
|
+
*
|
|
115
|
+
* Learn more about overriding built-in components here: https://www.builder.io/c/docs/custom-components-overriding
|
|
116
|
+
*/
|
|
117
|
+
override?: boolean;
|
|
108
118
|
/**
|
|
109
119
|
* Whether or not the component should receive SDK-related props.
|
|
110
120
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/types/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,OAAO,GAAG,KAAK,CAAC;IACpD,aAAa,CAAC,EAAE;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,KAAK,CA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OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,iBAAiB,CAAC,EAAE;QAClB,+FAA+F;QAC/F,OAAO,EAAE,MAAM,CAAC;QAChB,mEAAmE;QACnE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB;;;;;;;;;WASG;QACH,KAAK,CAAC,EAAE,GAAG,CAAC;KACb,CAAC;IAEF;;OAEG;IACH,cAAc,CAAC,EAAE;QACf,2GAA2G;QAC3G,OAAO,EAAE,MAAM,CAAC;QAChB,uFAAuF;QACvF,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;;;;;;;;WASG;QACH,KAAK,CAAC,EAAE,GAAG,CAAC;KACb,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAGxC,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,yBAAyB,CAAC,EAAE;QAC1B;;;;WAIG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QAEvB;;;;;;WAMG;QACH,cAAc,CAAC,EAAE,OAAO,CAAC;QAEzB;;;;WAIG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAE5B;;;;WAIG;QACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC,CAAC;CACH;AACD,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAA"}
|
|
@@ -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
|
|
@@ -105,6 +105,16 @@ export interface ComponentInfo {
|
|
|
105
105
|
*/
|
|
106
106
|
requiredPermissions?: Array<Permission>;
|
|
107
107
|
hidden?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* When overriding built-in components, if you don't want any special behavior that
|
|
110
|
+
* the original has, set this to `true` to skip the default behavior
|
|
111
|
+
*
|
|
112
|
+
* Default behaviors include special "virtual options", such as a custom
|
|
113
|
+
* aspect ratio editor for Images, or a special column editor for Columns
|
|
114
|
+
*
|
|
115
|
+
* Learn more about overriding built-in components here: https://www.builder.io/c/docs/custom-components-overriding
|
|
116
|
+
*/
|
|
117
|
+
override?: boolean;
|
|
108
118
|
/**
|
|
109
119
|
* Whether or not the component should receive SDK-related props.
|
|
110
120
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/types/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,OAAO,GAAG,KAAK,CAAC;IACpD,aAAa,CAAC,EAAE;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;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C,EAAE;QAClB,+FAA+F;QAC/F,OAAO,EAAE,MAAM,CAAC;QAChB,mEAAmE;QACnE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB;;;;;;;;;WASG;QACH,KAAK,CAAC,EAAE,GAAG,CAAC;KACb,CAAC;IAEF;;OAEG;IACH,cAAc,CAAC,EAAE;QACf,2GAA2G;QAC3G,OAAO,EAAE,MAAM,CAAC;QAChB,uFAAuF;QACvF,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;;;;;;;;WASG;QACH,KAAK,CAAC,EAAE,GAAG,CAAC;KACb,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAGxC,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,yBAAyB,CAAC,EAAE;QAC1B;;;;WAIG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QAEvB;;;;;;WAMG;QACH,cAAc,CAAC,EAAE,OAAO,CAAC;QAEzB;;;;WAIG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAE5B;;;;WAIG;QACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC,CAAC;CACH;AACD,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAA"}
|
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"
|
package/src/types/components.ts
CHANGED
|
@@ -116,6 +116,17 @@ export interface ComponentInfo {
|
|
|
116
116
|
// TO-DO: is this used?
|
|
117
117
|
hidden?: boolean;
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* When overriding built-in components, if you don't want any special behavior that
|
|
121
|
+
* the original has, set this to `true` to skip the default behavior
|
|
122
|
+
*
|
|
123
|
+
* Default behaviors include special "virtual options", such as a custom
|
|
124
|
+
* aspect ratio editor for Images, or a special column editor for Columns
|
|
125
|
+
*
|
|
126
|
+
* Learn more about overriding built-in components here: https://www.builder.io/c/docs/custom-components-overriding
|
|
127
|
+
*/
|
|
128
|
+
override?: boolean;
|
|
129
|
+
|
|
119
130
|
/**
|
|
120
131
|
* Whether or not the component should receive SDK-related props.
|
|
121
132
|
*/
|