@pega/sdk 0.0.12 → 0.0.14

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 (62) hide show
  1. package/README.md +32 -11
  2. package/package.json +1 -1
  3. package/templates/angular-sdk-reference/angular.json +2 -1
  4. package/templates/angular-sdk-reference/package.json +1 -0
  5. package/templates/angular-sdk-reference/pega-constellationjs-0.26.3-local.tgz +0 -0
  6. package/templates/angular-sdk-reference/src/app/app.component.ts +232 -15
  7. package/templates/angular-sdk-reference/src/components/component-map.ts +90 -0
  8. package/templates/angular-sdk-reference/src/components/fields/auto-complete/auto-complete.component.ts +267 -0
  9. package/templates/angular-sdk-reference/src/components/fields/checkbox/checkbox.component.ts +84 -0
  10. package/templates/angular-sdk-reference/src/components/fields/currency/currency.component.ts +97 -0
  11. package/templates/angular-sdk-reference/src/components/fields/date-input/date-input.component.ts +88 -0
  12. package/templates/angular-sdk-reference/src/components/fields/dropdown/dropdown.component.ts +101 -0
  13. package/templates/angular-sdk-reference/src/components/fields/email/email.component.ts +91 -0
  14. package/templates/angular-sdk-reference/src/components/fields/integer/integer.component.ts +93 -0
  15. package/templates/angular-sdk-reference/src/components/fields/phone/phone.component.ts +91 -0
  16. package/templates/angular-sdk-reference/src/components/fields/radio-buttons/radio-buttons.component.ts +102 -0
  17. package/templates/angular-sdk-reference/src/components/fields/text-area/text-area.component.ts +98 -0
  18. package/templates/angular-sdk-reference/src/components/fields/text-input/text-input.component.ts +97 -0
  19. package/templates/angular-sdk-reference/src/components/fields/url-input/url-input.component.ts +94 -0
  20. package/templates/angular-sdk-reference/src/components/infra/assignment/assignment.component.ts +206 -0
  21. package/templates/angular-sdk-reference/src/components/infra/case-summary/case-summary.component.ts +76 -0
  22. package/templates/angular-sdk-reference/src/components/infra/case-view/case-view.component.ts +114 -0
  23. package/templates/angular-sdk-reference/src/components/infra/flow-container/flow-container.component.ts +411 -0
  24. package/templates/angular-sdk-reference/src/components/infra/reference/reference.component.ts +158 -0
  25. package/templates/angular-sdk-reference/src/components/infra/region/region.component.ts +39 -0
  26. package/templates/angular-sdk-reference/src/components/infra/root-container/root-container.component.ts +193 -0
  27. package/templates/angular-sdk-reference/src/components/infra/stages/stages.component.ts +78 -0
  28. package/templates/angular-sdk-reference/src/components/infra/view/view.component.ts +139 -0
  29. package/templates/angular-sdk-reference/src/components/infra/view-container/view-container.component.ts +191 -0
  30. package/templates/angular-sdk-reference/src/components/templates/default-form/default-form.component.ts +101 -0
  31. package/templates/angular-sdk-reference/src/components/templates/narrow-wide/narrow-wide.component.ts +37 -0
  32. package/templates/angular-sdk-reference/src/components/templates/one-column/one-column.component.ts +37 -0
  33. package/templates/angular-sdk-reference/src/components/templates/two-column/two-column.component.ts +37 -0
  34. package/templates/angular-sdk-reference/src/components/templates/wide-narrow/wide-narrow.component.ts +37 -0
  35. package/templates/angular-sdk-reference/src/helpers/event-utils.ts +18 -0
  36. package/templates/angular-sdk-reference/src/helpers/utils.ts +38 -0
  37. package/templates/angular-sdk-reference/src/helpers/versionHelpers.ts +14 -0
  38. package/templates/angular-sdk-reference/tsconfig.json +5 -2
  39. package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +20 -13
  40. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +2 -2
  41. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +1 -1
  42. package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +1 -1
  43. package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +1 -1
  44. package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +1 -1
  45. package/templates/react-sdk-reference/.ai-common/instructions/infra-component.md +1 -1
  46. package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +1 -1
  47. package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +1 -1
  48. package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +7 -0
  49. package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +2 -2
  50. package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +4 -2
  51. package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +10 -11
  52. package/templates/react-sdk-reference/.ai-common/skills/connect-pega-server.md +84 -31
  53. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +11 -2
  54. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +6 -6
  55. package/templates/react-sdk-reference/.ai-common/skills/field-components.md +75 -29
  56. package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +133 -101
  57. package/templates/react-sdk-reference/.ai-common/skills/field-skills/EmbeddedData.md +385 -0
  58. package/templates/react-sdk-reference/.ai-common/skills/field-skills/EmbeddedDataMulti.md +506 -0
  59. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +549 -86
  60. package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +181 -83
  61. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +125 -153
  62. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +90 -81
package/README.md CHANGED
@@ -134,13 +134,29 @@ The generated project is ready to run and includes:
134
134
 
135
135
  The scaffolded project ships with `sdk-config.json` and a generated MCP config file
136
136
  both intentionally blank/placeholder — connection details are never collected at
137
- scaffold time. There are two ways to fill them in:
138
-
139
- - **AI coding assistant (recommended)** — the first time you ask it to do something
140
- that needs a live Pega server (e.g. generating components from your app's real
141
- portals/case types), it asks you for the server URL, application alias, OAuth
142
- client ID, and MCP rule details in chat, then writes them into both files itself.
143
- - **Manual** — edit `sdk-config.json` in the project root yourself:
137
+ scaffold time. The same setup applies to full-portal and embedded projects.
138
+
139
+ **AI coding assistant (recommended):** the first workflow that needs a live Pega
140
+ server checks the active `sdk-config.json`, the generated MCP config, and project-root
141
+ `.env*` files. It asks once for every missing non-secret value. You can provide those
142
+ values in chat or update an allowed file yourself; the assistant then synchronizes
143
+ all applicable destinations and asks again only for values that remain missing.
144
+
145
+ **Manual or environment setup:** configure the following non-secret values in any
146
+ applicable source:
147
+
148
+ | Value | Environment key example | `sdk-config.json` | MCP config |
149
+ | --------------------- | ----------------------- | ----------------------------------------------------------- | -------------------------------------- |
150
+ | Pega server URL | `PEGA_INFINITY_URL` | `serverConfig.infinityRestServerUrl` | `{InfinityURL}` in the URL |
151
+ | Application alias | `PEGA_APP_ALIAS` | `serverConfig.appAlias` | `{AppAlias}` in the URL |
152
+ | MCP rule name | `PEGA_MCP_RULE_NAME` | — | `{MCPRuleName}` in the server key |
153
+ | MCP rule instance key | `PEGA_MCP_RULE_INS_KEY` | — | `{MCPRuleInsKey}` in the URL |
154
+ | OAuth client ID | `PEGA_CLIENT_ID` | `authConfig.mashupClientId` and `authConfig.portalClientId` | Cursor's `auth.clientId`, when present |
155
+
156
+ For full-portal projects, use the scaffolded application `sdk-config.json`. For
157
+ embedded projects, use the copy in the host framework's browser-served static
158
+ directory (for example `public/sdk-config.json`), not a stale same-named root copy.
159
+ Its relevant structure is:
144
160
 
145
161
  ```jsonc
146
162
  {
@@ -163,10 +179,15 @@ scaffold time. There are two ways to fill them in:
163
179
  - `appAlias` — the application alias to load
164
180
  - `mashupClientId` / `portalClientId` — OAuth 2.0 client IDs registered in Pega
165
181
 
166
- You'll also need to fill in the generated MCP config file (`.vscode/mcp.json` for
167
- Copilot, `.cursor/mcp.json` for Cursor, or `.mcp.json` for Claude Code) — replace
168
- its `{InfinityURL}`/`{AppAlias}`/`{MCPRuleName}`/`{MCPRuleInsKey}` markers the same
169
- way if editing manually.
182
+ The generated MCP file is `.vscode/mcp.json` for Copilot, `.cursor/mcp.json` for
183
+ Cursor, or `.mcp.json` for Claude Code. Copilot and Claude Code use URL-only MCP
184
+ configuration and do not require a client secret. Cursor's authenticated MCP entry
185
+ also requires `auth.clientId` and `auth.clientSecret`. The Pega MCP client secret
186
+ must come from a private project-root environment variable such as
187
+ `PEGA_CLIENT_SECRET`; never provide it in chat, use a browser-exposed environment
188
+ name (`VITE_*`, `NEXT_PUBLIC_*`, `REACT_APP_*`, or `EXPO_PUBLIC_*`), or put it in
189
+ browser-served `sdk-config.json`. The assistant reads the private environment value
190
+ and writes it only to Cursor's `auth.clientSecret`.
170
191
 
171
192
  ## Available Scripts
172
193
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/sdk",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Scaffold a Pega SDK application project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,12 +19,13 @@
19
19
  "tsConfig": "tsconfig.json",
20
20
  "assets": ["src/assets", "src/sdk-config.json"],
21
21
  "styles": ["src/styles.css"],
22
- "scripts": []
22
+ "scripts": ["../../node_modules/@pega/constellationjs/dist/constellation-core-web.js"]
23
23
  }
24
24
  },
25
25
  "serve": {
26
26
  "builder": "@angular-devkit/build-angular:dev-server",
27
27
  "options": {
28
+ "buildTarget": "angular-sdk-reference:build",
28
29
  "port": 3501
29
30
  }
30
31
  }
@@ -17,6 +17,7 @@
17
17
  "@angular/platform-browser": "^21.2.0",
18
18
  "@angular/platform-browser-dynamic": "^21.2.0",
19
19
  "@angular/router": "^21.2.0",
20
+ "@pega/constellationjs": "file:pega-constellationjs-0.26.3-local.tgz",
20
21
  "@pega/sdk-angular": "^0.1.0",
21
22
  "rxjs": "~7.8.2",
22
23
  "tslib": "^2.8.1",
@@ -1,25 +1,72 @@
1
- import { Component, OnInit } from '@angular/core';
1
+ /**
2
+ * Angular Mashup sample — demonstrates @pega/sdk-core + @pega/sdk-angular
3
+ * in embedded/mashup mode using PegaRuntimeService.
4
+ *
5
+ * Flow:
6
+ * 1. PegaRuntimeService.initialize() handles auth + bootstrap
7
+ * 2. Subscribe to state$ for reactive isReady/isLoading/error
8
+ * 3. Show "Create Case" button
9
+ * 4. On click → PCore.getMashupApi().createCase()
10
+ * 5. PConnectRendererComponent renders the case form tree
11
+ */
12
+
13
+ import { ChangeDetectorRef, Component, NgZone, OnInit, OnDestroy } from '@angular/core';
2
14
  import { CommonModule } from '@angular/common';
15
+ import { Subscription } from 'rxjs';
16
+ import { PegaRuntimeService, PConnectBridgeComponent, type RuntimeState } from '@pega/sdk-angular';
17
+ import { registerSampleAngularComponents } from '../components/component-map';
18
+ import { getSdkConfig } from '@pega/auth/lib/sdk-auth-manager';
19
+ import { compareSdkPCoreVersions } from '../helpers/versionHelpers';
3
20
 
4
21
  @Component({
5
22
  selector: 'app-root',
6
23
  standalone: true,
7
- imports: [CommonModule],
24
+ imports: [CommonModule, PConnectBridgeComponent],
8
25
  template: `
9
- <div *ngIf="!isReady" class="loading-container">
10
- <span class="loading-text">Authenticating and loading Pega...</span>
26
+ <!-- Loading state -->
27
+ <div *ngIf="!isPegaReady" class="loading-container">
28
+ <span class="loading-text">
29
+ {{ errorMessage ? errorMessage : 'Authenticating and loading Pega...' }}
30
+ </span>
11
31
  </div>
12
- <div *ngIf="isReady" id="pega-root">
32
+
33
+ <!-- Main UI -->
34
+ <div *ngIf="isPegaReady" id="pega-root">
35
+ <!-- Header -->
13
36
  <div class="header">
14
- <span class="header-title">Pega SDK — Angular Reference</span>
37
+ <span class="header-title">Pega SDK — Angular Mashup Sample</span>
38
+ <button type="button" class="btn-logout" (click)="logout()">Logout</button>
15
39
  </div>
16
- <div class="content">
17
- <p>Pega SDK Angular app is ready. Implement your components here.</p>
40
+
41
+ <div class="main-content">
42
+ <!-- Create Case button -->
43
+ <div *ngIf="!showForm" class="create-case-section">
44
+ <h2>Ready to go</h2>
45
+ <p class="subtitle">Click below to create a new case and see the Pega form components in action.</p>
46
+ <button type="button" class="btn-create" (click)="handleCreateCase()">Create Case</button>
47
+ </div>
48
+
49
+ <!-- Pega form area -->
50
+ <div class="form-container">
51
+ <div *ngIf="loading" class="loading-form">Loading case form...</div>
52
+ <pconnect-bridge *ngIf="!loading && rootPConnect" [getPConnect]="rootPConnectGetter!"></pconnect-bridge>
53
+ </div>
18
54
  </div>
19
55
  </div>
20
56
  `,
21
57
  styles: [
22
58
  `
59
+ .loading-container {
60
+ display: flex;
61
+ justify-content: center;
62
+ align-items: center;
63
+ height: 100vh;
64
+ font-family: system-ui, sans-serif;
65
+ }
66
+ .loading-text {
67
+ color: #64748b;
68
+ font-size: 1rem;
69
+ }
23
70
  .header {
24
71
  padding: 1rem 1.5rem;
25
72
  background: #1e293b;
@@ -31,24 +78,194 @@ import { CommonModule } from '@angular/common';
31
78
  .header-title {
32
79
  font-weight: 600;
33
80
  }
34
- .content {
81
+ .btn-logout {
82
+ background: transparent;
83
+ border: 1px solid #64748b;
84
+ color: #94a3b8;
85
+ padding: 0.375rem 0.75rem;
86
+ border-radius: 0.375rem;
87
+ cursor: pointer;
88
+ font-size: 0.8125rem;
89
+ }
90
+ .main-content {
35
91
  max-width: 720px;
36
92
  margin: 2rem auto;
37
93
  padding: 0 1.5rem;
94
+ font-family: system-ui, sans-serif;
95
+ }
96
+ .create-case-section {
97
+ text-align: center;
98
+ margin-bottom: 2rem;
99
+ }
100
+ .create-case-section h2 {
101
+ font-size: 1.5rem;
102
+ font-weight: 600;
103
+ margin-bottom: 0.75rem;
104
+ }
105
+ .subtitle {
106
+ color: #64748b;
107
+ margin-bottom: 1.5rem;
108
+ }
109
+ .btn-create {
110
+ background: #2563eb;
111
+ color: #fff;
112
+ border: none;
113
+ padding: 0.625rem 1.5rem;
114
+ border-radius: 0.375rem;
115
+ font-size: 0.9375rem;
116
+ font-weight: 500;
117
+ cursor: pointer;
118
+ }
119
+ .form-container {
120
+ background: #fff;
121
+ border: 1px solid #e2e8f0;
122
+ border-radius: 0.75rem;
123
+ padding: 1.5rem;
124
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
125
+ }
126
+ .loading-form {
127
+ text-align: center;
128
+ padding: 2rem;
129
+ color: #64748b;
38
130
  }
39
131
  `,
40
132
  ],
41
133
  })
42
- export class AppComponent implements OnInit {
43
- isReady = false;
134
+ export class AppComponent implements OnInit, OnDestroy {
135
+ isPegaReady = false;
136
+ rootPConnect: typeof PConnect | null = null;
137
+ rootPConnectGetter: (() => typeof PConnect) | null = null;
138
+ showForm = false;
139
+ loading = false;
140
+ errorMessage: string | undefined;
141
+
142
+ private runtime = new PegaRuntimeService();
143
+ private stateSub: Subscription | undefined;
144
+ private cancelSubId = 'angularMashup-cancel';
145
+ private doneSubId = 'angularMashup-assignmentDone';
146
+
147
+ constructor(
148
+ private ngZone: NgZone,
149
+ private cdr: ChangeDetectorRef,
150
+ ) {}
44
151
 
45
- constructor() {}
152
+ ngOnInit(): void {
153
+ this.stateSub = this.runtime.state$.subscribe((state: RuntimeState) => {
154
+ console.log('Runtime state update:', state);
155
+ this.ngZone.run(() => {
156
+ this.isPegaReady = state.isReady;
157
+ this.errorMessage = state.error;
158
+
159
+ if (state.isReady && state.bootstrapResult) {
160
+ const rootProps = state.bootstrapResult.rootProps as Record<string, unknown> | undefined;
161
+ const getPConnect = rootProps?.['getPConnect'] as (() => typeof PConnect) | undefined;
162
+ this.rootPConnect = getPConnect?.() ?? null;
163
+ this.rootPConnectGetter = getPConnect ?? null;
164
+ this.subscribeToPubSub();
165
+ }
166
+
167
+ this.cdr.detectChanges();
168
+ });
169
+ });
170
+
171
+ this.bootstrap();
172
+ }
173
+
174
+ ngOnDestroy(): void {
175
+ this.stateSub?.unsubscribe();
176
+
177
+ if (this.isPegaReady) {
178
+ PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL, this.cancelSubId);
179
+ PCore.getPubSubUtils().unsubscribe(
180
+ PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,
181
+ this.doneSubId,
182
+ );
183
+ }
184
+ }
185
+
186
+ async bootstrap(): Promise<void> {
187
+ const sdkConfig = await getSdkConfig();
188
+ const config = sdkConfig as Record<string, Record<string, unknown>>;
189
+
190
+ await this.runtime.initialize(
191
+ {
192
+ serverConfig: {
193
+ infinityRestServerUrl: config['serverConfig']['infinityRestServerUrl'] as string,
194
+ appAlias: config['serverConfig']['appAlias'] as string,
195
+ },
196
+ authConfig: {
197
+ clientId: (config['authConfig']['mashupClientId'] ?? '') as string,
198
+ authorizeUri: (config['authConfig']['authorizeUri'] ?? '') as string,
199
+ tokenUri: (config['authConfig']['tokenUri'] ?? '') as string,
200
+ revokeUri: (config['authConfig']['revokeUri'] ?? '') as string,
201
+ redirectUri: (config['authConfig']['redirectUri'] ?? '') as string,
202
+ },
203
+ },
204
+ 'pega-root',
205
+ {
206
+ onPCoreReady: () => {
207
+ console.log('PCore is ready, running onPCoreReady callback');
208
+ // Register component creator so PCore uses our bridge
209
+ PCore.registerComponentCreator((c11nEnv: unknown) => c11nEnv);
210
+ registerSampleAngularComponents();
211
+ compareSdkPCoreVersions();
212
+
213
+ // Initialize container session gates (required by ViewContainer/FlowContainer)
214
+ sessionStorage.setItem('hasViewContainer', 'false');
215
+ sessionStorage.setItem('okToInitFlowContainer', 'true');
216
+ },
217
+ },
218
+ );
219
+ }
220
+
221
+ private subscribeToPubSub(): void {
222
+ PCore.getPubSubUtils().subscribe(
223
+ PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL,
224
+ () => {
225
+ this.ngZone.run(() => {
226
+ this.showForm = false;
227
+ });
228
+ },
229
+ this.cancelSubId,
230
+ );
231
+
232
+ PCore.getPubSubUtils().subscribe(
233
+ PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,
234
+ () => {
235
+ this.ngZone.run(() => {
236
+ this.showForm = false;
237
+ });
238
+ },
239
+ this.doneSubId,
240
+ );
241
+ }
242
+
243
+ async handleCreateCase(): Promise<void> {
244
+ this.loading = true;
245
+ this.showForm = true;
46
246
 
47
- async ngOnInit() {
48
247
  try {
49
- this.isReady = true;
248
+ const sdkConfig = await getSdkConfig();
249
+ const mashupCaseType = (sdkConfig as Record<string, Record<string, unknown>>).serverConfig[
250
+ 'appMashupCaseType'
251
+ ] as string;
252
+
253
+ await PCore.getMashupApi().createCase(mashupCaseType, PCore.getConstants().APP.APP, {
254
+ pageName: 'pyEmbedAssignment',
255
+ startingFields: {},
256
+ });
50
257
  } catch (err) {
51
- console.error('Failed to initialize Pega SDK:', err);
258
+ console.error('Error creating case:', err);
259
+ this.showForm = false;
260
+ } finally {
261
+ this.ngZone.run(() => {
262
+ this.loading = false;
263
+ this.cdr.detectChanges();
264
+ });
52
265
  }
53
266
  }
267
+
268
+ logout(): void {
269
+ this.runtime.authClient.logout();
270
+ }
54
271
  }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Angular sample component map — maps Pega component names to Angular component classes.
3
+ *
4
+ * Mirrors the getSampleComponentMap() pattern from @pega/sdk-react.
5
+ */
6
+
7
+ import type { Type } from '@angular/core';
8
+ import { registerAngularComponentMap } from '@pega/sdk-angular';
9
+
10
+ // Infrastructure
11
+ import { RootContainerComponent } from './infra/root-container/root-container.component';
12
+ import { ViewContainerComponent } from './infra/view-container/view-container.component';
13
+ import { FlowContainerComponent } from './infra/flow-container/flow-container.component';
14
+ import { AssignmentComponent } from './infra/assignment/assignment.component';
15
+ import { ViewComponent } from './infra/view/view.component';
16
+ import { ReferenceComponent } from './infra/reference/reference.component';
17
+ import { RegionComponent } from './infra/region/region.component';
18
+ import { CaseViewComponent } from './infra/case-view/case-view.component';
19
+ import { CaseSummaryComponent } from './infra/case-summary/case-summary.component';
20
+ import { StagesComponent } from './infra/stages/stages.component';
21
+
22
+ // Templates
23
+ import { DefaultFormComponent } from './templates/default-form/default-form.component';
24
+ import { OneColumnComponent } from './templates/one-column/one-column.component';
25
+ import { TwoColumnComponent } from './templates/two-column/two-column.component';
26
+ import { NarrowWideComponent } from './templates/narrow-wide/narrow-wide.component';
27
+ import { WideNarrowComponent } from './templates/wide-narrow/wide-narrow.component';
28
+
29
+ // Fields
30
+ import { TextInputComponent } from './fields/text-input/text-input.component';
31
+ import { TextAreaComponent } from './fields/text-area/text-area.component';
32
+ import { DropdownComponent } from './fields/dropdown/dropdown.component';
33
+ import { CheckboxComponent } from './fields/checkbox/checkbox.component';
34
+ import { RadioButtonsComponent } from './fields/radio-buttons/radio-buttons.component';
35
+ import { CurrencyComponent } from './fields/currency/currency.component';
36
+ import { DateInputComponent } from './fields/date-input/date-input.component';
37
+ import { EmailComponent } from './fields/email/email.component';
38
+ import { PhoneComponent } from './fields/phone/phone.component';
39
+ import { IntegerComponent } from './fields/integer/integer.component';
40
+ import { URLInputComponent } from './fields/url-input/url-input.component';
41
+ import { AutoCompleteComponent } from './fields/auto-complete/auto-complete.component';
42
+
43
+ function getSampleAngularComponentMap(): Record<string, Type<unknown>> {
44
+ return {
45
+ // Fields
46
+ TextInput: TextInputComponent,
47
+ TextArea: TextAreaComponent,
48
+ Dropdown: DropdownComponent,
49
+ Checkbox: CheckboxComponent,
50
+ RadioButtons: RadioButtonsComponent,
51
+ Currency: CurrencyComponent,
52
+ Date: DateInputComponent,
53
+ Email: EmailComponent,
54
+ Phone: PhoneComponent,
55
+ Integer: IntegerComponent,
56
+ URL: URLInputComponent,
57
+ AutoComplete: AutoCompleteComponent,
58
+
59
+ // Templates
60
+ DefaultForm: DefaultFormComponent,
61
+ OneColumn: OneColumnComponent,
62
+ TwoColumn: TwoColumnComponent,
63
+ NarrowWide: NarrowWideComponent,
64
+ WideNarrow: WideNarrowComponent,
65
+
66
+ // Infrastructure
67
+ Assignment: AssignmentComponent,
68
+ RootContainer: RootContainerComponent,
69
+ ViewContainer: ViewContainerComponent,
70
+ FlowContainer: FlowContainerComponent,
71
+ View: ViewComponent,
72
+ Region: RegionComponent,
73
+ CaseView: CaseViewComponent,
74
+ CaseSummary: CaseSummaryComponent,
75
+ Stages: StagesComponent,
76
+
77
+ // Aliases — PCore may use different name variants
78
+ AppShell: RootContainerComponent,
79
+ CaseViewContainer: ViewContainerComponent,
80
+ SubTabs: ViewContainerComponent,
81
+ DeferLoad: ViewContainerComponent,
82
+ reference: ReferenceComponent,
83
+ };
84
+ }
85
+
86
+ function registerSampleAngularComponents(): void {
87
+ registerAngularComponentMap(getSampleAngularComponentMap());
88
+ }
89
+
90
+ export { getSampleAngularComponentMap, registerSampleAngularComponents };