0.0.84 • Published 6 months ago

@mapotempo/fleet-ui v0.0.84

Weekly downloads
18
License
ISC
Repository
-
Last release
6 months ago

fleet-ui

Fleet React Component

NPM JavaScript Style Guide

Dev

You can start developping without any system configuration by running the following command

docker-compose up --build

Open the container

docker exec -it fleet-ui-dev-1 bash

Install

npm install --save fleet-ui

Usage

import { createStore,
         combineReducers,
         applyMiddleware} from 'redux';
// fleet-ui import
import { LiveView }       from 'fleet-ui';
import { fleetReducer }   from 'fleet-ui';
import * as fleetActions  from 'fleet-ui';
// CSS import
import 'bootstrap/dist/css/bootstrap.min.css';
import 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css';
import "react-datepicker/dist/react-datepicker.css";
import 'fleet-ui/dist/index.css';

const fleet_user = "sync_user_key";
const fleet_key  = "XXXXXXXXXXXXXXXXX";
const fleet_host = 'http://urlToFleetApi.com'
const timeZone = 'Europe/Paris' //This parameter is optionnal by default it will take the user actual timezone

// Create and configure store (fleetReducer need to be on "fleet" root key)
const rootReducer = combineReducers({fleet: fleetReducer({ fleet_host, timeZone })});
const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk)));

// Dispatch connexion
store.dispatch(fleetActions.signInUsers([
  { syncUser: fleet_user, apiKey: fleet_key },
]));

class Example extends Component {
  render() {
    return (
    <Provider store={store}>
      <LiveView></LiveView>
    </Provider>
    );
  }
}

Use faker

The fleet-ui contain api faker, to enable this feature add REACT_APP_USE_FAKER=true in .env or .env.local file.

Run locally

We need to run in both, in the root project and in the example folder (unless we are using docker, which will directly run them)

npm start

You can use this URL (replacing the email and api_key with beta mapo credentials):

http://localhost:3001/reporting/#host=https://fleet.beta.mapotempo.com&emails=foo@bar.com&api_keys=abcdef123456

NPM publish

Actual npm repository

Before publish check and update version in package.json

{
  "name": "fleet-ui",
  "version": "X.X.X",
  ...
}

Run the following command (maybe you will need to configure authentication before)

npm publish

This task need to be automated with CI/CD on every pushed git tag

Search for missing translation keys

cd app/scripts
node compareTranslations.js

License

©

0.0.84

6 months ago

0.0.80

12 months ago

0.0.81

11 months ago

0.0.82

6 months ago

0.0.83

6 months ago

0.0.79

12 months ago

0.0.78

1 year ago

0.0.77

1 year ago

0.0.76

1 year ago

0.0.75

1 year ago

0.0.73

2 years ago

0.0.74

2 years ago

0.0.72

2 years ago

0.0.70

3 years ago

0.0.71

3 years ago

0.0.67

3 years ago

0.0.68

3 years ago

0.0.69

3 years ago

0.0.66

3 years ago

0.0.63

3 years ago

0.0.64

3 years ago

0.0.65

3 years ago

0.0.62

3 years ago

0.0.60

3 years ago

0.0.61

3 years ago

0.0.59

3 years ago

0.0.52

3 years ago

0.0.53

3 years ago

0.0.54

3 years ago

0.0.55

3 years ago

0.0.56

3 years ago

0.0.57

3 years ago

0.0.58

3 years ago

0.0.45

4 years ago

0.0.46

4 years ago

0.0.47

4 years ago

0.0.51

4 years ago

0.0.50

4 years ago

0.0.48

4 years ago

0.0.49

4 years ago

0.0.41

4 years ago

0.0.42

4 years ago

0.0.43

4 years ago

0.0.44

4 years ago

0.0.40

4 years ago

0.0.37

4 years ago

0.0.38

4 years ago

0.0.39

4 years ago

0.0.35

4 years ago

0.0.36

4 years ago

0.0.34

4 years ago

0.0.33

4 years ago

0.0.32

5 years ago

0.0.30

5 years ago

0.0.31

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.20

5 years ago

0.0.21

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago