2.2.10 • Published 8 months ago

mirajs v2.2.10

Weekly downloads
100
License
ISC
Repository
github
Last release
8 months ago

Version 2.2.0 (by Daniel SAKOU)

Added FilterClass component

// Usage
<FilterClass
    lang={{
      btn: "Ajouter un critère",
      titleOptions: "Paramètres du critère",
      labelVariable: "Sélectionner une variable",
      labelValeur: "Sélectionner une valeur",
      btnSubmit: "Ajouter"
    }}
    criteres={[
      {
          title: "Pays",
          value: "pays",
          indicator: "P",
          tab: [
              {title: "Cameroun", value: "CM"},
              {title: "France", value: "FR"},
              {title: "United States", value: "USA"},
          ]
      },
      {
          title: "Âge",
          value: "age",
          indicator: "Â",
          tab: [
              {title: "18 - 24 ans", value: "18-24"},
              {title: "25 - 35 ans", value: "25-35"},
              {title: "36 - 40 ans", value: "36-40"},
          ]
      }
    ]}/>

// Validator
propTypes = {
    lang: PropTypes.object,
    criteres: PropTypes.array,
    onAddFilter: PropTypes.func,
    // + Added this event
    onCloseItem: PropTypes.func,
};

// Methods
getFilters();

Version 2.1.0 (by Daniel SAKOU)

Added MSidemenu component

<div className="app-container">
  <div className="app-section">
      <MSidemenu
          ref={sidemenu}
          menu={[
              {
                  icon: "DGfi-user",
                  title: "Username",
                  subtitle: "Votre nom ici..."
              },
              {
                  icon: "DGfi-grouppeople",
                  title: "Comptes",
                  active: true
              },
              {
                  icon: "DGfi-file-text2",
                  title: "Demandes",
              },
              {
                  icon: "DGfi-message",
                  title: "Messages",
              },
              {
                  icon: "DGfi-notifications",
                  title: "Notifications",
              },
              {
                  icon: "DGfi-settings",
                  title: "Paramètres",
              },
              {
                  icon: "DGfi-exit_to_app",
                  title: "Se déconnecter",
                  bottom: true
              },
          ]}/>
      <div className="app-article __reduced-sidemenu">
          <Bouton
              title="Welcom to Globus"
              onClick={()=>{
                  DCAlert({
                      title: "This is title",
                      content: "This is content of the alert modal",
                      btn: "Get Started"
                  });
                  sidemenu.current?.reduce(Constantes.app_article_id);
              }}/>
          <Bouton
              title="Sidemenu"
              onClick={()=>{
                  sidemenu.current?.reduce(Constantes.app_article_id);
              }}/>
          <Bouton
              title="Open SM"
              className="cp-theme"
              onClick={()=>{
                  sidemenu.current?.open(Constantes.app_article_id);
              }}/>
      </div>
  </div>
</div>

Version 2.0.0 (by Daniel SAKOU)

Changing migrated compiler from babel to swc

Version 1.5.0 (by Daniel SAKOU)

Added Countdown component

usage:

// import Countdown
import { Countdown, CountdownItem } from 'mirajs/dist/react';

// using in render
<Countdown
    startDate="2021-09-15"
    endDate="2021-10-25"/>

// You can also use one item of Countdown component like this
<CountdownItem
    max={30} // required : max value of item
    text={"place(s)"} // optional : text to display
    size={"big"} // optional : default big
    value={5} // required : value of item
    reverse={true} // optional : default undefined
    color="cp-theme"/> // optional : Color of stroke, default theme color

Version 1.4.8 (by Ronald Tchuekou)

Added Expander react component

description:

usage:

// import Expander
import { Expander } from "mirajs/dist/react";

// All object will respect structure.
const OBJECT = {
        title: 'Title',
        subList: [
            {title: 'Sub Title 1', subList: []},
            {title: 'Sub Title 2', subList: []},
            {title: 'Sub Title 3', subList: [
                {title: 'Sub Sub Title 1', subList: []},
                {title: 'Sub Sub Title 2', subList: []},
                {title: 'Sub Sub Title 3', subList: []},
            ]},
            {title: 'Sub Title 4', subList: []},
            {title: 'Sub Title 5', subList: []},
        ]
    }

    // When item click.
    function onItemClick(item){
        ...
    }

    //When delete icon click.
    function onDelete(item){
        ...
    }

    // When edit icon click.
    function onEdit(item){
        ...
    }

    // Component
    <Expander
        object={OBJECT}
        handleClick={onItemClick}
        handleDelete={onDelete}// Enabled delete button.
        handleEdit={onEdit} // Enabled edit button.
    />

Version 1.4.0 (by Daniel SAKOU)

Added notification component

usage:

// import DCNotify
import { DCNotify } from "mirajs/dist/js";

// using
DCNotify({
    // required, specify icon item. You can specify img instead, like that: img: "https://url_image" 
    iconName: "DGfi-person",
    // required, specify the notification title
    title: "Notification",
    // optional, notification item quantity
    nb: 1,
    // optional, more about the notification
    descript: "Test notification...",
    // optional, callback function when clicking on notification
    handler: () => console.log("Clicked on notification..."),
    // optional, Need when notification refer to another website
    href: "http://dc-corp.cm"
});

Version 1.3.2 (by Ronald Tchuekou)

Addition of new functionnality: DrawerContent (2-07-2021)

Added to the js side.

usage:

// JS **************************
import { DrawerContent } from "mirajs/dist/js";

// Element that will holde the drawer items.
let element = document.querySelector('#drawer');

// Buttons to navigate between drawer items.
let btn1 = document.querySelector('#btn1'),
btn2 = document.querySelector('#btn2')

// Set the drawer content.
let drawer = new DrawerContent(element);

// Set the events.
btn1.addEventListener('click', () => drawer.previous());
btn2.addEventListener('click', () => drawer.next());

// Styles of elemnets.
const styles = {
    container:{
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        height: '100vh',
        width: '100vw'
    },
    drawerViewer: {
        width: '500px',
        height: '500px',
        padding: '0',
        margin: '0',
        overflow: 'hidden'
    },
    title: {
        color: 'gray',
        fontSize: '20px',
        fontWeight: 'bold'
    },
    headerContent: {
        display: 'flex',
        justifyContent: 'space-between',
        alignItems: 'center',
        height: '50px',
        background: 'white',
        padding: '0 10px',
    },
    contentDrawer: {
        height: '440px',
        width: '100%'
    },
    cube: {
        height: '100%',
        background: 'blue',
        color: 'white',
        fontSize: '50px',
        fontWeight: 'bold',
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        border: "4px solid white"
    }
}

// Html ************************
<div style={styles.container}>
    <div style={styles.drawerViewer}>
        <!-- Header that content the navigation buttons. -->
        <div style={styles.headerContent}>
            <button id="btn1" class="dcx-btn__icon dcx-ripple">
                <i class="DGfi-arrow-left2"></>
            </button>
            <p style={styles.title}>Drawer content management</p>
            <button id="btn2" class="dcx-btn__icon dcx-ripple">
                <i class="DGfi-arrow-right2"></>
            </button>
        </div>
        <!-- Drawer container. -->
        <div id="drawer" style={styles.contentDrawer}>
            <div style={styles.cube}>1</div>
            <div style={styles.cube}>2</div>
            <div style={styles.cube}>3</div>
            <div style={styles.cube}>4</div>
            <div style={styles.cube}>5</div>
            <div style={styles.cube}>6</div>
            <div style={styles.cube}>7</div>
            <div style={styles.cube}>8</div>
            <div style={styles.cube}>9</div>
            <div style={styles.cube}>10</div>
        </div>
    </div>
</div>

#Version 1.2.8 (by Ronald Tchuekou)

Addition of new functionality : Injection loader. (16-05-2021)

Added to the js side.

usage :

import {InjectLoarder} from 'mirajs/dist/js';

let element = document.querySelector('#element');

// indeternate loader.
let loader = new InjectLoarder(element);
setTimeout(() => {
    loader.dismiss();
}, 5000);

// Determinate loader.
let loader = new InjectLoarder(element, {
    indeterminate: false,
    value: 0, // initial value.
    background: 'white', // ['white': default, 'dark'].
    loaderColor: 'red' // ['blue': default, 'green', 'red', 'gray']
});
setTimeout(() => {
    loader.dismiss();
}, 5000);

Note: The loader tha we are set in your element is circular loader

<div style="width: 300px height: 300px font-size: 2rem" id="element">
    This is my element !
</div>

Version 1.2.6 (bu Ronald Tchuekou)

Simple carousel are now touchable. We can wipe to set the next or previous slide on carousel (SimpleCarousel);

Version 1.2.5 (by Ronald Tchuekou)

Addition of new functionality : SlideUp, SlideDown and SlideToggle Animations. (21-03-2021)

Added to the js side.

usage :

import {SlideAnimations} from "mirajs/dist/js";

let element = document.querySelector("#element");

// To use the default duration (500 ms)
SlideAnimations.slideUp(element);

SlideAnimations.slideDown(element);

SlideAnimations.slideToggle(element);

// With 1000 ms;
SlideAnimations.slideUp(element, 1000);

SlideAnimations.slideDown(element, 1000);

SlideAnimations.slideToggle(element, 1000);
2.2.10

8 months ago

2.2.9

8 months ago

2.2.5

2 years ago

2.2.7

2 years ago

2.2.6

2 years ago

2.2.8

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.2.4

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.9

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.8

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.5.5

2 years ago

1.5.4

2 years ago

1.5.9

2 years ago

1.5.8

2 years ago

1.5.7

2 years ago

1.5.6

2 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.18

3 years ago

1.4.13

3 years ago

1.4.12

3 years ago

1.4.15

3 years ago

1.4.14

3 years ago

1.4.17

3 years ago

1.4.16

3 years ago

1.4.11

3 years ago

1.4.9

3 years ago

1.4.8

3 years ago

1.4.10

3 years ago

1.4.7

3 years ago

1.4.6

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.12

3 years ago

1.2.13

3 years ago

1.2.14

3 years ago

1.2.8

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.10

3 years ago

1.2.11

3 years ago

1.2.9

3 years ago

1.2.0

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.27

3 years ago

1.1.26

3 years ago

1.1.25

3 years ago

1.1.23

3 years ago

1.1.24

3 years ago

1.1.22

3 years ago

1.1.21

3 years ago

1.1.20

3 years ago

1.1.19

3 years ago

1.1.18

3 years ago

1.1.17

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.12

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.20

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.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.11

4 years ago

1.0.10

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.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago