Component.js |
Component holds the reactive logic for a DOM element
|
3690 |
DataCollection.js |
DataCollection represents an ordered list of DataModel instances
options:
dataObject (DataModel): the DataObject extending class to use to wrap each data item in this collection
|
4875 |
DataModel.js |
DataModel holds a map of string,value pairs, sometimes fetched from or sent to a back-end server.
It fires events when values are changed.
options:
fieldDataObjects ({}): a map of fieldName (string) to DataObject (class), used to create sub-object in this Model's data
|
3110 |
DataObject.js |
The parent class for DataModel and DataCollection
It holds the event mixin and the generic function of fetching data from a remote service
|
3568 |
El.js |
Functions that generate DOM elements like el.div(...) will live in el
|
5471 |
EventListener.js |
EventListener holds information about listeners on an object with the eventMixin
|
556 |
EventMixin.js |
Mix EventMixin to enable the instances to track event listeners and send them events
Use it like so: var YourClass = EventMixin(class { ... })
See DataObject for an example.
|
1430 |
main.js |
This is used by webpack to create a single `dist/potassium.js` file for easy inclusion.
You could `import` this file (main.js) as an ES2015 module if you want a global `k` variable as if you loaded `dist/potassium.js`.
If you're using ES2015 modules then you probably should just directly `import` the classes from their individual files in this directory:
import Component from './potassium/Component.js'
import DataModel from './potassium/DataModel.js'
|
977 |
README.md |
These files are part of the [PotassiumES](https://github.com/trevorfsmith/potassium) source code, which is copyright [Trevor F. Smith](https://trevor.smith.name/) (subs@trevor.smith.name) and released with NO WARRENTY AT ALL under the [MIT License](https://github.com/TrevorFSmith/potassium/blob/master/LICENSE). |
313 |
Router.js |
Router maps window.history events and URL path fragments to events
For example, routing /^blog\/([0-9]+)\/page\/([0-9a-z]+)$/ to an event with parameters for blog and page IDs
|
1477 |