@schandlergarcia/sf-web-components 2.2.0 ā 2.3.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/CHANGELOG.md +15 -0
- package/brands/engine/app/api/graphql-operations-types.ts +11260 -0
- package/brands/engine/app/api/graphqlClient.ts +25 -0
- package/brands/engine/app/api/partnerQueries.ts +212 -0
- package/brands/engine/app/appLayout.tsx +13 -0
- package/brands/engine/app/components/AgentforceConversationClient.tsx +201 -0
- package/brands/engine/app/components/__inherit_AgentforceConversationClient.tsx +3 -0
- package/brands/engine/app/components/alerts/status-alert.tsx +49 -0
- package/brands/engine/app/components/layouts/card-layout.tsx +29 -0
- package/brands/engine/app/components/workspace/CommandCenter.tsx +16 -0
- package/brands/engine/app/config/agentApi.ts +36 -0
- package/brands/engine/app/features/object-search/__examples__/api/accountSearchService.ts +46 -0
- package/brands/engine/app/features/object-search/__examples__/api/query/distinctAccountIndustries.graphql +19 -0
- package/brands/engine/app/features/object-search/__examples__/api/query/distinctAccountTypes.graphql +19 -0
- package/brands/engine/app/features/object-search/__examples__/api/query/getAccountDetail.graphql +121 -0
- package/brands/engine/app/features/object-search/__examples__/api/query/searchAccounts.graphql +51 -0
- package/brands/engine/app/features/object-search/__examples__/pages/AccountObjectDetailPage.tsx +357 -0
- package/brands/engine/app/features/object-search/__examples__/pages/AccountSearch.tsx +312 -0
- package/brands/engine/app/features/object-search/__examples__/pages/Home.tsx +34 -0
- package/brands/engine/app/features/object-search/api/objectSearchService.ts +84 -0
- package/brands/engine/app/features/object-search/components/ActiveFilters.tsx +89 -0
- package/brands/engine/app/features/object-search/components/FilterContext.tsx +83 -0
- package/brands/engine/app/features/object-search/components/ObjectBreadcrumb.tsx +66 -0
- package/brands/engine/app/features/object-search/components/PaginationControls.tsx +109 -0
- package/brands/engine/app/features/object-search/components/SearchBar.tsx +41 -0
- package/brands/engine/app/features/object-search/components/SortControl.tsx +143 -0
- package/brands/engine/app/features/object-search/components/filters/BooleanFilter.tsx +78 -0
- package/brands/engine/app/features/object-search/components/filters/DateFilter.tsx +128 -0
- package/brands/engine/app/features/object-search/components/filters/DateRangeFilter.tsx +70 -0
- package/brands/engine/app/features/object-search/components/filters/FilterFieldWrapper.tsx +33 -0
- package/brands/engine/app/features/object-search/components/filters/MultiSelectFilter.tsx +97 -0
- package/brands/engine/app/features/object-search/components/filters/NumericRangeFilter.tsx +163 -0
- package/brands/engine/app/features/object-search/components/filters/SearchFilter.tsx +50 -0
- package/brands/engine/app/features/object-search/components/filters/SelectFilter.tsx +97 -0
- package/brands/engine/app/features/object-search/components/filters/TextFilter.tsx +91 -0
- package/brands/engine/app/features/object-search/hooks/useAsyncData.ts +54 -0
- package/brands/engine/app/features/object-search/hooks/useCachedAsyncData.ts +184 -0
- package/brands/engine/app/features/object-search/hooks/useDebouncedCallback.ts +34 -0
- package/brands/engine/app/features/object-search/hooks/useObjectSearchParams.ts +252 -0
- package/brands/engine/app/features/object-search/utils/debounce.ts +25 -0
- package/brands/engine/app/features/object-search/utils/fieldUtils.ts +29 -0
- package/brands/engine/app/features/object-search/utils/filterUtils.ts +404 -0
- package/brands/engine/app/features/object-search/utils/sortUtils.ts +38 -0
- package/brands/engine/app/hooks/useEngineLiveData.ts +49 -0
- package/brands/engine/app/hooks/useEvaAgent.ts +288 -0
- package/brands/engine/app/hooks/usePartnerDashboardData.ts +141 -0
- package/brands/engine/app/navigationMenu.tsx +80 -0
- package/brands/engine/app/pages/AccountObjectDetailPage.tsx +361 -0
- package/brands/engine/app/pages/AccountSearch.tsx +305 -0
- package/brands/engine/app/pages/BlankDashboard.tsx +15 -0
- package/brands/engine/app/pages/DataTest.tsx +78 -0
- package/brands/engine/app/pages/Home.tsx +5 -0
- package/brands/engine/app/pages/NotFound.tsx +19 -0
- package/brands/engine/app/pages/PartnerHubDashboard.tsx +2010 -0
- package/brands/engine/app/pages/Search.tsx +13 -0
- package/brands/engine/app/router-utils.tsx +35 -0
- package/brands/engine/app/routes.tsx +39 -0
- package/brands/engine/app/styles/global.css +270 -0
- package/package.json +1 -1
- package/scripts/apply-brand.mjs +159 -76
- package/scripts/postinstall.mjs +24 -5
package/scripts/postinstall.mjs
CHANGED
|
@@ -336,9 +336,9 @@ if (fs.existsSync(packageJsonPath)) {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
// Add manual setup script (re-runs postinstall if it was missed)
|
|
339
|
-
if (!packageJson.scripts['setup']) {
|
|
340
|
-
packageJson.scripts['setup'] = 'node node_modules/@schandlergarcia/sf-web-components/scripts/postinstall.mjs';
|
|
341
|
-
scriptsAdded.push('setup');
|
|
339
|
+
if (!packageJson.scripts['sfwc:setup']) {
|
|
340
|
+
packageJson.scripts['sfwc:setup'] = 'node node_modules/@schandlergarcia/sf-web-components/scripts/postinstall.mjs';
|
|
341
|
+
scriptsAdded.push('sfwc:setup');
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
// Add brand scripts
|
|
@@ -355,6 +355,12 @@ if (fs.existsSync(packageJsonPath)) {
|
|
|
355
355
|
scriptsAdded.push('brand:list');
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
+
// Add demo scripts
|
|
359
|
+
if (!packageJson.scripts['demo:engine']) {
|
|
360
|
+
packageJson.scripts['demo:engine'] = 'node node_modules/@schandlergarcia/sf-web-components/scripts/apply-brand.mjs --demo engine';
|
|
361
|
+
scriptsAdded.push('demo:engine');
|
|
362
|
+
}
|
|
363
|
+
|
|
358
364
|
if (scriptsAdded.length > 0) {
|
|
359
365
|
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n', 'utf-8');
|
|
360
366
|
scriptsAdded.forEach(script => {
|
|
@@ -374,7 +380,20 @@ const packageA4dRules = path.join(packageRoot, '.a4drules');
|
|
|
374
380
|
if (fs.existsSync(packageA4dRules)) {
|
|
375
381
|
console.log('\nš Copying AI assistant rules to project root...\n');
|
|
376
382
|
|
|
377
|
-
|
|
383
|
+
// Walk up from cwd to find the project root (directory with package.json)
|
|
384
|
+
// For SFDX projects, the webapp may be nested (force-app/main/default/uiBundles/app/)
|
|
385
|
+
// and the SFDX root is higher up. We look for sfdx-project.json first, then fall back to cwd.
|
|
386
|
+
let projectRootPath = cwd;
|
|
387
|
+
let checkDir = cwd;
|
|
388
|
+
for (let i = 0; i < 10; i++) {
|
|
389
|
+
const parent = path.dirname(checkDir);
|
|
390
|
+
if (parent === checkDir) break;
|
|
391
|
+
if (fs.existsSync(path.join(parent, 'sfdx-project.json'))) {
|
|
392
|
+
projectRootPath = parent;
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
395
|
+
checkDir = parent;
|
|
396
|
+
}
|
|
378
397
|
const targetA4dRules = path.join(projectRootPath, '.a4drules');
|
|
379
398
|
|
|
380
399
|
if (!fs.existsSync(targetA4dRules)) {
|
|
@@ -462,7 +481,7 @@ console.log(` - Installed ${templatesInstalled} page templates`);
|
|
|
462
481
|
console.log(` - Installed ${scriptsInstalled} utility scripts`);
|
|
463
482
|
console.log(` - Installed CommandCenter.tsx for dashboard management`);
|
|
464
483
|
console.log(` - Added "npm run reset:command-center" script`);
|
|
465
|
-
console.log(` - Added "npm run setup" script (re-run this setup anytime)`);
|
|
484
|
+
console.log(` - Added "npm run sfwc:setup" script (re-run this setup anytime)`);
|
|
466
485
|
console.log(` - Installed AI assistant rules (.a4drules)`);
|
|
467
486
|
if (migratedFiles > 0) {
|
|
468
487
|
console.log(` - Migrated ${migratedFiles} dashboard files to correct location`);
|