ids-enterprise-ng 21.0.13 → 21.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.
@@ -1212,6 +1212,28 @@ class SohoAlertDirective {
1212
1212
  this.triggerEvents = triggerEvents;
1213
1213
  this.message = '';
1214
1214
  }
1215
+ /**
1216
+ * Removes a specific message by its id
1217
+ *
1218
+ * @param id the id of the message to remove
1219
+ * @param type optional - 'error' (default)
1220
+ * @param triggerEvents optional - true (default) triggers events
1221
+ */
1222
+ removeMessageById(id, type, triggerEvents) {
1223
+ if (this.jQueryElement) {
1224
+ this.ngZone.runOutsideAngular(() => {
1225
+ const field = this.jQueryElement;
1226
+ const msgType = type || 'error';
1227
+ const shouldTriggerEvents = (typeof triggerEvents !== 'boolean') ? true : triggerEvents;
1228
+ const instance = jQuery.data(field[0], 'Validator');
1229
+ if (instance) {
1230
+ const rule = { id, type: msgType, message: id };
1231
+ instance.removeMessage(field, rule, shouldTriggerEvents);
1232
+ instance.setIconOnParent(field, msgType);
1233
+ }
1234
+ });
1235
+ }
1236
+ }
1215
1237
  /**
1216
1238
  * Removes the message for all types
1217
1239
  *