|
@@ -21,7 +21,7 @@ namespace Spry {
|
|
|
// No-op default
|
|
// No-op default
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private ComponentUriProvider _uri_provider = inject<ComponentUriProvider>();
|
|
|
|
|
|
|
+ private PathProvider _path_provider = inject<PathProvider>();
|
|
|
private Catalogue<string, Renderable> _children = new Catalogue<string, Renderable>();
|
|
private Catalogue<string, Renderable> _children = new Catalogue<string, Renderable>();
|
|
|
private HashSet<Component> _global_sources = new HashSet<Component>();
|
|
private HashSet<Component> _global_sources = new HashSet<Component>();
|
|
|
private MarkupDocument _instance;
|
|
private MarkupDocument _instance;
|
|
@@ -136,7 +136,7 @@ namespace Spry {
|
|
|
var component_action = action[1];
|
|
var component_action = action[1];
|
|
|
|
|
|
|
|
node.remove_attribute("spry-action");
|
|
node.remove_attribute("spry-action");
|
|
|
- node.set_attribute("hx-get", _uri_provider.get_action_uri(component_name, component_action));
|
|
|
|
|
|
|
+ node.set_attribute("hx-get", _path_provider.get_action_path(component_name, component_action));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
var target_nodes = final_instance.select("//*[@spry-target]");
|
|
var target_nodes = final_instance.select("//*[@spry-target]");
|
|
@@ -156,6 +156,15 @@ namespace Spry {
|
|
|
node.set_attribute("hx-swap-oob", @"[spry-global=\"$key\"]");
|
|
node.set_attribute("hx-swap-oob", @"[spry-global=\"$key\"]");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ var script_nodes = final_instance.select("//script[@spry-res]");
|
|
|
|
|
+ foreach(var node in script_nodes) {
|
|
|
|
|
+ var res = StaticResource.from_identifier(node.get_attribute("spry-res"))?.get_path();
|
|
|
|
|
+ if(res != null) {
|
|
|
|
|
+ node.set_attribute("src", res);
|
|
|
|
|
+ }
|
|
|
|
|
+ node.remove_attribute("spry-res");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// Remove all internal SIDs
|
|
// Remove all internal SIDs
|
|
|
final_instance.select("//*[@sid]")
|
|
final_instance.select("//*[@sid]")
|
|
|
.iterate(n => n.remove_attribute("sid"));
|
|
.iterate(n => n.remove_attribute("sid"));
|
|
@@ -184,6 +193,8 @@ namespace Spry {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|