4.0.5 • Published 5 years ago

the-site-components v4.0.5

Weekly downloads
74
License
MIT
Repository
github
Last release
5 years ago

the-site-components

Build Status npm Version JS Standard

Components for the-site

Installation

$ npm install the-site-components --save

Usage

'use strict'

import React from 'react'
import {
  TheSignInForm,
  TheSignUpForm,
  TheOperationList,
  TheCreateDialog,
} from 'the-site-components'
import { formed } from 'the-component-mixins'
import { TheThemeStyle, TheIcon } from 'the-components'

const SignInForm = formed(TheSignInForm)
const SignUpForm = formed(TheSignUpForm)

class ExampleComponent extends React.Component {
  constructor (props) {
    super(props)
    this.state = {
      signInValues: {},
      signUpValues: {},
      signUpStep: 0
    }
  }

  render () {
    const l = (key) => ({})[key] || key.split(/\./g).pop()
    return (
      <div>
        <TheThemeStyle/>
        <TheIcon.CdnLink/>
        <h1>TheSignInForm</h1>
        <div>
          <SignInForm {...{l}}
                      values={this.state.signInValues}
                      onUpdate={(signInValues) => this.setState({signInValues: Object.assign(this.state.signInValues, signInValues)})}
          />
        </div>
        <h1>SignUpForm</h1>
        <div>
          <SignUpForm {...{l}}
                      values={this.state.signUpValues}
                      onUpdate={(signUpValues) => this.setState({signUpValues: Object.assign(this.state.signUpValues, signUpValues)})}
                      step={this.state.signUpStep}
                      onStep={(signUpStep) => this.setState({signUpStep})}
          />
        </div>
        <hr/>

        <h1>TheOperationList</h1>

        <div>

          <TheOperationList entities={[{id: 1, name: 'v1'}, {id: 2, name: 'v2'}]}
                            {...{l}}
                            fields={{
                              id: {
                                label: 'id',
                              },
                              name: {
                                label: 'name',
                              },

                            }}
          />

          <TheCreateDialog active={false}
                           {...{l}}
          />
        </div>
      </div>

    )
  }
}

export default ExampleComponent

Components

TheConnectionRetryDialog

@lends TheConnectionRetryDialog

Props

NameTypeDescriptionDefault
reloadIconnull
warningIconnull

TheCreateDialog

Props

NameTypeDescriptionDefault
doneTitletitle

TheDestroyDialog

Props

NameTypeDescriptionDefault
renderItem(entity) => entity.name

TheFBLoginButton

TheLocaleForm

Props

NameTypeDescriptionDefault
icon'fas fa-globe'
name'locale'

TheOperationDialog

Props

NameTypeDescriptionDefault
renderItem({ name }) => name

TheOperationList

TheOperationPager

ThePasswordChangeForm

TheProfileEditForm

TheRecoverResetForm

TheRecoverSendForm

TheSearchForm

Props

NameTypeDescriptionDefault
autoFocusfalse
name'q'

TheSigninForm

Props

NameTypeDescriptionDefault
nameParseruserNameParser

TheSignUpForm

Props

NameTypeDescriptionDefault
nameParseruserNameParser
required['name', 'password', 'profile.email']
step0

TheSiteToasts

TheUserCreateForm

Props

NameTypeDescriptionDefault
roles{}

TheUserImage

Props

NameTypeDescriptionDefault
scale'fill'
size48

TheUsersRoleForm

Props

NameTypeDescriptionDefault
roles{}
users[]

License

This software is released under the MIT License.

Links

4.0.5

5 years ago

4.0.4

5 years ago

4.0.3

5 years ago

4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.0.28

5 years ago

3.0.26

6 years ago

3.0.25

6 years ago

3.0.24

6 years ago

3.0.21

6 years ago

3.0.20

6 years ago

3.0.19

6 years ago

3.0.18

6 years ago

3.0.17

6 years ago

3.0.16

6 years ago

3.0.15

6 years ago

3.0.14

6 years ago

3.0.13

6 years ago

3.0.12

6 years ago

3.0.11

6 years ago

3.0.10

6 years ago

3.0.9

6 years ago

3.0.8

6 years ago

3.0.7

6 years ago

3.0.6

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.6.0

6 years ago

2.5.5

6 years ago

2.5.4

6 years ago

2.5.3

6 years ago

2.5.2

6 years ago

2.5.1

6 years ago

2.5.0

6 years ago

2.4.7

6 years ago

2.4.6

6 years ago

2.4.5

6 years ago

2.4.4

6 years ago

2.4.3

6 years ago

2.4.2

6 years ago

2.4.1

6 years ago

2.4.0

6 years ago

2.3.0

6 years ago

2.2.5

6 years ago

2.2.4

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago