Comparing version 0.8.3 to 0.8.4
@@ -150,3 +150,3 @@ function _define_property(obj, key, value) { | ||
dataEl.remove(); | ||
return new this(hydration_data.data).hydrateFromSSR(element); | ||
return new this(hydration_data.data, ...hydration_data.args).hydrateFromSSR(element); | ||
} | ||
@@ -153,0 +153,0 @@ } |
@@ -85,2 +85,3 @@ function _define_property(obj, key, value) { | ||
data: this.data, | ||
args: this._args, | ||
sharedData: rune.getSharedData(this), | ||
@@ -125,6 +126,7 @@ key: this.key | ||
} | ||
constructor(data){ | ||
constructor(data, ...args){ | ||
super(); | ||
_define_property(this, "key", ""); | ||
_define_property(this, "_data", void 0); | ||
_define_property(this, "_args", void 0); | ||
_define_property(this, "parentView", null); | ||
@@ -136,2 +138,3 @@ _define_property(this, "subViewsFromTemplate", []); | ||
this._data = data; | ||
this._args = args; | ||
} | ||
@@ -138,0 +141,0 @@ } |
@@ -160,3 +160,3 @@ "use strict"; | ||
dataEl.remove(); | ||
return new this(hydration_data.data).hydrateFromSSR(element); | ||
return new this(hydration_data.data, ...hydration_data.args).hydrateFromSSR(element); | ||
} | ||
@@ -163,0 +163,0 @@ } |
@@ -5,2 +5,3 @@ import { Base } from './Base'; | ||
private readonly _data; | ||
readonly _args: any; | ||
parentView: VirtualView<object> | null; | ||
@@ -13,3 +14,3 @@ subViewsFromTemplate: VirtualView<object>[]; | ||
set data(data: T); | ||
constructor(data: T); | ||
constructor(data: T, ...args: any); | ||
protected template(data: T): Html; | ||
@@ -16,0 +17,0 @@ templateAsync(data: T): Promise<Html>; |
@@ -115,2 +115,3 @@ "use strict"; | ||
data: this.data, | ||
args: this._args, | ||
sharedData: _rune.rune.getSharedData(this), | ||
@@ -155,6 +156,7 @@ key: this.key | ||
} | ||
constructor(data){ | ||
constructor(data, ...args){ | ||
super(); | ||
_define_property(this, "key", ""); | ||
_define_property(this, "_data", void 0); | ||
_define_property(this, "_args", void 0); | ||
_define_property(this, "parentView", null); | ||
@@ -166,2 +168,3 @@ _define_property(this, "subViewsFromTemplate", []); | ||
this._data = data; | ||
this._args = args; | ||
} | ||
@@ -168,0 +171,0 @@ } |
{ | ||
"name": "rune-ts", | ||
"version": "0.8.3", | ||
"version": "0.8.4", | ||
"description": "Rune Core Library", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -191,3 +191,3 @@ import { rune } from './rune'; | ||
dataEl.remove(); | ||
return new this(hydration_data.data).hydrateFromSSR(element); | ||
return new this(hydration_data.data, ...hydration_data.args).hydrateFromSSR(element); | ||
} | ||
@@ -194,0 +194,0 @@ } |
@@ -10,2 +10,3 @@ import { _escape } from './lib/_escape'; | ||
private readonly _data: T; | ||
readonly _args: any; | ||
@@ -27,5 +28,6 @@ parentView: VirtualView<object> | null = null; | ||
constructor(data: T) { | ||
constructor(data: T, ...args: any) { | ||
super(); | ||
this._data = data; | ||
this._args = args; | ||
} | ||
@@ -69,2 +71,3 @@ | ||
data: this.data, | ||
args: this._args, | ||
sharedData: rune.getSharedData(this), | ||
@@ -71,0 +74,0 @@ key: this.key, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
289350
5260