client/public/elements/external/index.js
/**
 * @function initAE
 * @description attempts to load Aggie Experts custom elements by bundle.  Bundles can be
 * loaded by:
 * 
 *  - Providing the bundle name in the AGGIE_EXPERTS_LOADER.bundles array
 *  - Providing the element name in the AGGIE_EXPERTS_LOADER.elements array
 *  - Having the element defined in the main DOM on load 
 */
@function initAE
@description attempts to load Aggie Experts custom elements by bundle.  Bundles can be
loaded by.

- Providing the bundle name in the AGGIE_EXPERTS_LOADER.bundles array
- Providing the element name in the AGGIE_EXPERTS_LOADER.elements array
- Having the element defined in the main DOM on load
@function initAE @description attempts to load Aggie Experts custom elements by bundle . Bundles can be loaded by . - Providing the bundle name in the AGGIE_EXPERTS_LOADER . bundles array - Providing the element name in the AGGIE_EXPERTS_LOADER . elements array - Having the element defined in the main DOM on load
function initAE() {
  (AGGIE_EXPERTS_LOADER.bundles || []).forEach(name => loadBundle(name));
  (AGGIE_EXPERTS_LOADER.elements || []).forEach(ele => {
    for( let name in BUNDLES ) {
      if( BUNDLES[name].includes(ele) ) {
        loadBundle(name);
        return;
      }
    }
    console.warn('Unknown aggie experts element name: '+ele);
  });
  let styleEle = document.createElement('style');
  styleEle.innerHTML = properties;
  document.head.appendChild(styleEle);
  for( let name in BUNDLES ) {
    let ele = document.querySelector(BUNDLES[name].join(', '));
    if( ele ) loadBundle(name);
  }
}
function initAE ( ) { ( AGGIE_EXPERTS_LOADER . bundles || [ ] ) . forEach ( name => loadBundle ( name ) ) ; ( AGGIE_EXPERTS_LOADER . elements || [ ] ) . forEach ( ele => { for ( let name in BUNDLES ) { if ( BUNDLES [ name ] . includes ( ele ) ) { loadBundle ( name ) ; return ; } } console . warn ( 'Unknown aggie experts element name: ' + ele ) ; } ) ; let styleEle = document . createElement ( 'style' ) ; styleEle . innerHTML = properties ; document . head . appendChild ( styleEle ) ; for ( let name in BUNDLES ) { let ele = document . querySelector ( BUNDLES [ name ] . join ( ', ' ) ) ; if ( ele ) loadBundle ( name ) ; } }
@function initAE
 @description attempts to load Aggie Experts custom elements by bundle.
@function initAE @description attempts to load Aggie Experts custom elements by bundle .
// load any user specified bundles // load any user specified elements // inject custom style definition // scan for elements