repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(payload)/api/graphql-playground/route.ts | src/app/(payload)/api/graphql-playground/route.ts | /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
import config from '@payload-config'
import '@payloadcms/next/css'
import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes'
export const GET = GRAPHQL_PLAYGROUND_GET(config)
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/not-found.tsx | src/app/(frontend)/not-found.tsx | import Link from "next/link";
import React from "react";
import { Button } from "@/components/ui/button";
export default function NotFound() {
return (
<div className="container py-28">
<div className="prose max-w-none">
<h1 style={{ marginBottom: 0 }}>404</h1>
<p className="mb-4">This pag... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/cartProducts/route.ts | src/app/(frontend)/next/cartProducts/route.ts | import { getPayload } from "payload";
import { type Locale } from "@/i18n/config";
import { getFilledProducts } from "@/lib/getFilledProducts";
import { getTotal } from "@/lib/getTotal";
import { type Cart } from "@/stores/CartStore/types";
import config from "@payload-config";
export async function POST(req: Request... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/wishlist/route.ts | src/app/(frontend)/next/wishlist/route.ts | import { getPayload } from "payload";
import { type WishList } from "@/stores/WishlistStore/types";
import { getCustomer } from "@/utilities/getCustomer";
import config from "@payload-config";
export async function POST(req: Request) {
try {
const contentLength = req.headers.get("content-length");
if (!cont... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/inpost/route.ts | src/app/(frontend)/next/inpost/route.ts | import { getPayload } from "payload";
import config from "@payload-config";
type ParcelStatus =
| "created"
| "offers_prepared"
| "offer_selected"
| "confirmed"
| "dispatched_by_sender"
| "collected_from_sender"
| "taken_by_courier"
| "adopted_at_source_branch"
| "sent_from_source_branch"
| "ready... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/reset-password/route.ts | src/app/(frontend)/next/reset-password/route.ts | import { randomBytes } from "crypto";
import { render } from "@react-email/components";
import { getLocale, getTranslations } from "next-intl/server";
import { getPayload } from "payload";
import { ResetPasswordEmail } from "@/components/Emails/ResetPasswordEmail";
import { type Locale } from "@/i18n/config";
import ... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/preview/route.ts | src/app/(frontend)/next/preview/route.ts | import jwt, { type JwtPayload } from "jsonwebtoken";
import { draftMode } from "next/headers";
import { type NextRequest } from "next/server";
import { getPayload, type User } from "payload";
import { type Locale } from "@/i18n/config";
import { redirect } from "@/i18n/routing";
import configPromise from "@payload-con... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/stripe/route.ts | src/app/(frontend)/next/stripe/route.ts | import { getPayload } from "payload";
import Stripe from "stripe";
import { getCachedGlobal } from "@/utilities/getGlobals";
import config from "@payload-config";
export async function POST(req: Request) {
try {
const sig = req.headers.get("stripe-signature") ?? "";
const { stripe: stripeOptions } = await ... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/wishListProducts/route.ts | src/app/(frontend)/next/wishListProducts/route.ts | import { getPayload } from "payload";
import { type Locale } from "@/i18n/config";
import { getFilledProducts } from "@/lib/getFilledProducts";
import { type WishList } from "@/stores/WishlistStore/types";
import config from "@payload-config";
export async function POST(req: Request) {
try {
const payload = awa... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/exit-preview/route.ts | src/app/(frontend)/next/exit-preview/route.ts | import { draftMode } from "next/headers";
export async function GET(): Promise<Response> {
const draft = await draftMode();
draft.disable();
return new Response("Draft mode is disabled");
}
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/exit-preview/GET.ts | src/app/(frontend)/next/exit-preview/GET.ts | import { draftMode } from "next/headers";
export async function GET(): Promise<Response> {
const draft = await draftMode();
draft.disable();
return new Response("Draft mode is disabled");
}
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/verify-email/route.ts | src/app/(frontend)/next/verify-email/route.ts | import { getLocale } from "next-intl/server";
import { getPayload } from "payload";
import config from "@payload-config";
export async function GET(req: Request) {
const payload = await getPayload({ config });
try {
const url = new URL(req.url);
const token = url.searchParams.get("token");
if (!token)... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/checkout/route.ts | src/app/(frontend)/next/checkout/route.ts | import { getPayload } from "payload";
import { type Country } from "@/globals/(ecommerce)/Couriers/utils/countryList";
import { type Locale } from "@/i18n/config";
import { getFilledProducts } from "@/lib/getFilledProducts";
import { getTotal } from "@/lib/getTotal";
import { getTotalWeight } from "@/lib/getTotalWeigh... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/printLabel/route.ts | src/app/(frontend)/next/printLabel/route.ts | import { isAxiosError } from "axios";
import { headers as getHeaders } from "next/headers";
import { getLocale } from "next-intl/server";
import { getPayload } from "payload";
import { type Locale } from "@/i18n/config";
import config from "@payload-config";
const createCouriers = async (locale: Locale) => {
const ... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/payment/route.ts | src/app/(frontend)/next/payment/route.ts | import { getPayload } from "payload";
import { type Country } from "@/globals/(ecommerce)/Couriers/utils/countryList";
import { type Locale } from "@/i18n/config";
import { getFilledProducts } from "@/lib/getFilledProducts";
import { getTotal } from "@/lib/getTotal";
import { getTotalWeight } from "@/lib/getTotalWeigh... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/cart/route.ts | src/app/(frontend)/next/cart/route.ts | import { getPayload } from "payload";
import { type Cart } from "@/stores/CartStore/types";
import { getCustomer } from "@/utilities/getCustomer";
import config from "@payload-config";
export async function POST(req: Request) {
try {
const contentLength = req.headers.get("content-length");
if (!contentLengt... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/package/route.ts | src/app/(frontend)/next/package/route.ts | import { isAxiosError } from "axios";
import { headers as getHeaders } from "next/headers";
import { getLocale } from "next-intl/server";
import { getPayload } from "payload";
const createCouriers = async (locale: Locale) => {
const couriersModule = await import("@/globals/(ecommerce)/Couriers/utils/couriersConfig")... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/next/seed/route.ts | src/app/(frontend)/next/seed/route.ts | import { headers } from "next/headers";
import { createLocalReq, getPayload } from "payload";
import { seed } from "@/endpoints/seed";
import config from "@payload-config";
export const maxDuration = 240; // This function can run for a maximum of 240 seconds
export async function POST(): Promise<Response> {
const ... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/(sitemaps)/pages-sitemap.xml/route.ts | src/app/(frontend)/(sitemaps)/pages-sitemap.xml/route.ts | import { unstable_cache } from "next/cache";
import { getServerSideSitemap } from "next-sitemap";
import { getPayload } from "payload";
import config from "@payload-config";
const getPagesSitemap = unstable_cache(
async () => {
const payload = await getPayload({ config });
const SITE_URL =
process.env... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/(sitemaps)/posts-sitemap.xml/route.ts | src/app/(frontend)/(sitemaps)/posts-sitemap.xml/route.ts | import { unstable_cache } from "next/cache";
import { getServerSideSitemap } from "next-sitemap";
import { getPayload } from "payload";
import config from "@payload-config";
const getPostsSitemap = unstable_cache(
async () => {
const payload = await getPayload({ config });
const SITE_URL =
process.env... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/layout.tsx | src/app/(frontend)/[locale]/layout.tsx | // eslint-disable-next-line
import { GeistMono } from "geist/font/mono";
// eslint-disable-next-line
import { GeistSans } from "geist/font/sans";
// import { draftMode } from "next/headers";
import { notFound } from "next/navigation";
import { NextIntlClientProvider } from "next-intl";
import { getMessages, setRequestL... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/not-found.tsx | src/app/(frontend)/[locale]/not-found.tsx | import Link from "next/link";
import React from "react";
import { Button } from "@/components/ui/button";
export default function NotFound() {
return (
<div className="container py-28">
<div className="prose max-w-none">
<h1 style={{ marginBottom: 0 }}>404</h1>
<p className="mb-4">This pag... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/reset-password/page.tsx | src/app/(frontend)/[locale]/reset-password/page.tsx | import { ResetPasswordForm } from "@/components/ResetPasswordForm";
import { redirect } from "@/i18n/routing";
export const dynamic = "force-dynamic";
const ResetPassword = async ({
params,
searchParams,
}: {
params: Promise<{ locale: string }>;
searchParams: Promise<{ token?: string; collection: string }>;
}... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/layout.tsx | src/app/(frontend)/[locale]/(without-cart)/layout.tsx | import { type ReactNode } from "react";
import { Header } from "@/globals/Header/Component";
const WithoutCartLayout = ({ children }: { children: ReactNode }) => {
return (
<>
<Header disableCart />
{children}
</>
);
};
export default WithoutCartLayout;
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/login/page.tsx | src/app/(frontend)/[locale]/(without-cart)/login/page.tsx | import { LoginPageWithoutOAuth } from "@/components/(ecommerce)/LoginPage/WithoutOAuth";
import { type Locale } from "@/i18n/config";
import { redirect } from "@/i18n/routing";
import { getCustomer } from "@/utilities/getCustomer";
import { getCachedGlobal } from "@/utilities/getGlobals";
export const dynamic = "force... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/admin/page.tsx | src/app/(frontend)/[locale]/(without-cart)/admin/page.tsx | import { redirect } from "next/navigation";
export const dynamic = "force-dynamic";
const Page = () => {
redirect("/admin");
};
export default Page;
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/posts/page.tsx | src/app/(frontend)/[locale]/(without-cart)/posts/page.tsx | import { getLocale } from "next-intl/server";
import { getPayload } from "payload";
import React from "react";
import { CollectionArchive } from "@/components/CollectionArchive";
import { PageRange } from "@/components/PageRange";
import { Pagination } from "@/components/Pagination";
import { type Locale } from "@/i18... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/posts/page.client.tsx | src/app/(frontend)/[locale]/(without-cart)/posts/page.client.tsx | "use client";
import React, { useEffect } from "react";
import { useHeaderTheme } from "@/providers/HeaderTheme";
const PageClient = () => {
/* Force the header to be dark mode while we have an image behind it */
const { setHeaderTheme } = useHeaderTheme();
useEffect(() => {
setHeaderTheme("light");
}, [... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/posts/[slug]/page.tsx | src/app/(frontend)/[locale]/(without-cart)/posts/[slug]/page.tsx | import { draftMode } from "next/headers";
import { getPayload } from "payload";
import React, { cache } from "react";
import { RelatedPosts } from "@/blocks/RelatedPosts/Component";
import { LivePreviewListener } from "@/components/LivePreviewListener";
import { PayloadRedirects } from "@/components/PayloadRedirects";... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/posts/[slug]/page.client.tsx | src/app/(frontend)/[locale]/(without-cart)/posts/[slug]/page.client.tsx | "use client";
import React, { useEffect } from "react";
import { useHeaderTheme } from "@/providers/HeaderTheme";
const PageClient = () => {
/* Force the header to be dark mode while we have an image behind it */
const { setHeaderTheme } = useHeaderTheme();
useEffect(() => {
setHeaderTheme("dark");
}, [s... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/posts/page/[pageNumber]/page.tsx | src/app/(frontend)/[locale]/(without-cart)/posts/page/[pageNumber]/page.tsx | import { notFound } from "next/navigation";
import { getPayload } from "payload";
import React from "react";
import { CollectionArchive } from "@/components/CollectionArchive";
import { PageRange } from "@/components/PageRange";
import { Pagination } from "@/components/Pagination";
import { type Locale } from "@/i18n/... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/posts/page/[pageNumber]/page.client.tsx | src/app/(frontend)/[locale]/(without-cart)/posts/page/[pageNumber]/page.client.tsx | "use client";
import React, { useEffect } from "react";
import { useHeaderTheme } from "@/providers/HeaderTheme";
const PageClient = () => {
/* Force the header to be dark mode while we have an image behind it */
const { setHeaderTheme } = useHeaderTheme();
useEffect(() => {
setHeaderTheme("light");
}, [... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/checkout/page.tsx | src/app/(frontend)/[locale]/(without-cart)/checkout/page.tsx | import { Checkout } from "@/globals/(ecommerce)/Layout/Checkout/Component";
import { type Locale } from "@/i18n/config";
export const dynamic = "force-dynamic";
const CheckoutPage = async ({ params }: { params: Promise<{ locale: Locale }> }) => {
const { locale } = await params;
return <Checkout locale={locale} /... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/postSearch/page.tsx | src/app/(frontend)/[locale]/(without-cart)/postSearch/page.tsx | import { getLocale } from "next-intl/server";
import { getPayload } from "payload";
import React from "react";
import { type CardPostData } from "@/components/Card";
import { CollectionArchive } from "@/components/CollectionArchive";
import { Search } from "@/components/search/Component";
import { type Locale } from "... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/postSearch/page.client.tsx | src/app/(frontend)/[locale]/(without-cart)/postSearch/page.client.tsx | "use client";
import React, { useEffect } from "react";
import { useHeaderTheme } from "@/providers/HeaderTheme";
const PageClient = () => {
/* Force the header to be dark mode while we have an image behind it */
const { setHeaderTheme } = useHeaderTheme();
useEffect(() => {
setHeaderTheme("light");
}, [... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(without-cart)/register/page.tsx | src/app/(frontend)/[locale]/(without-cart)/register/page.tsx | import { RegisterPageWithoutOAuth } from "@/components/(ecommerce)/RegisterPage/WithoutOAuth";
import { type Locale } from "@/i18n/config";
import { redirect } from "@/i18n/routing";
import { getCustomer } from "@/utilities/getCustomer";
import { getCachedGlobal } from "@/utilities/getGlobals";
export const dynamic = ... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/layout.tsx | src/app/(frontend)/[locale]/(with-cart)/layout.tsx | import { type ReactNode } from "react";
import { SynchronizeCart } from "@/components/(ecommerce)/Cart/SynchronizeCart";
import { Cart } from "@/globals/(ecommerce)/Layout/Cart/Component";
import { WishList } from "@/globals/(ecommerce)/Layout/WishList/Component";
import { Header } from "@/globals/Header/Component";
... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/page.tsx | src/app/(frontend)/[locale]/(with-cart)/page.tsx | import PageTemplate, { generateMetadata } from "./[slug]/page";
export const dynamic = "force-dynamic";
export default PageTemplate;
export { generateMetadata };
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/[slug]/page.tsx | src/app/(frontend)/[locale]/(with-cart)/[slug]/page.tsx | import { draftMode } from "next/headers";
import { setRequestLocale } from "next-intl/server";
import { getPayload } from "payload";
import React, { cache } from "react";
import { RenderBlocks } from "@/blocks/RenderBlocks";
import { PayloadRedirects } from "@/components/PayloadRedirects";
import { RenderHero } from "... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/[slug]/page.client.tsx | src/app/(frontend)/[locale]/(with-cart)/[slug]/page.client.tsx | "use client";
import React, { useEffect } from "react";
import { useHeaderTheme } from "@/providers/HeaderTheme";
const PageClient = () => {
/* Force the header to be dark mode while we have an image behind it */
const { setHeaderTheme } = useHeaderTheme();
useEffect(() => {
setHeaderTheme("light");
}, [... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/category/[slug]/page.tsx | src/app/(frontend)/[locale]/(with-cart)/category/[slug]/page.tsx | import { notFound } from "next/navigation";
import { getLocale } from "next-intl/server";
import { getPayload, type Sort } from "payload";
import { ProductList } from "@/globals/(ecommerce)/Layout/ProductList/Component";
import { type Locale } from "@/i18n/config";
import config from "@payload-config";
const Category... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/category/[slug]/[subslug]/page.tsx | src/app/(frontend)/[locale]/(with-cart)/category/[slug]/[subslug]/page.tsx | import { notFound } from "next/navigation";
import { getLocale } from "next-intl/server";
import { getPayload, type Sort } from "payload";
import { ProductList } from "@/globals/(ecommerce)/Layout/ProductList/Component";
import { type Locale } from "@/i18n/config";
import config from "@payload-config";
const Subcateg... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/product/[slug]/page.tsx | src/app/(frontend)/[locale]/(with-cart)/product/[slug]/page.tsx | import { notFound } from "next/navigation";
import { getLocale } from "next-intl/server";
import { getPayload } from "payload";
import { ProductDetails } from "@/globals/(ecommerce)/Layout/ProductDetails/Component";
import { type Locale } from "@/i18n/config";
import config from "@payload-config";
const ProductPage =... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/account/layout.tsx | src/app/(frontend)/[locale]/(with-cart)/account/layout.tsx | import { setRequestLocale } from "next-intl/server";
import { type ReactNode } from "react";
import { ClientPanel } from "@/globals/(ecommerce)/Layout/ClientPanel/Component";
import { type Locale } from "@/i18n/config";
import { redirect } from "@/i18n/routing";
import { getCustomer } from "@/utilities/getCustomer";
... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/account/page.tsx | src/app/(frontend)/[locale]/(with-cart)/account/page.tsx | import { setRequestLocale } from "next-intl/server";
import { type Locale } from "@/i18n/config";
import { redirect } from "@/i18n/routing";
export const dynamic = "force-dynamic";
const Page = async ({ params }: { params: Promise<{ locale: Locale }> }) => {
const { locale } = await params;
setRequestLocale(local... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/account/help/page.tsx | src/app/(frontend)/[locale]/(with-cart)/account/help/page.tsx | import { setRequestLocale } from "next-intl/server";
import { ClientHelp } from "@/globals/(ecommerce)/Layout/ClientPanel/Help/Component";
import { type Locale } from "@/i18n/config";
const HelpPage = async ({ params }: { params: Promise<{ locale: Locale }> }) => {
const { locale } = await params;
setRequestLocal... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/account/settings/page.tsx | src/app/(frontend)/[locale]/(with-cart)/account/settings/page.tsx | import { setRequestLocale } from "next-intl/server";
import { Settings } from "@/globals/(ecommerce)/Layout/ClientPanel/Settings";
import { type Locale } from "@/i18n/config";
import { getCustomer } from "@/utilities/getCustomer";
const SettingsPage = async ({ params }: { params: Promise<{ locale: Locale }> }) => {
... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/account/orders/page.tsx | src/app/(frontend)/[locale]/(with-cart)/account/orders/page.tsx | import { Orders } from "@/globals/(ecommerce)/Layout/ClientPanel/Orders/Component";
export const dynamic = "force-dynamic";
const OrdersPage = () => {
return <Orders />;
};
export default OrdersPage;
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/account/orders-data/page.tsx | src/app/(frontend)/[locale]/(with-cart)/account/orders-data/page.tsx | import { revalidateTag } from "next/cache";
import { setRequestLocale } from "next-intl/server";
import { OrdersData } from "@/globals/(ecommerce)/Layout/ClientPanel/OrdersData/Component";
import { type Locale } from "@/i18n/config";
import { getCustomer } from "@/utilities/getCustomer";
async function updateCustomer... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/order/[id]/page.tsx | src/app/(frontend)/[locale]/(with-cart)/order/[id]/page.tsx | import { getTranslations } from "next-intl/server";
import { getPayload } from "payload";
import { Media as MediaComponent } from "@/components/Media";
import RichText from "@/components/RichText";
import { type Locale } from "@/i18n/config";
import { Link } from "@/i18n/routing";
import { type Media } from "@/payload... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/app/(frontend)/[locale]/(with-cart)/search/page.tsx | src/app/(frontend)/[locale]/(with-cart)/search/page.tsx | import { getTranslations } from "next-intl/server";
import { getPayload } from "payload";
import { WithInlinePrice } from "@/globals/(ecommerce)/Layout/ProductList/variants/listings/WithInlinePrice";
import { routing } from "@/i18n/routing";
import config from "@payload-config";
export const dynamic = "force-dynamic"... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/endpoints/adminDashboard/getRevenue.ts | src/endpoints/adminDashboard/getRevenue.ts | import { subDays } from "date-fns";
import { type PayloadRequest, type Where } from "payload";
import { type Order } from "@/payload-types";
import { getCachedGlobal } from "@/utilities/getGlobals";
export type RevenueResponse = {
totalRevenue: number;
percentage: number;
};
export const getRevenue = async (req:... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/endpoints/adminDashboard/getChartData.ts | src/endpoints/adminDashboard/getChartData.ts | import { type DefaultTranslationKeys, type TFunction } from "@payloadcms/translations";
import { format, startOfYear, endOfYear } from "date-fns";
import { type PayloadRequest, type Where } from "payload";
import { type CustomTranslationsKeys } from "@/admin/translations/custom-translations";
import { type Order } fro... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/endpoints/adminDashboard/getOrderCount.ts | src/endpoints/adminDashboard/getOrderCount.ts | import { subDays } from "date-fns";
import { type PayloadRequest, type Where } from "payload";
export type OrderCountResponse = {
total: number;
percentage: number;
};
export const getOrderCount = async (req: PayloadRequest) => {
try {
const payload = req.payload;
if (req.method !== "POST") {
ret... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/endpoints/seed/index.ts | src/endpoints/seed/index.ts | import { type PayloadRequest, type Payload, type CollectionSlug, type File } from "payload";
const collections: CollectionSlug[] = [
"categories",
"productCategories",
"productSubCategories",
"products",
"productReviews",
"customers",
"orders",
"media",
"pages",
"posts",
"forms",
"form-submissi... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | true |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/access/authenticated.ts | src/access/authenticated.ts | import type { Administrator } from "@/payload-types";
import type { AccessArgs } from "payload";
type isAuthenticated = (args: AccessArgs<Administrator>) => boolean;
export const authenticated: isAuthenticated = ({ req: { user } }) => {
return Boolean(user?.collection === "administrators");
};
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/access/authenticatedOrPublished.ts | src/access/authenticatedOrPublished.ts | import type { Access } from "payload";
export const authenticatedOrPublished: Access = ({ req: { user } }) => {
if (user?.collection === "administrators") {
return true;
}
return {
_status: {
equals: "published",
},
};
};
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/access/anyone.ts | src/access/anyone.ts | import type { Access } from "payload";
export const anyone: Access = () => true;
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/hooks/populatePublishedAt.ts | src/hooks/populatePublishedAt.ts | import type { CollectionBeforeChangeHook } from "payload";
export const populatePublishedAt: CollectionBeforeChangeHook = ({ data, operation, req }) => {
if (operation === "create" || operation === "update") {
if (req.data && !req.data.publishedAt) {
const now = new Date();
return {
...data,
... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/hooks/revalidateGlobal.ts | src/hooks/revalidateGlobal.ts | /* eslint-disable */
import { revalidateTag } from "next/cache";
import type { GlobalAfterChangeHook } from "payload";
export const revalidateGlobal: GlobalAfterChangeHook = ({ doc, req: { payload, context } }) => {
if (!context.disableRevalidate) {
payload.logger.info(`Revalidating ${doc.globalType}`);
re... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/hooks/revalidateRedirects.ts | src/hooks/revalidateRedirects.ts | /* eslint-disable */
import { revalidateTag } from "next/cache";
import type { CollectionAfterChangeHook } from "payload";
export const revalidateRedirects: CollectionAfterChangeHook = ({ doc, req: { payload } }) => {
payload.logger.info(`Revalidating redirects`);
revalidateTag("redirects");
return doc;
};
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/hooks/use-mobile.tsx | src/hooks/use-mobile.tsx | import * as React from "react";
const MOBILE_BREAKPOINT = 768;
export function useIsMobile() {
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);
React.useEffect(() => {
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
const onChange = () => {
s... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/hooks/formatSlug.ts | src/hooks/formatSlug.ts | /* eslint-disable */
import type { FieldHook } from "payload";
const format = (val: string): string =>
val
.replace(/ /g, "-")
.replace(/[^\w-]+/g, "")
.toLowerCase();
const formatSlug =
(fallback: string): FieldHook =>
({ data, operation, originalDoc, value }) => {
if (typeof value === "string"... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/admin/translations/custom-translations.ts | src/admin/translations/custom-translations.ts | import type { NestedKeysStripped } from "@payloadcms/translations";
export const customTranslationsObject = {
en: {
custom: {
inPostMessage:
"InPost charges fees for generating shipments. Check your balance, customer data and dimensions before creating a shipment.",
generating: "Generating...... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/RenderBlocks.tsx | src/blocks/RenderBlocks.tsx | import { ArchiveBlock } from "@/blocks/ArchiveBlock/Component";
import { CallToActionBlock } from "@/blocks/CallToAction/Component";
import { ContentBlock } from "@/blocks/Content/Component";
import { FormBlock } from "@/blocks/Form/Component";
import { MediaBlock } from "@/blocks/MediaBlock/Component";
import { Hotsp... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/globals.ts | src/blocks/globals.ts | import { cn } from "@/utilities/cn";
export const spacingTopClasses = {
none: "mt-0",
small: "mt-8",
medium: "mt-16",
large: "mt-24",
};
export const spacingBottomClasses = {
none: "mb-0",
small: "mb-8",
medium: "mb-16",
large: "mb-24",
};
export const paddingTopClasses = {
none: "pt-0",
small: "... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/(ecommerce)/Hotspot/config.ts | src/blocks/(ecommerce)/Hotspot/config.ts | import { noBlocksLexical } from "@/fields/noBlocksLexical";
import { marginFields, paddingFields } from "@/fields/spacingFields";
import type { Block } from "payload";
export const Hotspot: Block = {
slug: "hotspotZone",
interfaceName: "hotspotBlock",
labels: {
singular: {
pl: "Strefa hotspot",
... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/(ecommerce)/Hotspot/Component.tsx | src/blocks/(ecommerce)/Hotspot/Component.tsx | import { getPayload } from "payload";
import { type ReactNode } from "react";
import {
paddingBottomClasses,
paddingTopClasses,
spacingBottomClasses,
spacingTopClasses,
} from "@/blocks/globals";
import RichText from "@/components/RichText";
import { WithInlinePrice } from "@/globals/(ecommerce)/Layout/Product... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/(ecommerce)/Hotspot/variants/WithInlinePriceSlider.tsx | src/blocks/(ecommerce)/Hotspot/variants/WithInlinePriceSlider.tsx | import { useTranslations } from "next-intl";
import { type ReactNode } from "react";
import { PriceClient } from "@/components/(ecommerce)/PriceClient";
import { Media } from "@/components/Media";
import {
Carousel,
CarouselContent,
CarouselItem,
CarouselNext,
CarouselPrevious,
} from "@/components/ui/carous... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Carousel/config.ts | src/blocks/Carousel/config.ts | import {
FixedToolbarFeature,
HeadingFeature,
InlineToolbarFeature,
lexicalEditor,
} from "@payloadcms/richtext-lexical";
import { link } from "@/fields/link";
import { marginFields, paddingFields } from "@/fields/spacingFields";
import type { Block, Field } from "payload";
const slideFields: Field[] = [
{... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Carousel/Component.tsx | src/blocks/Carousel/Component.tsx | "use client";
import AutoScrollPlugin from "embla-carousel-auto-scroll";
import AutoplayPlugin from "embla-carousel-autoplay";
import Link from "next/link";
import {
spacingTopClasses,
spacingBottomClasses,
paddingTopClasses,
paddingBottomClasses,
} from "@/blocks/globals";
import { Media } from "@/components... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/config.ts | src/blocks/Form/config.ts | import { noBlocksLexical } from "@/fields/noBlocksLexical";
import type { Block } from "payload";
export const FormBlock: Block = {
slug: "formBlock",
interfaceName: "FormBlock",
fields: [
{
name: "form",
type: "relationship",
relationTo: "forms",
required: true,
},
{
n... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/buildInitialFormState.tsx | src/blocks/Form/buildInitialFormState.tsx | import type { FormFieldBlock } from "@payloadcms/plugin-form-builder/types";
export const buildInitialFormState = (fields: FormFieldBlock[]) => {
return fields?.reduce((initialSchema, field) => {
if (field.blockType === "checkbox") {
return {
...initialSchema,
[field.name]: field.defaultVal... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Component.tsx | src/blocks/Form/Component.tsx | /* eslint-disable */
"use client";
import { useRouter } from "next/navigation";
import { useCallback, useState } from "react";
import { useForm, FormProvider } from "react-hook-form";
import RichText from "@/components/RichText";
import { Button } from "@/components/ui/button";
import { getClientSideURL } from "@/uti... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/fields.tsx | src/blocks/Form/fields.tsx | import { Checkbox } from "./Checkbox";
import { Country } from "./Country";
import { Email } from "./Email";
import { Message } from "./Message";
import { Number } from "./Number";
import { Select } from "./Select";
import { State } from "./State";
import { Text } from "./Text";
import { Textarea } from "./Textarea";
... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Email/index.tsx | src/blocks/Form/Email/index.tsx | /* eslint-disable */
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Error } from "../Error";
import { Width } from "../Width";
import type { EmailField } from "@payloadcms/plugin-form-builder/types";
import type { FieldErrorsImpl, FieldValues, UseFormRegister } ... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Number/index.tsx | src/blocks/Form/Number/index.tsx | /* eslint-disable */
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Error } from "../Error";
import { Width } from "../Width";
import type { TextField } from "@payloadcms/plugin-form-builder/types";
import type { FieldErrorsImpl, FieldValues, UseFormRegister } f... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Country/options.ts | src/blocks/Form/Country/options.ts | export const countryOptions = [
{
label: "Afghanistan",
value: "AF",
},
{
label: "Åland Islands",
value: "AX",
},
{
label: "Albania",
value: "AL",
},
{
label: "Algeria",
value: "DZ",
},
{
label: "American Samoa",
value: "AS",
},
{
label: "Andorra",
v... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Country/index.tsx | src/blocks/Form/Country/index.tsx | /* eslint-disable */
import { Controller, type Control, type FieldErrorsImpl, type FieldValues } from "react-hook-form";
import { Label } from "@/components/ui/label";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { countryOptions } from "./options";
i... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Select/index.tsx | src/blocks/Form/Select/index.tsx | /* eslint-disable */
import { Controller, type Control, type FieldErrorsImpl, type FieldValues } from "react-hook-form";
import { Label } from "@/components/ui/label";
import {
Select as SelectComponent,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { Error }... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Width/index.tsx | src/blocks/Form/Width/index.tsx | export const Width = ({
children,
className,
width,
}: {
children: React.ReactNode;
className?: string;
width?: number | string;
}) => {
return (
<div className={className} style={{ maxWidth: width ? `${width}%` : undefined }}>
{children}
</div>
);
};
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Textarea/index.tsx | src/blocks/Form/Textarea/index.tsx | /* eslint-disable */
import { Label } from "@/components/ui/label";
import { Textarea as TextAreaComponent } from "@/components/ui/textarea";
import { Error } from "../Error";
import { Width } from "../Width";
import type { TextField } from "@payloadcms/plugin-form-builder/types";
import type { FieldErrorsImpl, Field... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Message/index.tsx | src/blocks/Form/Message/index.tsx | import { type SerializedEditorState } from "@payloadcms/richtext-lexical/lexical";
import RichText from "@/components/RichText";
import { Width } from "../Width";
export const Message = ({ message }: { message: SerializedEditorState }) => {
return (
<Width className="my-12" width="100">
{message && <Rich... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/State/options.ts | src/blocks/Form/State/options.ts | export const stateOptions = [
{ label: "Alabama", value: "AL" },
{ label: "Alaska", value: "AK" },
{ label: "Arizona", value: "AZ" },
{ label: "Arkansas", value: "AR" },
{ label: "California", value: "CA" },
{ label: "Colorado", value: "CO" },
{ label: "Connecticut", value: "CT" },
{ label: "Delaware", ... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/State/index.tsx | src/blocks/Form/State/index.tsx | /* eslint-disable */
import { Controller, type Control, type FieldErrorsImpl, type FieldValues } from "react-hook-form";
import { Label } from "@/components/ui/label";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { stateOptions } from "./options";
imp... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Text/index.tsx | src/blocks/Form/Text/index.tsx | /* eslint-disable */
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Error } from "../Error";
import { Width } from "../Width";
import type { TextField } from "@payloadcms/plugin-form-builder/types";
import type { FieldErrorsImpl, FieldValues, UseFormRegister } f... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Error/index.tsx | src/blocks/Form/Error/index.tsx | export const Error = () => {
return <div className="mt-2 text-sm text-red-500">This field is required</div>;
};
| typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Form/Checkbox/index.tsx | src/blocks/Form/Checkbox/index.tsx | /* eslint-disable */
import {
useFormContext,
type FieldErrorsImpl,
type FieldValues,
type UseFormRegister,
} from "react-hook-form";
import { Checkbox as CheckboxUi } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";
import { Error } from "../Error";
import { Width } from "../Wi... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/ArchiveBlock/config.ts | src/blocks/ArchiveBlock/config.ts | import {
FixedToolbarFeature,
HeadingFeature,
InlineToolbarFeature,
lexicalEditor,
} from "@payloadcms/richtext-lexical";
import type { Block } from "payload";
export const Archive: Block = {
slug: "archive",
interfaceName: "ArchiveBlock",
fields: [
{
name: "introContent",
type: "richTex... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/ArchiveBlock/Component.tsx | src/blocks/ArchiveBlock/Component.tsx | import { getPayload } from "payload";
import { CollectionArchive } from "@/components/CollectionArchive";
import RichText from "@/components/RichText";
import config from "@payload-config";
import type { Post, ArchiveBlock as ArchiveBlockProps } from "@/payload-types";
export const ArchiveBlock = async (
props: Ar... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Code/config.ts | src/blocks/Code/config.ts | import type { Block } from "payload";
export const Code: Block = {
slug: "code",
interfaceName: "CodeBlock",
fields: [
{
name: "language",
type: "select",
defaultValue: "typescript",
options: [
{
label: "Typescript",
value: "typescript",
},
... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Code/Component.tsx | src/blocks/Code/Component.tsx | import { Code } from "./Component.client";
export type CodeBlockProps = {
code: string;
language?: string;
blockType: "code";
};
type Props = CodeBlockProps & {
className?: string;
};
export const CodeBlock = ({ className, code, language }: Props) => {
return (
<div className={[className, "not-prose co... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Code/Component.client.tsx | src/blocks/Code/Component.client.tsx | "use client";
import { Highlight, themes } from "prism-react-renderer";
import { CopyButton } from "./CopyButton";
type Props = {
code: string;
language?: string;
};
export const Code = ({ code, language = "" }: Props) => {
if (!code) return null;
return (
<Highlight code={code} language={language} the... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Code/CopyButton.tsx | src/blocks/Code/CopyButton.tsx | "use client";
import { CopyIcon } from "@payloadcms/ui/icons/Copy";
import { useState } from "react";
import { Button } from "@/components/ui/button";
export function CopyButton({ code }: { code: string }) {
const [text, setText] = useState("Copy");
function updateCopyStatus() {
if (text === "Copy") {
... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Banner/config.ts | src/blocks/Banner/config.ts | import { FixedToolbarFeature, InlineToolbarFeature, lexicalEditor } from "@payloadcms/richtext-lexical";
import type { Block } from "payload";
export const Banner: Block = {
slug: "banner",
fields: [
{
name: "style",
type: "select",
defaultValue: "info",
options: [
{ label: "In... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Banner/Component.tsx | src/blocks/Banner/Component.tsx | import React from "react";
import RichText from "@/components/RichText";
import { cn } from "src/utilities/cn";
import type { BannerBlock as BannerBlockProps } from "src/payload-types";
type Props = {
className?: string;
} & BannerBlockProps;
export const BannerBlock = ({ className, content, style }: Props) => {
... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Accordion/config.ts | src/blocks/Accordion/config.ts | import { noBlocksLexical } from "@/fields/noBlocksLexical";
import { marginFields, paddingFields } from "@/fields/spacingFields";
import type { Block, Field } from "payload";
const faqFields: Field[] = [
{
name: "title",
type: "text",
localized: true,
required: true,
},
{
name: "content",
... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/Accordion/Component.tsx | src/blocks/Accordion/Component.tsx | "use client";
import {
spacingTopClasses,
spacingBottomClasses,
paddingBottomClasses,
paddingTopClasses,
} from "@/blocks/globals";
import RichText from "@/components/RichText";
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion";
import { cn } from "@/utili... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/RelatedPosts/Component.tsx | src/blocks/RelatedPosts/Component.tsx | /* eslint-disable */
import RichText from "@/components/RichText";
import { cn } from "@/utilities/cn";
import { Card } from "../../components/Card";
import type { Post } from "@/payload-types";
export type RelatedPostsProps = {
className?: string;
docs?: Post[];
introContent?: any;
};
export const RelatedPos... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Mandala-Software-House/payload-ecommerce-template | https://github.com/Mandala-Software-House/payload-ecommerce-template/blob/2e26afe62722a058eb7004397be20e7f067676c0/src/blocks/MediaBlock/config.ts | src/blocks/MediaBlock/config.ts | import { marginFields, paddingFields } from "@/fields/spacingFields";
import type { Block } from "payload";
export const MediaBlock: Block = {
slug: "mediaBlock",
interfaceName: "MediaBlock",
fields: [
{
name: "media",
type: "upload",
relationTo: "media",
required: true,
},
m... | typescript | MIT | 2e26afe62722a058eb7004397be20e7f067676c0 | 2026-01-05T05:00:59.033803Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.