use routable create modal
This commit is contained in:
@@ -84,15 +84,9 @@ export class UmbPropertyEditorUIBlockListElement extends UmbLitElement implement
|
||||
|
||||
#context = new UmbBlockListManagerContext(this);
|
||||
|
||||
#modalContext?: UmbModalManagerContext;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.consumeContext(UMB_MODAL_MANAGER_CONTEXT_TOKEN, (instance) => {
|
||||
this.#modalContext = instance;
|
||||
});
|
||||
|
||||
// TODO: Prevent initial notification from these observes:
|
||||
this.observe(this.#context.layouts, (layouts) => {
|
||||
this._value = { ...this._value, layout: { [UMB_BLOCK_LIST_PROPERTY_EDITOR_ALIAS]: layouts } };
|
||||
@@ -128,25 +122,6 @@ export class UmbPropertyEditorUIBlockListElement extends UmbLitElement implement
|
||||
});
|
||||
}
|
||||
|
||||
async #openBlockCatalogue(openClipboard: boolean = false) {
|
||||
//Open modal
|
||||
const modalContext = this.#modalContext?.open(UMB_BLOCK_CATALOGUE_MODAL, {
|
||||
data: { blocks: this._blocks ?? [], openClipboard },
|
||||
});
|
||||
|
||||
await modalContext?.onSubmit();
|
||||
|
||||
/*
|
||||
if (!data) return;
|
||||
|
||||
const block = this._blocks?.find((x) => x.contentElementTypeKey === data.key);
|
||||
|
||||
if (!block?.contentElementTypeKey) return;
|
||||
|
||||
this.#context.createBlock(block.contentElementTypeKey);
|
||||
*/
|
||||
}
|
||||
|
||||
render() {
|
||||
return html` ${repeat(
|
||||
this._layouts,
|
||||
|
||||
Reference in New Issue
Block a user