@fonderie/react-admin-screens 1.6.1 → 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.
package/dist/index.cjs CHANGED
@@ -2766,6 +2766,7 @@ function AdminShell({
2766
2766
  locale,
2767
2767
  ...editing.type ? { type: editing.type } : {},
2768
2768
  ...editing.locales ? { locales: editing.locales } : {},
2769
+ ...editing.defaultLocale ? { defaultLocale: editing.defaultLocale } : {},
2769
2770
  onCreated: (c) => setEditing({ kind: "template", type: c.type, locale: c.locale, system: false })
2770
2771
  }
2771
2772
  )
@@ -2783,7 +2784,12 @@ function AdminShell({
2783
2784
  system: editing.system,
2784
2785
  onSaved: () => setEditing(null),
2785
2786
  onDeleted: () => setEditing(null),
2786
- onAddLocale: (type, c) => setEditing({ kind: "template-new", type, locales: c.locales }),
2787
+ onAddLocale: (type, c) => setEditing({
2788
+ kind: "template-new",
2789
+ type,
2790
+ locales: c.locales,
2791
+ ...c.defaultLocale ? { defaultLocale: c.defaultLocale } : {}
2792
+ }),
2787
2793
  onSelectLocale: (tpl) => setEditing({
2788
2794
  kind: "template",
2789
2795
  type: tpl.type,
@@ -2799,12 +2805,7 @@ function AdminShell({
2799
2805
  {
2800
2806
  client: courierClient,
2801
2807
  locale,
2802
- onSelectTemplate: (tpl) => setEditing({
2803
- kind: "template",
2804
- type: tpl.type,
2805
- locale: tpl.locale ?? null,
2806
- system: tpl.system === true
2807
- }),
2808
+ onSelectTemplate: (tpl) => setEditing({ kind: "template", type: tpl.type, locale: tpl.locale, system: tpl.system }),
2808
2809
  onCreateTemplate: (c) => setEditing({ kind: "template-new", locales: c.locales })
2809
2810
  }
2810
2811
  );