@bolttech/form-engine-core 0.0.3-beta.1 → 0.0.3-beta.2

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.
Files changed (2) hide show
  1. package/index.esm.js +11 -8
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -3040,6 +3040,9 @@ class FormField {
3040
3040
  this.errorSubject$.unsubscribe();
3041
3041
  this.apiSubject$.unsubscribe();
3042
3042
  this.apiEventQueueSubject$.unsubscribe();
3043
+ this.formValidNotification$.next({
3044
+ fieldTrigger: this.name
3045
+ });
3043
3046
  }
3044
3047
  /**
3045
3048
  * Subscribes to changes in the field state and executes the provided callback function.
@@ -3236,7 +3239,7 @@ class FormCore {
3236
3239
  case 'fields':
3237
3240
  {
3238
3241
  const field = this.fields.get(key);
3239
- if (!field) return console.info(`failed to get value from ${key}`);
3242
+ if (!field) return this.config.defaultLogVerbose && console.warn(`failed to get value from ${key}`);
3240
3243
  if (property === 'props' && path[0] === field.valuePropName) {
3241
3244
  return field.value;
3242
3245
  }
@@ -3264,7 +3267,7 @@ class FormCore {
3264
3267
  }) {
3265
3268
  const field = this.fields.get(key);
3266
3269
  if (!field) {
3267
- console.info(`failed to update field ${key}`);
3270
+ this.config.defaultLogVerbose && console.warn(`failed to update field ${key}`);
3268
3271
  return;
3269
3272
  }
3270
3273
  if (path.length > 0) {
@@ -3288,7 +3291,7 @@ class FormCore {
3288
3291
  } else if (typeof fieldProp === 'object' && !isNil(fieldProp)) {
3289
3292
  propState = Object.assign({}, fieldProp);
3290
3293
  } else {
3291
- console.info(`invalid template property, skipping evaluation of ${field.name} with ${fieldProp}`);
3294
+ this.config.defaultLogVerbose && console.warn(`invalid template property, skipping evaluation of ${field.name} with ${fieldProp}`);
3292
3295
  return;
3293
3296
  }
3294
3297
  set(propState, path, value);
@@ -3379,8 +3382,8 @@ class FormCore {
3379
3382
  try {
3380
3383
  return parse ? new Function(`return ${value}`)() : value;
3381
3384
  } catch (_a) {
3382
- console.info(`unhandled parsing on ${expression} returning`);
3383
- console.info(value);
3385
+ this.config.defaultLogVerbose && console.warn(`unhandled parsing on ${expression} returning`);
3386
+ this.config.defaultLogVerbose && console.warn(value);
3384
3387
  return value;
3385
3388
  }
3386
3389
  });
@@ -3960,12 +3963,12 @@ class FormCore {
3960
3963
  this.submitSubject$.next(values);
3961
3964
  }
3962
3965
  destroy() {
3966
+ this.fields.forEach(field => field.destroyField());
3963
3967
  this.submitSubject$.unsubscribe();
3964
3968
  this.templateSubscription$.unsubscribe();
3965
3969
  this.fieldEventSubject$.unsubscribe();
3966
3970
  this.dataSubject$.unsubscribe();
3967
3971
  this.formValidNotification$.unsubscribe();
3968
- this.fields.forEach(field => field.destroyField());
3969
3972
  }
3970
3973
  }
3971
3974
  /**
@@ -4158,7 +4161,7 @@ class FormGroup {
4158
4161
  if (sub) {
4159
4162
  acc[formId] = sub;
4160
4163
  } else {
4161
- console.warn(`failed to register form id ${formId}`);
4164
+ this.config.defaultLogVerbose && console.warn(`failed to register form id ${formId}`);
4162
4165
  }
4163
4166
  return acc;
4164
4167
  }, {});
@@ -4180,7 +4183,7 @@ class FormGroup {
4180
4183
  if (sub) {
4181
4184
  acc[formId] = sub;
4182
4185
  } else {
4183
- console.warn(`failed to register validation subscription form id ${formId}`);
4186
+ this.config.defaultLogVerbose && console.warn(`failed to register validation subscription form id ${formId}`);
4184
4187
  }
4185
4188
  return acc;
4186
4189
  }, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bolttech/form-engine-core",
3
- "version": "0.0.3-beta.1",
3
+ "version": "0.0.3-beta.2",
4
4
  "module": "./index.esm.js",
5
5
  "type": "module",
6
6
  "main": "./index.esm.js",