1
- import { UmbContentPropertyContext } from '../../content -property.context.js' ;
1
+ import { UmbPropertyTypeBasedPropertyContext } from './property-type-based -property.context.js' ;
2
2
import type { UmbPropertyEditorConfig } from '@umbraco-cms/backoffice/property-editor' ;
3
3
import { css , customElement , html , ifDefined , property , state } from '@umbraco-cms/backoffice/external/lit' ;
4
4
import { UmbDataTypeDetailRepository } from '@umbraco-cms/backoffice/data-type' ;
@@ -57,17 +57,18 @@ export class UmbPropertyTypeBasedPropertyElement extends UmbLitElement {
57
57
private _isUnsupported ?: boolean ;
58
58
59
59
@state ( )
60
- private _dataTypeData ?: UmbPropertyEditorConfig ;
60
+ private _dataTypeValues ?: UmbPropertyEditorConfig ;
61
61
62
62
private _dataTypeDetailRepository = new UmbDataTypeDetailRepository ( this ) ;
63
63
private _dataTypeObserver ?: UmbObserverController < UmbDataTypeDetailModel | undefined > ;
64
64
65
- #contentPropertyContext = new UmbContentPropertyContext ( this ) ;
65
+ #context = new UmbPropertyTypeBasedPropertyContext ( this ) ;
66
66
67
67
private async _checkSchemaSupport ( ) {
68
68
if ( ! this . _ownerEntityType || ! this . _propertyEditorSchemaAlias ) return ;
69
69
70
70
if ( this . _ownerEntityType in UMB_UNSUPPORTED_EDITOR_SCHEMA_ALIASES ) {
71
+ // TODO: We should get rid of this system, f your reading this please dont rely on this, we will get rid of it in the future. [NL]
71
72
this . _isUnsupported = UMB_UNSUPPORTED_EDITOR_SCHEMA_ALIASES [ this . _ownerEntityType ] . includes (
72
73
this . _propertyEditorSchemaAlias ,
73
74
) ;
@@ -83,9 +84,9 @@ export class UmbPropertyTypeBasedPropertyElement extends UmbLitElement {
83
84
await this . _dataTypeDetailRepository . byUnique ( dataTypeUnique ) ,
84
85
( dataType ) => {
85
86
const contextValue = dataType ? { unique : dataType . unique } : undefined ;
86
- this . #contentPropertyContext . setDataType ( contextValue ) ;
87
+ this . #context . setDataType ( contextValue ) ;
87
88
88
- this . _dataTypeData = dataType ?. values ;
89
+ this . _dataTypeValues = dataType ?. values ;
89
90
this . _propertyEditorUiAlias = dataType ?. editorUiAlias || undefined ;
90
91
this . _propertyEditorSchemaAlias = dataType ?. editorAlias || undefined ;
91
92
this . _checkSchemaSupport ( ) ;
@@ -127,7 +128,7 @@ export class UmbPropertyTypeBasedPropertyElement extends UmbLitElement {
127
128
.description = ${ this . _property . description ?? undefined }
128
129
.appearance = ${ this . _property . appearance }
129
130
property- edito r- ui- alias= ${ ifDefined ( this . _propertyEditorUiAlias ) }
130
- .config = ${ this . _dataTypeData }
131
+ .config = ${ this . _dataTypeValues }
131
132
.validation = ${ this . _property . validation }
132
133
?readonly = ${ this . readonly } >
133
134
</ umb- property>
0 commit comments