Support for .screen() plugin API
Adds `.screen()` plugin API method for adding plugin-provided
screens. Such screens only have common headers and footers, while rest
of the page is filled with the registered web component.
Any navigation to URL containing `#/x/` hash results in client-only
redirect to `/x/` and showing appropriate plugin-provided screen.
Adds a `plugin.screenUrl()` method for generating consistent URLs for
such screens.
Adds an example plugin with number of ways the provided API can be used.
Adds partial support for GWT UI `.screen()` method. Notable difference -
does not support RegExp for the screen matching.
Change-Id: I0be3dee8eba6f8535a1fb2be05f473f3649bad8f
diff --git a/Documentation/pg-plugin-dev.txt b/Documentation/pg-plugin-dev.txt
index dbcbe49..a3f1e55 100644
--- a/Documentation/pg-plugin-dev.txt
+++ b/Documentation/pg-plugin-dev.txt
@@ -161,11 +161,14 @@
`plugin.hook(endpointName, opt_options)`
See list of supported link:pg-plugin-endpoints.html[endpoints].
+
Note: TODO
=== registerCustomComponent
`plugin.registerCustomComponent(endpointName, opt_moduleName, opt_options)`
+See list of supported link:pg-plugin-endpoints.html[endpoints].
+
Note: TODO
=== registerStyleModule
@@ -239,6 +242,28 @@
Note: TODO
+=== screen
+`plugin.screen(screenName, opt_moduleName)`
+
+.Params:
+- `*string* screenName` URL path fragment of the screen, e.g.
+`/x/pluginname/*screenname*`
+- `*string* opt_moduleName` (Optional) Web component to be instantiated for this
+screen.
+
+.Returns:
+- Instance of GrDomHook.
+
+=== screenUrl
+`plugin.url(opt_screenName)`
+
+.Params:
+- `*string* screenName` (optional) URL path fragment of the screen, e.g.
+`/x/pluginname/*screenname*`
+
+.Returns:
+- Absolute URL for the screen, e.g. `http://localhost/base/x/pluginname/screenname`
+
=== theme
`plugin.theme()`