Details
-
New Feature
-
Resolution: Unresolved
-
Major
-
None
-
12.8
-
None
-
Hard
-
Description
Create namespaces so that the API is more organized
For instance:
logic.changeLayout logic.filterAdd logic.filterRemove ...
becomes:
logic.layout.change logic.filter.add logic.filter.remove ...
Change method parameters to objects
The goal is to get the API more flexible for now, but also for the future if we need to modify the parameters that a function takes.
For instance:
logic.getPropertyDescriptors() logic.getFilterablePropertyDescriptors() logic.getSortablePropertyDescriptors()
becomes:
logic.properties.getDescriptors({ filterable: true, sortable: true })
Change Livedata configuration object name to config instead of data
The logic object has the logic.data property that contains the whole Livedata configuration (query, data, meta). However, the term "data" is confusing for this object.
Also, fix some variable names so that it stays coherent across files.
Simplify the init method
The Logic.js init method uses WeakMap to create and bind the passed element to it corresponding Livedata instance.
Let's simply that by returning the Logic class instead!