finform-react-builder 1.6.0 → 1.6.2

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.
@@ -32,6 +32,7 @@ export interface BaseField {
32
32
  placeholder?: string;
33
33
  required?: boolean;
34
34
  disabled?: boolean;
35
+ copyWhenDisabled?: boolean;
35
36
  helperText?: string;
36
37
  validation?: ValidationRule;
37
38
  step?: number;
package/dist/index.es.js CHANGED
@@ -9149,7 +9149,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
9149
9149
  }
9150
9150
  ),
9151
9151
  /* @__PURE__ */ me(ge, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
9152
- /* @__PURE__ */ E(ge, { sx: { width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "6px", background: "#FFFFFF", overflow: "hidden", ...k.thumbnailSx }, children: /* @__PURE__ */ E("img", { src: L, alt: e.alt || e.label, style: { maxWidth: "100%", maxHeight: "100%" } }) }),
9152
+ /* @__PURE__ */ E(ge, { sx: { width: "30%", height: "10%", display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "6px", background: "#FFFFFF", overflow: "hidden", ...k.thumbnailSx }, children: /* @__PURE__ */ E("img", { src: L, alt: e.alt || e.label, style: { maxWidth: "100%", maxHeight: "100%" } }) }),
9153
9153
  /* @__PURE__ */ me(ge, { sx: { flexGrow: 1 }, children: [
9154
9154
  /* @__PURE__ */ E(Fe, { sx: { fontSize: "12px", fontWeight: 500, ...k.fileNameSx }, children: typeof L == "string" ? L.split("/").pop() : "Selected image" }),
9155
9155
  /* @__PURE__ */ E(Fe, { sx: { fontSize: "10px", ...k.fileMetaSx }, children: "Image selected" })
@@ -9169,8 +9169,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
9169
9169
  /* @__PURE__ */ E(
9170
9170
  rt,
9171
9171
  {
9172
- type: "button",
9173
- variant: "contained",
9172
+ variant: "outlined",
9174
9173
  color: "error",
9175
9174
  onClick: Ke,
9176
9175
  sx: { ...k.removeButtonSx },
@@ -9181,9 +9180,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
9181
9180
  We && /* @__PURE__ */ E(
9182
9181
  rt,
9183
9182
  {
9184
- type: "button",
9185
9183
  variant: "contained",
9186
- color: "success",
9187
9184
  onClick: it,
9188
9185
  sx: { ...k.saveButtonSx },
9189
9186
  children: Ce
@@ -9283,7 +9280,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
9283
9280
  default:
9284
9281
  return null;
9285
9282
  }
9286
- }, z = Ne(() => e.disabled ? !["title", "section", "image", "component"].includes(e.type) : !1, [e.disabled, e.type]), N = Ve(async () => {
9283
+ }, z = Ne(() => !e.disabled || e.copyWhenDisabled === !1 ? !1 : !["title", "section", "image", "component"].includes(e.type), [e.disabled, e.copyWhenDisabled, e.type]), N = Ve(async () => {
9287
9284
  try {
9288
9285
  const W = a ? a[e.name] : void 0;
9289
9286
  let ie = "";