@react-form-builder/components-rsuite 7.7.0 → 7.8.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.
Files changed (166) hide show
  1. package/dist/InputCell-f4236002.js +21 -0
  2. package/dist/InputCell-f4236002.js.map +1 -0
  3. package/dist/Labeled-751c2353.js +35 -0
  4. package/dist/Labeled-751c2353.js.map +1 -0
  5. package/dist/WrappedInput-bc5a6d33.js +11 -0
  6. package/dist/WrappedInput-bc5a6d33.js.map +1 -0
  7. package/dist/autocomplete.d.ts +30 -0
  8. package/dist/autocomplete.js +62 -0
  9. package/dist/autocomplete.js.map +1 -0
  10. package/dist/breadcrumb.d.ts +38 -0
  11. package/dist/breadcrumb.js +42 -0
  12. package/dist/breadcrumb.js.map +1 -0
  13. package/dist/builder-view-with-css.d.ts +9 -0
  14. package/dist/builder-view-with-css.js +66 -0
  15. package/dist/builder-view-with-css.js.map +1 -0
  16. package/dist/button.d.ts +6 -0
  17. package/dist/button.js +23 -0
  18. package/dist/button.js.map +1 -0
  19. package/dist/calendar.d.ts +20 -0
  20. package/dist/calendar.js +24 -0
  21. package/dist/calendar.js.map +1 -0
  22. package/dist/card.d.ts +20 -0
  23. package/dist/card.js +30 -0
  24. package/dist/card.js.map +1 -0
  25. package/dist/categories-7064b279.js +8 -0
  26. package/dist/categories-7064b279.js.map +1 -0
  27. package/dist/checkbox.d.ts +6 -0
  28. package/dist/checkbox.js +36 -0
  29. package/dist/checkbox.js.map +1 -0
  30. package/dist/commonProperties-d849cd5b.js +74 -0
  31. package/dist/commonProperties-d849cd5b.js.map +1 -0
  32. package/dist/components-descriptions.d.ts +6 -0
  33. package/dist/components-descriptions.js +5 -0
  34. package/dist/components-descriptions.js.map +1 -0
  35. package/dist/container.d.ts +25 -0
  36. package/dist/container.js +23 -0
  37. package/dist/container.js.map +1 -0
  38. package/dist/css/rsuite-no-reset-rtl.min.css +1 -1
  39. package/dist/css/rsuite-no-reset.min.css +1 -1
  40. package/dist/css-loader.d.ts +19 -0
  41. package/dist/css-loader.js +20 -0
  42. package/dist/css-loader.js.map +1 -0
  43. package/dist/date-picker.d.ts +25 -0
  44. package/dist/date-picker.js +75 -0
  45. package/dist/date-picker.js.map +1 -0
  46. package/dist/dateTimeUtils-b07ce438.js +26 -0
  47. package/dist/dateTimeUtils-b07ce438.js.map +1 -0
  48. package/dist/definitions.d.ts +5 -0
  49. package/dist/definitions.js +59 -0
  50. package/dist/definitions.js.map +1 -0
  51. package/dist/divider.d.ts +11 -0
  52. package/dist/divider.js +12 -0
  53. package/dist/divider.js.map +1 -0
  54. package/dist/dropdown.d.ts +58 -0
  55. package/dist/dropdown.js +57 -0
  56. package/dist/dropdown.js.map +1 -0
  57. package/dist/error-message.d.ts +20 -0
  58. package/dist/error-message.js +28 -0
  59. package/dist/error-message.js.map +1 -0
  60. package/dist/header.d.ts +69 -0
  61. package/dist/header.js +20 -0
  62. package/dist/header.js.map +1 -0
  63. package/dist/hooks-ff273a8a.js +53 -0
  64. package/dist/hooks-ff273a8a.js.map +1 -0
  65. package/dist/image.d.ts +22 -0
  66. package/dist/image.js +41 -0
  67. package/dist/image.js.map +1 -0
  68. package/dist/images/logo.svg +20 -0
  69. package/dist/index.d.ts +3 -0
  70. package/dist/index.js +116 -19516
  71. package/dist/index.js.map +1 -1
  72. package/dist/input.d.ts +32 -0
  73. package/dist/input.js +28 -0
  74. package/dist/input.js.map +1 -0
  75. package/dist/label.d.ts +47 -0
  76. package/dist/label.js +16 -0
  77. package/dist/label.js.map +1 -0
  78. package/dist/link.d.ts +56 -0
  79. package/dist/link.js +20 -0
  80. package/dist/link.js.map +1 -0
  81. package/dist/localization-wrapper.d.ts +164 -0
  82. package/dist/localization-wrapper.js +246 -0
  83. package/dist/localization-wrapper.js.map +1 -0
  84. package/dist/menu.d.ts +35 -0
  85. package/dist/menu.js +50 -0
  86. package/dist/menu.js.map +1 -0
  87. package/dist/message.d.ts +16 -0
  88. package/dist/message.js +18 -0
  89. package/dist/message.js.map +1 -0
  90. package/dist/modal-layout.d.ts +28 -0
  91. package/dist/modal-layout.js +21 -0
  92. package/dist/modal-layout.js.map +1 -0
  93. package/dist/modal.d.ts +16 -0
  94. package/dist/modal.js +27 -0
  95. package/dist/modal.js.map +1 -0
  96. package/dist/models.d.ts +8 -0
  97. package/dist/models.js +60 -0
  98. package/dist/models.js.map +1 -0
  99. package/dist/number-format.d.ts +25 -0
  100. package/dist/number-format.js +53 -0
  101. package/dist/number-format.js.map +1 -0
  102. package/dist/pattern-format.d.ts +25 -0
  103. package/dist/pattern-format.js +39 -0
  104. package/dist/pattern-format.js.map +1 -0
  105. package/dist/placeholder.d.ts +17 -0
  106. package/dist/placeholder.js +38 -0
  107. package/dist/placeholder.js.map +1 -0
  108. package/dist/progress.d.ts +14 -0
  109. package/dist/progress.js +27 -0
  110. package/dist/progress.js.map +1 -0
  111. package/dist/r-suite-components.d.ts +8 -0
  112. package/dist/r-suite-components.js +115 -0
  113. package/dist/r-suite-components.js.map +1 -0
  114. package/dist/rSuiteComponentsDescriptions-d616cdc1.js +17911 -0
  115. package/dist/rSuiteComponentsDescriptions-d616cdc1.js.map +1 -0
  116. package/dist/radio-group.d.ts +26 -0
  117. package/dist/radio-group.js +24 -0
  118. package/dist/radio-group.js.map +1 -0
  119. package/dist/rsuite-no-reset-rtl.min-af106e5c.js +5 -0
  120. package/dist/rsuite-no-reset-rtl.min-af106e5c.js.map +1 -0
  121. package/dist/rsuite-no-reset.min-3caeeea0.js +5 -0
  122. package/dist/rsuite-no-reset.min-3caeeea0.js.map +1 -0
  123. package/dist/search.d.ts +54 -0
  124. package/dist/search.js +60 -0
  125. package/dist/search.js.map +1 -0
  126. package/dist/static-content.d.ts +19 -0
  127. package/dist/static-content.js +15 -0
  128. package/dist/static-content.js.map +1 -0
  129. package/dist/tab.d.ts +39 -0
  130. package/dist/tab.js +59 -0
  131. package/dist/tab.js.map +1 -0
  132. package/dist/tag-picker.d.ts +21 -0
  133. package/dist/tag-picker.js +42 -0
  134. package/dist/tag-picker.js.map +1 -0
  135. package/dist/text-area.d.ts +24 -0
  136. package/dist/text-area.js +24 -0
  137. package/dist/text-area.js.map +1 -0
  138. package/dist/time-picker.d.ts +29 -0
  139. package/dist/time-picker.js +74 -0
  140. package/dist/time-picker.js.map +1 -0
  141. package/dist/toggle.d.ts +16 -0
  142. package/dist/toggle.js +29 -0
  143. package/dist/toggle.js.map +1 -0
  144. package/dist/tooltip.d.ts +29 -0
  145. package/dist/tooltip.js +37 -0
  146. package/dist/tooltip.js.map +1 -0
  147. package/dist/uploader.d.ts +20 -0
  148. package/dist/uploader.js +70 -0
  149. package/dist/uploader.js.map +1 -0
  150. package/dist/useTouchOnEvent-2be3c60d.js +12 -0
  151. package/dist/useTouchOnEvent-2be3c60d.js.map +1 -0
  152. package/dist/view-with-css.d.ts +9 -0
  153. package/dist/view-with-css.js +66 -0
  154. package/dist/view-with-css.js.map +1 -0
  155. package/dist/view.d.ts +8 -0
  156. package/dist/view.js +61 -0
  157. package/dist/view.js.map +1 -0
  158. package/dist/wizard.d.ts +88 -0
  159. package/dist/wizard.js +294 -0
  160. package/dist/wizard.js.map +1 -0
  161. package/package.json +191 -5
  162. package/dist/images/logo.png +0 -0
  163. package/dist/rsuite-no-reset-rtl.min-f9b04ca7.js +0 -5
  164. package/dist/rsuite-no-reset-rtl.min-f9b04ca7.js.map +0 -1
  165. package/dist/rsuite-no-reset.min-12eea714.js +0 -5
  166. package/dist/rsuite-no-reset.min-12eea714.js.map +0 -1
@@ -0,0 +1,37 @@
1
+ import { jsx as t } from "@emotion/react/jsx-runtime";
2
+ import { define as n, string as p, node as s, oneOf as d, someOf as m } from "@react-form-builder/core";
3
+ import { useMemo as c } from "react";
4
+ import { Tooltip as u, Whisper as f } from "rsuite";
5
+ import { s as h } from "./categories-7064b279.js";
6
+ const g = { width: "100%", height: "100%" }, S = ({ text: o, placement: e, trigger: i, children: r, ...a }) => {
7
+ const l = c(() => /* @__PURE__ */ t(u, { children: o }), [o]);
8
+ return r ? /* @__PURE__ */ t(f, { placement: e, trigger: i, speaker: l, children: /* @__PURE__ */ t("div", { ...a, style: g, children: r }) }) : null;
9
+ }, q = n(S, "RsTooltip").name("Tooltip").category(h).props({
10
+ text: p.required.default("Tooltip message...").dataBound,
11
+ children: s,
12
+ placement: d(
13
+ "top",
14
+ "bottom",
15
+ "right",
16
+ "left",
17
+ "bottomStart",
18
+ "bottomEnd",
19
+ "topStart",
20
+ "topEnd",
21
+ "leftStart",
22
+ "rightStart",
23
+ "leftEnd",
24
+ "rightEnd",
25
+ "auto",
26
+ "autoVertical",
27
+ "autoVerticalStart",
28
+ "autoVerticalEnd",
29
+ "autoHorizontal",
30
+ "autoHorizontalStart"
31
+ ).required.default("bottom").withEditorProps({ creatable: !1 }),
32
+ trigger: m("click", "hover", "focus", "active", "contextMenu").required.default(["hover"])
33
+ }).componentRole("tooltip");
34
+ export {
35
+ q as rsTooltip
36
+ };
37
+ //# sourceMappingURL=tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.js","sources":["../src/components/RsTooltip.tsx"],"sourcesContent":["import type {WrapperProps} from '@react-form-builder/core'\nimport {define, node, oneOf, someOf, string} from '@react-form-builder/core'\nimport {useMemo} from 'react'\nimport {Tooltip, Whisper} from 'rsuite'\nimport type {OverlayTriggerType} from 'rsuite/esm/internals/Overlay/OverlayTrigger'\nimport type {TypeAttributes} from 'rsuite/esm/internals/types'\nimport {staticCategory} from './categories'\n\n/**\n * The properties of RsTooltip component.\n */\nexport interface RsTooltipProps extends WrapperProps {\n /**\n * The tooltip text.\n */\n text: string\n /**\n * The placement of a tooltip.\n */\n placement: TypeAttributes.Placement\n /**\n * The tooltip trigger.\n */\n trigger: OverlayTriggerType\n}\n\nconst wrapperStyle = {width: '100%', height: '100%'} as const\n\nconst RsTooltip = ({text, placement, trigger, children, ...props}: RsTooltipProps) => {\n const tooltip = useMemo(() => <Tooltip>{text}</Tooltip>, [text])\n\n if (!children) return null\n\n return <Whisper placement={placement} trigger={trigger} speaker={tooltip}>\n <div {...props} style={wrapperStyle}>{children}</div>\n </Whisper>\n}\n\n/**\n * Metadata builder for rSuite-based tooltip display component.\n */\nexport const rsTooltip = define(RsTooltip, 'RsTooltip')\n .name('Tooltip')\n .category(staticCategory)\n .props({\n text: string.required.default('Tooltip message...').dataBound,\n children: node,\n placement: oneOf('top', 'bottom', 'right', 'left', 'bottomStart', 'bottomEnd',\n 'topStart', 'topEnd', 'leftStart', 'rightStart', 'leftEnd', 'rightEnd', 'auto',\n 'autoVertical', 'autoVerticalStart', 'autoVerticalEnd', 'autoHorizontal', 'autoHorizontalStart')\n .required.default('bottom')\n .withEditorProps({creatable: false}),\n trigger: someOf('click', 'hover', 'focus', 'active', 'contextMenu')\n .required.default(['hover'])\n })\n .componentRole('tooltip')\n"],"names":["wrapperStyle","RsTooltip","text","placement","trigger","children","props","tooltip","useMemo","jsx","Tooltip","Whisper","rsTooltip","define","staticCategory","string","node","oneOf","someOf"],"mappings":";;;;;AA0BA,MAAMA,IAAe,EAAC,OAAO,QAAQ,QAAQ,OAAM,GAE7CC,IAAY,CAAC,EAAC,MAAAC,GAAM,WAAAC,GAAW,SAAAC,GAAS,UAAAC,GAAU,GAAGC,QAA2B;AAC9E,QAAAC,IAAUC,EAAQ,MAAM,gBAAAC,EAACC,KAAS,UAAKR,EAAA,CAAA,GAAY,CAACA,CAAI,CAAC;AAE/D,SAAKG,IAEG,gBAAAI,EAAAE,GAAA,EAAQ,WAAAR,GAAsB,SAAAC,GAAkB,SAASG,GAC/D,UAAC,gBAAAE,EAAA,OAAA,EAAK,GAAGH,GAAO,OAAON,GAAe,UAAAK,GAAS,EACjD,CAAA,IAJsB;AAKxB,GAKaO,IAAYC,EAAOZ,GAAW,WAAW,EACnD,KAAK,SAAS,EACd,SAASa,CAAc,EACvB,MAAM;AAAA,EACL,MAAMC,EAAO,SAAS,QAAQ,oBAAoB,EAAE;AAAA,EACpD,UAAUC;AAAA,EACV,WAAWC;AAAA,IAAM;AAAA,IAAO;AAAA,IAAU;AAAA,IAAS;AAAA,IAAQ;AAAA,IAAe;AAAA,IAChE;AAAA,IAAY;AAAA,IAAU;AAAA,IAAa;AAAA,IAAc;AAAA,IAAW;AAAA,IAAY;AAAA,IACxE;AAAA,IAAgB;AAAA,IAAqB;AAAA,IAAmB;AAAA,IAAkB;AAAA,EAAA,EACzE,SAAS,QAAQ,QAAQ,EACzB,gBAAgB,EAAC,WAAW,IAAM;AAAA,EACrC,SAASC,EAAO,SAAS,SAAS,SAAS,UAAU,aAAa,EAC/D,SAAS,QAAQ,CAAC,OAAO,CAAC;AAC/B,CAAC,EACA,cAAc,SAAS;"}
@@ -0,0 +1,20 @@
1
+ import { Definer } from '@react-form-builder/core';
2
+ import type { UploaderProps } from 'rsuite';
3
+
4
+ export declare const rsUploader: Definer<RsUploaderProps>;
5
+
6
+ /**
7
+ * Props for the RsUploader component.
8
+ */
9
+ export declare interface RsUploaderProps extends UploaderProps {
10
+ /**
11
+ * Whether to use a custom element for the uploader.
12
+ */
13
+ customElement: boolean;
14
+ /**
15
+ * The label for the uploader.
16
+ */
17
+ label?: string;
18
+ }
19
+
20
+ export { }
@@ -0,0 +1,70 @@
1
+ import { jsx as n } from "@emotion/react/jsx-runtime";
2
+ import { define as U, string as o, boolean as e, node as x, disabled as E, oneOf as I, event as t, array as C } from "@react-form-builder/core";
3
+ import { useRef as w, useEffect as A, useMemo as c } from "react";
4
+ import { Uploader as P } from "rsuite";
5
+ import { r as N, a as O } from "./commonProperties-d849cd5b.js";
6
+ import { s as T } from "./hooks-ff273a8a.js";
7
+ import { f as M } from "./categories-7064b279.js";
8
+ import { u as S } from "./useTouchOnEvent-2be3c60d.js";
9
+ import { I as s } from "./InputCell-f4236002.js";
10
+ import { L as j } from "./Labeled-751c2353.js";
11
+ import "@emotion/styled";
12
+ import "@emotion/react";
13
+ const q = ({ customElement: b, children: h, disabled: i, multiple: l, fileList: r, className: v, label: g, ...d }) => {
14
+ const u = w(null), y = S(d, "onRemove");
15
+ A(() => {
16
+ var m, p;
17
+ const a = (p = (m = u.current) == null ? void 0 : m.root) == null ? void 0 : p.querySelector('input[type="file"]');
18
+ T(a), a && !a.hasAttribute("tabIndex") && a.setAttribute("tabIndex", "-1");
19
+ }, []);
20
+ const f = c(() => l ? !0 : !(r && r.length > 0), [r, l]), R = c(() => i || !f, [i, f]);
21
+ return /* @__PURE__ */ n(j, { label: g, className: v, passAriaToChildren: !0, children: /* @__PURE__ */ n(
22
+ P,
23
+ {
24
+ ...d,
25
+ disabled: R,
26
+ multiple: l,
27
+ fileList: r,
28
+ onRemove: y,
29
+ ref: u,
30
+ children: b ? /* @__PURE__ */ n("div", { children: h }) : void 0
31
+ }
32
+ ) });
33
+ }, B = [
34
+ { name: "name", input: s },
35
+ { name: "fileKey", input: s },
36
+ { name: "url", input: s }
37
+ ], X = U(q, "RsUploader").name("Uploader").category(M).props({
38
+ label: o,
39
+ action: o.default("/"),
40
+ accept: o,
41
+ autoUpload: e.default(!0),
42
+ customElement: e.default(!1),
43
+ children: x,
44
+ disableMultipart: e.default(!1),
45
+ disabled: E.default(!1),
46
+ readOnly: N,
47
+ disabledFileItem: e.default(!1),
48
+ draggable: e.default(!1),
49
+ fileListVisible: e.default(!0),
50
+ listType: I("text", "picture-text", "picture").withEditorProps({ creatable: !1 }),
51
+ method: o,
52
+ multiple: e.default(!1),
53
+ name: o,
54
+ onChange: t,
55
+ onError: t,
56
+ onPreview: t,
57
+ onProgress: t,
58
+ onRemove: t,
59
+ onReupload: t,
60
+ onSuccess: t,
61
+ onUpload: t,
62
+ removable: e.default(!1),
63
+ timeout: O,
64
+ withCredentials: e.default(!1),
65
+ fileList: C.withEditorProps({ columns: B }).valued
66
+ });
67
+ export {
68
+ X as rsUploader
69
+ };
70
+ //# sourceMappingURL=uploader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploader.js","sources":["../src/components/RsUploader.tsx"],"sourcesContent":["import {array, boolean, define, disabled, event, node, oneOf, string} from '@react-form-builder/core'\nimport {useEffect, useMemo, useRef} from 'react'\nimport type {UploaderProps} from 'rsuite'\nimport {Uploader} from 'rsuite'\nimport {nonNegNumber, readOnly} from '../commonProperties'\nimport {setAriaHiddenIfNotExists} from '../hooks'\nimport {fieldsCategory} from './categories'\nimport {useTouchOnEvent} from './hooks/useTouchOnEvent'\nimport {InputCell} from './internal/InputCell'\nimport {Labeled} from './internal/Labeled'\n\n/**\n * Props for the RsUploader component.\n */\nexport interface RsUploaderProps extends UploaderProps {\n /**\n * Whether to use a custom element for the uploader.\n */\n customElement: boolean\n /**\n * The label for the uploader.\n */\n label?: string\n}\n\n/**\n * A file uploader component that allows users to select and upload files.\n * @param props the component props.\n * @param props.customElement whether to use a custom element for the uploader.\n * @param props.children the custom content when customElement is true.\n * @param props.disabled whether the uploader is disabled.\n * @param props.multiple whether multiple files can be selected.\n * @param props.fileList the list of uploaded files.\n * @param props.className the CSS class name for the component.\n * @param props.label the label for the uploader.\n * @returns the React element.\n */\nconst RsUploader = ({customElement, children, disabled, multiple, fileList, className, label, ...props}: RsUploaderProps) => {\n const uploaderRef = useRef<any>(null)\n const onRemove = useTouchOnEvent(props, 'onRemove')\n\n useEffect(() => {\n const fileInput = uploaderRef.current?.root?.querySelector('input[type=\"file\"]')\n setAriaHiddenIfNotExists(fileInput)\n if (fileInput && !fileInput.hasAttribute('tabIndex')) {\n fileInput.setAttribute('tabIndex', '-1')\n }\n }, [])\n\n const canUpload = useMemo(() => {\n if (multiple) return true\n return !(fileList && fileList.length > 0)\n }, [fileList, multiple])\n\n const disabledButton = useMemo(() => disabled || !canUpload, [disabled, canUpload])\n\n return <Labeled label={label} className={className} passAriaToChildren={true}>\n <Uploader {...props} disabled={disabledButton} multiple={multiple}\n fileList={fileList} onRemove={onRemove} ref={uploaderRef}>\n {customElement ? <div>{children}</div> : undefined}\n </Uploader>\n </Labeled>\n}\n\nconst columns = [\n {name: 'name', input: InputCell},\n {name: 'fileKey', input: InputCell},\n {name: 'url', input: InputCell}\n]\n\nexport const rsUploader = define(RsUploader, 'RsUploader')\n .name('Uploader')\n .category(fieldsCategory)\n .props({\n label: string,\n action: string.default('/'),\n accept: string,\n autoUpload: boolean.default(true),\n customElement: boolean.default(false),\n children: node,\n disableMultipart: boolean.default(false),\n disabled: disabled.default(false),\n readOnly,\n disabledFileItem: boolean.default(false),\n draggable: boolean.default(false),\n fileListVisible: boolean.default(true),\n listType: oneOf('text', 'picture-text', 'picture')\n .withEditorProps({creatable: false}),\n method: string,\n multiple: boolean.default(false),\n name: string,\n onChange: event,\n onError: event,\n onPreview: event,\n onProgress: event,\n onRemove: event,\n onReupload: event,\n onSuccess: event,\n onUpload: event,\n removable: boolean.default(false),\n timeout: nonNegNumber,\n withCredentials: boolean.default(false),\n fileList: array\n .withEditorProps({columns})\n .valued\n })\n"],"names":["RsUploader","customElement","children","disabled","multiple","fileList","className","label","props","uploaderRef","useRef","onRemove","useTouchOnEvent","useEffect","fileInput","_b","_a","setAriaHiddenIfNotExists","canUpload","useMemo","disabledButton","jsx","Labeled","Uploader","columns","InputCell","rsUploader","define","fieldsCategory","string","boolean","node","readOnly","oneOf","event","nonNegNumber","array"],"mappings":";;;;;;;;;;;;AAqCA,MAAMA,IAAa,CAAC,EAAC,eAAAC,GAAe,UAAAC,GAAU,UAAAC,GAAU,UAAAC,GAAU,UAAAC,GAAU,WAAAC,GAAW,OAAAC,GAAO,GAAGC,QAA4B;AACrH,QAAAC,IAAcC,EAAY,IAAI,GAC9BC,IAAWC,EAAgBJ,GAAO,UAAU;AAElD,EAAAK,EAAU,MAAM;;AACd,UAAMC,KAAYC,KAAAC,IAAAP,EAAY,YAAZ,gBAAAO,EAAqB,SAArB,gBAAAD,EAA2B,cAAc;AAC3D,IAAAE,EAAyBH,CAAS,GAC9BA,KAAa,CAACA,EAAU,aAAa,UAAU,KACvCA,EAAA,aAAa,YAAY,IAAI;AAAA,EAE3C,GAAG,CAAE,CAAA;AAEC,QAAAI,IAAYC,EAAQ,MACpBf,IAAiB,KACd,EAAEC,KAAYA,EAAS,SAAS,IACtC,CAACA,GAAUD,CAAQ,CAAC,GAEjBgB,IAAiBD,EAAQ,MAAMhB,KAAY,CAACe,GAAW,CAACf,GAAUe,CAAS,CAAC;AAElF,SAAQ,gBAAAG,EAAAC,GAAA,EAAQ,OAAAf,GAAc,WAAAD,GAAsB,oBAAoB,IACtE,UAAA,gBAAAe;AAAA,IAACE;AAAA,IAAA;AAAA,MAAU,GAAGf;AAAA,MAAO,UAAUY;AAAA,MAAgB,UAAAhB;AAAA,MACrC,UAAAC;AAAA,MAAoB,UAAAM;AAAA,MAAoB,KAAKF;AAAA,MACpD,UAAgBR,IAAA,gBAAAoB,EAAC,OAAK,EAAA,UAAAnB,EAAA,CAAS,IAAS;AAAA,IAAA;AAAA,EAE7C,EAAA,CAAA;AACF,GAEMsB,IAAU;AAAA,EACd,EAAC,MAAM,QAAQ,OAAOC,EAAS;AAAA,EAC/B,EAAC,MAAM,WAAW,OAAOA,EAAS;AAAA,EAClC,EAAC,MAAM,OAAO,OAAOA,EAAS;AAChC,GAEaC,IAAaC,EAAO3B,GAAY,YAAY,EACtD,KAAK,UAAU,EACf,SAAS4B,CAAc,EACvB,MAAM;AAAA,EACL,OAAOC;AAAA,EACP,QAAQA,EAAO,QAAQ,GAAG;AAAA,EAC1B,QAAQA;AAAA,EACR,YAAYC,EAAQ,QAAQ,EAAI;AAAA,EAChC,eAAeA,EAAQ,QAAQ,EAAK;AAAA,EACpC,UAAUC;AAAA,EACV,kBAAkBD,EAAQ,QAAQ,EAAK;AAAA,EACvC,UAAU3B,EAAS,QAAQ,EAAK;AAAA,EAChC,UAAA6B;AAAA,EACA,kBAAkBF,EAAQ,QAAQ,EAAK;AAAA,EACvC,WAAWA,EAAQ,QAAQ,EAAK;AAAA,EAChC,iBAAiBA,EAAQ,QAAQ,EAAI;AAAA,EACrC,UAAUG,EAAM,QAAQ,gBAAgB,SAAS,EAC9C,gBAAgB,EAAC,WAAW,IAAM;AAAA,EACrC,QAAQJ;AAAA,EACR,UAAUC,EAAQ,QAAQ,EAAK;AAAA,EAC/B,MAAMD;AAAA,EACN,UAAUK;AAAA,EACV,SAASA;AAAA,EACT,WAAWA;AAAA,EACX,YAAYA;AAAA,EACZ,UAAUA;AAAA,EACV,YAAYA;AAAA,EACZ,WAAWA;AAAA,EACX,UAAUA;AAAA,EACV,WAAWJ,EAAQ,QAAQ,EAAK;AAAA,EAChC,SAASK;AAAA,EACT,iBAAiBL,EAAQ,QAAQ,EAAK;AAAA,EACtC,UAAUM,EACP,gBAAgB,EAAC,SAAAZ,EAAA,CAAQ,EACzB;AACL,CAAC;"}
@@ -0,0 +1,12 @@
1
+ import { useComponentData as u } from "@react-form-builder/core";
2
+ import { useCallback as e } from "react";
3
+ const p = (s, n) => {
4
+ const { field: o } = u(), t = s[n];
5
+ return e((r) => {
6
+ o == null || o.setTouched(), t == null || t(r);
7
+ }, [o, t]);
8
+ };
9
+ export {
10
+ p as u
11
+ };
12
+ //# sourceMappingURL=useTouchOnEvent-2be3c60d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTouchOnEvent-2be3c60d.js","sources":["../src/components/hooks/useTouchOnEvent.ts"],"sourcesContent":["import {useComponentData} from '@react-form-builder/core'\nimport {useCallback} from 'react'\n\n/**\n * A function that accepts arguments and returns void.\n */\nexport type GenericVoidFunction = (...args: any[]) => void\n\n/**\n * Creates a wrapper for a function from the component properties that sets the touched flag for the field.\n * @param props the component properties.\n * @param propertyName the property name containing a function.\n * @template T the component property type.\n * @returns the wrapped function.\n */\nexport const useTouchOnEvent = <T>(props: T, propertyName: keyof T): GenericVoidFunction => {\n const {field} = useComponentData()\n const eventCallback = props[propertyName] as GenericVoidFunction | undefined\n\n return useCallback((e) => {\n field?.setTouched()\n eventCallback?.(e)\n }, [field, eventCallback])\n}\n"],"names":["useTouchOnEvent","props","propertyName","field","useComponentData","eventCallback","useCallback","e"],"mappings":";;AAea,MAAAA,IAAkB,CAAIC,GAAUC,MAA+C;AACpF,QAAA,EAAC,OAAAC,MAASC,KACVC,IAAgBJ,EAAMC,CAAY;AAEjC,SAAAI,EAAY,CAACC,MAAM;AACxB,IAAAJ,KAAA,QAAAA,EAAO,cACPE,KAAA,QAAAA,EAAgBE;AAAA,EAAC,GAChB,CAACJ,GAAOE,CAAa,CAAC;AAC3B;"}
@@ -0,0 +1,9 @@
1
+ import { View } from '@react-form-builder/core';
2
+
3
+ /**
4
+ * An assembled set of rSuite components, ready to be passed as a property to the FormViewer.
5
+ * This view contains CSS loaders.
6
+ */
7
+ export declare const viewWithCss: View;
8
+
9
+ export { }
@@ -0,0 +1,66 @@
1
+ import { createView as o, BiDi as r } from "@react-form-builder/core";
2
+ import { RsLocalizationWrapper as i } from "./localization-wrapper.js";
3
+ import { ltrCssLoader as t, rtlCssLoader as m, formEngineRsuiteCssLoader as p } from "./css-loader.js";
4
+ import { models as e } from "./models.js";
5
+ import "@emotion/react/jsx-runtime";
6
+ import "rsuite";
7
+ import "rsuite/esm/locales/index.js";
8
+ import "date-fns/locale/hi/index.js";
9
+ import "date-fns/locale/sr/index.js";
10
+ import "./definitions.js";
11
+ import "./r-suite-components.js";
12
+ import "./categories-7064b279.js";
13
+ import "./wizard.js";
14
+ import "@emotion/css";
15
+ import "@emotion/styled";
16
+ import "react";
17
+ import "./hooks-ff273a8a.js";
18
+ import "./InputCell-f4236002.js";
19
+ import "./autocomplete.js";
20
+ import "./commonProperties-d849cd5b.js";
21
+ import "./Labeled-751c2353.js";
22
+ import "@emotion/react";
23
+ import "./breadcrumb.js";
24
+ import "./button.js";
25
+ import "./calendar.js";
26
+ import "./card.js";
27
+ import "./header.js";
28
+ import "./checkbox.js";
29
+ import "./container.js";
30
+ import "./date-picker.js";
31
+ import "./dateTimeUtils-b07ce438.js";
32
+ import "date-fns";
33
+ import "./useTouchOnEvent-2be3c60d.js";
34
+ import "./divider.js";
35
+ import "./dropdown.js";
36
+ import "./error-message.js";
37
+ import "./image.js";
38
+ import "./input.js";
39
+ import "@rsuite/icons";
40
+ import "./label.js";
41
+ import "./link.js";
42
+ import "./menu.js";
43
+ import "./message.js";
44
+ import "./modal.js";
45
+ import "./modal-layout.js";
46
+ import "./number-format.js";
47
+ import "react-number-format";
48
+ import "./WrappedInput-bc5a6d33.js";
49
+ import "./pattern-format.js";
50
+ import "./placeholder.js";
51
+ import "./progress.js";
52
+ import "./radio-group.js";
53
+ import "./search.js";
54
+ import "./static-content.js";
55
+ import "./tab.js";
56
+ import "./tag-picker.js";
57
+ import "./text-area.js";
58
+ import "./time-picker.js";
59
+ import "./toggle.js";
60
+ import "./tooltip.js";
61
+ import "./uploader.js";
62
+ const hr = o(e).withViewerWrapper(i).withCssLoader(r.LTR, t).withCssLoader(r.RTL, m).withCssLoader("common", p);
63
+ export {
64
+ hr as viewWithCss
65
+ };
66
+ //# sourceMappingURL=view-with-css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-with-css.js","sources":["../src/viewWithCss.ts"],"sourcesContent":["import {BiDi, createView} from '@react-form-builder/core'\nimport {RsLocalizationWrapper} from './components/RsLocalizationWrapper'\nimport {formEngineRsuiteCssLoader, ltrCssLoader, rtlCssLoader} from './cssLoader'\nimport {models} from './models'\n\n/**\n * An assembled set of rSuite components, ready to be passed as a property to the FormViewer.\n * This view contains CSS loaders.\n */\nexport const viewWithCss = createView(models)\n // The following parameters are required for correct CSS loading in LTR and RTL modes\n .withViewerWrapper(RsLocalizationWrapper)\n .withCssLoader(BiDi.LTR, ltrCssLoader)\n .withCssLoader(BiDi.RTL, rtlCssLoader)\n .withCssLoader('common', formEngineRsuiteCssLoader)\n"],"names":["viewWithCss","createView","models","RsLocalizationWrapper","BiDi","ltrCssLoader","rtlCssLoader","formEngineRsuiteCssLoader"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASO,MAAMA,KAAcC,EAAWC,CAAM,EAEzC,kBAAkBC,CAAqB,EACvC,cAAcC,EAAK,KAAKC,CAAY,EACpC,cAAcD,EAAK,KAAKE,CAAY,EACpC,cAAc,UAAUC,CAAyB;"}
package/dist/view.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { View } from '@react-form-builder/core';
2
+
3
+ /**
4
+ * An assembled set of rSuite components, ready to be passed as a property to the FormViewer.
5
+ */
6
+ export declare const view: View;
7
+
8
+ export { }
package/dist/view.js ADDED
@@ -0,0 +1,61 @@
1
+ import { createView as o } from "@react-form-builder/core";
2
+ import { models as r } from "./models.js";
3
+ import "./definitions.js";
4
+ import "./r-suite-components.js";
5
+ import "./categories-7064b279.js";
6
+ import "./wizard.js";
7
+ import "@emotion/react/jsx-runtime";
8
+ import "@emotion/css";
9
+ import "@emotion/styled";
10
+ import "react";
11
+ import "rsuite";
12
+ import "./hooks-ff273a8a.js";
13
+ import "./InputCell-f4236002.js";
14
+ import "./autocomplete.js";
15
+ import "./commonProperties-d849cd5b.js";
16
+ import "./Labeled-751c2353.js";
17
+ import "@emotion/react";
18
+ import "./breadcrumb.js";
19
+ import "./button.js";
20
+ import "./calendar.js";
21
+ import "./card.js";
22
+ import "./header.js";
23
+ import "./checkbox.js";
24
+ import "./container.js";
25
+ import "./date-picker.js";
26
+ import "./dateTimeUtils-b07ce438.js";
27
+ import "date-fns";
28
+ import "./useTouchOnEvent-2be3c60d.js";
29
+ import "./divider.js";
30
+ import "./dropdown.js";
31
+ import "./error-message.js";
32
+ import "./image.js";
33
+ import "./input.js";
34
+ import "@rsuite/icons";
35
+ import "./label.js";
36
+ import "./link.js";
37
+ import "./menu.js";
38
+ import "./message.js";
39
+ import "./modal.js";
40
+ import "./modal-layout.js";
41
+ import "./number-format.js";
42
+ import "react-number-format";
43
+ import "./WrappedInput-bc5a6d33.js";
44
+ import "./pattern-format.js";
45
+ import "./placeholder.js";
46
+ import "./progress.js";
47
+ import "./radio-group.js";
48
+ import "./search.js";
49
+ import "./static-content.js";
50
+ import "./tab.js";
51
+ import "./tag-picker.js";
52
+ import "./text-area.js";
53
+ import "./time-picker.js";
54
+ import "./toggle.js";
55
+ import "./tooltip.js";
56
+ import "./uploader.js";
57
+ const io = o(r);
58
+ export {
59
+ io as view
60
+ };
61
+ //# sourceMappingURL=view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.js","sources":["../src/view.ts"],"sourcesContent":["import {createView} from '@react-form-builder/core'\nimport {models} from './models'\n\n/**\n * An assembled set of rSuite components, ready to be passed as a property to the FormViewer.\n */\nexport const view = createView(models)\n"],"names":["view","createView","models"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMa,MAAAA,KAAOC,EAAWC,CAAM;"}
@@ -0,0 +1,88 @@
1
+ import { ClassAttributes } from 'react';
2
+ import { Definer } from '@react-form-builder/core';
3
+ import { ElementType } from 'react';
4
+ import { HTMLAttributes } from 'react';
5
+ import { JSX } from 'react';
6
+ import type { PropsWithChildren } from 'react';
7
+ import { Theme } from '@emotion/react';
8
+
9
+ export declare const rsWizard: Definer<RsWizardProps>;
10
+
11
+ /**
12
+ * Props for the RsWizard component.
13
+ */
14
+ export declare interface RsWizardProps extends PropsWithChildren<any> {
15
+ /**
16
+ * Whether to show steps.
17
+ */
18
+ showSteps?: boolean;
19
+ /**
20
+ * Whether to show step labels.
21
+ */
22
+ showStepsLabels?: boolean;
23
+ /**
24
+ * Whether steps are vertical.
25
+ */
26
+ verticalSteps?: boolean;
27
+ /**
28
+ * Navigation mode for steps.
29
+ */
30
+ stepsNavigation?: 'disable' | 'onlyVisited' | 'any';
31
+ /**
32
+ * Active step index.
33
+ */
34
+ activeIndex?: number;
35
+ /**
36
+ * Label for previous button.
37
+ */
38
+ prevButtonLabel?: string;
39
+ /**
40
+ * Label for next button.
41
+ */
42
+ nextButtonLabel?: string;
43
+ /**
44
+ * Label for finish button.
45
+ */
46
+ finishButtonLabel?: string;
47
+ /**
48
+ * Whether to validate on next.
49
+ */
50
+ validateOnNext: boolean;
51
+ /**
52
+ * Whether to validate on finish.
53
+ */
54
+ validateOnFinish: boolean;
55
+ /**
56
+ * Callback when step changes.
57
+ */
58
+ onChange?: (activeIndex?: number) => void;
59
+ /**
60
+ * Callback when next button is clicked.
61
+ */
62
+ onNext?: () => void;
63
+ /**
64
+ * Callback when previous button is clicked.
65
+ */
66
+ onPrev?: () => void;
67
+ /**
68
+ * Callback when finish button is clicked.
69
+ */
70
+ onFinish?: () => void;
71
+ }
72
+
73
+ export declare const rsWizardStep: Definer<{
74
+ theme?: Theme | undefined;
75
+ as?: ElementType<any, keyof JSX.IntrinsicElements> | undefined;
76
+ } & RsWizardStepProps & ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>>;
77
+
78
+ /**
79
+ * Props for the RsWizardStep component.
80
+ */
81
+ declare interface RsWizardStepProps {
82
+ /**
83
+ * Label for the wizard step.
84
+ */
85
+ label?: string;
86
+ }
87
+
88
+ export { }