diff --git a/fastn-js/src/to_js.rs b/fastn-js/src/to_js.rs index 5ecf155587..470c771971 100644 --- a/fastn-js/src/to_js.rs +++ b/fastn-js/src/to_js.rs @@ -264,7 +264,7 @@ impl fastn_js::InstantiateComponent { "{}: {}", fastn_js::utils::name_to_js_(k), if *is_mutable { - format!("fastn.mutable({})", value.to_js()) + format!("fastn.wrapMutable({})", value.to_js()) } else { value.to_js() } @@ -517,7 +517,7 @@ impl fastn_js::Component { local_arguments_dependent.push((argument_name.to_owned(), value.to_owned())); } else { let value = if *is_mutable { - format!("fastn.mutable({})", value.to_js()) + format!("fastn.wrapMutable({})", value.to_js()) } else { value.to_js() }; diff --git a/ftd/t/js/05-dynamic-dom-list.html b/ftd/t/js/05-dynamic-dom-list.html index 46566ad274..fafba33a15 100644 --- a/ftd/t/js/05-dynamic-dom-list.html +++ b/ftd/t/js/05-dynamic-dom-list.html @@ -53,7 +53,7 @@ return (fastn_utils.getter(index) % 2 == fastn_utils.getter(global.foo__value)); }, function (root) { let rooti0 = foo__counter_list(root, inherited, { - counter: item + counter: fastn.wrapMutable(item) }); return rooti0; }).getParent(); diff --git a/ftd/t/js/11-device.html b/ftd/t/js/11-device.html index 2867ad2df2..4e292e167b 100644 --- a/ftd/t/js/11-device.html +++ b/ftd/t/js/11-device.html @@ -76,7 +76,7 @@ __fastn_package_name__ = "foo"; try { let __args__ = { - show: fastn.mutable(true), + show: fastn.wrapMutable(true), }; inherited = fastn_utils.getInheritedValues(__args__, inherited, args); __args__ = fastn_utils.getArgs(__args__, args); diff --git a/ftd/t/js/28-mutable-component-arguments.html b/ftd/t/js/28-mutable-component-arguments.html index 993fb94f47..0b37dfeb34 100644 --- a/ftd/t/js/28-mutable-component-arguments.html +++ b/ftd/t/js/28-mutable-component-arguments.html @@ -41,8 +41,8 @@ __fastn_package_name__ = "foo"; try { let __args__ = { - a: fastn.mutable(1), - clicked: fastn.mutable(false), + a: fastn.wrapMutable(1), + clicked: fastn.wrapMutable(false), }; inherited = fastn_utils.getInheritedValues(__args__, inherited, args); __args__ = fastn_utils.getArgs(__args__, args); diff --git a/ftd/t/js/28-web-component.html b/ftd/t/js/28-web-component.html index 29139fe4ca..51bd4c0582 100644 --- a/ftd/t/js/28-web-component.html +++ b/ftd/t/js/28-web-component.html @@ -36,7 +36,7 @@ }); let parenti1 = foo__word_count(parent, inherited, { body: "This, is, the, body.", - count: global.foo__count + count: fastn.wrapMutable(global.foo__count) }); } finally { __fastn_package_name__ = __fastn_super_package_name__; diff --git a/ftd/t/js/29-dom-list.html b/ftd/t/js/29-dom-list.html index e32f1916ad..404f405050 100644 --- a/ftd/t/js/29-dom-list.html +++ b/ftd/t/js/29-dom-list.html @@ -79,7 +79,7 @@ }); fastn_utils.getter(global.foo__counters).forLoop(parent, function (root, item, index) { let rooti0 = foo__counter_list(root, inherited, { - counter: item + counter: fastn.wrapMutable(item) }); return rooti0; }); diff --git a/ftd/t/js/30-web-component.html b/ftd/t/js/30-web-component.html index aa03a04915..c120b8e986 100644 --- a/ftd/t/js/30-web-component.html +++ b/ftd/t/js/30-web-component.html @@ -122,8 +122,8 @@ try { let __args__ = { show_link: false, - mouse_in: fastn.mutable(false), - input_value: fastn.mutable(null), + mouse_in: fastn.wrapMutable(false), + input_value: fastn.wrapMutable(null), }; inherited = fastn_utils.getInheritedValues(__args__, inherited, args); __args__ = fastn_utils.getArgs(__args__, args); @@ -241,7 +241,7 @@ __fastn_package_name__ = "foo"; try { let __args__ = { - todo_list: fastn.mutable(fastn.mutableList([])), + todo_list: fastn.wrapMutable(fastn.mutableList([])), }; inherited = fastn_utils.getInheritedValues(__args__, inherited, args); __args__ = fastn_utils.getArgs(__args__, args); @@ -417,7 +417,7 @@ rooti0.setProperty(fastn_dom.PropertyKind.Children, fastn.mutableList([function (root, inherited) { let rooti0 = foo__todo_list_display(root, inherited, { name: global.foo__task, - todo_list: global.foo__todo_list + todo_list: fastn.wrapMutable(global.foo__todo_list) }); } ]), inherited); diff --git a/ftd/t/js/31-advance-list.html b/ftd/t/js/31-advance-list.html index 57173fb553..bcd3a8d8ca 100644 --- a/ftd/t/js/31-advance-list.html +++ b/ftd/t/js/31-advance-list.html @@ -134,7 +134,7 @@ __fastn_package_name__ = "foo"; try { let __args__ = { - ns: fastn.mutable(fastn_utils.clone(global.foo__ns)), + ns: fastn.wrapMutable(fastn_utils.clone(global.foo__ns)), }; inherited = fastn_utils.getInheritedValues(__args__, inherited, args); __args__ = fastn_utils.getArgs(__args__, args); diff --git a/ftd/t/js/32-ftd-len.html b/ftd/t/js/32-ftd-len.html index aca3f07460..e522546bc9 100644 --- a/ftd/t/js/32-ftd-len.html +++ b/ftd/t/js/32-ftd-len.html @@ -132,7 +132,7 @@ __fastn_package_name__ = "foo"; try { let __args__ = { - current_value: fastn.mutable(null), + current_value: fastn.wrapMutable(null), }; inherited = fastn_utils.getInheritedValues(__args__, inherited, args); __args__ = fastn_utils.getArgs(__args__, args); diff --git a/ftd/t/js/34-ftd-ui.html b/ftd/t/js/34-ftd-ui.html index a0a40a082f..4f4fe27d34 100644 --- a/ftd/t/js/34-ftd-ui.html +++ b/ftd/t/js/34-ftd-ui.html @@ -62,7 +62,7 @@ try { let __args__ = { s: fastn.mutableList([]), - is_active: fastn.mutable(0), + is_active: fastn.wrapMutable(0), }; inherited = fastn_utils.getInheritedValues(__args__, inherited, args); __args__ = fastn_utils.getArgs(__args__, args); diff --git a/ftd/t/js/37-expander.html b/ftd/t/js/37-expander.html index 91296c1625..67b4e371b0 100644 --- a/ftd/t/js/37-expander.html +++ b/ftd/t/js/37-expander.html @@ -94,7 +94,7 @@ let __args__ = { title: "default header", body: "default body", - open: fastn.mutable(false), + open: fastn.wrapMutable(false), }; inherited = fastn_utils.getInheritedValues(__args__, inherited, args); __args__ = fastn_utils.getArgs(__args__, args); diff --git a/ftd/t/js/52-events.html b/ftd/t/js/52-events.html index 17311a06bb..8983db0826 100644 --- a/ftd/t/js/52-events.html +++ b/ftd/t/js/52-events.html @@ -128,7 +128,7 @@ try { let __args__ = { names: fastn.mutableList([]), - selected: fastn.mutable(0), + selected: fastn.wrapMutable(0), }; inherited = fastn_utils.getInheritedValues(__args__, inherited, args); __args__ = fastn_utils.getArgs(__args__, args); @@ -155,7 +155,7 @@ let rooti0 = foo__display_name(root, inherited, { name: item, idx: index, - selected: __args__.selected + selected: fastn.wrapMutable(__args__.selected) }); return rooti0; }); diff --git a/ftd/t/js/67-counter.html b/ftd/t/js/67-counter.html index 472c69ae5e..63f4bb0dae 100644 --- a/ftd/t/js/67-counter.html +++ b/ftd/t/js/67-counter.html @@ -41,10 +41,10 @@ __fastn_package_name__ = "foo"; try { let parenti0 = foo__counter(parent, inherited, { - count: fastn.mutable(10) + count: fastn.wrapMutable(10) }); let parenti1 = foo__counter(parent, inherited, { - count: fastn.mutable(10) + count: fastn.wrapMutable(10) }); } finally { __fastn_package_name__ = __fastn_super_package_name__; @@ -56,7 +56,7 @@ __fastn_package_name__ = "foo"; try { let __args__ = { - count: fastn.mutable(20), + count: fastn.wrapMutable(20), }; inherited = fastn_utils.getInheritedValues(__args__, inherited, args); __args__ = fastn_utils.getArgs(__args__, args);