@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as p } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useCallback as m } from "react";
|
|
3
|
+
import { Table as i, Input as C } from "rsuite";
|
|
4
|
+
import f from "@emotion/styled";
|
|
5
|
+
const { Cell: u } = i, b = f(u)`
|
|
6
|
+
padding: 0;
|
|
7
|
+
|
|
8
|
+
& .rs-table-cell-content {
|
|
9
|
+
padding: 9px 3px;
|
|
10
|
+
}
|
|
11
|
+
`, I = ({ rowData: n, dataKey: l, rowIndex: s, onChange: o, ...e }) => {
|
|
12
|
+
const r = n[l] ?? "", c = m((t) => {
|
|
13
|
+
n[l] = t, o?.(t, l, s);
|
|
14
|
+
}, [l, o, n, s]);
|
|
15
|
+
return /* @__PURE__ */ p(b, { ...e, children: /* @__PURE__ */ p(C, { value: r, onChange: c, size: "sm" }) });
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
I,
|
|
19
|
+
b as S
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=InputCell-BDyUJFGm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputCell-
|
|
1
|
+
{"version":3,"file":"InputCell-BDyUJFGm.js","sources":["../src/components/internal/SCell.tsx","../src/components/internal/InputCell.tsx"],"sourcesContent":["import styled from '@emotion/styled'\nimport {Table} from 'rsuite'\nimport type {RowDataType} from 'rsuite-table/lib'\n\nconst {Cell} = Table\n\nexport const SCell = styled(Cell<RowDataType, string | number>)`\n padding: 0;\n\n & .rs-table-cell-content {\n padding: 9px 3px;\n }\n`\n","import {useCallback} from 'react'\nimport {Input} from 'rsuite'\nimport type {InputCellProps} from './InputCellProps'\nimport {SCell} from './SCell'\n\n/**\n * The React component that displays the table cell with the input.\n * @param props the React component properties.\n * @param props.rowData the row data.\n * @param props.dataKey the key name in {@link rowData}.\n * @param props.rowIndex the row index.\n * @param props.props the other properties of the component.\n * @param props.onChange the onChange event of the checkbox.\n * @returns the React element.\n */\nexport const InputCell = ({rowData, dataKey, rowIndex, onChange, ...props}: InputCellProps) => {\n const value = rowData[dataKey] ?? ''\n\n const handleChange = useCallback((newValue: any) => {\n rowData[dataKey] = newValue\n onChange?.(newValue, dataKey, rowIndex)\n }, [dataKey, onChange, rowData, rowIndex])\n\n return (\n <SCell {...props}>\n <Input value={value} onChange={handleChange} size=\"sm\"/>\n </SCell>\n )\n}\n"],"names":["Cell","Table","SCell","styled","InputCell","rowData","dataKey","rowIndex","onChange","props","value","handleChange","useCallback","newValue","jsx","Input"],"mappings":";;;;AAIA,MAAM,EAAC,MAAAA,MAAQC,GAEFC,IAAQC,EAAOH,CAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GCSjDI,IAAY,CAAC,EAAC,SAAAC,GAAS,SAAAC,GAAS,UAAAC,GAAU,UAAAC,GAAU,GAAGC,QAA2B;AAC7F,QAAMC,IAAQL,EAAQC,CAAO,KAAK,IAE5BK,IAAeC,EAAY,CAACC,MAAkB;AAClD,IAAAR,EAAQC,CAAO,IAAIO,GACnBL,IAAWK,GAAUP,GAASC,CAAQ;AAAA,EACxC,GAAG,CAACD,GAASE,GAAUH,GAASE,CAAQ,CAAC;AAEzC,SACE,gBAAAO,EAACZ,GAAA,EAAO,GAAGO,GACT,UAAA,gBAAAK,EAACC,GAAA,EAAM,OAAAL,GAAc,UAAUC,GAAc,MAAK,KAAA,CAAI,EAAA,CACxD;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Labeled-
|
|
1
|
+
{"version":3,"file":"Labeled-BWYRwMiY.js","sources":["../src/components/internal/Labeled.tsx"],"sourcesContent":["import {css} from '@emotion/react'\nimport styled from '@emotion/styled'\nimport {namedObserver, useAriaAttributes, useComponentData} from '@react-form-builder/core'\nimport type {ComponentProps} from 'react'\nimport {cloneElement} from 'react'\n\nexport const requiredStyle = css`\n margin-inline-start: 3px;\n content: \"*\";\n color: #f44336;\n`\n\nconst Container = styled.div`\n display: flex;\n flex: 1;\n flex-direction: column;\n\n label {\n margin-inline-start: 5px;\n margin-bottom: 2px;\n text-align: left;\n }\n\n &.required > label::after {\n ${requiredStyle};\n }\n`\n\ninterface LabeledProps extends ComponentProps<any> {\n label?: string,\n /**\n * If true, ARIA attributes will be passed automatically to children.\n */\n passAriaToChildren: boolean\n}\n\n/**\n * The React component that adds a label to a child component.\n * @param props the React component properties.\n * @param props.label the component label.\n * @param props.children the children component.\n * @param props.passAriaToChildren if true, ARIA attributes will be passed automatically to children.\n * @returns the React element.\n */\nexport const RawLabeled = ({label, children, passAriaToChildren, ...props}: LabeledProps) => {\n const {id} = useComponentData()\n const aria = useAriaAttributes({labeled: !!label})\n return <Container {...props} role=\"group\">\n {label && <label id={aria['aria-labelledby']} htmlFor={id}>{label}</label>}\n {passAriaToChildren ? cloneElement(children, {id, ...aria}) : children}\n </Container>\n}\n\nexport const Labeled = namedObserver('Labeled', RawLabeled)\n"],"names":["requiredStyle","css","Container","styled","RawLabeled","label","children","passAriaToChildren","props","id","useComponentData","aria","useAriaAttributes","jsxs","jsx","cloneElement","Labeled","namedObserver"],"mappings":";;;;;AAMO,MAAMA,IAAgBC;AAAA;AAAA;AAAA;AAAA,GAMvBC,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAYnBH,CAAa;AAAA;AAAA,GAoBNI,IAAa,CAAC,EAAC,OAAAC,GAAO,UAAAC,GAAU,oBAAAC,GAAoB,GAAGC,QAAyB;AAC3F,QAAM,EAAC,IAAAC,EAAA,IAAMC,EAAA,GACPC,IAAOC,EAAkB,EAAC,SAAS,CAAC,CAACP,GAAM;AACjD,SAAO,gBAAAQ,EAACX,GAAA,EAAW,GAAGM,GAAO,MAAK,SAC/B,UAAA;AAAA,IAAAH,KAAS,gBAAAS,EAAC,WAAM,IAAIH,EAAK,iBAAiB,GAAG,SAASF,GAAK,UAAAJ,EAAA,CAAM;AAAA,IACjEE,IAAqBQ,EAAaT,GAAU,EAAC,IAAAG,GAAI,GAAGE,EAAA,CAAK,IAAIL;AAAA,EAAA,GAChE;AACF,GAEaU,IAAUC,EAAc,WAAWb,CAAU;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as a } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useCallback as e } from "react";
|
|
3
|
+
import { Input as m } from "rsuite";
|
|
4
|
+
const f = ({ onChange: r, ...o }) => {
|
|
5
|
+
const t = e((p, n) => r?.(n, p), [r]);
|
|
6
|
+
return /* @__PURE__ */ a(m, { onChange: t, ...o });
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
f as W
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=WrappedInput-BRkBjl0z.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WrappedInput-
|
|
1
|
+
{"version":3,"file":"WrappedInput-BRkBjl0z.js","sources":["../src/components/internal/WrappedInput.tsx"],"sourcesContent":["import {useCallback} from 'react'\nimport type {InputProps} from 'rsuite'\nimport {Input} from 'rsuite'\n\n/**\n * The React component that wraps the Input component.\n * @param props the React component properties.\n * @param props.onChange the onChange event of the Input.\n * @param props.props the other wrapped properties of the component.\n * @returns the React element.\n */\nexport const WrappedInput = ({onChange, ...props}: InputProps) => {\n const handleChange = useCallback((value: any, event: any) => onChange?.(event, value), [onChange])\n\n return <Input onChange={handleChange} {...props}/>\n}\n"],"names":["WrappedInput","onChange","props","handleChange","useCallback","value","event","jsx","Input"],"mappings":";;;AAWO,MAAMA,IAAe,CAAC,EAAC,UAAAC,GAAU,GAAGC,QAAuB;AAChE,QAAMC,IAAeC,EAAY,CAACC,GAAYC,MAAeL,IAAWK,GAAOD,CAAK,GAAG,CAACJ,CAAQ,CAAC;AAEjG,SAAO,gBAAAM,EAACC,GAAA,EAAM,UAAUL,GAAe,GAAGD,GAAM;AAClD;"}
|
package/dist/autocomplete.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { AutoCompleteProps } from 'rsuite';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
3
|
import { Definer } from '@react-form-builder/core';
|
|
4
4
|
|
|
5
5
|
export declare const rsAutoComplete: Definer<RsAutoCompleteProps>;
|
package/dist/autocomplete.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { define as
|
|
1
|
+
import { jsxs as i, jsx as o } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { define as s, string as t, boolean as m, event as e, fn as p, array as u, toLabeledValues as f } from "@react-form-builder/core";
|
|
3
3
|
import { AutoComplete as c } from "rsuite";
|
|
4
|
-
import { i as d } from "./commonProperties-
|
|
5
|
-
import { f as h } from "./categories-
|
|
6
|
-
import { L as g } from "./Labeled-
|
|
7
|
-
|
|
8
|
-
import "@emotion/styled";
|
|
9
|
-
import "react";
|
|
10
|
-
const C = () => /* @__PURE__ */ l(
|
|
4
|
+
import { i as d } from "./commonProperties-ETOgvhCH.js";
|
|
5
|
+
import { f as h } from "./categories-_98lyB3C.js";
|
|
6
|
+
import { L as g } from "./Labeled-BWYRwMiY.js";
|
|
7
|
+
const C = () => /* @__PURE__ */ i(
|
|
11
8
|
"svg",
|
|
12
9
|
{
|
|
13
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34,17 +31,17 @@ const C = () => /* @__PURE__ */ l(
|
|
|
34
31
|
)
|
|
35
32
|
]
|
|
36
33
|
}
|
|
37
|
-
), v = ({ label: r, style: a, className: n, ...
|
|
34
|
+
), v = ({ label: r, style: a, className: n, ...l }) => /* @__PURE__ */ o(g, { label: r, style: a, className: n, passAriaToChildren: !0, children: /* @__PURE__ */ o(c, { ...l }) }), x = `/**
|
|
38
35
|
* @param {string} value
|
|
39
36
|
* @param {ItemDataType} item
|
|
40
37
|
* @return {boolean}
|
|
41
38
|
*/
|
|
42
|
-
function filterBy(value, item) {`,
|
|
39
|
+
function filterBy(value, item) {`, B = s(v, "RsAutoComplete").name("AutoComplete").category(h).icon(C).props({
|
|
43
40
|
...d,
|
|
44
41
|
label: t.default("Input"),
|
|
45
|
-
data:
|
|
42
|
+
data: u.default(f(["Item1", "Item2", "Item3"])),
|
|
46
43
|
defaultValue: t,
|
|
47
|
-
filterBy:
|
|
44
|
+
filterBy: p(x),
|
|
48
45
|
menuClassName: t,
|
|
49
46
|
onClose: e,
|
|
50
47
|
onEnter: e,
|
|
@@ -53,10 +50,10 @@ function filterBy(value, item) {`, V = m(v, "RsAutoComplete").name("AutoComplete
|
|
|
53
50
|
onExited: e,
|
|
54
51
|
onExiting: e,
|
|
55
52
|
onSelect: e,
|
|
56
|
-
selectOnEnter:
|
|
53
|
+
selectOnEnter: m.default(!0),
|
|
57
54
|
value: t.valued.uncontrolledValue("")
|
|
58
55
|
});
|
|
59
56
|
export {
|
|
60
|
-
|
|
57
|
+
B as rsAutoComplete
|
|
61
58
|
};
|
|
62
59
|
//# sourceMappingURL=autocomplete.js.map
|
package/dist/autocomplete.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.js","sources":["../src/components/RsAutocomplete.tsx"],"sourcesContent":["import {array, boolean, define, event, fn, string, toLabeledValues} from '@react-form-builder/core'\nimport type {CSSProperties} from 'react'\nimport type {AutoCompleteProps} from 'rsuite'\nimport {AutoComplete} from 'rsuite'\nimport {inputProps} from '../commonProperties'\nimport {fieldsCategory} from './categories'\nimport {Labeled} from './internal/Labeled'\n\nconst AutoCompleteIcon = () => <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\"\n viewBox=\"0 0 24 24\">\n <path stroke=\"#9ca3af\" strokeWidth=\"2\"\n d=\"M16.94 4H7.2c-1.12 0-1.68 0-2.1.22a2 2 0 0 0-.88.87C4 5.52 4 6.08 4 7.2v9.6c0 1.12 0 1.68.22 2.1.19.38.5.7.87.88.43.22.99.22 2.1.22h9.61c1.12 0 1.68 0 2.1-.22a2 2 0 0 0 .88-.87c.22-.43.22-.99.22-2.1v-6.15\"/>\n <path stroke=\"#9ca3af\" strokeWidth=\"2\"\n d=\"M9.81 12.33h.01m.5 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0zm4.5 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0z\"/>\n</svg>\n\n/**\n * The properties of the RsAutoComplete component.\n */\nexport interface RsAutoCompleteProps extends AutoCompleteProps {\n /**\n * The component label.\n */\n label?: string\n /**\n * The component class name.\n */\n className?: string\n /**\n * The component styles.\n */\n style?: CSSProperties\n /**\n * Called after the value has been changed.\n * @param value the value.\n */\n onChange?: (value: string) => void\n}\n\nconst RsAutoComplete = ({label, style, className, ...props}: RsAutoCompleteProps) => {\n return <Labeled label={label} style={style} className={className} passAriaToChildren={true}>\n <AutoComplete {...props} />\n </Labeled>\n}\n\nconst filterByFnDescriptionBegin = `/**\n * @param {string} value\n * @param {ItemDataType} item\n * @return {boolean}\n */\nfunction filterBy(value, item) {`\n\nexport const rsAutoComplete = define(RsAutoComplete, 'RsAutoComplete')\n .name('AutoComplete')\n .category(fieldsCategory)\n .icon(AutoCompleteIcon)\n .props({\n ...inputProps,\n label: string.default('Input'),\n data: array.default(toLabeledValues(['Item1', 'Item2', 'Item3'])),\n defaultValue: string,\n filterBy: fn(filterByFnDescriptionBegin),\n menuClassName: string,\n onClose: event,\n onEnter: event,\n onEntering: event,\n onExit: event,\n onExited: event,\n onExiting: event,\n onSelect: event,\n selectOnEnter: boolean.default(true),\n value: string.valued.uncontrolledValue(''),\n })\n"],"names":["AutoCompleteIcon","jsxs","jsx","RsAutoComplete","label","style","className","props","Labeled","AutoComplete","filterByFnDescriptionBegin","rsAutoComplete","define","fieldsCategory","inputProps","string","array","toLabeledValues","fn","event","boolean"],"mappings":"
|
|
1
|
+
{"version":3,"file":"autocomplete.js","sources":["../src/components/RsAutocomplete.tsx"],"sourcesContent":["import {array, boolean, define, event, fn, string, toLabeledValues} from '@react-form-builder/core'\nimport type {CSSProperties} from 'react'\nimport type {AutoCompleteProps} from 'rsuite'\nimport {AutoComplete} from 'rsuite'\nimport {inputProps} from '../commonProperties'\nimport {fieldsCategory} from './categories'\nimport {Labeled} from './internal/Labeled'\n\nconst AutoCompleteIcon = () => <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" fill=\"none\"\n viewBox=\"0 0 24 24\">\n <path stroke=\"#9ca3af\" strokeWidth=\"2\"\n d=\"M16.94 4H7.2c-1.12 0-1.68 0-2.1.22a2 2 0 0 0-.88.87C4 5.52 4 6.08 4 7.2v9.6c0 1.12 0 1.68.22 2.1.19.38.5.7.87.88.43.22.99.22 2.1.22h9.61c1.12 0 1.68 0 2.1-.22a2 2 0 0 0 .88-.87c.22-.43.22-.99.22-2.1v-6.15\"/>\n <path stroke=\"#9ca3af\" strokeWidth=\"2\"\n d=\"M9.81 12.33h.01m.5 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0zm4.5 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0z\"/>\n</svg>\n\n/**\n * The properties of the RsAutoComplete component.\n */\nexport interface RsAutoCompleteProps extends AutoCompleteProps {\n /**\n * The component label.\n */\n label?: string\n /**\n * The component class name.\n */\n className?: string\n /**\n * The component styles.\n */\n style?: CSSProperties\n /**\n * Called after the value has been changed.\n * @param value the value.\n */\n onChange?: (value: string) => void\n}\n\nconst RsAutoComplete = ({label, style, className, ...props}: RsAutoCompleteProps) => {\n return <Labeled label={label} style={style} className={className} passAriaToChildren={true}>\n <AutoComplete {...props} />\n </Labeled>\n}\n\nconst filterByFnDescriptionBegin = `/**\n * @param {string} value\n * @param {ItemDataType} item\n * @return {boolean}\n */\nfunction filterBy(value, item) {`\n\nexport const rsAutoComplete = define(RsAutoComplete, 'RsAutoComplete')\n .name('AutoComplete')\n .category(fieldsCategory)\n .icon(AutoCompleteIcon)\n .props({\n ...inputProps,\n label: string.default('Input'),\n data: array.default(toLabeledValues(['Item1', 'Item2', 'Item3'])),\n defaultValue: string,\n filterBy: fn(filterByFnDescriptionBegin),\n menuClassName: string,\n onClose: event,\n onEnter: event,\n onEntering: event,\n onExit: event,\n onExited: event,\n onExiting: event,\n onSelect: event,\n selectOnEnter: boolean.default(true),\n value: string.valued.uncontrolledValue(''),\n })\n"],"names":["AutoCompleteIcon","jsxs","jsx","RsAutoComplete","label","style","className","props","Labeled","AutoComplete","filterByFnDescriptionBegin","rsAutoComplete","define","fieldsCategory","inputProps","string","array","toLabeledValues","fn","event","boolean"],"mappings":";;;;;;AAQA,MAAMA,IAAmB,MAAM,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IAAI,OAAM;AAAA,IAA6B,OAAM;AAAA,IAAK,QAAO;AAAA,IAAK,MAAK;AAAA,IAC/D,SAAQ;AAAA,IAC1C,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UAAK,QAAO;AAAA,UAAU,aAAY;AAAA,UAC7B,GAAE;AAAA,QAAA;AAAA,MAAA;AAAA,MACR,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UAAK,QAAO;AAAA,UAAU,aAAY;AAAA,UAC7B,GAAE;AAAA,QAAA;AAAA,MAAA;AAAA,IAA0F;AAAA,EAAA;AACpG,GAyBMC,IAAiB,CAAC,EAAC,OAAAC,GAAO,OAAAC,GAAO,WAAAC,GAAW,GAAGC,QAC5C,gBAAAL,EAACM,GAAA,EAAQ,OAAAJ,GAAc,OAAAC,GAAc,WAAAC,GAAsB,oBAAoB,IACpF,UAAA,gBAAAJ,EAACO,GAAA,EAAc,GAAGF,EAAA,CAAO,EAAA,CAC3B,GAGIG,IAA6B;AAAA;AAAA;AAAA;AAAA;AAAA,mCAOtBC,IAAiBC,EAAOT,GAAgB,gBAAgB,EAClE,KAAK,cAAc,EACnB,SAASU,CAAc,EACvB,KAAKb,CAAgB,EACrB,MAAM;AAAA,EACL,GAAGc;AAAA,EACH,OAAOC,EAAO,QAAQ,OAAO;AAAA,EAC7B,MAAMC,EAAM,QAAQC,EAAgB,CAAC,SAAS,SAAS,OAAO,CAAC,CAAC;AAAA,EAChE,cAAcF;AAAA,EACd,UAAUG,EAAGR,CAA0B;AAAA,EACvC,eAAeK;AAAA,EACf,SAASI;AAAA,EACT,SAASA;AAAA,EACT,YAAYA;AAAA,EACZ,QAAQA;AAAA,EACR,UAAUA;AAAA,EACV,WAAWA;AAAA,EACX,UAAUA;AAAA,EACV,eAAeC,EAAQ,QAAQ,EAAI;AAAA,EACnC,OAAOL,EAAO,OAAO,kBAAkB,EAAE;AAC3C,CAAC;"}
|
package/dist/breadcrumb.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BreadcrumbProps } from 'rsuite';
|
|
2
2
|
import { Definer } from '@react-form-builder/core';
|
|
3
3
|
|
|
4
4
|
export declare const rsBreadcrumb: Definer<RsBreadcrumbProps>;
|
|
@@ -32,7 +32,7 @@ export declare interface RsBreadcrumbProps extends BreadcrumbProps {
|
|
|
32
32
|
/**
|
|
33
33
|
* Callback function when a breadcrumb item is clicked.
|
|
34
34
|
*/
|
|
35
|
-
onItemClick: (item: RsBreadcrumbItemProps) =>
|
|
35
|
+
onItemClick: (item: RsBreadcrumbItemProps) => void;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export { }
|
package/dist/breadcrumb.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { createElement as u } from "@emotion/react";
|
|
3
|
-
import { define as f,
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { Checkbox as
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import { S as
|
|
10
|
-
const
|
|
3
|
+
import { define as f, event as a, array as d, string as h, oneOf as C } from "@react-form-builder/core";
|
|
4
|
+
import { useCallback as b, useMemo as k } from "react";
|
|
5
|
+
import { Checkbox as x, Breadcrumb as l } from "rsuite";
|
|
6
|
+
import { a as g } from "./commonProperties-ETOgvhCH.js";
|
|
7
|
+
import { s as y } from "./categories-_98lyB3C.js";
|
|
8
|
+
import B from "@emotion/styled";
|
|
9
|
+
import { S as I, I as p } from "./InputCell-BDyUJFGm.js";
|
|
10
|
+
const S = B(x)`
|
|
11
11
|
& .rs-checkbox-wrapper {
|
|
12
12
|
inset-inline-start: 4px;
|
|
13
13
|
top: 6px;
|
|
14
14
|
}
|
|
15
|
-
`,
|
|
16
|
-
const
|
|
17
|
-
e
|
|
18
|
-
}, [
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
},
|
|
21
|
-
{ name: "title", input:
|
|
22
|
-
{ name: "href", title: "Url", input:
|
|
23
|
-
{ name: "active", input:
|
|
24
|
-
],
|
|
25
|
-
const
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
const { title:
|
|
28
|
-
return /* @__PURE__ */ u(
|
|
15
|
+
`, E = ({ rowData: r, dataKey: e, rowIndex: n, onChange: o, ...t }) => {
|
|
16
|
+
const s = b((c, m) => {
|
|
17
|
+
r[e] = m, o?.(m, e, n);
|
|
18
|
+
}, [e, o, r, n]);
|
|
19
|
+
return /* @__PURE__ */ i(I, { ...t, children: /* @__PURE__ */ i(S, { inline: !0, checked: r[e] ?? !1, onChange: s }) });
|
|
20
|
+
}, j = (r) => r.map((e) => ({ title: e, href: e })), v = [
|
|
21
|
+
{ name: "title", input: p },
|
|
22
|
+
{ name: "href", title: "Url", input: p },
|
|
23
|
+
{ name: "active", input: E }
|
|
24
|
+
], N = { display: "flex" }, P = ({ items: r, onItemClick: e, ...n }) => {
|
|
25
|
+
const o = k(() => (r ?? []).map((t) => () => e?.(t)), [r, e]);
|
|
26
|
+
return /* @__PURE__ */ i(l, { ...n, style: N, children: r?.map((t, s) => {
|
|
27
|
+
const { title: c = "", ...m } = t;
|
|
28
|
+
return /* @__PURE__ */ u(l.Item, { ...m, onClick: o[s], key: c }, c);
|
|
29
29
|
}) });
|
|
30
|
-
},
|
|
31
|
-
separator:
|
|
32
|
-
maxItems:
|
|
33
|
-
items:
|
|
34
|
-
onItemClick:
|
|
35
|
-
onExpand:
|
|
30
|
+
}, z = f(P, "RsBreadcrumb").name("Breadcrumb").category(y).props({
|
|
31
|
+
separator: h.default("/"),
|
|
32
|
+
maxItems: g,
|
|
33
|
+
items: d.default(j(["one", "two", "three"])).withEditorProps({ columns: v }),
|
|
34
|
+
onItemClick: a,
|
|
35
|
+
onExpand: a
|
|
36
36
|
}).css({
|
|
37
|
-
justifyContent:
|
|
37
|
+
justifyContent: C("left", "center", "right").default("left").radio().named("Alignment")
|
|
38
38
|
});
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
z as rsBreadcrumb
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=breadcrumb.js.map
|
package/dist/breadcrumb.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.js","sources":["../src/components/internal/CheckCell.tsx","../src/components/RsBreadcrumb.tsx"],"sourcesContent":["import styled from '@emotion/styled'\nimport {useCallback} from 'react'\nimport {Checkbox} from 'rsuite'\nimport type {InputCellProps} from './InputCellProps'\nimport {SCell} from './SCell'\n\nconst SCheckbox = styled(Checkbox)`\n & .rs-checkbox-wrapper {\n inset-inline-start: 4px;\n top: 6px;\n }\n`\n\n/**\n * The React component that displays the table cell with the checkbox.\n * @param props the React component properties.\n * @param props.rowData the row data.\n * @param props.dataKey the key name in {@link props.rowData}.\n * @param props.rowIndex the row index.\n * @param props.onChange the onChange event of the checkbox.\n * @param props.props the other properties of the component.\n * @returns the React element.\n */\nexport const CheckCell = ({rowData, dataKey, rowIndex, onChange, ...props}: InputCellProps) => {\n const handleChange = useCallback((_: any, checked: boolean) => {\n rowData[dataKey] = checked\n onChange?.(checked, dataKey, rowIndex)\n }, [dataKey, onChange, rowData, rowIndex])\n\n return (\n <SCell {...props}>\n <SCheckbox inline checked={rowData[dataKey] ?? false} onChange={handleChange}/>\n </SCell>\n )\n}\n","import {array, define, event, oneOf, string} from '@react-form-builder/core'\nimport {useMemo} from 'react'\nimport type {BreadcrumbProps} from 'rsuite'\nimport {Breadcrumb} from 'rsuite'\nimport {nonNegNumber} from '../commonProperties'\nimport {structureCategory} from './categories'\nimport {CheckCell} from './internal/CheckCell'\nimport {InputCell} from './internal/InputCell'\n\n/**\n * Props for a single breadcrumb item.\n */\nexport interface RsBreadcrumbItemProps {\n /**\n * Whether the breadcrumb item is active.\n */\n active?: boolean\n /**\n * URL for the breadcrumb item.\n */\n href?: string\n /**\n * Title text for the breadcrumb item.\n */\n title?: string\n}\n\n/**\n * Creates breadcrumb items from string data.\n * @param data the array of strings to convert to breadcrumb items.\n * @returns the array of breadcrumb items.\n */\nconst makeItems = (data: string[]) => data.map(title => ({title, href: title}))\n\n/**\n * Props for the RsBreadcrumb component.\n */\nexport interface RsBreadcrumbProps extends BreadcrumbProps {\n /**\n * Array of breadcrumb items to display.\n */\n items: RsBreadcrumbItemProps[]\n /**\n * Callback function when a breadcrumb item is clicked.\n */\n onItemClick: (item: RsBreadcrumbItemProps) =>
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","sources":["../src/components/internal/CheckCell.tsx","../src/components/RsBreadcrumb.tsx"],"sourcesContent":["import styled from '@emotion/styled'\nimport {useCallback} from 'react'\nimport {Checkbox} from 'rsuite'\nimport type {InputCellProps} from './InputCellProps'\nimport {SCell} from './SCell'\n\nconst SCheckbox = styled(Checkbox)`\n & .rs-checkbox-wrapper {\n inset-inline-start: 4px;\n top: 6px;\n }\n`\n\n/**\n * The React component that displays the table cell with the checkbox.\n * @param props the React component properties.\n * @param props.rowData the row data.\n * @param props.dataKey the key name in {@link props.rowData}.\n * @param props.rowIndex the row index.\n * @param props.onChange the onChange event of the checkbox.\n * @param props.props the other properties of the component.\n * @returns the React element.\n */\nexport const CheckCell = ({rowData, dataKey, rowIndex, onChange, ...props}: InputCellProps) => {\n const handleChange = useCallback((_: any, checked: boolean) => {\n rowData[dataKey] = checked\n onChange?.(checked, dataKey, rowIndex)\n }, [dataKey, onChange, rowData, rowIndex])\n\n return (\n <SCell {...props}>\n <SCheckbox inline checked={rowData[dataKey] ?? false} onChange={handleChange}/>\n </SCell>\n )\n}\n","import {array, define, event, oneOf, string} from '@react-form-builder/core'\nimport {useMemo} from 'react'\nimport type {BreadcrumbProps} from 'rsuite'\nimport {Breadcrumb} from 'rsuite'\nimport {nonNegNumber} from '../commonProperties'\nimport {structureCategory} from './categories'\nimport {CheckCell} from './internal/CheckCell'\nimport {InputCell} from './internal/InputCell'\n\n/**\n * Props for a single breadcrumb item.\n */\nexport interface RsBreadcrumbItemProps {\n /**\n * Whether the breadcrumb item is active.\n */\n active?: boolean\n /**\n * URL for the breadcrumb item.\n */\n href?: string\n /**\n * Title text for the breadcrumb item.\n */\n title?: string\n}\n\n/**\n * Creates breadcrumb items from string data.\n * @param data the array of strings to convert to breadcrumb items.\n * @returns the array of breadcrumb items.\n */\nconst makeItems = (data: string[]) => data.map(title => ({title, href: title}))\n\n/**\n * Props for the RsBreadcrumb component.\n */\nexport interface RsBreadcrumbProps extends BreadcrumbProps {\n /**\n * Array of breadcrumb items to display.\n */\n items: RsBreadcrumbItemProps[]\n /**\n * Callback function when a breadcrumb item is clicked.\n */\n onItemClick: (item: RsBreadcrumbItemProps) => void\n}\n\n/**\n * Column definitions for breadcrumb item editor.\n */\nconst columns = [\n {name: 'title', input: InputCell},\n {name: 'href', title: 'Url', input: InputCell},\n {name: 'active', input: CheckCell}\n] as const\n\n/**\n * Container style for breadcrumb component.\n */\nconst containerStyle = {display: 'flex'} as const\n\n/**\n * Breadcrumb component for navigation.\n * @param props the component props.\n * @param props.items - the array of breadcrumb items to display.\n * @param props.onItemClick - the callback function when a breadcrumb item is clicked.\n * @param props.separator the separator between breadcrumb items.\n * @param props.maxItems the maximum number of breadcrumb items to display.\n * @param props.onExpand the callback function when breadcrumb is expanded.\n * @param props.justifyContent the CSS justify-content property for alignment.\n * @returns the React element.\n */\nconst RsBreadcrumb = ({items, onItemClick, ...props}: RsBreadcrumbProps) => {\n const clickHandlers = useMemo(() => (items ?? []).map((it) => {\n return () => onItemClick?.(it)\n }), [items, onItemClick])\n\n return (\n <Breadcrumb {...props} style={containerStyle}>\n {items?.map((item, idx) => {\n const {title = '', ...itemProps} = item\n return (\n <Breadcrumb.Item {...itemProps} onClick={clickHandlers[idx]} key={title}>\n {title}\n </Breadcrumb.Item>)\n })}\n </Breadcrumb>\n )\n}\n\nexport const rsBreadcrumb = define(RsBreadcrumb, 'RsBreadcrumb')\n .name('Breadcrumb')\n .category(structureCategory)\n .props({\n separator: string.default('/'),\n maxItems: nonNegNumber,\n items: array\n .default(makeItems(['one', 'two', 'three']))\n .withEditorProps({columns}),\n onItemClick: event,\n onExpand: event\n })\n .css({\n justifyContent: oneOf('left', 'center', 'right')\n .default('left').radio().named('Alignment'),\n })\n"],"names":["SCheckbox","styled","Checkbox","CheckCell","rowData","dataKey","rowIndex","onChange","props","handleChange","useCallback","_","checked","jsx","SCell","makeItems","data","title","columns","InputCell","containerStyle","RsBreadcrumb","items","onItemClick","clickHandlers","useMemo","it","Breadcrumb","item","idx","itemProps","createElement","rsBreadcrumb","define","structureCategory","string","nonNegNumber","array","event","oneOf"],"mappings":";;;;;;;;;AAMA,MAAMA,IAAYC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAiBpBC,IAAY,CAAC,EAAC,SAAAC,GAAS,SAAAC,GAAS,UAAAC,GAAU,UAAAC,GAAU,GAAGC,QAA2B;AAC7F,QAAMC,IAAeC,EAAY,CAACC,GAAQC,MAAqB;AAC7D,IAAAR,EAAQC,CAAO,IAAIO,GACnBL,IAAWK,GAASP,GAASC,CAAQ;AAAA,EACvC,GAAG,CAACD,GAASE,GAAUH,GAASE,CAAQ,CAAC;AAEzC,SACE,gBAAAO,EAACC,GAAA,EAAO,GAAGN,GACT,4BAACR,GAAA,EAAU,QAAM,IAAC,SAASI,EAAQC,CAAO,KAAK,IAAO,UAAUI,GAAa,GAC/E;AAEJ,GCFMM,IAAY,CAACC,MAAmBA,EAAK,IAAI,QAAU,EAAC,OAAAC,GAAO,MAAMA,EAAA,EAAO,GAmBxEC,IAAU;AAAA,EACd,EAAC,MAAM,SAAS,OAAOC,EAAA;AAAA,EACvB,EAAC,MAAM,QAAQ,OAAO,OAAO,OAAOA,EAAA;AAAA,EACpC,EAAC,MAAM,UAAU,OAAOhB,EAAA;AAC1B,GAKMiB,IAAiB,EAAC,SAAS,OAAA,GAa3BC,IAAe,CAAC,EAAC,OAAAC,GAAO,aAAAC,GAAa,GAAGf,QAA8B;AAC1E,QAAMgB,IAAgBC,EAAQ,OAAOH,KAAS,IAAI,IAAI,CAACI,MAC9C,MAAMH,IAAcG,CAAE,CAC9B,GAAG,CAACJ,GAAOC,CAAW,CAAC;AAExB,SACE,gBAAAV,EAACc,GAAA,EAAY,GAAGnB,GAAO,OAAOY,GAC3B,UAAAE,GAAO,IAAI,CAACM,GAAMC,MAAQ;AACzB,UAAM,EAAC,OAAAZ,IAAQ,IAAI,GAAGa,MAAaF;AACnC,WACE,gBAAAG,EAACJ,EAAW,MAAX,EAAiB,GAAGG,GAAW,SAASN,EAAcK,CAAG,GAAG,KAAKZ,EAAA,GAC/DA,CACH;AAAA,EACJ,CAAC,EAAA,CACH;AAEJ,GAEae,IAAeC,EAAOZ,GAAc,cAAc,EAC5D,KAAK,YAAY,EACjB,SAASa,CAAiB,EAC1B,MAAM;AAAA,EACL,WAAWC,EAAO,QAAQ,GAAG;AAAA,EAC7B,UAAUC;AAAA,EACV,OAAOC,EACJ,QAAQtB,EAAU,CAAC,OAAO,OAAO,OAAO,CAAC,CAAC,EAC1C,gBAAgB,EAAC,SAAAG,GAAQ;AAAA,EAC5B,aAAaoB;AAAA,EACb,UAAUA;AACZ,CAAC,EACA,IAAI;AAAA,EACH,gBAAgBC,EAAM,QAAQ,UAAU,OAAO,EAC5C,QAAQ,MAAM,EAAE,MAAA,EAAQ,MAAM,WAAW;AAC9C,CAAC;"}
|
|
@@ -1,66 +1,10 @@
|
|
|
1
1
|
import { BuilderView as o, BiDi as r } from "@react-form-builder/core";
|
|
2
2
|
import { RsLocalizationWrapper as i } from "./localization-wrapper.js";
|
|
3
|
-
import { ltrCssLoader as
|
|
4
|
-
import { components as
|
|
5
|
-
import { r as
|
|
6
|
-
|
|
7
|
-
import "rsuite";
|
|
8
|
-
import "rsuite/esm/locales/index.js";
|
|
9
|
-
import "date-fns/locale/hi/index.js";
|
|
10
|
-
import "date-fns/locale/sr/index.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 fr = new o(e).withViewerWrapper(i).withCssLoader(r.LTR, t).withCssLoader(r.RTL, m).withCssLoader("common", p).withComponentLibraryDescription(s);
|
|
3
|
+
import { ltrCssLoader as e, rtlCssLoader as s, formEngineRsuiteCssLoader as t } from "./css-loader.js";
|
|
4
|
+
import { components as m } from "./definitions.js";
|
|
5
|
+
import { r as p } from "./rSuiteComponentsDescriptions-lX1mwx9_.js";
|
|
6
|
+
const d = new o(m).withViewerWrapper(i).withCssLoader(r.LTR, e).withCssLoader(r.RTL, s).withCssLoader("common", t).withComponentLibraryDescription(p);
|
|
63
7
|
export {
|
|
64
|
-
|
|
8
|
+
d as builderViewWithCss
|
|
65
9
|
};
|
|
66
10
|
//# sourceMappingURL=builder-view-with-css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-view-with-css.js","sources":["../src/builderViewWithCss.ts"],"sourcesContent":["import {BiDi, BuilderView} from '@react-form-builder/core'\nimport {RsLocalizationWrapper} from './components/RsLocalizationWrapper'\nimport {formEngineRsuiteCssLoader, ltrCssLoader, rtlCssLoader} from './cssLoader'\nimport {components} from './definitions'\nimport {rSuiteComponentsDescriptions} from './i18n/rSuiteComponentsDescriptions'\n\n/**\n * An assembled set of rSuite components metadata, ready to be passed as a property to the FormBuilder.\n * This view contains CSS loaders.\n */\nexport const builderViewWithCss = new BuilderView(components)\n .withViewerWrapper(RsLocalizationWrapper)\n .withCssLoader(BiDi.LTR, ltrCssLoader)\n .withCssLoader(BiDi.RTL, rtlCssLoader)\n .withCssLoader('common', formEngineRsuiteCssLoader)\n .withComponentLibraryDescription(rSuiteComponentsDescriptions)\n"],"names":["builderViewWithCss","BuilderView","components","RsLocalizationWrapper","BiDi","ltrCssLoader","rtlCssLoader","formEngineRsuiteCssLoader","rSuiteComponentsDescriptions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"builder-view-with-css.js","sources":["../src/builderViewWithCss.ts"],"sourcesContent":["import {BiDi, BuilderView} from '@react-form-builder/core'\nimport {RsLocalizationWrapper} from './components/RsLocalizationWrapper'\nimport {formEngineRsuiteCssLoader, ltrCssLoader, rtlCssLoader} from './cssLoader'\nimport {components} from './definitions'\nimport {rSuiteComponentsDescriptions} from './i18n/rSuiteComponentsDescriptions'\n\n/**\n * An assembled set of rSuite components metadata, ready to be passed as a property to the FormBuilder.\n * This view contains CSS loaders.\n */\nexport const builderViewWithCss = new BuilderView(components)\n .withViewerWrapper(RsLocalizationWrapper)\n .withCssLoader(BiDi.LTR, ltrCssLoader)\n .withCssLoader(BiDi.RTL, rtlCssLoader)\n .withCssLoader('common', formEngineRsuiteCssLoader)\n .withComponentLibraryDescription(rSuiteComponentsDescriptions)\n"],"names":["builderViewWithCss","BuilderView","components","RsLocalizationWrapper","BiDi","ltrCssLoader","rtlCssLoader","formEngineRsuiteCssLoader","rSuiteComponentsDescriptions"],"mappings":";;;;;AAUO,MAAMA,IAAqB,IAAIC,EAAYC,CAAU,EACzD,kBAAkBC,CAAqB,EACvC,cAAcC,EAAK,KAAKC,CAAY,EACpC,cAAcD,EAAK,KAAKE,CAAY,EACpC,cAAc,UAAUC,CAAyB,EACjD,gCAAgCC,CAA4B;"}
|
package/dist/button.d.ts
CHANGED
package/dist/button.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as l } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { define as s,
|
|
2
|
+
import { define as s, event as i, boolean as t, string as e, disabled as d, oneOf as u, useBuilderValue as f } from "@react-form-builder/core";
|
|
3
3
|
import { Button as c } from "rsuite";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { s as m, c as p } from "./commonProperties-ETOgvhCH.js";
|
|
5
|
+
import { a as B } from "./categories-_98lyB3C.js";
|
|
6
6
|
const o = "Button", b = ({ children: a, ...r }) => {
|
|
7
7
|
const n = f(a, o);
|
|
8
8
|
return /* @__PURE__ */ l(c, { ...r, children: n });
|
|
9
9
|
}, v = s(b, "RsButton").name("Button").category(B).props({
|
|
10
10
|
active: t.default(!1),
|
|
11
|
-
appearance:
|
|
11
|
+
appearance: u("default", "primary", "link", "subtle", "ghost").default("default").withEditorProps({ creatable: !1 }),
|
|
12
12
|
children: e.required.default(o).dataBound,
|
|
13
|
-
color:
|
|
13
|
+
color: p,
|
|
14
14
|
disabled: d.default(!1),
|
|
15
15
|
href: e,
|
|
16
16
|
loading: t.default(!1),
|
|
17
|
-
size:
|
|
18
|
-
onClick:
|
|
17
|
+
size: m,
|
|
18
|
+
onClick: i
|
|
19
19
|
});
|
|
20
20
|
export {
|
|
21
21
|
v as rsButton
|
package/dist/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../src/components/RsButton.tsx"],"sourcesContent":["import {boolean, define, disabled, event, oneOf, string, useBuilderValue} from '@react-form-builder/core'\nimport type {ButtonProps} from 'rsuite'\nimport {Button} from 'rsuite'\nimport {controlColor, size} from '../commonProperties'\nimport {staticCategory} from './categories'\n\nconst defaultContent = 'Button'\n\nconst RsButton = ({children, ...props}: ButtonProps) => {\n const content = useBuilderValue(children, defaultContent)\n return <Button {...props}>{content}</Button>\n}\n\nexport const rsButton = define(RsButton, 'RsButton')\n .name('Button')\n .category(staticCategory)\n .props({\n active: boolean.default(false),\n appearance: oneOf('default', 'primary', 'link', 'subtle', 'ghost')\n .default('default')\n .withEditorProps({creatable: false}),\n children: string.required.default(defaultContent).dataBound,\n color: controlColor,\n disabled: disabled.default(false),\n href: string,\n loading: boolean.default(false),\n size,\n onClick: event,\n })\n"],"names":["defaultContent","RsButton","children","props","content","useBuilderValue","jsx","Button","rsButton","define","staticCategory","boolean","oneOf","string","controlColor","disabled","size","event"],"mappings":";;;;;AAMA,MAAMA,IAAiB,UAEjBC,IAAW,CAAC,EAAC,UAAAC,GAAU,GAAGC,QAAwB;
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../src/components/RsButton.tsx"],"sourcesContent":["import {boolean, define, disabled, event, oneOf, string, useBuilderValue} from '@react-form-builder/core'\nimport type {ButtonProps} from 'rsuite'\nimport {Button} from 'rsuite'\nimport {controlColor, size} from '../commonProperties'\nimport {staticCategory} from './categories'\n\nconst defaultContent = 'Button'\n\nconst RsButton = ({children, ...props}: ButtonProps) => {\n const content = useBuilderValue(children, defaultContent)\n return <Button {...props}>{content}</Button>\n}\n\nexport const rsButton = define(RsButton, 'RsButton')\n .name('Button')\n .category(staticCategory)\n .props({\n active: boolean.default(false),\n appearance: oneOf('default', 'primary', 'link', 'subtle', 'ghost')\n .default('default')\n .withEditorProps({creatable: false}),\n children: string.required.default(defaultContent).dataBound,\n color: controlColor,\n disabled: disabled.default(false),\n href: string,\n loading: boolean.default(false),\n size,\n onClick: event,\n })\n"],"names":["defaultContent","RsButton","children","props","content","useBuilderValue","jsx","Button","rsButton","define","staticCategory","boolean","oneOf","string","controlColor","disabled","size","event"],"mappings":";;;;;AAMA,MAAMA,IAAiB,UAEjBC,IAAW,CAAC,EAAC,UAAAC,GAAU,GAAGC,QAAwB;AACtD,QAAMC,IAAUC,EAAgBH,GAAUF,CAAc;AACxD,SAAO,gBAAAM,EAACC,GAAA,EAAQ,GAAGJ,GAAQ,UAAAC,GAAQ;AACrC,GAEaI,IAAWC,EAAOR,GAAU,UAAU,EAChD,KAAK,QAAQ,EACb,SAASS,CAAc,EACvB,MAAM;AAAA,EACL,QAAQC,EAAQ,QAAQ,EAAK;AAAA,EAC7B,YAAYC,EAAM,WAAW,WAAW,QAAQ,UAAU,OAAO,EAC9D,QAAQ,SAAS,EACjB,gBAAgB,EAAC,WAAW,IAAM;AAAA,EACrC,UAAUC,EAAO,SAAS,QAAQb,CAAc,EAAE;AAAA,EAClD,OAAOc;AAAA,EACP,UAAUC,EAAS,QAAQ,EAAK;AAAA,EAChC,MAAMF;AAAA,EACN,SAASF,EAAQ,QAAQ,EAAK;AAAA,EAC9B,MAAAK;AAAA,EACA,SAASC;AACX,CAAC;"}
|
package/dist/calendar.d.ts
CHANGED
package/dist/calendar.js
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import { jsx as a } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { define as
|
|
3
|
-
import { Calendar as
|
|
4
|
-
import { r as
|
|
5
|
-
import { f as
|
|
6
|
-
import { L as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "react";
|
|
10
|
-
const C = ({ label: n, style: d, className: i, ...e }) => /* @__PURE__ */ a(u, { label: n, style: d, className: i, passAriaToChildren: !0, children: e.readOnly ? /* @__PURE__ */ a(t, { ...e, onChange: void 0 }) : /* @__PURE__ */ a(t, { ...e }) }), R = m(C, "RsCalendar").name("Calendar").category(p).props({
|
|
11
|
-
label: f,
|
|
2
|
+
import { define as s, date as o, event as l, boolean as r, string as i } from "@react-form-builder/core";
|
|
3
|
+
import { Calendar as n } from "rsuite";
|
|
4
|
+
import { r as m } from "./commonProperties-ETOgvhCH.js";
|
|
5
|
+
import { f as u } from "./categories-_98lyB3C.js";
|
|
6
|
+
import { L as C } from "./Labeled-BWYRwMiY.js";
|
|
7
|
+
const c = ({ label: t, style: d, className: f, ...e }) => /* @__PURE__ */ a(C, { label: t, style: d, className: f, passAriaToChildren: !0, children: e.readOnly ? /* @__PURE__ */ a(n, { ...e, onChange: void 0 }) : /* @__PURE__ */ a(n, { ...e }) }), x = s(c, "RsCalendar").name("Calendar").category(u).props({
|
|
8
|
+
label: i,
|
|
12
9
|
bordered: r.default(!1),
|
|
13
10
|
compact: r.default(!1),
|
|
14
11
|
defaultValue: o,
|
|
15
|
-
readOnly:
|
|
12
|
+
readOnly: m,
|
|
16
13
|
isoWeek: r.default(!1),
|
|
17
14
|
onChange: l,
|
|
18
15
|
onSelect: l,
|
|
19
16
|
value: o.valued
|
|
20
17
|
});
|
|
21
18
|
export {
|
|
22
|
-
|
|
19
|
+
x as rsCalendar
|
|
23
20
|
};
|
|
24
21
|
//# sourceMappingURL=calendar.js.map
|
package/dist/calendar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","sources":["../src/components/RsCalendar.tsx"],"sourcesContent":["import {boolean, date, define, event, string} from '@react-form-builder/core'\nimport {Calendar} from 'rsuite'\nimport type {CalendarProps} from 'rsuite/esm/Calendar/Calendar'\nimport {readOnly} from '../commonProperties'\nimport {fieldsCategory} from './categories'\nimport {Labeled} from './internal/Labeled'\n\n/**\n * Props for the RsCalendar component.\n */\nexport interface RsCalendarProps extends CalendarProps {\n /**\n * Whether the calendar is read only.\n */\n readOnly: boolean\n /**\n * Label for the calendar.\n */\n label?: string\n}\n\n/**\n * Calendar component with label support.\n * @param props the component props.\n * @param props.label the label for the calendar.\n * @param props.style the CSS styles.\n * @param props.className the CSS class name.\n * @param props.props the additional calendar props.\n * @returns the React element.\n */\nconst RsCalendar = ({label, style, className, ...props}: RsCalendarProps) => {\n return <Labeled label={label} style={style} className={className} passAriaToChildren={true}>\n {\n props.readOnly\n ? <Calendar {...props} onChange={undefined}/>\n : <Calendar {...props}/>\n }\n </Labeled>\n}\n\nexport const rsCalendar = define(RsCalendar, 'RsCalendar')\n .name('Calendar')\n .category(fieldsCategory)\n .props({\n label: string,\n bordered: boolean.default(false),\n compact: boolean.default(false),\n defaultValue: date,\n readOnly,\n isoWeek: boolean.default(false),\n onChange: event,\n onSelect: event,\n value: date.valued,\n })\n"],"names":["RsCalendar","label","style","className","props","jsx","Labeled","Calendar","rsCalendar","define","fieldsCategory","string","boolean","date","readOnly","event"],"mappings":"
|
|
1
|
+
{"version":3,"file":"calendar.js","sources":["../src/components/RsCalendar.tsx"],"sourcesContent":["import {boolean, date, define, event, string} from '@react-form-builder/core'\nimport {Calendar} from 'rsuite'\nimport type {CalendarProps} from 'rsuite/esm/Calendar/Calendar'\nimport {readOnly} from '../commonProperties'\nimport {fieldsCategory} from './categories'\nimport {Labeled} from './internal/Labeled'\n\n/**\n * Props for the RsCalendar component.\n */\nexport interface RsCalendarProps extends CalendarProps {\n /**\n * Whether the calendar is read only.\n */\n readOnly: boolean\n /**\n * Label for the calendar.\n */\n label?: string\n}\n\n/**\n * Calendar component with label support.\n * @param props the component props.\n * @param props.label the label for the calendar.\n * @param props.style the CSS styles.\n * @param props.className the CSS class name.\n * @param props.props the additional calendar props.\n * @returns the React element.\n */\nconst RsCalendar = ({label, style, className, ...props}: RsCalendarProps) => {\n return <Labeled label={label} style={style} className={className} passAriaToChildren={true}>\n {\n props.readOnly\n ? <Calendar {...props} onChange={undefined}/>\n : <Calendar {...props}/>\n }\n </Labeled>\n}\n\nexport const rsCalendar = define(RsCalendar, 'RsCalendar')\n .name('Calendar')\n .category(fieldsCategory)\n .props({\n label: string,\n bordered: boolean.default(false),\n compact: boolean.default(false),\n defaultValue: date,\n readOnly,\n isoWeek: boolean.default(false),\n onChange: event,\n onSelect: event,\n value: date.valued,\n })\n"],"names":["RsCalendar","label","style","className","props","jsx","Labeled","Calendar","rsCalendar","define","fieldsCategory","string","boolean","date","readOnly","event"],"mappings":";;;;;;AA8BA,MAAMA,IAAa,CAAC,EAAC,OAAAC,GAAO,OAAAC,GAAO,WAAAC,GAAW,GAAGC,QACxC,gBAAAC,EAACC,KAAQ,OAAAL,GAAc,OAAAC,GAAc,WAAAC,GAAsB,oBAAoB,IAElF,YAAM,WACF,gBAAAE,EAACE,KAAU,GAAGH,GAAO,UAAU,OAAA,CAAU,sBACxCG,GAAA,EAAU,GAAGH,GAAM,EAAA,CAE5B,GAGWI,IAAaC,EAAOT,GAAY,YAAY,EACtD,KAAK,UAAU,EACf,SAASU,CAAc,EACvB,MAAM;AAAA,EACL,OAAOC;AAAA,EACP,UAAUC,EAAQ,QAAQ,EAAK;AAAA,EAC/B,SAASA,EAAQ,QAAQ,EAAK;AAAA,EAC9B,cAAcC;AAAA,EACd,UAAAC;AAAA,EACA,SAASF,EAAQ,QAAQ,EAAK;AAAA,EAC9B,UAAUG;AAAA,EACV,UAAUA;AAAA,EACV,OAAOF,EAAK;AACd,CAAC;"}
|
package/dist/card.d.ts
CHANGED
package/dist/card.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx as d, jsxs as f } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { define as i,
|
|
2
|
+
import { define as i, event as m, string as o, boolean as r, node as s } from "@react-form-builder/core";
|
|
3
3
|
import { useMemo as u } from "react";
|
|
4
4
|
import { Panel as p } from "rsuite";
|
|
5
|
-
import { h as c } from "./commonProperties-
|
|
6
|
-
import {
|
|
5
|
+
import { h as c } from "./commonProperties-ETOgvhCH.js";
|
|
6
|
+
import { s as h } from "./categories-_98lyB3C.js";
|
|
7
7
|
import { RsHeader as C } from "./header.js";
|
|
8
8
|
const S = ({ title: e, headerSize: a, header: t }) => /* @__PURE__ */ f("div", { children: [
|
|
9
9
|
!!e && /* @__PURE__ */ d(C, { headerSize: a, content: e }),
|
|
10
10
|
t
|
|
11
|
-
] }), b = ({ header: e, title: a, headerSize: t, ...
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */ d(p, { header:
|
|
11
|
+
] }), b = ({ header: e, title: a, headerSize: t, ...l }) => {
|
|
12
|
+
const n = u(() => /* @__PURE__ */ d(S, { title: a, headerSize: t, header: e }), [e, t, a]);
|
|
13
|
+
return /* @__PURE__ */ d(p, { header: n, ...l });
|
|
14
14
|
}, j = i(b, "RsCard").name("Card").category(h).props({
|
|
15
|
-
header:
|
|
16
|
-
children:
|
|
17
|
-
title:
|
|
15
|
+
header: s,
|
|
16
|
+
children: s,
|
|
17
|
+
title: o.default("Title"),
|
|
18
18
|
headerSize: c,
|
|
19
19
|
bodyFill: r.default(!1),
|
|
20
20
|
bordered: r.default(!0),
|
|
21
21
|
shaded: r.default(!0),
|
|
22
22
|
defaultExpanded: r.default(!1),
|
|
23
23
|
collapsible: r.default(!1),
|
|
24
|
-
eventKey:
|
|
24
|
+
eventKey: o,
|
|
25
25
|
onSelect: m
|
|
26
26
|
});
|
|
27
27
|
export {
|
package/dist/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sources":["../src/components/RsCard.tsx"],"sourcesContent":["import {boolean, define, event, node, string} from '@react-form-builder/core'\nimport {useMemo} from 'react'\nimport type {PanelProps} from 'rsuite'\nimport {Panel} from 'rsuite'\nimport {headerSize} from '../commonProperties'\nimport {structureCategory} from './categories'\nimport {RsHeader} from './RsHeader'\n\n/**\n * Props for the RsCard component.\n */\nexport interface RsCardProps extends PanelProps {\n /**\n * Title for the card.\n */\n title?: string\n /**\n * Header size for the card.\n */\n headerSize: string\n}\n\n/**\n * Props for the PanelHeader component.\n */\ntype PanelHeaderProps = Pick<RsCardProps, 'title' | 'headerSize' | 'header'>\n\n/**\n * Panel header component with title and header size support.\n * @param props the component props.\n * @param props.title the title for the panel header.\n * @param props.headerSize the header size for the panel header.\n * @param props.header the header content for the panel header.\n * @returns the React element.\n */\nconst PanelHeader = ({title, headerSize, header}: PanelHeaderProps) => (\n <div>\n {!!title && <RsHeader headerSize={headerSize} content={title}/>}\n {header}\n </div>\n)\n\n/**\n * Card component with header and title support.\n * @param props the component props.\n * @param props.header the header content for the card.\n * @param props.title the title for the card.\n * @param props.headerSize the header size for the card.\n * @param props.props the additional panel props.\n * @returns the React element.\n */\nconst RsCard = ({header, title, headerSize, ...props}: RsCardProps) => {\n const panelHeader = useMemo(() => {\n return <PanelHeader title={title} headerSize={headerSize} header={header}/>\n }, [header, headerSize, title])\n\n return <Panel header={panelHeader} {...props}/>\n}\n\nexport const rsCard = define(RsCard, 'RsCard')\n .name('Card')\n .category(structureCategory)\n .props({\n header: node,\n children: node,\n title: string.default('Title'),\n headerSize,\n bodyFill: boolean.default(false),\n bordered: boolean.default(true),\n shaded: boolean.default(true),\n defaultExpanded: boolean.default(false),\n collapsible: boolean.default(false),\n eventKey: string,\n onSelect: event\n })\n"],"names":["PanelHeader","title","headerSize","header","jsxs","jsx","RsHeader","RsCard","props","panelHeader","useMemo","Panel","rsCard","define","structureCategory","node","string","boolean","event"],"mappings":";;;;;;;AAmCA,MAAMA,IAAc,CAAC,EAAC,OAAAC,GAAO,YAAAC,GAAY,QAAAC,EAAA,MACvC,gBAAAC,EAAC,
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../src/components/RsCard.tsx"],"sourcesContent":["import {boolean, define, event, node, string} from '@react-form-builder/core'\nimport {useMemo} from 'react'\nimport type {PanelProps} from 'rsuite'\nimport {Panel} from 'rsuite'\nimport {headerSize} from '../commonProperties'\nimport {structureCategory} from './categories'\nimport {RsHeader} from './RsHeader'\n\n/**\n * Props for the RsCard component.\n */\nexport interface RsCardProps extends PanelProps {\n /**\n * Title for the card.\n */\n title?: string\n /**\n * Header size for the card.\n */\n headerSize: string\n}\n\n/**\n * Props for the PanelHeader component.\n */\ntype PanelHeaderProps = Pick<RsCardProps, 'title' | 'headerSize' | 'header'>\n\n/**\n * Panel header component with title and header size support.\n * @param props the component props.\n * @param props.title the title for the panel header.\n * @param props.headerSize the header size for the panel header.\n * @param props.header the header content for the panel header.\n * @returns the React element.\n */\nconst PanelHeader = ({title, headerSize, header}: PanelHeaderProps) => (\n <div>\n {!!title && <RsHeader headerSize={headerSize} content={title}/>}\n {header}\n </div>\n)\n\n/**\n * Card component with header and title support.\n * @param props the component props.\n * @param props.header the header content for the card.\n * @param props.title the title for the card.\n * @param props.headerSize the header size for the card.\n * @param props.props the additional panel props.\n * @returns the React element.\n */\nconst RsCard = ({header, title, headerSize, ...props}: RsCardProps) => {\n const panelHeader = useMemo(() => {\n return <PanelHeader title={title} headerSize={headerSize} header={header}/>\n }, [header, headerSize, title])\n\n return <Panel header={panelHeader} {...props}/>\n}\n\nexport const rsCard = define(RsCard, 'RsCard')\n .name('Card')\n .category(structureCategory)\n .props({\n header: node,\n children: node,\n title: string.default('Title'),\n headerSize,\n bodyFill: boolean.default(false),\n bordered: boolean.default(true),\n shaded: boolean.default(true),\n defaultExpanded: boolean.default(false),\n collapsible: boolean.default(false),\n eventKey: string,\n onSelect: event\n })\n"],"names":["PanelHeader","title","headerSize","header","jsxs","jsx","RsHeader","RsCard","props","panelHeader","useMemo","Panel","rsCard","define","structureCategory","node","string","boolean","event"],"mappings":";;;;;;;AAmCA,MAAMA,IAAc,CAAC,EAAC,OAAAC,GAAO,YAAAC,GAAY,QAAAC,EAAA,MACvC,gBAAAC,EAAC,OAAA,EACE,UAAA;AAAA,EAAA,CAAC,CAACH,KAAS,gBAAAI,EAACC,KAAS,YAAYJ,GAAY,SAASD,GAAM;AAAA,EAC5DE;AAAA,GACH,GAYII,IAAS,CAAC,EAAC,QAAAJ,GAAQ,OAAAF,GAAO,YAAAC,GAAY,GAAGM,QAAwB;AACrE,QAAMC,IAAcC,EAAQ,MACnB,gBAAAL,EAACL,GAAA,EAAY,OAAAC,GAAc,YAAYC,GAAY,QAAAC,GAAe,GACxE,CAACA,GAAQD,GAAYD,CAAK,CAAC;AAE9B,SAAO,gBAAAI,EAACM,GAAA,EAAM,QAAQF,GAAc,GAAGD,GAAM;AAC/C,GAEaI,IAASC,EAAON,GAAQ,QAAQ,EAC1C,KAAK,MAAM,EACX,SAASO,CAAiB,EAC1B,MAAM;AAAA,EACL,QAAQC;AAAA,EACR,UAAUA;AAAA,EACV,OAAOC,EAAO,QAAQ,OAAO;AAAA,EAC7B,YAAAd;AAAA,EACA,UAAUe,EAAQ,QAAQ,EAAK;AAAA,EAC/B,UAAUA,EAAQ,QAAQ,EAAI;AAAA,EAC9B,QAAQA,EAAQ,QAAQ,EAAI;AAAA,EAC5B,iBAAiBA,EAAQ,QAAQ,EAAK;AAAA,EACtC,aAAaA,EAAQ,QAAQ,EAAK;AAAA,EAClC,UAAUD;AAAA,EACV,UAAUE;AACZ,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categories-
|
|
1
|
+
{"version":3,"file":"categories-_98lyB3C.js","sources":["../src/components/categories.ts"],"sourcesContent":["export const fieldsCategory = 'fields'\n\nexport const modalCategory = 'modal'\n\nexport const staticCategory = 'static'\n\nexport const structureCategory = 'structure'\n"],"names":["fieldsCategory","modalCategory","staticCategory","structureCategory"],"mappings":"AAAO,MAAMA,IAAiB,UAEjBC,IAAgB,SAEhBC,IAAiB,UAEjBC,IAAoB;"}
|
package/dist/checkbox.d.ts
CHANGED