@salesforce/ui-bundle-template-app-angular-template-b2e 11.30.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 (161) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/.forceignore +15 -0
  3. package/dist/.husky/pre-commit +4 -0
  4. package/dist/.prettierignore +11 -0
  5. package/dist/.prettierrc +17 -0
  6. package/dist/CHANGELOG.md +3966 -0
  7. package/dist/README.md +77 -0
  8. package/dist/config/project-scratch-def.json +13 -0
  9. package/dist/eslint.config.js +7 -0
  10. package/dist/force-app/main/default/applications/angularinternalapp.app-meta.xml +17 -0
  11. package/dist/force-app/main/default/permissionsets/angularinternalapp_Access.permissionset-meta.xml +13 -0
  12. package/dist/force-app/main/default/uiBundles/angularinternalapp/.forceignore +15 -0
  13. package/dist/force-app/main/default/uiBundles/angularinternalapp/.postcssrc.json +5 -0
  14. package/dist/force-app/main/default/uiBundles/angularinternalapp/.prettierignore +8 -0
  15. package/dist/force-app/main/default/uiBundles/angularinternalapp/.prettierrc +12 -0
  16. package/dist/force-app/main/default/uiBundles/angularinternalapp/CHANGELOG.md +4 -0
  17. package/dist/force-app/main/default/uiBundles/angularinternalapp/README.md +85 -0
  18. package/dist/force-app/main/default/uiBundles/angularinternalapp/angular.json +98 -0
  19. package/dist/force-app/main/default/uiBundles/angularinternalapp/angularinternalapp.uibundle-meta.xml +8 -0
  20. package/dist/force-app/main/default/uiBundles/angularinternalapp/e2e/app.spec.ts +15 -0
  21. package/dist/force-app/main/default/uiBundles/angularinternalapp/esbuild/api-version.mjs +17 -0
  22. package/dist/force-app/main/default/uiBundles/angularinternalapp/eslint.config.js +60 -0
  23. package/dist/force-app/main/default/uiBundles/angularinternalapp/middleware/html.mjs +3 -0
  24. package/dist/force-app/main/default/uiBundles/angularinternalapp/middleware/proxy.mjs +12 -0
  25. package/dist/force-app/main/default/uiBundles/angularinternalapp/package.json +57 -0
  26. package/dist/force-app/main/default/uiBundles/angularinternalapp/playwright.config.ts +25 -0
  27. package/dist/force-app/main/default/uiBundles/angularinternalapp/public/favicon.ico +0 -0
  28. package/dist/force-app/main/default/uiBundles/angularinternalapp/scripts/rewrite-e2e-assets.mjs +30 -0
  29. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/api/account/account-search.service.ts +196 -0
  30. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/api/account/distinctAccountIndustries.ts +26 -0
  31. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/api/account/distinctAccountTypes.ts +26 -0
  32. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/api/account/getAccountDetail.ts +128 -0
  33. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/api/account/searchAccounts.ts +58 -0
  34. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/api/data-client.service.spec.ts +184 -0
  35. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/api/data-client.service.ts +74 -0
  36. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/app.config.ts +22 -0
  37. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/app.html +1 -0
  38. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/app.routes.ts +31 -0
  39. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/app.spec.ts +18 -0
  40. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/app.ts +15 -0
  41. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/layout/app-layout/app-layout.component.html +52 -0
  42. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/layout/app-layout/app-layout.component.spec.ts +90 -0
  43. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/layout/app-layout/app-layout.component.ts +67 -0
  44. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/_field-size.scss +42 -0
  45. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/alert/alert.component.html +31 -0
  46. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/alert/alert.component.ts +53 -0
  47. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/button/button.component.html +18 -0
  48. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/button/button.component.scss +112 -0
  49. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/button/button.component.ts +57 -0
  50. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/card/card.component.scss +34 -0
  51. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/card/card.component.ts +110 -0
  52. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/collapsible/collapsible.component.html +10 -0
  53. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/collapsible/collapsible.component.ts +26 -0
  54. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/date-picker/date-picker.component.html +25 -0
  55. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/date-picker/date-picker.component.scss +36 -0
  56. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/date-picker/date-picker.component.ts +41 -0
  57. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/date-range-picker/date-range-picker.component.html +34 -0
  58. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/date-range-picker/date-range-picker.component.scss +33 -0
  59. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/date-range-picker/date-range-picker.component.ts +66 -0
  60. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/dialog/dialog.component.html +37 -0
  61. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/dialog/dialog.component.ts +55 -0
  62. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/field/field.component.html +21 -0
  63. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/field/field.component.ts +36 -0
  64. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/field-size.ts +8 -0
  65. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/input/input.component.html +19 -0
  66. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/input/input.component.scss +35 -0
  67. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/input/input.component.ts +36 -0
  68. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/label/label.component.html +3 -0
  69. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/label/label.component.ts +17 -0
  70. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/paginator/paginator.component.html +10 -0
  71. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/paginator/paginator.component.ts +37 -0
  72. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/popover/popover.component.html +41 -0
  73. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/popover/popover.component.ts +40 -0
  74. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/select/select.component.html +24 -0
  75. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/select/select.component.scss +35 -0
  76. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/select/select.component.ts +72 -0
  77. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/separator/separator.component.html +1 -0
  78. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/separator/separator.component.scss +23 -0
  79. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/separator/separator.component.ts +56 -0
  80. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/skeleton/skeleton.component.html +1 -0
  81. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/skeleton/skeleton.component.scss +28 -0
  82. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/skeleton/skeleton.component.ts +24 -0
  83. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/components/ui/spinner/spinner.component.ts +35 -0
  84. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/agentforce/agentforce-conversation-client/agentforce-conversation-client.component.html +3 -0
  85. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/agentforce/agentforce-conversation-client/agentforce-conversation-client.component.ts +119 -0
  86. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/agentforce/agentforce-embed.service.ts +177 -0
  87. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/active-filters/active-filters.component.html +23 -0
  88. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/active-filters/active-filters.component.ts +78 -0
  89. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/date-filter/date-filter.component.html +18 -0
  90. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/date-filter/date-filter.component.ts +137 -0
  91. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/date-range-filter/date-range-filter.component.html +11 -0
  92. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/date-range-filter/date-range-filter.component.ts +69 -0
  93. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/filter-field-wrapper/filter-field-wrapper.component.html +11 -0
  94. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/filter-field-wrapper/filter-field-wrapper.component.ts +36 -0
  95. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/multi-select-filter/multi-select-filter.component.html +10 -0
  96. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/multi-select-filter/multi-select-filter.component.ts +58 -0
  97. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/numeric-range-filter/numeric-range-filter.component.html +22 -0
  98. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/numeric-range-filter/numeric-range-filter.component.ts +146 -0
  99. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/search-filter/search-filter.component.html +8 -0
  100. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/search-filter/search-filter.component.ts +82 -0
  101. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/select-filter/select-filter.component.html +12 -0
  102. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/select-filter/select-filter.component.ts +65 -0
  103. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/text-filter/text-filter.component.html +12 -0
  104. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/filters/text-filter/text-filter.component.ts +90 -0
  105. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/object-breadcrumb/object-breadcrumb.component.html +55 -0
  106. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/object-breadcrumb/object-breadcrumb.component.ts +40 -0
  107. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/pagination-controls/pagination-controls.component.html +8 -0
  108. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/pagination-controls/pagination-controls.component.ts +61 -0
  109. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/search-bar/search-bar.component.html +59 -0
  110. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/search-bar/search-bar.component.ts +108 -0
  111. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/sort-control/sort-control.component.html +50 -0
  112. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/components/sort-control/sort-control.component.ts +72 -0
  113. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/object-search-state.service.ts +232 -0
  114. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/utils/debounce.ts +31 -0
  115. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/utils/field-utils.ts +54 -0
  116. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/utils/filter-utils.ts +354 -0
  117. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/utils/index.ts +12 -0
  118. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/features/object-search/utils/sort-utils.ts +46 -0
  119. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/account-detail/account-detail-page.component.html +174 -0
  120. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/account-detail/account-detail-page.component.scss +7 -0
  121. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/account-detail/account-detail-page.component.ts +199 -0
  122. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/account-search/account-search-page.component.html +111 -0
  123. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/account-search/account-search-page.component.ts +217 -0
  124. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/home/home-page.component.html +18 -0
  125. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/home/home-page.component.ts +47 -0
  126. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/home/home.component.html +6 -0
  127. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/home/home.component.spec.ts +23 -0
  128. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/home/home.component.ts +13 -0
  129. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/not-found/not-found.component.html +12 -0
  130. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/not-found/not-found.component.spec.ts +33 -0
  131. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/pages/not-found/not-found.component.ts +15 -0
  132. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/types/conversation.ts +55 -0
  133. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/types/globals.d.ts +13 -0
  134. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/app/utils/async-data.ts +99 -0
  135. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/index.html +14 -0
  136. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/index.ts +15 -0
  137. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/main.ts +5 -0
  138. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/styles.scss +170 -0
  139. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/theme.scss +39 -0
  140. package/dist/force-app/main/default/uiBundles/angularinternalapp/src/types/sf-globals.d.ts +9 -0
  141. package/dist/force-app/main/default/uiBundles/angularinternalapp/tsconfig.app.json +11 -0
  142. package/dist/force-app/main/default/uiBundles/angularinternalapp/tsconfig.json +33 -0
  143. package/dist/force-app/main/default/uiBundles/angularinternalapp/tsconfig.spec.json +10 -0
  144. package/dist/force-app/main/default/uiBundles/angularinternalapp/ui-bundle.json +7 -0
  145. package/dist/jest.config.js +6 -0
  146. package/dist/package-lock.json +10066 -0
  147. package/dist/package.json +46 -0
  148. package/dist/scripts/apex/hello.apex +10 -0
  149. package/dist/scripts/gitignore-templates.json +4 -0
  150. package/dist/scripts/graphql-search.sh +191 -0
  151. package/dist/scripts/org-setup-config-schema.mjs +103 -0
  152. package/dist/scripts/org-setup-dev.mjs +87 -0
  153. package/dist/scripts/org-setup-utils.mjs +369 -0
  154. package/dist/scripts/org-setup-xml.mjs +182 -0
  155. package/dist/scripts/org-setup.config.json +9 -0
  156. package/dist/scripts/org-setup.mjs +1702 -0
  157. package/dist/scripts/sf-project-setup.mjs +103 -0
  158. package/dist/scripts/soql/account.soql +6 -0
  159. package/dist/scripts/validate-org-setup-config.mjs +38 -0
  160. package/dist/sfdx-project.json +12 -0
  161. package/package.json +40 -0
@@ -0,0 +1,33 @@
1
+ import { TestBed } from '@angular/core/testing';
2
+ import { provideRouter } from '@angular/router';
3
+ import { NotFoundComponent } from './not-found.component';
4
+
5
+ describe('NotFoundComponent', () => {
6
+ beforeEach(async () => {
7
+ await TestBed.configureTestingModule({
8
+ imports: [NotFoundComponent],
9
+ providers: [provideRouter([])],
10
+ }).compileComponents();
11
+ });
12
+
13
+ it('should create the component', () => {
14
+ const fixture = TestBed.createComponent(NotFoundComponent);
15
+ const component = fixture.componentInstance;
16
+ expect(component).toBeTruthy();
17
+ });
18
+
19
+ it('should render main landmark', async () => {
20
+ const fixture = TestBed.createComponent(NotFoundComponent);
21
+ await fixture.whenStable();
22
+ const compiled = fixture.nativeElement as HTMLElement;
23
+ expect(compiled.querySelector('main')).toBeTruthy();
24
+ });
25
+
26
+ it('should have a link to home', async () => {
27
+ const fixture = TestBed.createComponent(NotFoundComponent);
28
+ await fixture.whenStable();
29
+ const compiled = fixture.nativeElement as HTMLElement;
30
+ const link = compiled.querySelector('a');
31
+ expect(link?.getAttribute('href')).toBe('/');
32
+ });
33
+ });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
7
+ import { RouterLink } from '@angular/router';
8
+
9
+ @Component({
10
+ selector: 'app-not-found',
11
+ changeDetection: ChangeDetectionStrategy.OnPush,
12
+ imports: [RouterLink],
13
+ templateUrl: './not-found.component.html',
14
+ })
15
+ export class NotFoundComponent {}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ import type {
8
+ AgentforceErrorHandler,
9
+ AgentforceReadyHandler,
10
+ } from "@salesforce/agentforce-conversation-client";
11
+
12
+ /** Auth options resolved at embed time (frontdoor in dev, org URL in prod). */
13
+ export interface ResolvedEmbedOptions {
14
+ salesforceOrigin?: string;
15
+ frontdoorUrl?: string;
16
+ }
17
+
18
+ export type StyleTokens = Record<string, string>;
19
+
20
+ /** Ready/error callbacks re-exported for consumers binding the component. */
21
+ export type { AgentforceErrorHandler, AgentforceReadyHandler };
22
+
23
+ /**
24
+ * Inputs accepted by {@link AgentforceConversationClientComponent}. The Angular
25
+ * port of the React `AgentforceConversationClientProps`; each field maps to a
26
+ * component `input()` (with `agentId` required). Config is passed through to the
27
+ * embed client as-is.
28
+ */
29
+ export interface AgentforceConversationClientProps {
30
+ /** Required in practice: id of the agent to load. */
31
+ agentId: string;
32
+ /** Display name for the agent shown in the chat header. */
33
+ agentLabel?: string;
34
+ /** If true, renders inline. If omitted/false, renders floating. */
35
+ inline?: boolean;
36
+ /** Show/hide chat header. Defaults to true for floating; can only be set for inline mode. */
37
+ headerEnabled?: boolean;
38
+ /** Show/hide agent icon in the header. */
39
+ showHeaderIcon?: boolean;
40
+ /** Inline width. */
41
+ width?: string | number;
42
+ /** Inline height. */
43
+ height?: string | number;
44
+ /** Theme overrides for the chat UI. */
45
+ styleTokens?: StyleTokens;
46
+ isFileBased?: boolean;
47
+ /** Optional. If not provided, resolved internally (e.g. from /__lo/frontdoor in dev, window.location.origin in prod). */
48
+ salesforceOrigin?: string;
49
+ /** Optional. If not provided, resolved internally in dev via /__lo/frontdoor. */
50
+ frontdoorUrl?: string;
51
+ /** Callback invoked when the Lightning Out application is ready. */
52
+ onReady?: AgentforceReadyHandler;
53
+ /** Callback invoked when a Lightning Out error occurs. */
54
+ onError?: AgentforceErrorHandler;
55
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ interface SfdcEnv {
8
+ /** Salesforce org force.com URL (e.g., "https://myorg.lightning.force.com"). */
9
+ orgUrl?: string;
10
+ }
11
+
12
+ // eslint-disable-next-line no-var -- ambient global declaration
13
+ declare var SFDC_ENV: SfdcEnv | undefined;
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import { effect, Injector, signal, type Signal } from '@angular/core';
7
+ import { toObservable, toSignal } from '@angular/core/rxjs-interop';
8
+ import { from, of, switchMap } from 'rxjs';
9
+ import { catchError, map, tap } from 'rxjs/operators';
10
+
11
+ /** Reactive async-data snapshot: current data, loading, and error. */
12
+ export interface AsyncData<T> {
13
+ /** Latest successful result. Kept visible during a refetch. */
14
+ readonly data: Signal<T | null>;
15
+ /** True while a fetch for the current args is in flight. */
16
+ readonly loading: Signal<boolean>;
17
+ /** Error message from the most recent failed fetch, else null. */
18
+ readonly error: Signal<string | null>;
19
+ }
20
+
21
+ /**
22
+ * The Angular analogue of the React `useAsyncData` hook.
23
+ *
24
+ * Re-runs `fetcher(args)` whenever the `args` signal changes, using RxJS
25
+ * `switchMap` so an in-flight request is cancelled (ignored) when newer args
26
+ * arrive — the latest-wins guarantee, matching the React hook's cleanup flag.
27
+ *
28
+ * Behavioural parity notes:
29
+ * - `loading` flips true the instant args change and false when the matching
30
+ * response resolves.
31
+ * - `data` retains the previous result while a refetch is in flight (avoids a
32
+ * flash of empty state); it only resets to `null` on error.
33
+ * - Errors are surfaced as a message string and logged, mirroring the hook.
34
+ *
35
+ * Must be called within an injection context (component/service constructor or
36
+ * field initializer) unless an `injector` is supplied.
37
+ *
38
+ * @param argsSignal - Reactive inputs; a change triggers a refetch.
39
+ * @param fetcher - Async function producing the result for the given args.
40
+ * @param injector - Optional injector when called outside an injection context.
41
+ */
42
+ export function createAsyncData<TArgs, T>(
43
+ argsSignal: Signal<TArgs>,
44
+ fetcher: (args: TArgs) => Promise<T>,
45
+ injector?: Injector,
46
+ ): AsyncData<T> {
47
+ const data = signal<T | null>(null);
48
+ const error = signal<string | null>(null);
49
+ // A fetch is pending from the moment args change until its response lands.
50
+ const pending = signal(true);
51
+
52
+ const args$ = toObservable(argsSignal, injector ? { injector } : undefined);
53
+
54
+ const result = toSignal(
55
+ args$.pipe(
56
+ // Mark loading + clear stale error synchronously as new args arrive.
57
+ tap(() => {
58
+ pending.set(true);
59
+ error.set(null);
60
+ }),
61
+ switchMap((args) =>
62
+ from(fetcher(args)).pipe(
63
+ map((value) => ({ value, err: null as string | null })),
64
+ catchError((err: unknown) => {
65
+ console.error(err);
66
+ return of({
67
+ value: null as T | null,
68
+ err: err instanceof Error ? err.message : 'An error occurred',
69
+ });
70
+ }),
71
+ ),
72
+ ),
73
+ tap((outcome) => {
74
+ if (outcome.err !== null) {
75
+ error.set(outcome.err);
76
+ data.set(null);
77
+ } else {
78
+ data.set(outcome.value);
79
+ }
80
+ pending.set(false);
81
+ }),
82
+ ),
83
+ { initialValue: null, ...(injector ? { injector } : {}) },
84
+ );
85
+
86
+ // Keep `result` subscribed so the pipeline runs even if no template reads it.
87
+ effect(
88
+ () => {
89
+ result();
90
+ },
91
+ injector ? { injector } : undefined,
92
+ );
93
+
94
+ return {
95
+ data: data.asReadonly(),
96
+ loading: pending.asReadonly(),
97
+ error: error.asReadonly(),
98
+ };
99
+ }
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>MyAngularApp</title>
6
+ <base href="/" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
8
+ <link rel="icon" type="image/x-icon" href="favicon.ico" />
9
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
10
+ </head>
11
+ <body>
12
+ <app-root></app-root>
13
+ </body>
14
+ </html>
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ *
6
+ * feature-angular-agentforce-conversation-client – ACC Conversation Client
7
+ */
8
+
9
+ export { AgentforceConversationClientComponent } from "./app/features/agentforce/agentforce-conversation-client/agentforce-conversation-client.component";
10
+ export { AgentforceEmbedService } from "./app/features/agentforce/agentforce-embed.service";
11
+ export type {
12
+ AgentforceConversationClientProps,
13
+ ResolvedEmbedOptions,
14
+ StyleTokens,
15
+ } from "./app/types/conversation";
@@ -0,0 +1,5 @@
1
+ import { bootstrapApplication } from '@angular/platform-browser';
2
+ import { appConfig } from './app/app.config';
3
+ import { App } from './app/app';
4
+
5
+ bootstrapApplication(App, appConfig).catch((err) => console.error(err));
@@ -0,0 +1,170 @@
1
+ @import 'tailwindcss';
2
+
3
+ @layer base {
4
+ html,
5
+ body {
6
+ @apply min-h-screen;
7
+ }
8
+
9
+ body {
10
+ @apply antialiased bg-white;
11
+ }
12
+ }
13
+
14
+ @custom-variant dark (&:is(.dark *));
15
+
16
+ /*
17
+ * shadcn design tokens, ported from the React base app's global.css so the
18
+ * shared object-search feature (bg-card, text-muted-foreground, border-border,
19
+ * rounded-* via --radius, etc.) renders identically in Angular. The React base
20
+ * also imports tw-animate-css and shadcn/tailwind.css (accordion keyframes +
21
+ * data-* variants) — omitted here as they are not installed for the Angular
22
+ * base and are not required for layout/color parity.
23
+ */
24
+ @theme inline {
25
+ --color-background: var(--background);
26
+ --color-foreground: var(--foreground);
27
+ --color-card: var(--card);
28
+ --color-card-foreground: var(--card-foreground);
29
+ --color-popover: var(--popover);
30
+ --color-popover-foreground: var(--popover-foreground);
31
+ --color-primary: var(--primary);
32
+ --color-primary-foreground: var(--primary-foreground);
33
+ --color-secondary: var(--secondary);
34
+ --color-secondary-foreground: var(--secondary-foreground);
35
+ --color-muted: var(--muted);
36
+ --color-muted-foreground: var(--muted-foreground);
37
+ --color-accent: var(--accent);
38
+ --color-accent-foreground: var(--accent-foreground);
39
+ --color-destructive: var(--destructive);
40
+ --color-destructive-foreground: var(--destructive-foreground);
41
+ --color-border: var(--border);
42
+ --color-input: var(--input);
43
+ --color-ring: var(--ring);
44
+ --color-chart-1: var(--chart-1);
45
+ --color-chart-2: var(--chart-2);
46
+ --color-chart-3: var(--chart-3);
47
+ --color-chart-4: var(--chart-4);
48
+ --color-chart-5: var(--chart-5);
49
+ --radius-sm: calc(var(--radius) - 4px);
50
+ --radius-md: calc(var(--radius) - 2px);
51
+ --radius-lg: var(--radius);
52
+ --radius-xl: calc(var(--radius) + 4px);
53
+ --color-sidebar: var(--sidebar);
54
+ --color-sidebar-foreground: var(--sidebar-foreground);
55
+ --color-sidebar-primary: var(--sidebar-primary);
56
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
57
+ --color-sidebar-accent: var(--sidebar-accent);
58
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
59
+ --color-sidebar-border: var(--sidebar-border);
60
+ --color-sidebar-ring: var(--sidebar-ring);
61
+ }
62
+
63
+ :root {
64
+ --radius: 0.625rem;
65
+ --background: oklch(1 0 0);
66
+ --foreground: oklch(0.145 0 0);
67
+ --card: oklch(1 0 0);
68
+ --card-foreground: oklch(0.145 0 0);
69
+ --popover: oklch(1 0 0);
70
+ --popover-foreground: oklch(0.145 0 0);
71
+ --primary: oklch(0.205 0 0);
72
+ --primary-foreground: oklch(0.985 0 0);
73
+ --secondary: oklch(0.97 0 0);
74
+ --secondary-foreground: oklch(0.205 0 0);
75
+ --muted: oklch(0.97 0 0);
76
+ --muted-foreground: oklch(0.556 0 0);
77
+ --accent: oklch(0.97 0 0);
78
+ --accent-foreground: oklch(0.205 0 0);
79
+ --destructive: oklch(0.577 0.245 27.325);
80
+ --border: oklch(0.922 0 0);
81
+ --input: oklch(0.922 0 0);
82
+ --ring: oklch(0.708 0 0);
83
+ --chart-1: oklch(0.646 0.222 41.116);
84
+ --chart-2: oklch(0.6 0.118 184.704);
85
+ --chart-3: oklch(0.398 0.07 227.392);
86
+ --chart-4: oklch(0.828 0.189 84.429);
87
+ --chart-5: oklch(0.769 0.188 70.08);
88
+ --sidebar: oklch(0.985 0 0);
89
+ --sidebar-foreground: oklch(0.145 0 0);
90
+ --sidebar-primary: oklch(0.205 0 0);
91
+ --sidebar-primary-foreground: oklch(0.985 0 0);
92
+ --sidebar-accent: oklch(0.97 0 0);
93
+ --sidebar-accent-foreground: oklch(0.205 0 0);
94
+ --sidebar-border: oklch(0.922 0 0);
95
+ --sidebar-ring: oklch(0.708 0 0);
96
+ }
97
+
98
+ .dark {
99
+ --background: oklch(0.145 0 0);
100
+ --foreground: oklch(0.985 0 0);
101
+ --card: oklch(0.205 0 0);
102
+ --card-foreground: oklch(0.985 0 0);
103
+ --popover: oklch(0.205 0 0);
104
+ --popover-foreground: oklch(0.985 0 0);
105
+ --primary: oklch(0.922 0 0);
106
+ --primary-foreground: oklch(0.205 0 0);
107
+ --secondary: oklch(0.269 0 0);
108
+ --secondary-foreground: oklch(0.985 0 0);
109
+ --muted: oklch(0.269 0 0);
110
+ --muted-foreground: oklch(0.708 0 0);
111
+ --accent: oklch(0.269 0 0);
112
+ --accent-foreground: oklch(0.985 0 0);
113
+ --destructive: oklch(0.704 0.191 22.216);
114
+ --border: oklch(1 0 0 / 10%);
115
+ --input: oklch(1 0 0 / 15%);
116
+ --ring: oklch(0.556 0 0);
117
+ --chart-1: oklch(0.488 0.243 264.376);
118
+ --chart-2: oklch(0.696 0.17 162.48);
119
+ --chart-3: oklch(0.769 0.188 70.08);
120
+ --chart-4: oklch(0.627 0.265 303.9);
121
+ --chart-5: oklch(0.645 0.246 16.439);
122
+ --sidebar: oklch(0.205 0 0);
123
+ --sidebar-foreground: oklch(0.985 0 0);
124
+ --sidebar-primary: oklch(0.488 0.243 264.376);
125
+ --sidebar-primary-foreground: oklch(0.985 0 0);
126
+ --sidebar-accent: oklch(0.269 0 0);
127
+ --sidebar-accent-foreground: oklch(0.985 0 0);
128
+ --sidebar-border: oklch(1 0 0 / 10%);
129
+ --sidebar-ring: oklch(0.556 0 0);
130
+ }
131
+
132
+ @layer base {
133
+ * {
134
+ @apply border-border outline-ring/50;
135
+ }
136
+ body {
137
+ @apply bg-background text-foreground;
138
+ }
139
+ }
140
+
141
+ /*
142
+ * Angular Material colour re-skin — layered on top of the custom M3 theme
143
+ * defined in theme.scss. The theme owns density (compact control heights) and
144
+ * seeds the base `--mat-sys-*` system variables; here we remap the colour and
145
+ * shape system variables to our shadcn design tokens so every Material
146
+ * component adopts the shadcn look without touching component code. This block
147
+ * loads after theme.scss, so these values win.
148
+ *
149
+ * Control sizing is NOT set here — density handles heights, and any remaining
150
+ * form-field-specific styling lives in the component's own scoped CSS.
151
+ */
152
+ :root {
153
+ --mat-sys-primary: var(--primary);
154
+ --mat-sys-on-primary: var(--primary-foreground);
155
+ --mat-sys-surface: var(--background);
156
+ --mat-sys-on-surface: var(--foreground);
157
+ --mat-sys-surface-variant: var(--muted);
158
+ --mat-sys-on-surface-variant: var(--muted-foreground);
159
+ --mat-sys-outline: var(--border);
160
+ --mat-sys-outline-variant: var(--border);
161
+ --mat-sys-error: var(--destructive);
162
+ --mat-sys-corner-small: var(--radius-sm);
163
+ --mat-sys-corner-medium: var(--radius-md);
164
+ --mat-sys-corner-large: var(--radius-lg);
165
+
166
+ // Card subtitle — Material defaults this to `--mat-sys-on-surface` (the same
167
+ // dark colour as the title). React renders the card description in muted
168
+ // grey (`text-muted-foreground`), so point the subtitle token there.
169
+ --mat-card-subtitle-text-color: var(--muted-foreground);
170
+ }
@@ -0,0 +1,39 @@
1
+ // Copyright (c) 2026, Salesforce, Inc.,
2
+ // All rights reserved.
3
+ // For full license text, see the LICENSE.txt file
4
+
5
+ // Angular Material M3 theme.
6
+ // See https://material.angular.dev/guide/theming.
7
+ //
8
+ // This replaces the prebuilt azure-blue theme so we can set a negative
9
+ // `density` — the standard, system-driven way to get the compact control
10
+ // heights the React reference uses (no hardcoded pixel heights anywhere).
11
+ //
12
+ // Colour is intentionally NOT finalised here: the shadcn design tokens are
13
+ // applied on top by remapping `--mat-sys-*` in styles.css, which loads after
14
+ // this file. The palette below only seeds Material's base system variables.
15
+ @use '@angular/material' as mat;
16
+
17
+ html {
18
+ @include mat.theme(
19
+ (
20
+ color: (
21
+ theme-type: light,
22
+ primary: mat.$azure-palette,
23
+ tertiary: mat.$blue-palette,
24
+ ),
25
+ // Font family reads Tailwind's system stack (`--font-sans`, the same
26
+ // default the React reference uses) instead of Material's Roboto, so
27
+ // Material components and Tailwind-styled text share one font. Tailwind
28
+ // is the single source of the family; the typescale sizes/weights stay
29
+ // Material's own.
30
+ typography: (
31
+ plain-family: var(--font-sans),
32
+ brand-family: var(--font-sans),
33
+ ),
34
+ // Compact density (scale 0 to -5). Drives control heights via
35
+ // Material's own tokens instead of hardcoded px.
36
+ density: -2,
37
+ )
38
+ );
39
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Build-time constants injected via esbuild `define`. Substituted by
3
+ * @salesforce/angular-plugin-ui-bundle during build (see esbuild/api-version.mjs
4
+ * and angular.json plugins[]).
5
+ *
6
+ * Without substitution, `@salesforce/platform-sdk` and `@salesforce/ui-bundle`
7
+ * fall back to "65.0" — the published packages contain the literal token.
8
+ */
9
+ declare const __SF_API_VERSION__: string;
@@ -0,0 +1,11 @@
1
+ /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
+ /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
+ {
4
+ "extends": "./tsconfig.json",
5
+ "compilerOptions": {
6
+ "outDir": "./out-tsc/app",
7
+ "types": []
8
+ },
9
+ "include": ["src/**/*.ts"],
10
+ "exclude": ["src/**/*.spec.ts"]
11
+ }
@@ -0,0 +1,33 @@
1
+ /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
+ /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
+ {
4
+ "compileOnSave": false,
5
+ "compilerOptions": {
6
+ "strict": true,
7
+ "noImplicitOverride": true,
8
+ "noPropertyAccessFromIndexSignature": true,
9
+ "noImplicitReturns": true,
10
+ "noFallthroughCasesInSwitch": true,
11
+ "skipLibCheck": true,
12
+ "isolatedModules": true,
13
+ "experimentalDecorators": true,
14
+ "importHelpers": true,
15
+ "target": "ES2022",
16
+ "module": "preserve"
17
+ },
18
+ "angularCompilerOptions": {
19
+ "enableI18nLegacyMessageIdFormat": false,
20
+ "strictInjectionParameters": true,
21
+ "strictInputAccessModifiers": true,
22
+ "strictTemplates": true
23
+ },
24
+ "files": [],
25
+ "references": [
26
+ {
27
+ "path": "./tsconfig.app.json"
28
+ },
29
+ {
30
+ "path": "./tsconfig.spec.json"
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,10 @@
1
+ /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
+ /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
+ {
4
+ "extends": "./tsconfig.json",
5
+ "compilerOptions": {
6
+ "outDir": "./out-tsc/spec",
7
+ "types": ["vitest/globals"]
8
+ },
9
+ "include": ["src/**/*.d.ts", "src/**/*.spec.ts"]
10
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "outputDir": "dist",
3
+ "routing": {
4
+ "trailingSlash": "never",
5
+ "fallback": "index.html"
6
+ }
7
+ }
@@ -0,0 +1,6 @@
1
+ const { jestConfig } = require('@salesforce/sfdx-lwc-jest/config');
2
+
3
+ module.exports = {
4
+ ...jestConfig,
5
+ modulePathIgnorePatterns: ['<rootDir>/.localdevserver']
6
+ };