Skip to content

Releases: jails-org/Jails

v6.4.1 - Patch Update

10 Jul 00:03
Compare
Choose a tag to compare

Change Log

  • Fix Bug : The feature added on 6.4.0 was not working when using export const template() for full client component.

v6.4.0 - Minor Update

09 Jul 16:10
Compare
Choose a tag to compare

Change Log - Breaking Change ⚠️

Removing the helper attr() added on 6.3.0.
Now, in order to listening to attribute changes, you can use the helper on('change[attributeName]', callback) instead.

New version ✓

export default function myComponent({ main, on }) {

  main(() => {
    on('[src]', onChangeSrc)
  })

  const onChangeSrc = ( key, value ) => {
    console.log(`Changed ${key} to ${value}`)
  }
}

Old version: ❌

export default function myComponent({ main, attr }) {

  const attributes = attr()
 
  main(() => {
    attributes.change('src', onChangeSrc)
  })

  const onChangeSrc = ( key, value ) => {
    console.log(`Changed ${key} to ${value}`)
  }
}

v6.3.4 - Patch Update

29 Jun 06:49
Compare
Choose a tag to compare

Change Log

  • Adding type definitions for the new helpers dataset and attr.
  • Updating exports type definitions

v6.3.3 - Patch Update

29 Jun 06:48
Compare
Choose a tag to compare

Change Log

  • Renaming html.mjs to html.js to be conform with type definitions.

v6.3.2 - Patch Update

12 Jun 21:31
Compare
Choose a tag to compare

Change Log

Removing global browser references to avoid problems with server-side systems.

v6.3.1 - Patch Update

08 Jun 22:53
Compare
Choose a tag to compare

Change Log

Fix on export template function. It was not re-running template system transformations.

v6.3.0 - Minor Update

01 Jun 15:57
Compare
Choose a tag to compare

Change Log

Changing attributes to attr to be less verbose, and changing onchange to change to be more consistent with events names used on DOM.
Also, attributes would colide with jails-js/html attributes for html on templates, so its better to use different name.

Usage

export default function myComponent({ main, attr }) {

  const attributes = attr()
 
  main(() => {
    attributes.change('src', onChangeSrc)
  })

  const onChangeSrc = ( key, value ) => {
    console.log(`Changed ${key} to ${value}`)
  }
}

v6.2.0 - Minor Update

20 May 21:55
Compare
Choose a tag to compare

Change Log

Adding a new functionality that provides a interface to listening to component attribute changes.

Usage

export default function myComponent({ main }) {

  const attr = attributes()
 
  main(() => {
    attr.onchange('src', onChangeSrc)
  })

  const onChangeSrc = ( key, value ) => {
    console.log(`Changed ${key} to ${value}`)
  }
}

v6.1.0 - Minor Update

20 May 13:47
Compare
Choose a tag to compare

Change Log

Adding a feature for parsing dataset of a element. Very usefull when you have to pass an object to configure a component.

E.g

<my-component data-config="{ name: 'my-name', age: 41 }">
<!-- -->
</my-component>
export default function myComponent({ main, dataset }){

  const { name, age } = dataset('config')  
 
  main(() => {
    console.log({  name, age })
  })

}

v6.0.6 - Patch Update

08 May 05:35
Compare
Choose a tag to compare

Change Log

The view() function has been updated to return the state by default, ensuring consistent behavior even when the user omits an explicit return.

Old

export const view = () => {
  const newdata = 'something'
  return { ...state, newdata }
}

New

export const view = () => {
  const newdata = 'something'
  return { newdata } // All state data will be available, plus new data.
}