Add support for hx-disabled-elt
- Update script tag to 1.9.6
This commit is contained in:
parent
69a4034661
commit
8fd6af8c26
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
This package contains common code shared between [`Giraffe.Htmx`](https://www.nuget.org/packages/Giraffe.Htmx) and [`Giraffe.ViewEngine.Htmx`](https://www.nuget.org/packages/Giraffe.ViewEngine.Htmx), and will be automatically installed when you install either one.
|
This package contains common code shared between [`Giraffe.Htmx`](https://www.nuget.org/packages/Giraffe.Htmx) and [`Giraffe.ViewEngine.Htmx`](https://www.nuget.org/packages/Giraffe.ViewEngine.Htmx), and will be automatically installed when you install either one.
|
||||||
|
|
||||||
**htmx version: 1.9.5**
|
**htmx version: 1.9.6**
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
|
||||||
<VersionPrefix>1.9.5</VersionPrefix>
|
<VersionPrefix>1.9.6</VersionPrefix>
|
||||||
<PackageReleaseNotes>Update script tags to pull htmx 1.9.5</PackageReleaseNotes>
|
<PackageReleaseNotes>Add support for hx-disabled-elt attribute; update script tags to pull htmx 1.9.6</PackageReleaseNotes>
|
||||||
<Authors>danieljsummers</Authors>
|
<Authors>danieljsummers</Authors>
|
||||||
<Company>Bit Badger Solutions</Company>
|
<Company>Bit Badger Solutions</Company>
|
||||||
<PackageProjectUrl>https://github.com/bit-badger/Giraffe.Htmx</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/bit-badger/Giraffe.Htmx</PackageProjectUrl>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
This package enables server-side support for [htmx](https://htmx.org) within [Giraffe](https://giraffe.wiki) and ASP.NET's `HttpContext`.
|
This package enables server-side support for [htmx](https://htmx.org) within [Giraffe](https://giraffe.wiki) and ASP.NET's `HttpContext`.
|
||||||
|
|
||||||
**htmx version: 1.9.5**
|
**htmx version: 1.9.6**
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
|
|
|
@ -313,6 +313,9 @@ let attributes =
|
||||||
test "_hxDisable succeeds" {
|
test "_hxDisable succeeds" {
|
||||||
p [ _hxDisable ] [] |> shouldRender """<p hx-disable></p>"""
|
p [ _hxDisable ] [] |> shouldRender """<p hx-disable></p>"""
|
||||||
}
|
}
|
||||||
|
test "_hxDisabledElt succeeds" {
|
||||||
|
button [ _hxDiabledElt "this" ] [] |> shouldRender """<button hx-disabled-elt="this"></button>"""
|
||||||
|
}
|
||||||
test "_hxDisinherit succeeds" {
|
test "_hxDisinherit succeeds" {
|
||||||
strong [ _hxDisinherit "*" ] [] |> shouldRender """<strong hx-disinherit="*"></strong>"""
|
strong [ _hxDisinherit "*" ] [] |> shouldRender """<strong hx-disinherit="*"></strong>"""
|
||||||
}
|
}
|
||||||
|
@ -422,14 +425,14 @@ let script =
|
||||||
let html = RenderView.AsString.htmlNode Script.minified
|
let html = RenderView.AsString.htmlNode Script.minified
|
||||||
Expect.equal
|
Expect.equal
|
||||||
html
|
html
|
||||||
"""<script src="https://unpkg.com/htmx.org@1.9.5" integrity="sha384-xcuj3WpfgjlKF+FXhSQFQ0ZNr39ln+hwjN3npfM9VBnUskLolQAcN80McRIVOPuO" crossorigin="anonymous"></script>"""
|
"""<script src="https://unpkg.com/htmx.org@1.9.6" integrity="sha384-FhXw7b6AlE/jyjlZH5iHa/tTe9EpJ1Y55RjcgPbjeWMskSxZt1v9qkxLJWNJaGni" crossorigin="anonymous"></script>"""
|
||||||
"Minified script tag is incorrect"
|
"Minified script tag is incorrect"
|
||||||
}
|
}
|
||||||
test "unminified succeeds" {
|
test "unminified succeeds" {
|
||||||
let html = RenderView.AsString.htmlNode Script.unminified
|
let html = RenderView.AsString.htmlNode Script.unminified
|
||||||
Expect.equal
|
Expect.equal
|
||||||
html
|
html
|
||||||
"""<script src="https://unpkg.com/htmx.org@1.9.5/dist/htmx.js" integrity="sha384-7PsmARhgPhXF9ahyuTafz8AWfM9ZfXE9qZJeagUhWAYK632LixPUVjGRZnHP9ylN" crossorigin="anonymous"></script>"""
|
"""<script src="https://unpkg.com/htmx.org@1.9.6/dist/htmx.js" integrity="sha384-DyaDHx3hlXQ3QqTsQbNECvRW/A/B+4OtEWLCHbsDRPI3oJ98ekMiWJ4Yyrrqimog" crossorigin="anonymous"></script>"""
|
||||||
"Unminified script tag is incorrect"
|
"Unminified script tag is incorrect"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -193,6 +193,9 @@ module HtmxAttrs =
|
||||||
/// Disables htmx processing for the given node and any children nodes
|
/// Disables htmx processing for the given node and any children nodes
|
||||||
let _hxDisable = flag "hx-disable"
|
let _hxDisable = flag "hx-disable"
|
||||||
|
|
||||||
|
/// Specifies elements that should be disabled when an htmx request is in flight
|
||||||
|
let _hxDiabledElt = attr "hx-disabled-elt"
|
||||||
|
|
||||||
/// Disinherit all ("*") or specific htmx attributes
|
/// Disinherit all ("*") or specific htmx attributes
|
||||||
let _hxDisinherit = attr "hx-disinherit"
|
let _hxDisinherit = attr "hx-disinherit"
|
||||||
|
|
||||||
|
@ -296,14 +299,14 @@ module Script =
|
||||||
|
|
||||||
/// Script tag to load the minified version from unpkg.com
|
/// Script tag to load the minified version from unpkg.com
|
||||||
let minified =
|
let minified =
|
||||||
script [ _src "https://unpkg.com/htmx.org@1.9.5"
|
script [ _src "https://unpkg.com/htmx.org@1.9.6"
|
||||||
_integrity "sha384-xcuj3WpfgjlKF+FXhSQFQ0ZNr39ln+hwjN3npfM9VBnUskLolQAcN80McRIVOPuO"
|
_integrity "sha384-FhXw7b6AlE/jyjlZH5iHa/tTe9EpJ1Y55RjcgPbjeWMskSxZt1v9qkxLJWNJaGni"
|
||||||
_crossorigin "anonymous" ] []
|
_crossorigin "anonymous" ] []
|
||||||
|
|
||||||
/// Script tag to load the unminified version from unpkg.com
|
/// Script tag to load the unminified version from unpkg.com
|
||||||
let unminified =
|
let unminified =
|
||||||
script [ _src "https://unpkg.com/htmx.org@1.9.5/dist/htmx.js"
|
script [ _src "https://unpkg.com/htmx.org@1.9.6/dist/htmx.js"
|
||||||
_integrity "sha384-7PsmARhgPhXF9ahyuTafz8AWfM9ZfXE9qZJeagUhWAYK632LixPUVjGRZnHP9ylN"
|
_integrity "sha384-DyaDHx3hlXQ3QqTsQbNECvRW/A/B+4OtEWLCHbsDRPI3oJ98ekMiWJ4Yyrrqimog"
|
||||||
_crossorigin "anonymous" ] []
|
_crossorigin "anonymous" ] []
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
This package enables [htmx](https://htmx.org) support within the [Giraffe](https://giraffe.wiki) view engine.
|
This package enables [htmx](https://htmx.org) support within the [Giraffe](https://giraffe.wiki) view engine.
|
||||||
|
|
||||||
**htmx version: 1.9.5**
|
**htmx version: 1.9.6**
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user