@genesislcap/expression-builder 14.250.0 → 14.251.1

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.
@@ -8,6 +8,13 @@ export declare class ExpressionBuilder extends GenesisElement implements Metadat
8
8
  model: ModelGroup | null;
9
9
  private ruleCount;
10
10
  private groupCount;
11
+ /**
12
+ * @internal
13
+ * We don't want to dispatch a change event for the model if it's just changed because
14
+ * the user updated it themselves, otherwise if they automatically update the config property
15
+ * on change it'll get into an infinite loop
16
+ */
17
+ private userUpdatingModel;
11
18
  /** @internal */
12
19
  configChanged(_: Config, newConfig: Config): void;
13
20
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"expression-builder.d.ts","sourceRoot":"","sources":["../../../src/main/expression-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAc,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAa,MAAM,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAqB,gBAAgB,EAAqB,MAAM,qBAAqB,CAAC;AAkB7F,cAAc;AACd,qBAKa,iBAAkB,SAAQ,cAAe,YAAW,gBAAgB;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,GAAG,IAAI,CAAQ;IAE5C,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,UAAU,CAAK;IAEvB,gBAAgB;IAChB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAQ1C,gBAAgB;IAChB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU;IAM5C;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,KAAK;IAa1C,gBAAgB;IAChB,SAAS,IAAI,MAAM;IAInB,gBAAgB;IAChB,UAAU;IAKV,gBAAgB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,MAAM;IAInB,gBAAgB;IAChB,UAAU;IAKV,gBAAgB;IAChB,SAAS;IAOT,iBAAiB;IA0BjB,oBAAoB,IAAI,IAAI;IAU5B,OAAO,CAAC,cAAc,CAAmC;IACzD,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,aAAa,CAAkC;IACvD,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,iBAAiB,CAAsC;IAC/D,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,gBAAgB,CAAqC;IAC7D,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,qBAAqB,CAA0C;IACvE,OAAO,CAAC,sBAAsB;IAK9B,OAAO,CAAC,oBAAoB,CAAyC;IACrE,OAAO,CAAC,qBAAqB;CAI9B"}
@@ -16,6 +16,13 @@ let ExpressionBuilder = class ExpressionBuilder extends GenesisElement {
16
16
  this.model = null;
17
17
  this.ruleCount = 0;
18
18
  this.groupCount = 0;
19
+ /**
20
+ * @internal
21
+ * We don't want to dispatch a change event for the model if it's just changed because
22
+ * the user updated it themselves, otherwise if they automatically update the config property
23
+ * on change it'll get into an infinite loop
24
+ */
25
+ this.userUpdatingModel = false;
19
26
  this.handleAddGroup = this._handleAddGroup.bind(this);
20
27
  this.handleAddRule = this._handleAddRule.bind(this);
21
28
  this.handleDeleteGroup = this._handleDeleteGroup.bind(this);
@@ -28,12 +35,14 @@ let ExpressionBuilder = class ExpressionBuilder extends GenesisElement {
28
35
  if (newConfig.model) {
29
36
  this.ruleCount = 0;
30
37
  this.groupCount = 0;
38
+ this.userUpdatingModel = true;
31
39
  this.model = groupToModelGroup(newConfig.model, this);
40
+ this.userUpdatingModel = false;
32
41
  }
33
42
  }
34
43
  /** @internal */
35
44
  modelChanged(_, newModel) {
36
- if (!newModel)
45
+ if (!newModel || this.userUpdatingModel)
37
46
  return;
38
47
  const group = modelGroupToGroup(newModel);
39
48
  this.dispatchChangeEvent(group);
@@ -113,6 +113,13 @@ export declare class ExpressionBuilder extends GenesisElement implements Metadat
113
113
  model: ModelGroup | null;
114
114
  private ruleCount;
115
115
  private groupCount;
116
+ /**
117
+ * @internal
118
+ * We don't want to dispatch a change event for the model if it's just changed because
119
+ * the user updated it themselves, otherwise if they automatically update the config property
120
+ * on change it'll get into an infinite loop
121
+ */
122
+ private userUpdatingModel;
116
123
  /** @internal */
117
124
  configChanged(_: Config_2, newConfig: Config_2): void;
118
125
  /** @internal */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/expression-builder",
3
3
  "description": "Genesis Foundation Expression Builder",
4
- "version": "14.250.0",
4
+ "version": "14.251.1",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/expression-builder.d.ts",
@@ -62,5 +62,5 @@
62
62
  "access": "public"
63
63
  },
64
64
  "customElements": "dist/custom-elements.json",
65
- "gitHead": "cde412442823b891ab650ab4841d04b963fc9afe"
65
+ "gitHead": "376111caafcd568f7bcef710c57824c846247c55"
66
66
  }