@duke333/builder-ui 0.2.4 → 0.2.5

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.
@@ -1,5 +1,5 @@
1
1
  import { BuilderApiContracts, BuilderApiClient, BuilderApiTransport } from '../api/index.js';
2
- import { Q as createBuilderAdminPages, b as BuilderAdminPagesOptions, a as BuilderAdminPageContracts } from '../BuilderAdminPages-DwwdA8Dv.js';
2
+ import { Q as createBuilderAdminPages, b as BuilderAdminPagesOptions, a as BuilderAdminPageContracts } from '../BuilderAdminPages-bV-lwDOp.js';
3
3
  import { BuilderHooks } from '../hooks/index.js';
4
4
  import 'react';
5
5
  import 'react-hook-form';
@@ -259,6 +259,7 @@ function builderFormEditorValuesFromEntity(form, emptyValues) {
259
259
  sourceTable: source?.type === "dbTable" ? source.tableName : BUILDER_EDITOR_NONE_VALUE,
260
260
  apiBasePath: source?.type === "apiEndpoint" ? source.basePath : "",
261
261
  fields,
262
+ layoutPresentation: form.schema.layout?.presentation ?? "stacked",
262
263
  layoutGroups: normalizeBuilderFormEditorLayoutGroups(
263
264
  form.schema.layout?.groups,
264
265
  fields,
@@ -378,6 +379,7 @@ function builderFormEditorInputFromValues(values) {
378
379
  }))
379
380
  })),
380
381
  layout: {
382
+ presentation: values.layoutPresentation,
381
383
  groups: normalizeBuilderFormEditorLayoutGroups(
382
384
  values.layoutGroups,
383
385
  values.fields,
@@ -771,6 +773,13 @@ function createBuilderDefaultFormEditorBody(options) {
771
773
  }
772
774
  )
773
775
  ] }),
776
+ /* @__PURE__ */ jsx("div", { style: styles.grid, children: /* @__PURE__ */ jsxs("label", { style: styles.field, children: [
777
+ /* @__PURE__ */ jsx("span", { style: styles.label, children: "Group presentation" }),
778
+ /* @__PURE__ */ jsxs("select", { style: styles.input, ...form.register("layoutPresentation"), children: [
779
+ /* @__PURE__ */ jsx("option", { value: "stacked", children: "Stacked sections" }),
780
+ /* @__PURE__ */ jsx("option", { value: "tabs", children: "Tabs" })
781
+ ] })
782
+ ] }) }),
774
783
  form.watch("layoutGroups").map((group, groupIndex) => /* @__PURE__ */ jsxs("div", { style: styles.row, children: [
775
784
  /* @__PURE__ */ jsxs("label", { style: styles.field, children: [
776
785
  /* @__PURE__ */ jsx("span", { style: styles.label, children: "Group title" }),
@@ -1828,6 +1837,7 @@ function createBuilderAdminPages({
1828
1837
  sourceTable: BUILDER_EDITOR_NONE_VALUE,
1829
1838
  apiBasePath: "",
1830
1839
  fields: [emptyField],
1840
+ layoutPresentation: "stacked",
1831
1841
  layoutGroups: builderFormEditorDefaultLayoutGroups([emptyField]),
1832
1842
  subforms: [],
1833
1843
  triggers: [],