pasteComponent(component) {
    if (!window.sessionStorage) {
      return console.warn(this.t('sessionStorageSupportError'));
    }
    this.removeClass(this.refs.form, 'builder-paste-mode');
    if (window.sessionStorage) {
      const data = window.sessionStorage.getItem('formio.clipboard');
      if (data) {
        const schema = JSON.parse(data);
        const parent = this.getParentElement(component.element);
        if (parent) {
          BuilderUtils.uniquify(this.findNamespaceRoot(parent.formioComponent), schema);
          let path = '';
          let index = 0;

          const isParentSaveChildMethod = this.isParentSaveChildMethod(parent.formioComponent);

          if (parent.formioContainer && !isParentSaveChildMethod) {
            index = parent.formioContainer.indexOf(component.component);
            path = this.getComponentsPath(schema, parent.formioComponent.component);
            parent.formioContainer.splice(index + 1, 0, schema);
          }
          else if (isParentSaveChildMethod) {
            parent.formioComponent.saveChildComponent(schema, false);
          }
          parent.formioComponent.rebuild();

          this.emitSaveComponentEvent(schema, schema, parent.formioComponent.component, path, (index + 1), true, schema);
        }
        this.emit('change', this.form);
      }
    }
  }
Paste copied component after the current component.
@param {Component} component - The component to paste after.
@returns {void}