@umbraco-cms/backoffice 16.4.0-rc → 16.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { UMB_BLOCK_RTE_PROPERTY_EDITOR_SCHEMA_ALIAS } from '../constants.js';
8
- import { observeMultiple } from '../../../libs/observable-api/index.js';
8
+ import { jsonStringComparison, observeMultiple } from '../../../libs/observable-api/index.js';
9
9
  import { property, state } from '../../../external/lit/index.js';
10
10
  import { UmbBlockRteEntriesContext, UmbBlockRteManagerContext } from '../../block/block-rte/index.js';
11
11
  import { UmbChangeEvent } from '../../core/event/index.js';
@@ -172,10 +172,13 @@ export class UmbPropertyEditorUiRteElementBase extends UmbFormControlMixin(UmbLi
172
172
  ]), ([layouts, contents, settings, exposes]) => {
173
173
  if (layouts.length === 0) {
174
174
  if (super.value?.markup === undefined) {
175
+ if (this.value === undefined) {
176
+ return;
177
+ }
175
178
  super.value = undefined;
176
179
  }
177
180
  else {
178
- super.value = {
181
+ const newValue = {
179
182
  ...super.value,
180
183
  blocks: {
181
184
  layout: {},
@@ -184,10 +187,14 @@ export class UmbPropertyEditorUiRteElementBase extends UmbFormControlMixin(UmbLi
184
187
  expose: [],
185
188
  },
186
189
  };
190
+ if (jsonStringComparison(this.value, newValue)) {
191
+ return;
192
+ }
193
+ super.value = newValue;
187
194
  }
188
195
  }
189
196
  else {
190
- super.value = {
197
+ const newValue = {
191
198
  markup: this._markup,
192
199
  blocks: {
193
200
  layout: { [UMB_BLOCK_RTE_PROPERTY_EDITOR_SCHEMA_ALIAS]: layouts },
@@ -196,6 +203,10 @@ export class UmbPropertyEditorUiRteElementBase extends UmbFormControlMixin(UmbLi
196
203
  expose: exposes,
197
204
  },
198
205
  };
206
+ if (jsonStringComparison(this.value, newValue)) {
207
+ return;
208
+ }
209
+ super.value = newValue;
199
210
  }
200
211
  // If we don't have a value set from the outside or an internal value, we don't want to set the value.
201
212
  // This is added to prevent the block list from setting an empty value on startup.