@openmrs/ngx-formentry 3.1.2-pre.200 → 3.1.2-pre.203

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.
@@ -2114,6 +2114,16 @@
2114
2114
  var obsValue = (_a = findObs(rawEncounter === null || rawEncounter === void 0 ? void 0 : rawEncounter.obs, uuid)) === null || _a === void 0 ? void 0 : _a.value;
2115
2115
  return !!targetControl ? targetControl : typeof obsValue === 'object' ? obsValue.uuid : !!obsValue ? obsValue : null;
2116
2116
  };
2117
+ JsExpressionHelper.prototype.doesNotMatchExpression = function (regexString, val) {
2118
+ if (!val || ['undefined', 'null', ''].includes(val.toString())) {
2119
+ return true;
2120
+ }
2121
+ var pattern = new RegExp(regexString);
2122
+ if (!pattern.test(val)) {
2123
+ return true;
2124
+ }
2125
+ return false;
2126
+ };
2117
2127
  Object.defineProperty(JsExpressionHelper.prototype, "helperFunctions", {
2118
2128
  get: function () {
2119
2129
  var helper = this;
@@ -2127,7 +2137,8 @@
2127
2137
  isEmpty: helper.isEmpty,
2128
2138
  arrayContains: helper.arrayContains,
2129
2139
  extractRepeatingGroupValues: helper.extractRepeatingGroupValues,
2130
- getObsFromControlOrEncounter: helper.getObsFromControlOrEncounter
2140
+ getObsFromControlOrEncounter: helper.getObsFromControlOrEncounter,
2141
+ doesNotMatchExpression: helper.doesNotMatchExpression
2131
2142
  };
2132
2143
  },
2133
2144
  enumerable: false,