@react-form-builder/components-rsuite 7.8.0 → 7.9.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/dist/InputCell-BDyUJFGm.js +21 -0
- package/dist/{InputCell-f4236002.js.map → InputCell-BDyUJFGm.js.map} +1 -1
- package/dist/{Labeled-751c2353.js → Labeled-BWYRwMiY.js} +1 -1
- package/dist/{Labeled-751c2353.js.map → Labeled-BWYRwMiY.js.map} +1 -1
- package/dist/WrappedInput-BRkBjl0z.js +11 -0
- package/dist/{WrappedInput-bc5a6d33.js.map → WrappedInput-BRkBjl0z.js.map} +1 -1
- package/dist/autocomplete.d.ts +2 -2
- package/dist/autocomplete.js +12 -15
- package/dist/autocomplete.js.map +1 -1
- package/dist/breadcrumb.d.ts +2 -2
- package/dist/breadcrumb.js +31 -31
- package/dist/breadcrumb.js.map +1 -1
- package/dist/builder-view-with-css.js +5 -61
- package/dist/builder-view-with-css.js.map +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/button.js +7 -7
- package/dist/button.js.map +1 -1
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.js +9 -12
- package/dist/calendar.js.map +1 -1
- package/dist/card.d.ts +1 -1
- package/dist/card.js +10 -10
- package/dist/card.js.map +1 -1
- package/dist/{categories-7064b279.js → categories-_98lyB3C.js} +3 -3
- package/dist/{categories-7064b279.js.map → categories-_98lyB3C.js.map} +1 -1
- package/dist/checkbox.d.ts +1 -1
- package/dist/checkbox.js +19 -23
- package/dist/checkbox.js.map +1 -1
- package/dist/{commonProperties-d849cd5b.js → commonProperties-ETOgvhCH.js} +7 -7
- package/dist/{commonProperties-d849cd5b.js.map → commonProperties-ETOgvhCH.js.map} +1 -1
- package/dist/components-descriptions.d.ts +2 -2
- package/dist/components-descriptions.js +1 -1
- package/dist/container.js +4 -4
- package/dist/container.js.map +1 -1
- package/dist/css-loader.js +3 -3
- package/dist/css-loader.js.map +1 -1
- package/dist/date-picker.d.ts +1 -1
- package/dist/date-picker.js +25 -29
- package/dist/date-picker.js.map +1 -1
- package/dist/dateTimeUtils-C2AEniv5.js +25 -0
- package/dist/{dateTimeUtils-b07ce438.js.map → dateTimeUtils-C2AEniv5.js.map} +1 -1
- package/dist/definitions.js +2 -55
- package/dist/definitions.js.map +1 -1
- package/dist/divider.js +6 -6
- package/dist/divider.js.map +1 -1
- package/dist/dropdown.d.ts +3 -3
- package/dist/dropdown.js +10 -11
- package/dist/dropdown.js.map +1 -1
- package/dist/error-message.d.ts +1 -1
- package/dist/error-message.js +2 -2
- package/dist/error-message.js.map +1 -1
- package/dist/{formengine-rsuite-cbc1d3ae.js → formengine-rsuite.css-DkGUHOws.js} +1 -1
- package/dist/formengine-rsuite.css-DkGUHOws.js.map +1 -0
- package/dist/header.d.ts +6 -6
- package/dist/header.js +2 -2
- package/dist/header.js.map +1 -1
- package/dist/hooks-DMVtrI-b.js +50 -0
- package/dist/hooks-DMVtrI-b.js.map +1 -0
- package/dist/image.d.ts +1 -1
- package/dist/image.js +8 -8
- package/dist/image.js.map +1 -1
- package/dist/index.d.ts +1526 -36
- package/dist/index.js +95 -116
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts +1 -1
- package/dist/input.js +11 -13
- package/dist/input.js.map +1 -1
- package/dist/label.js +2 -2
- package/dist/label.js.map +1 -1
- package/dist/link.d.ts +1 -1
- package/dist/link.js +7 -7
- package/dist/link.js.map +1 -1
- package/dist/localization-wrapper.d.ts +1 -1
- package/dist/localization-wrapper.js +52 -185
- package/dist/localization-wrapper.js.map +1 -1
- package/dist/menu.d.ts +2 -2
- package/dist/menu.js +20 -21
- package/dist/menu.js.map +1 -1
- package/dist/message.d.ts +2 -2
- package/dist/message.js +4 -4
- package/dist/modal-layout.d.ts +1 -1
- package/dist/modal-layout.js +2 -2
- package/dist/modal-layout.js.map +1 -1
- package/dist/modal.d.ts +1 -1
- package/dist/modal.js +13 -13
- package/dist/modal.js.map +1 -1
- package/dist/models.js +2 -56
- package/dist/models.js.map +1 -1
- package/dist/number-format.d.ts +2 -2
- package/dist/number-format.js +22 -25
- package/dist/number-format.js.map +1 -1
- package/dist/pattern-format.d.ts +2 -2
- package/dist/pattern-format.js +22 -25
- package/dist/pattern-format.js.map +1 -1
- package/dist/placeholder.js +3 -3
- package/dist/placeholder.js.map +1 -1
- package/dist/progress.js +6 -6
- package/dist/progress.js.map +1 -1
- package/dist/r-suite-components.d.ts +1 -1
- package/dist/r-suite-components.js +5 -22
- package/dist/r-suite-components.js.map +1 -1
- package/dist/rSuiteComponentsDescriptions-lX1mwx9_.js +67 -0
- package/dist/rSuiteComponentsDescriptions-lX1mwx9_.js.map +1 -0
- package/dist/radio-group.d.ts +1 -1
- package/dist/radio-group.js +10 -13
- package/dist/radio-group.js.map +1 -1
- package/dist/{rsuite-no-reset-rtl.min-af106e5c.js → rsuite-no-reset-rtl.min.css-B0vQWI16.js} +1 -1
- package/dist/rsuite-no-reset-rtl.min.css-B0vQWI16.js.map +1 -0
- package/dist/{rsuite-no-reset.min-3caeeea0.js → rsuite-no-reset.min.css-bW1P11UK.js} +1 -1
- package/dist/rsuite-no-reset.min.css-bW1P11UK.js.map +1 -0
- package/dist/search.d.ts +3 -3
- package/dist/search.js +33 -38
- package/dist/search.js.map +1 -1
- package/dist/static-content.js +4 -4
- package/dist/static-content.js.map +1 -1
- package/dist/stats.html +4 -0
- package/dist/tab.d.ts +2 -2
- package/dist/tab.js +29 -33
- package/dist/tab.js.map +1 -1
- package/dist/tag-picker.d.ts +1 -1
- package/dist/tag-picker.js +28 -31
- package/dist/tag-picker.js.map +1 -1
- package/dist/text-area.d.ts +1 -1
- package/dist/text-area.js +10 -13
- package/dist/text-area.js.map +1 -1
- package/dist/time-picker.d.ts +2 -2
- package/dist/time-picker.js +39 -41
- package/dist/time-picker.js.map +1 -1
- package/dist/toggle.d.ts +2 -2
- package/dist/toggle.js +17 -20
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.d.ts +2 -2
- package/dist/tooltip.js +6 -6
- package/dist/tooltip.js.map +1 -1
- package/dist/uploader.d.ts +1 -1
- package/dist/uploader.js +30 -33
- package/dist/uploader.js.map +1 -1
- package/dist/useTouchOnEvent-BPYbKiku.js +12 -0
- package/dist/{useTouchOnEvent-2be3c60d.js.map → useTouchOnEvent-BPYbKiku.js.map} +1 -1
- package/dist/view-with-css.js +5 -62
- package/dist/view-with-css.js.map +1 -1
- package/dist/view.js +3 -57
- package/dist/view.js.map +1 -1
- package/dist/wizard.d.ts +4 -6
- package/dist/wizard.js +145 -162
- package/dist/wizard.js.map +1 -1
- package/package.json +6 -3
- package/dist/InputCell-f4236002.js +0 -21
- package/dist/WrappedInput-bc5a6d33.js +0 -11
- package/dist/dateTimeUtils-b07ce438.js +0 -26
- package/dist/formengine-rsuite-cbc1d3ae.js.map +0 -1
- package/dist/hooks-ff273a8a.js +0 -53
- package/dist/hooks-ff273a8a.js.map +0 -1
- package/dist/rSuiteComponentsDescriptions-d616cdc1.js +0 -17911
- package/dist/rSuiteComponentsDescriptions-d616cdc1.js.map +0 -1
- package/dist/rsuite-no-reset-rtl.min-af106e5c.js.map +0 -1
- package/dist/rsuite-no-reset.min-3caeeea0.js.map +0 -1
- package/dist/useTouchOnEvent-2be3c60d.js +0 -12
package/dist/uploader.js
CHANGED
|
@@ -1,53 +1,50 @@
|
|
|
1
1
|
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { define as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { Uploader as
|
|
5
|
-
import {
|
|
6
|
-
import { s as
|
|
7
|
-
import { f as
|
|
8
|
-
import { u as
|
|
9
|
-
import { I as s } from "./InputCell-
|
|
10
|
-
import { L as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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");
|
|
2
|
+
import { define as y, array as R, boolean as e, event as t, string as o, oneOf as U, disabled as x, node as E } from "@react-form-builder/core";
|
|
3
|
+
import { useRef as I, useEffect as C, useMemo as m } from "react";
|
|
4
|
+
import { Uploader as w } from "rsuite";
|
|
5
|
+
import { a as A, r as P } from "./commonProperties-ETOgvhCH.js";
|
|
6
|
+
import { s as N } from "./hooks-DMVtrI-b.js";
|
|
7
|
+
import { f as O } from "./categories-_98lyB3C.js";
|
|
8
|
+
import { u as T } from "./useTouchOnEvent-BPYbKiku.js";
|
|
9
|
+
import { I as s } from "./InputCell-BDyUJFGm.js";
|
|
10
|
+
import { L as M } from "./Labeled-BWYRwMiY.js";
|
|
11
|
+
const S = ({ customElement: p, children: c, disabled: d, multiple: l, fileList: r, className: b, label: h, ...i }) => {
|
|
12
|
+
const u = I(null), v = T(i, "onRemove");
|
|
13
|
+
C(() => {
|
|
14
|
+
const a = u.current?.root?.querySelector('input[type="file"]');
|
|
15
|
+
N(a), a && !a.hasAttribute("tabIndex") && a.setAttribute("tabIndex", "-1");
|
|
19
16
|
}, []);
|
|
20
|
-
const f =
|
|
21
|
-
return /* @__PURE__ */ n(
|
|
22
|
-
|
|
17
|
+
const f = m(() => l ? !0 : !(r && r.length > 0), [r, l]), g = m(() => d || !f, [d, f]);
|
|
18
|
+
return /* @__PURE__ */ n(M, { label: h, className: b, passAriaToChildren: !0, children: /* @__PURE__ */ n(
|
|
19
|
+
w,
|
|
23
20
|
{
|
|
24
|
-
...
|
|
25
|
-
disabled:
|
|
21
|
+
...i,
|
|
22
|
+
disabled: g,
|
|
26
23
|
multiple: l,
|
|
27
24
|
fileList: r,
|
|
28
|
-
onRemove:
|
|
25
|
+
onRemove: v,
|
|
29
26
|
ref: u,
|
|
30
|
-
children:
|
|
27
|
+
children: p ? /* @__PURE__ */ n("div", { children: c }) : void 0
|
|
31
28
|
}
|
|
32
29
|
) });
|
|
33
|
-
},
|
|
30
|
+
}, j = [
|
|
34
31
|
{ name: "name", input: s },
|
|
35
32
|
{ name: "fileKey", input: s },
|
|
36
33
|
{ name: "url", input: s }
|
|
37
|
-
],
|
|
34
|
+
], G = y(S, "RsUploader").name("Uploader").category(O).props({
|
|
38
35
|
label: o,
|
|
39
36
|
action: o.default("/"),
|
|
40
37
|
accept: o,
|
|
41
38
|
autoUpload: e.default(!0),
|
|
42
39
|
customElement: e.default(!1),
|
|
43
|
-
children:
|
|
40
|
+
children: E,
|
|
44
41
|
disableMultipart: e.default(!1),
|
|
45
|
-
disabled:
|
|
46
|
-
readOnly:
|
|
42
|
+
disabled: x.default(!1),
|
|
43
|
+
readOnly: P,
|
|
47
44
|
disabledFileItem: e.default(!1),
|
|
48
45
|
draggable: e.default(!1),
|
|
49
46
|
fileListVisible: e.default(!0),
|
|
50
|
-
listType:
|
|
47
|
+
listType: U("text", "picture-text", "picture").withEditorProps({ creatable: !1 }),
|
|
51
48
|
method: o,
|
|
52
49
|
multiple: e.default(!1),
|
|
53
50
|
name: o,
|
|
@@ -60,11 +57,11 @@ const q = ({ customElement: b, children: h, disabled: i, multiple: l, fileList:
|
|
|
60
57
|
onSuccess: t,
|
|
61
58
|
onUpload: t,
|
|
62
59
|
removable: e.default(!1),
|
|
63
|
-
timeout:
|
|
60
|
+
timeout: A,
|
|
64
61
|
withCredentials: e.default(!1),
|
|
65
|
-
fileList:
|
|
62
|
+
fileList: R.withEditorProps({ columns: j }).valued
|
|
66
63
|
});
|
|
67
64
|
export {
|
|
68
|
-
|
|
65
|
+
G as rsUploader
|
|
69
66
|
};
|
|
70
67
|
//# sourceMappingURL=uploader.js.map
|
package/dist/uploader.js.map
CHANGED
|
@@ -1 +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","
|
|
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","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;AAC3H,QAAMC,IAAcC,EAAY,IAAI,GAC9BC,IAAWC,EAAgBJ,GAAO,UAAU;AAElD,EAAAK,EAAU,MAAM;AACd,UAAMC,IAAYL,EAAY,SAAS,MAAM,cAAc,oBAAoB;AAC/E,IAAAM,EAAyBD,CAAS,GAC9BA,KAAa,CAACA,EAAU,aAAa,UAAU,KACjDA,EAAU,aAAa,YAAY,IAAI;AAAA,EAE3C,GAAG,CAAA,CAAE;AAEL,QAAME,IAAYC,EAAQ,MACpBb,IAAiB,KACd,EAAEC,KAAYA,EAAS,SAAS,IACtC,CAACA,GAAUD,CAAQ,CAAC,GAEjBc,IAAiBD,EAAQ,MAAMd,KAAY,CAACa,GAAW,CAACb,GAAUa,CAAS,CAAC;AAElF,SAAO,gBAAAG,EAACC,GAAA,EAAQ,OAAAb,GAAc,WAAAD,GAAsB,oBAAoB,IACtE,UAAA,gBAAAa;AAAA,IAACE;AAAA,IAAA;AAAA,MAAU,GAAGb;AAAA,MAAO,UAAUU;AAAA,MAAgB,UAAAd;AAAA,MACrC,UAAAC;AAAA,MAAoB,UAAAM;AAAA,MAAoB,KAAKF;AAAA,MACpD,UAAAR,IAAgB,gBAAAkB,EAAC,OAAA,EAAK,UAAAjB,EAAA,CAAS,IAAS;AAAA,IAAA;AAAA,EAAA,GAE7C;AACF,GAEMoB,IAAU;AAAA,EACd,EAAC,MAAM,QAAQ,OAAOC,EAAA;AAAA,EACtB,EAAC,MAAM,WAAW,OAAOA,EAAA;AAAA,EACzB,EAAC,MAAM,OAAO,OAAOA,EAAA;AACvB,GAEaC,IAAaC,EAAOzB,GAAY,YAAY,EACtD,KAAK,UAAU,EACf,SAAS0B,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,UAAUzB,EAAS,QAAQ,EAAK;AAAA,EAChC,UAAA2B;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 a } from "@react-form-builder/core";
|
|
2
|
+
import { useCallback as c } from "react";
|
|
3
|
+
const l = (t, n) => {
|
|
4
|
+
const { field: e } = a(), o = t[n];
|
|
5
|
+
return c((s) => {
|
|
6
|
+
e?.setTouched(), o?.(s);
|
|
7
|
+
}, [e, o]);
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
l as u
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useTouchOnEvent-BPYbKiku.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTouchOnEvent-
|
|
1
|
+
{"version":3,"file":"useTouchOnEvent-BPYbKiku.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":";;AAeO,MAAMA,IAAkB,CAAIC,GAAUC,MAA+C;AAC1F,QAAM,EAAC,OAAAC,EAAA,IAASC,EAAA,GACVC,IAAgBJ,EAAMC,CAAY;AAExC,SAAOI,EAAY,CAACC,MAAM;AACxB,IAAAJ,GAAO,WAAA,GACPE,IAAgBE,CAAC;AAAA,EACnB,GAAG,CAACJ,GAAOE,CAAa,CAAC;AAC3B;"}
|
package/dist/view-with-css.js
CHANGED
|
@@ -1,66 +1,9 @@
|
|
|
1
1
|
import { createView as o, BiDi as r } from "@react-form-builder/core";
|
|
2
|
-
import { RsLocalizationWrapper as
|
|
3
|
-
import { ltrCssLoader as
|
|
4
|
-
import { models as
|
|
5
|
-
|
|
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);
|
|
2
|
+
import { RsLocalizationWrapper as e } from "./localization-wrapper.js";
|
|
3
|
+
import { ltrCssLoader as i, rtlCssLoader as s, formEngineRsuiteCssLoader as t } from "./css-loader.js";
|
|
4
|
+
import { models as m } from "./models.js";
|
|
5
|
+
const w = o(m).withViewerWrapper(e).withCssLoader(r.LTR, i).withCssLoader(r.RTL, s).withCssLoader("common", t);
|
|
63
6
|
export {
|
|
64
|
-
|
|
7
|
+
w as viewWithCss
|
|
65
8
|
};
|
|
66
9
|
//# sourceMappingURL=view-with-css.js.map
|
|
@@ -1 +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":"
|
|
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,IAAcC,EAAWC,CAAM,EAEzC,kBAAkBC,CAAqB,EACvC,cAAcC,EAAK,KAAKC,CAAY,EACpC,cAAcD,EAAK,KAAKE,CAAY,EACpC,cAAc,UAAUC,CAAyB;"}
|
package/dist/view.js
CHANGED
|
@@ -1,61 +1,7 @@
|
|
|
1
1
|
import { createView as o } from "@react-form-builder/core";
|
|
2
|
-
import { models as
|
|
3
|
-
|
|
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);
|
|
2
|
+
import { models as e } from "./models.js";
|
|
3
|
+
const t = o(e);
|
|
58
4
|
export {
|
|
59
|
-
|
|
5
|
+
t as view
|
|
60
6
|
};
|
|
61
7
|
//# sourceMappingURL=view.js.map
|
package/dist/view.js.map
CHANGED
|
@@ -1 +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":"
|
|
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":";;AAMO,MAAMA,IAAOC,EAAWC,CAAM;"}
|
package/dist/wizard.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ClassAttributes } from 'react';
|
|
2
2
|
import { Definer } from '@react-form-builder/core';
|
|
3
|
-
import { ElementType } from 'react';
|
|
4
3
|
import { HTMLAttributes } from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import type { PropsWithChildren } from 'react';
|
|
4
|
+
import { PropsWithChildren } from 'react';
|
|
7
5
|
import { Theme } from '@emotion/react';
|
|
8
6
|
|
|
9
7
|
export declare const rsWizard: Definer<RsWizardProps>;
|
|
@@ -70,9 +68,9 @@ export declare interface RsWizardProps extends PropsWithChildren<any> {
|
|
|
70
68
|
onFinish?: () => void;
|
|
71
69
|
}
|
|
72
70
|
|
|
73
|
-
export declare const rsWizardStep: Definer<{
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
export declare const rsWizardStep: Definer< {
|
|
72
|
+
theme?: Theme;
|
|
73
|
+
as?: React.ElementType;
|
|
76
74
|
} & RsWizardStepProps & ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>>;
|
|
77
75
|
|
|
78
76
|
/**
|