1
1
import { UmbMediaItemRepository } from '../../repository/index.js' ;
2
2
import { UMB_IMAGE_CROPPER_EDITOR_MODAL , UMB_MEDIA_PICKER_MODAL } from '../../modals/index.js' ;
3
- import type { UmbMediaItemModel , UmbCropModel , UmbMediaPickerPropertyValue } from '../../types.js' ;
3
+ import type { UmbMediaItemModel , UmbCropModel , UmbMediaPickerPropertyValueEntry } from '../../types.js' ;
4
4
import type { UmbUploadableItem } from '../../dropzone/types.js' ;
5
5
import { css , customElement , html , nothing , property , repeat , state } from '@umbraco-cms/backoffice/external/lit' ;
6
6
import { umbConfirmModal , UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal' ;
@@ -27,7 +27,7 @@ type UmbRichMediaCardModel = {
27
27
28
28
@customElement ( 'umb-input-rich-media' )
29
29
export class UmbInputRichMediaElement extends UUIFormControlMixin ( UmbLitElement , '' ) {
30
- #sorter = new UmbSorterController < UmbMediaPickerPropertyValue > ( this , {
30
+ #sorter = new UmbSorterController < UmbMediaPickerPropertyValueEntry > ( this , {
31
31
getUniqueOfElement : ( element ) => {
32
32
return element . id ;
33
33
} ,
@@ -46,7 +46,7 @@ export class UmbInputRichMediaElement extends UUIFormControlMixin(UmbLitElement,
46
46
} ,
47
47
} ) ;
48
48
49
- #sortCards( model : Array < UmbMediaPickerPropertyValue > ) {
49
+ #sortCards( model : Array < UmbMediaPickerPropertyValueEntry > ) {
50
50
const idToIndexMap : { [ unique : string ] : number } = { } ;
51
51
model . forEach ( ( item , index ) => {
52
52
idToIndexMap [ item . key ] = index ;
@@ -93,15 +93,15 @@ export class UmbInputRichMediaElement extends UUIFormControlMixin(UmbLitElement,
93
93
maxMessage = 'This field exceeds the allowed amount of items' ;
94
94
95
95
@property ( { type : Array } )
96
- public set items ( value : Array < UmbMediaPickerPropertyValue > ) {
96
+ public set items ( value : Array < UmbMediaPickerPropertyValueEntry > ) {
97
97
this . #sorter. setModel ( value ) ;
98
98
this . #items = value ;
99
99
this . #populateCards( ) ;
100
100
}
101
- public get items ( ) : Array < UmbMediaPickerPropertyValue > {
101
+ public get items ( ) : Array < UmbMediaPickerPropertyValueEntry > {
102
102
return this . #items;
103
103
}
104
- #items: Array < UmbMediaPickerPropertyValue > = [ ] ;
104
+ #items: Array < UmbMediaPickerPropertyValueEntry > = [ ] ;
105
105
106
106
@property ( { type : Array } )
107
107
allowedContentTypeIds ?: string [ ] | undefined ;
@@ -282,7 +282,7 @@ export class UmbInputRichMediaElement extends UUIFormControlMixin(UmbLitElement,
282
282
#addItems( uniques : string [ ] ) {
283
283
if ( ! uniques . length ) return ;
284
284
285
- const additions : Array < UmbMediaPickerPropertyValue > = uniques . map ( ( unique ) => ( {
285
+ const additions : Array < UmbMediaPickerPropertyValueEntry > = uniques . map ( ( unique ) => ( {
286
286
key : UmbId . new ( ) ,
287
287
mediaKey : unique ,
288
288
mediaTypeAlias : '' ,
0 commit comments