@builder.io/sdk-svelte 1.0.28 → 1.0.30
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/blocks/accordion/accordion.svelte +1 -1
- package/lib/browser/blocks/columns/columns.svelte +1 -1
- package/lib/browser/blocks/form/form/form.svelte +3 -2
- package/lib/browser/blocks/symbol/symbol.svelte +1 -1
- package/lib/browser/components/block/block.svelte +1 -1
- package/lib/browser/components/block/components/block-styles.svelte +1 -1
- package/lib/browser/components/content/components/enable-editor.svelte +2 -2
- package/lib/browser/components/content/content.svelte +1 -1
- package/lib/browser/constants/builder-registered-components.js +2 -2
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/constants/sdk-version.js +1 -1
- package/lib/edge/blocks/accordion/accordion.svelte +1 -1
- package/lib/edge/blocks/columns/columns.svelte +1 -1
- package/lib/edge/blocks/form/form/form.svelte +3 -2
- package/lib/edge/blocks/symbol/symbol.svelte +1 -1
- package/lib/edge/components/block/block.svelte +1 -1
- package/lib/edge/components/block/components/block-styles.svelte +1 -1
- package/lib/edge/components/content/components/enable-editor.svelte +2 -2
- package/lib/edge/components/content/content.svelte +1 -1
- package/lib/edge/constants/builder-registered-components.js +2 -2
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/constants/sdk-version.js +1 -1
- package/lib/node/blocks/accordion/accordion.svelte +1 -1
- package/lib/node/blocks/columns/columns.svelte +1 -1
- package/lib/node/blocks/form/form/form.svelte +3 -2
- package/lib/node/blocks/symbol/symbol.svelte +1 -1
- package/lib/node/components/block/block.svelte +1 -1
- package/lib/node/components/block/components/block-styles.svelte +1 -1
- package/lib/node/components/content/components/enable-editor.svelte +2 -2
- package/lib/node/components/content/content.svelte +1 -1
- package/lib/node/constants/builder-registered-components.js +2 -2
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/constants/sdk-version.js +1 -1
- package/package.json +4 -4
- package/src/blocks/accordion/accordion.svelte +2 -2
- package/src/blocks/columns/columns.svelte +1 -1
- package/src/blocks/form/form/form.svelte +3 -4
- package/src/blocks/symbol/symbol.svelte +1 -1
- package/src/components/block/block.svelte +1 -1
- package/src/components/block/components/block-styles.svelte +1 -1
- package/src/components/content/components/enable-editor.svelte +2 -2
- package/src/components/content/content.svelte +1 -1
- package/src/constants/builder-registered-components.ts +2 -2
- package/src/constants/sdk-version.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import Blocks from "../../components/blocks/index";
|
|
2
|
-
import { convertOrderNumberToString } from "./helpers";
|
|
3
2
|
import "../../functions/camel-to-kebab-case";
|
|
3
|
+
import { convertOrderNumberToString } from "./helpers";
|
|
4
4
|
export let grid = undefined;
|
|
5
5
|
export let oneAtATime = undefined;
|
|
6
6
|
export let items;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>import Blocks from "../../components/blocks/blocks.svelte";
|
|
4
|
+
import "../../components/dynamic-div.svelte";
|
|
4
5
|
import DynamicRenderer from "../../components/dynamic-renderer/dynamic-renderer.svelte";
|
|
5
6
|
import InlinedStyles from "../../components/inlined-styles.svelte";
|
|
6
7
|
import { getSizesForBreakpoints } from "../../constants/device-sizes";
|
|
@@ -9,7 +10,6 @@ import "../../functions/deopt";
|
|
|
9
10
|
import { getClassPropName } from "../../functions/get-class-prop-name";
|
|
10
11
|
import { mapStyleObjToStrIfNeeded } from "../../functions/get-style";
|
|
11
12
|
import { getColumnsClass } from "./helpers";
|
|
12
|
-
import "../../components/dynamic-div.svelte";
|
|
13
13
|
export let space = undefined;
|
|
14
14
|
export let columns = undefined;
|
|
15
15
|
export let stackColumnsAt = undefined;
|
|
@@ -58,12 +58,12 @@ function onSubmit(event) {
|
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
event.preventDefault();
|
|
61
|
-
const el = event.currentTarget;
|
|
61
|
+
const el = event.currentTarget || event.target;
|
|
62
62
|
const headers = customHeaders || {};
|
|
63
63
|
let body;
|
|
64
64
|
const formData = new FormData(el);
|
|
65
65
|
// TODO: maybe support null
|
|
66
|
-
const formPairs = Array.from(
|
|
66
|
+
const formPairs = Array.from(el.querySelectorAll("input,select,textarea"))
|
|
67
67
|
.filter((el) => !!el.name)
|
|
68
68
|
.map((el) => {
|
|
69
69
|
let value;
|
|
@@ -247,6 +247,7 @@ let formErrorMessage = "";
|
|
|
247
247
|
on:submit={(event) => {
|
|
248
248
|
onSubmit(event);
|
|
249
249
|
}}
|
|
250
|
+
{...{}}
|
|
250
251
|
{...filterAttrs(attributes, "on:", false)}
|
|
251
252
|
use:setAttrs={filterAttrs(attributes, "on:", true)}
|
|
252
253
|
>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>import { onMount } from "svelte";
|
|
2
2
|
import ContentVariants from "../../components/content-variants/index";
|
|
3
3
|
import { filterAttrs } from "../helpers";
|
|
4
|
+
import "../../components/dynamic-div.svelte";
|
|
4
5
|
import { getClassPropName } from "../../functions/get-class-prop-name";
|
|
5
6
|
import { setAttrs } from "../helpers";
|
|
6
7
|
import { fetchSymbolContent } from "./symbol.helpers";
|
|
7
|
-
import "../../components/dynamic-div.svelte";
|
|
8
8
|
export let symbol = undefined;
|
|
9
9
|
export let attributes = undefined;
|
|
10
10
|
export let dynamic = undefined;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<script>import { onMount } from "svelte";
|
|
4
4
|
import { getBlockComponentOptions } from "../../functions/get-block-component-options";
|
|
5
5
|
import { getProcessedBlock } from "../../functions/get-processed-block";
|
|
6
|
+
import "../dynamic-div.svelte";
|
|
6
7
|
import { bindAnimations } from "./animator";
|
|
7
8
|
import { getComponent, getRepeatItemData, shouldPassLinkComponent, shouldPassRegisteredComponents, } from "./block.helpers";
|
|
8
9
|
import BlockStyles from "./components/block-styles.svelte";
|
|
9
10
|
import BlockWrapper from "./components/block-wrapper.svelte";
|
|
10
11
|
import ComponentRef from "./components/component-ref/component-ref.svelte";
|
|
11
12
|
import RepeatedBlock from "./components/repeated-block.svelte";
|
|
12
|
-
import "../dynamic-div.svelte";
|
|
13
13
|
export let block;
|
|
14
14
|
export let context;
|
|
15
15
|
export let registeredComponents;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
<script>import { getMaxWidthQueryForSize, getSizesForBreakpoints, } from "../../../constants/device-sizes";
|
|
4
4
|
import { TARGET } from "../../../constants/target";
|
|
5
|
+
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
5
6
|
import { getProcessedBlock } from "../../../functions/get-processed-block";
|
|
6
7
|
import { createCssClass } from "../../../helpers/css";
|
|
7
8
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
8
9
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
9
|
-
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
10
10
|
export let block;
|
|
11
11
|
export let context;
|
|
12
12
|
$: canShowBlock = () => {
|
|
@@ -18,8 +18,8 @@ import "../../../helpers/preview-lru-cache/set";
|
|
|
18
18
|
import { createEditorListener } from "../../../helpers/subscribe-to-editor";
|
|
19
19
|
import { registerInsertMenu, setupBrowserForEditing, } from "../../../scripts/init-editing";
|
|
20
20
|
import { triggerAnimation } from "../../block/animator";
|
|
21
|
-
import { getWrapperClassName } from "./styles.helpers";
|
|
22
21
|
import "../../dynamic-div.svelte";
|
|
22
|
+
import { getWrapperClassName } from "./styles.helpers";
|
|
23
23
|
export let builderContextSignal;
|
|
24
24
|
export let canTrack = undefined;
|
|
25
25
|
export let apiKey;
|
|
@@ -201,7 +201,7 @@ function elementRef_onIniteditingbldr(event) {
|
|
|
201
201
|
function elementRef_onInitpreviewingbldr(event) {
|
|
202
202
|
const searchParams = new URL(location.href).searchParams;
|
|
203
203
|
const searchParamPreviewModel = searchParams.get("builder.preview");
|
|
204
|
-
const searchParamPreviewId = searchParams.get(`builder.
|
|
204
|
+
const searchParamPreviewId = searchParams.get(`builder.overrides.${searchParamPreviewModel}`);
|
|
205
205
|
const previewApiKey = searchParams.get("apiKey") || searchParams.get("builder.space");
|
|
206
206
|
/**
|
|
207
207
|
* Make sure that:
|
|
@@ -6,12 +6,12 @@ import ComponentsContext from "../../context/components.context";
|
|
|
6
6
|
import { serializeComponentInfo } from "../../functions/register-component";
|
|
7
7
|
import Blocks from "../blocks/blocks.svelte";
|
|
8
8
|
import { getUpdateVariantVisibilityScript } from "../content-variants/helpers";
|
|
9
|
+
import "../dynamic-div.svelte";
|
|
9
10
|
import InlinedScript from "../inlined-script.svelte";
|
|
10
11
|
import EnableEditor from "./components/enable-editor.svelte";
|
|
11
12
|
import ContentStyles from "./components/styles.svelte";
|
|
12
13
|
import { getContentInitialValue, getRootStateInitialValue, } from "./content.helpers";
|
|
13
14
|
import "./wrap-component-ref";
|
|
14
|
-
import "../dynamic-div.svelte";
|
|
15
15
|
export let content = undefined;
|
|
16
16
|
export let customComponents = undefined;
|
|
17
17
|
export let data = undefined;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { componentInfo as accordionComponentInfo } from '../blocks/accordion/component-info';
|
|
2
|
+
import { default as Accordion } from '../blocks/accordion/index';
|
|
1
3
|
import { componentInfo as buttonComponentInfo } from '../blocks/button/component-info';
|
|
2
4
|
import { default as Button } from '../blocks/button/index';
|
|
3
5
|
import { componentInfo as columnsComponentInfo } from '../blocks/columns/component-info';
|
|
@@ -16,8 +18,6 @@ import { componentInfo as tabsComponentInfo } from '../blocks/tabs/component-inf
|
|
|
16
18
|
import { default as Tabs } from '../blocks/tabs/index';
|
|
17
19
|
import { componentInfo as textComponentInfo } from '../blocks/text/component-info';
|
|
18
20
|
import { default as Text } from '../blocks/text/index';
|
|
19
|
-
import { default as Accordion } from '../blocks/accordion/index';
|
|
20
|
-
import { componentInfo as accordionComponentInfo } from '../blocks/accordion/component-info';
|
|
21
21
|
import { getExtraComponents } from './extra-components';
|
|
22
22
|
import { TARGET } from './target';
|
|
23
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.30";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.0.
|
|
1
|
+
export const SDK_VERSION = "1.0.30";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import Blocks from "../../components/blocks/index";
|
|
2
|
-
import { convertOrderNumberToString } from "./helpers";
|
|
3
2
|
import "../../functions/camel-to-kebab-case";
|
|
3
|
+
import { convertOrderNumberToString } from "./helpers";
|
|
4
4
|
export let grid = undefined;
|
|
5
5
|
export let oneAtATime = undefined;
|
|
6
6
|
export let items;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>import Blocks from "../../components/blocks/blocks.svelte";
|
|
4
|
+
import "../../components/dynamic-div.svelte";
|
|
4
5
|
import DynamicRenderer from "../../components/dynamic-renderer/dynamic-renderer.svelte";
|
|
5
6
|
import InlinedStyles from "../../components/inlined-styles.svelte";
|
|
6
7
|
import { getSizesForBreakpoints } from "../../constants/device-sizes";
|
|
@@ -9,7 +10,6 @@ import "../../functions/deopt";
|
|
|
9
10
|
import { getClassPropName } from "../../functions/get-class-prop-name";
|
|
10
11
|
import { mapStyleObjToStrIfNeeded } from "../../functions/get-style";
|
|
11
12
|
import { getColumnsClass } from "./helpers";
|
|
12
|
-
import "../../components/dynamic-div.svelte";
|
|
13
13
|
export let space = undefined;
|
|
14
14
|
export let columns = undefined;
|
|
15
15
|
export let stackColumnsAt = undefined;
|
|
@@ -58,12 +58,12 @@ function onSubmit(event) {
|
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
event.preventDefault();
|
|
61
|
-
const el = event.currentTarget;
|
|
61
|
+
const el = event.currentTarget || event.target;
|
|
62
62
|
const headers = customHeaders || {};
|
|
63
63
|
let body;
|
|
64
64
|
const formData = new FormData(el);
|
|
65
65
|
// TODO: maybe support null
|
|
66
|
-
const formPairs = Array.from(
|
|
66
|
+
const formPairs = Array.from(el.querySelectorAll("input,select,textarea"))
|
|
67
67
|
.filter((el) => !!el.name)
|
|
68
68
|
.map((el) => {
|
|
69
69
|
let value;
|
|
@@ -247,6 +247,7 @@ let formErrorMessage = "";
|
|
|
247
247
|
on:submit={(event) => {
|
|
248
248
|
onSubmit(event);
|
|
249
249
|
}}
|
|
250
|
+
{...{}}
|
|
250
251
|
{...filterAttrs(attributes, "on:", false)}
|
|
251
252
|
use:setAttrs={filterAttrs(attributes, "on:", true)}
|
|
252
253
|
>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>import { onMount } from "svelte";
|
|
2
2
|
import ContentVariants from "../../components/content-variants/index";
|
|
3
3
|
import { filterAttrs } from "../helpers";
|
|
4
|
+
import "../../components/dynamic-div.svelte";
|
|
4
5
|
import { getClassPropName } from "../../functions/get-class-prop-name";
|
|
5
6
|
import { setAttrs } from "../helpers";
|
|
6
7
|
import { fetchSymbolContent } from "./symbol.helpers";
|
|
7
|
-
import "../../components/dynamic-div.svelte";
|
|
8
8
|
export let symbol = undefined;
|
|
9
9
|
export let attributes = undefined;
|
|
10
10
|
export let dynamic = undefined;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<script>import { onMount } from "svelte";
|
|
4
4
|
import { getBlockComponentOptions } from "../../functions/get-block-component-options";
|
|
5
5
|
import { getProcessedBlock } from "../../functions/get-processed-block";
|
|
6
|
+
import "../dynamic-div.svelte";
|
|
6
7
|
import { bindAnimations } from "./animator";
|
|
7
8
|
import { getComponent, getRepeatItemData, shouldPassLinkComponent, shouldPassRegisteredComponents, } from "./block.helpers";
|
|
8
9
|
import BlockStyles from "./components/block-styles.svelte";
|
|
9
10
|
import BlockWrapper from "./components/block-wrapper.svelte";
|
|
10
11
|
import ComponentRef from "./components/component-ref/component-ref.svelte";
|
|
11
12
|
import RepeatedBlock from "./components/repeated-block.svelte";
|
|
12
|
-
import "../dynamic-div.svelte";
|
|
13
13
|
export let block;
|
|
14
14
|
export let context;
|
|
15
15
|
export let registeredComponents;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
<script>import { getMaxWidthQueryForSize, getSizesForBreakpoints, } from "../../../constants/device-sizes";
|
|
4
4
|
import { TARGET } from "../../../constants/target";
|
|
5
|
+
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
5
6
|
import { getProcessedBlock } from "../../../functions/get-processed-block";
|
|
6
7
|
import { createCssClass } from "../../../helpers/css";
|
|
7
8
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
8
9
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
9
|
-
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
10
10
|
export let block;
|
|
11
11
|
export let context;
|
|
12
12
|
$: canShowBlock = () => {
|
|
@@ -18,8 +18,8 @@ import "../../../helpers/preview-lru-cache/set";
|
|
|
18
18
|
import { createEditorListener } from "../../../helpers/subscribe-to-editor";
|
|
19
19
|
import { registerInsertMenu, setupBrowserForEditing, } from "../../../scripts/init-editing";
|
|
20
20
|
import { triggerAnimation } from "../../block/animator";
|
|
21
|
-
import { getWrapperClassName } from "./styles.helpers";
|
|
22
21
|
import "../../dynamic-div.svelte";
|
|
22
|
+
import { getWrapperClassName } from "./styles.helpers";
|
|
23
23
|
export let builderContextSignal;
|
|
24
24
|
export let canTrack = undefined;
|
|
25
25
|
export let apiKey;
|
|
@@ -201,7 +201,7 @@ function elementRef_onIniteditingbldr(event) {
|
|
|
201
201
|
function elementRef_onInitpreviewingbldr(event) {
|
|
202
202
|
const searchParams = new URL(location.href).searchParams;
|
|
203
203
|
const searchParamPreviewModel = searchParams.get("builder.preview");
|
|
204
|
-
const searchParamPreviewId = searchParams.get(`builder.
|
|
204
|
+
const searchParamPreviewId = searchParams.get(`builder.overrides.${searchParamPreviewModel}`);
|
|
205
205
|
const previewApiKey = searchParams.get("apiKey") || searchParams.get("builder.space");
|
|
206
206
|
/**
|
|
207
207
|
* Make sure that:
|
|
@@ -6,12 +6,12 @@ import ComponentsContext from "../../context/components.context";
|
|
|
6
6
|
import { serializeComponentInfo } from "../../functions/register-component";
|
|
7
7
|
import Blocks from "../blocks/blocks.svelte";
|
|
8
8
|
import { getUpdateVariantVisibilityScript } from "../content-variants/helpers";
|
|
9
|
+
import "../dynamic-div.svelte";
|
|
9
10
|
import InlinedScript from "../inlined-script.svelte";
|
|
10
11
|
import EnableEditor from "./components/enable-editor.svelte";
|
|
11
12
|
import ContentStyles from "./components/styles.svelte";
|
|
12
13
|
import { getContentInitialValue, getRootStateInitialValue, } from "./content.helpers";
|
|
13
14
|
import "./wrap-component-ref";
|
|
14
|
-
import "../dynamic-div.svelte";
|
|
15
15
|
export let content = undefined;
|
|
16
16
|
export let customComponents = undefined;
|
|
17
17
|
export let data = undefined;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { componentInfo as accordionComponentInfo } from '../blocks/accordion/component-info';
|
|
2
|
+
import { default as Accordion } from '../blocks/accordion/index';
|
|
1
3
|
import { componentInfo as buttonComponentInfo } from '../blocks/button/component-info';
|
|
2
4
|
import { default as Button } from '../blocks/button/index';
|
|
3
5
|
import { componentInfo as columnsComponentInfo } from '../blocks/columns/component-info';
|
|
@@ -16,8 +18,6 @@ import { componentInfo as tabsComponentInfo } from '../blocks/tabs/component-inf
|
|
|
16
18
|
import { default as Tabs } from '../blocks/tabs/index';
|
|
17
19
|
import { componentInfo as textComponentInfo } from '../blocks/text/component-info';
|
|
18
20
|
import { default as Text } from '../blocks/text/index';
|
|
19
|
-
import { default as Accordion } from '../blocks/accordion/index';
|
|
20
|
-
import { componentInfo as accordionComponentInfo } from '../blocks/accordion/component-info';
|
|
21
21
|
import { getExtraComponents } from './extra-components';
|
|
22
22
|
import { TARGET } from './target';
|
|
23
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.30";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.0.
|
|
1
|
+
export const SDK_VERSION = "1.0.30";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import Blocks from "../../components/blocks/index";
|
|
2
|
-
import { convertOrderNumberToString } from "./helpers";
|
|
3
2
|
import "../../functions/camel-to-kebab-case";
|
|
3
|
+
import { convertOrderNumberToString } from "./helpers";
|
|
4
4
|
export let grid = undefined;
|
|
5
5
|
export let oneAtATime = undefined;
|
|
6
6
|
export let items;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
3
|
<script>import Blocks from "../../components/blocks/blocks.svelte";
|
|
4
|
+
import "../../components/dynamic-div.svelte";
|
|
4
5
|
import DynamicRenderer from "../../components/dynamic-renderer/dynamic-renderer.svelte";
|
|
5
6
|
import InlinedStyles from "../../components/inlined-styles.svelte";
|
|
6
7
|
import { getSizesForBreakpoints } from "../../constants/device-sizes";
|
|
@@ -9,7 +10,6 @@ import "../../functions/deopt";
|
|
|
9
10
|
import { getClassPropName } from "../../functions/get-class-prop-name";
|
|
10
11
|
import { mapStyleObjToStrIfNeeded } from "../../functions/get-style";
|
|
11
12
|
import { getColumnsClass } from "./helpers";
|
|
12
|
-
import "../../components/dynamic-div.svelte";
|
|
13
13
|
export let space = undefined;
|
|
14
14
|
export let columns = undefined;
|
|
15
15
|
export let stackColumnsAt = undefined;
|
|
@@ -58,12 +58,12 @@ function onSubmit(event) {
|
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
event.preventDefault();
|
|
61
|
-
const el = event.currentTarget;
|
|
61
|
+
const el = event.currentTarget || event.target;
|
|
62
62
|
const headers = customHeaders || {};
|
|
63
63
|
let body;
|
|
64
64
|
const formData = new FormData(el);
|
|
65
65
|
// TODO: maybe support null
|
|
66
|
-
const formPairs = Array.from(
|
|
66
|
+
const formPairs = Array.from(el.querySelectorAll("input,select,textarea"))
|
|
67
67
|
.filter((el) => !!el.name)
|
|
68
68
|
.map((el) => {
|
|
69
69
|
let value;
|
|
@@ -247,6 +247,7 @@ let formErrorMessage = "";
|
|
|
247
247
|
on:submit={(event) => {
|
|
248
248
|
onSubmit(event);
|
|
249
249
|
}}
|
|
250
|
+
{...{}}
|
|
250
251
|
{...filterAttrs(attributes, "on:", false)}
|
|
251
252
|
use:setAttrs={filterAttrs(attributes, "on:", true)}
|
|
252
253
|
>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>import { onMount } from "svelte";
|
|
2
2
|
import ContentVariants from "../../components/content-variants/index";
|
|
3
3
|
import { filterAttrs } from "../helpers";
|
|
4
|
+
import "../../components/dynamic-div.svelte";
|
|
4
5
|
import { getClassPropName } from "../../functions/get-class-prop-name";
|
|
5
6
|
import { setAttrs } from "../helpers";
|
|
6
7
|
import { fetchSymbolContent } from "./symbol.helpers";
|
|
7
|
-
import "../../components/dynamic-div.svelte";
|
|
8
8
|
export let symbol = undefined;
|
|
9
9
|
export let attributes = undefined;
|
|
10
10
|
export let dynamic = undefined;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<script>import { onMount } from "svelte";
|
|
4
4
|
import { getBlockComponentOptions } from "../../functions/get-block-component-options";
|
|
5
5
|
import { getProcessedBlock } from "../../functions/get-processed-block";
|
|
6
|
+
import "../dynamic-div.svelte";
|
|
6
7
|
import { bindAnimations } from "./animator";
|
|
7
8
|
import { getComponent, getRepeatItemData, shouldPassLinkComponent, shouldPassRegisteredComponents, } from "./block.helpers";
|
|
8
9
|
import BlockStyles from "./components/block-styles.svelte";
|
|
9
10
|
import BlockWrapper from "./components/block-wrapper.svelte";
|
|
10
11
|
import ComponentRef from "./components/component-ref/component-ref.svelte";
|
|
11
12
|
import RepeatedBlock from "./components/repeated-block.svelte";
|
|
12
|
-
import "../dynamic-div.svelte";
|
|
13
13
|
export let block;
|
|
14
14
|
export let context;
|
|
15
15
|
export let registeredComponents;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
<script>import { getMaxWidthQueryForSize, getSizesForBreakpoints, } from "../../../constants/device-sizes";
|
|
4
4
|
import { TARGET } from "../../../constants/target";
|
|
5
|
+
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
5
6
|
import { getProcessedBlock } from "../../../functions/get-processed-block";
|
|
6
7
|
import { createCssClass } from "../../../helpers/css";
|
|
7
8
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
8
9
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
9
|
-
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
10
10
|
export let block;
|
|
11
11
|
export let context;
|
|
12
12
|
$: canShowBlock = () => {
|
|
@@ -18,8 +18,8 @@ import "../../../helpers/preview-lru-cache/set";
|
|
|
18
18
|
import { createEditorListener } from "../../../helpers/subscribe-to-editor";
|
|
19
19
|
import { registerInsertMenu, setupBrowserForEditing, } from "../../../scripts/init-editing";
|
|
20
20
|
import { triggerAnimation } from "../../block/animator";
|
|
21
|
-
import { getWrapperClassName } from "./styles.helpers";
|
|
22
21
|
import "../../dynamic-div.svelte";
|
|
22
|
+
import { getWrapperClassName } from "./styles.helpers";
|
|
23
23
|
export let builderContextSignal;
|
|
24
24
|
export let canTrack = undefined;
|
|
25
25
|
export let apiKey;
|
|
@@ -201,7 +201,7 @@ function elementRef_onIniteditingbldr(event) {
|
|
|
201
201
|
function elementRef_onInitpreviewingbldr(event) {
|
|
202
202
|
const searchParams = new URL(location.href).searchParams;
|
|
203
203
|
const searchParamPreviewModel = searchParams.get("builder.preview");
|
|
204
|
-
const searchParamPreviewId = searchParams.get(`builder.
|
|
204
|
+
const searchParamPreviewId = searchParams.get(`builder.overrides.${searchParamPreviewModel}`);
|
|
205
205
|
const previewApiKey = searchParams.get("apiKey") || searchParams.get("builder.space");
|
|
206
206
|
/**
|
|
207
207
|
* Make sure that:
|
|
@@ -6,12 +6,12 @@ import ComponentsContext from "../../context/components.context";
|
|
|
6
6
|
import { serializeComponentInfo } from "../../functions/register-component";
|
|
7
7
|
import Blocks from "../blocks/blocks.svelte";
|
|
8
8
|
import { getUpdateVariantVisibilityScript } from "../content-variants/helpers";
|
|
9
|
+
import "../dynamic-div.svelte";
|
|
9
10
|
import InlinedScript from "../inlined-script.svelte";
|
|
10
11
|
import EnableEditor from "./components/enable-editor.svelte";
|
|
11
12
|
import ContentStyles from "./components/styles.svelte";
|
|
12
13
|
import { getContentInitialValue, getRootStateInitialValue, } from "./content.helpers";
|
|
13
14
|
import "./wrap-component-ref";
|
|
14
|
-
import "../dynamic-div.svelte";
|
|
15
15
|
export let content = undefined;
|
|
16
16
|
export let customComponents = undefined;
|
|
17
17
|
export let data = undefined;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { componentInfo as accordionComponentInfo } from '../blocks/accordion/component-info';
|
|
2
|
+
import { default as Accordion } from '../blocks/accordion/index';
|
|
1
3
|
import { componentInfo as buttonComponentInfo } from '../blocks/button/component-info';
|
|
2
4
|
import { default as Button } from '../blocks/button/index';
|
|
3
5
|
import { componentInfo as columnsComponentInfo } from '../blocks/columns/component-info';
|
|
@@ -16,8 +18,6 @@ import { componentInfo as tabsComponentInfo } from '../blocks/tabs/component-inf
|
|
|
16
18
|
import { default as Tabs } from '../blocks/tabs/index';
|
|
17
19
|
import { componentInfo as textComponentInfo } from '../blocks/text/component-info';
|
|
18
20
|
import { default as Text } from '../blocks/text/index';
|
|
19
|
-
import { default as Accordion } from '../blocks/accordion/index';
|
|
20
|
-
import { componentInfo as accordionComponentInfo } from '../blocks/accordion/component-info';
|
|
21
21
|
import { getExtraComponents } from './extra-components';
|
|
22
22
|
import { TARGET } from './target';
|
|
23
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.30";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.0.
|
|
1
|
+
export const SDK_VERSION = "1.0.30";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-svelte",
|
|
3
3
|
"description": "Builder.io SDK for Svelte",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.30",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"lib",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"check": "SDK_ENV=browser svelte-check --tsconfig ./tsconfig.json"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"isolated-vm": "^
|
|
50
|
+
"isolated-vm": "^5.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@builder.io/sdks": "workspace:*",
|
|
54
54
|
"@sveltejs/adapter-auto": "^2.1.0",
|
|
55
55
|
"@sveltejs/kit": "^1.22.4",
|
|
56
56
|
"@sveltejs/package": "^2.2.0",
|
|
57
|
-
"nx": "
|
|
58
|
-
"nx-cloud": "
|
|
57
|
+
"nx": "16.10.0",
|
|
58
|
+
"nx-cloud": "16.5.2",
|
|
59
59
|
"svelte": "^4.1.2",
|
|
60
60
|
"svelte-check": "^3.4.6",
|
|
61
61
|
"svelte-preprocess": "^5.0.4",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Blocks from "../../components/blocks/index";
|
|
3
|
-
import
|
|
3
|
+
import { camelToKebabCase } from "../../functions/camel-to-kebab-case";
|
|
4
4
|
import type { Dictionary } from "../../types/typescript";
|
|
5
|
+
import type { AccordionProps } from "./accordion.types";
|
|
5
6
|
import { convertOrderNumberToString } from "./helpers";
|
|
6
|
-
import { camelToKebabCase } from "../../functions/camel-to-kebab-case";
|
|
7
7
|
|
|
8
8
|
export let grid: AccordionProps["grid"] = undefined;
|
|
9
9
|
export let oneAtATime: AccordionProps["oneAtATime"] = undefined;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<script lang="ts">
|
|
6
6
|
import Blocks from "../../components/blocks/blocks.svelte";
|
|
7
|
+
import DynamicDiv from "../../components/dynamic-div.svelte";
|
|
7
8
|
import DynamicRenderer from "../../components/dynamic-renderer/dynamic-renderer.svelte";
|
|
8
9
|
import InlinedStyles from "../../components/inlined-styles.svelte";
|
|
9
10
|
import type { SizeName } from "../../constants/device-sizes";
|
|
@@ -15,7 +16,6 @@
|
|
|
15
16
|
import type { Dictionary } from "../../types/typescript";
|
|
16
17
|
import type { Column, ColumnProps } from "./columns.types";
|
|
17
18
|
import { getColumnsClass } from "./helpers";
|
|
18
|
-
import DynamicDiv from "../../components/dynamic-div.svelte";
|
|
19
19
|
|
|
20
20
|
export let space: ColumnProps["space"] = undefined;
|
|
21
21
|
export let columns: ColumnProps["columns"] = undefined;
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
event.preventDefault();
|
|
102
|
-
const el = event.currentTarget;
|
|
102
|
+
const el = event.currentTarget || event.target;
|
|
103
103
|
const headers = customHeaders || {};
|
|
104
104
|
let body: any;
|
|
105
105
|
const formData = new FormData(el);
|
|
@@ -108,9 +108,7 @@
|
|
|
108
108
|
const formPairs: {
|
|
109
109
|
key: string;
|
|
110
110
|
value: File | boolean | number | string | FileList;
|
|
111
|
-
}[] = Array.from(
|
|
112
|
-
event.currentTarget.querySelectorAll("input,select,textarea")
|
|
113
|
-
)
|
|
111
|
+
}[] = Array.from(el.querySelectorAll("input,select,textarea"))
|
|
114
112
|
.filter((el) => !!(el as HTMLInputElement).name)
|
|
115
113
|
.map((el) => {
|
|
116
114
|
let value: any;
|
|
@@ -303,6 +301,7 @@
|
|
|
303
301
|
on:submit={(event) => {
|
|
304
302
|
onSubmit(event);
|
|
305
303
|
}}
|
|
304
|
+
{...{}}
|
|
306
305
|
{...filterAttrs(attributes, "on:", false)}
|
|
307
306
|
use:setAttrs={filterAttrs(attributes, "on:", true)}
|
|
308
307
|
>
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
import ContentVariants from "../../components/content-variants/index";
|
|
5
5
|
import type { BuilderContent } from "../../types/builder-content";
|
|
6
6
|
import { filterAttrs } from "../helpers";
|
|
7
|
+
import DynamicDiv from "../../components/dynamic-div.svelte";
|
|
7
8
|
import { getClassPropName } from "../../functions/get-class-prop-name";
|
|
8
9
|
import type { Nullable } from "../../types/typescript";
|
|
9
10
|
import { setAttrs } from "../helpers";
|
|
10
11
|
import { fetchSymbolContent } from "./symbol.helpers";
|
|
11
12
|
import type { SymbolProps } from "./symbol.types";
|
|
12
|
-
import DynamicDiv from "../../components/dynamic-div.svelte";
|
|
13
13
|
|
|
14
14
|
export let symbol: SymbolProps["symbol"] = undefined;
|
|
15
15
|
export let attributes: SymbolProps["attributes"] = undefined;
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import { getBlockComponentOptions } from "../../functions/get-block-component-options";
|
|
18
18
|
import { getProcessedBlock } from "../../functions/get-processed-block";
|
|
19
19
|
import type { BuilderBlock } from "../../types/builder-block";
|
|
20
|
+
import DynamicDiv from "../dynamic-div.svelte";
|
|
20
21
|
import { bindAnimations } from "./animator";
|
|
21
22
|
import {
|
|
22
23
|
getComponent,
|
|
@@ -30,7 +31,6 @@
|
|
|
30
31
|
import type { ComponentProps } from "./components/component-ref/component-ref.helpers";
|
|
31
32
|
import ComponentRef from "./components/component-ref/component-ref.svelte";
|
|
32
33
|
import RepeatedBlock from "./components/repeated-block.svelte";
|
|
33
|
-
import DynamicDiv from "../dynamic-div.svelte";
|
|
34
34
|
import type { Writable } from "svelte/store";
|
|
35
35
|
|
|
36
36
|
export let block: BlockProps["block"];
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
} from "../../../constants/device-sizes";
|
|
13
13
|
import { TARGET } from "../../../constants/target";
|
|
14
14
|
import type { BuilderContextInterface } from "../../../context/types";
|
|
15
|
+
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
15
16
|
import { getProcessedBlock } from "../../../functions/get-processed-block";
|
|
16
17
|
import { createCssClass } from "../../../helpers/css";
|
|
17
18
|
import { checkIsDefined } from "../../../helpers/nullable";
|
|
18
19
|
import type { BuilderBlock } from "../../../types/builder-block";
|
|
19
20
|
import InlinedStyles from "../../inlined-styles.svelte";
|
|
20
|
-
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case";
|
|
21
21
|
|
|
22
22
|
export let block: BlockStylesProps["block"];
|
|
23
23
|
export let context: BlockStylesProps["context"];
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
import type { ComponentInfo } from "../../../types/components";
|
|
42
42
|
import type { Dictionary } from "../../../types/typescript";
|
|
43
43
|
import { triggerAnimation } from "../../block/animator";
|
|
44
|
+
import DynamicDiv from "../../dynamic-div.svelte";
|
|
44
45
|
import type {
|
|
45
46
|
BuilderComponentStateChange,
|
|
46
47
|
ContentProps,
|
|
47
48
|
} from "../content.types";
|
|
48
49
|
import { getWrapperClassName } from "./styles.helpers";
|
|
49
|
-
import DynamicDiv from "../../dynamic-div.svelte";
|
|
50
50
|
import type { Writable } from "svelte/store";
|
|
51
51
|
|
|
52
52
|
export let builderContextSignal: BuilderEditorProps["builderContextSignal"];
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
const searchParams = new URL(location.href).searchParams;
|
|
249
249
|
const searchParamPreviewModel = searchParams.get("builder.preview");
|
|
250
250
|
const searchParamPreviewId = searchParams.get(
|
|
251
|
-
`builder.
|
|
251
|
+
`builder.overrides.${searchParamPreviewModel}`
|
|
252
252
|
);
|
|
253
253
|
const previewApiKey =
|
|
254
254
|
searchParams.get("apiKey") || searchParams.get("builder.space");
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import type { Dictionary } from "../../types/typescript";
|
|
16
16
|
import Blocks from "../blocks/blocks.svelte";
|
|
17
17
|
import { getUpdateVariantVisibilityScript } from "../content-variants/helpers";
|
|
18
|
+
import DynamicDiv from "../dynamic-div.svelte";
|
|
18
19
|
import InlinedScript from "../inlined-script.svelte";
|
|
19
20
|
import EnableEditor from "./components/enable-editor.svelte";
|
|
20
21
|
import ContentStyles from "./components/styles.svelte";
|
|
@@ -24,7 +25,6 @@
|
|
|
24
25
|
} from "./content.helpers";
|
|
25
26
|
import type { ContentProps } from "./content.types";
|
|
26
27
|
import { wrapComponentRef } from "./wrap-component-ref";
|
|
27
|
-
import DynamicDiv from "../dynamic-div.svelte";
|
|
28
28
|
|
|
29
29
|
export let content: ContentProps["content"] = undefined;
|
|
30
30
|
export let customComponents: ContentProps["customComponents"] = undefined;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { componentInfo as accordionComponentInfo } from '../blocks/accordion/component-info';
|
|
2
|
+
import { default as Accordion } from '../blocks/accordion/index';
|
|
1
3
|
import { componentInfo as buttonComponentInfo } from '../blocks/button/component-info';
|
|
2
4
|
import { default as Button } from '../blocks/button/index';
|
|
3
5
|
import { componentInfo as columnsComponentInfo } from '../blocks/columns/component-info';
|
|
@@ -16,8 +18,6 @@ import { componentInfo as tabsComponentInfo } from '../blocks/tabs/component-inf
|
|
|
16
18
|
import { default as Tabs } from '../blocks/tabs/index';
|
|
17
19
|
import { componentInfo as textComponentInfo } from '../blocks/text/component-info';
|
|
18
20
|
import { default as Text } from '../blocks/text/index';
|
|
19
|
-
import { default as Accordion } from '../blocks/accordion/index';
|
|
20
|
-
import { componentInfo as accordionComponentInfo } from '../blocks/accordion/component-info';
|
|
21
21
|
import type { RegisteredComponent } from '../context/types';
|
|
22
22
|
import { getExtraComponents } from './extra-components';
|
|
23
23
|
import { TARGET } from './target';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.0.
|
|
1
|
+
export const SDK_VERSION = "1.0.30"
|