diff --git a/.github/workflows/example-previews-pr.yml b/.github/workflows/example-previews-pr.yml
index 90c07b17cdc1..b480e5a8f998 100644
--- a/.github/workflows/example-previews-pr.yml
+++ b/.github/workflows/example-previews-pr.yml
@@ -6,7 +6,6 @@ on:
- "examples/finefoods-antd/**"
- "examples/finefoods-client/**"
- "examples/finefoods-material-ui/**"
- - "examples/app-crm/**"
- "examples/pixels/**"
- "examples/invoicer/**"
types:
@@ -24,25 +23,24 @@ jobs:
examples: ${{ steps.filter.outputs.changes }}
all_examples: ${{ steps.deploy-previews-label.outputs.all_examples }}
steps:
- - uses: actions/checkout@v4
- - name: Get PR labels
- id: pr-labels
- uses: joerick/pr-labels-action@v1.0.9
- - name: 'Check deploy previews label'
- if: ${{ contains(steps.pr-labels.outputs.labels, ' deploy-previews ') }}
- id: deploy-previews-label
- run: echo 'all_examples=["finefoods-antd", "finefoods-client", "finefoods-material-ui", "app-crm", "pixels", "invoicer"]' >> $GITHUB_OUTPUT
- - uses: dorny/paths-filter@v3
- if: ${{ !contains(steps.pr-labels.outputs.labels, ' deploy-previews ') }}
- id: filter
- with:
- filters: |
- 'finefoods-antd': 'examples/finefoods-antd/**'
- 'finefoods-client': 'examples/finefoods-client/**'
- 'finefoods-material-ui': 'examples/finefoods-material-ui/**'
- 'app-crm': 'examples/app-crm/**'
- 'pixels': 'examples/pixels/**'
- 'invoicer': 'examples/invoicer/**'
+ - uses: actions/checkout@v4
+ - name: Get PR labels
+ id: pr-labels
+ uses: joerick/pr-labels-action@v1.0.9
+ - name: "Check deploy previews label"
+ if: ${{ contains(steps.pr-labels.outputs.labels, ' deploy-previews ') }}
+ id: deploy-previews-label
+ run: echo 'all_examples=["finefoods-antd", "finefoods-client", "finefoods-material-ui", "pixels", "invoicer"]' >> $GITHUB_OUTPUT
+ - uses: dorny/paths-filter@v3
+ if: ${{ !contains(steps.pr-labels.outputs.labels, ' deploy-previews ') }}
+ id: filter
+ with:
+ filters: |
+ 'finefoods-antd': 'examples/finefoods-antd/**'
+ 'finefoods-client': 'examples/finefoods-client/**'
+ 'finefoods-material-ui': 'examples/finefoods-material-ui/**'
+ 'pixels': 'examples/pixels/**'
+ 'invoicer': 'examples/invoicer/**'
deploy_previews:
runs-on: ubuntu-latest
diff --git a/documentation/blog/2023-03-22-react-admin-templates.md b/documentation/blog/2023-03-22-react-admin-templates.md
index 228a14cf9d1f..47b030965828 100644
--- a/documentation/blog/2023-03-22-react-admin-templates.md
+++ b/documentation/blog/2023-03-22-react-admin-templates.md
@@ -57,7 +57,7 @@ Overall, the Refine CRM admin template is an excellent choice for businesses tha
**Live example:** https://example.crm.refine.dev/
-**Source code**: https://github.com/refinedev/refine/tree/master/examples/app-crm
+**Template**: https://refine.dev/templates/crm-application/
## 2. Elstar
diff --git a/documentation/blog/2023-10-02-refine-crm-overview.md b/documentation/blog/2023-10-02-refine-crm-overview.md
index 94e6f94edb5a..0350d6f925bc 100644
--- a/documentation/blog/2023-10-02-refine-crm-overview.md
+++ b/documentation/blog/2023-10-02-refine-crm-overview.md
@@ -14,7 +14,7 @@ I want to introduce our newest example app – a full-fledged React CRM (Custome
👉 [Live Demo](https://example.crm.refine.dev/)
-👉 [You can find the source code on GitHub here](https://github.com/refinedev/refine/tree/master/examples/app-crm)
+👉 [Template](https://refine.dev/templates/crm-application/)
This example is open-source, which means anyone can freely utilize and customize the source code as they see fit. It's not just another application; it's a comprehensive solution that boasts all the features and functionalities required for an accurate enterprise-level application.
diff --git a/documentation/blog/2024-07-23-react-dashboard-libraries.md b/documentation/blog/2024-07-23-react-dashboard-libraries.md
index 1c6997c934e9..fffda3ee5a2d 100644
--- a/documentation/blog/2024-07-23-react-dashboard-libraries.md
+++ b/documentation/blog/2024-07-23-react-dashboard-libraries.md
@@ -67,7 +67,7 @@ npm create refine-app@latest
- GitHub stars: +27K
- License: MIT
-- Links: [Demo](https://example.crm.refine.dev/) | [Documentation](https://refine.dev/tutorial) | [GitHub](https://github.com/refinedev/refine/tree/master/examples/app-crm)
+- Links: [Demo](https://example.crm.refine.dev/) | [Documentation](https://refine.dev/tutorial) | [Template](https://refine.dev/templates/crm-application/)
## Ant Design pro
diff --git a/examples/app-crm-minimal/package.json b/examples/app-crm-minimal/package.json
index 03ff991cc66b..35af2d2843e2 100644
--- a/examples/app-crm-minimal/package.json
+++ b/examples/app-crm-minimal/package.json
@@ -30,6 +30,7 @@
"classnames": "^2.3.2",
"cross-env": "^7.0.3",
"dayjs": "^1.10.7",
+ "graphql": "^15.6.1",
"graphql-tag": "^2.12.6",
"graphql-ws": "^5.9.1",
"react": "^18.0.0",
diff --git a/examples/app-crm/.eslintrc b/examples/app-crm/.eslintrc
deleted file mode 100644
index 88e66ea40311..000000000000
--- a/examples/app-crm/.eslintrc
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "env": { "browser": true, "es6": true },
- "parser": "@typescript-eslint/parser",
- "parserOptions": {
- "sourceType": "module"
- },
- "plugins": ["@typescript-eslint", "simple-import-sort", "import"],
- "extends": ["plugin:@typescript-eslint/recommended", "prettier"],
- "rules": {
- "simple-import-sort/imports": [
- "error",
- {
- "groups": [
- ["^react"],
- ["^@refine"],
- ["^@?\\w"],
- ["^"],
- ["^\\."],
- ["^\\u0000"]
- ]
- }
- ],
- "simple-import-sort/exports": "error",
- "import/first": "error",
- "import/newline-after-import": "error",
- "import/no-duplicates": "error"
- }
-}
diff --git a/examples/app-crm/.gitignore b/examples/app-crm/.gitignore
deleted file mode 100644
index 4d29575de804..000000000000
--- a/examples/app-crm/.gitignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# production
-/build
-
-# misc
-.DS_Store
-.env.local
-.env.development.local
-.env.test.local
-.env.production.local
-
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
diff --git a/examples/app-crm/README.md b/examples/app-crm/README.md
index 80276a1cd18d..ddf1a18561bf 100644
--- a/examples/app-crm/README.md
+++ b/examples/app-crm/README.md
@@ -1,3 +1,5 @@
+> 🚨 This example has been moved to the Enterprise Edition. However, we still have a version available for the Community. You can check it out [here](https://github.com/refinedev/refine/tree/master/examples/app-crm-minimal).
+
[![Cover Image](https://refine.ams3.cdn.digitaloceanspaces.com/example-readmes/CRM/crm-readme-temp.png "Cover Image")](https://github.com/refinedev/refine)
diff --git a/examples/app-crm/codegen.ts b/examples/app-crm/codegen.ts
deleted file mode 100644
index dae50caccfac..000000000000
--- a/examples/app-crm/codegen.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import type { CodegenConfig } from "@graphql-codegen/cli";
-
-const config: CodegenConfig = {
- schema: "https://api.crm.refine.dev/graphql",
- generates: {
- "./src/interfaces/graphql.ts": {
- plugins: ["typescript"],
- documents: ["./src/**/*.tsx"],
- config: {
- skipTypename: true,
- enumsAsTypes: true,
- },
- hooks: { afterOneFileWrite: ["eslint --fix", "prettier --write"] },
- },
- },
- ignoreNoDocuments: true,
-};
-
-export default config;
diff --git a/examples/app-crm/graphql.config.ts b/examples/app-crm/graphql.config.ts
deleted file mode 100644
index a0028e6ca39c..000000000000
--- a/examples/app-crm/graphql.config.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import type { IGraphQLConfig } from "graphql-config";
-
-const config: IGraphQLConfig = {
- schema: "https://api.crm.refine.dev/graphql",
- extensions: {
- codegen: {
- hooks: {
- afterOneFileWrite: ["eslint --fix", "prettier --write"],
- },
- generates: {
- "src/graphql/schema.types.ts": {
- plugins: ["typescript"],
- config: {
- skipTypename: true,
- enumsAsTypes: true,
- },
- },
- "src/graphql/types.ts": {
- preset: "import-types",
- documents: ["src/**/*.{ts,tsx}"],
- plugins: ["typescript-operations"],
- config: {
- skipTypename: true,
- enumsAsTypes: true,
- preResolveTypes: false,
- useTypeImports: true,
- },
- presetConfig: {
- typesPath: "./schema.types",
- },
- },
- },
- },
- },
-};
-
-export default config;
diff --git a/examples/app-crm/index.html b/examples/app-crm/index.html
deleted file mode 100644
index 155a2ba73ad0..000000000000
--- a/examples/app-crm/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
refine CRM App
-
-
-
-
-
-
diff --git a/examples/app-crm/jest.config.js b/examples/app-crm/jest.config.js
deleted file mode 100644
index 47ef7280fe92..000000000000
--- a/examples/app-crm/jest.config.js
+++ /dev/null
@@ -1,30 +0,0 @@
-const { pathsToModuleNameMapper } = require("ts-jest");
-const { compilerOptions } = require("./tsconfig.json");
-
-const paths = compilerOptions.paths ? compilerOptions.paths : {};
-
-/** @type {import('ts-jest').JestConfigWithTsJest} */
-module.exports = {
- preset: "ts-jest",
- rootDir: "./",
- testEnvironment: "jsdom",
- setupFilesAfterEnv: ["
/jest.setup.ts"],
- testPathIgnorePatterns: ["/node_modules/"],
- moduleNameMapper: {
- ...pathsToModuleNameMapper(paths, { prefix: "/" }),
- "\\.css$": "identity-obj-proxy",
- },
- transform: {
- "^.+\\.tsx?$": [
- "ts-jest",
- {
- tsconfig: "tsconfig.test.json",
- },
- ],
- },
- displayName: "app-crm",
- coveragePathIgnorePatterns: [
- "/src/main.tsx",
- "/src/interfaces/",
- ],
-};
diff --git a/examples/app-crm/jest.setup.ts b/examples/app-crm/jest.setup.ts
deleted file mode 100644
index d1cbaf6df4dc..000000000000
--- a/examples/app-crm/jest.setup.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { configure } from "@testing-library/dom";
-
-import "@testing-library/jest-dom";
-import "@testing-library/jest-dom/extend-expect";
-
-configure({
- asyncUtilTimeout: 10000,
-});
-
-/** Antd mocks */
-window.matchMedia = jest.fn().mockImplementation((query) => {
- return {
- matches: false,
- media: query,
- onchange: null,
- addListener: jest.fn(),
- removeListener: jest.fn(),
- };
-});
-
-window.scroll = jest.fn();
-window.alert = jest.fn();
-
-jest.setTimeout(20000);
diff --git a/examples/app-crm/netlify.toml b/examples/app-crm/netlify.toml
deleted file mode 100644
index b9e0f32e8651..000000000000
--- a/examples/app-crm/netlify.toml
+++ /dev/null
@@ -1,4 +0,0 @@
-[[redirects]]
-from = "/*"
-to = "/index.html"
-status = 404
\ No newline at end of file
diff --git a/examples/app-crm/package.json b/examples/app-crm/package.json
deleted file mode 100644
index 72e18f4dbda6..000000000000
--- a/examples/app-crm/package.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "name": "app-crm",
- "version": "1.0.0",
- "private": true,
- "type": "module",
- "scripts": {
- "build": "tsc && cross-env NODE_OPTIONS=--max_old_space_size=4096 refine build",
- "codegen": "graphql-codegen",
- "dev": "refine dev",
- "format": "prettier src --write",
- "lint": "eslint src --fix",
- "refine": "refine",
- "start": "refine start",
- "test": "jest --passWithNoTests --runInBand"
- },
- "dependencies": {
- "@ant-design/icons": "5.0.1",
- "@ant-design/plots": "^1.2.5",
- "@dnd-kit/core": "^6.0.8",
- "@dnd-kit/modifiers": "^6.0.1",
- "@dnd-kit/sortable": "^7.0.2",
- "@fullcalendar/core": "^6.1.8",
- "@fullcalendar/daygrid": "^6.1.8",
- "@fullcalendar/list": "^6.1.8",
- "@fullcalendar/react": "^6.1.8",
- "@fullcalendar/timegrid": "^6.1.8",
- "@react-pdf/renderer": "^3.1.8",
- "@refinedev/antd": "^5.43.1",
- "@refinedev/cli": "^2.16.38",
- "@refinedev/core": "^4.54.1",
- "@refinedev/devtools": "^1.2.8",
- "@refinedev/nestjs-query": "^1.3.3",
- "@refinedev/react-router-v6": "^4.6.0",
- "@uiw/react-md-editor": "^3.19.5",
- "algoliasearch": "^4.19.1",
- "antd": "^5.17.0",
- "axios": "^1.6.2",
- "classnames": "^2.3.2",
- "cross-env": "^7.0.3",
- "dayjs": "^1.10.7",
- "graphql": "^15.6.1",
- "graphql-tag": "^2.12.6",
- "graphql-ws": "^5.9.1",
- "leaflet": "^1.9.4",
- "lodash": "^4.17.21",
- "react": "^18.0.0",
- "react-dom": "^18.0.0",
- "react-instantsearch": "^7.0.1",
- "react-leaflet": "^4.2.1",
- "react-leaflet-cluster": "^2.1.0",
- "react-router-dom": "^6.8.1"
- },
- "devDependencies": {
- "@graphql-codegen/cli": "^5.0.0",
- "@graphql-codegen/import-types-preset": "^3.0.0",
- "@graphql-codegen/typescript": "^4.0.1",
- "@graphql-codegen/typescript-operations": "^4.0.1",
- "@testing-library/jest-dom": "^5.16.4",
- "@testing-library/react": "^13.1.1",
- "@testing-library/user-event": "^14.1.1",
- "@types/jest": "^29.2.4",
- "@types/leaflet": "^1.9.3",
- "@types/lodash": "^4.14.171",
- "@types/node": "^18.16.2",
- "@types/react": "^18.0.0",
- "@types/react-dom": "^18.0.0",
- "@types/testing-library__jest-dom": "^5.14.3",
- "@typescript-eslint/eslint-plugin": "5.48.0",
- "@typescript-eslint/parser": "5.48.0",
- "@vitejs/plugin-react": "^4.2.1",
- "autoprefixer": "^10.4.1",
- "eslint": "^8.24.0",
- "eslint-config-prettier": "^8.5.0",
- "eslint-plugin-import": "^2.29.1",
- "eslint-plugin-simple-import-sort": "^10.0.0",
- "identity-obj-proxy": "^3.0.0",
- "jest": "^29.3.1",
- "jest-environment-jsdom": "^29.3.1",
- "postcss": "^8.1.4",
- "postcss-nesting": "^12.0.1",
- "prettier": "^2.7.1",
- "ts-jest": "^29.1.2",
- "typescript": "^5.4.2",
- "vite": "^5.1.6",
- "vite-tsconfig-paths": "^4.2.1"
- }
-}
diff --git a/examples/app-crm/postcss.config.cjs b/examples/app-crm/postcss.config.cjs
deleted file mode 100644
index d47373e13ac7..000000000000
--- a/examples/app-crm/postcss.config.cjs
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
- plugins: {
- autoprefixer: {},
- "postcss-nesting": {},
- },
-};
diff --git a/examples/app-crm/public/refine_favicon.png b/examples/app-crm/public/refine_favicon.png
deleted file mode 100644
index e002695b2b0e..000000000000
Binary files a/examples/app-crm/public/refine_favicon.png and /dev/null differ
diff --git a/examples/app-crm/sandbox.config.json b/examples/app-crm/sandbox.config.json
deleted file mode 100644
index fb3271d9849a..000000000000
--- a/examples/app-crm/sandbox.config.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "port": 5173,
- "container": {
- "node": 16,
- "port": 5173,
- "startScript": "start"
- }
-}
diff --git a/examples/app-crm/src/App.tsx b/examples/app-crm/src/App.tsx
deleted file mode 100644
index d8b16a6eb13d..000000000000
--- a/examples/app-crm/src/App.tsx
+++ /dev/null
@@ -1,298 +0,0 @@
-import { BrowserRouter, Outlet, Route, Routes } from "react-router-dom";
-
-import { ErrorComponent, useNotificationProvider } from "@refinedev/antd";
-import { Authenticated, Refine } from "@refinedev/core";
-import { DevtoolsPanel, DevtoolsProvider } from "@refinedev/devtools";
-import routerProvider, {
- CatchAllNavigate,
- DocumentTitleHandler,
- NavigateToResource,
- UnsavedChangesNotifier,
-} from "@refinedev/react-router-v6";
-
-import { App as AntdApp, ConfigProvider } from "antd";
-
-import { resources, themeConfig } from "@/config";
-import { authProvider, dataProvider, liveProvider } from "@/providers";
-
-import { AlgoliaSearchWrapper, FullScreenLoading, Layout } from "./components";
-import { useAutoLoginForDemo } from "./hooks";
-import { AuditLogPage, SettingsPage } from "./routes/administration";
-import {
- CalendarCreatePage,
- CalendarEditPage,
- CalendarPageWrapper,
- CalendarShowPage,
-} from "./routes/calendar";
-import {
- CompanyCreatePage,
- CompanyEditPage,
- CompanyListPage,
-} from "./routes/companies";
-import {
- ContactCreatePage,
- ContactShowPage,
- ContactsListPage,
-} from "./routes/contacts";
-import { DashboardPage } from "./routes/dashboard";
-import { ForgotPasswordPage } from "./routes/forgot-password";
-import { LoginPage } from "./routes/login";
-import {
- QuotesCreatePage,
- QuotesEditPage,
- QuotesListPage,
- QuotesShowPage,
-} from "./routes/quotes";
-import { RegisterPage } from "./routes/register";
-import {
- KanbanCreatePage,
- KanbanCreateStage,
- KanbanEditPage,
- KanbanEditStage,
- KanbanPage,
-} from "./routes/scrumboard/kanban";
-import {
- SalesCreatePage,
- SalesCreateStage,
- SalesEditPage,
- SalesEditStage,
- SalesFinalizeDeal,
- SalesPage,
-} from "./routes/scrumboard/sales";
-import { UpdatePasswordPage } from "./routes/update-password";
-
-import "./utilities/init-dayjs";
-import "@refinedev/antd/dist/reset.css";
-import "./styles/antd.css";
-import "./styles/fc.css";
-import "./styles/index.css";
-
-const App: React.FC = () => {
- // This hook is used to automatically login the user.
- // We use this hook to skip the login page and demonstrate the application more quickly.
- const { loading } = useAutoLoginForDemo();
-
- if (loading) {
- return ;
- }
-
- return (
-
-
-
-
-
-
-
- }
- >
-
-
-
-
- }
- >
- } />
-
-
-
- }
- >
-
- } />
- } />
- } />
-
- }>
-
-
-
- }
- >
- } />
- } />
- }
- />
- }
- />
-
-
-
-
- }
- >
-
-
-
- }
- >
- }
- />
-
- } />
- }
- />
- }
- />
- }
- />
-
-
-
-
-
- }
- >
- } />
-
- }
- />
-
-
-
- }
- >
-
- } />
-
-
-
- }
- >
- }
- />
-
-
-
-
-
- }
- >
-
-
-
- }
- >
- }
- />
-
-
-
-
- }
- >
- }
- />
-
-
- }
- />
- }>
- } />
- } />
-
- } />
-
- }
- >
-
-
- }
- >
- } />
- } />
- }
- />
- }
- />
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default App;
diff --git a/examples/app-crm/src/components/calendar/index.ts b/examples/app-crm/src/components/calendar/index.ts
deleted file mode 100644
index 978fb81edbb6..000000000000
--- a/examples/app-crm/src/components/calendar/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./upcoming-events";
diff --git a/examples/app-crm/src/components/calendar/upcoming-events/event/index.tsx b/examples/app-crm/src/components/calendar/upcoming-events/event/index.tsx
deleted file mode 100644
index c38a21edb737..000000000000
--- a/examples/app-crm/src/components/calendar/upcoming-events/event/index.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-import React from "react";
-
-import { useNavigation } from "@refinedev/core";
-import type { GetFieldsFromList } from "@refinedev/nestjs-query";
-
-import { Badge } from "antd";
-import dayjs from "dayjs";
-
-import type { UpcomingEventsQuery } from "@/graphql/types";
-
-import { Text } from "../../../text";
-import styles from "../index.module.css";
-
-type CalendarUpcomingEventProps = {
- item: GetFieldsFromList;
-};
-
-export const CalendarUpcomingEvent: React.FC = ({
- item,
-}) => {
- const { show } = useNavigation();
- const { id, title, startDate, endDate, color } = item;
- const isToday = dayjs.utc(startDate).isSame(dayjs.utc(), "day");
- const isTomorrow = dayjs
- .utc(startDate)
- .isSame(dayjs.utc().add(1, "day"), "day");
- const isAllDayEvent =
- dayjs.utc(startDate).startOf("day").isSame(startDate) &&
- dayjs.utc(endDate).endOf("day").isSame(endDate);
-
- const renderDate = () => {
- if (isToday) {
- return "Today";
- }
-
- if (isTomorrow) {
- return "Tomorrow";
- }
-
- return dayjs(startDate).format("MMM DD");
- };
-
- const renderTime = () => {
- if (isAllDayEvent) {
- return "All day";
- }
-
- return `${dayjs(startDate).format("HH:mm")} - ${dayjs(endDate).format(
- "HH:mm",
- )}`;
- };
-
- return (
- {
- show("events", item.id);
- }}
- key={id}
- className={styles.item}
- >
-
-
- {`${renderDate()}, ${renderTime()}`}
-
-
- {title}
-
-
- );
-};
diff --git a/examples/app-crm/src/components/calendar/upcoming-events/index.module.css b/examples/app-crm/src/components/calendar/upcoming-events/index.module.css
deleted file mode 100644
index 03cda6f45b12..000000000000
--- a/examples/app-crm/src/components/calendar/upcoming-events/index.module.css
+++ /dev/null
@@ -1,21 +0,0 @@
-.item {
- padding: 1rem 0;
- border-bottom: 1px solid rgba(0, 0, 0, 0.06);
- cursor: pointer;
-
- .date {
- margin-bottom: 0.25rem;
- }
-
- .badge {
- margin-right: 1.1rem;
- }
-
- .title {
- padding-left: 1.5rem;
- }
-}
-
-.item:last-child {
- border-bottom: none;
-}
diff --git a/examples/app-crm/src/components/calendar/upcoming-events/index.tsx b/examples/app-crm/src/components/calendar/upcoming-events/index.tsx
deleted file mode 100644
index 5112b3299332..000000000000
--- a/examples/app-crm/src/components/calendar/upcoming-events/index.tsx
+++ /dev/null
@@ -1,140 +0,0 @@
-import React from "react";
-
-import { useList, useNavigation } from "@refinedev/core";
-import type { GetFieldsFromList } from "@refinedev/nestjs-query";
-
-import { CalendarOutlined, RightCircleOutlined } from "@ant-design/icons";
-import type { CardProps } from "antd";
-import { Button, Card, Skeleton as AntdSkeleton } from "antd";
-import dayjs from "dayjs";
-
-import type { UpcomingEventsQuery } from "@/graphql/types";
-
-import { Text } from "../../text";
-import { CalendarUpcomingEvent } from "./event";
-import styles from "./index.module.css";
-import { CALENDAR_UPCOMING_EVENTS_QUERY } from "./queries";
-
-type CalendarUpcomingEventsProps = {
- limit?: number;
- cardProps?: CardProps;
- showGoToListButton?: boolean;
-};
-
-const NoEvent: React.FC = () => (
-
- No Upcoming Event
-
-);
-
-const Skeleton: React.FC = () => {
- return (
-
- );
-};
-
-export const CalendarUpcomingEvents: React.FC = ({
- limit = 5,
- cardProps,
- showGoToListButton,
-}) => {
- const { list } = useNavigation();
-
- const { data, isLoading } = useList>({
- resource: "events",
- pagination: {
- pageSize: limit,
- },
- sorters: [
- {
- field: "startDate",
- order: "asc",
- },
- ],
- filters: [
- {
- field: "startDate",
- operator: "gte",
- value: dayjs().format("YYYY-MM-DD"),
- },
- ],
- meta: {
- gqlQuery: CALENDAR_UPCOMING_EVENTS_QUERY,
- },
- });
-
- return (
-
- {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */}
-
-
- Upcoming events
-
-
- }
- extra={
- showGoToListButton && (
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
-
- )
- }
- {...cardProps}
- >
- {isLoading &&
- Array.from({ length: limit }).map((_, index) => (
-
- ))}
- {!isLoading &&
- data?.data.map((item) => (
-
- ))}
- {!isLoading && data?.data.length === 0 && }
-
- );
-};
diff --git a/examples/app-crm/src/components/calendar/upcoming-events/queries.ts b/examples/app-crm/src/components/calendar/upcoming-events/queries.ts
deleted file mode 100644
index 52c4fb747299..000000000000
--- a/examples/app-crm/src/components/calendar/upcoming-events/queries.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import gql from "graphql-tag";
-
-export const CALENDAR_UPCOMING_EVENTS_QUERY = gql`
- query UpcomingEvents(
- $filter: EventFilter!
- $sorting: [EventSort!]
- $paging: OffsetPaging!
- ) {
- events(filter: $filter, sorting: $sorting, paging: $paging) {
- nodes {
- id
- title
- color
- startDate
- endDate
- }
- totalCount
- }
- }
-`;
diff --git a/examples/app-crm/src/components/custom-avatar.tsx b/examples/app-crm/src/components/custom-avatar.tsx
deleted file mode 100644
index 3ebbcb4cacd7..000000000000
--- a/examples/app-crm/src/components/custom-avatar.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { type FC, memo } from "react";
-
-import type { AvatarProps } from "antd";
-import { Avatar as AntdAvatar } from "antd";
-
-import { getNameInitials, getRandomColorFromString } from "@/utilities";
-
-type Props = AvatarProps & {
- name?: string;
-};
-
-const CustomAvatarComponent: FC = ({ name = "", style, ...rest }) => {
- return (
-
- {getNameInitials(name)}
-
- );
-};
-
-export const CustomAvatar = memo(
- CustomAvatarComponent,
- (prevProps, nextProps) => {
- return prevProps.name === nextProps.name && prevProps.src === nextProps.src;
- },
-);
diff --git a/examples/app-crm/src/components/fullscreen-loading/index.tsx b/examples/app-crm/src/components/fullscreen-loading/index.tsx
deleted file mode 100644
index 05e680de2ef8..000000000000
--- a/examples/app-crm/src/components/fullscreen-loading/index.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Spin } from "antd";
-
-export const FullScreenLoading = () => {
- return (
-
- );
-};
diff --git a/examples/app-crm/src/components/icon/TextIcon.tsx b/examples/app-crm/src/components/icon/TextIcon.tsx
deleted file mode 100644
index 88c7b1df7553..000000000000
--- a/examples/app-crm/src/components/icon/TextIcon.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import Icon from "@ant-design/icons";
-import type { CustomIconComponentProps } from "@ant-design/icons/lib/components/Icon";
-
-export const TextIconSvg = () => (
-
-);
-
-export const TextIcon = (props: Partial) => (
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
-
-);
diff --git a/examples/app-crm/src/components/icon/index.ts b/examples/app-crm/src/components/icon/index.ts
deleted file mode 100644
index 5d0922a94f76..000000000000
--- a/examples/app-crm/src/components/icon/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./TextIcon";
diff --git a/examples/app-crm/src/components/index.ts b/examples/app-crm/src/components/index.ts
deleted file mode 100644
index 7c8bf8f8ada2..000000000000
--- a/examples/app-crm/src/components/index.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export * from "./calendar";
-export * from "./custom-avatar";
-export * from "./fullscreen-loading";
-export * from "./icon";
-export * from "./layout";
-export * from "./layout/algolia-search/wrapper";
-export * from "./layout/logo";
-export * from "./layout/title";
-export * from "./list-title-button";
-export * from "./pagination-total";
-export * from "./participants";
-export * from "./select-option-with-avatar";
-export * from "./single-element-form";
-export * from "./tags";
-export * from "./text";
diff --git a/examples/app-crm/src/components/layout/account-settings/index.module.css b/examples/app-crm/src/components/layout/account-settings/index.module.css
deleted file mode 100644
index 3c121f4f9214..000000000000
--- a/examples/app-crm/src/components/layout/account-settings/index.module.css
+++ /dev/null
@@ -1,45 +0,0 @@
-.header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- background-color: #fff;
- padding: 16px;
-}
-
-.container {
- display: flex;
- flex-direction: column;
- gap: 32px;
- padding: 24px;
-
- .title {
- display: block;
- margin: 0 !important;
-
- .titleEditIcon {
- visibility: hidden;
- opacity: 0;
- transition: all 0.2s ease-in-out;
- }
-
- &:hover {
- .titleEditIcon {
- opacity: 1;
- visibility: visible !important;
- }
- }
- }
-
- .name {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- padding: 1rem;
- }
-
- .form {
- background-color: #fff;
- border-radius: 0.5rem;
- margin-bottom: 1.75rem;
- }
-}
diff --git a/examples/app-crm/src/components/layout/account-settings/index.tsx b/examples/app-crm/src/components/layout/account-settings/index.tsx
deleted file mode 100644
index 17ad761bcb87..000000000000
--- a/examples/app-crm/src/components/layout/account-settings/index.tsx
+++ /dev/null
@@ -1,295 +0,0 @@
-import { useState } from "react";
-
-import { type HttpError, useOne, useUpdate } from "@refinedev/core";
-import type { GetFields, GetVariables } from "@refinedev/nestjs-query";
-
-import {
- CloseOutlined,
- EditOutlined,
- GlobalOutlined,
- IdcardOutlined,
- MailOutlined,
- PhoneOutlined,
- SafetyCertificateOutlined,
- UserOutlined,
-} from "@ant-design/icons";
-import {
- Button,
- Card,
- Drawer,
- Input,
- Select,
- Space,
- Spin,
- Typography,
-} from "antd";
-
-import { TimezoneEnum } from "@/enums";
-import type {
- AccountSettingsGetUserQuery,
- AccountSettingsUpdateUserMutation,
- AccountSettingsUpdateUserMutationVariables,
-} from "@/graphql/types";
-
-import { CustomAvatar } from "../../custom-avatar";
-import { SingleElementForm } from "../../single-element-form";
-import { Text } from "../../text";
-import styles from "./index.module.css";
-import {
- ACCOUNT_SETTINGS_GET_USER_QUERY,
- ACCOUNT_SETTINGS_UPDATE_USER_MUTATION,
-} from "./queries";
-
-const timezoneOptions = Object.keys(TimezoneEnum).map((key) => ({
- label: TimezoneEnum[key as keyof typeof TimezoneEnum],
- value: TimezoneEnum[key as keyof typeof TimezoneEnum],
-}));
-
-type Props = {
- opened: boolean;
- setOpened: (opened: boolean) => void;
- userId: string;
-};
-
-type FormKeys = "email" | "jobTitle" | "phone" | "timezone";
-
-export const AccountSettings = ({ opened, setOpened, userId }: Props) => {
- const [activeForm, setActiveForm] = useState();
-
- const { data, isLoading, isError } = useOne<
- GetFields
- >({
- resource: "users",
- id: userId,
- queryOptions: {
- enabled: opened,
- },
- meta: {
- gqlQuery: ACCOUNT_SETTINGS_GET_USER_QUERY,
- },
- });
-
- const { mutate: updateMutation } = useUpdate<
- GetFields,
- HttpError,
- GetVariables
- >();
-
- const closeModal = () => {
- setOpened(false);
- };
-
- if (isError) {
- closeModal();
- return null;
- }
-
- if (isLoading) {
- return (
-
-
-
- );
- }
-
- const { id, name, email, jobTitle, phone, timezone, avatarUrl } =
- data?.data ?? {};
-
- const getActiveForm = (key: FormKeys) => {
- if (activeForm === key) {
- return "form";
- }
-
- if (!data?.data[key]) {
- return "empty";
- }
-
- return "view";
- };
-
- return (
-
-
- Account Settings
- }
- onClick={() => closeModal()}
- />
-
-
-
- );
-};
diff --git a/examples/app-crm/src/components/layout/account-settings/queries.ts b/examples/app-crm/src/components/layout/account-settings/queries.ts
deleted file mode 100644
index fe48bfd97a04..000000000000
--- a/examples/app-crm/src/components/layout/account-settings/queries.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import gql from "graphql-tag";
-
-export const ACCOUNT_SETTINGS_GET_USER_QUERY = gql`
- query AccountSettingsGetUser($id: ID!) {
- user(id: $id) {
- id
- name
- email
- avatarUrl
- jobTitle
- phone
- timezone
- }
- }
-`;
-
-export const ACCOUNT_SETTINGS_UPDATE_USER_MUTATION = gql`
- mutation AccountSettingsUpdateUser($input: UpdateOneUserInput!) {
- updateOneUser(input: $input) {
- id
- name
- email
- avatarUrl
- jobTitle
- phone
- timezone
- }
- }
-`;
diff --git a/examples/app-crm/src/components/layout/algolia-search/index.module.css b/examples/app-crm/src/components/layout/algolia-search/index.module.css
deleted file mode 100644
index 39b0e8e49b56..000000000000
--- a/examples/app-crm/src/components/layout/algolia-search/index.module.css
+++ /dev/null
@@ -1,54 +0,0 @@
-.container {
- display: flex;
- justify-content: center;
- align-items: center;
-}
-
-.popover {
- .ant-input-affix-wrapper,
- .ant-input-affix-wrapper-lg {
- padding: 0 !important;
- }
-}
-
-.input {
- min-width: 256px !important;
- min-height: 30px !important;
- max-height: 30px !important;
- font-size: 14px !important;
-}
-
-.inputPrefix {
- margin-right: 4px;
- font-size: 12px !important;
-}
-
-.inputSuffix {
- user-select: none;
- width: 20px;
- height: 20px;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #f0f0f0;
- color: #b4b4b4;
- border-radius: 4px;
- font-size: 12px !important;
-}
-
-.list {
- height: auto;
- max-height: 60vh;
- overflow: auto;
-}
-
-.listItem {
- cursor: pointer;
- border-block-end: 1px solid rgba(72, 48, 24, 0.04) !important;
-}
-
-.title {
- display: flex;
- justify-content: space-between;
- text-transform: capitalize;
-}
diff --git a/examples/app-crm/src/components/layout/algolia-search/index.tsx b/examples/app-crm/src/components/layout/algolia-search/index.tsx
deleted file mode 100644
index 211294aed4f6..000000000000
--- a/examples/app-crm/src/components/layout/algolia-search/index.tsx
+++ /dev/null
@@ -1,199 +0,0 @@
-import { type FC, useState } from "react";
-import { useHits, useSearchBox } from "react-instantsearch";
-import { Link } from "react-router-dom";
-
-import { useNavigation, useResource } from "@refinedev/core";
-
-import { SearchOutlined } from "@ant-design/icons";
-import { Input, List, Popover, Tag, Typography } from "antd";
-import cn from "classnames";
-
-import type {
- Company,
- Contact,
- Deal,
- Event,
- Quote,
- Task,
- User,
-} from "@/graphql/schema.types";
-
-import { CustomAvatar } from "../../custom-avatar";
-import styles from "./index.module.css";
-
-export const AlgoliaSearch: React.FC = () => {
- const [open, setOpen] = useState(false);
- const { query, refine } = useSearchBox();
- const [inputValue, setInputValue] = useState(query);
-
- const setQuery = (newQuery: string) => {
- setInputValue(newQuery);
- refine(newQuery);
- };
-
- return (
-
-
{
- setOpen(false);
- setInputValue("");
- }}
- />
- }
- trigger="click"
- open={!!inputValue || open}
- onOpenChange={(open) => {
- setOpen(open);
- }}
- >
-
- }
- suffix={/
}
- placeholder="Search"
- autoComplete="off"
- autoCorrect="off"
- autoCapitalize="off"
- spellCheck={false}
- maxLength={512}
- type="search"
- value={inputValue}
- onChange={(event) => {
- setQuery(event.currentTarget.value);
- }}
- />
-
-
- );
-};
-
-type Hit = (User | Deal | Task | Company | Contact | Quote | Event) & {
- resource: string;
-};
-
-type SearchResultProps = {
- onHitClick: () => void;
-};
-
-export const AlgoliaSearchResult: FC = ({ onHitClick }) => {
- const { showUrl, editUrl } = useNavigation();
- const { hits } = useHits() as { hits: Hit[] };
- const { select } = useResource();
-
- const getTitle = (item: Hit) => {
- if ("name" in item) {
- return item.name;
- }
-
- if ("title" in item) {
- return item.title;
- }
-
- return "";
- };
-
- const getDescription = (item: Hit) => {
- if ("description" in item) {
- return item.description;
- }
-
- if ("jobTitle" in item) {
- return item.jobTitle;
- }
-
- if ("email" in item) {
- return item.email;
- }
-
- if ("industry" in item) {
- return `${item.industry}`;
- }
- };
-
- const getResourceLabel = (resource: string) => {
- const label = select(resource).resource.meta?.label ?? resource;
- return label;
- };
-
- const getResourceLink = (item: Hit) => {
- if (["contacts", "quotes", "events", "user"].includes(item.resource)) {
- return showUrl(item.resource, item.id);
- }
-
- if (["tasks", "deals", "companies"].includes(item.resource)) {
- return editUrl(item.resource, item.id);
- }
-
- return "";
- };
-
- return (
- {
- return (
-
-
-
- {item.name}
-
- ) : null
- }
- title={
-
-
- {getTitle(item)}
-
-
- {getResourceLabel(item.resource)}
-
-
- }
- description={
-
- {getDescription(item)}
-
- }
- />
-
-
- );
- }}
- />
- );
-};
diff --git a/examples/app-crm/src/components/layout/algolia-search/wrapper.tsx b/examples/app-crm/src/components/layout/algolia-search/wrapper.tsx
deleted file mode 100644
index 0931177009e4..000000000000
--- a/examples/app-crm/src/components/layout/algolia-search/wrapper.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import type { PropsWithChildren } from "react";
-import { InstantSearch } from "react-instantsearch";
-
-import { indexName, searchClient } from "@/providers";
-
-export const AlgoliaSearchWrapper: React.FC = ({
- children,
-}) => {
- if (!searchClient) {
- return <>{children}>;
- }
-
- return (
-
- {children}
-
- );
-};
diff --git a/examples/app-crm/src/components/layout/current-user.tsx b/examples/app-crm/src/components/layout/current-user.tsx
deleted file mode 100644
index 03ce8421a6d0..000000000000
--- a/examples/app-crm/src/components/layout/current-user.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-import { useState } from "react";
-
-import { useGetIdentity, useLogout } from "@refinedev/core";
-
-import { LogoutOutlined, SettingOutlined } from "@ant-design/icons";
-import { Button, Popover } from "antd";
-
-import type { User } from "@/graphql/schema.types";
-
-import { CustomAvatar } from "../custom-avatar";
-import { Text } from "../text";
-import { AccountSettings } from "./account-settings";
-
-export const CurrentUser: React.FC = () => {
- const [opened, setOpened] = useState(false);
- const { data: user } = useGetIdentity();
- const { mutate: logout } = useLogout();
-
- const content = (
-
-
- {user?.name}
-
-
- }
- type="text"
- block
- onClick={() => setOpened(true)}
- >
- Account settings
-
- }
- type="text"
- danger
- block
- onClick={() => logout()}
- >
- Logout
-
-
-
- );
-
- return (
- <>
-
-
-
- {user && (
-
- )}
- >
- );
-};
diff --git a/examples/app-crm/src/components/layout/gh-banner/index.tsx b/examples/app-crm/src/components/layout/gh-banner/index.tsx
deleted file mode 100644
index 4495a2cd2220..000000000000
--- a/examples/app-crm/src/components/layout/gh-banner/index.tsx
+++ /dev/null
@@ -1,248 +0,0 @@
-import React, { type SVGProps, useEffect } from "react";
-
-import { CSSRules } from "./styles";
-
-export const GitHubBanner = () => {
- useEffect(() => {
- const styleTag = document.createElement("style");
- document.head.appendChild(styleTag);
- CSSRules.forEach((rule) =>
- styleTag.sheet?.insertRule(rule, styleTag.sheet.cssRules.length),
- );
- }, []);
-
- return (
-
- );
-};
-
-const Text = () => {
- return (
-
-
-
- 💡
-
-
- This example is open-source! Get the full source code.
-
-
-
- );
-};
-
-const GlowSmall = ({ style, ...props }: SVGProps) => {
- return (
-
- );
-};
-
-const GlowBig = ({ style, ...props }: SVGProps) => (
-
-);
diff --git a/examples/app-crm/src/components/layout/gh-banner/styles.ts b/examples/app-crm/src/components/layout/gh-banner/styles.ts
deleted file mode 100644
index 6a9e6f6e77c5..000000000000
--- a/examples/app-crm/src/components/layout/gh-banner/styles.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-export const CSSRules = [
- `
- .bg-top-announcement {
- border-bottom: 1px solid rgba(71, 235, 235, 0.15);
- background: radial-gradient(
- 218.19% 111.8% at 0% 0%,
- rgba(71, 235, 235, 0.1) 0%,
- rgba(71, 235, 235, 0.2) 100%
- ),
- #14141f;
- }
- `,
- `
- .top-announcement-mask {
- mask-image: url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/hexagon.svg);
- -webkit-mask-image: url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/hexagon.svg);
- mask-repeat: repeat;
- -webkit-mask-repeat: repeat;
- background: rgba(71, 235, 235, 0.25);
- }
- `,
- `
- .banner {
- display: flex;
- @media (max-width: 1100px) {
- display: none;
- }
- }`,
- `
- .gh-link, .gh-link:hover, .gh-link:active, .gh-link:visited, .gh-link:focus {
- text-decoration: none;
- z-index: 9;
- }
- `,
- `
- @keyframes top-announcement-glow {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- }
- }
- `,
-];
diff --git a/examples/app-crm/src/components/layout/header.tsx b/examples/app-crm/src/components/layout/header.tsx
deleted file mode 100644
index 5d00dd3ef938..000000000000
--- a/examples/app-crm/src/components/layout/header.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import React from "react";
-
-import { Layout, Space, theme } from "antd";
-
-import { searchClient } from "@/providers";
-
-import { AlgoliaSearch } from "./algolia-search";
-import { CurrentUser } from "./current-user";
-import { Notifications } from "./notifications";
-
-const { useToken } = theme;
-
-export const Header: React.FC = () => {
- const { token } = useToken();
-
- const headerStyles: React.CSSProperties = {
- backgroundColor: token.colorBgElevated,
- display: "flex",
- justifyContent: searchClient ? "space-between" : "flex-end",
- alignItems: "center",
- padding: "0px 24px",
- height: "64px",
- position: "sticky",
- top: 0,
- zIndex: 999,
- };
-
- return (
-
- {searchClient ? : null}
-
-
-
-
-
- );
-};
diff --git a/examples/app-crm/src/components/layout/index.tsx b/examples/app-crm/src/components/layout/index.tsx
deleted file mode 100644
index c727e4ecb0c6..000000000000
--- a/examples/app-crm/src/components/layout/index.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import React from "react";
-
-import { ThemedLayoutContextProvider } from "@refinedev/antd";
-
-import { Grid, Layout as AntdLayout } from "antd";
-
-import { GitHubBanner } from "./gh-banner";
-import { Header } from "./header";
-import { Sider } from "./sider";
-
-export const Layout: React.FC = ({ children }) => {
- const breakpoint = Grid.useBreakpoint();
- const isSmall = typeof breakpoint.sm === "undefined" ? true : breakpoint.sm;
-
- return (
-
-
-
-
-
-
-
- {children}
-
-
-
-
- );
-};
diff --git a/examples/app-crm/src/components/layout/logo.tsx b/examples/app-crm/src/components/layout/logo.tsx
deleted file mode 100644
index 81fb28697d09..000000000000
--- a/examples/app-crm/src/components/layout/logo.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import React from "react";
-
-export const Logo = (props: React.SVGProps) => (
-
-);
diff --git a/examples/app-crm/src/components/layout/notification-message.tsx b/examples/app-crm/src/components/layout/notification-message.tsx
deleted file mode 100644
index f0c14f9a83ff..000000000000
--- a/examples/app-crm/src/components/layout/notification-message.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import type { GetFieldsFromList } from "@refinedev/nestjs-query";
-
-import type {
- NotificationsDealsQuery,
- NotificationsQuery,
-} from "@/graphql/types";
-
-import { Text } from "../text";
-
-type Props = {
- audit: GetFieldsFromList;
- deal?: GetFieldsFromList;
-};
-
-export const NotificationMessage = ({ audit, deal }: Props) => {
- if (!deal) return Loading...;
-
- if (audit.action === "UPDATE") {
- return (
-
- {audit.user?.name}
- {" moved "}
- {deal.title}
- {" deal to "}
- {deal.stage?.title || "Unassigned"}.
-
- );
- }
- if (audit.action === "CREATE") {
- return (
-
- {audit.user?.name}
- {" created "}
- {deal.title}
- {" deal in "}
- {deal.stage?.title || "Unassigned"}.
-
- );
- }
-
- return Unknown action;
-};
diff --git a/examples/app-crm/src/components/layout/notifications.tsx b/examples/app-crm/src/components/layout/notifications.tsx
deleted file mode 100644
index a0b041643cc9..000000000000
--- a/examples/app-crm/src/components/layout/notifications.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-import React, { useState } from "react";
-
-import { useList, useMany } from "@refinedev/core";
-import type { GetFieldsFromList } from "@refinedev/nestjs-query";
-
-import { BellOutlined } from "@ant-design/icons";
-import { Badge, Button, Divider, Popover, Space, Spin } from "antd";
-import dayjs from "dayjs";
-
-import type {
- NotificationsDealsQuery,
- NotificationsQuery,
-} from "@/graphql/types";
-
-import { CustomAvatar } from "../custom-avatar";
-import { Text } from "../text";
-import { NotificationMessage } from "./notification-message";
-import { NOTIFICATIONS_DEALS_QUERY, NOTIFICATIONS_QUERY } from "./queries";
-
-export const Notifications: React.FC = () => {
- const [open, setOpen] = useState(false);
-
- const { data, isLoading } = useList>({
- resource: "audits",
- pagination: {
- pageSize: 5,
- },
- sorters: [{ field: "createdAt", order: "desc" }],
- filters: [
- {
- field: "action",
- operator: "in",
- value: ["CREATE", "UPDATE"],
- },
- {
- field: "targetEntity",
- operator: "eq",
- value: "Deal",
- },
- ],
- meta: {
- gqlQuery: NOTIFICATIONS_QUERY,
- },
- queryOptions: {
- enabled: open,
- },
- });
-
- const targetIds = data?.data?.map((audit) => audit.targetId);
- const { data: dealData } = useMany<
- GetFieldsFromList
- >({
- resource: "deals",
- ids: targetIds ?? [],
- meta: {
- gqlQuery: NOTIFICATIONS_DEALS_QUERY,
- },
- queryOptions: {
- enabled: Boolean(targetIds?.length),
- },
- });
-
- const getDeal = (id: string | number) => {
- return dealData?.data?.find((deal) => deal.id === id);
- };
-
- const content = (
- }>
- {data?.data?.map((audit) => (
-
-
-
-
-
- {dayjs(audit?.createdAt).fromNow()}
-
-
-
- ))}
-
- );
-
- const loadingContent = (
-
-
-
- );
-
- return (
- setOpen(newOpen)}
- overlayStyle={{ width: 400 }}
- >
-
- {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */}
- } style={{ border: 0 }} />
-
-
- );
-};
diff --git a/examples/app-crm/src/components/layout/queries.ts b/examples/app-crm/src/components/layout/queries.ts
deleted file mode 100644
index f7de86c752da..000000000000
--- a/examples/app-crm/src/components/layout/queries.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import gql from "graphql-tag";
-
-export const NOTIFICATIONS_QUERY = gql`
- query Notifications(
- $paging: OffsetPaging!
- $filter: AuditFilter!
- $sorting: [AuditSort!]
- ) {
- audits(paging: $paging, filter: $filter, sorting: $sorting) {
- nodes {
- id
- action
- targetEntity
- targetId
- createdAt
- user {
- id
- name
- avatarUrl
- }
- }
- totalCount
- }
- }
-`;
-
-export const NOTIFICATIONS_DEALS_QUERY = gql`
- query NotificationsDeals($filter: DealFilter!) {
- deals(filter: $filter) {
- nodes {
- id
- title
- stage {
- id
- title
- }
- company {
- id
- name
- avatarUrl
- }
- }
- }
- }
-`;
diff --git a/examples/app-crm/src/components/layout/sider.tsx b/examples/app-crm/src/components/layout/sider.tsx
deleted file mode 100644
index 5b6fc40005af..000000000000
--- a/examples/app-crm/src/components/layout/sider.tsx
+++ /dev/null
@@ -1,269 +0,0 @@
-import React, { type CSSProperties } from "react";
-
-import { useThemedLayoutContext } from "@refinedev/antd";
-import {
- CanAccess,
- type ITreeMenu,
- pickNotDeprecated,
- useLink,
- useMenu,
-} from "@refinedev/core";
-
-import {
- BarsOutlined,
- LeftOutlined,
- RightOutlined,
- UnorderedListOutlined,
-} from "@ant-design/icons";
-import { Button, Drawer, Grid, Layout, Menu, theme } from "antd";
-
-import { Title } from "./title";
-
-const drawerButtonStyles: CSSProperties = {
- borderTopLeftRadius: 0,
- borderBottomLeftRadius: 0,
- position: "fixed",
- top: 64,
- zIndex: 1001,
-};
-
-const { SubMenu } = Menu;
-const { useToken } = theme;
-
-export const Sider: React.FC = () => {
- const { token } = useToken();
- const {
- siderCollapsed,
- setSiderCollapsed,
- mobileSiderOpen,
- setMobileSiderOpen,
- } = useThemedLayoutContext();
-
- const Link = useLink();
- const { menuItems, selectedKey, defaultOpenKeys } = useMenu();
- const breakpoint = Grid.useBreakpoint();
-
- const isMobile =
- typeof breakpoint.lg === "undefined" ? false : !breakpoint.lg;
-
- const renderTreeView = (tree: ITreeMenu[], selectedKey?: string) => {
- return tree.map((item: ITreeMenu) => {
- const {
- icon,
- label,
- route,
- key,
- name,
- children,
- parentName,
- meta,
- options,
- } = item;
-
- if (children.length > 0) {
- return (
-
- }
- title={label}
- >
- {renderTreeView(children, selectedKey)}
-
-
- );
- }
- const isSelected = key === selectedKey;
- const isRoute = !(
- pickNotDeprecated(meta?.parent, options?.parent, parentName) !==
- undefined && children.length === 0
- );
-
- return (
-
- )}
- >
- {label}
- {!siderCollapsed && isSelected && (
-
- )}
-
-
- );
- });
- };
-
- const items = renderTreeView(menuItems, selectedKey);
-
- const renderSider = () => {
- return <>{items}>;
- };
-
- const renderMenu = () => {
- return (
-
- );
- };
-
- const renderDrawerSider = () => {
- return (
- <>
- setMobileSiderOpen(false)}
- placement="left"
- closable={false}
- width={256}
- bodyStyle={{
- padding: 0,
- }}
- maskClosable={true}
- >
-
-
-
-
-
- {renderMenu()}
-
-
-
-
- );
-};
diff --git a/examples/app-crm/src/components/pagination-total.tsx b/examples/app-crm/src/components/pagination-total.tsx
deleted file mode 100644
index b5f48f05fc53..000000000000
--- a/examples/app-crm/src/components/pagination-total.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import type { FC } from "react";
-
-type PaginationTotalProps = {
- total: number;
- entityName: string;
-};
-
-export const PaginationTotal: FC = ({
- total,
- entityName,
-}) => {
- return (
-
- {total} {entityName} in total
-
- );
-};
diff --git a/examples/app-crm/src/components/participants/index.tsx b/examples/app-crm/src/components/participants/index.tsx
deleted file mode 100644
index b70bb8c10047..000000000000
--- a/examples/app-crm/src/components/participants/index.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import type { FC } from "react";
-
-import type { GetFieldsFromList } from "@refinedev/nestjs-query";
-
-import { PlusCircleOutlined } from "@ant-design/icons";
-import { Space, Tooltip } from "antd";
-
-import type { UsersSelectQuery } from "@/graphql/types";
-
-import { CustomAvatar } from "../custom-avatar";
-
-type Props = {
- userOne: GetFieldsFromList;
- userTwo: GetFieldsFromList;
-};
-
-export const Participants: FC = ({ userOne, userTwo }) => {
- return (
-
-
-
-
- {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */}
-
-
-
-
-
- );
-};
diff --git a/examples/app-crm/src/components/select-option-with-avatar.tsx b/examples/app-crm/src/components/select-option-with-avatar.tsx
deleted file mode 100644
index 1d66d8f54bce..000000000000
--- a/examples/app-crm/src/components/select-option-with-avatar.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import type { FC } from "react";
-
-import { Space } from "antd";
-
-import { CustomAvatar } from "./custom-avatar";
-import { Text } from "./text";
-
-type Props = {
- name: string;
- avatarUrl?: string;
- shape?: "circle" | "square";
-};
-
-export const SelectOptionWithAvatar: FC = ({
- avatarUrl,
- name,
- shape,
-}) => {
- return (
-
-
- {name}
-
- );
-};
diff --git a/examples/app-crm/src/components/single-element-form/index.module.css b/examples/app-crm/src/components/single-element-form/index.module.css
deleted file mode 100644
index 40558928ab7c..000000000000
--- a/examples/app-crm/src/components/single-element-form/index.module.css
+++ /dev/null
@@ -1,55 +0,0 @@
-.container {
- min-height: 64px;
- display: flex;
- flex-direction: row;
- width: 100%;
- align-items: flex-start;
- padding: 0.5rem 0.8rem;
- border-bottom: 1px solid rgba(217, 217, 217, 1);
-
- .icon {
- padding-right: 15px;
- align-self: flex-start;
- }
-
- .content {
- flex: 1;
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .input {
- flex: 1;
- margin-right: 0.8rem;
-
- .formItem {
- padding-top: 0.5rem;
- }
-
- .skeleton {
- height: 1rem;
- }
- }
-
- .label {
- user-select: none;
- display: block;
- }
-
- .buttons {
- align-self: flex-end;
- display: flex;
- gap: 0.5rem;
- }
- }
-
- .actions {
- align-self: center;
- display: flex;
- gap: 0.5rem;
- }
-}
-/*
-.container:last-child {
- border: none;
-} */
diff --git a/examples/app-crm/src/components/single-element-form/index.tsx b/examples/app-crm/src/components/single-element-form/index.tsx
deleted file mode 100644
index 5ba45d6bd58c..000000000000
--- a/examples/app-crm/src/components/single-element-form/index.tsx
+++ /dev/null
@@ -1,111 +0,0 @@
-import React from "react";
-
-import type { UseFormProps } from "@refinedev/antd";
-import { useForm } from "@refinedev/antd";
-
-import { EditOutlined } from "@ant-design/icons";
-import type { FormItemProps, FormProps } from "antd";
-import { Button, Form, Skeleton } from "antd";
-
-import { Text } from "../text";
-import styles from "./index.module.css";
-
-type SingleElementFormProps = {
- icon?: React.ReactNode;
- itemProps?: FormItemProps;
- extra?: React.ReactNode;
- view?: React.ReactNode;
- state?: "empty" | "form" | "view";
- onUpdate?: () => void;
- onCancel?: () => void;
- onClick?: () => void;
- loading?: boolean;
- style?: React.CSSProperties;
- useFormProps?: UseFormProps;
- formProps?: FormProps;
-} & React.PropsWithChildren;
-
-export const SingleElementForm: React.FC = ({
- state = "view",
- view,
- icon,
- itemProps,
- onClick,
- onUpdate,
- onCancel,
- loading,
- children,
- style,
- extra,
- useFormProps,
- formProps: formPropsFromProp,
-}) => {
- const { formProps, saveButtonProps } = useForm({
- action: "edit",
- redirect: false,
- autoSave: {
- enabled: false,
- },
- queryOptions: {
- enabled: false,
- },
- onMutationSuccess() {
- onUpdate?.();
- },
- mutationMode: "optimistic",
- ...useFormProps,
- });
-
- return (
-
- );
-};
diff --git a/examples/app-crm/src/components/tags/contact-status-tag.tsx b/examples/app-crm/src/components/tags/contact-status-tag.tsx
deleted file mode 100644
index f2db8a42a1db..000000000000
--- a/examples/app-crm/src/components/tags/contact-status-tag.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import React from "react";
-
-import {
- CheckCircleOutlined,
- MinusCircleOutlined,
- PlayCircleFilled,
- PlayCircleOutlined,
-} from "@ant-design/icons";
-import { Tag, type TagProps } from "antd";
-
-import type { ContactStatus } from "@/graphql/schema.types";
-
-export const ContactStatusTag: React.FC<{ status: ContactStatus }> = ({
- status,
-}) => {
- let icon: React.ReactNode = null;
- let color: TagProps["color"] = undefined;
-
- switch (status) {
- case "NEW":
- case "CONTACTED":
- case "INTERESTED":
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon = ;
- color = "cyan";
- break;
- case "UNQUALIFIED":
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon = ;
- color = "red";
- break;
- case "QUALIFIED":
- case "NEGOTIATION":
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon = ;
- color = "green";
- break;
- case "LOST":
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon = ;
- color = "red";
- break;
- case "WON":
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon = ;
- color = "green";
- break;
- case "CHURNED":
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon = ;
- color = "red";
- break;
-
- default:
- break;
- }
-
- return (
-
- {icon} {status.toLowerCase()}
-
- );
-};
diff --git a/examples/app-crm/src/components/tags/index.ts b/examples/app-crm/src/components/tags/index.ts
deleted file mode 100644
index 057290c0276f..000000000000
--- a/examples/app-crm/src/components/tags/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from "./contact-status-tag";
-export * from "./quote-status-tag";
-export * from "./user-tag";
diff --git a/examples/app-crm/src/components/tags/quote-status-tag.tsx b/examples/app-crm/src/components/tags/quote-status-tag.tsx
deleted file mode 100644
index 8dd53f63810f..000000000000
--- a/examples/app-crm/src/components/tags/quote-status-tag.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import type { FC, ReactElement } from "react";
-
-import {
- CheckCircleOutlined,
- ExpandOutlined,
- SendOutlined,
-} from "@ant-design/icons";
-import { Tag } from "antd";
-
-import type { QuoteStatus } from "@/graphql/schema.types";
-
-const variant: Record = {
- DRAFT: {
- color: "blue",
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon: ,
- },
- SENT: {
- color: "cyan",
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon: ,
- },
- ACCEPTED: {
- color: "green",
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon: ,
- },
-};
-
-type Props = {
- status: QuoteStatus;
-};
-
-export const QuoteStatusTag: FC = ({ status }) => {
- return (
-
- {status.toLowerCase()}
-
- );
-};
diff --git a/examples/app-crm/src/components/tags/user-tag.tsx b/examples/app-crm/src/components/tags/user-tag.tsx
deleted file mode 100644
index 4f42af196975..000000000000
--- a/examples/app-crm/src/components/tags/user-tag.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import type { FC } from "react";
-
-import type { GetFieldsFromList } from "@refinedev/nestjs-query";
-
-import { Space, Tag } from "antd";
-
-import type { UsersSelectQuery } from "@/graphql/types";
-
-import { CustomAvatar } from "../custom-avatar";
-
-type Props = {
- user: GetFieldsFromList;
-};
-
-export const UserTag: FC = ({ user }) => {
- return (
-
-
-
- {user.name}
-
-
- );
-};
diff --git a/examples/app-crm/src/components/text.tsx b/examples/app-crm/src/components/text.tsx
deleted file mode 100644
index b6e7fe13122b..000000000000
--- a/examples/app-crm/src/components/text.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import type { FC } from "react";
-
-import { ConfigProvider, Typography } from "antd";
-
-export type TextProps = {
- size?:
- | "xs"
- | "sm"
- | "md"
- | "lg"
- | "xl"
- | "xxl"
- | "xxxl"
- | "huge"
- | "xhuge"
- | "xxhuge";
-} & React.ComponentProps;
-
-const sizes = {
- xs: {
- fontSize: 12,
- lineHeight: 20 / 12,
- },
- sm: {
- fontSize: 14,
- lineHeight: 22 / 14,
- },
- md: {
- fontSize: 16,
- lineHeight: 24 / 16,
- },
- lg: {
- fontSize: 20,
- lineHeight: 28 / 20,
- },
- xl: {
- fontSize: 24,
- lineHeight: 32 / 24,
- },
- xxl: {
- fontSize: 30,
- lineHeight: 38 / 30,
- },
- xxxl: {
- fontSize: 38,
- lineHeight: 46 / 38,
- },
- huge: {
- fontSize: 46,
- lineHeight: 54 / 46,
- },
- xhuge: {
- fontSize: 56,
- lineHeight: 64 / 56,
- },
- xxhuge: {
- fontSize: 68,
- lineHeight: 76 / 68,
- },
-};
-
-export const Text: FC = ({ size = "sm", children, ...rest }) => {
- return (
-
- {children}
-
- );
-};
diff --git a/examples/app-crm/src/config/antd.ts b/examples/app-crm/src/config/antd.ts
deleted file mode 100644
index 83fd522d9a6e..000000000000
--- a/examples/app-crm/src/config/antd.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import type { ThemeConfig } from "antd";
-
-export const themeConfig: ThemeConfig = {
- token: {
- colorPrimaryText: "rgba(0, 0, 0, 0.85)",
- colorTextSecondary: "rgba(0, 0, 0, 0.65)",
- colorTextTertiary: "rgba(0, 0, 0, 0.45)",
- colorPrimary: "#1677FF",
- colorBgContainer: "#F7F8F9",
- colorBgLayout: "#F0F2F5",
- colorBorderBg: "#E8E9EA",
- fontFamily:
- "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Arial', 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",
- },
- components: {
- Typography: {
- colorText: "rgba(0, 0, 0, 0.85)",
- colorTextDescription: "rgba(0, 0, 0, 0.65)",
- colorTextDisabled: "rgba(0, 0, 0, 0.45)",
- },
- Card: {
- colorBgContainer: "#FFFFFF",
- headerBg: "#FAFAFA",
- boxShadowTertiary:
- "0px 1px 2px 0px #00000008,0px 1px 6px -1px #000000050px,2px 4px 0px #00000005",
- },
- Table: {
- colorBgContainer: "#fff",
- },
- Input: {
- colorBgContainer: "#fff",
- },
- InputNumber: {
- colorBgContainer: "#fff",
- },
- Calendar: {
- colorBgContainer: "#FFFFFF",
- },
- Radio: {
- colorBgContainer: "#fff",
- },
- Select: {
- colorBgContainer: "#fff",
- },
- },
-};
diff --git a/examples/app-crm/src/config/index.ts b/examples/app-crm/src/config/index.ts
deleted file mode 100644
index aa9751d87c97..000000000000
--- a/examples/app-crm/src/config/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from "./antd";
-export * from "./resources";
diff --git a/examples/app-crm/src/config/resources.tsx b/examples/app-crm/src/config/resources.tsx
deleted file mode 100644
index 03b70f8cf071..000000000000
--- a/examples/app-crm/src/config/resources.tsx
+++ /dev/null
@@ -1,158 +0,0 @@
-import type { IResourceItem } from "@refinedev/core";
-
-import {
- CalendarOutlined,
- ContainerOutlined,
- CrownOutlined,
- DashboardOutlined,
- ProjectOutlined,
- ShopOutlined,
- TeamOutlined,
-} from "@ant-design/icons";
-
-export const resources: IResourceItem[] = [
- {
- name: "dashboard",
- list: "/",
- meta: {
- label: "Dashboard",
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon: ,
- },
- },
- {
- name: "events",
- list: "/calendar",
- create: "/calendar/create",
- edit: "/calendar/edit/:id",
- show: "/calendar/show/:id",
- meta: {
- label: "Calendar",
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon: ,
- },
- },
- {
- name: "scrumboard",
- meta: {
- label: "Scrumboard",
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon: ,
- },
- },
-
- {
- name: "tasks",
- list: "/scrumboard/kanban",
- create: "/scrumboard/kanban/create",
- edit: "/scrumboard/kanban/edit/:id",
- meta: {
- label: "Project Kanban",
- parent: "scrumboard",
- },
- },
- {
- name: "taskStages",
- create: "/scrumboard/kanban/stages/create",
- edit: "/scrumboard/kanban/stages/edit/:id",
- list: "/scrumboard/kanban",
- meta: {
- hide: true,
- },
- },
- {
- name: "deals",
- list: "/scrumboard/sales",
- create: "/scrumboard/sales/create",
- edit: "/scrumboard/sales/edit/:id",
- meta: {
- label: "Sales Pipeline",
- parent: "scrumboard",
- },
- },
- {
- name: "deals",
- identifier: "finalize-deals",
- edit: "/scrumboard/sales/:id/finalize",
- meta: {
- hide: true,
- },
- },
- {
- name: "dealStages",
- create: "/scrumboard/sales/stages/create",
- edit: "/scrumboard/sales/stages/edit/:id",
- list: "/scrumboard/sales",
- meta: {
- hide: true,
- },
- },
- {
- name: "companies",
- list: "/companies",
- show: "/companies/:id",
- create: "/companies/create",
- edit: "/companies/edit/:id",
- meta: {
- label: "Companies",
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon: ,
- },
- },
- {
- name: "companies",
- identifier: "sales-companies",
- create: "/scrumboard/sales/create/company/create",
- meta: {
- hide: true,
- },
- },
- {
- name: "contacts",
- list: "/contacts",
- create: "/contacts/create",
- edit: "/contacts/edit/:id",
- show: "/contacts/show/:id",
- meta: {
- label: "Contacts",
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon: ,
- },
- },
- {
- name: "quotes",
- list: "/quotes",
- create: "/quotes/create",
- edit: "/quotes/edit/:id",
- show: "/quotes/show/:id",
- meta: {
- label: "Quotes",
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon: ,
- },
- },
- {
- name: "administration",
- meta: {
- label: "Administration",
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
- icon: ,
- },
- },
- {
- name: "settings",
- list: "/administration/settings",
- meta: {
- label: "Settings",
- parent: "administration",
- },
- },
- {
- name: "audits",
- list: "/administration/audit-log",
- meta: {
- label: "Audit Log",
- parent: "administration",
- },
- },
-];
diff --git a/examples/app-crm/src/enums/contact-stage.enum.ts b/examples/app-crm/src/enums/contact-stage.enum.ts
deleted file mode 100644
index b13329112224..000000000000
--- a/examples/app-crm/src/enums/contact-stage.enum.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export enum ContactStageEnum {
- CUSTOMER = "CUSTOMER",
- LEAD = "LEAD",
- SALES_QUALIFIED_LEAD = "SALES_QUALIFIED_LEAD",
-}
diff --git a/examples/app-crm/src/enums/contact-status.enum.ts b/examples/app-crm/src/enums/contact-status.enum.ts
deleted file mode 100644
index ee668c6c5fc0..000000000000
--- a/examples/app-crm/src/enums/contact-status.enum.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export enum ContactStatusEnum {
- NEW = "NEW",
- CONTACTED = "CONTACTED",
- INTERESTED = "INTERESTED",
- UNQUALIFIED = "UNQUALIFIED",
- QUALIFIED = "QUALIFIED",
- NEGOTIATION = "NEGOTIATION",
- LOST = "LOST",
- WON = "WON",
- CHURNED = "CHURNED",
-}
diff --git a/examples/app-crm/src/enums/index.ts b/examples/app-crm/src/enums/index.ts
deleted file mode 100644
index 44dc9337094e..000000000000
--- a/examples/app-crm/src/enums/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from "./contact-stage.enum";
-export * from "./contact-status.enum";
-export * from "./timezone.enum";
diff --git a/examples/app-crm/src/enums/timezone.enum.ts b/examples/app-crm/src/enums/timezone.enum.ts
deleted file mode 100644
index 335bd10c5a22..000000000000
--- a/examples/app-crm/src/enums/timezone.enum.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export enum TimezoneEnum {
- "UTC (Coordinated Universal Time)" = "UTC (Coordinated Universal Time)",
- "GMT (Greenwich Mean Time)" = "GMT (Greenwich Mean Time)",
- "EST (Eastern Standard Time)" = "EST (Eastern Standard Time)",
- "CST (Central Standard Time)" = "CST (Central Standard Time)",
- "MST (Mountain Standard Time)" = "MST (Mountain Standard Time)",
- "PST (Pacific Standard Time)" = "PST (Pacific Standard Time)",
- "CET (Central European Time)" = "CET (Central European Time)",
- "IST (Indian Standard Time)" = "IST (Indian Standard Time)",
- "JST (Japan Standard Time)" = "JST (Japan Standard Time)",
- "AEST (Australian Eastern Standard Time)" = "AEST (Australian Eastern Standard Time)",
-}
diff --git a/examples/app-crm/src/graphql/queries.ts b/examples/app-crm/src/graphql/queries.ts
deleted file mode 100644
index a5ba30df4cfa..000000000000
--- a/examples/app-crm/src/graphql/queries.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import gql from "graphql-tag";
-
-export const EVENT_CATEGORIES_QUERY = gql`
- query EventCategories(
- $filter: EventCategoryFilter!
- $sorting: [EventCategorySort!]
- ) {
- eventCategories(filter: $filter, sorting: $sorting) {
- totalCount
- nodes {
- id
- title
- }
- }
- }
-`;
diff --git a/examples/app-crm/src/graphql/schema.types.ts b/examples/app-crm/src/graphql/schema.types.ts
deleted file mode 100644
index 57c56f9ac4a6..000000000000
--- a/examples/app-crm/src/graphql/schema.types.ts
+++ /dev/null
@@ -1,4966 +0,0 @@
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = {
- [K in keyof T]: T[K];
-};
-export type MakeOptional = Omit & {
- [SubKey in K]?: Maybe;
-};
-export type MakeMaybe = Omit & {
- [SubKey in K]: Maybe;
-};
-export type MakeEmpty<
- T extends { [key: string]: unknown },
- K extends keyof T,
-> = { [_ in K]?: never };
-export type Incremental =
- | T
- | {
- [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never;
- };
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
- DateTime: { input: any; output: any };
-};
-
-export type Audit = {
- action: Scalars["String"]["output"];
- changes: Array;
- createdAt: Scalars["DateTime"]["output"];
- id: Scalars["ID"]["output"];
- targetEntity: Scalars["String"]["output"];
- targetId: Scalars["Float"]["output"];
- updatedAt: Scalars["DateTime"]["output"];
- user?: Maybe;
-};
-
-export type AuditChange = {
- field: Scalars["String"]["output"];
- from?: Maybe;
- to?: Maybe;
-};
-
-export type AuditConnection = {
- /** Array of nodes. */
- nodes: Array;
- /** Paging information */
- pageInfo: OffsetPageInfo;
- /** Fetch total count of records */
- totalCount: Scalars["Int"]["output"];
-};
-
-export type AuditDeleteResponse = {
- action?: Maybe;
- changes?: Maybe>;
- createdAt?: Maybe;
- id?: Maybe;
- targetEntity?: Maybe;
- targetId?: Maybe;
- updatedAt?: Maybe;
-};
-
-export type AuditFilter = {
- action?: InputMaybe;
- and?: InputMaybe>;
- createdAt?: InputMaybe;
- id?: InputMaybe;
- or?: InputMaybe>;
- targetEntity?: InputMaybe;
- targetId?: InputMaybe;
- updatedAt?: InputMaybe;
- user?: InputMaybe;
-};
-
-export type AuditFilterUserFilter = {
- and?: InputMaybe>;
- createdAt?: InputMaybe;
- email?: InputMaybe;
- id?: InputMaybe;
- jobTitle?: InputMaybe;
- name?: InputMaybe;
- or?: InputMaybe>;
- phone?: InputMaybe;
- role?: InputMaybe;
- timezone?: InputMaybe;
- updatedAt?: InputMaybe;
-};
-
-export type AuditSort = {
- direction: SortDirection;
- field: AuditSortFields;
- nulls?: InputMaybe;
-};
-
-export type AuditSortFields =
- | "action"
- | "createdAt"
- | "id"
- | "targetEntity"
- | "targetId"
- | "updatedAt";
-
-export type AuditSubscriptionFilter = {
- action?: InputMaybe;
- and?: InputMaybe>;
- createdAt?: InputMaybe;
- id?: InputMaybe;
- or?: InputMaybe>;
- targetEntity?: InputMaybe;
- targetId?: InputMaybe;
- updatedAt?: InputMaybe;
-};
-
-export type AuthResponse = {
- accessToken: Scalars["String"]["output"];
- refreshToken: Scalars["String"]["output"];
- user: User;
-};
-
-export type BooleanFieldComparison = {
- is?: InputMaybe;
- isNot?: InputMaybe;
-};
-
-/** Business type */
-export type BusinessType = "B2B" | "B2C" | "B2G";
-
-export type CheckListItem = {
- checked: Scalars["Boolean"]["output"];
- title: Scalars["String"]["output"];
-};
-
-export type ChecklistItemInput = {
- checked: Scalars["Boolean"]["input"];
- title: Scalars["String"]["input"];
-};
-
-export type Company = {
- avatarUrl?: Maybe;
- businessType?: Maybe;
- companySize?: Maybe;
- contacts: CompanyContactsConnection;
- contactsAggregate: Array;
- country?: Maybe;
- createdAt: Scalars["DateTime"]["output"];
- createdBy: User;
- deals: CompanyDealsConnection;
- dealsAggregate: Array;
- id: Scalars["ID"]["output"];
- industry?: Maybe;
- name: Scalars["String"]["output"];
- notes: CompanyNotesConnection;
- notesAggregate: Array;
- salesOwner: User;
- totalRevenue?: Maybe;
- updatedAt: Scalars["DateTime"]["output"];
- updatedBy?: Maybe;
- website?: Maybe;
-};
-
-export type CompanyContactsArgs = {
- filter?: ContactFilter;
- paging?: OffsetPaging;
- sorting?: Array;
-};
-
-export type CompanyContactsAggregateArgs = {
- filter?: InputMaybe;
-};
-
-export type CompanyDealsArgs = {
- filter?: DealFilter;
- paging?: OffsetPaging;
- sorting?: Array;
-};
-
-export type CompanyDealsAggregateArgs = {
- filter?: InputMaybe;
-};
-
-export type CompanyNotesArgs = {
- filter?: CompanyNoteFilter;
- paging?: OffsetPaging;
- sorting?: Array;
-};
-
-export type CompanyNotesAggregateArgs = {
- filter?: InputMaybe;
-};
-
-export type CompanyAggregateFilter = {
- and?: InputMaybe>;
- businessType?: InputMaybe;
- companySize?: InputMaybe;
- country?: InputMaybe;
- createdAt?: InputMaybe;
- id?: InputMaybe;
- industry?: InputMaybe;
- name?: InputMaybe;
- or?: InputMaybe>;
- totalRevenue?: InputMaybe;
- updatedAt?: InputMaybe;
- website?: InputMaybe;
-};
-
-export type CompanyAggregateGroupBy = {
- businessType?: Maybe;
- companySize?: Maybe;
- country?: Maybe;
- createdAt?: Maybe;
- id?: Maybe;
- industry?: Maybe;
- name?: Maybe;
- totalRevenue?: Maybe;
- updatedAt?: Maybe;
- website?: Maybe;
-};
-
-export type CompanyAggregateGroupByCreatedAtArgs = {
- by?: GroupBy;
-};
-
-export type CompanyAggregateGroupByUpdatedAtArgs = {
- by?: GroupBy;
-};
-
-export type CompanyAggregateResponse = {
- avg?: Maybe;
- count?: Maybe;
- groupBy?: Maybe;
- max?: Maybe;
- min?: Maybe;
- sum?: Maybe;
-};
-
-export type CompanyAvgAggregate = {
- id?: Maybe;
- totalRevenue?: Maybe;
-};
-
-export type CompanyBusinessTypeFilterComparison = {
- eq?: InputMaybe;
- in?: InputMaybe>;
- neq?: InputMaybe;
- notIn?: InputMaybe>;
-};
-
-export type CompanyCompanySizeFilterComparison = {
- eq?: InputMaybe;
- in?: InputMaybe>;
- neq?: InputMaybe;
- notIn?: InputMaybe>;
-};
-
-export type CompanyConnection = {
- /** Array of nodes. */
- nodes: Array;
- /** Paging information */
- pageInfo: OffsetPageInfo;
- /** Fetch total count of records */
- totalCount: Scalars["Int"]["output"];
-};
-
-export type CompanyContactsAggregateGroupBy = {
- createdAt?: Maybe;
- email?: Maybe;
- id?: Maybe;
- jobTitle?: Maybe;
- name?: Maybe;
- phone?: Maybe;
- score?: Maybe;
- stage?: Maybe;
- status?: Maybe;
- timezone?: Maybe;
- updatedAt?: Maybe;
-};
-
-export type CompanyContactsAggregateResponse = {
- avg?: Maybe;
- count?: Maybe;
- groupBy?: Maybe;
- max?: Maybe;
- min?: Maybe;
- sum?: Maybe;
-};
-
-export type CompanyContactsAvgAggregate = {
- id?: Maybe;
- score?: Maybe;
-};
-
-export type CompanyContactsConnection = {
- /** Array of nodes. */
- nodes: Array;
- /** Paging information */
- pageInfo: OffsetPageInfo;
- /** Fetch total count of records */
- totalCount: Scalars["Int"]["output"];
-};
-
-export type CompanyContactsCountAggregate = {
- createdAt?: Maybe;
- email?: Maybe;
- id?: Maybe;
- jobTitle?: Maybe;
- name?: Maybe;
- phone?: Maybe;
- score?: Maybe;
- stage?: Maybe;
- status?: Maybe;
- timezone?: Maybe;
- updatedAt?: Maybe;
-};
-
-export type CompanyContactsMaxAggregate = {
- createdAt?: Maybe;
- email?: Maybe;
- id?: Maybe;
- jobTitle?: Maybe;
- name?: Maybe;
- phone?: Maybe;
- score?: Maybe;
- stage?: Maybe;
- status?: Maybe;
- timezone?: Maybe;
- updatedAt?: Maybe;
-};
-
-export type CompanyContactsMinAggregate = {
- createdAt?: Maybe;
- email?: Maybe;
- id?: Maybe;
- jobTitle?: Maybe;
- name?: Maybe;
- phone?: Maybe;
- score?: Maybe;
- stage?: Maybe;
- status?: Maybe;
- timezone?: Maybe;
- updatedAt?: Maybe;
-};
-
-export type CompanyContactsSumAggregate = {
- id?: Maybe;
- score?: Maybe;
-};
-
-export type CompanyCountAggregate = {
- businessType?: Maybe;
- companySize?: Maybe;
- country?: Maybe;
- createdAt?: Maybe;
- id?: Maybe;
- industry?: Maybe;
- name?: Maybe;
- totalRevenue?: Maybe;
- updatedAt?: Maybe;
- website?: Maybe;
-};
-
-export type CompanyCreateInput = {
- businessType?: InputMaybe;
- companySize?: InputMaybe;
- country?: InputMaybe;
- industry?: InputMaybe;
- name: Scalars["String"]["input"];
- salesOwnerId: Scalars["ID"]["input"];
- totalRevenue?: InputMaybe;
- website?: InputMaybe;
-};
-
-export type CompanyDealsAggregateGroupBy = {
- closeDateDay?: Maybe;
- closeDateMonth?: Maybe;
- closeDateYear?: Maybe;
- companyId?: Maybe;
- createdAt?: Maybe;
- dealOwnerId?: Maybe;
- id?: Maybe;
- stageId?: Maybe;
- title?: Maybe;
- updatedAt?: Maybe;
- value?: Maybe;
-};
-
-export type CompanyDealsAggregateResponse = {
- avg?: Maybe;
- count?: Maybe;
- groupBy?: Maybe;
- max?: Maybe;
- min?: Maybe;
- sum?: Maybe;
-};
-
-export type CompanyDealsAvgAggregate = {
- closeDateDay?: Maybe;
- closeDateMonth?: Maybe;
- closeDateYear?: Maybe;
- companyId?: Maybe;
- dealOwnerId?: Maybe;
- id?: Maybe;
- stageId?: Maybe;
- value?: Maybe;
-};
-
-export type CompanyDealsConnection = {
- /** Array of nodes. */
- nodes: Array;
- /** Paging information */
- pageInfo: OffsetPageInfo;
- /** Fetch total count of records */
- totalCount: Scalars["Int"]["output"];
-};
-
-export type CompanyDealsCountAggregate = {
- closeDateDay?: Maybe;
- closeDateMonth?: Maybe;
- closeDateYear?: Maybe;
- companyId?: Maybe;
- createdAt?: Maybe;
- dealOwnerId?: Maybe;
- id?: Maybe;
- stageId?: Maybe;
- title?: Maybe;
- updatedAt?: Maybe;
- value?: Maybe;
-};
-
-export type CompanyDealsMaxAggregate = {
- closeDateDay?: Maybe;
- closeDateMonth?: Maybe;
- closeDateYear?: Maybe;
- companyId?: Maybe;
- createdAt?: Maybe;
- dealOwnerId?: Maybe