UNPKG

@react-form-builder/core

Version:

React JSON Schema Form Builder to create complex, validated, reusable forms with no deep React knowledge required

1,044 lines (1,031 loc) 44.5 kB
import { t as W, r as V, h as x, v as U, e as D, D as q, W as $, s as w, g as J, a as l, b as v, d as C, o as R, c as z, f as A, i as K, C as H, j as G, k as Q, l as X, m as Y, n as Z, p as _, q as ee, u as te, w as ne, x as oe, y as re, z as se, A as P, M as ae, B as ie, E, G as de, H as T, I as N, J as pe, K as le, L as O, O as ce, P as F, Q as me, S as ue, R as I, T as he, U as fe, V as be, X as ye, Y as k, Z as M, _ as ge, $ as ve, a0 as Ce, a1 as Fe, a2 as De, a3 as Pe, a4 as Ee } from "./DefaultErrorMessage-Cz2ItVOj.js"; import { aG as jt, ad as Bt, ae as Lt, aJ as Wt, aO as Vt, aP as xt, aC as Ut, bY as qt, ah as $t, b9 as Jt, a_ as Kt, b8 as Ht, bi as Gt, ab as Qt, a$ as Xt, a9 as Yt, b2 as Zt, aZ as _t, ar as en, aK as tn, am as nn, b4 as on, aL as rn, by as sn, ax as an, a7 as dn, F as pn, b6 as ln, aF as cn, ai as mn, aj as un, aM as hn, aQ as fn, N as bn, aR as yn, ak as gn, bW as vn, aS as Cn, aT as Fn, bC as Dn, bB as Pn, aN as En, b5 as Sn, b1 as wn, az as Rn, aU as zn, ag as An, bI as Tn, aa as Nn, bo as On, bf as In, bd as kn, be as Mn, ay as jn, bM as Bn, bx as Ln, bJ as Wn, bS as Vn, bZ as xn, bV as Un, a8 as qn, bL as $n, bG as Jn, bl as Kn, b3 as Hn, a6 as Gn, al as Qn, aB as Xn, bR as Yn, ba as Zn, aH as _n, bb as eo, b0 as to, bz as no, aV as oo, bc as ro, a5 as so, bU as ao, br as io, bp as po, bv as lo, aD as co, aE as mo, bn as uo, bw as ho, an as fo, bX as bo, ao as yo, bm as go, aI as vo, aW as Co, bD as Fo, bs as Do, ap as Po, aq as Eo, ac as So, bj as wo, bO as Ro, bE as zo, bP as Ao, bF as To, bQ as No, bq as Oo, bN as Io, bH as ko, bT as Mo, bt as jo, bK as Bo, aA as Lo, bu as Wo, aw as Vo, at as xo, au as Uo, av as qo, bk as $o, b7 as Jo, aX as Ko, aY as Ho, bh as Go, bg as Qo, bA as Xo, as as Yo, af as Zo } from "./DefaultErrorMessage-Cz2ItVOj.js"; import { useMemo as Se } from "react"; const Ft = () => (Math.random() * 1e18).toString(36).slice(0, 5).toUpperCase() + "", c = [ W.build("tooltipProps"), V.build("renderWhen"), x.build("htmlAttributes"), U.build("validation"), D.build(q), D.build($) ]; class d { /** * Creates the component metadata for the form builder. * @param type the component type name. * @param properties the component's properties metadata. * @param css the component's CSS metadata. * @param wrapperCss the component's wrapper CSS metadata. * @param modules common metadata for the component. * @param customPreview the custom ReactNode to be drawn on the toolbar. * @param valuedAn the metadata for the component value. * @param initialJson the JSON source for the component (instance of {@link ComponentStore} class serialised to JSON). * @param eventListeners the component metadata event listeners. * @param icon the component icon. * @param insertRestriction the function that restricts the insertion of a component into another component. */ constructor(e, t, n, r, s, a, m, u, p, f, b) { this.type = e, this.properties = t, this.css = n, this.wrapperCss = r, this.modules = s, this.valuedAn = m, this.initialJson = u, this.eventListeners = p, this.icon = f, this.insertRestriction = b, this.customPreview = a; } /** * @deprecated * The custom ReactNode to be drawn on the toolbar. */ customPreview; } const we = new d(w.type, [], [], [], c), Re = z.default(!0).calculable(!1).hinted("Store data in parent form").named("Store data in parent form"), ze = R.hinted("The additional options for loading the template").named("Template options"); function Ae(o) { const e = J(o); return new d( e, l({ storeDataInParentForm: Re, options: ze, disabled: C, readOnly: v }), [], A, c ); } class h { /** * Definer class data. * @template T React component property type. */ data; /** * Static method to create an instance of the component's metadata builder class. * @param component the React component. * @param displayName the display name for the anonymous component. * @returns the instance of the {@link Definer} class. */ static define(e, t) { if (!(t ?? e.displayName ?? e.name)) throw Error("Anonymous components are not allowed!"); const r = new h(e); return t && r.type(t), r; } /** * Static method to create an instance of the preset component's metadata builder class. * @param name the preset name. * @param components the components of the preset. * @returns the instance of the {@link Definer} class. */ static definePreset(e, t) { if (!e) throw Error("Anonymous components are not allowed!"); const n = () => null, r = new h(n).addFeature(K, !0).type(e).name(e), s = new H("", e); return s.children = t, r.initialJson(JSON.stringify(s)); } constructor(e) { this.data = { component: e }; } /** * Sets the name of the component. * @param name the component name. * @returns the modified Definer class instance. */ name = (e) => this.#e({ name: e }); /** * Sets the kind of the component. * @param kind the component kind. * @returns the modified Definer class instance. */ kind = (e) => this.#e({ kind: e }); /* * Sets the component features that provide additional information about component's characteristic. **Internal use only.** * @param name the feature name. * @param value the feature value. * @returns the modified Definer class instance. */ addFeature = (e, t) => { const n = G(this.data.features ?? {}, e, t); return this.#e({ features: n }); }; /** * Sets the icon of the component. * @param icon the component icon. * @returns the modified Definer class instance. */ icon = (e) => this.#e({ icon: e }); /** * Sets the category of the component. * @param category the component category. * @returns the modified Definer class instance. */ category = (e) => this.#e({ category: e }); /** * Sets the type of the component. * @param type the component type. * @returns the modified Definer class instance. */ type = (e) => (this.data.component.displayName = e, this); /** * Sets the metadata of the component's properties. * @param properties the metadata of the component's properties. * @returns the modified Definer class instance. */ props = (e) => this.#e({ properties: e }); /** * Sets the component CSS metadata. * @param css the component CSS metadata. * @returns the modified Definer class instance. */ css = (e) => this.#e({ cssObject: e }); /** * Adds the metadata of the component's actions. **Internal use only.** * @param fn the function that initializes an actions on a component. * @returns the modified Definer class instance. */ actions = (e) => this.#e({ actionsInitializer: e }); /** * @deprecated * Adds the custom component to be displayed in the component list. **Internal use only.** * @param customPreview the custom component. * @returns the modified Definer class instance. */ preview = (e) => this.#e({ customPreview: e }); /** * @returns the component type name. */ getType() { return this.data.component.displayName || this.data.component.name; } /** * Sets initial component JSON. * @param initialJson the JSON source for the component (instance of {@link ComponentStore} class serialised to JSON). * @returns the modified Definer class instance. */ initialJson = (e) => this.#e({ initialJson: e }); /** * Sets the component metadata event listeners. * @param eventListeners the component metadata event listeners. * @returns the modified Definer class instance. */ eventListeners = (e) => this.#e({ eventListeners: e }); /** * Sets the function that restricts the insertion of a component into another component. * @param insertRestriction the function that restricts the insertion of a component into another component. * @returns the modified Definer class instance. */ insertRestriction = (e) => this.#e({ insertRestriction: e }); /** * Sets the role (e.g., label, tooltip, etc.) for the component. * @param value the component role. * @returns the modified Definer class instance. */ componentRole(e) { return this.addFeature(Q, e); } /** * Hides a component from the component palette. * @param value true to hide the component, false otherwise. * @returns the modified Definer class instance. */ hideFromComponentPalette(e = !0) { return this.addFeature(X, e); } /** * Prevent this component from being removed. * @param value true to disable removal, false otherwise. * @returns the modified Definer class instance. */ disableRemove(e = !0) { return this.addFeature(Y, e); } /** * Disables the styling of the component. * @param value true to disable the styling of the component. * @returns the modified Definer class instance. */ withoutStyles(e = !0) { return this.addFeature(Z, e); } /** * Disables the styling of the component wrapper. * @param value true to disable the styling of the component wrapper. * @returns the modified Definer class instance. */ withoutWrapperStyles(e = !0) { return this.addFeature(_, e); } /** * Show or hide 'Styles for className' editor. * @param value if the value is `true` or `undefined`, the editor will be displayed. * @returns the modified Definer class instance. */ showClassNameStylesEditor(e) { return this.addFeature(ee, !e); } /** * Show or hide 'Inline styles' properties editor. * @param value if the value is `true` or `undefined`, the editor will be displayed. * @returns the modified Definer class instance. */ showInlineStylesEditor(e) { return this.addFeature(te, e); } /** * Hides child components from the field collection. * It is used when components are dynamically added to the form, for example in the Repeater component. * @param value true if the feature is enabled. * @returns the modified Definer class instance. */ skipChildrenDuringFieldCollection(e = !0) { return this.addFeature(ne, e); } /** * Show or hide 'Tooltip' properties editor. * @param value if the value is `false` or `undefined`, the editor will be displayed. * @returns the modified Definer class instance. */ hideTooltipEditor(e = !0) { return this.addFeature(oe, e); } /** * Overrides event handlers (for example, onChange, onBlur) that are added to the component. * @param eventHandlers the custom event handlers. * @returns the modified instance of the builder. */ overrideEventHandlers(e) { return this.addFeature(re, e); } /** * Hides or shows the 'Actions' editors. * @param value if the value is true, the editors will be hidden. * @returns the modified Definer class instance. */ hideActionEditors(e = !0) { return this.addFeature(se, e); } /** * Creates component metadata for the form builder and form viewer. * @returns component metadata for the form builder and form viewer. */ build() { const e = l(this.data.properties), t = P(this.data.cssObject), n = P(de), r = e.filter((i) => i.valued === !0), s = r[0]; r.length > 1 && console.warn(`Several annotations with the "valued" property were found. There should be only one "valued" property in the component description! The annotation with the key "${r[0].key}" will be used.`); const a = s ?? e.find((i) => i.name === "value"), m = e.find((i) => i.readOnly), u = e.find((i) => i.disabled), p = e.reduce((i, y) => (y.bindingType && (i[y.key] = y.bindingType), i), {}), f = new ae( this.data.component, this.data.name || this.getType(), this.data.actionsInitializer, a?.key, a?.type, ie(e), E(t), E(n), this.getType(), this.data.kind, m?.key, p, a?.uncontrolledValue, u?.key, a?.dataBindingType, this.data.features ), b = new d( this.getType(), e, t, n, c, this.data.customPreview, a, this.data.initialJson, this.data.eventListeners, this.data.icon, this.data.insertRestriction ); return { model: f, meta: b, category: this.data.category }; } /** * Modifies the component's metadata builder with custom options. * @param opts the custom options. * @returns the modified instance of the builder. */ #e(e) { return Object.assign(this.data, e), this; } } const Dt = h.define, Pt = h.definePreset, S = new d(T.type, [], [], [], []), Te = new d( N.type, l({ children: pe, disabled: C, readOnly: v }), le, [], c ), Ne = l({ modalTemplate: F.required.setup({ editor: "componentType" }).withEditorProps({ filter: (o) => me(o.model.type) }) }), Oe = ce("modalProps"), Ie = [ Oe.build("modalProps") ], ke = { onCreateNode: (o, e) => { const { form: t } = e; !t.modalType && e instanceof ue && (t.modalType = e.getFirstComponentTypeWithRole("modal")); } }, Me = new d( O.type, Ne, [], [], Ie, void 0, void 0, void 0, ke ), je = [ ...c ], Be = new d( I.type, he, fe, be, je, void 0, ye.build("value") ), Le = z.default(!0).calculable(!1), We = new d( k.type, l({ storeDataInParentForm: Le, formName: F.setup({ editor: "formNamePicker" }), options: R, disabled: C, readOnly: v }), [], A, c ), Ve = new d( M.type, l({ className: F }), [], [], [] ), g = "templates", xe = "structure", Ue = "modal"; class j extends ge { /** * Creates metadata for form builder components. * @param builderComponents the array of metadata of form builder components. */ constructor(e) { super(e.map(({ model: n }) => n)), this.builderComponents = e, this.builderComponents.push({ meta: Te, model: N }), this.builderComponents.push({ meta: S, model: T }), this.builderComponents.push({ meta: we, model: w, category: g }), this.builderComponents.push({ meta: We, model: k, category: g }), this.builderComponents.push({ meta: Be, model: I, category: xe }), this.builderComponents.push({ meta: Ve, model: M }), this.builderComponents.push({ meta: Me, model: O, category: Ue }), e.map(({ meta: n }) => n).forEach((n) => { this.#e.set(n.type, n); }); } #e = /* @__PURE__ */ new Map(); /** * The function for filtering components on the component palette. */ paletteFilter; /** * The description of the component library in different languages. */ i18nDescriptions; /** * Returns the component metadata for the specified component type name. * @param type the component type name. * @returns the component metadata for the specified component type name. */ getMeta(e) { const t = this.#e.get(e); return t || S; } /** * Adds the component metadata to the form builder. * @param component the component metadata. */ addComponent(e) { this.define(e.model), this.#e.set(e.meta.type, e.meta); } /** * Removes the component metadata from the form builder. * @param name the component type name. */ removeComponent(e) { this.#e.delete(e); } /** * Returns the component metadata for the specified component type name or undefined. * @param type the component type name. * @returns the component metadata for the specified component type name or undefined. */ findMeta(e) { return this.#e.get(e); } /** * Creates metadata for the form builder for templates from the specified template names. * @param templates the array of template names. * @returns the instance of the {@link BuilderView} class. */ withTemplates(e) { return e.forEach((t) => { const n = j.createTemplateComponent(t); this.define(n.model), this.#e.set(n.meta.type, n.meta), this.builderComponents.push(n); }), this; } /** * Sets a function for filtering components on the component palette. * @param filter the component filtering function. * @returns the instance of the {@link BuilderView} class. */ withPaletteFilter(e) { return this.paletteFilter = e, this; } /** * Adds a description of the component library in different languages. * @param i18nDescription the description of the component library in different languages. * @returns the instance of the {@link BuilderView} class. */ withComponentLibraryDescription(e) { return this.i18nDescriptions ??= [], this.i18nDescriptions.push(e), this; } /** * Creates an instance of BuilderComponent for the specified template name. * @param name the template name * @returns the BuilderComponent instance. */ static createTemplateComponent(e) { const t = ve(e); return { meta: Ae(e), model: t, category: g }; } } const Et = `declare interface IFormData { /** * @returns the {@link Record} with all the form data. */ get data(): Record<string, unknown> /** * @returns the object to read and modify parent data (available for array elements). */ get parentData(): Record<string, unknown> | undefined /** * @returns the object to read and modify root form data. */ get rootData(): Record<string, unknown> /** * @returns the {@link Record} with all validation error messages. */ get errors(): Record<string, unknown> /** * true if the form contains errors, otherwise false. */ get hasErrors(): boolean /** * @returns A user-defined key-value observable storage. Utilize it to store and share any custom data. */ get state(): Record<string, unknown> /** * Sets the validation error message for all form data fields. * @param message the validation error message. */ setAllErrors(message?: string): void /** * Validates the data in the form. */ validate(): Promise<void> /** * Returns the validation results without triggering an events and changing the state of the form. * @returns the validation results. */ getValidationResult: () => Promise<ValidationMessages> /** * If true, then validation is in progress. */ get isValidating(): boolean /** * Sets the form to its default value. * @param clearInitialData if true, then also clear the initial data. Defaults to true. */ reset(clearInitialData?: boolean): void /** * Clears the form data. * @param clearInitialData if true, then also clear the initial data. Defaults to true. */ clear(clearInitialData?: boolean): void /** * @returns the index in the array if the component is in the component array. */ index?: number }`, St = (o, e = !0) => o.map((t) => { if (Ce(t)) return { value: t.value, label: t.label }; const n = t, r = e ? Fe(String(t)) : String(t); return { value: n, label: r }; }), wt = () => De().field?.error, Rt = (o, e, t) => new Promise((n, r) => { if (document.getElementById(o)) return n(); const s = document.createElement("link"); s.id = o, s.rel = t, s.href = e, s.onload = () => { n(); }, s.onerror = r, document.head.appendChild(s); }), zt = (o) => { const e = document.getElementById(o); e?.parentNode?.removeChild(e); }, [ /** * @returns the current {@link BuilderTheme} value. */ At, /** * Context provider for the {@link useBuilderTheme} hook. */ Tt ] = Pe("BuilderThemeContext", "light"); function qe(o) { return !!o?.fnSource; } function B(o) { return o?.localized === !0; } function $e(o) { return typeof o?.finalize == "function"; } class Je { constructor(e, t) { this.parent = e, this.eventName = t; } buffer = []; current = null; /** * @inheritDoc */ commonAction(e) { return this.commit(), this.current = { type: "common", name: e }, this; } /** * @inheritDoc */ customAction(e) { return this.commit(), this.current = { type: "custom", name: e }, this; } /** * @inheritDoc */ args(e) { if (!this.current) throw new Error("Call default or custom before args"); return this.current.args = e, this; } /** * @inheritDoc */ prop = (e, t) => this.finalize().prop(e, t); /** * @inheritDoc */ localizedProp = (e, t, n) => this.finalize().localizedProp(e, t, n); /** * @inheritDoc */ computedProp = (e, t) => this.finalize().computedProp(e, t); /** * @inheritDoc */ validation = (e) => this.finalize().validation(e); /** * @inheritDoc */ event = (e) => this.finalize().event(e); /** * @inheritDoc */ component = (e, t) => this.finalize().component(e, t); /** * @inheritDoc */ json = () => this.finalize().json(); /** * @inheritDoc */ style = (e, t) => this.finalize().style(e, t); /** * @inheritDoc */ children = (e) => this.finalize().children(e); finalize() { this.commit(), this.parent.events = {}; for (const e of this.buffer) this.parent.addEvent(this.eventName, e); return this.parent; } commit() { this.current && (this.buffer.push(this.current), this.current = null); } } class Ke { constructor(e, t) { this.parent = e, this.key = t; } /** * @inheritDoc */ args(e) { return this.finalize(e), this.parent; } /** * @inheritDoc */ prop = (e, t) => this.finalize().prop(e, t); /** * @inheritDoc */ localizedProp = (e, t, n) => this.finalize().localizedProp(e, t, n); /** * @inheritDoc */ computedProp = (e, t) => this.finalize().computedProp(e, t); /** * @inheritDoc */ validation = (e) => this.finalize().validation(e); /** * @inheritDoc */ event = (e) => this.finalize().event(e); /** * @inheritDoc */ component = (e, t) => this.finalize().component(e, t); /** * @inheritDoc */ json = () => this.finalize().json(); /** * @inheritDoc */ style = (e, t) => this.finalize().style(e, t); /** * @inheritDoc */ children = (e) => this.finalize().children(e); finalize(e) { return this.parent.addValidation(this.key, e), this.parent; } } class He { constructor(e, t, n) { this.parent = e, this.key = t, this.type = n; } props = {}; validations = []; events = {}; css = {}; childComponents = []; /** * @inheritDoc */ prop(e, t) { return this.props[e] = { value: t }, this; } /** * @inheritDoc */ localizedProp(e, t, n) { const r = this.props[e]; return B(r) ? r.values[t] = n : this.props[e] = { localized: !0, values: { [t]: n } }, this; } /** * @inheritDoc */ computedProp(e, t) { return this.props[e] = { fnSource: t }, this; } /** * @inheritDoc */ validation(e) { return new Ke(this, e); } /** * @inheritDoc */ event(e) { return new Je(this, e); } buildComponent() { const e = { key: this.key, type: this.type, props: this.props }; return this.validations.length && (e.schema = { validations: this.validations }), Object.keys(this.events).length && (e.events = this.events), Object.keys(this.css).length && (e.css = this.css), this.childComponents.length && (e.children = this.childComponents), e; } addEvent(e, t) { this.events[e] || (this.events[e] = []), this.events[e].push(t); } addValidation(e, t) { this.validations.push({ key: e, args: t }); } /** * @inheritDoc */ style(e, t) { const n = this.css[t ?? "any"] ??= {}; return typeof e == "object" ? (n.object = { ...n.object, ...e }, this) : (n.string = e, this); } /** * @inheritDoc */ children(e) { const t = new L(), n = e(t); return $e(n) && n.finalize(), this.childComponents = [ ...this.childComponents, ...t.build().form.children ?? [] ], this; } /** * @inheritDoc */ json = () => this.parent.json(); /** * @inheritDoc */ component = (e, t) => this.parent.component(e, t); } class L { constructor(e) { this.options = e; } components = []; current = null; /** * @inheritDoc */ component(e, t) { return this.current && this.components.push(this.current.buildComponent()), this.current = new He(this, e, t), this.current; } /** * @inheritDoc */ json() { const e = this.build(), t = JSON.parse(JSON.stringify(e)), n = {}; return this.toComponentProperties(t.form, n), Object.keys(n).length > 0 && (t.localization = n, t.languages = this.toLanguages(n)), JSON.stringify(t); } build() { this.current && (this.components.push(this.current.buildComponent()), this.current = null); const e = { ...this.options, form: { key: "Screen", type: "Screen" } }; return this.components.length && (e.form.children = this.components), e; } toLanguages(e) { return Object.keys(e).map((t) => { const [n, r] = t.split("-"); return { code: n, dialect: r ?? n }; }); } toComponentProperties(e, t) { const n = e.props ?? {}; Object.entries(n).forEach(([s, a]) => { if (qe(a)) { n[s] = { computeType: "function", fnSource: a.fnSource }; return; } B(a) && (n[s] = { computeType: "localization" }, Object.entries(a.values).forEach(([m, u]) => { const p = m; t[p] ??= {}, t[p][e.key] ??= {}, t[p][e.key].component ??= {}, t[p][e.key].component[s] = u; })); }), (e.children ?? []).forEach((s) => { this.toComponentProperties(s, t); }); } } function Nt(o) { return new L(o); } const Ge = (o) => o.trim() === "", Ot = (o, e) => { const t = Ee(); return Se(() => t === "viewer" ? o : typeof o == "string" && Ge(o) ? e : o ?? e, [e, t, o]); }, Qe = { EmbeddedForm: { description: "نموذج مضمن في نموذج آخر", name: "شكل مضمن", props: { disabled: { description: "إذا كان هذا صحيحا ، يتم تعطيل النموذج المضمن", name: "معاق" }, formName: { description: "اسم النموذج", name: "اسم النموذج" }, options: { description: "الخيارات الإضافية لتحميل النموذج المضمن", name: "الخيارات" }, readOnly: { description: "إذا كان هذا صحيحا ، فإن النموذج المضمن للقراءة فقط", name: "للقراءة فقط" }, storeDataInParentForm: { description: "إذا كاذبة ، تظهر بيانات النموذج المتداخلة ككائن متداخل ، صحيح خلاف ذلك", name: "تخزين البيانات في شكل الأصل" } } }, Repeater: { description: "مكون المكرر هو مكون خاص مسؤول عن عرض مجموعة من المكونات المتكررة", name: "مكرر", props: { itemRenderWhen: { description: "التعبير أو الوظيفة لتقديم عنصر مكرر بشكل مشروط", name: "البند تقديم عندما" } } } }, Xe = { components: Qe }, Ye = { EmbeddedForm: { description: "Ein Formular, das in ein anderes Formular eingebettet ist", name: "Eingebettetes Formular", props: { disabled: { description: "Wenn true, ist das eingebettete Formular deaktiviert", name: "Behinderte" }, formName: { description: "Der Name des Formulars", name: "Name des Formulars" }, options: { description: "Die zusätzlichen Optionen zum Laden des eingebetteten Formulars", name: "Option" }, readOnly: { description: "Wenn true, ist das eingebettete Formular schreibgeschützt", name: "Schreibgesch" }, storeDataInParentForm: { description: "Wenn false, werden verschachtelte Formulardaten als verschachteltes Objekt angezeigt, andernfalls true", name: "Daten im übergeordneten Formular speichern" } } }, Repeater: { description: "Die Repeater-Komponente ist eine spezielle Komponente, die für die Anzeige eines Arrays sich wiederholender Komponenten verantwortlich ist", name: "Verstärker", props: { itemRenderWhen: { description: "Der Ausdruck oder die Funktion zum bedingten Rendern eines Wiederholungselements", name: "Objekt rendern wann" } } } }, Ze = { components: Ye }, _e = { EmbeddedForm: { name: "Embedded form", description: "A form embedded in another form", props: { storeDataInParentForm: { name: "Store data in parent form", description: "If false, nested form data show as nested object, true otherwise" }, formName: { name: "Form name", description: "The form name" }, options: { name: "Options", description: "The additional options for loading the embedded form" }, disabled: { name: "Disabled", description: "If true, the embedded form is disabled" }, readOnly: { name: "Read only", description: "If true, the embedded form is read-only" } } }, Repeater: { name: "Repeater", description: "The Repeater component is a special component that is responsible for displaying an array of repeating components", props: { itemRenderWhen: { name: "Item render when", description: "The expression or function to conditionally render a repeater item" } } } }, et = { components: _e }, tt = { EmbeddedForm: { description: "Un formulario incrustado en otro formulario", name: "Formulario incrustado", props: { disabled: { description: "Si es verdadero, el formulario incrustado está deshabilitado", name: "Discapacitados" }, formName: { description: "El nombre del formulario", name: "Nombre del formulario" }, options: { description: "Las opciones adicionales para cargar el formulario incrustado", name: "Opciones" }, readOnly: { description: "Si es true, el formulario incrustado es de solo lectura", name: "Solo lectura" }, storeDataInParentForm: { description: "Si es falso, los datos del formulario anidado se muestran como objeto anidado, verdadero de lo contrario", name: "Almacenar datos en forma principal" } } }, Repeater: { description: "El componente Repetidor es un componente especial que se encarga de mostrar una matriz de componentes repetidos", name: "Repetidor", props: { itemRenderWhen: { description: "La expresión o función para representar condicionalmente un elemento repetidor", name: "Elemento renderizado cuando" } } } }, nt = { components: tt }, ot = { EmbeddedForm: { description: "فرم تعبیه شده در فرم دیگر", name: "فرم تعبیه شده", props: { disabled: { description: "اگر درست باشد ، فرم جاسازی شده غیرفعال است", name: "معلول" }, formName: { description: "نام فرم", name: "نام فرم" }, options: { description: "گزینه های اضافی برای بارگذاری فرم جاسازی شده", name: "گزینه ها" }, readOnly: { description: "اگر درست باشد ، فرم جاسازی شده فقط برای خواندن است", name: "فقط بخوانید" }, storeDataInParentForm: { description: "اگر نادرست باشد ، داده های فرم آشیانه ای به عنوان شی آشیانه ای نشان داده می شوند ، در غیر این صورت درست است", name: "ذخیره اطلاعات در فرم والدین" } } }, Repeater: { description: "م Componentلفه تکرار کننده یک م componentلفه خاص است که وظیفه نمایش آرایه ای از اجزای تکرار را بر عهده دارد", name: "تکرار کننده", props: { itemRenderWhen: { description: "عبارت یا تابع برای ارائه مشروط یک آیتم تکرار کننده", name: "رندر آیتم زمانی که" } } } }, rt = { components: ot }, st = { EmbeddedForm: { description: "Un formulaire incorporé dans un autre formulaire", name: "Formulaire intégré", props: { disabled: { description: "Si vrai, le formulaire incorporé est désactivé", name: "Désactivé" }, formName: { description: "Le nom du formulaire", name: "Nom du formulaire" }, options: { description: "Les options supplémentaires pour charger le formulaire intégré", name: "Options Disponibles" }, readOnly: { description: "Si vrai, le formulaire incorporé est en lecture seule", name: "Lecture seule" }, storeDataInParentForm: { description: "Si false, les données de formulaire imbriquées s'affichent en tant qu'objet imbriqué, true sinon", name: "Stocker les données dans le formulaire parent" } } }, Repeater: { description: "Le composant Répéteur est un composant spécial chargé d'afficher un tableau de composants répétitifs", name: "Répéteur", props: { itemRenderWhen: { description: "L'expression ou la fonction pour rendre conditionnellement un élément répétiteur", name: "Rendu de l'élément quand" } } } }, at = { components: st }, it = { EmbeddedForm: { description: "एक रूप दूसरे रूप में एम्बेडेड", name: "एंबेडेड फॉर्म", props: { disabled: { description: "यदि सही है, तो एम्बेडेड फॉर्म अक्षम है", name: "विकलांग" }, formName: { description: "फॉर्म का नाम", name: "फार्म का नाम" }, options: { description: "एम्बेडेड फॉर्म लोड करने के लिए अतिरिक्त विकल्प", name: "विकल्प" }, readOnly: { description: "यदि सही है, तो एम्बेडेड फॉर्म केवल पढ़ने के लिए है", name: "केवल पढ़ें" }, storeDataInParentForm: { description: "यदि गलत, नेस्टेड फॉर्म डेटा नेस्टेड ऑब्जेक्ट के रूप में दिखाता है, तो अन्यथा सही है", name: "मूल रूप में डेटा स्टोर करें" } } }, Repeater: { description: "पुनरावर्तक घटक एक विशेष घटक है जो दोहराए जाने वाले घटकों की एक सरणी प्रदर्शित करने के लिए जिम्मेदार है", name: "पुनरावर्तक", props: { itemRenderWhen: { description: "एक पुनरावर्तक आइटम को सशर्त रूप से प्रस्तुत करने के लिए अभिव्यक्ति या कार्य", name: "आइटम प्रस्तुत करना जब" } } } }, dt = { components: it }, pt = { EmbeddedForm: { description: "Una forma incorporata in un'altra forma", name: "Modulo incorporato", props: { disabled: { description: "Se true, il modulo incorporato è disabilitato", name: "Disabilita" }, formName: { description: "Il nome del modulo", name: "Nome modulo" }, options: { description: "Le opzioni aggiuntive per il caricamento del modulo incorporato", name: "Opzioni" }, readOnly: { description: "Se true, il modulo incorporato è di sola lettura", name: "Sola lettura" }, storeDataInParentForm: { description: "Se false, i dati del modulo nidificati vengono visualizzati come oggetto nidificato, true altrimenti", name: "Memorizzare i dati in forma padre" } } }, Repeater: { description: "Il componente Repeater è un componente speciale che è responsabile della visualizzazione di una serie di componenti ripetuti", name: "Ripetitore", props: { itemRenderWhen: { description: "L'espressione o la funzione per il rendering condizionale di un elemento ripetitore", name: "Elemento render quando" } } } }, lt = { components: pt }, ct = { EmbeddedForm: { description: "別のフォームに埋め込まれたフォーム", name: "埋め込みフォーム", props: { disabled: { description: "Trueの場合、埋め込みフォームは無効になります", name: "無効" }, formName: { description: "フォーム名", name: "フォーム名" }, options: { description: "埋め込みフォームを読み込むための追加オプション", name: "オプション" }, readOnly: { description: "Trueの場合、埋め込みフォームは読み取り専用です", name: "読み取り専用" }, storeDataInParentForm: { description: "Falseの場合はネストされたフォームデータがネストされたオブジェクトとして表示され、そうでない場合はtrue", name: "親フォームにデータを保存する" } } }, Repeater: { description: "Repeaterコンポーネントは、繰り返しコンポーネントの配列を表示するための特別なコンポーネントです", name: "リピータ", props: { itemRenderWhen: { description: "リピータアイテムを条件付きでレンダリングする式または関数", name: "アイテムレンダリング時" } } } }, mt = { components: ct }, ut = { EmbeddedForm: { description: "다른 양식에 포함된 양식", name: "임베디드 양식", props: { disabled: { description: "참인 경우 포함된 양식을 사용할 수 없습니다", name: "사용 안 함" }, formName: { description: "양식 이름", name: "양식 이름" }, options: { description: "포함된 양식을 로드하기 위한 추가 옵션", name: "옵션" }, readOnly: { description: "참인 경우 포함된 양식은 읽기 전용입니다", name: "읽기 전용" }, storeDataInParentForm: { description: "거짓이면 중첩 된 양식 데이터가 중첩 된 개체로 표시되고 그렇지 않으면 참입니다", name: "부모 형태로 데이터 저장" } } }, Repeater: { description: "리피터 구성 요소는 반복 구성 요소의 배열을 표시하는 특수 구성 요소입니다", name: "리피터", props: { itemRenderWhen: { description: "중계기 항목을 조건부로 렌더링하는 식 또는 함수", name: "항목 렌더링 때" } } } }, ht = { components: ut }, ft = { EmbeddedForm: { description: "Образац угнежђен у другом облику", name: "Уграђени образац", props: { disabled: { description: "Ако је вредност Труе, Уграђени образац је онемогућен", name: "Неспособан за рад" }, formName: { description: "Име обрасца", name: "Назив обрасца" }, options: { description: "Додатне опције за преузимање уграђеног обрасца", name: "Опције" }, readOnly: { description: "Ако је вредност Труе, Уграђени образац је само за читање", name: "Само за читање" }, storeDataInParentForm: { description: "Ако је Фалсе, подаци угнежђеног обрасца приказују се као угнежђени објекат, у супротном Труе", name: "Чувајте податке у родитељском обрасцу" } } }, Repeater: { description: "Компонента Репеатер је посебна компонента која је одговорна за приказивање низа поновљених компоненти", name: "Репетитор", props: { itemRenderWhen: { description: "Израз или функција за условни приказ релејног елемента", name: "Визуализација елемента при" } } } }, bt = { components: ft }, yt = { EmbeddedForm: { description: "嵌入另一种形式的形式", name: "嵌入式表格", props: { disabled: { description: "如果为true,则禁用嵌入表单", name: "残疾人士" }, formName: { description: "表格名称", name: "表格名称" }, options: { description: "加载嵌入表单的其他选项", name: "选项" }, readOnly: { description: "如果为true,则嵌入表单为只读", name: "只读" }, storeDataInParentForm: { description: "如果为false,则嵌套表单数据显示为嵌套对象,否则为true", name: "以父窗体存储数据" } } }, Repeater: { description: "Repeater组件是一个特殊的组件,负责显示重复组件的数组", name: "中继器", props: { itemRenderWhen: { description: "有条件地呈现repeater项的表达式或函数", name: "项目呈现时" } } } }, gt = { components: yt }, It = { "ar-EG": Xe, "de-DE": Ze, "en-US": et, "es-ES": nt, "fa-IR": rt, "fr-FR": at, "hi-IN": dt, "it-IT": lt, "ja-JP": mt, "ko-KR": ht, "sr-RS": bt, "zh-CN": gt }; export { jt as ActionDefinition, Bt as ActionEventArgs, Lt as ActionEventArgsDeclaration, Wt as Annotation, Vt as AnnotationBuilder, xt as ArrayBuilder, Ut as AsyncFunction, qt as BaseBuilder, $t as BiDi, Jt as BuilderModeProvider, Kt as BuilderOptions, Tt as BuilderThemeProvider, j as BuilderView, Ht as CalculableResult, Gt as CellInfoContextProvider, Qt as ComponentData, Xt as ComponentDataEvents, Yt as ComponentDataProvider, Zt as ComponentKeyChangedEventArgs, _t as ComponentState, H as ComponentStore, en as ComponentTree, tn as ContainerAnnotation, nn as DataValidator, on as DefaultWrapper, q as DidMountEvent, rn as EventAnnotation, sn as FluentLocalizationEngine, an as Form, dn as FormViewer, pn as FormViewerLite, ln as FormViewerPropsStore, Et as IFormDataDeclaration, cn as KeySymbol, mn as Language, un as LocalizationStore, d as Meta, ae as Model, hn as ModuleAnnotation, fn as NodeAnnotationBuilder, bn as NoopLocalizationEngine, yn as OneOfBuilder, gn as PersistedFormVersion, vn as PropertyAnnotation, Cn as QuantifierBuilder, Fn as SomeOfBuilder, ue as Store, Dn as StoreContext, Pn as StoreProvider, En as StyleAnnotation, Sn as SuppressResizeObserverErrors, wn as SyncEvent, Rn as TemplateField, zn as TypedBuilder, ge as View, An as ViewerPropsProvider, $ as WillUnmountEvent, Tn as array, z as boolean, Nt as buildForm, Nn as calculatePropertyValue, On as camelCase, K as cfComponentIsPreset, se as cfDisableActionEditors, In as cfDisableAdditionalProperties, Y as cfDisableComponentRemove, kn as cfDisableMainComponentProperties, Mn as cfDisableStyleProperties, Z as cfDisableStyles, ee as cfDisableStylesForClassNameEditor, oe as cfDisableTooltipProperties, _ as cfDisableWrapperStyles, te as cfEnableInlineStylesEditor, X as cfHideFromComponentPalette, jn as checkSlotCondition, Bn as className, Ln as cloneDeep, Wn as color, de as commonStyles, Vn as containerStyles, It as coreComponentsDescriptions, xn as createActionValuesFromObject, ce as createAnnotation, Pe as createNonNullableContext, Un as createProperty, qn as createView, $n as cssSize, Jn as date, Kn as debounce, Dt as define, Pt as definePreset, C as disabled, We as embeddedFormMeta, k as embeddedFormModel, Hn as emotionCache, Gn as emptyComponentStore, M as errorMessageModel, D as event, Qn as findLanguage, Xn as findTreeElementDepth, Yn as fn, Zn as forwardRef, J as generateTemplateTypeName, _n as generateUniqueName, eo as getChildren, ie as getDefault, E as getDefaultCss, to as getEditableFormData, Ft as getKey, no as getTemplateName, oo as getValidatorPropertyBlockType, ro as globalDefaultLanguage, so as groupBy, x as htmlAttributes, T as internalErrorModel, ao as isContainer, io as isEmpty, po as isEqual, lo as isEqualWith, co as isFunctionalProperty, mo as isLocalizedProperty, uo as isNull, ho as isNumber, Ce as isObject, fo as isPromise, bo as isProperty, yo as isString, me as isTemplateType, go as isUndefined, vo as isUniqueKey, Co as isValidatorPropertyBlockType, Fo as key, Rt as loadResource, Do as merge, Po as nameAutorun, Eo as nameObservable, So as namedObserver, wo as needRender, pe as node, Ro as nodeArray, zo as number, R as object, Ao as oneOf, v as readOnly, V as renderWhen, N as screenModel, To as size, w as slotModel, No as someOf, Oo as startCase, F as string, Io as stringNode, ko as time, Mo as timeFormat, l as toArray, St as toLabeledValues, jo as toUpper, W as tooltipProps, Bo as tooltipType, Lo as treeForEach, Wo as uniqueId, zt as unloadResource, Fe as upperFirst, Vo as useAriaAttributes, xo as useAriaAttributesIds, Uo as useAriaErrorMessage, qo as useAriaInvalid, $o as useBuilderComponent, Ee as useBuilderMode, At as useBuilderTheme, Ot as useBuilderValue, De as useComponentData, Jo as useDisposable, wt as useErrorMessage, Ko as useErrorModel, Ho as useMobxConfig, Go as useModalComponentData, Qo as useModalType, Xo as useStore, Yo as useTooltipType, Zo as useViewerProps, U as validation }; //# sourceMappingURL=index.js.map