add config

This commit is contained in:
Mads Rasmussen
2023-01-03 13:09:56 +01:00
parent 9dd0b47f1b
commit b4c326f6ed
2 changed files with 39 additions and 9 deletions

View File

@@ -4,5 +4,23 @@ export const manifest: ManifestPropertyEditorModel = {
type: 'propertyEditorModel',
name: 'Color Picker',
alias: 'Umbraco.ColorPicker',
meta: {},
meta: {
config: {
properties: [
{
alias: 'useLabel',
label: 'Include labels?',
description:
'Stores colors as a Json object containing both the color hex string and label, rather than just the hex string.',
propertyEditorUI: 'Umb.PropertyEditorUI.Toggle',
},
{
alias: 'colors',
label: 'Colors',
description: 'Add, remove or sort colors',
propertyEditorUI: 'Umb.PropertyEditorUI.ColorPicker',
},
],
},
},
};

View File

@@ -1,6 +1,18 @@
import type { ManifestPropertyEditorUI } from '@umbraco-cms/models';
export const manifests: Array<ManifestPropertyEditorUI> = [
{
type: 'propertyEditorUI',
alias: 'Umb.PropertyEditorUI.ColorPicker',
name: 'Color Picker Property Editor UI',
loader: () => import('./color-picker/property-editor-ui-color-picker.element'),
meta: {
label: 'Color Picker',
propertyEditorModel: 'Umbraco.ColorPicker',
icon: 'umb:colorpicker',
group: 'pickers',
},
},
{
type: 'propertyEditorUI',
alias: 'Umb.PropertyEditorUI.BlockList',
@@ -9,7 +21,7 @@ export const manifests: Array<ManifestPropertyEditorUI> = [
meta: {
label: 'Block List',
icon: 'umb:thumbnail-list',
group: 'Lists',
group: 'lists',
propertyEditorModel: 'Umbraco.BlockList',
},
},
@@ -21,7 +33,7 @@ export const manifests: Array<ManifestPropertyEditorUI> = [
meta: {
label: 'Toggle',
icon: 'umb:checkbox',
group: 'Common',
group: 'common',
propertyEditorModel: 'Umbraco.TrueFalse',
},
},
@@ -33,7 +45,7 @@ export const manifests: Array<ManifestPropertyEditorUI> = [
meta: {
label: 'Checkbox List',
icon: 'umb:bulleted-list',
group: 'Lists',
group: 'lists',
propertyEditorModel: 'Umbraco.CheckBoxList',
},
},
@@ -45,7 +57,7 @@ export const manifests: Array<ManifestPropertyEditorUI> = [
meta: {
label: 'Text',
icon: 'umb:edit',
group: 'Common',
group: 'common',
propertyEditorModel: 'Umbraco.TextBox',
},
},
@@ -57,7 +69,7 @@ export const manifests: Array<ManifestPropertyEditorUI> = [
meta: {
label: 'Textarea',
icon: 'umb:edit',
group: 'Common',
group: 'common',
propertyEditorModel: 'Umbraco.TextArea',
config: {
properties: [
@@ -79,7 +91,7 @@ export const manifests: Array<ManifestPropertyEditorUI> = [
meta: {
label: 'Number',
icon: 'umb:autofill',
group: 'Common',
group: 'common',
propertyEditorModel: 'Umbraco.Integer',
},
},
@@ -92,7 +104,7 @@ export const manifests: Array<ManifestPropertyEditorUI> = [
label: 'Content Picker',
propertyEditorModel: 'Umbraco.ContentPicker',
icon: 'umb:document',
group: 'Common',
group: 'common',
},
},
{
@@ -104,7 +116,7 @@ export const manifests: Array<ManifestPropertyEditorUI> = [
label: 'Icon Picker',
propertyEditorModel: 'Umbraco.IconPicker',
icon: 'umb:document',
group: 'Common',
group: 'common',
},
},
];