Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc16ec5
commit 2563996
Showing
16 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
items: | ||
- 1.png | ||
--- | ||
|
||
{DESCRIPTION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { createDefaultInstallation } from "@calcom/app-store/_utils/installation"; | ||
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler"; | ||
|
||
import appConfig from "../config.json"; | ||
|
||
const handler: AppDeclarativeHandler = { | ||
appType: appConfig.type, | ||
variant: appConfig.variant, | ||
slug: appConfig.slug, | ||
supportsMultipleInstalls: false, | ||
handlerType: "add", | ||
createCredential: ({ appType, user, slug, teamId }) => | ||
createDefaultInstallation({ appType, user: user, slug, key: {}, teamId }), | ||
}; | ||
|
||
export default handler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as add } from "./add"; |
35 changes: 35 additions & 0 deletions
35
packages/app-store/twipla/components/EventTypeAppCardInterface.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { useAppContextWithSchema } from "@calcom/app-store/EventTypeAppContext"; | ||
import AppCard from "@calcom/app-store/_components/AppCard"; | ||
import useIsAppEnabled from "@calcom/app-store/_utils/useIsAppEnabled"; | ||
import type { EventTypeAppCardComponent } from "@calcom/app-store/types"; | ||
import { TextField } from "@calcom/ui"; | ||
|
||
import type { appDataSchema } from "../zod"; | ||
|
||
const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ app, eventType }) { | ||
const { getAppData, setAppData, disabled } = useAppContextWithSchema<typeof appDataSchema>(); | ||
const siteId = getAppData("SITE_ID"); | ||
const { enabled, updateEnabled } = useIsAppEnabled(app); | ||
|
||
return ( | ||
<AppCard | ||
app={app} | ||
switchOnClick={(e) => { | ||
updateEnabled(e); | ||
}} | ||
switchChecked={enabled} | ||
teamId={eventType.team?.id || undefined}> | ||
<TextField | ||
disabled={disabled} | ||
name="Site ID" | ||
value={siteId} | ||
placeholder="Enter your Site ID" | ||
onChange={(e) => { | ||
setAppData("SITE_ID", e.target.value); | ||
}} | ||
/> | ||
</AppCard> | ||
); | ||
}; | ||
|
||
export default EventTypeAppCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "Twipla", | ||
"slug": "twipla", | ||
"type": "twipla_analytics", | ||
"logo": "icon.svg", | ||
"url": "https://cal.com/", | ||
"variant": "analytics", | ||
"categories": ["analytics"], | ||
"publisher": "Cal.com, Inc.", | ||
"email": "help@cal.com", | ||
"description": "Twipla.com, formerly known as Visitor Analytics, is a website intelligence platform that helps you understand how visitors interact with your website.", | ||
"extendsFeature": "EventType", | ||
"appData": { | ||
"tag": { | ||
"scripts": [ | ||
{ | ||
"content": "(function(v, i, s, a, t) {\n v[t] = v[t] || function() {\n (v[t].v = v[t].v || []).push(arguments);\n };\n if (!v._visaSettings) {\n v._visaSettings = {};\n }\n v._visaSettings[a] = {\n v: '1.0',\n s: a,\n a: '1',\n t: t\n };\n var b = i.getElementsByTagName('body')[0];\n var p = i.createElement('script');\n p.defer = 1;\n p.async = 1;\n p.src = s + '?s=' + a;\n b.appendChild(p);\n})(window, document, '//app-worker.visitor-analytics.io/main.js', '{SITE_ID}', 'va');" | ||
} | ||
] | ||
} | ||
}, | ||
"isTemplate": false, | ||
"__createdUsingCli": true, | ||
"__template": "booking-pages-tag" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * as api from "./api"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/package.json", | ||
"private": true, | ||
"name": "@calcom/twipla", | ||
"version": "0.0.0", | ||
"main": "./index.ts", | ||
"dependencies": { | ||
"@calcom/lib": "*" | ||
}, | ||
"devDependencies": { | ||
"@calcom/types": "*" | ||
}, | ||
"description": "Twipla.com, formerly known as Visitor Analytics, is a website intelligence platform that helps you understand how visitors interact with your website." | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { z } from "zod"; | ||
|
||
import { eventTypeAppCardZod } from "@calcom/app-store/eventTypeAppCardZod"; | ||
|
||
export const appDataSchema = eventTypeAppCardZod.merge( | ||
z.object({ | ||
SITE_ID: z.string().optional(), | ||
}) | ||
); | ||
|
||
export const appKeysSchema = z.object({}); |