@plitzi/sdk-elements 0.38.24 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +156 -1
- package/dist/Element/RootElement.d.ts +1 -1
- package/dist/Element/RootElement.mjs +62 -61
- package/dist/Element/RowAnchor.d.ts +15 -0
- package/dist/Element/RowAnchor.mjs +8 -0
- package/dist/Element/helpers/elementConstants.mjs +12 -0
- package/dist/Element/hocs/withElement.d.ts +1 -1
- package/dist/Element/hocs/withElement.mjs +96 -88
- package/dist/Element/hooks/useEditableContent.d.ts +11 -0
- package/dist/Element/hooks/useEditableContent.mjs +11 -10
- package/dist/Element/hooks/useElement.mjs +1 -1
- package/dist/Element/hooks/useElementDataSource.mjs +11 -10
- package/dist/Element/hooks/useFocusInteractions.d.ts +12 -0
- package/dist/Element/hooks/useFocusInteractions.mjs +9 -0
- package/dist/Element/hooks/useInternalClassName.mjs +22 -21
- package/dist/Element/hooks/useRootElementInteractions.mjs +48 -42
- package/dist/Element/hooks/useScrollInteractions.d.ts +1 -1
- package/dist/Element/hooks/useScrollInteractions.mjs +61 -30
- package/dist/dataSource/PluginSource.d.ts +22 -0
- package/dist/dataSource/PluginSource.mjs +27 -0
- package/dist/dataSource/index.d.ts +2 -0
- package/dist/dataSource/index.mjs +5 -4
- package/dist/elements/advanced/BlockHtml/BlockHtml.d.ts +1 -1
- package/dist/elements/advanced/BlockHtml/index.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/BlockJsx.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/index.d.ts +1 -1
- package/dist/elements/advanced/Custom/Custom.d.ts +1 -1
- package/dist/elements/advanced/Custom/index.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/NodeHtml.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/declaration.d.ts +3 -3
- package/dist/elements/advanced/NodeHtml/index.d.ts +4 -4
- package/dist/elements/advanced/Reference/Reference.d.ts +2 -2
- package/dist/elements/advanced/Reference/Reference.mjs +1 -1
- package/dist/elements/advanced/Reference/index.d.ts +1 -1
- package/dist/elements/basic/Button/Button.d.ts +7 -2
- package/dist/elements/basic/Button/Button.mjs +27 -25
- package/dist/elements/basic/Button/Settings.mjs +1 -1
- package/dist/elements/basic/Button/declaration.d.ts +8 -1
- package/dist/elements/basic/Button/declaration.mjs +3 -0
- package/dist/elements/basic/Button/index.d.ts +9 -2
- package/dist/elements/basic/Dropdown/Dropdown.d.ts +9 -2
- package/dist/elements/basic/Dropdown/Dropdown.mjs +93 -74
- package/dist/elements/basic/Dropdown/DropdownPopup/DropdownPopup.d.ts +1 -1
- package/dist/elements/basic/Dropdown/DropdownPopup/index.d.ts +1 -1
- package/dist/elements/basic/Dropdown/declaration.d.ts +31 -0
- package/dist/elements/basic/Dropdown/declaration.mjs +38 -6
- package/dist/elements/basic/Dropdown/index.d.ts +33 -2
- package/dist/elements/basic/Dropdown/useDropdown.d.ts +2 -0
- package/dist/elements/basic/Heading/Heading.d.ts +1 -1
- package/dist/elements/basic/Heading/Heading.mjs +3 -2
- package/dist/elements/basic/Heading/declaration.d.ts +2 -0
- package/dist/elements/basic/Heading/declaration.mjs +2 -0
- package/dist/elements/basic/Heading/index.d.ts +3 -1
- package/dist/elements/basic/Link/Link.d.ts +1 -1
- package/dist/elements/basic/Link/Link.mjs +46 -45
- package/dist/elements/basic/Link/declaration.d.ts +1 -0
- package/dist/elements/basic/Link/declaration.mjs +5 -0
- package/dist/elements/basic/Link/index.d.ts +2 -1
- package/dist/elements/basic/Markdown/Markdown.d.ts +1 -1
- package/dist/elements/basic/Markdown/declaration.d.ts +2 -0
- package/dist/elements/basic/Markdown/declaration.mjs +2 -0
- package/dist/elements/basic/Markdown/index.d.ts +3 -1
- package/dist/elements/basic/Paragraph/Paragraph.d.ts +1 -1
- package/dist/elements/basic/Paragraph/Paragraph.mjs +3 -2
- package/dist/elements/basic/Paragraph/Settings.mjs +1 -1
- package/dist/elements/basic/Paragraph/declaration.d.ts +2 -0
- package/dist/elements/basic/Paragraph/declaration.mjs +2 -0
- package/dist/elements/basic/Paragraph/index.d.ts +3 -1
- package/dist/elements/basic/RichText/RichText.d.ts +1 -1
- package/dist/elements/basic/RichText/declaration.d.ts +1 -0
- package/dist/elements/basic/RichText/declaration.mjs +1 -0
- package/dist/elements/basic/RichText/index.d.ts +2 -1
- package/dist/elements/basic/Text/Settings.mjs +1 -1
- package/dist/elements/basic/Text/Text.d.ts +1 -1
- package/dist/elements/basic/Text/Text.mjs +3 -2
- package/dist/elements/basic/Text/declaration.d.ts +2 -0
- package/dist/elements/basic/Text/declaration.mjs +2 -0
- package/dist/elements/basic/Text/index.d.ts +3 -1
- package/dist/elements/basic/ThemeToggle/ThemeToggle.d.ts +2 -2
- package/dist/elements/basic/ThemeToggle/declaration.d.ts +1 -0
- package/dist/elements/basic/ThemeToggle/declaration.mjs +5 -0
- package/dist/elements/basic/ThemeToggle/index.d.ts +2 -1
- package/dist/elements/declarations/index.d.ts +322 -12
- package/dist/elements/declarations/index.mjs +46 -44
- package/dist/elements/form/Form/Form.d.ts +8 -2
- package/dist/elements/form/Form/Form.mjs +102 -79
- package/dist/elements/form/Form/declaration.d.ts +21 -3
- package/dist/elements/form/Form/declaration.mjs +28 -11
- package/dist/elements/form/Form/index.d.ts +17 -2
- package/dist/elements/form/FormControl/FormControl.d.ts +8 -2
- package/dist/elements/form/FormControl/FormControl.mjs +71 -66
- package/dist/elements/form/FormControl/Settings.d.ts +6 -1
- package/dist/elements/form/FormControl/Settings.mjs +130 -98
- package/dist/elements/form/FormControl/declaration.d.ts +7 -0
- package/dist/elements/form/FormControl/declaration.mjs +21 -1
- package/dist/elements/form/FormControl/helpers/useBlurValidation.d.ts +12 -0
- package/dist/elements/form/FormControl/helpers/useBlurValidation.mjs +20 -0
- package/dist/elements/form/FormControl/helpers/validateField.d.ts +8 -0
- package/dist/elements/form/FormControl/helpers/validateField.mjs +8 -2
- package/dist/elements/form/FormControl/hocs/withFieldValue.d.ts +4 -0
- package/dist/elements/form/FormControl/hocs/withFieldValue.mjs +49 -41
- package/dist/elements/form/FormControl/index.d.ts +8 -1
- package/dist/elements/form/FormControl/inputs/Checkbox.mjs +2 -2
- package/dist/elements/form/FormControl/inputs/Input.d.ts +5 -1
- package/dist/elements/form/FormControl/inputs/Input.mjs +42 -38
- package/dist/elements/form/FormControl/inputs/Select.d.ts +5 -1
- package/dist/elements/form/FormControl/inputs/Select.mjs +33 -28
- package/dist/elements/form/FormControl/inputs/Textarea.mjs +27 -26
- package/dist/elements/form/FormControl/inputs/useFocusWhenShown.d.ts +1 -1
- package/dist/elements/index.d.ts +3 -1
- package/dist/elements/index.mjs +32 -30
- package/dist/elements/internal/LayoutContainer/LayoutContainer.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/LayoutContainer.mjs +30 -30
- package/dist/elements/internal/LayoutContainer/index.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/mask.d.ts +13 -0
- package/dist/elements/internal/LayoutContainer/mask.mjs +16 -1
- package/dist/elements/internal/Loading/Loading.d.ts +1 -1
- package/dist/elements/internal/Loading/index.d.ts +1 -1
- package/dist/elements/internal/NotFound/NotFound.d.ts +1 -1
- package/dist/elements/internal/NotFound/index.d.ts +1 -1
- package/dist/elements/internal/Page/Page.d.ts +17 -3
- package/dist/elements/internal/Page/Page.mjs +32 -25
- package/dist/elements/internal/Page/PageHead.d.ts +11 -4
- package/dist/elements/internal/Page/PageHead.mjs +41 -19
- package/dist/elements/internal/Page/PageWithheld.d.ts +3 -2
- package/dist/elements/internal/Page/PageWithheld.mjs +41 -18
- package/dist/elements/internal/Page/Settings.d.ts +5 -1
- package/dist/elements/internal/Page/Settings.mjs +160 -121
- package/dist/elements/internal/Page/SharePreview.d.ts +13 -0
- package/dist/elements/internal/Page/SharePreview.mjs +53 -0
- package/dist/elements/internal/Page/declaration.d.ts +9 -1
- package/dist/elements/internal/Page/declaration.mjs +11 -4
- package/dist/elements/internal/Page/index.d.ts +9 -2
- package/dist/elements/media/Chart/Chart.d.ts +33 -0
- package/dist/elements/media/Chart/Chart.mjs +195 -0
- package/dist/elements/media/Chart/Settings.d.ts +6 -0
- package/dist/elements/media/Chart/Settings.mjs +92 -0
- package/dist/elements/media/Chart/chartGeometry.d.ts +37 -0
- package/dist/elements/media/Chart/chartGeometry.mjs +47 -0
- package/dist/elements/media/Chart/declaration.d.ts +144 -0
- package/dist/elements/media/Chart/declaration.mjs +107 -0
- package/dist/elements/media/Chart/index.d.ts +145 -0
- package/dist/elements/media/Chart/index.mjs +6 -0
- package/dist/elements/media/Embed/Embed.d.ts +1 -1
- package/dist/elements/media/Embed/Embed.mjs +25 -21
- package/dist/elements/media/Embed/declaration.d.ts +1 -0
- package/dist/elements/media/Embed/declaration.mjs +1 -0
- package/dist/elements/media/Embed/index.d.ts +2 -1
- package/dist/elements/media/FontAwesome/FontAwesome.d.ts +1 -1
- package/dist/elements/media/FontAwesome/index.d.ts +1 -1
- package/dist/elements/media/Image/Image.d.ts +1 -1
- package/dist/elements/media/Image/Image.mjs +35 -34
- package/dist/elements/media/Image/declaration.d.ts +2 -1
- package/dist/elements/media/Image/declaration.mjs +1 -0
- package/dist/elements/media/Image/index.d.ts +3 -2
- package/dist/elements/media/Svg/Svg.d.ts +1 -1
- package/dist/elements/media/Svg/declaration.d.ts +1 -0
- package/dist/elements/media/Svg/declaration.mjs +1 -0
- package/dist/elements/media/Svg/index.d.ts +2 -1
- package/dist/elements/media/Video/Video.d.ts +1 -1
- package/dist/elements/media/Video/declaration.d.ts +1 -0
- package/dist/elements/media/Video/declaration.mjs +1 -0
- package/dist/elements/media/Video/index.d.ts +2 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.d.ts +1 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.mjs +215 -185
- package/dist/elements/provider/ApiContainer/declaration.d.ts +9 -0
- package/dist/elements/provider/ApiContainer/declaration.mjs +10 -1
- package/dist/elements/provider/ApiContainer/hooks/useInputRefresh.d.ts +4 -4
- package/dist/elements/provider/ApiContainer/hooks/useProviderPagination.d.ts +2 -1
- package/dist/elements/provider/ApiContainer/index.d.ts +10 -1
- package/dist/elements/provider/Channel/Channel.d.ts +1 -1
- package/dist/elements/provider/Channel/declaration.d.ts +9 -0
- package/dist/elements/provider/Channel/declaration.mjs +11 -2
- package/dist/elements/provider/Channel/index.d.ts +10 -1
- package/dist/elements/settings.mjs +42 -40
- package/dist/elements/structure/Carousel/Carousel.d.ts +1 -1
- package/dist/elements/structure/Carousel/Carousel.mjs +147 -130
- package/dist/elements/structure/Carousel/CarouselContext.d.ts +3 -3
- package/dist/elements/structure/Carousel/CarouselTrack/CarouselTrack.d.ts +1 -1
- package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/ScrollTrack.d.ts +6 -2
- package/dist/elements/structure/Carousel/CarouselTrack/components/ScrollTrack/ScrollTrack.mjs +32 -20
- package/dist/elements/structure/Carousel/CarouselTrack/index.d.ts +1 -1
- package/dist/elements/structure/Carousel/carouselIndex.d.ts +17 -0
- package/dist/elements/structure/Carousel/carouselIndex.mjs +17 -5
- package/dist/elements/structure/Carousel/declaration.d.ts +49 -2
- package/dist/elements/structure/Carousel/declaration.mjs +26 -4
- package/dist/elements/structure/Carousel/index.d.ts +51 -4
- package/dist/elements/structure/Container/Container.d.ts +5 -3
- package/dist/elements/structure/Container/Container.mjs +6 -5
- package/dist/elements/structure/Container/Settings.d.ts +4 -2
- package/dist/elements/structure/Container/Settings.mjs +19 -5
- package/dist/elements/structure/Container/declaration.d.ts +3 -2
- package/dist/elements/structure/Container/declaration.mjs +3 -1
- package/dist/elements/structure/Container/index.d.ts +4 -3
- package/dist/elements/structure/DialogContainer/DialogContainer.d.ts +1 -1
- package/dist/elements/structure/DialogContainer/declaration.d.ts +1 -0
- package/dist/elements/structure/DialogContainer/declaration.mjs +5 -0
- package/dist/elements/structure/DialogContainer/index.d.ts +2 -1
- package/dist/elements/structure/List/List.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/ListItem.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/index.d.ts +1 -1
- package/dist/elements/structure/List/declaration.d.ts +5 -0
- package/dist/elements/structure/List/declaration.mjs +5 -0
- package/dist/elements/structure/List/index.d.ts +7 -2
- package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +1 -0
- package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.d.ts +3 -1
- package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.mjs +33 -25
- package/dist/elements/structure/ModalContainer/ModalContainer.d.ts +1 -1
- package/dist/elements/structure/ModalContainer/declaration.d.ts +2 -0
- package/dist/elements/structure/ModalContainer/declaration.mjs +2 -0
- package/dist/elements/structure/ModalContainer/index.d.ts +3 -1
- package/dist/elements/structure/Pagination/Pagination.d.ts +1 -1
- package/dist/elements/structure/Pagination/declaration.d.ts +1 -0
- package/dist/elements/structure/Pagination/declaration.mjs +5 -0
- package/dist/elements/structure/Pagination/index.d.ts +2 -1
- package/dist/elements/structure/TabContainer/TabContainer.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/TabContainerBody.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/index.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/index.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.d.ts +6 -0
- package/dist/elements/structure/TabContainer/TabContainerItem/declaration.mjs +6 -0
- package/dist/elements/structure/TabContainer/TabContainerItem/index.d.ts +7 -1
- package/dist/elements/structure/TabContainer/index.d.ts +10 -4
- package/dist/index.d.ts +216 -51
- package/dist/index.mjs +39 -37
- package/package.json +8 -8
- package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.d.ts +0 -16
- package/dist/elements/provider/ApiContainer/helpers/isEmptyAnswer.mjs +0 -4
|
@@ -20,71 +20,73 @@ import v from "../internal/LayoutContainer/declaration.mjs";
|
|
|
20
20
|
import y from "../internal/Loading/declaration.mjs";
|
|
21
21
|
import b from "../internal/NotFound/declaration.mjs";
|
|
22
22
|
import x, { DOCUMENT_SCROLLS as S, isDocumentScroll as C } from "../internal/Page/declaration.mjs";
|
|
23
|
-
import w from "../media/
|
|
24
|
-
import T from "../media/
|
|
25
|
-
import E from "../media/
|
|
26
|
-
import D from "../media/
|
|
27
|
-
import O from "../media/
|
|
28
|
-
import k from "../
|
|
29
|
-
import A from "../provider/
|
|
30
|
-
import j from "../
|
|
31
|
-
import M from "../structure/Carousel/declaration.mjs";
|
|
32
|
-
import N
|
|
33
|
-
import F from "../structure/
|
|
34
|
-
import I from "../structure/
|
|
35
|
-
import L from "../structure/List/
|
|
36
|
-
import R from "../structure/
|
|
37
|
-
import z from "../structure/
|
|
38
|
-
import B from "../structure/
|
|
39
|
-
import V from "../structure/TabContainer/
|
|
40
|
-
import H from "../structure/TabContainer/
|
|
41
|
-
import U from "../structure/TabContainer/
|
|
42
|
-
import
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
23
|
+
import w from "../media/Chart/declaration.mjs";
|
|
24
|
+
import T from "../media/Embed/declaration.mjs";
|
|
25
|
+
import E from "../media/FontAwesome/declaration.mjs";
|
|
26
|
+
import D from "../media/Image/declaration.mjs";
|
|
27
|
+
import O from "../media/Svg/declaration.mjs";
|
|
28
|
+
import k from "../media/Video/declaration.mjs";
|
|
29
|
+
import A from "../provider/ApiContainer/declaration.mjs";
|
|
30
|
+
import j from "../provider/Channel/declaration.mjs";
|
|
31
|
+
import M from "../structure/Carousel/CarouselTrack/declaration.mjs";
|
|
32
|
+
import N from "../structure/Carousel/declaration.mjs";
|
|
33
|
+
import P, { NAMEABLE_CONTAINER_TAGS as F } from "../structure/Container/declaration.mjs";
|
|
34
|
+
import I from "../structure/DialogContainer/declaration.mjs";
|
|
35
|
+
import L from "../structure/List/declaration.mjs";
|
|
36
|
+
import R from "../structure/List/ListItem/declaration.mjs";
|
|
37
|
+
import z from "../structure/ModalContainer/declaration.mjs";
|
|
38
|
+
import B from "../structure/Pagination/declaration.mjs";
|
|
39
|
+
import V from "../structure/TabContainer/declaration.mjs";
|
|
40
|
+
import H from "../structure/TabContainer/TabContainerBody/declaration.mjs";
|
|
41
|
+
import U from "../structure/TabContainer/TabContainerHeader/declaration.mjs";
|
|
42
|
+
import W from "../structure/TabContainer/TabContainerItem/declaration.mjs";
|
|
43
|
+
import { interactionBasicTriggers as G } from "../../Element/helpers/elementConstants.mjs";
|
|
44
|
+
import { HTML_TAG_PARTS as K } from "../basic/RichText/classHtmlParts.mjs";
|
|
45
|
+
import { isSvgMarkup as q } from "../media/Svg/sanitizeSvg.mjs";
|
|
45
46
|
//#region src/elements/declarations/index.ts
|
|
46
|
-
var
|
|
47
|
-
ApiContainer:
|
|
47
|
+
var J = {
|
|
48
|
+
ApiContainer: A,
|
|
48
49
|
BlockHtml: e,
|
|
49
50
|
BlockJsx: t,
|
|
50
51
|
Button: o,
|
|
51
|
-
Carousel:
|
|
52
|
-
CarouselTrack:
|
|
53
|
-
Channel:
|
|
54
|
-
Container:
|
|
52
|
+
Carousel: N,
|
|
53
|
+
CarouselTrack: M,
|
|
54
|
+
Channel: j,
|
|
55
|
+
Container: P,
|
|
55
56
|
Custom: n,
|
|
56
|
-
DialogContainer:
|
|
57
|
+
DialogContainer: I,
|
|
57
58
|
Dropdown: s,
|
|
58
59
|
DropdownPopup: c,
|
|
59
|
-
Embed:
|
|
60
|
-
FontAwesome:
|
|
60
|
+
Embed: T,
|
|
61
|
+
FontAwesome: E,
|
|
61
62
|
Form: g,
|
|
62
63
|
FormControl: _,
|
|
63
64
|
Heading: l,
|
|
64
|
-
Image:
|
|
65
|
+
Image: D,
|
|
65
66
|
LayoutContainer: v,
|
|
66
67
|
Link: u,
|
|
67
|
-
List:
|
|
68
|
-
ListItem:
|
|
68
|
+
List: L,
|
|
69
|
+
ListItem: R,
|
|
69
70
|
Loading: y,
|
|
70
71
|
Markdown: d,
|
|
71
|
-
ModalContainer:
|
|
72
|
+
ModalContainer: z,
|
|
72
73
|
NodeHtml: r,
|
|
73
74
|
NotFound: b,
|
|
74
75
|
Page: x,
|
|
75
|
-
Pagination:
|
|
76
|
+
Pagination: B,
|
|
76
77
|
Paragraph: f,
|
|
77
78
|
PlitziSdk: i,
|
|
78
79
|
Reference: a,
|
|
79
80
|
RichText: p,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
Chart: w,
|
|
82
|
+
Svg: O,
|
|
83
|
+
TabContainer: V,
|
|
84
|
+
TabContainerBody: H,
|
|
85
|
+
TabContainerHeader: U,
|
|
86
|
+
TabContainerItem: W,
|
|
85
87
|
Text: m,
|
|
86
88
|
ThemeToggle: h,
|
|
87
|
-
Video:
|
|
88
|
-
},
|
|
89
|
+
Video: k
|
|
90
|
+
}, Y = Object.fromEntries(Object.values(J).flatMap((e) => "serverTemplates" in e ? [[e.type, e.serverTemplates]] : [])), X = Object.fromEntries(Object.values(J).flatMap((e) => "contentAttributes" in e ? [[e.type, e.contentAttributes]] : [])), Z = (e) => X[e] ?? [];
|
|
89
91
|
//#endregion
|
|
90
|
-
export {
|
|
92
|
+
export { A as ApiContainerDeclaration, e as BlockHtmlDeclaration, t as BlockJsxDeclaration, o as ButtonDeclaration, N as CarouselDeclaration, M as CarouselTrackDeclaration, j as ChannelDeclaration, w as ChartDeclaration, P as ContainerDeclaration, n as CustomDeclaration, S as DOCUMENT_SCROLLS, I as DialogContainerDeclaration, s as DropdownDeclaration, c as DropdownPopupDeclaration, T as EmbedDeclaration, E as FontAwesomeDeclaration, _ as FormControlDeclaration, g as FormDeclaration, K as HTML_TAG_PARTS, l as HeadingDeclaration, D as ImageDeclaration, v as LayoutContainerDeclaration, u as LinkDeclaration, L as ListDeclaration, R as ListItemDeclaration, y as LoadingDeclaration, d as MarkdownDeclaration, z as ModalContainerDeclaration, F as NAMEABLE_CONTAINER_TAGS, r as NodeHtmlDeclaration, b as NotFoundDeclaration, x as PageDeclaration, B as PaginationDeclaration, f as ParagraphDeclaration, i as PlitziSdkDeclaration, a as ReferenceDeclaration, p as RichTextDeclaration, O as SvgDeclaration, H as TabContainerBodyDeclaration, V as TabContainerDeclaration, U as TabContainerHeaderDeclaration, W as TabContainerItemDeclaration, m as TextDeclaration, h as ThemeToggleDeclaration, k as VideoDeclaration, X as contentAttributesByType, Z as contentAttributesOf, J as elementDeclarations, G as interactionBasicTriggers, C as isDocumentScroll, q as isSvgMarkup, Y as serverTemplatesByType };
|
|
@@ -17,6 +17,12 @@ export type FormProps = {
|
|
|
17
17
|
noValidate: boolean;
|
|
18
18
|
errors: Record<string, string>;
|
|
19
19
|
values: Record<string, unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Whether a submit was tried since the form was shown or reset — valid or not. What a hint under a field steps aside
|
|
22
|
+
* by once the field's own error speaks: a sign-up's "8 characters" line and its "At least 8 characters." showed
|
|
23
|
+
* together, and nothing an author could write noticed an invalid Enter.
|
|
24
|
+
*/
|
|
25
|
+
submitted: boolean;
|
|
20
26
|
};
|
|
21
27
|
export type Field = {
|
|
22
28
|
id: string;
|
|
@@ -35,9 +41,9 @@ export type FormContextValue = {
|
|
|
35
41
|
setFieldValue: (name: string, value: FieldValue | null) => void;
|
|
36
42
|
setFieldError: (name: string, error: string) => void;
|
|
37
43
|
};
|
|
38
|
-
declare const Form: ({ ref, className, children, method, actionUrl, managedByInteractions, noValidate, errors, values }: FormProps) => import('react').JSX.Element;
|
|
44
|
+
declare const Form: ({ ref, className, children, method, actionUrl, managedByInteractions, noValidate, errors, values, submitted }: FormProps) => import('react').JSX.Element;
|
|
39
45
|
declare const _default: {
|
|
40
|
-
(props: import('../../..').WithElementProps<FormProps>): import('react').JSX.Element;
|
|
46
|
+
(props: import('../../..').WithElementProps<FormProps>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
41
47
|
displayName: string;
|
|
42
48
|
};
|
|
43
49
|
export default _default;
|
|
@@ -14,28 +14,28 @@ import { InteractionsContext as v } from "@plitzi/sdk-interactions";
|
|
|
14
14
|
import { produce as y } from "immer";
|
|
15
15
|
import { getSourceName as b } from "@plitzi/sdk-shared/dataSource/helpers";
|
|
16
16
|
//#region src/elements/form/Form/Form.tsx
|
|
17
|
-
var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl: w = "", managedByInteractions: T = !1, noValidate: E = !1, errors: D = f, values: O = f }) => {
|
|
18
|
-
let [
|
|
17
|
+
var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl: w = "", managedByInteractions: T = !1, noValidate: E = !1, errors: D = f, values: O = f, submitted: k = !1 }) => {
|
|
18
|
+
let [A, j] = u({}), M = l(/* @__PURE__ */ new Map()), N = l(!1), { id: P, definition: { label: F = "Form" }, setElementState: I } = n(), L = b(e.sourceType, P), { settings: { previewMode: R } } = d(), { interactionsManager: z } = a(v), B = o((e) => j((t) => ({
|
|
19
19
|
...t,
|
|
20
20
|
[e.name]: e
|
|
21
|
-
})), [
|
|
22
|
-
s(() => (
|
|
23
|
-
|
|
21
|
+
})), [j]);
|
|
22
|
+
s(() => (N.current = !1, () => {
|
|
23
|
+
N.current = !0;
|
|
24
24
|
}), []);
|
|
25
|
-
let
|
|
26
|
-
|
|
25
|
+
let V = o((e) => {
|
|
26
|
+
N.current || (j((t) => y(t, (t) => {
|
|
27
27
|
t[e] && delete t[e];
|
|
28
|
-
})), e &&
|
|
28
|
+
})), e && I((t) => ({
|
|
29
29
|
...t,
|
|
30
30
|
values: m(t, `values.${e}`),
|
|
31
31
|
errors: m(t, `errors.${e}`)
|
|
32
32
|
})));
|
|
33
|
-
}, [
|
|
34
|
-
|
|
35
|
-
}, []),
|
|
36
|
-
|
|
37
|
-
}, []),
|
|
38
|
-
e && (t === null && (t = ""),
|
|
33
|
+
}, [I]), H = o((e, t) => {
|
|
34
|
+
M.current.set(e, t);
|
|
35
|
+
}, []), U = o((e) => {
|
|
36
|
+
M.current.delete(e);
|
|
37
|
+
}, []), W = o((e, t = "") => {
|
|
38
|
+
e && (t === null && (t = ""), I((n) => n.errors && n.errors[e] ? {
|
|
39
39
|
...n,
|
|
40
40
|
values: {
|
|
41
41
|
...n.values,
|
|
@@ -49,8 +49,8 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
49
49
|
[e]: t
|
|
50
50
|
}
|
|
51
51
|
}));
|
|
52
|
-
}, [
|
|
53
|
-
e &&
|
|
52
|
+
}, [I]), G = o((e, t) => {
|
|
53
|
+
e && I((n) => !t && !p(n, `errors.${e}`) ? n : !t && n.errors && n.errors[e] ? {
|
|
54
54
|
...n,
|
|
55
55
|
errors: m(n, [`errors.${e}`])
|
|
56
56
|
} : {
|
|
@@ -60,7 +60,7 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
60
60
|
[e]: t
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
}, [
|
|
63
|
+
}, [I]), K = o(() => Object.values(A).filter((e) => !!e.name).reduce((e, t) => [
|
|
64
64
|
...e,
|
|
65
65
|
{
|
|
66
66
|
path: `fields.${t.name}.id`,
|
|
@@ -74,109 +74,132 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
74
74
|
path: `errors.${t.name}`,
|
|
75
75
|
name: `${t.name} Error Message`
|
|
76
76
|
}
|
|
77
|
-
], [
|
|
77
|
+
], [{
|
|
78
|
+
path: "submitted",
|
|
79
|
+
name: "Submitted"
|
|
80
|
+
}]), [A]), q = c(() => ({ runtime: { sources: {
|
|
78
81
|
form: {
|
|
79
82
|
errors: D,
|
|
80
83
|
values: O,
|
|
81
|
-
registerField:
|
|
82
|
-
unregisterField:
|
|
83
|
-
registerValidator:
|
|
84
|
-
unregisterValidator:
|
|
85
|
-
setFieldValue:
|
|
86
|
-
setFieldError:
|
|
84
|
+
registerField: B,
|
|
85
|
+
unregisterField: V,
|
|
86
|
+
registerValidator: H,
|
|
87
|
+
unregisterValidator: U,
|
|
88
|
+
setFieldValue: W,
|
|
89
|
+
setFieldError: G
|
|
87
90
|
},
|
|
88
|
-
[
|
|
91
|
+
[L]: {
|
|
89
92
|
values: O,
|
|
90
|
-
errors: D
|
|
93
|
+
errors: D,
|
|
94
|
+
submitted: k
|
|
91
95
|
}
|
|
92
96
|
} } }), [
|
|
93
|
-
|
|
97
|
+
L,
|
|
94
98
|
D,
|
|
95
99
|
O,
|
|
96
|
-
|
|
100
|
+
k,
|
|
97
101
|
B,
|
|
98
102
|
V,
|
|
99
103
|
H,
|
|
100
104
|
U,
|
|
101
|
-
W
|
|
105
|
+
W,
|
|
106
|
+
G
|
|
102
107
|
]);
|
|
103
108
|
i({
|
|
104
|
-
id:
|
|
105
|
-
source:
|
|
106
|
-
name:
|
|
107
|
-
fields:
|
|
109
|
+
id: P,
|
|
110
|
+
source: L,
|
|
111
|
+
name: F || `Form - ${P}`,
|
|
112
|
+
fields: K
|
|
108
113
|
});
|
|
109
|
-
let
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
let J = c(() => {
|
|
115
|
+
let t = Object.values(A).reduce((e, t) => ({
|
|
116
|
+
...e,
|
|
117
|
+
[t.name]: ""
|
|
118
|
+
}), {});
|
|
119
|
+
return {
|
|
120
|
+
onSubmit: {
|
|
121
|
+
...e.triggers.onSubmit,
|
|
122
|
+
preview: {
|
|
123
|
+
...e.triggers.onSubmit.preview,
|
|
124
|
+
values: t
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
onInvalid: {
|
|
128
|
+
...e.triggers.onInvalid,
|
|
129
|
+
preview: {
|
|
130
|
+
...e.triggers.onInvalid.preview,
|
|
131
|
+
errors: t,
|
|
132
|
+
values: t
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}, [A]), Y = o((e) => {
|
|
137
|
+
let t = [...M.current].reduce((e, [t, n]) => {
|
|
120
138
|
let r = n(O);
|
|
121
139
|
return r ? {
|
|
122
140
|
...e,
|
|
123
141
|
[t]: r
|
|
124
142
|
} : e;
|
|
125
143
|
}, {});
|
|
126
|
-
if (
|
|
144
|
+
if (I((e) => ({
|
|
127
145
|
...e,
|
|
128
|
-
errors: t
|
|
146
|
+
errors: t,
|
|
147
|
+
submitted: !0
|
|
129
148
|
})), Object.keys(t).length > 0) {
|
|
130
|
-
e.stopPropagation(), e.preventDefault()
|
|
149
|
+
e.stopPropagation(), e.preventDefault(), R && z.interactionTrigger(P, "onInvalid", {
|
|
150
|
+
errors: t,
|
|
151
|
+
values: O
|
|
152
|
+
});
|
|
131
153
|
return;
|
|
132
154
|
}
|
|
133
|
-
if (!T || (e.stopPropagation(), e.preventDefault(), !
|
|
134
|
-
let n = Object.values(
|
|
155
|
+
if (!T || (e.stopPropagation(), e.preventDefault(), !R)) return;
|
|
156
|
+
let n = Object.values(A).reduce((e, { name: t }) => ({
|
|
135
157
|
...e,
|
|
136
158
|
[t]: O[t]
|
|
137
159
|
}), {});
|
|
138
|
-
|
|
160
|
+
z.interactionTrigger(P, "onSubmit", {
|
|
139
161
|
values: n,
|
|
140
162
|
actionUrl: w,
|
|
141
163
|
method: C
|
|
142
164
|
});
|
|
143
165
|
}, [
|
|
144
|
-
|
|
166
|
+
I,
|
|
145
167
|
T,
|
|
146
|
-
L,
|
|
147
|
-
k,
|
|
148
168
|
R,
|
|
149
|
-
|
|
169
|
+
A,
|
|
170
|
+
z,
|
|
171
|
+
P,
|
|
150
172
|
w,
|
|
151
173
|
C,
|
|
152
174
|
O
|
|
153
|
-
]),
|
|
154
|
-
T && (e instanceof Event && (e.stopPropagation(), e.preventDefault()),
|
|
175
|
+
]), X = o((e) => {
|
|
176
|
+
T && (e instanceof Event && (e.stopPropagation(), e.preventDefault()), I((e) => ({
|
|
155
177
|
...e,
|
|
156
178
|
values: {},
|
|
157
|
-
errors: {}
|
|
179
|
+
errors: {},
|
|
180
|
+
submitted: !1
|
|
158
181
|
})));
|
|
159
|
-
}, [
|
|
182
|
+
}, [I, T]), Z = o((e) => {
|
|
160
183
|
let { name: t, value: n } = e;
|
|
161
|
-
U(t, n);
|
|
162
|
-
}, [U]), Z = o((e) => {
|
|
163
|
-
let { name: t, error: n } = e;
|
|
164
184
|
W(t, n);
|
|
165
|
-
}, [W]), Q =
|
|
166
|
-
let {
|
|
185
|
+
}, [W]), Q = o((e) => {
|
|
186
|
+
let { name: t, error: n } = e;
|
|
187
|
+
G(t, n);
|
|
188
|
+
}, [G]), $ = c(() => {
|
|
189
|
+
let { performReset: t, setFieldValue: n, setFieldError: r } = e.callbacks, i = Object.values(A).map((e) => ({
|
|
167
190
|
value: e.name,
|
|
168
191
|
label: e.name
|
|
169
192
|
}));
|
|
170
193
|
return {
|
|
171
194
|
performReset: {
|
|
172
195
|
...t,
|
|
173
|
-
title: `Reset ${
|
|
174
|
-
callback:
|
|
196
|
+
title: `Reset ${F}`,
|
|
197
|
+
callback: X
|
|
175
198
|
},
|
|
176
199
|
setFieldValue: {
|
|
177
200
|
...n,
|
|
178
|
-
title: `Set Field Value ${
|
|
179
|
-
callback:
|
|
201
|
+
title: `Set Field Value ${F}`,
|
|
202
|
+
callback: Z,
|
|
180
203
|
params: {
|
|
181
204
|
...n.params,
|
|
182
205
|
name: {
|
|
@@ -187,8 +210,8 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
187
210
|
},
|
|
188
211
|
setFieldError: {
|
|
189
212
|
...r,
|
|
190
|
-
title: `Set Field Error ${
|
|
191
|
-
callback:
|
|
213
|
+
title: `Set Field Error ${F}`,
|
|
214
|
+
callback: Q,
|
|
192
215
|
params: {
|
|
193
216
|
...r.params,
|
|
194
217
|
name: {
|
|
@@ -199,11 +222,11 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
199
222
|
}
|
|
200
223
|
};
|
|
201
224
|
}, [
|
|
202
|
-
|
|
203
|
-
Y,
|
|
225
|
+
F,
|
|
204
226
|
X,
|
|
205
|
-
|
|
206
|
-
|
|
227
|
+
Z,
|
|
228
|
+
A,
|
|
229
|
+
Q
|
|
207
230
|
]);
|
|
208
231
|
return /* @__PURE__ */ g(r, {
|
|
209
232
|
tag: "form",
|
|
@@ -211,15 +234,15 @@ var x = ({ ref: t, className: x = "", children: S, method: C = "get", actionUrl:
|
|
|
211
234
|
noValidate: E,
|
|
212
235
|
method: C,
|
|
213
236
|
className: _("plitzi-component__form", x),
|
|
214
|
-
interactionTriggers:
|
|
215
|
-
interactionCallbacks:
|
|
216
|
-
onSubmit:
|
|
217
|
-
onReset:
|
|
237
|
+
interactionTriggers: J,
|
|
238
|
+
interactionCallbacks: $,
|
|
239
|
+
onSubmit: Y,
|
|
240
|
+
onReset: X,
|
|
218
241
|
action: w,
|
|
219
242
|
children: /* @__PURE__ */ g(h, {
|
|
220
243
|
inherit: "live",
|
|
221
|
-
name: `Form:${
|
|
222
|
-
value:
|
|
244
|
+
name: `Form:${P}`,
|
|
245
|
+
value: q,
|
|
223
246
|
children: S
|
|
224
247
|
})
|
|
225
248
|
});
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { FormProps } from './Form';
|
|
2
2
|
import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring';
|
|
3
|
-
/**
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* What this element can be authored with — its component's own props, minus what the runtime supplies: `submitted` is
|
|
5
|
+
* what a visitor did, never a starting value.
|
|
6
|
+
*/
|
|
7
|
+
export type FormAttributes = AuthorableAttributes<FormProps, 'submitted'>;
|
|
5
8
|
declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElement<{
|
|
6
9
|
readonly type: "form";
|
|
7
10
|
readonly attributeValues: {
|
|
8
11
|
readonly method: readonly string[];
|
|
9
12
|
};
|
|
10
13
|
readonly sourceType: "apiContainer";
|
|
14
|
+
readonly publishes: {
|
|
15
|
+
readonly values: "Each field's value, by its name";
|
|
16
|
+
readonly errors: "Each field's error, by its name — none while it is valid";
|
|
17
|
+
readonly submitted: "Whether a submit was tried — valid or not — since the form was shown or reset: what shows an error only after a submit, or hides a field's hint once one was tried (no `touched`: a field's own error shows once the field is left)";
|
|
18
|
+
};
|
|
11
19
|
readonly triggers: {
|
|
12
20
|
readonly onSubmit: {
|
|
13
21
|
readonly action: "onSubmit";
|
|
@@ -20,6 +28,16 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
20
28
|
readonly method: "";
|
|
21
29
|
};
|
|
22
30
|
};
|
|
31
|
+
readonly onInvalid: {
|
|
32
|
+
readonly action: "onInvalid";
|
|
33
|
+
readonly title: "On Form Refused";
|
|
34
|
+
readonly type: "trigger";
|
|
35
|
+
readonly params: {};
|
|
36
|
+
readonly preview: {
|
|
37
|
+
readonly errors: {};
|
|
38
|
+
readonly values: {};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
23
41
|
};
|
|
24
42
|
readonly callbacks: {
|
|
25
43
|
readonly performReset: {
|
|
@@ -76,7 +94,7 @@ declare const declaration: import('@plitzi/sdk-shared/authoring').DeclaredElemen
|
|
|
76
94
|
};
|
|
77
95
|
readonly definition: {
|
|
78
96
|
readonly label: "Form";
|
|
79
|
-
readonly description: "A <form> that groups form controls and handles submission; wire its submit through an interaction flow.";
|
|
97
|
+
readonly description: "A <form> that groups form controls and handles submission; wire its submit through an interaction flow. Left as it is, the browser answers first for a blank required field and a malformed address, in a bubble no style reaches and in the browser's language; `noValidate: true` turns its checks off, and every rule answers under its control in the words of its `…Message` (`requiredMessage`).";
|
|
80
98
|
readonly items: [];
|
|
81
99
|
};
|
|
82
100
|
readonly market: {
|
|
@@ -4,17 +4,34 @@ var n = e()({
|
|
|
4
4
|
type: "form",
|
|
5
5
|
attributeValues: { method: t()(["get", "post"]) },
|
|
6
6
|
sourceType: "apiContainer",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
publishes: {
|
|
8
|
+
values: "Each field's value, by its name",
|
|
9
|
+
errors: "Each field's error, by its name — none while it is valid",
|
|
10
|
+
submitted: "Whether a submit was tried — valid or not — since the form was shown or reset: what shows an error only after a submit, or hides a field's hint once one was tried (no `touched`: a field's own error shows once the field is left)"
|
|
11
|
+
},
|
|
12
|
+
triggers: {
|
|
13
|
+
onSubmit: {
|
|
14
|
+
action: "onSubmit",
|
|
15
|
+
title: "On Form Submit",
|
|
16
|
+
type: "trigger",
|
|
17
|
+
params: {},
|
|
18
|
+
preview: {
|
|
19
|
+
values: {},
|
|
20
|
+
actionUrl: "",
|
|
21
|
+
method: ""
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
onInvalid: {
|
|
25
|
+
action: "onInvalid",
|
|
26
|
+
title: "On Form Refused",
|
|
27
|
+
type: "trigger",
|
|
28
|
+
params: {},
|
|
29
|
+
preview: {
|
|
30
|
+
errors: {},
|
|
31
|
+
values: {}
|
|
32
|
+
}
|
|
16
33
|
}
|
|
17
|
-
}
|
|
34
|
+
},
|
|
18
35
|
callbacks: {
|
|
19
36
|
performReset: {
|
|
20
37
|
action: "performReset",
|
|
@@ -70,7 +87,7 @@ var n = e()({
|
|
|
70
87
|
},
|
|
71
88
|
definition: {
|
|
72
89
|
label: "Form",
|
|
73
|
-
description: "A <form> that groups form controls and handles submission; wire its submit through an interaction flow.",
|
|
90
|
+
description: "A <form> that groups form controls and handles submission; wire its submit through an interaction flow. Left as it is, the browser answers first for a blank required field and a malformed address, in a bubble no style reaches and in the browser's language; `noValidate: true` turns its checks off, and every rule answers under its control in the words of its `…Message` (`requiredMessage`).",
|
|
74
91
|
items: []
|
|
75
92
|
},
|
|
76
93
|
market: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const Form: {
|
|
2
|
-
(props: import('../../..').WithElementProps<import('./Form').FormProps>): import('react').JSX.Element;
|
|
2
|
+
(props: import('../../..').WithElementProps<import('./Form').FormProps>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
content: {
|
|
@@ -22,7 +22,7 @@ declare const Form: {
|
|
|
22
22
|
};
|
|
23
23
|
definition: {
|
|
24
24
|
readonly label: "Form";
|
|
25
|
-
readonly description: "A <form> that groups form controls and handles submission; wire its submit through an interaction flow.";
|
|
25
|
+
readonly description: "A <form> that groups form controls and handles submission; wire its submit through an interaction flow. Left as it is, the browser answers first for a blank required field and a malformed address, in a bubble no style reaches and in the browser's language; `noValidate: true` turns its checks off, and every rule answers under its control in the words of its `…Message` (`requiredMessage`).";
|
|
26
26
|
readonly items: [];
|
|
27
27
|
} & {
|
|
28
28
|
type: string;
|
|
@@ -50,6 +50,11 @@ declare const Form: {
|
|
|
50
50
|
readonly method: readonly string[];
|
|
51
51
|
};
|
|
52
52
|
sourceType: "apiContainer";
|
|
53
|
+
publishes: {
|
|
54
|
+
readonly values: "Each field's value, by its name";
|
|
55
|
+
readonly errors: "Each field's error, by its name — none while it is valid";
|
|
56
|
+
readonly submitted: "Whether a submit was tried — valid or not — since the form was shown or reset: what shows an error only after a submit, or hides a field's hint once one was tried (no `touched`: a field's own error shows once the field is left)";
|
|
57
|
+
};
|
|
53
58
|
triggers: {
|
|
54
59
|
readonly onSubmit: {
|
|
55
60
|
readonly action: "onSubmit";
|
|
@@ -62,6 +67,16 @@ declare const Form: {
|
|
|
62
67
|
readonly method: "";
|
|
63
68
|
};
|
|
64
69
|
};
|
|
70
|
+
readonly onInvalid: {
|
|
71
|
+
readonly action: "onInvalid";
|
|
72
|
+
readonly title: "On Form Refused";
|
|
73
|
+
readonly type: "trigger";
|
|
74
|
+
readonly params: {};
|
|
75
|
+
readonly preview: {
|
|
76
|
+
readonly errors: {};
|
|
77
|
+
readonly values: {};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
65
80
|
};
|
|
66
81
|
callbacks: {
|
|
67
82
|
readonly performReset: {
|
|
@@ -44,6 +44,12 @@ export type FormControlProps = {
|
|
|
44
44
|
minLengthMessage: string;
|
|
45
45
|
maxLength: number;
|
|
46
46
|
maxLengthMessage: string;
|
|
47
|
+
/** A `number` field's least and greatest value and its step, as numbers are written: `''` for none. */
|
|
48
|
+
min: string;
|
|
49
|
+
minMessage: string;
|
|
50
|
+
max: string;
|
|
51
|
+
maxMessage: string;
|
|
52
|
+
step: string;
|
|
47
53
|
formatMessage: string;
|
|
48
54
|
pattern: string;
|
|
49
55
|
patternMessage: string;
|
|
@@ -62,9 +68,9 @@ export type FormControlProps = {
|
|
|
62
68
|
handleChange?: (e: ChangeEvent<HTMLInputElement> | ChangeEvent<HTMLSelectElement> | ChangeEvent<HTMLTextAreaElement>) => void;
|
|
63
69
|
handleValidate?: () => void;
|
|
64
70
|
};
|
|
65
|
-
declare const FormControl: ({ ref, className, subType, name, label, hideLabel, placeholder, autoComplete, autoFocus, disabled, options, required, maxLength, readOnly, value, error, handleChange, handleValidate }: FormControlProps) => import('react').JSX.Element;
|
|
71
|
+
declare const FormControl: ({ ref, className, subType, name, label, hideLabel, placeholder, autoComplete, autoFocus, disabled, options, required, maxLength, min, max, step, readOnly, value, error, handleChange, handleValidate }: FormControlProps) => import('react').JSX.Element;
|
|
66
72
|
declare const _default: {
|
|
67
|
-
(props: import('../../..').WithElementProps<import('./hocs/withFieldValue').WithFieldValueProps<FormControlProps>>): import('react').JSX.Element;
|
|
73
|
+
(props: import('../../..').WithElementProps<import('./hocs/withFieldValue').WithFieldValueProps<FormControlProps>>): string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
|
|
68
74
|
displayName: string;
|
|
69
75
|
};
|
|
70
76
|
export default _default;
|