feat: umami app added (#14783)
Co-authored-by: Hariom <hariombalhara@gmail.com>
This commit is contained in:
@@ -46,6 +46,7 @@ export const EventTypeAddonMap = {
|
||||
import("./templates/event-type-app-card/components/EventTypeAppCardInterface")
|
||||
),
|
||||
twipla: dynamic(() => import("./twipla/components/EventTypeAppCardInterface")),
|
||||
umami: dynamic(() => import("./umami/components/EventTypeAppCardInterface")),
|
||||
"zoho-bigin": dynamic(() => import("./zoho-bigin/components/EventTypeAppCardInterface")),
|
||||
zohocrm: dynamic(() => import("./zohocrm/components/EventTypeAppCardInterface")),
|
||||
};
|
||||
|
||||
@@ -37,6 +37,7 @@ import { appKeysSchema as tandemvideo_zod_ts } from "./tandemvideo/zod";
|
||||
import { appKeysSchema as booking_pages_tag_zod_ts } from "./templates/booking-pages-tag/zod";
|
||||
import { appKeysSchema as event_type_app_card_zod_ts } from "./templates/event-type-app-card/zod";
|
||||
import { appKeysSchema as twipla_zod_ts } from "./twipla/zod";
|
||||
import { appKeysSchema as umami_zod_ts } from "./umami/zod";
|
||||
import { appKeysSchema as vital_zod_ts } from "./vital/zod";
|
||||
import { appKeysSchema as webex_zod_ts } from "./webex/zod";
|
||||
import { appKeysSchema as wordpress_zod_ts } from "./wordpress/zod";
|
||||
@@ -82,6 +83,7 @@ export const appKeysSchemas = {
|
||||
"booking-pages-tag": booking_pages_tag_zod_ts,
|
||||
"event-type-app-card": event_type_app_card_zod_ts,
|
||||
twipla: twipla_zod_ts,
|
||||
umami: umami_zod_ts,
|
||||
vital: vital_zod_ts,
|
||||
webex: webex_zod_ts,
|
||||
wordpress: wordpress_zod_ts,
|
||||
|
||||
@@ -77,6 +77,7 @@ import general_app_settings_config_json from "./templates/general-app-settings/c
|
||||
import link_as_an_app_config_json from "./templates/link-as-an-app/config.json";
|
||||
import twipla_config_json from "./twipla/config.json";
|
||||
import typeform_config_json from "./typeform/config.json";
|
||||
import umami_config_json from "./umami/config.json";
|
||||
import vimcal_config_json from "./vimcal/config.json";
|
||||
import { metadata as vital__metadata_ts } from "./vital/_metadata";
|
||||
import weather_in_your_calendar_config_json from "./weather_in_your_calendar/config.json";
|
||||
@@ -167,6 +168,7 @@ export const appStoreMetadata = {
|
||||
"link-as-an-app": link_as_an_app_config_json,
|
||||
twipla: twipla_config_json,
|
||||
typeform: typeform_config_json,
|
||||
umami: umami_config_json,
|
||||
vimcal: vimcal_config_json,
|
||||
vital: vital__metadata_ts,
|
||||
weather_in_your_calendar: weather_in_your_calendar_config_json,
|
||||
|
||||
@@ -37,6 +37,7 @@ import { appDataSchema as tandemvideo_zod_ts } from "./tandemvideo/zod";
|
||||
import { appDataSchema as booking_pages_tag_zod_ts } from "./templates/booking-pages-tag/zod";
|
||||
import { appDataSchema as event_type_app_card_zod_ts } from "./templates/event-type-app-card/zod";
|
||||
import { appDataSchema as twipla_zod_ts } from "./twipla/zod";
|
||||
import { appDataSchema as umami_zod_ts } from "./umami/zod";
|
||||
import { appDataSchema as vital_zod_ts } from "./vital/zod";
|
||||
import { appDataSchema as webex_zod_ts } from "./webex/zod";
|
||||
import { appDataSchema as wordpress_zod_ts } from "./wordpress/zod";
|
||||
@@ -82,6 +83,7 @@ export const appDataSchemas = {
|
||||
"booking-pages-tag": booking_pages_tag_zod_ts,
|
||||
"event-type-app-card": event_type_app_card_zod_ts,
|
||||
twipla: twipla_zod_ts,
|
||||
umami: umami_zod_ts,
|
||||
vital: vital_zod_ts,
|
||||
webex: webex_zod_ts,
|
||||
wordpress: wordpress_zod_ts,
|
||||
|
||||
@@ -77,6 +77,7 @@ export const apiHandlers = {
|
||||
"link-as-an-app": import("./templates/link-as-an-app/api"),
|
||||
twipla: import("./twipla/api"),
|
||||
typeform: import("./typeform/api"),
|
||||
umami: import("./umami/api"),
|
||||
vimcal: import("./vimcal/api"),
|
||||
vital: import("./vital/api"),
|
||||
weather_in_your_calendar: import("./weather_in_your_calendar/api"),
|
||||
|
||||
@@ -36,6 +36,7 @@ import telegram_config_json from "./telegram/config.json";
|
||||
import booking_pages_tag_config_json from "./templates/booking-pages-tag/config.json";
|
||||
import event_type_location_video_static_config_json from "./templates/event-type-location-video-static/config.json";
|
||||
import twipla_config_json from "./twipla/config.json";
|
||||
import umami_config_json from "./umami/config.json";
|
||||
import webex_config_json from "./webex/config.json";
|
||||
import whatsapp_config_json from "./whatsapp/config.json";
|
||||
import whereby_config_json from "./whereby/config.json";
|
||||
@@ -76,6 +77,7 @@ export const appStoreMetadata = {
|
||||
"booking-pages-tag": booking_pages_tag_config_json,
|
||||
"event-type-location-video-static": event_type_location_video_static_config_json,
|
||||
twipla: twipla_config_json,
|
||||
umami: umami_config_json,
|
||||
webex: webex_config_json,
|
||||
whatsapp: whatsapp_config_json,
|
||||
whereby: whereby_config_json,
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
items:
|
||||
- 1.png
|
||||
---
|
||||
|
||||
{DESCRIPTION}
|
||||
@@ -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;
|
||||
@@ -0,0 +1 @@
|
||||
export { default as add } from "./add";
|
||||
@@ -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;
|
||||
@@ -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"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * as api from "./api";
|
||||
@@ -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."
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 107 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 428 389.11"><g data-name="Layer 2"><g data-name="Layer 4"><circle cx="214.15" cy="181" r="171" fill="#fff" stroke="#000" stroke-miterlimit="10" stroke-width="20"></circle><path d="M413 134.11H15.29a15 15 0 0 0-15 15v15.3C.12 168 0 171.52 0 175.11c0 118.19 95.81 214 214 214 116.4 0 211.1-92.94 213.93-208.67 0-.44.07-.88.07-1.33v-30a15 15 0 0 0-15-15"></path></g></g></svg>
|
||||
|
After Width: | Height: | Size: 451 B |
@@ -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({});
|
||||
Reference in New Issue
Block a user