(
@@ -161,6 +163,15 @@ export function BarList({
? () => onToggleFilter(data.filterValue!)
: undefined
: undefined,
+ onRowClick:
+ data.filterValue && onRowFilterItem
+ ? !limit
+ ? () => {
+ onRowFilterItem(data.filterValue!);
+ setShowModal(false);
+ }
+ : () => onRowFilterItem(data.filterValue!)
+ : undefined,
}));
const filterButtons = hasSelection &&
@@ -291,6 +302,7 @@ export function LineItem({
isSelected,
isActivelyFiltered,
onFilterClick,
+ onRowClick,
href,
}: {
icon: ReactNode;
@@ -310,6 +322,7 @@ export function LineItem({
isSelected?: boolean;
isActivelyFiltered?: boolean;
onFilterClick?: () => void;
+ onRowClick?: () => void;
href?: string;
}) {
const [isHovered, setIsHovered] = useState(false);
@@ -414,16 +427,19 @@ export function LineItem({
);
const rowClickable =
- (onFilterClick && !isActivelyFiltered) || (!!href && !onFilterClick);
+ (!isActivelyFiltered && (!!onRowClick || !!onFilterClick)) ||
+ (!!href && !onFilterClick && !onRowClick);
return (
setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
onClick={() => {
- if (onFilterClick && !isActivelyFiltered) {
+ if (onRowClick && !isActivelyFiltered) {
+ onRowClick();
+ } else if (onFilterClick && !isActivelyFiltered) {
onFilterClick();
- } else if (href && !onFilterClick) {
+ } else if (href && !onFilterClick && !onRowClick) {
router.push(href);
setShowModal(false);
}
diff --git a/apps/web/ui/analytics/device-section.tsx b/apps/web/ui/analytics/device-section.tsx
index fd613b4dae4..daef3262524 100644
--- a/apps/web/ui/analytics/device-section.tsx
+++ b/apps/web/ui/analytics/device-section.tsx
@@ -39,9 +39,12 @@ export function DeviceSection() {
const onApplyFilterValues = useCallback(
(values: string[]) => {
if (values.length === 0) {
- queryParams({ del: singularTabName });
+ queryParams({ del: singularTabName, scroll: false });
} else {
- queryParams({ set: { [singularTabName]: values.join(",") } });
+ queryParams({
+ set: { [singularTabName]: values.join(",") },
+ scroll: false,
+ });
}
setSelectedItems([]);
},
@@ -129,6 +132,7 @@ export function DeviceSection() {
onClearFilter={onClearFilter}
onClearSelection={() => setSelectedItems([])}
onApplyFilterValues={onApplyFilterValues}
+ onRowFilterItem={(val) => onApplyFilterValues([val])}
{...(limit && { limit })}
/>
) : (
diff --git a/apps/web/ui/analytics/location-section.tsx b/apps/web/ui/analytics/location-section.tsx
index e29da4b3d23..a8f5303362d 100644
--- a/apps/web/ui/analytics/location-section.tsx
+++ b/apps/web/ui/analytics/location-section.tsx
@@ -46,9 +46,12 @@ export function LocationSection() {
const onApplyFilterValues = useCallback(
(values: string[]) => {
if (values.length === 0) {
- queryParams({ del: singularTabName });
+ queryParams({ del: singularTabName, scroll: false });
} else {
- queryParams({ set: { [singularTabName]: values.join(",") } });
+ queryParams({
+ set: { [singularTabName]: values.join(",") },
+ scroll: false,
+ });
}
setSelectedItems([]);
},
@@ -162,6 +165,7 @@ export function LocationSection() {
onClearFilter={onClearFilter}
onClearSelection={() => setSelectedItems([])}
onApplyFilterValues={onApplyFilterValues}
+ onRowFilterItem={(val) => onApplyFilterValues([val])}
{...(limit && { limit })}
/>
) : (
diff --git a/apps/web/ui/analytics/partner-section.tsx b/apps/web/ui/analytics/partner-section.tsx
index 78aabef2c53..4451b437b75 100644
--- a/apps/web/ui/analytics/partner-section.tsx
+++ b/apps/web/ui/analytics/partner-section.tsx
@@ -112,9 +112,12 @@ export function PartnerSection() {
(values: string[]) => {
if (!filterParamKey) return;
if (values.length === 0) {
- queryParams({ del: filterParamKey });
+ queryParams({ del: filterParamKey, scroll: false });
} else {
- queryParams({ set: { [filterParamKey]: values.join(",") } });
+ queryParams({
+ set: { [filterParamKey]: values.join(",") },
+ scroll: false,
+ });
}
setSelectedItems([]);
},
@@ -258,6 +261,9 @@ export function PartnerSection() {
onApplyFilterValues={
filterParamKey ? onApplyFilterValues : undefined
}
+ onRowFilterItem={
+ filterParamKey ? (val) => onApplyFilterValues([val]) : undefined
+ }
{...(limit && { limit })}
/>
) : (
diff --git a/apps/web/ui/analytics/referrers-utms.tsx b/apps/web/ui/analytics/referrers-utms.tsx
index 6677c8bcb16..bf7bb4bd821 100644
--- a/apps/web/ui/analytics/referrers-utms.tsx
+++ b/apps/web/ui/analytics/referrers-utms.tsx
@@ -78,9 +78,12 @@ export function ReferrersUTMs() {
const onApplyFilterValues = useCallback(
(values: string[]) => {
if (values.length === 0) {
- queryParams({ del: singularTabName });
+ queryParams({ del: singularTabName, scroll: false });
} else {
- queryParams({ set: { [singularTabName]: values.join(",") } });
+ queryParams({
+ set: { [singularTabName]: values.join(",") },
+ scroll: false,
+ });
}
setSelectedItems([]);
},
@@ -216,6 +219,7 @@ export function ReferrersUTMs() {
onClearFilter={onClearFilter}
onClearSelection={() => setSelectedItems([])}
onApplyFilterValues={onApplyFilterValues}
+ onRowFilterItem={(val) => onApplyFilterValues([val])}
{...(limit && { limit })}
/>
) : (
diff --git a/apps/web/ui/analytics/top-links.tsx b/apps/web/ui/analytics/top-links.tsx
index 34525ec0d23..5ec86aff539 100644
--- a/apps/web/ui/analytics/top-links.tsx
+++ b/apps/web/ui/analytics/top-links.tsx
@@ -94,9 +94,12 @@ export function TopLinks() {
if (!filterParamKey) return;
if (values.length === 0) {
- queryParams({ del: filterParamKey });
+ queryParams({ del: filterParamKey, scroll: false });
} else {
- queryParams({ set: { [filterParamKey]: values.join(",") } });
+ queryParams({
+ set: { [filterParamKey]: values.join(",") },
+ scroll: false,
+ });
}
setSelectedItems([]);
@@ -251,6 +254,9 @@ export function TopLinks() {
onApplyFilterValues={
filterParamKey ? onApplyFilterValues : undefined
}
+ onRowFilterItem={
+ filterParamKey ? (val) => onApplyFilterValues([val]) : undefined
+ }
{...(limit && { limit })}
/>
) : (
diff --git a/packages/stripe-app/stripe-app.json b/packages/stripe-app/stripe-app.json
index fc0284b5f29..f5f6df1ec47 100644
--- a/packages/stripe-app/stripe-app.json
+++ b/packages/stripe-app/stripe-app.json
@@ -1,8 +1,25 @@
{
+ "$schema": "https://stripe.com/stripe-app.schema.json",
"id": "dub.co",
- "version": "0.0.19",
"name": "Dub Partners",
+ "version": "0.0.23",
"icon": "./stripe-icon.png",
+ "ui_extension": {
+ "views": [
+ {
+ "viewport": "settings",
+ "component": "AppSettings"
+ }
+ ],
+ "content_security_policy": {
+ "connect-src": [
+ "https://api.dub.co/oauth/",
+ "https://api.dub.co/stripe/integration"
+ ],
+ "purpose": ""
+ }
+ },
+ "extensions": null,
"permissions": [
{
"permission": "customer_read",
@@ -61,32 +78,14 @@
"purpose": "Allows Dub to read promotion codes for an account."
}
],
- "ui_extension": {
- "views": [
- {
- "viewport": "settings",
- "component": "AppSettings"
- }
- ],
- "content_security_policy": {
- "connect-src": [
- "https://api.dub.co/oauth/",
- "https://api-staging.dub.co/oauth/",
- "https://api.dub.co/stripe/integration",
- "https://api-staging.dub.co/stripe/integration"
- ],
- "image-src": null,
- "purpose": ""
- }
- },
"post_install_action": {
"type": "settings",
"url": ""
},
"allowed_redirect_uris": [
- "https://app.dub.co/api/stripe/integration/callback",
- "https://preview.dub.co/api/stripe/integration/callback"
+ "https://app.dub.co/api/stripe/integration/callback"
],
+ "distribution_type": "public",
"stripe_api_access_type": "oauth",
- "distribution_type": "public"
+ "sandbox_install_compatible": true
}
\ No newline at end of file
diff --git a/packages/ui/src/status-badge.tsx b/packages/ui/src/status-badge.tsx
index 5435722585f..738e78d225d 100644
--- a/packages/ui/src/status-badge.tsx
+++ b/packages/ui/src/status-badge.tsx
@@ -11,7 +11,7 @@ import {
import { DynamicTooltipWrapper } from "./tooltip";
const statusBadgeVariants = cva(
- "flex gap-1.5 items-center max-w-fit rounded-md px-2 py-1 text-xs font-medium whitespace-nowrap",
+ "flex gap-1.5 items-center max-w-fit max-h-fit rounded-md px-2 py-1 text-xs font-medium whitespace-nowrap",
{
variants: {
variant: {
diff --git a/packages/ui/tsup.config.ts b/packages/ui/tsup.config.ts
index 9eb078d4240..0a38c590afa 100644
--- a/packages/ui/tsup.config.ts
+++ b/packages/ui/tsup.config.ts
@@ -6,7 +6,6 @@ export default defineConfig((options: Options) => ({
"icons/index": "src/icons/index.tsx",
"charts/index": "src/charts/index.ts",
},
-
format: ["esm"],
esbuildOptions(options) {
options.banner = {
@@ -15,6 +14,7 @@ export default defineConfig((options: Options) => ({
},
dts: true,
minify: true,
+ clean: true,
external: ["react"],
...options,
}));
diff --git a/packages/utils/src/constants/dub-domains.ts b/packages/utils/src/constants/dub-domains.ts
index 1a08002ad5e..623560896e2 100644
--- a/packages/utils/src/constants/dub-domains.ts
+++ b/packages/utils/src/constants/dub-domains.ts
@@ -71,6 +71,7 @@ export const DUB_DOMAINS = [
placeholder: "https://cal.com/steven",
allowedHostnames: [
"app.acuityscheduling.com",
+ "app.apollo.io",
"cal.com",
"calendly.com",
"calendar.app.google",
diff --git a/packages/utils/tsup.config.ts b/packages/utils/tsup.config.ts
index 7a44221ff9a..75950b54657 100644
--- a/packages/utils/tsup.config.ts
+++ b/packages/utils/tsup.config.ts
@@ -5,6 +5,7 @@ export default defineConfig((options: Options) => ({
format: ["esm"],
dts: true,
minify: true,
+ clean: true,
external: ["react"],
...options,
}));