implement expose across
This commit is contained in:
@@ -66,11 +66,13 @@ export class UmbPropertyEditorUIBlockGridElement
|
||||
buildUpValue.layout ??= {};
|
||||
buildUpValue.contentData ??= [];
|
||||
buildUpValue.settingsData ??= [];
|
||||
buildUpValue.expose ??= [];
|
||||
this._value = buildUpValue as UmbBlockGridValueModel;
|
||||
|
||||
this.#managerContext.setLayouts(this._value.layout[UMB_BLOCK_GRID_PROPERTY_EDITOR_ALIAS] ?? []);
|
||||
this.#managerContext.setContents(this._value.contentData);
|
||||
this.#managerContext.setSettings(this._value.settingsData);
|
||||
this.#managerContext.setExposes(this._value.expose);
|
||||
}
|
||||
public override get value(): UmbBlockGridValueModel {
|
||||
return this._value;
|
||||
|
||||
@@ -68,11 +68,13 @@ export class UmbPropertyEditorUIBlockListElement
|
||||
buildUpValue.layout ??= {};
|
||||
buildUpValue.contentData ??= [];
|
||||
buildUpValue.settingsData ??= [];
|
||||
buildUpValue.expose ??= [];
|
||||
this._value = buildUpValue as UmbBlockListValueModel;
|
||||
|
||||
this.#managerContext.setLayouts(this._value.layout[UMB_BLOCK_LIST_PROPERTY_EDITOR_ALIAS] ?? []);
|
||||
this.#managerContext.setContents(buildUpValue.contentData);
|
||||
this.#managerContext.setSettings(buildUpValue.settingsData);
|
||||
this.#managerContext.setContents(this._value.contentData);
|
||||
this.#managerContext.setSettings(this._value.settingsData);
|
||||
this.#managerContext.setExposes(this._value.expose);
|
||||
}
|
||||
public override get value(): UmbBlockListValueModel | undefined {
|
||||
return this._value;
|
||||
|
||||
@@ -225,7 +225,7 @@ export class UmbDocumentBlueprintWorkspaceContext
|
||||
if (!data) return undefined;
|
||||
|
||||
this.setIsNew(true);
|
||||
this.#data.setPersistedData(data);
|
||||
this.#data.setPersistedData(undefined);
|
||||
this.#data.setCurrentData(data);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -321,8 +321,8 @@ export class UmbDocumentWorkspaceContext
|
||||
this.#entityContext.setUnique(data.unique);
|
||||
this.#isTrashedContext.setIsTrashed(data.isTrashed);
|
||||
this.setIsNew(true);
|
||||
this.#data.setData(undefined);
|
||||
this.#data.current.setValue(data);
|
||||
this.#data.setPersistedData(undefined);
|
||||
this.#data.setCurrentData(data);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -522,8 +522,9 @@ export class UmbDocumentWorkspaceContext
|
||||
}
|
||||
|
||||
this.setIsNew(false);
|
||||
// TODO: Only update the variants that we asked to save.
|
||||
this.#data.setData(data);
|
||||
this.#data.setPersistedData(data);
|
||||
// TODO: Only update the variants that was chosen to be saved:
|
||||
this.#data.setCurrentData(data);
|
||||
|
||||
const eventContext = await this.getContext(UMB_ACTION_EVENT_CONTEXT);
|
||||
const event = new UmbRequestReloadChildrenOfEntityEvent({
|
||||
@@ -539,8 +540,9 @@ export class UmbDocumentWorkspaceContext
|
||||
throw new Error('Error saving document');
|
||||
}
|
||||
|
||||
// TODO: Only update the variants that we asked to save.
|
||||
this.#data.setData(data);
|
||||
this.#data.setPersistedData(data);
|
||||
// TODO: Only update the variants that was chosen to be saved:
|
||||
this.#data.setCurrentData(data);
|
||||
|
||||
const eventContext = await this.getContext(UMB_ACTION_EVENT_CONTEXT);
|
||||
const event = new UmbRequestReloadStructureForEntityEvent({
|
||||
|
||||
@@ -230,7 +230,7 @@ export class UmbMediaWorkspaceContext
|
||||
this.#entityContext.setEntityType(UMB_MEDIA_ENTITY_TYPE);
|
||||
this.#entityContext.setUnique(data.unique);
|
||||
this.setIsNew(true);
|
||||
this.#data.setPersistedData(data);
|
||||
this.#data.setPersistedData(undefined);
|
||||
this.#data.setCurrentData(data);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -371,7 +371,8 @@ export class UmbMemberWorkspaceContext
|
||||
|
||||
if (newData) {
|
||||
this.#data.setPersistedData(newData);
|
||||
this.#data.setCurrentData(newData);
|
||||
// TODO: Only update the variants that was chosen to be saved:
|
||||
//this.#data.setCurrentData(newData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ export class UmbPropertyEditorUITinyMceElement extends UmbLitElement implements
|
||||
this.#managerContext.setLayouts(buildUpValue.blocks.layout[UMB_BLOCK_RTE_BLOCK_LAYOUT_ALIAS] ?? []);
|
||||
this.#managerContext.setContents(buildUpValue.blocks.contentData);
|
||||
this.#managerContext.setSettings(buildUpValue.blocks.settingsData);
|
||||
this.#managerContext.setExposes(buildUpValue.blocks.expose);
|
||||
}
|
||||
public get value(): UmbRichTextEditorValueType {
|
||||
return this._value;
|
||||
|
||||
Reference in New Issue
Block a user