m4d_core library
The core - handles the initialisation process and defines the base-class for all components
Classes
- DataAttribute
- Helper for requesting a proper value from the components HTML-Element
- DomRenderer
- DomRenderer converts a String into HtmlNodes
- ElementProperties
- HasDynamicParentScope
-
For Components like
_MaterialDialogComponent
where it's necessary to change the ParentScope at runtime. For example ifMaterialDialog
pops up the Parent-Scope is set to the new Dialog -
ListChangedEvent<
T> - Propagated if List changes
- M4DService
- Base for all Service-Classes
- MaterialApplication
- Basis for your Application
- MdlAnnotation
- Mustache (+mirrors) needs to know which classes to include
- MdlComponent
- MdlComponentHandler
- A component handler interface using the revealing module design pattern. More details on this pattern design here: https://github.com/jasonmayes/mdl-component-design-pattern (JS-Version: Jason Mayes.)
-
MdlConfig<
T extends MdlComponent> - MdlDataConsumer
- MdlEventListener
-
Mixin to cleanup StreamSubscriptions for MdlComponents and
MaterialDialog
s - MdlPublicFunctionAnnotation
- Helper for Transformer to generate documentation
-
MdlWidgetConfig<
T extends MdlComponent> - Helps to decide what is a real Widget and what is just a helper. MaterialRipple would be such a "helper"
-
ObservableList<
T> -
List that sends
ListChangeEvents
to the listener if this list changes Supported methods: Add, insert, update ([]), remove, clear, removeAll -
ObservableProperty<
T> -
PropertyChangeEvent<
T> - RefreshableComponent
- MdlComponent that has a "refresh" Functions. Best way to invoke this function is via refreshComponentsInSubtree
Constants
- Component → const MdlAnnotation
-
All MDLComponents
const MdlAnnotation()
- Directive → const MdlAnnotation
-
Directives like
Formatter
const MdlAnnotation()
- MDL_COMPONENT_PROPERTY → const String
-
Property for the Components JsObject to save/register the component
"mdlcomponent"
- MdlComponentModel → const MdlAnnotation
-
Helps dryice to know which vars are available to render
const MdlAnnotation()
- Model → const MdlAnnotation
-
Usually used for Templates
const MdlAnnotation()
- public → const MdlPublicFunctionAnnotation
-
const MdlPublicFunctionAnnotation()
Functions
-
componentFactory(
) → MdlComponentHandler -
componentHandler(
) → MdlComponentHandler -
getAllMdlComponents(
HtmlElement element) → List< MdlComponent> - Returns all MdlComponents in subtree
-
isMdlComponent(
HtmlElement element, [Type type]) → bool -
Checks if
element
is a "MDLComponent"type
is optional - if given a stricter check is made -
isMdlWidget(
HtmlElement element) → bool -
Checks if
element
is a "Widget" (usually this means a UI-Element) MdlConfig.isWidget... -
mdlComponent(
HtmlElement element, Type type, {bool showWarning = true}) → MdlComponent -
element
The element where a MDL-Component is registered -
mdlComponentNames(
HtmlElement element) → List< String> -
Gives you all the component names registered for this
element
-
mdlComponents(
HtmlElement element) → List< MdlComponent> -
Returns all the MDL-Components registered for this
element
-
refreshComponentsInSubtree(
HtmlElement element) → void
Enums
Typedefs
-
FormatObservedValue<
T> = String Function(T value, dynamic original, {String format}) - MdlCallback = void Function(HtmlElement element)
- MdlComponentFactory = MdlComponent Function(HtmlElement element, Container iocContainer)
-
ResetObserver<
T> = T Function() -
StaticCast<
T> = T Function(dynamic value) -
UpdateItem<
T> = bool Function(HtmlElement element, T item)
Exceptions / Errors
- MultipleWidgetException
- Thrown if you try to register more than one widget per element Multiple components per element are allowed but not multiple widgets!
- WrongComponentTypeException