-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5500fd
commit b2c598f
Showing
8 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './property-value-data.type.js'; | ||
export * from './unsupported-properties.type.js'; |
1 change: 1 addition & 0 deletions
1
src/packages/core/property/types/unsupported-properties.type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type UmbUnsupportedEditorSchemaAliases = Record<string, Array<string>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './utils.js'; | ||
export * from './unsupported-property.element.js'; |
45 changes: 45 additions & 0 deletions
45
src/packages/core/property/unsupported-property/unsupported-property.element.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { css, customElement, html, property } from '@umbraco-cms/backoffice/external/lit'; | ||
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; | ||
import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; | ||
|
||
/** | ||
* @description Component for displaying an unsupported property | ||
*/ | ||
|
||
@customElement('umb-unsupported-property') | ||
export class UmbUnsupportedPropertyElement extends UmbLitElement { | ||
@property({ type: String }) | ||
public alias = ''; | ||
|
||
@property({ type: String }) | ||
public schema = ''; | ||
|
||
override render() { | ||
return html`<div id="not-supported"> | ||
<umb-localize key="blockEditor_propertyEditorNotSupported" .args=${[this.alias, this.schema]}></umb-localize> | ||
</div>`; | ||
} | ||
|
||
static override styles = [ | ||
UmbTextStyles, | ||
css` | ||
:host { | ||
display: block; | ||
padding: var(--uui-size-layout-1) 0; | ||
} | ||
#not-supported { | ||
background-color: var(--uui-color-danger); | ||
color: var(--uui-color-surface); | ||
padding: var(--uui-size-space-4); | ||
border-radius: var(--uui-border-radius); | ||
} | ||
`, | ||
]; | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'umb-unsupported-property': UmbUnsupportedPropertyElement; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type { UmbUnsupportedEditorSchemaAliases } from '../types/index.js'; | ||
|
||
export const UMB_UNSUPPORTED_EDITOR_SCHEMA_ALIASES: UmbUnsupportedEditorSchemaAliases = { | ||
block: ['Umbraco.ImageCropper', 'Umbraco.UploadField'], | ||
}; |