0.32.2 • Published 6 months ago

@guillotinaweb/react-gmi v0.32.2

Weekly downloads
101
License
MIT
Repository
github
Last release
6 months ago

🔌 Guillotina Management Interface

It's build around the idea of a framework to roll you own GMI.

Provides an interface to access all Guillotina content depending on user permissions and allowing you to apply actions like create/modify/remove content, UI interactions like displaying flash messages, etc.

All this with the flexibility to build it your way, adding your own content with your forms, your icons, etc. It's build around the idea to act as a framework, layer that could be extended from outside.

Prerequisites

  • React +16.12.0

Status

Alpha version. The app is usable, but still needs some love.

Roll your own guillotina

With create react app

npx create-react-app gmi_demo
cd gmi_demo

yarn add @guillotinaweb/react-gmi

App.js

import React from 'react'
import { Layout } from '@guillotinaweb/react-gmi'
import { Auth } from '@guillotinaweb/react-gmi'
import { Guillotina } from '@guillotinaweb/react-gmi'
import { Login } from '@guillotinaweb/react-gmi'
import { getClient } from '@guillotinaweb/react-gmi'
import { ClientProvider } from '@guillotinaweb/react-gmi'
import { useState } from 'react'
import '@guillotinaweb/react-gmi/dist/css/style.css'

// guillotina url
let url = 'http://localhost:8080'
const schema = '/'
const auth = new Auth(url)
const client = getClient(url, schema, auth)

function App() {
  const [isLogged, setLogged] = useState(auth.isLogged)

  const onLogin = () => {
    setLogged(true)
  }
  
  const onLogout = () => {
    setLogged(false);
  };

  auth.onLogout = onLogout

  return (
    <ClientProvider client={client}>
      <Layout auth={auth} onLogout={onLogout}>
        {isLogged && <Guillotina auth={auth} url={schema} />}
        {!isLogged && (
          <div className="columns is-centered">
            <div className="columns is-half">
               <Login
                onLogin={onLogin}
                auth={auth}
                currentSchema={schema}
              />
            </div>
          </div>
        )}
      </Layout>
    </ClientProvider>
  )
}


export default App

To add icons:

Add the icons to the default public/index.html header

<meta name="viewport" content="width=device-width, initial-scale=1" />
+ <script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
<meta
      name="description"
      content="Web site created using create-react-app"
    />
  • Copy guillotina logo to your public
curl https://raw.githubusercontent.com/guillotinaweb/guillotina_react/master/public/logo.svg > public/logo.svg

Docs?

Develop

run a local guillotina
yarn
yarn start

Screenshots

npm.io npm.io npm.io

Sponsors

This project is sponsored by Vinissimus Wine Shop and Iskra

TODO

X Test workflow X Filter workflow X Test multiples fields GMI, all selects, and files behaviors [] Render tags and render values in properties form, use vocabulary label instead of vocabulary key [] Add richtext X Add scales in IImageAttachment [] Guillotina, no elimina l'info de l'imatge de l'objecte quan es borra, si que elimina l¡imatge, fer test a guillotina de IImageAttachment i @delete [] Poder posar per defecte un Panel properties, item properties etc a tots els tipus. Llegir-ho del context [] Mirar de fer generic el Traversal, per no haver de fer el "as" i poder dir de quin tipus és el context

0.32.2

6 months ago

0.32.1

7 months ago

0.32.0

7 months ago

0.30.1-alpha.2

7 months ago

0.31.0

7 months ago

0.30.1-alpha.1

7 months ago

0.30.1

7 months ago

0.30.0

7 months ago

0.29.2-alpha.3

8 months ago

0.29.2-alpha.1

8 months ago

0.29.2-alpha.2

8 months ago

0.29.0

8 months ago

0.29.2

8 months ago

0.29.1

8 months ago

0.28.4

8 months ago

0.28.3

8 months ago

0.28.2

8 months ago

0.28.1

9 months ago

0.28.0

9 months ago

0.27.0

9 months ago

0.26.0

10 months ago

0.25.2

10 months ago

0.25.1

10 months ago

0.25.0

10 months ago

0.24.1

10 months ago

0.24.0

10 months ago

0.23.1

1 year ago

0.23.0

1 year ago

0.22.4

2 years ago

0.22.3

3 years ago

0.22.2

3 years ago

0.20.1

3 years ago

0.20.0

3 years ago

0.19.0

3 years ago

0.21.0

3 years ago

0.18.0

3 years ago

0.22.1

3 years ago

0.22.0

3 years ago

0.17.0

3 years ago

0.16.0

3 years ago

0.15.1

3 years ago

0.15.0

4 years ago

0.14.2

4 years ago

0.14.1

4 years ago

0.14.0

4 years ago

0.13.1

4 years ago

0.13.0

4 years ago

0.12.2

4 years ago

0.12.1

4 years ago

0.12.0

4 years ago

0.11.0

4 years ago

0.10.0

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.6

4 years ago

0.6.4-z

4 years ago

0.6.5

4 years ago

0.6.4-y

4 years ago

0.6.4-x

4 years ago

0.6.4

4 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.4

4 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.0

5 years ago

0.3.1

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.2-a

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago