@quapt/generic-feedback
v1.2.9
Published
Embeddable feedback/survey form with 4 integration modes: full page, button popup, floating button, or API-trigger popup
Maintainers
Readme
@quapt/generic-feedback
Embeddable feedback/survey form for Angular. Renders the form as the main content of the page and connects to your API (default: https://ibtz2bm4h3.execute-api.ap-south-1.amazonaws.com/core-service/api/v1). Pass organization/questionnaire IDs and optional user info via params.
Install
npm install @quapt/generic-feedbackConnect & import
1. App config – provide the library and HTTP client (e.g. app.config.ts):
import { provideHttpClient } from '@angular/common/http';
import { provideGenericBased } from '@quapt/generic-feedback';
export const appConfig = {
providers: [
provideHttpClient(),
provideGenericBased({
baseUrl: 'https://ibtz2bm4h3.execute-api.ap-south-1.amazonaws.com/core-service/api/v1', // optional, this is the default
}),
],
};2. Use the component – in any standalone component that should show the form, import and use the selector:
import { QuaptGenericFeedback } from '@quapt/generic-feedback';
@Component({
standalone: true,
imports: [QuaptGenericFeedback],
template: `<quapt-generic-feedback [params]="params" />`,
})
export class FeedbackPageComponent {
params = {
organizationId: 'org-1',
questionnaireType: 'EVENT_BASED',
questionnaireId: 'qn-1',
keyIdentifier: 'optional-qr-or-key', // optional – used to load/validate questionnaire
userInfoValues: { userId: 'u-123', email: '[email protected]' },
skipUserInfoStep: true,
};
}Params (IDs + user info)
Pass a params object so the component can load and submit the questionnaire.
| Property | Required | Description |
|---------------------|----------|-------------|
| organizationId | ✅ | Organization ID |
| questionnaireType | ✅ | Questionnaire type |
| questionnaireId | ✅ | Questionnaire ID |
| keyIdentifier | Optional | Key used to load/validate the questionnaire (e.g. QR key); sent as query param to the load API |
| userInfoValues | Optional | When skipUserInfoStep is true, these values are patched into the submitted payload userInfo |
| skipUserInfoStep | Optional | Skip user info step (default: true) |
Usage
In your template, add the component where the form should appear:
<quapt-generic-feedback [params]="params" />Ensure params is set in your component (see Connect & import above for a full example).
Publish
From repo root: npm run build, then cd dist/generic-based and npm publish.
