1.0.0 • Published 3 years ago

wbdv_ulysses4 v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

what is this

Publish Web BDV Ulysses library and create web bdvs.

installation

npm i Ulysses-wbdv --save

options

Support three arrays of objects with options

toolbarActions [{
        id: '',
        name: '',
        ico: '',
        className: '',
        iconName: '',
        event: '',
    }]*
*pages [{
        id: '1',
        name: 'Completion Report',
        url: '',
        ComponentName: 'CompletionReport',
        active: true or false
    }]**

Usage

Events Handlers.

TOOLBAR ACTIONS HEADER.

*eventsHandler = i => {

    if (eventData().CLOSEWINDOW === i.event) {
        PostCloseEvent()
    } else if (eventData().CLOSEWINDOWANDREFRESH === i.event) {
        PostCloseAndRefreshEvent()
    }
    else if (eventData().FORWARD === i.event) {
        this.setState({ componentName: "RelatedFiles" })
    } else if (eventData().BACK === i.event) {
        this.setState({ componentName: "ActivityDescription" })
    }
}*

PAGES AREA.

*pagesHandler = i => { this.setState({ componentName: i.ComponentName })

}*

MAIN AREA ACTIONS.

*pagesActionsHandler = i => {

}*

import files to Components

import Index from 'ulysses148/lib/Iframe' PostCloseEvent (close wbdv from header close button) import { PostCloseEvent, PostCloseAndRefreshEvent } from 'ulysses148/src/event'; PostCloseAndRefreshEvent ( save and close wbdv refresh workplace task view) import { toolbarActions } from '../components/utils/dataToolbar'; import FetchData from '../components/Utils/FetchData';

insert to component render:

index component

Properties:

*toolbarActions={toolbarActions} 
 pages={pages} 
 pageActions={this.state.actionsta} 
 onSelectEvent={this.eventsHandler} 
 onSelectPage={this.pagesHandler} 
 onSelectPageActions={this.pagesActionsHandler}*