1.1.72 • Published 1 year ago

ulysseswbdv v1.1.72

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

what is this

Install Web BDV Ulysses library and create web bdvs.

installation

npm i ulysseswbdv

options

Support three arrays of objects with options

export const toolbarActions [{
        id:'' ,
        name:'' ,
        ico:'' ,
        className:'' ,
        iconName:'' ,
        event:'' ,
        codeName:'' ,
        enabled:true/false 
    }]
export const pages [{
        id: '',
        name: '',
        url: '',
        ComponentName: '',
        active: false/true
    }]
export const footerActions = [{
        codeName: '',
        id: '',
        name: '',
        page: '',
        enabled: true/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) {
            var idx = pages.findIndex(t => t.ComponentName === this.state.componentName)
            if (pages[idx + 1] != undefined) {
                this.setState({ componentName: pages[idx + 1].ComponentName })
            }
        } else if (eventData().BACK === i.event) {
            var idx = pages.findIndex(t => t.ComponentName === this.state.componentName)
            if (pages[idx - 1] != undefined) {
                this.setState({ componentName: pages[idx - 1].ComponentName })
            }
        }
    }

PAGES AREA.

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

MAIN AREA ACTIONS.

pagesActionsHandler = i => {
        
}

import files to Parent Component

import Index from 'ulysseswbdv/lib/Iframe'

PostCloseEvent (close wbdv from header close button)

import { PostCloseEvent, PostCloseAndRefreshEvent } from 'ulysseswbdv/src/event';

PostCloseAndRefreshEvent ( save and close wbdv refresh workplace task view)

import { toolbarActions } from '../../components/ScheduleJobMaintenanceReport/Utils/dataToolbar';

import fetch data to use ulysses services

import FetchData from '../../components/ScheduleJobMaintenanceReport/Utils/FetchData';

import event data to handle header actions events

import eventData from '../../components/ScheduleJobMaintenanceReport/Utils/toolbarEvents';

import main footer Actions for pages to handle actions events

import { footerActions } from '../../components/ScheduleJobMaintenanceReport/Utils/actionsFooter';

Import alert popup Messages templates components

import Queries from '../Messages/Queries';
import Information from '../Messages/Information';
import Error from '../Messages/Error';
import Warning from '../Messages/Warning';

App js component:

import React, { Component } from 'react';
import { BrowserRouter as Router, Route} from "react-router-dom";
import ScheduleJobMaintenanceReport from '../src/components/ScheduleJobMaintenanceReport/ScheduleJobMaintenanceReport';
export default class App extends Component {
  render() {
    return (
        <Router>
            <div>
                <Route path='/ScheduleJobMaintenanceReport' component={ScheduleJobMaintenanceReport}  />       
            </div>
        </Router>
    );
  }
}

Example how we add Index Component Library with Pages to Parent Component web BDV:

 <Index toolbarActions={toolbarActions} 
        toolbarActions={toolbarActions}
                onSelectEvent={this.eventsHandler}
                pages={pages}
                pageActions={footerActions}
                onSelectPage={this.pagesHandler}
                onSelectPageActions={this.pagesActionsHandler}
                btnHeaderEnabled={this.state.btnHeaderEnabled}
                btnEnabled={this.state.btnEnabled}  >
                {this.state.componentName === 'CompletionReport' ? (
                    <CompletionReport />
                ) : this.state.componentName === 'JobDetails' ? (
                    <JobDetails />
                ) : this.state.componentName === 'MaintenanceHistory' ? (
                    <MaintenanceHistory />
                ) : this.state.componentName === 'ActivityDescription' ? (
                    <ActivityDescription/>
                ) : (
                    <RelatedFiles  />
                )}
                <Error popupVisible={this.state.popupVisible} OneventsHandlerCloseSave={this.eventsHandlerCloseSave} OnhideInfo={this.hideInfo} />
                
</Index >

Add to index.html

<head>
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> 
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap" rel="stylesheet">
</head>
<body  class="skin-orange-light">
    <div id="root"></div>
</body>
1.1.72

1 year ago

1.1.70

1 year ago

1.1.71

1 year ago

1.1.69

1 year ago

1.1.67

1 year ago

1.1.65

1 year ago

1.1.64

1 year ago

1.1.68

1 year ago

1.1.63

1 year ago

1.1.62

1 year ago

1.1.61

1 year ago

1.1.60

1 year ago

1.1.59

2 years ago

1.1.57

2 years ago

1.1.49

2 years ago

1.1.5-2.1

2 years ago

1.1.52

2 years ago

1.1.51

2 years ago

1.1.50

2 years ago

1.1.56

2 years ago

1.1.55

2 years ago

1.1.54

2 years ago

1.1.53

2 years ago

1.1.48

3 years ago

1.1.47

3 years ago

1.1.29

3 years ago

1.1.28

3 years ago

1.1.30

3 years ago

1.1.34

3 years ago

1.1.33

3 years ago

1.1.31

3 years ago

1.1.38

3 years ago

1.1.37

3 years ago

1.1.36

3 years ago

1.1.35

3 years ago

1.1.39

3 years ago

1.1.41

3 years ago

1.1.40

3 years ago

1.1.45

3 years ago

1.1.44

3 years ago

1.1.43

3 years ago

1.1.42

3 years ago

1.1.46

3 years ago

1.1.1

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.12

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.16

3 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.13

3 years ago

1.1.19

3 years ago

1.1.18

3 years ago

1.1.17

3 years ago

1.1.23

3 years ago

1.1.22

3 years ago

1.1.21

3 years ago

1.1.20

3 years ago

1.1.27

3 years ago

1.1.26

3 years ago

1.1.25

3 years ago

1.1.24

3 years ago

1.0.95

3 years ago

1.0.94

3 years ago

1.0.93

3 years ago

1.0.99

3 years ago

1.0.98

3 years ago

1.0.97

3 years ago

1.0.96

3 years ago

1.0.66

3 years ago

1.0.65

3 years ago

1.0.64

3 years ago

1.0.63

3 years ago

1.0.69

3 years ago

1.0.68

3 years ago

1.0.67

3 years ago

1.0.73

3 years ago

1.0.72

3 years ago

1.0.71

3 years ago

1.0.70

3 years ago

1.0.77

3 years ago

1.0.76

3 years ago

1.0.75

3 years ago

1.0.74

3 years ago

1.0.79

3 years ago

1.0.78

3 years ago

1.0.80

3 years ago

1.0.84

3 years ago

1.0.83

3 years ago

1.0.82

3 years ago

1.0.81

3 years ago

1.0.88

3 years ago

1.0.87

3 years ago

1.0.86

3 years ago

1.0.85

3 years ago

1.0.89

3 years ago

1.0.91

3 years ago

1.0.90

3 years ago

1.0.92

3 years ago

1.0.62

3 years ago

1.0.61

4 years ago

1.0.60

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.37

4 years ago

1.0.36

4 years ago

1.0.35

4 years ago

1.0.34

4 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.0.40

4 years ago

1.0.44

4 years ago

1.0.43

4 years ago

1.0.42

4 years ago

1.0.41

4 years ago

1.0.48

4 years ago

1.0.47

4 years ago

1.0.46

4 years ago

1.0.45

4 years ago

1.0.49

4 years ago

1.0.51

4 years ago

1.0.50

4 years ago

1.0.55

4 years ago

1.0.54

4 years ago

1.0.53

4 years ago

1.0.52

4 years ago

1.0.59

4 years ago

1.0.58

4 years ago

1.0.57

4 years ago

1.0.56

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.30

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.2

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.10

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago