-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Hariom <hariombalhara@gmail.com>
- Loading branch information
1 parent
745f0b0
commit d666f29
Showing
16 changed files
with
123 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/umami/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,28 @@ | ||
{ | ||
"name": "Umami", | ||
"slug": "umami", | ||
"type": "umami_analytics", | ||
"logo": "icon.svg", | ||
"url": "https://cal.com/", | ||
"variant": "analytics", | ||
"categories": ["analytics"], | ||
"publisher": "Cal.com, Inc.", | ||
"email": "help@cal.com", | ||
"description": "Umami makes it easy to collect, analyze, and understand your web data — while maintaining visitor privacy and data ownership.", | ||
"extendsFeature": "EventType", | ||
"appData": { | ||
"tag": { | ||
"scripts": [ | ||
{ | ||
"src": "https://us.umami.is/script.js", | ||
"attrs": { | ||
"data-website-id": "{SITE_ID}" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"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/umami", | ||
"version": "0.0.0", | ||
"main": "./index.ts", | ||
"dependencies": { | ||
"@calcom/lib": "*" | ||
}, | ||
"devDependencies": { | ||
"@calcom/types": "*" | ||
}, | ||
"description": "Umami makes it easy to collect, analyze, and understand your web data — while maintaining visitor privacy and data ownership." | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
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({}); |