From b74f3b376efa0f8c87ee341703e541ea87a3fa46 Mon Sep 17 00:00:00 2001 From: Marco Minerva Date: Fri, 19 Apr 2024 18:12:22 +0200 Subject: [PATCH 1/2] Libraries update --- samples/DatabaseGpt.Web/DatabaseGpt.Web.csproj | 4 ++-- src/DatabaseGpt.Sqlite/DatabaseGpt.Sqlite.csproj | 4 ++-- src/DatabaseGpt/DatabaseGpt.csproj | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/DatabaseGpt.Web/DatabaseGpt.Web.csproj b/samples/DatabaseGpt.Web/DatabaseGpt.Web.csproj index 10d0f39..3cbaf3a 100644 --- a/samples/DatabaseGpt.Web/DatabaseGpt.Web.csproj +++ b/samples/DatabaseGpt.Web/DatabaseGpt.Web.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/src/DatabaseGpt.Sqlite/DatabaseGpt.Sqlite.csproj b/src/DatabaseGpt.Sqlite/DatabaseGpt.Sqlite.csproj index a1a4fb0..3f59078 100644 --- a/src/DatabaseGpt.Sqlite/DatabaseGpt.Sqlite.csproj +++ b/src/DatabaseGpt.Sqlite/DatabaseGpt.Sqlite.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/src/DatabaseGpt/DatabaseGpt.csproj b/src/DatabaseGpt/DatabaseGpt.csproj index c277a79..feaba69 100644 --- a/src/DatabaseGpt/DatabaseGpt.csproj +++ b/src/DatabaseGpt/DatabaseGpt.csproj @@ -12,7 +12,7 @@ - + From 4289cfde6fa591c4b1ee421dc51963b46ee97552 Mon Sep 17 00:00:00 2001 From: Marco Minerva Date: Fri, 19 Apr 2024 18:14:40 +0200 Subject: [PATCH 2/2] Update cilent libraries --- samples/DatabaseGpt.Web/libman.json | 4 +-- .../wwwroot/lib/alpinejs/cdn.js | 32 +++++++++++++++---- .../wwwroot/lib/alpinejs/cdn.min.js | 4 +-- .../wwwroot/lib/alpinejs/module.cjs.js | 32 +++++++++++++++---- .../wwwroot/lib/alpinejs/module.cjs.min.js | 4 +-- .../wwwroot/lib/alpinejs/module.esm.js | 32 +++++++++++++++---- .../wwwroot/lib/alpinejs/module.esm.min.js | 2 +- .../wwwroot/lib/marked/lib/marked.esm.js | 10 +++--- .../wwwroot/lib/marked/lib/marked.esm.min.js | 2 +- .../wwwroot/lib/marked/lib/marked.umd.js | 10 +++--- .../wwwroot/lib/marked/lib/marked.umd.min.js | 2 +- .../wwwroot/lib/marked/marked.min.js | 4 +-- 12 files changed, 98 insertions(+), 40 deletions(-) diff --git a/samples/DatabaseGpt.Web/libman.json b/samples/DatabaseGpt.Web/libman.json index aa375de..7098083 100644 --- a/samples/DatabaseGpt.Web/libman.json +++ b/samples/DatabaseGpt.Web/libman.json @@ -15,11 +15,11 @@ "destination": "wwwroot/lib/jquery" }, { - "library": "alpinejs@3.13.7", + "library": "alpinejs@3.13.8", "destination": "wwwroot/lib/alpinejs" }, { - "library": "marked@12.0.1", + "library": "marked@12.0.2", "destination": "wwwroot/lib/marked" } ] diff --git a/samples/DatabaseGpt.Web/wwwroot/lib/alpinejs/cdn.js b/samples/DatabaseGpt.Web/wwwroot/lib/alpinejs/cdn.js index 5d43f61..ef351b9 100644 --- a/samples/DatabaseGpt.Web/wwwroot/lib/alpinejs/cdn.js +++ b/samples/DatabaseGpt.Web/wwwroot/lib/alpinejs/cdn.js @@ -1397,7 +1397,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); "checked", "required", "readonly", - "hidden", "open", "selected", "autofocus", @@ -1621,7 +1620,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); get raw() { return raw; }, - version: "3.13.7", + version: "3.13.8", flushAndStopDeferringMutations, dontAutoEvaluateFunctions, disableEffectScheduling, @@ -2798,7 +2797,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); }); if (modifiers.includes("fill")) { if ([void 0, null, ""].includes(getValue()) || el.type === "checkbox" && Array.isArray(getValue())) { - el.dispatchEvent(new Event(event, {})); + setValue( + getInputValue(el, modifiers, { target: el }, getValue()) + ); } } if (!el._x_removeModelListeners) @@ -2867,12 +2868,25 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); return option.value || option.text; }); } else { + let newValue; + if (el.type === "radio") { + if (event.target.checked) { + newValue = event.target.value; + } else { + newValue = currentValue; + } + } else { + newValue = event.target.value; + } if (modifiers.includes("number")) { - return safeParseNumber(event.target.value); + return safeParseNumber(newValue); } else if (modifiers.includes("boolean")) { - return safeParseBoolean(event.target.value); + return safeParseBoolean(newValue); + } else if (modifiers.includes("trim")) { + return newValue.trim(); + } else { + return newValue; } - return modifiers.includes("trim") ? event.target.value.trim() : event.target.value; } }); } @@ -2931,7 +2945,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); // packages/alpinejs/src/directives/x-bind.js mapAttributes(startingWith(":", into(prefix("bind:")))); - var handler2 = (el, { value, modifiers, expression, original }, { effect: effect3 }) => { + var handler2 = (el, { value, modifiers, expression, original }, { effect: effect3, cleanup: cleanup2 }) => { if (!value) { let bindingProviders = {}; injectBindingProviders(bindingProviders); @@ -2953,6 +2967,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); } mutateDom(() => bind(el, value, result, modifiers)); })); + cleanup2(() => { + el._x_undoAddedClasses && el._x_undoAddedClasses(); + el._x_undoAddedStyles && el._x_undoAddedStyles(); + }); }; handler2.inline = (el, { value, modifiers, expression }) => { if (!value) diff --git a/samples/DatabaseGpt.Web/wwwroot/lib/alpinejs/cdn.min.js b/samples/DatabaseGpt.Web/wwwroot/lib/alpinejs/cdn.min.js index f750e64..cc6050c 100644 --- a/samples/DatabaseGpt.Web/wwwroot/lib/alpinejs/cdn.min.js +++ b/samples/DatabaseGpt.Web/wwwroot/lib/alpinejs/cdn.min.js @@ -1,5 +1,5 @@ -(()=>{var rt=!1,nt=!1,U=[],it=-1;function Vt(e){Sn(e)}function Sn(e){U.includes(e)||U.push(e),An()}function ve(e){let t=U.indexOf(e);t!==-1&&t>it&&U.splice(t,1)}function An(){!nt&&!rt&&(rt=!0,queueMicrotask(On))}function On(){rt=!1,nt=!0;for(let e=0;ee.effect(t,{scheduler:r=>{ot?Vt(r):r()}}),st=e.raw}function at(e){D=e}function Wt(e){let t=()=>{};return[n=>{let i=D(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),L(i))},i},()=>{t()}]}function Se(e,t){let r=!0,n,i=D(()=>{let o=e();JSON.stringify(o),r?n=o:queueMicrotask(()=>{t(o,n),n=o}),r=!1});return()=>L(i)}function W(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}function C(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>C(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)C(n,t,!1),n=n.nextElementSibling}function E(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var Gt=!1;function Jt(){Gt&&E("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),Gt=!0,document.body||E("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `