Resources/public/js/editor/src/app.js
/**
 * The function that will trigger the editor
 *
 * @param element {string|Object} The dom element to trigger the editor
 * @param configuration : Object containing the editor configuration (api url, etc)
 * @param [formProperties] : Object containing the properties of the default form
 */
The function that will trigger the editor
@param element {string|Object} The dom element to trigger the editor
@param configuration : Object containing the editor configuration (api url, etc)
@param [formProperties] : Object containing the properties of the default form
The function that will trigger the editor @param element { string|Object } The dom element to trigger the editor @param configuration : Object containing the editor configuration ( api url etc ) @param [ formProperties ] : Object containing the properties of the default form
function triggerVueStepEditor (element, configuration, formProperties) {
  Vue.use(Vuex);
  Vue.use(VueResource);
  Vue.use(Multiselect);
  var stepEditorStore = new Vuex.Store({
    state: {
      configuration: configuration,
      formProperties: formProperties,
      mapType: {},
      stepTypes: [],
      pathTypes: [],
      pathEventActionTypes: [],
      stepEventActionTypes: [],
      configuredTypes: [],
      baseTypes: [],
      apiCache: {},
      map: {
        steps: {},
        paths: [],
        graphPositions: {
          steps: {},
          paths: []
        }
      }
    },
    getters: Object.assign(
      stepEditorGetters,
      extraFormEditorGetters
    ),
    mutations: Object.assign(
      stepEditorMutations,
      stepEditorPathEventActionMutations,
      stepEditorStepEventActionMutations,
      extraFormEditorMutations
    ),
    actions: Object.assign(
      stepEditorActions,
      extraFormEditorActions
    )
  });
  new Vue({
    el: element,
    store: stepEditorStore,
    beforeCreate: function () {
      stepEditorStore.dispatch('setStepTypes', this.$http);
      stepEditorStore.dispatch('setPathTypes', this.$http);
      stepEditorStore.dispatch('setPathEventActionTypes', this.$http);
      stepEditorStore.dispatch('setStepEventActionTypes', this.$http);
      stepEditorStore.dispatch('setBaseExtraFormTypes', this.$http);
      stepEditorStore.dispatch('setMapType', this.$http);
      if (this.$store.getters.showConfiguredTypes) {
        stepEditorStore.dispatch('setConfiguredExtraFormTypes', this.$http);
      }
    }
  });
}
function triggerVueStepEditor ( element , configuration , formProperties ) { Vue . use ( Vuex ) ; Vue . use ( VueResource ) ; Vue . use ( Multiselect ) ; var stepEditorStore = new Vuex . Store ( { state : { configuration : configuration , formProperties : formProperties , mapType : { } , stepTypes : [ ] , pathTypes : [ ] , pathEventActionTypes : [ ] , stepEventActionTypes : [ ] , configuredTypes : [ ] , baseTypes : [ ] , apiCache : { } , map : { steps : { } , paths : [ ] , graphPositions : { steps : { } , paths : [ ] } } } , getters : Object . assign ( stepEditorGetters , extraFormEditorGetters ) , mutations : Object . assign ( stepEditorMutations , stepEditorPathEventActionMutations , stepEditorStepEventActionMutations , extraFormEditorMutations ) , actions : Object . assign ( stepEditorActions , extraFormEditorActions ) } ) ; new Vue ( { el : element , store : stepEditorStore , beforeCreate : function ( ) { stepEditorStore . dispatch ( 'setStepTypes' , this . $http ) ; stepEditorStore . dispatch ( 'setPathTypes' , this . $http ) ; stepEditorStore . dispatch ( 'setPathEventActionTypes' , this . $http ) ; stepEditorStore . dispatch ( 'setStepEventActionTypes' , this . $http ) ; stepEditorStore . dispatch ( 'setBaseExtraFormTypes' , this . $http ) ; stepEditorStore . dispatch ( 'setMapType' , this . $http ) ; if ( this . $store . getters . showConfiguredTypes ) { stepEditorStore . dispatch ( 'setConfiguredExtraFormTypes' , this . $http ) ; } } } ) ; }
The function that will trigger the editor
 @param element {string|Object} The dom element to trigger the editor
 @param configuration : Object containing the editor configuration (api url, etc)
 @param [formProperties] : Object containing the properties of the default form
The function that will trigger the editor @param element { string|Object } The dom element to trigger the editor @param configuration : Object containing the editor configuration ( api url etc ) @param [ formProperties ] : Object containing the properties of the default form
/**
   * The common state
   */ /**
   * The step editor app
   */ /**
     * Call the APIs before creating the app
     */