@easy-editor/core 0.0.13 → 0.0.14

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,6 +5,7 @@ export interface SetValueOptions {
5
5
  disableMutator?: boolean;
6
6
  type?: PropValueChangedType;
7
7
  fromSetHotValue?: boolean;
8
+ forceHotValue?: boolean;
8
9
  }
9
10
  export declare enum PropValueChangedType {
10
11
  /**
@@ -42,6 +43,7 @@ export declare class SettingField extends SettingPropEntry {
42
43
  getConfig<K extends keyof FieldConfig>(configName?: K): FieldConfig[K] | FieldConfig;
43
44
  getItems(filter?: (item: SettingField) => boolean): SettingField[];
44
45
  setValue(val: any, isHotValue?: boolean, extraOptions?: SetValueOptions): void;
46
+ clearValue(): void;
45
47
  getHotValue(): any;
46
48
  setHotValue(data: any, options?: SetValueOptions): void;
47
49
  }
@@ -8440,6 +8440,9 @@ class Simulator {
8440
8440
  get enableStrictNotFoundMode() {
8441
8441
  return this.editor.get('enableStrictNotFoundMode') ?? false;
8442
8442
  }
8443
+ get excuteLifeCycleInDesignMode() {
8444
+ return this.editor.get('excuteLifeCycleInDesignMode') ?? false;
8445
+ }
8443
8446
  get notFoundComponent() {
8444
8447
  return this.editor.get('notFoundComponent') ?? null;
8445
8448
  }
@@ -10065,6 +10068,10 @@ class SettingField extends SettingPropEntry {
10065
10068
  }
10066
10069
  super.setValue(val, isHotValue, extraOptions);
10067
10070
  }
10071
+ clearValue() {
10072
+ this.hotValue = null;
10073
+ super.clearValue();
10074
+ }
10068
10075
  getHotValue() {
10069
10076
  if (this.hotValue) {
10070
10077
  return this.hotValue;
@@ -10080,13 +10087,15 @@ class SettingField extends SettingPropEntry {
10080
10087
  const value = data;
10081
10088
  if (options) {
10082
10089
  options.fromSetHotValue = true;
10090
+ options.forceHotValue = true;
10083
10091
  } else {
10084
10092
  options = {
10085
- fromSetHotValue: true
10093
+ fromSetHotValue: true,
10094
+ forceHotValue: true
10086
10095
  };
10087
10096
  }
10088
- if (this.isUseVariable()) {
10089
- const oldValue = this.getValue();
10097
+ if (this.isUseVariable() || options?.forceHotValue) {
10098
+ const oldValue = this.getValue() || {};
10090
10099
  if (isJSExpression(value)) {
10091
10100
  this.setValue({
10092
10101
  type: 'JSExpression',