@salesforce/ui-bundle-template-feature-react-customer-web-client-chat 11.52.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 +63 -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 +4553 -0
- package/dist/README.md +77 -0
- package/dist/config/project-scratch-def.json +13 -0
- package/dist/eslint.config.js +7 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/.forceignore +15 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/.graphqlrc.yml +2 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/.prettierignore +9 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/.prettierrc +11 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/CHANGELOG.md +10 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/README.md +75 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/codegen.yml +95 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/components.json +18 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/e2e/app.spec.ts +17 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/eslint.config.js +169 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/feature-react-customer-web-client-chat.uibundle-meta.xml +7 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/index.html +12 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/package.json +76 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/playwright.config.ts +24 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/scripts/get-graphql-schema.mjs +71 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/scripts/rewrite-e2e-assets.mjs +23 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/api/graphqlClient.ts +44 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/app.tsx +17 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/appLayout.tsx +83 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/assets/icons/book.svg +3 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/assets/icons/copy.svg +4 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/assets/icons/rocket.svg +3 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/assets/icons/star.svg +3 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/assets/images/codey-1.png +0 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/assets/images/codey-2.png +0 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/assets/images/codey-3.png +0 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/assets/images/vibe-codey.svg +194 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/CustomerWebClientChat.tsx +74 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/alerts/status-alert.tsx +52 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/layouts/card-layout.tsx +29 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/alert.tsx +76 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/avatar.tsx +109 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/badge.tsx +48 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/breadcrumb.tsx +109 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/button.tsx +67 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/calendar.tsx +232 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/card.tsx +103 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/checkbox.tsx +32 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/collapsible.tsx +33 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/datePicker.tsx +127 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/dialog.tsx +162 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/dropdown-menu.tsx +257 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/field.tsx +237 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/index.ts +109 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/input.tsx +19 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/label.tsx +22 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/pagination.tsx +132 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/popover.tsx +89 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/select.tsx +193 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/separator.tsx +26 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/skeleton.tsx +14 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/sonner.tsx +20 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/spinner.tsx +16 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/table.tsx +121 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/ui/tabs.tsx +88 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/hooks/useAsyncData.ts +67 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/index.ts +6 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/lib/utils.ts +6 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/navigationMenu.tsx +80 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/pages/Home.tsx +12 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/pages/NotFound.tsx +18 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/pages/TestChatPage.tsx +26 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/router-utils.tsx +35 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/routes.tsx +28 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/styles/global.css +135 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/types/chat.ts +36 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/tsconfig.json +45 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/tsconfig.node.json +13 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/tsconfig.tsbuildinfo +1 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/ui-bundle.json +7 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/vite-env.d.ts +4 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/vite.config.ts +106 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/vitest-env.d.ts +2 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/vitest.config.ts +11 -0
- package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/vitest.setup.ts +1 -0
- package/dist/jest.config.js +6 -0
- package/dist/package-lock.json +10066 -0
- package/dist/package.json +46 -0
- package/dist/scripts/apex/hello.apex +10 -0
- package/dist/scripts/gitignore-templates.json +4 -0
- package/dist/scripts/graphql-search.sh +191 -0
- package/dist/scripts/org-setup-config-schema.mjs +120 -0
- package/dist/scripts/org-setup-dev.mjs +87 -0
- package/dist/scripts/org-setup-utils.mjs +569 -0
- package/dist/scripts/org-setup-xml.mjs +182 -0
- package/dist/scripts/org-setup.config.json +5 -0
- package/dist/scripts/org-setup.mjs +2345 -0
- package/dist/scripts/sf-project-setup.mjs +103 -0
- package/dist/scripts/soql/account.soql +6 -0
- package/dist/scripts/validate-org-setup-config.mjs +38 -0
- package/dist/sfdx-project.json +12 -0
- package/package.json +51 -0
- package/src/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/components/CustomerWebClientChat.tsx +74 -0
- package/src/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/index.ts +6 -0
- package/src/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/pages/TestChatPage.tsx +26 -0
- package/src/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/routes.tsx +23 -0
- package/src/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/src/types/chat.ts +36 -0
package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/vite.config.ts
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { defineConfig } from 'vite';
|
|
3
|
+
import react from '@vitejs/plugin-react';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { resolve } from 'path';
|
|
6
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
7
|
+
import salesforce from '@salesforce/vite-plugin-ui-bundle';
|
|
8
|
+
import codegen from 'vite-plugin-graphql-codegen';
|
|
9
|
+
|
|
10
|
+
const schemaPath = resolve(__dirname, '../../../../../schema.graphql');
|
|
11
|
+
const schemaExists = existsSync(schemaPath);
|
|
12
|
+
|
|
13
|
+
export default defineConfig(({ mode }) => {
|
|
14
|
+
return {
|
|
15
|
+
base: './',
|
|
16
|
+
plugins: [
|
|
17
|
+
tailwindcss(),
|
|
18
|
+
react(),
|
|
19
|
+
salesforce(),
|
|
20
|
+
// Only add codegen when schema exists (e.g. after `npm run graphql:schema`).
|
|
21
|
+
// In CI or when schema is not checked in, skip codegen so build succeeds.
|
|
22
|
+
...(schemaExists
|
|
23
|
+
? [
|
|
24
|
+
codegen({
|
|
25
|
+
configFilePathOverride: resolve(__dirname, 'codegen.yml'),
|
|
26
|
+
runOnStart: true,
|
|
27
|
+
runOnBuild: true,
|
|
28
|
+
enableWatcher: true,
|
|
29
|
+
throwOnBuild: true,
|
|
30
|
+
}),
|
|
31
|
+
]
|
|
32
|
+
: []),
|
|
33
|
+
] as import('vite').PluginOption[],
|
|
34
|
+
|
|
35
|
+
// Build configuration for MPA
|
|
36
|
+
build: {
|
|
37
|
+
outDir: resolve(__dirname, 'dist'),
|
|
38
|
+
assetsDir: 'assets',
|
|
39
|
+
sourcemap: false,
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
// Resolve aliases (shared between build and test)
|
|
43
|
+
resolve: {
|
|
44
|
+
dedupe: ['react', 'react-dom'],
|
|
45
|
+
alias: {
|
|
46
|
+
'@': path.resolve(__dirname, './src'),
|
|
47
|
+
'@api': path.resolve(__dirname, './src/api'),
|
|
48
|
+
'@components': path.resolve(__dirname, './src/components'),
|
|
49
|
+
'@utils': path.resolve(__dirname, './src/utils'),
|
|
50
|
+
'@styles': path.resolve(__dirname, './src/styles'),
|
|
51
|
+
'@assets': path.resolve(__dirname, './src/assets'),
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
// Vitest configuration
|
|
56
|
+
test: {
|
|
57
|
+
// Override root for tests (build uses src/pages as root)
|
|
58
|
+
root: resolve(__dirname),
|
|
59
|
+
|
|
60
|
+
// Use jsdom environment for React component testing
|
|
61
|
+
environment: 'jsdom',
|
|
62
|
+
|
|
63
|
+
// Setup files to run before each test
|
|
64
|
+
setupFiles: ['./src/test/setup.ts'],
|
|
65
|
+
|
|
66
|
+
// Global test patterns
|
|
67
|
+
include: [
|
|
68
|
+
'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
69
|
+
'src/**/__tests__/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
70
|
+
],
|
|
71
|
+
|
|
72
|
+
// Coverage configuration
|
|
73
|
+
coverage: {
|
|
74
|
+
provider: 'v8',
|
|
75
|
+
reporter: ['text', 'html', 'clover', 'json'],
|
|
76
|
+
exclude: [
|
|
77
|
+
'node_modules/',
|
|
78
|
+
'src/test/',
|
|
79
|
+
'src/**/*.d.ts',
|
|
80
|
+
'src/main.tsx',
|
|
81
|
+
'src/vite-env.d.ts',
|
|
82
|
+
'src/components/**/index.ts',
|
|
83
|
+
'**/*.config.ts',
|
|
84
|
+
'build/',
|
|
85
|
+
'dist/',
|
|
86
|
+
'coverage/',
|
|
87
|
+
'eslint.config.js',
|
|
88
|
+
],
|
|
89
|
+
thresholds: {
|
|
90
|
+
global: {
|
|
91
|
+
branches: 85,
|
|
92
|
+
functions: 85,
|
|
93
|
+
lines: 85,
|
|
94
|
+
statements: 85,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
// Test timeout
|
|
100
|
+
testTimeout: 10000,
|
|
101
|
+
|
|
102
|
+
// Globals for easier testing
|
|
103
|
+
globals: true,
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
});
|
package/dist/force-app/main/default/uiBundles/feature-react-customer-web-client-chat/vitest.setup.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/vitest';
|