add checkbox list

This commit is contained in:
Mads Rasmussen
2023-01-09 16:37:06 +01:00
parent 60dd7ee915
commit a3a4d21947
6 changed files with 54 additions and 13 deletions

View File

@@ -0,0 +1,8 @@
import type { ManifestPropertyEditorModel } from '@umbraco-cms/models';
export const manifest: ManifestPropertyEditorModel = {
type: 'propertyEditorModel',
name: 'Checkbox List',
alias: 'Umbraco.CheckboxList',
meta: {},
};

View File

@@ -0,0 +1,24 @@
import type { ManifestPropertyEditorUI } from '@umbraco-cms/models';
export const manifest: ManifestPropertyEditorUI = {
type: 'propertyEditorUI',
alias: 'Umb.PropertyEditorUI.CheckboxList',
name: 'Checkbox List Property Editor UI',
loader: () => import('./property-editor-ui-checkbox-list.element'),
meta: {
label: 'Checkbox List',
propertyEditorModel: 'Umbraco.CheckboxList',
icon: 'umb:bulleted-list',
group: 'lists',
config: {
properties: [
{
alias: 'options',
label: 'Add option',
description: 'Add, remove or sort options for the list.',
propertyEditorUI: 'Umb.PropertyEditorUI.MultipleTextString',
},
],
},
},
};

View File

@@ -15,6 +15,7 @@ import { manifest as toggle } from './toggle/manifests';
import { manifest as tags } from './tags/manifests';
import { manifest as markdownEditor } from './markdown-editor/manifests';
import { manifest as radioButtonList } from './radio-button-list/manifests';
import { manifest as checkboxList } from './checkbox-list/manifests';
import type { ManifestPropertyEditorUI } from '@umbraco-cms/models';
@@ -36,6 +37,7 @@ export const manifests: Array<ManifestPropertyEditorUI> = [
tags,
markdownEditor,
radioButtonList,
checkboxList,
{
type: 'propertyEditorUI',
alias: 'Umb.PropertyEditorUI.BlockList',
@@ -48,18 +50,6 @@ export const manifests: Array<ManifestPropertyEditorUI> = [
propertyEditorModel: 'Umbraco.BlockList',
},
},
{
type: 'propertyEditorUI',
alias: 'Umb.PropertyEditorUI.CheckboxList',
name: 'Checkbox List Property Editor UI',
loader: () => import('./checkbox-list/property-editor-ui-checkbox-list.element'),
meta: {
label: 'Checkbox List',
icon: 'umb:bulleted-list',
group: 'lists',
propertyEditorModel: 'Umbraco.CheckBoxList',
},
},
{
type: 'propertyEditorUI',
alias: 'Umb.PropertyEditorUI.Number',

View File

@@ -3,7 +3,7 @@ import type { ManifestPropertyEditorUI } from '@umbraco-cms/models';
export const manifest: ManifestPropertyEditorUI = {
type: 'propertyEditorUI',
alias: 'Umb.PropertyEditorUI.RadioButtonList',
name: 'RadioButtonList Property Editor UI',
name: 'Radio Button List Property Editor UI',
loader: () => import('./property-editor-ui-radio-button-list.element'),
meta: {
label: 'Radio Button List',

View File

@@ -278,6 +278,19 @@ export const data: Array<DataTypeDetails> = [
propertyEditorUIAlias: 'Umb.PropertyEditorUI.RadioButtonList',
data: [],
},
{
name: 'Checkbox List',
type: 'data-type',
icon: 'umb:autofill',
hasChildren: false,
key: 'dt-checkboxList',
isContainer: false,
parentKey: null,
isFolder: false,
propertyEditorModelAlias: 'Umbraco.CheckboxList',
propertyEditorUIAlias: 'Umb.PropertyEditorUI.CheckboxList',
data: [],
},
];
// Temp mocked database

View File

@@ -108,6 +108,12 @@ export const data: Array<DocumentDetails> = [
description: '',
dataTypeKey: 'dt-radioButtonList',
},
{
alias: 'checkboxList',
label: 'Checkbox List',
description: '',
dataTypeKey: 'dt-checkboxList',
},
],
data: [],
variants: [],