diff --git a/zero.Backoffice.UI/app/editor/fields/editor-field-extensions.d.ts b/zero.Backoffice.UI/app/editor/fields/editor-field-extensions.d.ts
index cf48efdc..8765e62f 100644
--- a/zero.Backoffice.UI/app/editor/fields/editor-field-extensions.d.ts
+++ b/zero.Backoffice.UI/app/editor/fields/editor-field-extensions.d.ts
@@ -150,4 +150,9 @@ declare module 'zero/schemas'
template?: any;
addLabel?: string;
}
+
+ export interface PickerFieldOptions
+ {
+ limit?: number;
+ }
}
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/countries/editor-countrypicker.vue b/zero.Backoffice.UI/app/modules/countries/editor-countrypicker.vue
new file mode 100644
index 00000000..607dc596
--- /dev/null
+++ b/zero.Backoffice.UI/app/modules/countries/editor-countrypicker.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/countries/plugin.ts b/zero.Backoffice.UI/app/modules/countries/plugin.ts
index a253ce50..f40de37b 100644
--- a/zero.Backoffice.UI/app/modules/countries/plugin.ts
+++ b/zero.Backoffice.UI/app/modules/countries/plugin.ts
@@ -8,10 +8,25 @@ export default {
{
app.vue.component('ui-countrypicker', defineAsyncComponent(() => import('./ui-countrypicker.vue')));
+ app.fieldType('countryPicker', defineAsyncComponent(() => import('./editor-countrypicker.vue')));
+
app.route({ name: 'countries', path: '/settings/countries', component: () => import('./countries.vue') });
app.route({ name: 'countries-edit', path: '/settings/countries/edit/:id?', component: () => import('./country.vue'), props: true });
app.schema('countries', () => import('./schemas/list'));
app.schema('countries:edit', () => import('./schemas/editor'));
}
-} as ZeroPlugin;
\ No newline at end of file
+} as ZeroPlugin;
+
+
+declare module 'zero/schemas'
+{
+ export interface ZeroEditorField
+ {
+ /**
+ * Renders a country picker
+ * @param {PickerFieldOptions} [options] - Custom options
+ */
+ countryPicker(options?: PickerFieldOptions): ZeroEditorField;
+ }
+}
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/countries/ui-countrypicker.vue b/zero.Backoffice.UI/app/modules/countries/ui-countrypicker.vue
index 34356f88..b039b36b 100644
--- a/zero.Backoffice.UI/app/modules/countries/ui-countrypicker.vue
+++ b/zero.Backoffice.UI/app/modules/countries/ui-countrypicker.vue
@@ -1,19 +1,19 @@
- country picker
-
+
\ No newline at end of file