pull/1552/head
Pavel Malyshev 7 years ago
parent 9cd5dd9fbc
commit 52ece0b5f0

@ -123,7 +123,7 @@ export default class Component extends Node {
const name = this.var; const name = this.var;
const componentInitProperties = [`root: #component.root`]; const componentInitProperties = [`root: #component.root`, `store: #component.store`];
if (this.children.length > 0) { if (this.children.length > 0) {
const slots = Array.from(this._slots).map(name => `${quoteNameIfNecessary(name)}: @createFragment()`); const slots = Array.from(this._slots).map(name => `${quoteNameIfNecessary(name)}: @createFragment()`);

@ -64,7 +64,7 @@ export function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
export function on(eventName, handler) { export function on(eventName, handler) {

@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -90,7 +90,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -93,7 +93,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -1,4 +1,4 @@
/* src/Main.html generated by Svelte vx.y.z */ /* src/Main.html generated by Svelte v2.7.2 */
import Widget from './Widget.html'; import Widget from './Widget.html';
@ -6,7 +6,8 @@ import Widget from './Widget.html';
function create_main_fragment(component, ctx) { function create_main_fragment(component, ctx) {
var widget = new Widget({ var widget = new Widget({
root: component.root root: component.root,
store: component.store
}); });
return { return {
@ -72,7 +73,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -1 +1 @@
{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["<Widget/>\n\n<script>\n\timport Widget from './Widget.html';\n\n\texport default {\n\t\tcomponents: {\n\t\t\tWidget\n\t\t}\n\t};\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} {"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["<Widget/>\n\n<script>\n\timport Widget from './Widget.html';\n\n\texport default {\n\t\tcomponents: {\n\t\t\tWidget\n\t\t}\n\t};\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

@ -1,4 +1,4 @@
/* src/Widget.html generated by Svelte vx.y.z */ /* src/Widget.html generated by Svelte v2.7.2 */
function create_main_fragment(component, ctx) { function create_main_fragment(component, ctx) {
var p; var p;
@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -6,7 +6,8 @@ import Widget from './widget/Widget.html';
function create_main_fragment(component, ctx) { function create_main_fragment(component, ctx) {
var widget = new Widget({ var widget = new Widget({
root: component.root root: component.root,
store: component.store
}); });
return { return {
@ -72,7 +73,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -6,7 +6,8 @@ import Widget from './Widget.html';
function create_main_fragment(component, ctx) { function create_main_fragment(component, ctx) {
var widget = new Widget({ var widget = new Widget({
root: component.root root: component.root,
store: component.store
}); });
return { return {
@ -72,7 +73,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -90,7 +90,7 @@ var Main = (function(answer) { "use strict";
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -85,7 +85,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function assign(tar, src) { function assign(tar, src) {

@ -61,7 +61,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -93,7 +93,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -49,7 +49,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {
@ -124,6 +124,7 @@ function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: [1, 2, 3] }; var nested_initial_data = { foo: [1, 2, 3] };
var nested = new Nested({ var nested = new Nested({
root: component.root, root: component.root,
store: component.store,
data: nested_initial_data data: nested_initial_data
}); });

@ -8,6 +8,7 @@ function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: [1, 2, 3] }; var nested_initial_data = { foo: [1, 2, 3] };
var nested = new Nested({ var nested = new Nested({
root: component.root, root: component.root,
store: component.store,
data: nested_initial_data data: nested_initial_data
}); });

@ -53,7 +53,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {
@ -128,6 +128,7 @@ function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({
root: component.root, root: component.root,
store: component.store,
data: nested_initial_data data: nested_initial_data
}); });

@ -8,6 +8,7 @@ function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({
root: component.root, root: component.root,
store: component.store,
data: nested_initial_data data: nested_initial_data
}); });

@ -53,7 +53,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {
@ -128,6 +128,7 @@ function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({
root: component.root, root: component.root,
store: component.store,
data: nested_initial_data data: nested_initial_data
}); });

@ -8,6 +8,7 @@ function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({
root: component.root, root: component.root,
store: component.store,
data: nested_initial_data data: nested_initial_data
}); });

@ -49,7 +49,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {
@ -124,6 +124,7 @@ function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({
root: component.root, root: component.root,
store: component.store,
data: nested_initial_data data: nested_initial_data
}); });

@ -8,6 +8,7 @@ function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" }; var nested_initial_data = { foo: "bar" };
var nested = new Nested({ var nested = new Nested({
root: component.root, root: component.root,
store: component.store,
data: nested_initial_data data: nested_initial_data
}); });

@ -49,7 +49,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -65,7 +65,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -61,7 +61,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -79,7 +79,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -54,7 +54,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -82,7 +82,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -65,7 +65,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -81,7 +81,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -391,7 +391,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -164,7 +164,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -61,7 +61,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -61,7 +61,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -65,7 +65,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -65,7 +65,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -65,7 +65,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -65,7 +65,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -65,7 +65,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -65,7 +65,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -77,7 +77,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -73,7 +73,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -67,7 +67,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -77,7 +77,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -63,7 +63,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {
@ -137,11 +137,13 @@ function create_main_fragment(component, ctx) {
var text; var text;
var imported = new Imported({ var imported = new Imported({
root: component.root root: component.root,
store: component.store
}); });
var nonimported = new NonImported({ var nonimported = new NonImported({
root: component.root root: component.root,
store: component.store
}); });
return { return {

@ -8,11 +8,13 @@ function create_main_fragment(component, ctx) {
var text; var text;
var imported = new Imported({ var imported = new Imported({
root: component.root root: component.root,
store: component.store
}); });
var nonimported = new NonImported({ var nonimported = new NonImported({
root: component.root root: component.root,
store: component.store
}); });
return { return {

@ -49,7 +49,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -49,7 +49,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -73,7 +73,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

@ -69,7 +69,7 @@ function init(component, options) {
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
component.store = component.root.store || options.store; component.store = options.store || component.root.store;
} }
function on(eventName, handler) { function on(eventName, handler) {

Loading…
Cancel
Save