Skip to content

Commit ad70eb1

Browse files
author
jannik brack
committed
Merge remote-tracking branch 'origin/main'
2 parents 4f7bb10 + f6ef21a commit ad70eb1

File tree

8 files changed

+10
-89
lines changed

8 files changed

+10
-89
lines changed

docs/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="manifest" href="/site.webmanifest"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><meta name="msapplication-TileColor" content="#da532c"><meta name="theme-color" content="#ffffff"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><link rel="manifest" href="/manifest.json"/><link rel="stylesheet" href="/assets/fonts/fonts.css"/><title>MapComponents catalogue</title><script defer="defer" src="/static/js/main.29430b59.js"></script><link href="/static/css/main.2adc5590.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="manifest" href="/site.webmanifest"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><meta name="msapplication-TileColor" content="#da532c"><meta name="theme-color" content="#ffffff"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><link rel="manifest" href="/manifest.json"/><link rel="stylesheet" href="/assets/fonts/fonts.css"/><title>MapComponents catalogue</title><script defer="defer" src="/static/js/main.bc14e516.js"></script><link href="/static/css/main.2adc5590.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

docs/asset-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.2adc5590.css",
4-
"main.js": "/static/js/main.29430b59.js",
4+
"main.js": "/static/js/main.bc14e516.js",
55
"static/js/496.841b092c.chunk.js": "/static/js/496.841b092c.chunk.js",
66
"static/media/logo.svg": "/static/media/logo.c0efa20762a518d34c1c592b0f6cb321.svg",
77
"index.html": "/index.html",
88
"main.2adc5590.css.map": "/static/css/main.2adc5590.css.map",
9-
"main.29430b59.js.map": "/static/js/main.29430b59.js.map",
9+
"main.bc14e516.js.map": "/static/js/main.bc14e516.js.map",
1010
"496.841b092c.chunk.js.map": "/static/js/496.841b092c.chunk.js.map"
1111
},
1212
"entrypoints": [
1313
"static/css/main.2adc5590.css",
14-
"static/js/main.29430b59.js"
14+
"static/js/main.bc14e516.js"
1515
]
1616
}

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="manifest" href="/site.webmanifest"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><meta name="msapplication-TileColor" content="#da532c"><meta name="theme-color" content="#ffffff"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><link rel="manifest" href="/manifest.json"/><link rel="stylesheet" href="/assets/fonts/fonts.css"/><title>MapComponents catalogue</title><script defer="defer" src="/static/js/main.29430b59.js"></script><link href="/static/css/main.2adc5590.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="manifest" href="/site.webmanifest"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><meta name="msapplication-TileColor" content="#da532c"><meta name="theme-color" content="#ffffff"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><link rel="manifest" href="/manifest.json"/><link rel="stylesheet" href="/assets/fonts/fonts.css"/><title>MapComponents catalogue</title><script defer="defer" src="/static/js/main.bc14e516.js"></script><link href="/static/css/main.2adc5590.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

docs/static/js/main.29430b59.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

docs/static/js/main.bc14e516.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/DemoContextProvider.js

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -42,51 +42,6 @@ const DemoContextProvider = ({ children }) => {
4242
return null;
4343
};
4444

45-
/**
46-
* enrich storybook mc_meta.json data with thumbnail URL and demo URLs from stories.json
47-
*/
48-
49-
const applyStorybookDataToMcMeta = ({
50-
componentData,
51-
storybookData,
52-
compId,
53-
url,
54-
}) => {
55-
let catalogueDemoExists = false;
56-
for (var storyId in storybookData.stories) {
57-
let _compName = storybookData.stories[storyId].kind.split("/");
58-
if (
59-
typeof _compName[1] !== "undefined" &&
60-
_compName[1] === compId &&
61-
storybookData.stories[storyId].name === "Catalogue Demo"
62-
) {
63-
catalogueDemoExists = true;
64-
}
65-
}
66-
67-
for (storyId in storybookData.stories) {
68-
let _storyData = storybookData.stories[storyId];
69-
let _compName = _storyData.kind.split("/");
70-
if (typeof _compName[1] !== "undefined" && _compName[1] === compId) {
71-
if (
72-
_storyData.name === "Catalogue Demo" ||
73-
(!catalogueDemoExists && _storyData.name === "Example Config")
74-
) {
75-
componentData.url = url;
76-
componentData.demos = [];
77-
componentData.demos.push({
78-
name: "demo",
79-
url: url + "/iframe.html?id=" + _storyData.id + "&viewMode=story",
80-
id: _storyData.id,
81-
});
82-
componentData.thumbnail =
83-
url + "/thumbnails/" + _compName[1] + ".png";
84-
}
85-
}
86-
}
87-
return componentData;
88-
};
89-
9045
useEffect(() => {
9146
localStorage.setItem("cart", JSON.stringify(cartItems));
9247
}, [cartItems]);
@@ -123,31 +78,6 @@ const DemoContextProvider = ({ children }) => {
12378
}))(mcMetaUrls[r])
12479
);
12580
}
126-
for (r = 0, len = storybookUrls.length; r < len; r++) {
127-
promises.push(
128-
((url) =>
129-
fetch(url + "/stories.json")
130-
.then((res) => {
131-
if (!res.ok) {
132-
throw Error(res.statusText);
133-
}
134-
return res.json();
135-
})
136-
.then((data) => {
137-
let tmpData = {};
138-
tmpData[url] = data;
139-
140-
storybookDataRef.current = {
141-
...storybookDataRef.current,
142-
...tmpData,
143-
};
144-
})
145-
.catch((msg) => {
146-
console.log("error");
147-
console.log(msg);
148-
}))(storybookUrls[r])
149-
);
150-
}
15181

15282
Promise.all(promises).then(() => {
15383
let componentData = {};
@@ -157,15 +87,6 @@ const DemoContextProvider = ({ children }) => {
15787
for (var compId in _compObj) {
15888
let _compData = _compObj[compId];
15989
_compData.stories = [];
160-
161-
if (typeof storybookDataRef.current[url] !== "undefined") {
162-
_compData = applyStorybookDataToMcMeta({
163-
componentData: _compData,
164-
storybookData: storybookDataRef.current[url],
165-
compId,
166-
url,
167-
});
168-
}
16990
componentDataRef.current[url][compId] = _compData;
17091
componentData[compId] = _compData;
17192
}
@@ -211,4 +132,4 @@ DemoContextProvider.propTypes = {
211132
children: PropTypes.node.isRequired,
212133
};
213134

214-
export default DemoContextProvider;
135+
export default DemoContextProvider;

0 commit comments

Comments
 (0)