@builder.io/sdk-vue 0.0.1-43 → 0.0.1-47
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/nuxt2/src/blocks/button.vue +1 -1
- package/nuxt2/src/blocks/columns.vue +5 -5
- package/nuxt2/src/blocks/custom-code.vue +1 -1
- package/nuxt2/src/blocks/embed.vue +1 -1
- package/nuxt2/src/blocks/form.vue +3 -3
- package/nuxt2/src/blocks/fragment.vue +1 -1
- package/nuxt2/src/blocks/image.vue +9 -9
- package/nuxt2/src/blocks/img.vue +1 -1
- package/nuxt2/src/blocks/input.vue +1 -1
- package/nuxt2/src/blocks/raw-text.vue +1 -1
- package/nuxt2/src/blocks/section.vue +1 -1
- package/nuxt2/src/blocks/select.vue +1 -1
- package/nuxt2/src/blocks/submit-button.vue +1 -1
- package/nuxt2/src/blocks/text.vue +1 -1
- package/nuxt2/src/blocks/textarea.vue +1 -1
- package/nuxt2/src/blocks/video.vue +1 -1
- package/nuxt2/src/components/render-block.vue +5 -2
- package/nuxt2/src/components/render-blocks.vue +2 -2
- package/nuxt2/src/functions/evaluate.js +1 -1
- package/nuxt2/src/functions/event-handler-name.js +12 -0
- package/nuxt2/src/functions/get-block-actions.js +5 -4
- package/nuxt2/src/functions/get-processed-block.js +3 -1
- package/nuxt2/src/functions/transform-block.js +14 -0
- package/package.json +5 -4
- package/vue2/src/functions/evaluate.js +1 -1
- package/vue2/src/functions/event-handler-name.js +12 -0
- package/vue2/src/functions/get-block-actions.js +5 -4
- package/vue2/src/functions/get-processed-block.js +3 -1
- package/vue2/src/functions/transform-block.js +14 -0
- package/vue3/src/functions/evaluate.js +1 -1
- package/vue3/src/functions/event-handler-name.js +12 -0
- package/vue3/src/functions/get-block-actions.js +5 -4
- package/vue3/src/functions/get-processed-block.js +3 -1
- package/vue3/src/functions/transform-block.js +14 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<span v-bind="attributes" v-else="">{{ text }}</span>
|
|
12
12
|
</template>
|
|
13
13
|
<script>
|
|
14
|
-
import { registerComponent } from '
|
|
14
|
+
import { registerComponent } from '../functions/register-component';
|
|
15
15
|
|
|
16
16
|
export default registerComponent(
|
|
17
17
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="builder-columns div-
|
|
2
|
+
<div class="builder-columns div-38o6qlysr38">
|
|
3
3
|
<div
|
|
4
|
-
class="builder-column div-
|
|
4
|
+
class="builder-column div-38o6qlysr38-2"
|
|
5
5
|
v-for="(column, index) in columns"
|
|
6
6
|
:style="{
|
|
7
7
|
width: getColumnCssWidth(index),
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<script>
|
|
17
17
|
import RenderBlocks from '../components/render-blocks';
|
|
18
18
|
|
|
19
|
-
import { registerComponent } from '
|
|
19
|
+
import { registerComponent } from '../functions/register-component';
|
|
20
20
|
|
|
21
21
|
export default registerComponent(
|
|
22
22
|
{
|
|
@@ -262,12 +262,12 @@ export default registerComponent(
|
|
|
262
262
|
);
|
|
263
263
|
</script>
|
|
264
264
|
<style scoped>
|
|
265
|
-
.div-
|
|
265
|
+
.div-38o6qlysr38 {
|
|
266
266
|
display: flex;
|
|
267
267
|
align-items: stretch;
|
|
268
268
|
line-height: normal;
|
|
269
269
|
}
|
|
270
|
-
.div-
|
|
270
|
+
.div-38o6qlysr38-2 {
|
|
271
271
|
flex-grow: 1;
|
|
272
272
|
}
|
|
273
273
|
</style>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
></builder-blocks>
|
|
28
28
|
|
|
29
29
|
<pre
|
|
30
|
-
class="builder-form-error-text pre-
|
|
30
|
+
class="builder-form-error-text pre-2o44605xnuc"
|
|
31
31
|
v-if="submissionState === 'error' && responseData"
|
|
32
32
|
>
|
|
33
33
|
{{ JSON.stringify(responseData, null, 2) }}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<script>
|
|
45
45
|
import RenderBlock from '../components/render-block';
|
|
46
46
|
|
|
47
|
-
import { registerComponent } from '
|
|
47
|
+
import { registerComponent } from '../functions/register-component';
|
|
48
48
|
|
|
49
49
|
export default registerComponent(
|
|
50
50
|
{
|
|
@@ -515,7 +515,7 @@ export default registerComponent(
|
|
|
515
515
|
);
|
|
516
516
|
</script>
|
|
517
517
|
<style scoped>
|
|
518
|
-
.pre-
|
|
518
|
+
.pre-2o44605xnuc {
|
|
519
519
|
padding: 10px;
|
|
520
520
|
color: red;
|
|
521
521
|
text-align: center;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="div-
|
|
2
|
+
<div class="div-13adfbgjm89">
|
|
3
3
|
<picture>
|
|
4
4
|
<img
|
|
5
5
|
loading="lazy"
|
|
6
|
-
class="img-
|
|
6
|
+
class="img-13adfbgjm89"
|
|
7
7
|
:alt="altText"
|
|
8
8
|
:aria-role="altText ? 'presentation' : undefined"
|
|
9
9
|
:style="{
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</picture>
|
|
24
24
|
|
|
25
25
|
<div
|
|
26
|
-
class="builder-image-sizer div-
|
|
26
|
+
class="builder-image-sizer div-13adfbgjm89-2"
|
|
27
27
|
v-if="
|
|
28
28
|
aspectRatio &&
|
|
29
29
|
!(
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
|
|
43
43
|
<slot></slot>
|
|
44
44
|
|
|
45
|
-
<div class="div-
|
|
45
|
+
<div class="div-13adfbgjm89-3" v-if="!fitContent">
|
|
46
46
|
<slot></slot>
|
|
47
47
|
</div>
|
|
48
48
|
</div>
|
|
49
49
|
</template>
|
|
50
50
|
<script>
|
|
51
|
-
import { registerComponent } from '
|
|
51
|
+
import { registerComponent } from '../functions/register-component';
|
|
52
52
|
|
|
53
53
|
export default registerComponent(
|
|
54
54
|
{
|
|
@@ -167,10 +167,10 @@ export default registerComponent(
|
|
|
167
167
|
);
|
|
168
168
|
</script>
|
|
169
169
|
<style scoped>
|
|
170
|
-
.div-
|
|
170
|
+
.div-13adfbgjm89 {
|
|
171
171
|
position: relative;
|
|
172
172
|
}
|
|
173
|
-
.img-
|
|
173
|
+
.img-13adfbgjm89 {
|
|
174
174
|
opacity: 1;
|
|
175
175
|
transition: opacity 0.2s ease-in-out;
|
|
176
176
|
position: absolute;
|
|
@@ -179,12 +179,12 @@ export default registerComponent(
|
|
|
179
179
|
top: 0px;
|
|
180
180
|
left: 0px;
|
|
181
181
|
}
|
|
182
|
-
.div-
|
|
182
|
+
.div-13adfbgjm89-2 {
|
|
183
183
|
width: 100%;
|
|
184
184
|
pointer-events: none;
|
|
185
185
|
font-size: 0;
|
|
186
186
|
}
|
|
187
|
-
.div-
|
|
187
|
+
.div-13adfbgjm89-3 {
|
|
188
188
|
display: flex;
|
|
189
189
|
flex-direction: column;
|
|
190
190
|
align-items: stretch;
|
package/nuxt2/src/blocks/img.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
|
-
v-bind="
|
|
3
|
+
v-bind="propertiesAndActions"
|
|
4
4
|
v-if="!(componentInfo && componentInfo.noWrap)"
|
|
5
5
|
:style="css"
|
|
6
6
|
:is="tagName"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<component
|
|
30
30
|
v-bind="componentInfo && componentInfo.options"
|
|
31
31
|
v-else=""
|
|
32
|
-
:attributes="
|
|
32
|
+
:attributes="propertiesAndActions"
|
|
33
33
|
:builderBlock="useBlock"
|
|
34
34
|
:style="css"
|
|
35
35
|
:children="useBlock.children"
|
|
@@ -98,6 +98,9 @@ export default {
|
|
|
98
98
|
context: this.builderContext.context,
|
|
99
99
|
});
|
|
100
100
|
},
|
|
101
|
+
propertiesAndActions() {
|
|
102
|
+
return { ...this.properties, ...this.actions };
|
|
103
|
+
},
|
|
101
104
|
actions() {
|
|
102
105
|
return getBlockActions({
|
|
103
106
|
block: this.useBlock,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="div-
|
|
3
|
+
class="div-1ez1s0gxybh"
|
|
4
4
|
:builder-path="path"
|
|
5
5
|
:builder-parent-id="parent"
|
|
6
6
|
@click="onClick"
|
|
@@ -72,7 +72,7 @@ export default {
|
|
|
72
72
|
};
|
|
73
73
|
</script>
|
|
74
74
|
<style scoped>
|
|
75
|
-
.div-
|
|
75
|
+
.div-1ez1s0gxybh {
|
|
76
76
|
display: flex;
|
|
77
77
|
flex-direction: column;
|
|
78
78
|
align-items: stretch;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __markAsModule = (target) =>
|
|
3
|
+
__defProp(target, '__esModule', { value: true });
|
|
4
|
+
var __export = (target, all) => {
|
|
5
|
+
__markAsModule(target);
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
__export(exports, {
|
|
10
|
+
getEventHandlerName: () => getEventHandlerName,
|
|
11
|
+
});
|
|
12
|
+
const getEventHandlerName = (key) => `v-on:${key.toLowerCase()}`;
|
|
@@ -44,15 +44,16 @@ __export(exports, {
|
|
|
44
44
|
getBlockActions: () => getBlockActions,
|
|
45
45
|
});
|
|
46
46
|
var import_evaluate = __toModule(require('./evaluate'));
|
|
47
|
-
|
|
48
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
49
|
-
}
|
|
47
|
+
var import_event_handler_name = __toModule(require('./event-handler-name'));
|
|
50
48
|
function getBlockActions(options) {
|
|
51
49
|
const obj = {};
|
|
52
50
|
if (options.block.actions) {
|
|
53
51
|
for (const key in options.block.actions) {
|
|
52
|
+
if (!options.block.actions.hasOwnProperty(key)) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
54
55
|
const value = options.block.actions[key];
|
|
55
|
-
obj[
|
|
56
|
+
obj[(0, import_event_handler_name.getEventHandlerName)(key)] = (event) =>
|
|
56
57
|
(0, import_evaluate.evaluate)({
|
|
57
58
|
code: value,
|
|
58
59
|
context: options.context,
|
|
@@ -68,8 +68,10 @@ __export(exports, {
|
|
|
68
68
|
});
|
|
69
69
|
var import_evaluate = __toModule(require('./evaluate'));
|
|
70
70
|
var import_set = __toModule(require('./set'));
|
|
71
|
+
var import_transform_block = __toModule(require('./transform-block'));
|
|
71
72
|
function getProcessedBlock(options) {
|
|
72
|
-
const {
|
|
73
|
+
const { state, context } = options;
|
|
74
|
+
const block = (0, import_transform_block.transformBlock)(options.block);
|
|
73
75
|
if (!block.bindings) {
|
|
74
76
|
return block;
|
|
75
77
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __markAsModule = (target) =>
|
|
3
|
+
__defProp(target, '__esModule', { value: true });
|
|
4
|
+
var __export = (target, all) => {
|
|
5
|
+
__markAsModule(target);
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
__export(exports, {
|
|
10
|
+
transformBlock: () => transformBlock,
|
|
11
|
+
});
|
|
12
|
+
function transformBlock(block) {
|
|
13
|
+
return block;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-vue",
|
|
3
3
|
"description": "Builder.io SDK for Vue",
|
|
4
|
-
"version": "0.0.1-
|
|
4
|
+
"version": "0.0.1-47",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"node-fetch": "^2.6.1"
|
|
7
7
|
},
|
|
8
8
|
"main": "./nuxt2/src/index.js",
|
|
9
9
|
"exports": {
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
10
|
+
"./nuxt": "./nuxt.js",
|
|
11
|
+
"./vue2": "./vue2/src/index.js",
|
|
12
|
+
"./nuxt2": "./nuxt2/src/index.js",
|
|
13
|
+
"./vue3": "./vue3/src/index.js"
|
|
13
14
|
},
|
|
14
15
|
"scripts": {
|
|
15
16
|
"release:dev": "npm version prerelease --no-git-tag-version && npm publish --tag dev --access public"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __markAsModule = (target) =>
|
|
3
|
+
__defProp(target, '__esModule', { value: true });
|
|
4
|
+
var __export = (target, all) => {
|
|
5
|
+
__markAsModule(target);
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
__export(exports, {
|
|
10
|
+
getEventHandlerName: () => getEventHandlerName,
|
|
11
|
+
});
|
|
12
|
+
const getEventHandlerName = (key) => `v-on:${key.toLowerCase()}`;
|
|
@@ -44,15 +44,16 @@ __export(exports, {
|
|
|
44
44
|
getBlockActions: () => getBlockActions,
|
|
45
45
|
});
|
|
46
46
|
var import_evaluate = __toModule(require('./evaluate'));
|
|
47
|
-
|
|
48
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
49
|
-
}
|
|
47
|
+
var import_event_handler_name = __toModule(require('./event-handler-name'));
|
|
50
48
|
function getBlockActions(options) {
|
|
51
49
|
const obj = {};
|
|
52
50
|
if (options.block.actions) {
|
|
53
51
|
for (const key in options.block.actions) {
|
|
52
|
+
if (!options.block.actions.hasOwnProperty(key)) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
54
55
|
const value = options.block.actions[key];
|
|
55
|
-
obj[
|
|
56
|
+
obj[(0, import_event_handler_name.getEventHandlerName)(key)] = (event) =>
|
|
56
57
|
(0, import_evaluate.evaluate)({
|
|
57
58
|
code: value,
|
|
58
59
|
context: options.context,
|
|
@@ -68,8 +68,10 @@ __export(exports, {
|
|
|
68
68
|
});
|
|
69
69
|
var import_evaluate = __toModule(require('./evaluate'));
|
|
70
70
|
var import_set = __toModule(require('./set'));
|
|
71
|
+
var import_transform_block = __toModule(require('./transform-block'));
|
|
71
72
|
function getProcessedBlock(options) {
|
|
72
|
-
const {
|
|
73
|
+
const { state, context } = options;
|
|
74
|
+
const block = (0, import_transform_block.transformBlock)(options.block);
|
|
73
75
|
if (!block.bindings) {
|
|
74
76
|
return block;
|
|
75
77
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __markAsModule = (target) =>
|
|
3
|
+
__defProp(target, '__esModule', { value: true });
|
|
4
|
+
var __export = (target, all) => {
|
|
5
|
+
__markAsModule(target);
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
__export(exports, {
|
|
10
|
+
transformBlock: () => transformBlock,
|
|
11
|
+
});
|
|
12
|
+
function transformBlock(block) {
|
|
13
|
+
return block;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __markAsModule = (target) =>
|
|
3
|
+
__defProp(target, '__esModule', { value: true });
|
|
4
|
+
var __export = (target, all) => {
|
|
5
|
+
__markAsModule(target);
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
__export(exports, {
|
|
10
|
+
getEventHandlerName: () => getEventHandlerName,
|
|
11
|
+
});
|
|
12
|
+
const getEventHandlerName = (key) => `v-on:${key.toLowerCase()}`;
|
|
@@ -44,15 +44,16 @@ __export(exports, {
|
|
|
44
44
|
getBlockActions: () => getBlockActions,
|
|
45
45
|
});
|
|
46
46
|
var import_evaluate = __toModule(require('./evaluate'));
|
|
47
|
-
|
|
48
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
49
|
-
}
|
|
47
|
+
var import_event_handler_name = __toModule(require('./event-handler-name'));
|
|
50
48
|
function getBlockActions(options) {
|
|
51
49
|
const obj = {};
|
|
52
50
|
if (options.block.actions) {
|
|
53
51
|
for (const key in options.block.actions) {
|
|
52
|
+
if (!options.block.actions.hasOwnProperty(key)) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
54
55
|
const value = options.block.actions[key];
|
|
55
|
-
obj[
|
|
56
|
+
obj[(0, import_event_handler_name.getEventHandlerName)(key)] = (event) =>
|
|
56
57
|
(0, import_evaluate.evaluate)({
|
|
57
58
|
code: value,
|
|
58
59
|
context: options.context,
|
|
@@ -68,8 +68,10 @@ __export(exports, {
|
|
|
68
68
|
});
|
|
69
69
|
var import_evaluate = __toModule(require('./evaluate'));
|
|
70
70
|
var import_set = __toModule(require('./set'));
|
|
71
|
+
var import_transform_block = __toModule(require('./transform-block'));
|
|
71
72
|
function getProcessedBlock(options) {
|
|
72
|
-
const {
|
|
73
|
+
const { state, context } = options;
|
|
74
|
+
const block = (0, import_transform_block.transformBlock)(options.block);
|
|
73
75
|
if (!block.bindings) {
|
|
74
76
|
return block;
|
|
75
77
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __markAsModule = (target) =>
|
|
3
|
+
__defProp(target, '__esModule', { value: true });
|
|
4
|
+
var __export = (target, all) => {
|
|
5
|
+
__markAsModule(target);
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
__export(exports, {
|
|
10
|
+
transformBlock: () => transformBlock,
|
|
11
|
+
});
|
|
12
|
+
function transformBlock(block) {
|
|
13
|
+
return block;
|
|
14
|
+
}
|