Skip to content

Releases: CarbonPackages/Carbon.Eel

2.9.0

26 Dec 18:45
5c28d4b
Compare
Choose a tag to compare

✨ Feature

AlpineJS.expression(value)

Use this to pass a javascript expression inside of the AlpineJS.object or AlpineJS.xData helper

Example:

AlpineJS.object({theme: AlpineJS.expression("localStorage.theme||'system'"), show: props.show})
AlpineJS.xData('themeSwitcher', {theme: AlpineJS.expression("localStorage.theme||'system'"), show: props.show})

Result will be:

{theme:localStorage.theme||'system',show:true}
themeSwitcher({theme:localStorage.theme||'system',show:true})

Full Changelog: 2.8.1...2.9.0

2.8.1

09 Dec 21:49
3dc4471
Compare
Choose a tag to compare

Full Changelog: 2.8.0...2.8.1

2.8.0

01 Dec 21:58
3e8f47d
Compare
Choose a tag to compare
AlpineJS

✨ AlpineJS Helper

AlpineJS.object(arg1, arg2, ..argN)

Generate an object for AlpineJS directive x-data.
Supports nested arrays. You could do the same with Json.stringify(), but this function is shorter, as AlpineJS accepts objects and easier to write and read.

Examples:

AlpineJS.object({effect: 'slide', spaceBetween: 12, loop: true, navigation: null}) == '{effect:'slide',spaceBetween:12,loop:true,navigation:null}'
AlpineJS.object({nested: {value: true, nulled: null}}) == '{nested:{value:true,nulled:null}}'
  • ...arguments The array

Return The JavaScript object as string

AlpineJS.xData(name, arg1, arg2, ..argN)

Generate a function call for AlpineJS. More info.
Supports nested arrays. In named arrays ({first:1,second:null}) null get filtered out, but in list arrays ([1,null]) and in plain values the will stay.

Examples:

AlpineJS.xData('slider', {effect: 'slide', spaceBetween: 12, loop: true, navigation: null}) == 'slider({effect:'slide',spaceBetween:12,loop:true})'
AlpineJS.xData('slider', 'one', 1, false, null, ['string', 2, null]) == 'slider('one',1,false,null,['string',2,null])'
AlpineJS.xData('nested', {nested: {value: true}}) == 'nested({nested:{value:true}})'
  • name (string) The name for Alpine.data
  • ...arguments (mixed) The options for the function

Return The string for the x-data function call

Full Changelog: 2.7.0...2.8.0

2.7.0

26 Sep 12:55
6b5607f
Compare
Choose a tag to compare

Full Changelog: 2.6.0...2.7.0

2.6.0

02 Aug 16:30
52c2f0e
Compare
Choose a tag to compare

Full Changelog: 2.5.0...2.6.0

2.5.0

03 May 08:36
6cf3add
Compare
Choose a tag to compare

✨ Feature

Allow Neos 9

Full Changelog: 2.4.0...2.5.0

2.4.0

02 Mar 14:29
d8b14f4
Compare
Choose a tag to compare

✨ Feature

Add Carbon.Array.isCountable(variable)

Check if the given variable is countable

Return true or false

Full Changelog: 2.3.3...2.4.0

2.3.3

15 Dec 09:02
05a4ce9
Compare
Choose a tag to compare

Full Changelog: 2.3.2...2.3.3

2.3.2

09 Nov 14:29
005e050
Compare
Choose a tag to compare

Full Changelog: 2.3.1...2.3.2

2.3.1

04 Sep 16:51
167292d
Compare
Choose a tag to compare

Full Changelog: 2.3.0...2.3.1