Skip to content
This repository has been archived by the owner on Dec 11, 2021. It is now read-only.

Commit

Permalink
Version 0.7.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandBordage committed Feb 27, 2019
1 parent 5e90f50 commit 0dbeca5
Show file tree
Hide file tree
Showing 21 changed files with 264 additions and 13,951 deletions.
13,705 changes: 0 additions & 13,705 deletions package-lock.json

This file was deleted.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-streamfield",
"version": "0.6.10",
"version": "0.7.0",
"author": "NoriPyt <[email protected]> (https://noripyt.com)",
"description": "Powerful field for inserting multiple blocks with nesting.",
"keywords": [
Expand Down Expand Up @@ -90,13 +90,18 @@
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
],
"@babel/plugin-proposal-object-rest-spread",
[
"transform-react-remove-prop-types",
Expand Down
2 changes: 1 addition & 1 deletion public/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@
font-family: sans-serif;
}</style><link rel="shortcut icon" type="image/x-icon" href="./favicon.ico"><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css"><script src="https://cdn.jsdelivr.net/npm/flatpickr"></script></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the storybook config.</li><li>Try reloading the page.</li></ul></div></div><div class="sb-errordisplay sb-wrapper"><div id="error-message" class="sb-heading"></div><pre class="sb-errordisplay_code">
<code id="error-stack"></code>
</pre></div><div id="root"></div><script src="runtime~main.1f7f55490f68501b18a0.bundle.js"></script><script src="vendors~main.1f7f55490f68501b18a0.bundle.js"></script><script src="main.1f7f55490f68501b18a0.bundle.js"></script></body></html>
</pre></div><div id="root"></div><script src="runtime~main.674e5333f9cec70457db.bundle.js"></script><script src="vendors~main.674e5333f9cec70457db.bundle.js"></script><script src="main.674e5333f9cec70457db.bundle.js"></script></body></html>
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
}
} catch (e) {
console.warn('unable to connect to parent frame for connecting dev tools');
}</script></head><body><div id="root"></div><script src="./sb_dll/storybook_ui_dll.js"></script><script src="runtime~main.3aaa912fd37e258bb4b5.bundle.js"></script><script src="vendors~main.1098902c1f674fe0fc44.bundle.js"></script><script src="main.676e7517a98f63e4d30e.bundle.js"></script></body></html>
}</script></head><body><div id="root"></div><script src="./sb_dll/storybook_ui_dll.js"></script><script src="runtime~main.bf7f1bbd18bd2f1ec8df.bundle.js"></script><script src="vendors~main.172548aa8c101e0511a5.bundle.js"></script><script src="main.251ca9c6c53164291214.bundle.js"></script></body></html>
61 changes: 37 additions & 24 deletions public/index.story.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ storiesOf('React StreamField demo', module)
],
value: [{ type: 'title', value: 'Wagtail is awesome!' }]
};
return <StreamField {...props} id='stream-1' />;
return <StreamField {...props} id='stream' />;
})
.add('1 open block type', () => {
const props = {
Expand All @@ -41,7 +41,7 @@ storiesOf('React StreamField demo', module)
],
value: [{ type: 'title', value: 'Wagtail is awesome!' }]
};
return <StreamField {...props} id='stream-2' />;
return <StreamField {...props} id='stream' />;
})
.add('1 static block type', () => {
const props = {
Expand All @@ -55,7 +55,7 @@ storiesOf('React StreamField demo', module)
],
value: [{ type: 'static' }]
};
return <StreamField {...props} id='stream-3' />;
return <StreamField {...props} id='stream' />;
})
.add('1 block type, default value', () => {
const props = {
Expand All @@ -71,7 +71,7 @@ storiesOf('React StreamField demo', module)
],
value: [{ type: 'title', value: 'Wagtail is awesome!' }]
};
return <StreamField {...props} id='stream-4' />;
return <StreamField {...props} id='stream' />;
})
.add('1 block type, custom per-value HTML', () => {
const props = {
Expand All @@ -94,7 +94,7 @@ storiesOf('React StreamField demo', module)
{ type: 'title', value: 'This time, no custom HTML.' }
]
};
return <StreamField {...props} id='stream-5' />;
return <StreamField {...props} id='stream' />;
})
.add('2 block types', () => {
const props = {
Expand All @@ -118,7 +118,7 @@ storiesOf('React StreamField demo', module)
{ type: 'text', value: 'And it’s always getting better 😃' }
]
};
return <StreamField {...props} id='stream-6' />;
return <StreamField {...props} id='stream' />;
})
.add('List block, 1 child block type', () => {
const props = {
Expand All @@ -142,7 +142,7 @@ storiesOf('React StreamField demo', module)
]
};

return <StreamField {...props} id='stream-7' />;
return <StreamField {...props} id='stream' />;
})
.add('List block, 1 child block type, default value', () => {
const props = {
Expand All @@ -161,7 +161,7 @@ storiesOf('React StreamField demo', module)
],
value: []
};
return <StreamField {...props} id='stream-8' />;
return <StreamField {...props} id='stream' />;
})
.add('List block, 1 child block type, custom HTML', () => {
const props = {
Expand All @@ -176,12 +176,12 @@ storiesOf('React StreamField demo', module)
}
],
html:
'As you can see by this text, it’s possible <strong>to insert some HTML</strong> before or after the contained blocks. <noscript data-blocks-container /> You can even have multiple times the same blocks container. <noscript data-blocks-container /> Can’t think of a case where that would be useful, but still, it’s possible if you really want it.'
'As you can see by this text, it’s possible <strong>to insert some HTML</strong> before or after the contained blocks. <noscript data-blocks-container></noscript> You can even have multiple times the same blocks container. <noscript data-blocks-container></noscript> Can’t think of a case where that would be useful, but still, it’s possible if you really want it.'
}
],
value: []
};
return <StreamField {...props} id='stream-9' />;
return <StreamField {...props} id='stream' />;
})
.add('List block, 2 children block types with groups', () => {
const props = {
Expand Down Expand Up @@ -228,7 +228,7 @@ storiesOf('React StreamField demo', module)
}
]
};
return <StreamField {...props} id='stream-10' />;
return <StreamField {...props} id='stream' />;
})
.add('Simple block layout', () => {
const props = {
Expand Down Expand Up @@ -261,7 +261,7 @@ storiesOf('React StreamField demo', module)
{ type: 'static' }
]
};
return <StreamField {...props} id='stream-11' />;
return <StreamField {...props} id='stream' />;
})
.add('Mixed block layouts', () => {
const props = {
Expand Down Expand Up @@ -293,7 +293,20 @@ storiesOf('React StreamField demo', module)
{ type: 'static' }
]
};
return <StreamField {...props} id='stream-12' />;
return <StreamField {...props} id='stream' />;
})
.add('Gutter of add buttons', () => {
const props = {
required: true,
gutteredAdd: true,
blockDefinitions: [
{
key: 'text',
}
],
value: []
};
return <StreamField {...props} id='stream' />
})
.add('Maximum number of blocks', () => {
const props = {
Expand All @@ -319,7 +332,7 @@ storiesOf('React StreamField demo', module)
}
]
};
return <StreamField {...props} id='stream-13' />;
return <StreamField {...props} id='stream' />;
})
.add('Error in one of the nested blocks', () => {
const props = {
Expand All @@ -345,7 +358,7 @@ storiesOf('React StreamField demo', module)
}
]
};
return <StreamField {...props} id='stream-14' />;
return <StreamField {...props} id='stream' />;
})
.add('Struct block', () => {
const props = {
Expand All @@ -366,7 +379,7 @@ storiesOf('React StreamField demo', module)
],
value: []
};
return <StreamField {...props} id='stream-15' />;
return <StreamField {...props} id='stream' />;
})
.add('Struct block with default value', () => {
const props = {
Expand All @@ -390,7 +403,7 @@ storiesOf('React StreamField demo', module)
value: []
};

return <StreamField {...props} id='stream-16' />;
return <StreamField {...props} id='stream' />;
})
.add('Struct block with custom HTML', () => {
const props = {
Expand All @@ -408,12 +421,12 @@ storiesOf('React StreamField demo', module)
],
label: 'Struct',
html:
'Like for lists, we can add HTML before struct fields <noscript data-blocks-container /> and after as well.'
'Like for lists, we can add HTML before struct fields <noscript data-blocks-container></noscript> and after as well.'
}
],
value: []
};
return <StreamField {...props} id='stream-17' />;
return <StreamField {...props} id='stream' />;
})
.add('Struct block as a struct block field', () => {
const props = {
Expand Down Expand Up @@ -449,7 +462,7 @@ storiesOf('React StreamField demo', module)
}
]
};
return <StreamField {...props} id='stream-18' />;
return <StreamField {...props} id='stream' />;
})
.add('StructBlock as a list block child', () => {
const props = {
Expand Down Expand Up @@ -477,10 +490,10 @@ storiesOf('React StreamField demo', module)
],
value: []
};
return <StreamField {...props} id='stream-19' />;
return <StreamField {...props} id='stream' />;
})
.add('Complex nested StreamField', () => {
return <StreamField {...complexNestedStreamField} id='stream-20' />;
return <StreamField {...complexNestedStreamField} id='stream' />;
})
.add('Custom action icons', () => {
const props = {
Expand All @@ -504,7 +517,7 @@ storiesOf('React StreamField demo', module)
value: [{ type: 'title', value: 'Wagtail is awesome!' }]
};

return <StreamField {...props} id='stream-21' />;
return <StreamField {...props} id='stream' />;
})
.add('JavaScript widget', () => {
const props = {
Expand All @@ -520,5 +533,5 @@ storiesOf('React StreamField demo', module)
],
value: [],
};
return <StreamField {...props} id="stream-22" />;
return <StreamField {...props} id="stream" />;
});
2 changes: 0 additions & 2 deletions public/main.1f7f55490f68501b18a0.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion public/main.1f7f55490f68501b18a0.bundle.js.map

This file was deleted.

1 change: 1 addition & 0 deletions public/main.251ca9c6c53164291214.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions public/main.674e5333f9cec70457db.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/main.674e5333f9cec70457db.bundle.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion public/main.676e7517a98f63e4d30e.bundle.js

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0dbeca5

Please sign in to comment.