@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.
Files changed (100) hide show
  1. package/LICENSE.txt +82 -0
  2. package/README.md +104 -0
  3. package/dist/.a4drules/build-validation.md +81 -0
  4. package/dist/.a4drules/code-quality.md +150 -0
  5. package/dist/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +227 -0
  6. package/dist/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +212 -0
  7. package/dist/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +185 -0
  8. package/dist/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +205 -0
  9. package/dist/.a4drules/graphql/tools/schemas/shared.graphqls +1150 -0
  10. package/dist/.a4drules/graphql.md +408 -0
  11. package/dist/.a4drules/images.md +13 -0
  12. package/dist/.a4drules/react.md +361 -0
  13. package/dist/.a4drules/react_image_processing.md +45 -0
  14. package/dist/.a4drules/skills/install-feature/SKILL.md +66 -0
  15. package/dist/.a4drules/skills/install-feature/scripts/copy-feature-assets.sh +36 -0
  16. package/dist/.a4drules/typescript.md +224 -0
  17. package/dist/.forceignore +15 -0
  18. package/dist/.husky/pre-commit +4 -0
  19. package/dist/.prettierignore +11 -0
  20. package/dist/.prettierrc +17 -0
  21. package/dist/CHANGELOG.md +324 -0
  22. package/dist/README.md +18 -0
  23. package/dist/config/project-scratch-def.json +13 -0
  24. package/dist/force-app/main/default/webapplications/feature-graphql/.graphqlrc.yml +6 -0
  25. package/dist/force-app/main/default/webapplications/feature-graphql/.prettierignore +9 -0
  26. package/dist/force-app/main/default/webapplications/feature-graphql/.prettierrc +11 -0
  27. package/dist/force-app/main/default/webapplications/feature-graphql/build/vite.config.d.ts +2 -0
  28. package/dist/force-app/main/default/webapplications/feature-graphql/build/vite.config.js +73 -0
  29. package/dist/force-app/main/default/webapplications/feature-graphql/e2e/app.spec.ts +24 -0
  30. package/dist/force-app/main/default/webapplications/feature-graphql/eslint.config.js +113 -0
  31. package/dist/force-app/main/default/webapplications/feature-graphql/feature-graphql.webapplication-meta.xml +7 -0
  32. package/dist/force-app/main/default/webapplications/feature-graphql/index.html +13 -0
  33. package/dist/force-app/main/default/webapplications/feature-graphql/package-lock.json +11134 -0
  34. package/dist/force-app/main/default/webapplications/feature-graphql/package.json +52 -0
  35. package/dist/force-app/main/default/webapplications/feature-graphql/playwright.config.ts +24 -0
  36. package/dist/force-app/main/default/webapplications/feature-graphql/scripts/rewrite-e2e-assets.mjs +23 -0
  37. package/dist/force-app/main/default/webapplications/feature-graphql/src/api/graphql-operations-types.ts +124 -0
  38. package/dist/force-app/main/default/webapplications/feature-graphql/src/api/graphql.test.ts +91 -0
  39. package/dist/force-app/main/default/webapplications/feature-graphql/src/api/graphql.ts +35 -0
  40. package/dist/force-app/main/default/webapplications/feature-graphql/src/api/utils/accounts.ts +35 -0
  41. package/dist/force-app/main/default/webapplications/feature-graphql/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
  42. package/dist/force-app/main/default/webapplications/feature-graphql/src/api/utils/user.test.ts +124 -0
  43. package/dist/force-app/main/default/webapplications/feature-graphql/src/api/utils/user.ts +45 -0
  44. package/dist/force-app/main/default/webapplications/feature-graphql/src/app.tsx +13 -0
  45. package/dist/force-app/main/default/webapplications/feature-graphql/src/appLayout.tsx +11 -0
  46. package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/icons/book.svg +3 -0
  47. package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/icons/copy.svg +4 -0
  48. package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/icons/rocket.svg +3 -0
  49. package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/icons/star.svg +3 -0
  50. package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/images/codey-1.png +0 -0
  51. package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/images/codey-2.png +0 -0
  52. package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/images/codey-3.png +0 -0
  53. package/dist/force-app/main/default/webapplications/feature-graphql/src/assets/images/vibe-codey.svg +194 -0
  54. package/dist/force-app/main/default/webapplications/feature-graphql/src/components/AccountsTable.tsx +121 -0
  55. package/dist/force-app/main/default/webapplications/feature-graphql/src/index.ts +7 -0
  56. package/dist/force-app/main/default/webapplications/feature-graphql/src/navigationMenu.tsx +81 -0
  57. package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/About.tsx +12 -0
  58. package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/AccountsPage.tsx +19 -0
  59. package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/Home.tsx +12 -0
  60. package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/NotFound.tsx +18 -0
  61. package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/about.tsx +10 -0
  62. package/dist/force-app/main/default/webapplications/feature-graphql/src/pages/new.tsx +10 -0
  63. package/dist/force-app/main/default/webapplications/feature-graphql/src/router-utils.tsx +34 -0
  64. package/dist/force-app/main/default/webapplications/feature-graphql/src/routes.tsx +48 -0
  65. package/dist/force-app/main/default/webapplications/feature-graphql/src/styles/global.css +13 -0
  66. package/dist/force-app/main/default/webapplications/feature-graphql/tsconfig.json +36 -0
  67. package/dist/force-app/main/default/webapplications/feature-graphql/tsconfig.node.json +13 -0
  68. package/dist/force-app/main/default/webapplications/feature-graphql/vite-env.d.ts +1 -0
  69. package/dist/force-app/main/default/webapplications/feature-graphql/vite.config.ts +69 -0
  70. package/dist/force-app/main/default/webapplications/feature-graphql/vitest-env.d.ts +2 -0
  71. package/dist/force-app/main/default/webapplications/feature-graphql/vitest.config.ts +11 -0
  72. package/dist/force-app/main/default/webapplications/feature-graphql/vitest.setup.ts +1 -0
  73. package/dist/force-app/main/default/webapplications/feature-graphql/webapplication.json +7 -0
  74. package/dist/jest.config.js +6 -0
  75. package/dist/package.json +37 -0
  76. package/dist/scripts/apex/hello.apex +10 -0
  77. package/dist/scripts/soql/account.soql +6 -0
  78. package/dist/sfdx-project.json +12 -0
  79. package/package.json +48 -0
  80. package/rules/graphql-data-access-rule.md +411 -0
  81. package/skills/graphql-data-access/SKILL.md +167 -0
  82. package/skills/graphql-data-access/docs/explore-schema.md +256 -0
  83. package/skills/graphql-data-access/docs/generate-mutation-query.md +222 -0
  84. package/skills/graphql-data-access/docs/generate-read-query.md +195 -0
  85. package/skills/graphql-data-access/docs/shared-schema.graphqls +1150 -0
  86. package/skills/graphql-data-access/scripts/codegen.js +15 -0
  87. package/skills/graphql-data-access/scripts/get-graphql-schema.mjs +59 -0
  88. package/src/force-app/main/default/webapplications/feature-graphql/.graphqlrc.yml +6 -0
  89. package/src/force-app/main/default/webapplications/feature-graphql/src/api/graphql-operations-types.ts +124 -0
  90. package/src/force-app/main/default/webapplications/feature-graphql/src/api/graphql.test.ts +91 -0
  91. package/src/force-app/main/default/webapplications/feature-graphql/src/api/graphql.ts +35 -0
  92. package/src/force-app/main/default/webapplications/feature-graphql/src/api/utils/accounts.ts +35 -0
  93. package/src/force-app/main/default/webapplications/feature-graphql/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
  94. package/src/force-app/main/default/webapplications/feature-graphql/src/api/utils/user.test.ts +124 -0
  95. package/src/force-app/main/default/webapplications/feature-graphql/src/api/utils/user.ts +45 -0
  96. package/src/force-app/main/default/webapplications/feature-graphql/src/components/AccountsTable.tsx +121 -0
  97. package/src/force-app/main/default/webapplications/feature-graphql/src/index.ts +7 -0
  98. package/src/force-app/main/default/webapplications/feature-graphql/src/pages/AccountsPage.tsx +19 -0
  99. package/src/force-app/main/default/webapplications/feature-graphql/src/routes.tsx +20 -0
  100. 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
+ });