@builder.io/sdk-qwik 0.0.18 → 0.0.19
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/index.qwik.cjs +6 -4
- package/lib/index.qwik.mjs +6 -4
- package/package.json +1 -1
- package/types/blocks/form/form.d.ts +0 -5
package/lib/index.qwik.cjs
CHANGED
|
@@ -1798,13 +1798,16 @@ function getGlobalThis() {
|
|
|
1798
1798
|
return null;
|
|
1799
1799
|
}
|
|
1800
1800
|
const NODE_FETCH_URL = () => "node-fetch";
|
|
1801
|
+
let fetch$1 = void 0;
|
|
1801
1802
|
async function getFetch() {
|
|
1803
|
+
if (fetch$1)
|
|
1804
|
+
return fetch$1;
|
|
1802
1805
|
const globalFetch = getGlobalThis().fetch;
|
|
1803
1806
|
if (typeof globalFetch === "undefined" && typeof global !== "undefined") {
|
|
1804
1807
|
const nodeFetch = Promise.resolve().then(() => /* @__PURE__ */ _interopNamespace(require(NODE_FETCH_URL()))).then((d) => d.default);
|
|
1805
|
-
return nodeFetch.default || nodeFetch;
|
|
1808
|
+
return fetch$1 = nodeFetch.default || nodeFetch;
|
|
1806
1809
|
}
|
|
1807
|
-
return globalFetch.default || globalFetch;
|
|
1810
|
+
return fetch$1 = globalFetch.default || globalFetch;
|
|
1808
1811
|
}
|
|
1809
1812
|
const handleABTesting = (item, testGroups) => {
|
|
1810
1813
|
if (item.variations && Object.keys(item.variations).length) {
|
|
@@ -1840,7 +1843,6 @@ const handleABTesting = (item, testGroups) => {
|
|
|
1840
1843
|
}
|
|
1841
1844
|
}
|
|
1842
1845
|
};
|
|
1843
|
-
const fetch$ = getFetch();
|
|
1844
1846
|
async function getContent(options) {
|
|
1845
1847
|
return (await getAllContent({
|
|
1846
1848
|
...options,
|
|
@@ -1870,7 +1872,7 @@ const generateContentUrl = (options) => {
|
|
|
1870
1872
|
};
|
|
1871
1873
|
async function getAllContent(options) {
|
|
1872
1874
|
const url = generateContentUrl(options);
|
|
1873
|
-
const fetch2 = await
|
|
1875
|
+
const fetch2 = await getFetch();
|
|
1874
1876
|
const content = await fetch2(url.href).then((res) => res.json());
|
|
1875
1877
|
if (options.testGroups)
|
|
1876
1878
|
for (const item of content.results)
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -1778,13 +1778,16 @@ function getGlobalThis() {
|
|
|
1778
1778
|
return null;
|
|
1779
1779
|
}
|
|
1780
1780
|
const NODE_FETCH_URL = () => "node-fetch";
|
|
1781
|
+
let fetch$1 = void 0;
|
|
1781
1782
|
async function getFetch() {
|
|
1783
|
+
if (fetch$1)
|
|
1784
|
+
return fetch$1;
|
|
1782
1785
|
const globalFetch = getGlobalThis().fetch;
|
|
1783
1786
|
if (typeof globalFetch === "undefined" && typeof global !== "undefined") {
|
|
1784
1787
|
const nodeFetch = import(NODE_FETCH_URL()).then((d) => d.default);
|
|
1785
|
-
return nodeFetch.default || nodeFetch;
|
|
1788
|
+
return fetch$1 = nodeFetch.default || nodeFetch;
|
|
1786
1789
|
}
|
|
1787
|
-
return globalFetch.default || globalFetch;
|
|
1790
|
+
return fetch$1 = globalFetch.default || globalFetch;
|
|
1788
1791
|
}
|
|
1789
1792
|
const handleABTesting = (item, testGroups) => {
|
|
1790
1793
|
if (item.variations && Object.keys(item.variations).length) {
|
|
@@ -1820,7 +1823,6 @@ const handleABTesting = (item, testGroups) => {
|
|
|
1820
1823
|
}
|
|
1821
1824
|
}
|
|
1822
1825
|
};
|
|
1823
|
-
const fetch$ = getFetch();
|
|
1824
1826
|
async function getContent(options) {
|
|
1825
1827
|
return (await getAllContent({
|
|
1826
1828
|
...options,
|
|
@@ -1850,7 +1852,7 @@ const generateContentUrl = (options) => {
|
|
|
1850
1852
|
};
|
|
1851
1853
|
async function getAllContent(options) {
|
|
1852
1854
|
const url = generateContentUrl(options);
|
|
1853
|
-
const fetch2 = await
|
|
1855
|
+
const fetch2 = await getFetch();
|
|
1854
1856
|
const content = await fetch2(url.href).then((res) => res.json());
|
|
1855
1857
|
if (options.testGroups)
|
|
1856
1858
|
for (const item of content.results)
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export function submissionState(props: any, state: any, formRef: any, builderContext: any): any;
|
|
2
|
-
export function onSubmit(props: any, state: any, formRef: any, builderContext: any, event: any): void;
|
|
3
|
-
export const FormComponent: import("@builder.io/qwik").Component<{}>;
|
|
4
|
-
export default FormComponent;
|
|
5
|
-
export const STYLES: ".pre-FormComponent { \npadding: 10px;\ncolor: red;\ntext-align: center; }";
|