Releases: putyourlightson/craft-sprig
Releases · putyourlightson/craft-sprig
3.5.1
Changed
- Updated htmx to version 2.0.3 (changelog).
- The fetch function is now called inside an event listener when calling
sprig.triggerRefreshOnLoad()
, making it more robust. - Reverted some variable method name changes to improve autocompletion in PhpStorm.
Fixed
- Fixed the ability to pass a JSON encoded string into the
sprig.triggerEvents()
function (#15).
2.13.1
3.5.0
Added
- Added the ability to assign an ID to a component by passing a string as the third argument to the
sprig()
function.
Changed
- Updated htmx to version 2.0.2 (changelog).
Fixed
- Fixed the positioning of the JavaScript output by the
sprig.triggerRefreshOnLoad
function.
Deprecated
- Deprecated
sprig.getIsBoosted
,sprig.getIsError
,sprig.getIsHistoryRestoreRequest
,sprig.getIsInclude
,sprig.getIsRequest
,sprig.getIsSuccess
. Usesprig.isBoosted
,sprig.isError
,sprig.isHistoryRestoreRequest
,sprig.isInclude
,sprig.isRequest
,sprig.isSuccess
instead.
2.13.0
Added
- Added the ability to assign an ID to a component by passing a string as the third argument to the
sprig()
function.
Changed
- Updated htmx to version 2.0.2 (changelog).
Fixed
- Fixed the positioning of the JavaScript output by the
sprig.triggerRefreshOnLoad
function.
Deprecated
- Deprecated
sprig.getIsBoosted
,sprig.getIsError
,sprig.getIsHistoryRestoreRequest
,sprig.getIsInclude
,sprig.getIsRequest
,sprig.getIsSuccess
. Usesprig.isBoosted
,sprig.isError
,sprig.isHistoryRestoreRequest
,sprig.isInclude
,sprig.isRequest
,sprig.isSuccess
instead.
3.4.0
Changed
- The
sprig.registerJs(js)
function now executes the registered JavaScript after htmx settles, and is now the recommended way of outputting JavaScript in Sprig components. - Components no longer render markup added via
{% html %}
,{% css %}
and{% js %}
tags during Sprig requests.
2.12.0
Changed
- The
sprig.registerJs(js)
function now executes the registered JavaScript after htmx settles, and is now the recommended way of outputting JavaScript in Sprig components. - Components no longer render markup added via
{% html %}
,{% css %}
and{% js %}
tags during Sprig requests.
3.3.0
Added
- Added the component configurations to a
Sprig
variable in the browser console whendevMode
is enabled. - Added the ability to pass any value into
s-method
, including theput
,patch
anddelete
verbs. - Added the
sprig.registerJs(js)
function.
Changed
- The
sprig.triggerRefresh(selector, variables)
function now prevents cyclical requests.
2.11.0
Added
- Added the component configurations to a
Sprig
variable in the browser console whendevMode
is enabled. - Added the ability to pass any value into
s-method
, including theput
,patch
anddelete
verbs. - Added the
sprig.registerJs(js)
function.
Changed
- The
sprig.triggerRefresh(selector, variables)
function now prevents cyclical requests.
3.2.1
Changed
- The
sprig.swapOob()
function now accepts a string in addition to a template to be rendered, in the second argument.
2.10.1
Changed
- The
sprig.swapOob()
function now accepts a string in addition to a template to be rendered, in the second argument.