Q2 Tecton Framework Wrappers

1.66.0 · active · verified Sun Apr 19

q2-tecton-framework-wrappers is a core package within the Q2 Tecton micro-frontend ecosystem, designed to facilitate the integration of Stencil-generated web components into various JavaScript frameworks like React, Vue, and Angular. It acts as a set of framework-specific helpers, abstracting away the complexities of direct web component usage. The Tecton system, upon which this package relies, emphasizes isolated execution contexts via iframes and provides a consistent UI/UX for embedded applications within the Q2 UUX banking platform. This package is currently at version 1.66.0 and is part of a frequently updated suite of libraries, with releases often tied to broader Tecton system updates. Its key differentiator is its role in enabling seamless adoption of Tecton's custom elements across diverse frontend frameworks, offering features like `v-model` support for Vue wrappers.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to set up a basic Vue application using `q2-tecton-framework-wrappers` to integrate a Tecton button component, including registering custom elements and handling events.

import { defineCustomElements } from 'q2-tecton-elements/loader';
import { createApp } from 'vue';
import { TctButton } from 'q2-tecton-framework-wrappers/vue';

defineCustomElements();

const app = createApp({
  template: `
    <div>
      <h1>Q2 Tecton Integration</h1>
      <p>This example demonstrates integrating a Tecton button using Vue wrappers.</p>
      <TctButton @tctClick="handleClick" :disabled="isDisabled" ref="myButton">
        {{ buttonText }}
      </TctButton>
      <p>Button is currently {{ isDisabled ? 'disabled' : 'enabled' }}.</p>
      <button @click="toggleDisable">Toggle Button State</button>
    </div>
  `,
  components: {
    TctButton
  },
  data() {
    return {
      buttonText: 'Click Me!',
      isDisabled: false
    };
  },
  methods: {
    handleClick(event) {
      console.log('TctButton clicked!', event);
      alert('Tecton Button was clicked!');
    },
    toggleDisable() {
      this.isDisabled = !this.isDisabled;
      if (this.isDisabled) {
        this.buttonText = 'Disabled';
      } else {
        this.buttonText = 'Click Me!';
      }
    }
  },
  mounted() {
    console.log('TctButton instance:', this.$refs.myButton);
  }
});

app.mount('#app');

view raw JSON →