From bee08c7c7f3e330d39a6819c0e1a27a5532a586d Mon Sep 17 00:00:00 2001 From: Konstantin Kharlamov Date: Fri, 8 Nov 2024 19:23:15 +0300 Subject: [PATCH 1/2] Support `onClose` event in `dialog` element See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/close_event --- codegen/consts.js | 1 + codegen/react-html-attributes.json | 1 + src/React/Basic/DOM/Generated.purs | 1 + src/React/Basic/DOM/Simplified/Generated.purs | 1 + 4 files changed, 4 insertions(+) diff --git a/codegen/consts.js b/codegen/consts.js index 3614672..69f9396 100644 --- a/codegen/consts.js +++ b/codegen/consts.js @@ -67,6 +67,7 @@ module.exports.types = { "onCanPlayThrough": "EventHandler", "onChange": "EventHandler", "onClick": "EventHandler", + "onClose": "EventHandler", "onCompositionEnd": "EventHandler", "onCompositionStart": "EventHandler", "onCompositionUpdate": "EventHandler", diff --git a/codegen/react-html-attributes.json b/codegen/react-html-attributes.json index be7bf9a..1f3e89d 100644 --- a/codegen/react-html-attributes.json +++ b/codegen/react-html-attributes.json @@ -233,6 +233,7 @@ "title" ], "dialog": [ + "onClose", "open" ], "embed": [ diff --git a/src/React/Basic/DOM/Generated.purs b/src/React/Basic/DOM/Generated.purs index 1ac3f4c..0733415 100644 --- a/src/React/Basic/DOM/Generated.purs +++ b/src/React/Basic/DOM/Generated.purs @@ -4310,6 +4310,7 @@ type Props_dialog = , onAnimationStart :: EventHandler , onBlur :: EventHandler , onClick :: EventHandler + , onClose :: EventHandler , onCompositionEnd :: EventHandler , onCompositionStart :: EventHandler , onCompositionUpdate :: EventHandler diff --git a/src/React/Basic/DOM/Simplified/Generated.purs b/src/React/Basic/DOM/Simplified/Generated.purs index 775c396..c2c5279 100644 --- a/src/React/Basic/DOM/Simplified/Generated.purs +++ b/src/React/Basic/DOM/Simplified/Generated.purs @@ -3884,6 +3884,7 @@ type Props_dialog = , onAnimationStart :: EventHandler , onBlur :: EventHandler , onClick :: EventHandler + , onClose :: EventHandler , onCompositionEnd :: EventHandler , onCompositionStart :: EventHandler , onCompositionUpdate :: EventHandler From 19b00828d80508fc8a80ec2ad04fb4e5af1c4253 Mon Sep 17 00:00:00 2001 From: Konstantin Kharlamov Date: Fri, 8 Nov 2024 19:33:06 +0300 Subject: [PATCH 2/2] Add explanation on how to modify the generated files --- codegen/index.js | 19 +++++++++---------- src/React/Basic/DOM/Generated.purs | 7 +++++-- src/React/Basic/DOM/SVG.purs | 7 +++++-- src/React/Basic/DOM/Simplified/Generated.purs | 7 +++++-- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/codegen/index.js b/codegen/index.js index 7dda1b4..4015eaf 100644 --- a/codegen/index.js +++ b/codegen/index.js @@ -5,10 +5,15 @@ const htmlGenFile = "../src/React/Basic/DOM/Generated.purs"; const htmlSimplifiedGenFile = "../src/React/Basic/DOM/Simplified/Generated.purs"; const svgGenFile = "../src/React/Basic/DOM/SVG.purs"; -const htmlHeader = `-- | ---------------------------------------- +const warningHeader = `-- | ------------------------------------------------------------ -- | THIS FILE IS GENERATED -- DO NOT EDIT IT --- | ---------------------------------------- +-- | Instead edit files under 'codegen/' dir and regenerate with: +-- | npm install +-- | node ./index.js +-- | ------------------------------------------------------------ +`; +const htmlHeader = `${warningHeader} module React.Basic.DOM.Generated where import Data.Nullable (Nullable) @@ -23,10 +28,7 @@ import Web.DOM (Node) `; -const simplifiedHtmlHeader = `-- | ---------------------------------------- --- | THIS FILE IS GENERATED -- DO NOT EDIT IT --- | ---------------------------------------- - +const simplifiedHtmlHeader = `${warningHeader} module React.Basic.DOM.Simplified.Generated where import Data.Nullable (Nullable) @@ -55,10 +57,7 @@ const propType = (e, p) => { } } -const svgHeader = `-- | ---------------------------------------- --- | THIS FILE IS GENERATED -- DO NOT EDIT IT --- | ---------------------------------------- - +const svgHeader = `${warningHeader} module React.Basic.DOM.SVG where import Data.Nullable (Nullable) diff --git a/src/React/Basic/DOM/Generated.purs b/src/React/Basic/DOM/Generated.purs index 0733415..03cd1c1 100644 --- a/src/React/Basic/DOM/Generated.purs +++ b/src/React/Basic/DOM/Generated.purs @@ -1,6 +1,9 @@ --- | ---------------------------------------- +-- | ------------------------------------------------------------ -- | THIS FILE IS GENERATED -- DO NOT EDIT IT --- | ---------------------------------------- +-- | Instead edit files under 'codegen/' dir and regenerate with: +-- | npm install +-- | node ./index.js +-- | ------------------------------------------------------------ module React.Basic.DOM.Generated where diff --git a/src/React/Basic/DOM/SVG.purs b/src/React/Basic/DOM/SVG.purs index c5ec0dc..2082bb1 100644 --- a/src/React/Basic/DOM/SVG.purs +++ b/src/React/Basic/DOM/SVG.purs @@ -1,6 +1,9 @@ --- | ---------------------------------------- +-- | ------------------------------------------------------------ -- | THIS FILE IS GENERATED -- DO NOT EDIT IT --- | ---------------------------------------- +-- | Instead edit files under 'codegen/' dir and regenerate with: +-- | npm install +-- | node ./index.js +-- | ------------------------------------------------------------ module React.Basic.DOM.SVG where diff --git a/src/React/Basic/DOM/Simplified/Generated.purs b/src/React/Basic/DOM/Simplified/Generated.purs index c2c5279..6209ec4 100644 --- a/src/React/Basic/DOM/Simplified/Generated.purs +++ b/src/React/Basic/DOM/Simplified/Generated.purs @@ -1,6 +1,9 @@ --- | ---------------------------------------- +-- | ------------------------------------------------------------ -- | THIS FILE IS GENERATED -- DO NOT EDIT IT --- | ---------------------------------------- +-- | Instead edit files under 'codegen/' dir and regenerate with: +-- | npm install +-- | node ./index.js +-- | ------------------------------------------------------------ module React.Basic.DOM.Simplified.Generated where pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy