ObjectMetadataComponent
Component Metadata
Section titled “Component Metadata”Selector: yuv-object-metadata
Standalone: Yes
Implements: OnDestroy
Inputs
Section titled “Inputs”disableBasicMetadata
Section titled “disableBasicMetadata”Type: boolean
Default Value: false
Set to ‘true’ to disable the basic metadata form. This will hide the basic metadata section that shows common object proeperties like creation date, creator, version, etc.
disableControls
Section titled “disableControls”Type: boolean
Default Value: false
dmsObject
Section titled “dmsObject”Type: DmsObject | undefined
elementExtensions
Section titled “elementExtensions”Type: IObjectFormElementExtension[]
Default Value: []
flavoredDmsObject
Section titled “flavoredDmsObject”Type: FlavoredDmsObject | undefined
Please migrate to using dmsObject and flavors inputs instead.
flavors
Section titled “flavors”Type: ObjectTypeFlavor[] | undefined
Default Value: undefined
situation
Section titled “situation”Type: Situation
Default Value: Situation.EDIT
Form situation, if not set default will be ‘EDIT’
Outputs
Section titled “Outputs”indexDataSaved
Section titled “indexDataSaved”Type: DmsObject
Emits the updated DmsObject when metadata have been saved.
statusChanged
Section titled “statusChanged”Type: FormStatusChangedEvent
Emits the current state of the metadata form.
Properties
Section titled “Properties”_dmsObject
Section titled “_dmsObject”Type: unknown
Default Value: linkedSignal(this.dmsObject)
baseData
Section titled “baseData”Type: literal type[]
Default Value: []
busyLoading
Section titled “busyLoading”Type: unknown
Default Value: signal<boolean>(false)
busySaving
Section titled “busySaving”Type: unknown
Default Value: signal<boolean>(false)
combinedFormState
Section titled “combinedFormState”Type: FormStatusChangedEvent
controlsVisible
Section titled “controlsVisible”Type: unknown
Default Value: signal<boolean>(false)
Type: unknown
Default Value: computed(() => !this.mainFormOptions() && this.flavorFormOptions().length === 0 && this.disableBasicMetadata())
flavorFormOptions
Section titled “flavorFormOptions”Type: unknown
Default Value: computed(() => \{ const object = this._dmsObject(); const flavors = this.flavors() ?? this.#legacyFlavors(); const mappedFlavors: Record<string, ObjectTypeFlavor> = (flavors || []).reduce((acc, curr) => (\{ ...acc, [curr.sot]: curr \}), \{\}); if (!object) return []; return (flavors || []) .map((f) => f.sot) .map((id) => (\{ id, label: this.#system.getLocalizedLabel(id), icon: mappedFlavors[id]?.icon, svgIcon: mappedFlavors[id]?.svgIcon, data: object.data \})); \})
formDisabled
Section titled “formDisabled”Type: unknown
Default Value: signal<boolean>(false)
Set to ‘true’ to prevent all metadata from being edited
hasWritePermission
Section titled “hasWritePermission”Type: unknown
Default Value: computed(() => \{ const flavoredDmsObject = this.flavoredDmsObject(); const object = this._dmsObject(); const o = flavoredDmsObject ? flavoredDmsObject.object : object; return o?.permissions?.writeIndexData || false; \})
mainFormOptions
Section titled “mainFormOptions”Type: unknown
Default Value: this.#mainFormOptionsResource.value
mainFormOptionsIsLoading
Section titled “mainFormOptionsIsLoading”Type: unknown
Default Value: this.#mainFormOptionsResource.isLoading
objectForms
Section titled “objectForms”Type: unknown
Default Value: viewChildren<ObjectFormComponent>(ObjectFormComponent)
objectMetadataSectionForms
Section titled “objectMetadataSectionForms”Type: unknown
Default Value: viewChildren<ObjectMetadataSectionComponent>(ObjectMetadataSectionComponent)
translate
Section titled “translate”Type: unknown
Default Value: inject(TranslateService)
Type: unknown
Default Value: toSignal(this.#userService.user$)
Methods
Section titled “Methods”onFormStatusChanged
Section titled “onFormStatusChanged”onFormStatusChanged(formId: string, evt: FormStatusChangedEvent): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| formId | string | |
| evt | FormStatusChangedEvent |
resetForm
Section titled “resetForm”Reset te form to its initial state
resetForm(): voidsave(): voidsetFormPristine
Section titled “setFormPristine”setFormPristine(): voidupdateFormValue
Section titled “updateFormValue”updateFormValue(data: Record<string | unknown>): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| data | Record<string | unknown> |