node_modules/@jaames/iro/dist/iro.es.js
/**
 * @desc Turn a component into a widget
 * This returns a factory function that can be used to create an instance of the widget component
 * The first function param is a DOM element or CSS selector for the element to mount to,
 * The second param is for config options which are passed to the component as props
 * This factory function can also delay mounting the element into the DOM until the page is ready
 * @param {Component} widgetComonpent ui component to turn into a widget
 * @returns {Function} widget factory
 */
@desc Turn a component into a widget
This returns a factory function that can be used to create an instance of the widget component
The first function param is a DOM element or CSS selector for the element to mount to,
The second param is for config options which are passed to the component as props
This factory function can also delay mounting the element into the DOM until the page is ready
@param {Component} widgetComonpent ui component to turn into a widget
@returns {Function} widget factory
@desc Turn a component into a widget This returns a factory function that can be used to create an instance of the widget component The first function param is a DOM element or CSS selector for the element to mount to The second param is for config options which are passed to the component as props This factory function can also delay mounting the element into the DOM until the page is ready @param { Component } widgetComonpent ui component to turn into a widget @returns { Function } widget factory
function createWidget(widgetComponent) {
  var widgetFactory = function (parent, props) {
    var widget = null; 
    var widgetRoot = document.createElement('div');
    render(
      h(widgetComponent, Object.assign({}, {ref: function (ref) { return widget = ref; }},
        props)),
      widgetRoot
    );
    onDocumentReady(function () {
      var container = parent instanceof Element ? parent : document.querySelector(parent);
      container.appendChild(widget.base);
      widget.onMount(container);
    });
    return widget;
  };
  widgetFactory.prototype = widgetComponent.prototype;
  Object.assign(widgetFactory, widgetComponent);
  widgetFactory.__component = widgetComponent; 
  return widgetFactory;
}
function createWidget ( widgetComponent ) { var widgetFactory = function ( parent , props ) { var widget = null ; var widgetRoot = document . createElement ( 'div' ) ; render ( h ( widgetComponent , Object . assign ( { } , { ref : function ( ref ) { return widget = ref ; } } , props ) ) , widgetRoot ) ; onDocumentReady ( function ( ) { var container = parent instanceof Element ? parent : document . querySelector ( parent ) ; container . appendChild ( widget . base ) ; widget . onMount ( container ) ; } ) ; return widget ; } ; widgetFactory . prototype = widgetComponent . prototype ; Object . assign ( widgetFactory , widgetComponent ) ; widgetFactory . __component = widgetComponent ; return widgetFactory ; }
@desc Turn a component into a widget
 This returns a factory function that can be used to create an instance of the widget component
 The first function param is a DOM element or CSS selector for the element to mount to,
 The second param is for config options which are passed to the component as props
 This factory function can also delay mounting the element into the DOM until the page is ready
 @param {Component} widgetComonpent ui component to turn into a widget
 @returns {Function} widget factory
@desc Turn a component into a widget This returns a factory function that can be used to create an instance of the widget component The first function param is a DOM element or CSS selector for the element to mount to The second param is for config options which are passed to the component as props This factory function can also delay mounting the element into the DOM until the page is ready @param { Component } widgetComonpent ui component to turn into a widget @returns { Function } widget factory
// will become an instance of the widget component class // Render widget into a temp DOM node // Mount it into the DOM when the page document is ready // Allow the widget factory to inherit component prototype + static class methods // This makes it easier for plugin authors to extend the base widget component // Add reference to base component too