mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-19 11:11:05 -05:00
update feedback widget package information
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
{
|
||||
"name": "@formbricks/feedback",
|
||||
"version": "0.2.1",
|
||||
"version": "0.3.0",
|
||||
"source": "src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"main": "./dist/index.cjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"jsdelivr": "./dist/index.umd.js",
|
||||
"unpkg": "./dist/index.umd.js",
|
||||
"type": "module",
|
||||
"license": "Apache-2.0",
|
||||
"exports": {
|
||||
"types": "./dist/src/index.d.ts",
|
||||
"require": "./dist/index.cjs",
|
||||
"default": "./dist/index.modern.js"
|
||||
},
|
||||
"module": "./dist/index.module.js",
|
||||
"module": "./dist/index.js",
|
||||
"scripts": {
|
||||
"build": "node ./html-to-ts && microbundle --define process.env.NODE_ENV=production",
|
||||
"dev": "node ./html-to-ts && microbundle watch --define process.env.NODE_ENV=production",
|
||||
|
||||
@@ -52,15 +52,19 @@ const trap = createFocusTrap(containerElement, {
|
||||
|
||||
function applyConfig() {
|
||||
if (config.contact) {
|
||||
//@ts-ignore
|
||||
const contactNameElements = document.getElementsByClassName("formbricks__contact-name");
|
||||
//@ts-ignore
|
||||
for (const elem of contactNameElements) {
|
||||
elem.innerHTML = config.contact.name;
|
||||
}
|
||||
const contactPositionElements = document.getElementsByClassName("formbricks__contact-position");
|
||||
//@ts-ignore
|
||||
for (const elem of contactPositionElements) {
|
||||
elem.innerHTML = config.contact.position;
|
||||
}
|
||||
const contactImageElements = document.getElementsByClassName("formbricks__contact-image");
|
||||
//@ts-ignore
|
||||
for (const elem of contactImageElements) {
|
||||
(<HTMLImageElement>elem).src = config.contact.imgUrl;
|
||||
}
|
||||
@@ -225,6 +229,7 @@ function changeType(e: Event) {
|
||||
if (typeSwitchElem !== null && typeElem !== null) {
|
||||
// replace children with feedback type elements (icon & text)
|
||||
typeSwitchElem.innerHTML = "";
|
||||
//@ts-ignore
|
||||
typeSwitchElem.replaceChildren(...typeElem.cloneNode(true).childNodes);
|
||||
// add chevron
|
||||
const chevronElem = document.createElement("div");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"extends": "@formbricks/tsconfig/base.json",
|
||||
"extends": "@formbricks/tsconfig/js-library.json",
|
||||
"include": ["src", "types"]
|
||||
}
|
||||
|
||||
14
packages/tsconfig/js-library.json
Normal file
14
packages/tsconfig/js-library.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"display": "Node 16",
|
||||
"extends": "./base.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["ESNext", "DOM"],
|
||||
"module": "esnext",
|
||||
"target": "ES2021",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user