@wirelineio/appkit

Wireline pads and applications SDK.

Usage no npm install needed!

<script type="module">
  import wirelineioAppkit from 'https://cdn.skypack.dev/@wirelineio/appkit';
</script>

README

appkit

SDK for the development of Web and mobile applications and pads.

withLogView

import { withLogView } from '@wirelineio/appkit';

withLogView({ view, options })(Component);

withLogView HOC provides access to the underlying view. It retrieves item data and subscribes for changes and updates based on the supplied variables.

  • view: {String} The view name. Required.
  • options: {Function(props) => ({ variables: { id } })} Map props or external varibles to return an object with the form of { variables: { id } } where id is the desired itemId. Required.

The Component receives then a property view with the following properties:

  • itemId: {String} The item ID.
  • title: {String} Title.
  • type: {String} The item type.
  • appendChange: {Function(Any)} Function to append a change in the log.
  • log: {Any[]} Array of
  • content: {String} Flat string of changes.
  • update: {Function({title, type})} Updater function for title and type.
  • archive: {Function} Archive this item.
  • unarchive: {Function} Unarchive this item.