@overmap-ai/forms 1.0.32-condition-manager.0 → 1.0.32-condition-manager.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.
package/dist/forms.js CHANGED
@@ -33212,10 +33212,11 @@ class ConditionManager extends Observable {
33212
33212
  super();
33213
33213
  __publicField(this, "conditions");
33214
33214
  __publicField(this, "conditionObserver", () => {
33215
+ this.conditions = [...this.conditions];
33215
33216
  this.notify(this);
33216
33217
  });
33217
33218
  __publicField(this, "initConditions", (conditions) => {
33218
- for (const c of Object.values(conditions).flat()) c.observe(this.conditionObserver);
33219
+ for (const c of conditions) c.observe(this.conditionObserver);
33219
33220
  return conditions;
33220
33221
  });
33221
33222
  this.conditions = this.initConditions(conditions);
@@ -33228,10 +33229,7 @@ class ConditionManager extends Observable {
33228
33229
  this.notify(this);
33229
33230
  }
33230
33231
  addConditions(conditions) {
33231
- this.conditions = this.initConditions({
33232
- ...this.conditions,
33233
- ...conditions
33234
- });
33232
+ this.conditions = this.initConditions([...this.conditions, ...conditions]);
33235
33233
  this.notify(this);
33236
33234
  }
33237
33235
  removeCondition(condition) {
@@ -33200,10 +33200,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
33200
33200
  super();
33201
33201
  __publicField(this, "conditions");
33202
33202
  __publicField(this, "conditionObserver", () => {
33203
+ this.conditions = [...this.conditions];
33203
33204
  this.notify(this);
33204
33205
  });
33205
33206
  __publicField(this, "initConditions", (conditions) => {
33206
- for (const c of Object.values(conditions).flat()) c.observe(this.conditionObserver);
33207
+ for (const c of conditions) c.observe(this.conditionObserver);
33207
33208
  return conditions;
33208
33209
  });
33209
33210
  this.conditions = this.initConditions(conditions);
@@ -33216,10 +33217,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
33216
33217
  this.notify(this);
33217
33218
  }
33218
33219
  addConditions(conditions) {
33219
- this.conditions = this.initConditions({
33220
- ...this.conditions,
33221
- ...conditions
33222
- });
33220
+ this.conditions = this.initConditions([...this.conditions, ...conditions]);
33223
33221
  this.notify(this);
33224
33222
  }
33225
33223
  removeCondition(condition) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overmap-ai/forms",
3
- "version": "1.0.32-condition-manager.0",
3
+ "version": "1.0.32-condition-manager.1",
4
4
  "license": "UNLICENSED",
5
5
  "main": "dist/forms.umd.cjs",
6
6
  "module": "dist/forms.js",