Skip to main content

CnRegisterMapping

OpenRegister register/schema configuration panel. Lets admin users map app object types to OpenRegister registers and schemas. Groups related object types together, shows a register dropdown (with auto-schema-matching), and a save/reimport action area.

Wraps: NcSelect, NcNoteCard, NcButton, NcLoadingIcon (via CnSettingsSection)

Try it​

Loading CnRegisterMapping playground…

CnRegisterMapping showing register and schema dropdowns for each entity type

Props​

PropTypeDefaultDescription
groupsArray(required)Groups of object types that share a register. Each group: { name, description?, registerConfigKey?, types: [{ slug, label, description?, configKey? }] }
nameString'Register configuration'Section title
descriptionString'Configure OpenRegister schema mappings for your object types'Section description
docUrlString''Documentation URL — shows an info icon next to the title
configurationObject{}Current configuration values keyed by config key: { register: '5', client_schema: '28', ... }
showSaveButtonBooleantrueWhether to show the Save button
savingBooleanfalseWhether a save is in progress
showReimportButtonBooleanfalseWhether to show the Re-import button
reimportingBooleanfalseWhether a reimport is in progress
saveButtonTextString'Save configuration'Save button label
reimportButtonTextString'Re-import configuration'Re-import button label
collapseGroupsBooleannullEach group is a heading button that opens and closes it, with its configured count shown while closed; the groups start closed. null does this when there is more than one group; true or false forces it.
lookString''board or nextcloud; empty follows the provided cnLook. The board look draws one open group as a type/schema table and the others as rows with a status chip, and saves at the end of the section
boardRowLimitNumber4Board look: how many types the open group lists before the "show all" line; 0 lists every type
boardLayoutString'table'Board look: table draws the open group's type and schema table with the other groups as rows (PqBeheer); selects draws, per group, the register select and a schema select per type in a grid of three, one column on a narrow screen (DqBeheerinstellingen)
autoMatchBooleantrueWhen a register is selected, automatically match schema titles to object type slugs
labelsObject{ register, schema, configured, notConfigured, noSchemas, selectRegister, selectSchema, allConfigured, partiallyConfigured }Override UI strings (all default to translated English)

Events​

EventPayloadDescription
update:configurationconfigurationEmitted when any register or schema selection changes (use with .sync or v-model)
save—Save button clicked
reimport—Re-import button clicked

Slots​

SlotDescription
#actionsExtra action buttons rendered alongside Save/Re-import
#group-headerCustom header content for each group (scoped: { group })
#footerFooter content below the configuration section

Usage​

<CnRegisterMapping
:groups="[
{
name: 'Client management',
registerConfigKey: 'client_register',
types: [
{ slug: 'client', label: 'Clients', configKey: 'client_schema' },
{ slug: 'contact', label: 'Contacts', configKey: 'contact_schema' },
],
},
]"
:configuration="settings"
:saving="saving"
@update:configuration="settings = $event"
@save="onSave" />

This component is typically used in the admin settings page of an app to let administrators configure which OpenRegister registers and schemas map to each entity type.

Reference (auto-generated)​

The tables below are generated from the SFC source via vue-docgen-cli. They reflect what's actually in CnRegisterMapping.vue and update automatically whenever the component changes.

OpenRegister reliance​

medium: this component relies on OpenRegister for part of what it does. 4 direct references, 1 file reached through imports.

See the reliance overview for the filterable list.

Props​

NameTypeRequiredDefaultDescription
namestring() =&gt; t('nextcloud-vue', 'Register configuration')Section title
descriptionstring() =&gt; t('nextcloud-vue', 'Configure OpenRegister schema mappings for your object types')Section description
docUrlstring''Documentation URL
groupsArray<{ name: string, description: string, registerConfigKey: string, types: Array<{ slug: string, label: string, description: string, configKey: string }> }>✓—Groups of object types that share a register.
configurationobject\{\}Current configuration values: { register: '5', client_schema: '28', ... }
showSaveButtonbooleantrueShow save button
savingbooleanfalseWhether save is in progress
showReimportButtonbooleanfalseShow reimport button
reimportingbooleanfalseWhether reimport is in progress
saveButtonTextstring() =&gt; t('nextcloud-vue', 'Save configuration')Save button text
reimportButtonTextstring() =&gt; t('nextcloud-vue', 'Re-import configuration')Reimport button text
collapseGroupsunionnullDraw each group as a header that opens and closes it, showing its configured count while closed. The groups start closed. null (the default) collapses them when there is more than one group, so a page with several registers is not one long card.
lookstring''The look the mapping is drawn in: board or nextcloud. Empty follows the provided cnLook.
boardLayoutstring'table'Board look: how the types are drawn. table (default) is the open group's type and schema table with the other groups as rows (PqBeheer); selects is the register select and a schema select per type in a grid of three for every group (DqBeheerinstellingen).
boardRowLimitnumber4Board look: how many types the open group lists before a "show all" line. 0 lists every type.
autoMatchbooleantrueAuto-match schema titles to type slugs on register change
labelsobject\{ register: t('nextcloud-vue', 'Register'), schema: t('nextcloud-vue', 'Schema'), configured: t('nextcloud-vue', 'Configured'), notConfigured: t('nextcloud-vue', 'Not configured'), noSchemas: t('nextcloud-vue', 'No schemas available in this register'), selectRegister: t('nextcloud-vue', 'Select a register'), selectSchema: t('nextcloud-vue', 'Select a schema'), allConfigured: t('nextcloud-vue', 'All types configured'), partiallyConfigured: t('nextcloud-vue', 'configured') \}UI labels (i18n)

Events​

NamePayloadDescription
reimport—
update:configuration—
save—

Slots​

NameBindingsDescription
actions—
group-headergroup, configuredCount, totalCount
footer—