@fonderie/vue-admin-screens 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.
package/dist/index.cjs CHANGED
@@ -3026,6 +3026,7 @@ var AdminShell = (0, import_vue18.defineComponent)({
3026
3026
  ...loc,
3027
3027
  ...e.type ? { type: e.type } : {},
3028
3028
  ...e.locales ? { locales: e.locales } : {},
3029
+ ...e.defaultLocale ? { defaultLocale: e.defaultLocale } : {},
3029
3030
  onCreated: (c2) => editing.value = {
3030
3031
  kind: "template",
3031
3032
  type: c2.type,
@@ -3045,9 +3046,21 @@ var AdminShell = (0, import_vue18.defineComponent)({
3045
3046
  locale: e.locale,
3046
3047
  system: e.system,
3047
3048
  allowAddLocale: true,
3049
+ localeTabs: true,
3048
3050
  onSaved: () => editing.value = null,
3049
3051
  onDeleted: () => editing.value = null,
3050
- "onAdd-locale": (type) => editing.value = { kind: "template-new", type }
3052
+ "onAdd-locale": (type, c2) => editing.value = {
3053
+ kind: "template-new",
3054
+ type,
3055
+ locales: c2.locales,
3056
+ ...c2.defaultLocale ? { defaultLocale: c2.defaultLocale } : {}
3057
+ },
3058
+ "onSelect-locale": (tpl) => editing.value = {
3059
+ kind: "template",
3060
+ type: tpl.type,
3061
+ locale: tpl.locale,
3062
+ system: tpl.system === true
3063
+ }
3051
3064
  })
3052
3065
  ];
3053
3066
  return (0, import_vue18.h)(import_vue_courier_admin_screens.TemplateListScreen, {
@@ -3057,8 +3070,8 @@ var AdminShell = (0, import_vue18.defineComponent)({
3057
3070
  "onSelect-template": (t3) => editing.value = {
3058
3071
  kind: "template",
3059
3072
  type: t3.type,
3060
- locale: t3.locale ?? null,
3061
- system: t3.system === true
3073
+ locale: t3.locale,
3074
+ system: t3.system
3062
3075
  },
3063
3076
  "onCreate-template": (c2) => editing.value = { kind: "template-new", locales: c2.locales }
3064
3077
  });