Create a new component space
The defaultComponent is the default component path.
It should be defined soon after creation.
A baseSpace can be provided as a "base" component space -
every component alias (and behavior alias) in the space will be imported when creation.
However, if any new component is added to the base space after the creation,
it will not be added to the created space.
Optional defaultComponent: stringOptional baseSpace: ComponentSpaceOptional styleScopeManager: StyleScopeManagerOptional allowUnusedNativeNode: booleanReadonly hooksThe hooks used to alter some workflow within this component space.
Readonly styleThe corresponding styleScopeManager.
A styleScopeManager can be shared by multiple component spaces.
Create a component by URL
This url can contain params (started with "?" character).
The params will try to be set to component properties (if matches the property name).
Register a component or a behavior with chaining API
Optional is: stringRegister a component in this space
Define a trait behavior
A trait behavior Optionally, the trait behavior can add a conversion function. This function can convert the implementation to another interface.
Register a component or a behavior with chaining API (with method caller type specified)
This API is generally designed for adapters which require special method callers.
Optional is: stringGet a behavior by the path
Similar to getComponentByUrlWithoutDefault() but for behaviors.
Get a component by the path
The component is is actually treated as the "path" of the component.
In other words, the component is field can be a string like path/to/the/component .
Other components can be used by the component with "relative path" specified.
In this method, if the path is given as a relative path (not started with / ),
it will be converted according to the basePath .
If the path is given as a URL-like format,
the component will be searched in imported component spaces ( importSpace() for details).
Get a component by the path
Similar to getComponentByUrl() ,
but returns null instead of the default component if no component was found.
Get a behavior by its exported alias
Get a component by its exported alias
Import another component space
The components in the imported space can be used by components in this space.
The protoDomain should be URL-like, i.e. space://another-space .
When using, the components in the imported space should be specified with protoDomain .
For example, if protoDomain is space://another-space and one imported component has alias my-comp ,
then it should be specified with space://another-space/my-comp .
If privateUse set to false, only component alias in the imported space can be used;
the original name of components is imported otherwise.
Register a component in this space using an existing definition
Set a listener which will be called when a placeholded component is used.
This can be used as a hint for a component that should be registered later.
If isPub is false, the alias is the path of the component, a.k.a. is .
Otherwise, it is the exported alias instead.
Set (or update) a global using component item
This will allow all the components in this component space using this component automatically,
without declaring it with using or usingComponents again.
The target can also be a tag name of a native node.
Update the default component options for this space
The new options will be merged with existing options.
A group of components for cross-component using