New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dynamic-app-core

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamic-app-core

Application Flow Manager tools.

latest
Source
npmnpm
Version
0.5.1
Version published
Maintainers
1
Created
Source

DynamicApp

Application Flow Manager tools.

Introduction

Registers services and components, and manages flexible containers by objects of definitions.

See example dynamic-app-boilerplate.

The innovations

  • Ability to inherit and reuse containers
  • Independence of routing to layout hierarchy
  • Display components and layout according to device type
  • Include components independent of one framework

Let's see what it looks like

the code:


const services = {
  myService_1,
  myService_2
}

const widgets = {
  myComponent_1,
  myComponent_2
}

const containers = { 
  home: {
    route: '/',
    services: {}, // using the services list
    widgets: {} // using the widgets list
  }
}

DynamicApp.setConfig({
  services,
  widgets,
  containers
});

DynamicApp.flash(); // run the app

The functions

// Configs
DynamicApp.setConfig(configs)
DynamicApp.flash()

// Navigator
DynamicApp.goTo(path)
DynamicApp.goBack()

// States
DynamicApp.activeState(states, flash = true)
DynamicApp.unactiveState(states, flash = true)
DynamicApp.getActiveStates(filter)

API

DynamicApp.setConfig({
  
  services: {
    [service_id]: function() {} || Class,
  },

  widgets: {
    [widget_id]: function(el) {} || `template strings`,
  }, 
  
  containers: {
    [container_id]: {
      extends: '[container_id]',
      route: '[window.location(url-pattern)]',
      state: '[hidden-location(url-pattern)]', // using localStorage
      
      services: {
        [item_id]: {
          serviceId: '[service_id]',
          config: {
            [prop]: data || '"My text."' || 'services.[service_item].get(queryParams.[my_param])',
          }
        },
      },
     
      widgets: {
        [item_id]: {
          widgetId: '[widget_id]',
          [includeIn||includeBefore||includeAfter]: '[css selectors]',
          config: {
            [prop]: data || '"My text."' || 'services.[service_item].get(queryParams.[my_param])',
          }
        },
      },
    },
  }
}

license

MIT

Keywords

dynamic-app

FAQs

Package last updated on 04 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts