@salesforce/webapp-template-feature-graphql-experimental 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +82 -0
- package/README.md +104 -0
- package/dist/.a4drules/build-validation.md +81 -0
- package/dist/.a4drules/code-quality.md +150 -0
- package/dist/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +227 -0
- package/dist/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +212 -0
- package/dist/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +185 -0
- package/dist/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +205 -0
- package/dist/.a4drules/graphql/tools/schemas/shared.graphqls +1150 -0
- package/dist/.a4drules/graphql.md +408 -0
- package/dist/.a4drules/images.md +13 -0
- package/dist/.a4drules/react.md +361 -0
- package/dist/.a4drules/react_image_processing.md +45 -0
- package/dist/.a4drules/skills/install-feature/SKILL.md +66 -0
- package/dist/.a4drules/skills/install-feature/scripts/copy-feature-assets.sh +36 -0
- package/dist/.a4drules/typescript.md +224 -0
- package/dist/.forceignore +15 -0
- package/dist/.husky/pre-commit +4 -0
- package/dist/.prettierignore +11 -0
- package/dist/.prettierrc +17 -0
- package/dist/CHANGELOG.md +324 -0
- package/dist/README.md +18 -0
- package/dist/config/project-scratch-def.json +13 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/.graphqlrc.yml +6 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/.prettierignore +9 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/.prettierrc +11 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/build/vite.config.d.ts +2 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/build/vite.config.js +73 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/e2e/app.spec.ts +24 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/eslint.config.js +113 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/feature-graphql.webapplication-meta.xml +7 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/index.html +13 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/package-lock.json +11134 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/package.json +52 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/playwright.config.ts +24 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/scripts/rewrite-e2e-assets.mjs +23 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/api/graphql-operations-types.ts +124 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/api/graphql.test.ts +91 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/api/graphql.ts +35 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/api/utils/accounts.ts +35 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/api/utils/user.test.ts +124 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/api/utils/user.ts +45 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/app.tsx +13 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/appLayout.tsx +11 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/icons/book.svg +3 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/icons/copy.svg +4 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/icons/rocket.svg +3 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/icons/star.svg +3 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/images/codey-1.png +0 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/images/codey-2.png +0 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/images/codey-3.png +0 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/images/vibe-codey.svg +194 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/components/AccountsTable.tsx +121 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/index.ts +7 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/navigationMenu.tsx +81 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/About.tsx +12 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/AccountsPage.tsx +19 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/Home.tsx +12 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/NotFound.tsx +18 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/about.tsx +10 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/new.tsx +10 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/router-utils.tsx +34 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/routes.tsx +48 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/src/styles/global.css +13 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/tsconfig.json +36 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/tsconfig.node.json +13 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/vite-env.d.ts +1 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/vite.config.ts +69 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/vitest-env.d.ts +2 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/vitest.config.ts +11 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/vitest.setup.ts +1 -0
- package/dist/force-app/main/default/webapplications/feature-graphql/webapplication.json +7 -0
- package/dist/jest.config.js +6 -0
- package/dist/package.json +37 -0
- package/dist/scripts/apex/hello.apex +10 -0
- package/dist/scripts/soql/account.soql +6 -0
- package/dist/sfdx-project.json +12 -0
- package/package.json +48 -0
- package/rules/graphql-data-access-rule.md +411 -0
- package/skills/graphql-data-access/SKILL.md +167 -0
- package/skills/graphql-data-access/docs/explore-schema.md +256 -0
- package/skills/graphql-data-access/docs/generate-mutation-query.md +222 -0
- package/skills/graphql-data-access/docs/generate-read-query.md +195 -0
- package/skills/graphql-data-access/docs/shared-schema.graphqls +1150 -0
- package/skills/graphql-data-access/scripts/codegen.js +15 -0
- package/skills/graphql-data-access/scripts/get-graphql-schema.mjs +59 -0
- package/src/force-app/main/default/webapplications/feature-graphql/.graphqlrc.yml +6 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/api/graphql-operations-types.ts +124 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/api/graphql.test.ts +91 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/api/graphql.ts +35 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/api/utils/accounts.ts +35 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/api/utils/user.test.ts +124 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/api/utils/user.ts +45 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/components/AccountsTable.tsx +121 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/index.ts +7 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/pages/AccountsPage.tsx +19 -0
- package/src/force-app/main/default/webapplications/feature-graphql/src/routes.tsx +20 -0
- package/src/force-app/main/default/webapplications/feature-graphql/vite.config.ts +69 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AccountsTable } from "../components/AccountsTable";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AccountsPage – Demo page showing the AccountsTable component
|
|
5
|
+
* that fetches Salesforce data via GraphQL.
|
|
6
|
+
*/
|
|
7
|
+
export default function AccountsPage() {
|
|
8
|
+
return (
|
|
9
|
+
<div className="mx-auto max-w-5xl space-y-6 p-6">
|
|
10
|
+
<div>
|
|
11
|
+
<h1 className="text-2xl font-bold text-gray-900">Accounts</h1>
|
|
12
|
+
<p className="mt-1 text-sm text-gray-500">
|
|
13
|
+
High-revenue accounts fetched from Salesforce via GraphQL.
|
|
14
|
+
</p>
|
|
15
|
+
</div>
|
|
16
|
+
<AccountsTable />
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RouteObject } from "react-router";
|
|
2
|
+
import AppLayout from "./__inherit__appLayout";
|
|
3
|
+
import AccountsPage from "./pages/AccountsPage";
|
|
4
|
+
|
|
5
|
+
export const routes: RouteObject[] = [
|
|
6
|
+
{
|
|
7
|
+
path: "/",
|
|
8
|
+
element: <AppLayout />,
|
|
9
|
+
children: [
|
|
10
|
+
{
|
|
11
|
+
path: "accounts",
|
|
12
|
+
element: <AccountsPage />,
|
|
13
|
+
handle: {
|
|
14
|
+
showInNavigation: true,
|
|
15
|
+
label: "Accounts",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
];
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { resolve } from "path";
|
|
5
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
6
|
+
import salesforce from "@salesforce/vite-plugin-webapp-experimental";
|
|
7
|
+
|
|
8
|
+
export default defineConfig(({ mode }) => {
|
|
9
|
+
return {
|
|
10
|
+
plugins: [tailwindcss(), react(), salesforce()],
|
|
11
|
+
|
|
12
|
+
build: {
|
|
13
|
+
outDir: resolve(__dirname, "dist"),
|
|
14
|
+
assetsDir: "assets",
|
|
15
|
+
sourcemap: false,
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
resolve: {
|
|
19
|
+
dedupe: ["react", "react-dom"],
|
|
20
|
+
alias: {
|
|
21
|
+
react: path.resolve(__dirname, "node_modules/react"),
|
|
22
|
+
"react-dom": path.resolve(__dirname, "node_modules/react-dom"),
|
|
23
|
+
"@": path.resolve(__dirname, "./src"),
|
|
24
|
+
"@api": path.resolve(__dirname, "./src/api"),
|
|
25
|
+
"@components": path.resolve(__dirname, "./src/components"),
|
|
26
|
+
"@utils": path.resolve(__dirname, "./src/utils"),
|
|
27
|
+
"@styles": path.resolve(__dirname, "./src/styles"),
|
|
28
|
+
"@assets": path.resolve(__dirname, "./src/assets"),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
test: {
|
|
33
|
+
root: resolve(__dirname),
|
|
34
|
+
environment: "jsdom",
|
|
35
|
+
setupFiles: ["./src/test/setup.ts"],
|
|
36
|
+
include: [
|
|
37
|
+
"src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}",
|
|
38
|
+
"src/**/__tests__/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}",
|
|
39
|
+
],
|
|
40
|
+
coverage: {
|
|
41
|
+
provider: "v8",
|
|
42
|
+
reporter: ["text", "html", "clover", "json"],
|
|
43
|
+
exclude: [
|
|
44
|
+
"node_modules/",
|
|
45
|
+
"src/test/",
|
|
46
|
+
"src/**/*.d.ts",
|
|
47
|
+
"src/main.tsx",
|
|
48
|
+
"src/vite-env.d.ts",
|
|
49
|
+
"src/components/**/index.ts",
|
|
50
|
+
"**/*.config.ts",
|
|
51
|
+
"build/",
|
|
52
|
+
"dist/",
|
|
53
|
+
"coverage/",
|
|
54
|
+
"eslint.config.js",
|
|
55
|
+
],
|
|
56
|
+
thresholds: {
|
|
57
|
+
global: {
|
|
58
|
+
branches: 85,
|
|
59
|
+
functions: 85,
|
|
60
|
+
lines: 85,
|
|
61
|
+
statements: 85,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
testTimeout: 10000,
|
|
66
|
+
globals: true,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
});
|