function mimicUserInput(el, newViewValue, options = {}) {
    // @ts-ignore
    const { _inputNode, _labelNode } = getFormControlMembers(el);
    const type = detectType(el);
    let userInputEv;
    if (type === 'RegularField') {
      userInputEv = _inputNode.tagName === 'SELECT' ? 'change' : 'input';
      el.value = newViewValue; // eslint-disable-line no-param-reassign
      _inputNode.dispatchEvent(new Event(userInputEv, { bubbles: true }));
    } else if (type === 'ChoiceField') {
      if (options?.labelInsteadOfInput) {
        _labelNode.click();
      } else {
        _inputNode.click();
      }
    } else if (type === 'OptionChoiceField') {
      if (!options?.triggerType) {
        el.dispatchEvent(new Event('click', { bubbles: true }));
      } else if (options?.triggerType === 'keypress') {
        el.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true }));
        el.dispatchEvent(new KeyboardEvent('keyup', { key: 'ArrowDown', bubbles: true }));
        el.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true }));
        el.dispatchEvent(new KeyboardEvent('keyup', { key: 'Enter', bubbles: true }));
      }
    }
  }
@param {FormControl & {value: string;}} el
@param {string} newViewValue
@param {{ triggerType?: string, labelInsteadOfInput?: boolean, parent?: HTMLElement }} options