@pega/sdk 0.0.3 → 0.0.4
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 +183 -183
- package/README.md +6 -6
- package/SECURITY.md +2 -1
- package/dist/index.js +12 -55
- package/package.json +7 -6
- package/templates/angular-sdk-reference/package.json +15 -15
- package/templates/angular-sdk-reference/tsconfig.json +2 -2
- package/templates/react-native-sdk-reference/App.tsx +2 -4
- package/templates/react-native-sdk-reference/package.json +6 -6
- package/templates/react-native-sdk-reference/tsconfig.json +2 -1
- package/templates/react-sdk-reference/.claude/instructions/component-map.md +1 -1
- package/templates/react-sdk-reference/.claude/instructions/field-component.md +4 -0
- package/templates/react-sdk-reference/.claude/instructions/template-component.md +2 -1
- package/templates/react-sdk-reference/.claude/instructions/widget-component.md +1 -0
- package/templates/react-sdk-reference/.claude/prompts/add-component.md +18 -10
- package/templates/react-sdk-reference/.claude/prompts/component-manifest.json +165 -83
- package/templates/react-sdk-reference/.claude/prompts/generate-all-components.md +26 -17
- package/templates/react-sdk-reference/.claude/prompts/generate-dse-components.md +27 -13
- package/templates/react-sdk-reference/.claude/prompts/generate-field-components.md +42 -28
- package/templates/react-sdk-reference/.claude/prompts/generate-template-components.md +48 -34
- package/templates/react-sdk-reference/.claude/prompts/generate-widget-components.md +25 -11
- package/templates/react-sdk-reference/.claude/prompts/identify-components.md +65 -65
- package/templates/react-sdk-reference/.claude/skills/component-contracts.md +99 -99
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/AlertBanner.md +40 -38
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Banner.md +54 -51
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/CaseSummaryFields.md +51 -46
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/DetailsFields.md +32 -28
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroup.md +38 -35
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroupList.md +25 -23
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldValueList.md +29 -26
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Operator.md +32 -26
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Pulse.md +17 -15
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/RichTextEditor.md +85 -59
- package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/WssQuickCreate.md +49 -47
- package/templates/react-sdk-reference/.claude/skills/design-system-extension.md +13 -11
- package/templates/react-sdk-reference/.claude/skills/field-components.md +9 -8
- package/templates/react-sdk-reference/.claude/skills/field-skills/AutoComplete.md +27 -26
- package/templates/react-sdk-reference/.claude/skills/field-skills/CancelAlert.md +30 -22
- package/templates/react-sdk-reference/.claude/skills/field-skills/Checkbox.md +60 -43
- package/templates/react-sdk-reference/.claude/skills/field-skills/Currency.md +23 -20
- package/templates/react-sdk-reference/.claude/skills/field-skills/Date.md +19 -17
- package/templates/react-sdk-reference/.claude/skills/field-skills/DateTime.md +18 -15
- package/templates/react-sdk-reference/.claude/skills/field-skills/Decimal.md +22 -21
- package/templates/react-sdk-reference/.claude/skills/field-skills/Dropdown.md +50 -30
- package/templates/react-sdk-reference/.claude/skills/field-skills/Email.md +20 -18
- package/templates/react-sdk-reference/.claude/skills/field-skills/Group.md +21 -15
- package/templates/react-sdk-reference/.claude/skills/field-skills/Integer.md +17 -16
- package/templates/react-sdk-reference/.claude/skills/field-skills/Location.md +30 -21
- package/templates/react-sdk-reference/.claude/skills/field-skills/Multiselect.md +66 -42
- package/templates/react-sdk-reference/.claude/skills/field-skills/ObjectReference.md +27 -18
- package/templates/react-sdk-reference/.claude/skills/field-skills/Percentage.md +22 -21
- package/templates/react-sdk-reference/.claude/skills/field-skills/Phone.md +36 -17
- package/templates/react-sdk-reference/.claude/skills/field-skills/RadioButtons.md +56 -35
- package/templates/react-sdk-reference/.claude/skills/field-skills/RichText.md +23 -12
- package/templates/react-sdk-reference/.claude/skills/field-skills/ScalarList.md +41 -31
- package/templates/react-sdk-reference/.claude/skills/field-skills/SelectableCard.md +70 -55
- package/templates/react-sdk-reference/.claude/skills/field-skills/SemanticLink.md +34 -27
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextArea.md +24 -22
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextContent.md +38 -22
- package/templates/react-sdk-reference/.claude/skills/field-skills/TextInput.md +24 -21
- package/templates/react-sdk-reference/.claude/skills/field-skills/Time.md +16 -15
- package/templates/react-sdk-reference/.claude/skills/field-skills/URL.md +16 -15
- package/templates/react-sdk-reference/.claude/skills/field-skills/UserReference.md +57 -34
- package/templates/react-sdk-reference/.claude/skills/run-and-verify.md +10 -8
- package/templates/react-sdk-reference/.claude/skills/template-components.md +7 -8
- package/templates/react-sdk-reference/.claude/skills/template-skills/AdvancedSearch.md +27 -21
- package/templates/react-sdk-reference/.claude/skills/template-skills/AppShell.md +17 -15
- package/templates/react-sdk-reference/.claude/skills/template-skills/BannerPage.md +19 -16
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseSummary.md +19 -13
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseView.md +23 -17
- package/templates/react-sdk-reference/.claude/skills/template-skills/CaseViewActionsMenu.md +34 -29
- package/templates/react-sdk-reference/.claude/skills/template-skills/Confirmation.md +18 -16
- package/templates/react-sdk-reference/.claude/skills/template-skills/DataReference.md +36 -32
- package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultForm.md +23 -21
- package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultPage.md +31 -29
- package/templates/react-sdk-reference/.claude/skills/template-skills/Details.md +19 -17
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsSubTabs.md +22 -20
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsThreeColumn.md +19 -17
- package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsTwoColumn.md +19 -17
- package/templates/react-sdk-reference/.claude/skills/template-skills/DynamicTabs.md +15 -10
- package/templates/react-sdk-reference/.claude/skills/template-skills/FieldGroupTemplate.md +19 -16
- package/templates/react-sdk-reference/.claude/skills/template-skills/HierarchicalForm.md +18 -15
- package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboard.md +17 -13
- package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboardPage.md +10 -13
- package/templates/react-sdk-reference/.claude/skills/template-skills/ListPage.md +9 -7
- package/templates/react-sdk-reference/.claude/skills/template-skills/ListView.md +33 -30
- package/templates/react-sdk-reference/.claude/skills/template-skills/MultiReferenceReadOnly.md +13 -11
- package/templates/react-sdk-reference/.claude/skills/template-skills/NarrowWide.md +42 -40
- package/templates/react-sdk-reference/.claude/skills/template-skills/OneColumn.md +25 -20
- package/templates/react-sdk-reference/.claude/skills/template-skills/PromotedFilters.md +25 -19
- package/templates/react-sdk-reference/.claude/skills/template-skills/SelfServiceCaseView.md +36 -29
- package/templates/react-sdk-reference/.claude/skills/template-skills/SimpleTable.md +31 -27
- package/templates/react-sdk-reference/.claude/skills/template-skills/SingleReferenceReadOnly.md +29 -24
- package/templates/react-sdk-reference/.claude/skills/template-skills/SubTabs.md +14 -11
- package/templates/react-sdk-reference/.claude/skills/template-skills/TwoColumn.md +34 -32
- package/templates/react-sdk-reference/.claude/skills/template-skills/WideNarrow.md +48 -46
- package/templates/react-sdk-reference/.claude/skills/template-skills/WssNavBar.md +23 -19
- package/templates/react-sdk-reference/.claude/skills/widget-components.md +11 -22
- package/templates/react-sdk-reference/.claude/skills/widget-skills/AppAnnouncement.md +22 -20
- package/templates/react-sdk-reference/.claude/skills/widget-skills/Attachment.md +33 -28
- package/templates/react-sdk-reference/.claude/skills/widget-skills/CaseHistory.md +18 -15
- package/templates/react-sdk-reference/.claude/skills/widget-skills/FileUtility.md +43 -37
- package/templates/react-sdk-reference/.claude/skills/widget-skills/Followers.md +23 -19
- package/templates/react-sdk-reference/.claude/skills/widget-skills/QuickCreate.md +20 -16
- package/templates/react-sdk-reference/.claude/skills/widget-skills/SummaryItem.md +26 -24
- package/templates/react-sdk-reference/.claude/skills/widget-skills/ToDo.md +43 -35
- package/templates/react-sdk-reference/.cursor/rules/prompts/component-manifest.json +165 -83
- package/templates/react-sdk-reference/.github/agents/implementation-expert.agent.md +135 -0
- package/templates/react-sdk-reference/.github/instructions/component-map.instructions.md +2 -2
- package/templates/react-sdk-reference/.github/instructions/dse-component.instructions.md +1 -1
- package/templates/react-sdk-reference/.github/instructions/field-component.instructions.md +5 -1
- package/templates/react-sdk-reference/.github/instructions/template-component.instructions.md +3 -2
- package/templates/react-sdk-reference/.github/instructions/widget-component.instructions.md +2 -1
- package/templates/react-sdk-reference/.github/prompts/add-component.prompt.md +58 -15
- package/templates/react-sdk-reference/.github/prompts/component-manifest.json +165 -83
- package/templates/react-sdk-reference/.github/prompts/generate-all-components.prompt.md +322 -65
- package/templates/react-sdk-reference/.github/prompts/generate-dse-components.prompt.md +124 -50
- package/templates/react-sdk-reference/.github/prompts/generate-field-components.prompt.md +145 -66
- package/templates/react-sdk-reference/.github/prompts/generate-template-components.prompt.md +146 -73
- package/templates/react-sdk-reference/.github/prompts/generate-widget-components.prompt.md +128 -49
- package/templates/react-sdk-reference/.github/prompts/identify-components.prompt.md +65 -65
- package/templates/react-sdk-reference/.github/skills/component-contracts.md +99 -99
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/AlertBanner.md +40 -38
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Banner.md +54 -51
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/CaseSummaryFields.md +51 -46
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/DetailsFields.md +32 -28
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroup.md +38 -35
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroupList.md +25 -23
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldValueList.md +29 -26
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Operator.md +32 -26
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Pulse.md +17 -15
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/RichTextEditor.md +85 -59
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/WssQuickCreate.md +49 -47
- package/templates/react-sdk-reference/.github/skills/design-system-extension.md +13 -11
- package/templates/react-sdk-reference/.github/skills/field-components.md +9 -8
- package/templates/react-sdk-reference/.github/skills/field-skills/AutoComplete.md +27 -26
- package/templates/react-sdk-reference/.github/skills/field-skills/CancelAlert.md +30 -22
- package/templates/react-sdk-reference/.github/skills/field-skills/Checkbox.md +60 -43
- package/templates/react-sdk-reference/.github/skills/field-skills/Currency.md +23 -20
- package/templates/react-sdk-reference/.github/skills/field-skills/Date.md +19 -17
- package/templates/react-sdk-reference/.github/skills/field-skills/DateTime.md +18 -15
- package/templates/react-sdk-reference/.github/skills/field-skills/Decimal.md +22 -21
- package/templates/react-sdk-reference/.github/skills/field-skills/Dropdown.md +50 -30
- package/templates/react-sdk-reference/.github/skills/field-skills/Email.md +20 -18
- package/templates/react-sdk-reference/.github/skills/field-skills/Group.md +21 -15
- package/templates/react-sdk-reference/.github/skills/field-skills/Integer.md +17 -16
- package/templates/react-sdk-reference/.github/skills/field-skills/Location.md +30 -21
- package/templates/react-sdk-reference/.github/skills/field-skills/Multiselect.md +66 -42
- package/templates/react-sdk-reference/.github/skills/field-skills/ObjectReference.md +27 -18
- package/templates/react-sdk-reference/.github/skills/field-skills/Percentage.md +22 -21
- package/templates/react-sdk-reference/.github/skills/field-skills/Phone.md +36 -17
- package/templates/react-sdk-reference/.github/skills/field-skills/RadioButtons.md +56 -35
- package/templates/react-sdk-reference/.github/skills/field-skills/RichText.md +23 -12
- package/templates/react-sdk-reference/.github/skills/field-skills/ScalarList.md +41 -31
- package/templates/react-sdk-reference/.github/skills/field-skills/SelectableCard.md +70 -55
- package/templates/react-sdk-reference/.github/skills/field-skills/SemanticLink.md +34 -27
- package/templates/react-sdk-reference/.github/skills/field-skills/TextArea.md +24 -22
- package/templates/react-sdk-reference/.github/skills/field-skills/TextContent.md +38 -22
- package/templates/react-sdk-reference/.github/skills/field-skills/TextInput.md +24 -21
- package/templates/react-sdk-reference/.github/skills/field-skills/Time.md +16 -15
- package/templates/react-sdk-reference/.github/skills/field-skills/URL.md +16 -15
- package/templates/react-sdk-reference/.github/skills/field-skills/UserReference.md +57 -34
- package/templates/react-sdk-reference/.github/skills/run-and-verify.md +10 -8
- package/templates/react-sdk-reference/.github/skills/template-components.md +7 -8
- package/templates/react-sdk-reference/.github/skills/template-skills/AdvancedSearch.md +27 -21
- package/templates/react-sdk-reference/.github/skills/template-skills/AppShell.md +17 -15
- package/templates/react-sdk-reference/.github/skills/template-skills/BannerPage.md +19 -16
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseSummary.md +19 -13
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseView.md +23 -17
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseViewActionsMenu.md +34 -29
- package/templates/react-sdk-reference/.github/skills/template-skills/Confirmation.md +18 -16
- package/templates/react-sdk-reference/.github/skills/template-skills/DataReference.md +36 -32
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultForm.md +23 -21
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultPage.md +31 -29
- package/templates/react-sdk-reference/.github/skills/template-skills/Details.md +19 -17
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsSubTabs.md +22 -20
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsThreeColumn.md +19 -17
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsTwoColumn.md +19 -17
- package/templates/react-sdk-reference/.github/skills/template-skills/DynamicTabs.md +15 -10
- package/templates/react-sdk-reference/.github/skills/template-skills/FieldGroupTemplate.md +19 -16
- package/templates/react-sdk-reference/.github/skills/template-skills/HierarchicalForm.md +18 -15
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboard.md +17 -13
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboardPage.md +10 -13
- package/templates/react-sdk-reference/.github/skills/template-skills/ListPage.md +9 -7
- package/templates/react-sdk-reference/.github/skills/template-skills/ListView.md +33 -30
- package/templates/react-sdk-reference/.github/skills/template-skills/MultiReferenceReadOnly.md +13 -11
- package/templates/react-sdk-reference/.github/skills/template-skills/NarrowWide.md +42 -40
- package/templates/react-sdk-reference/.github/skills/template-skills/OneColumn.md +25 -20
- package/templates/react-sdk-reference/.github/skills/template-skills/PromotedFilters.md +25 -19
- package/templates/react-sdk-reference/.github/skills/template-skills/SelfServiceCaseView.md +36 -29
- package/templates/react-sdk-reference/.github/skills/template-skills/SimpleTable.md +31 -27
- package/templates/react-sdk-reference/.github/skills/template-skills/SingleReferenceReadOnly.md +29 -24
- package/templates/react-sdk-reference/.github/skills/template-skills/SubTabs.md +14 -11
- package/templates/react-sdk-reference/.github/skills/template-skills/TwoColumn.md +34 -32
- package/templates/react-sdk-reference/.github/skills/template-skills/WideNarrow.md +48 -46
- package/templates/react-sdk-reference/.github/skills/template-skills/WssNavBar.md +23 -19
- package/templates/react-sdk-reference/.github/skills/widget-components.md +11 -22
- package/templates/react-sdk-reference/.github/skills/widget-skills/AppAnnouncement.md +22 -20
- package/templates/react-sdk-reference/.github/skills/widget-skills/Attachment.md +33 -28
- package/templates/react-sdk-reference/.github/skills/widget-skills/CaseHistory.md +18 -15
- package/templates/react-sdk-reference/.github/skills/widget-skills/FileUtility.md +43 -37
- package/templates/react-sdk-reference/.github/skills/widget-skills/Followers.md +23 -19
- package/templates/react-sdk-reference/.github/skills/widget-skills/QuickCreate.md +20 -16
- package/templates/react-sdk-reference/.github/skills/widget-skills/SummaryItem.md +26 -24
- package/templates/react-sdk-reference/.github/skills/widget-skills/ToDo.md +43 -35
- package/templates/react-sdk-reference/AGENTS.md +0 -1
- package/templates/react-sdk-reference/index.html +1 -4
- package/templates/react-sdk-reference/package.json +15 -15
- package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
- package/templates/react-sdk-reference/src/AppSelector.tsx +6 -6
- package/templates/react-sdk-reference/src/FallbackComponent.tsx +2 -6
- package/templates/react-sdk-reference/src/MashupApp.styles.ts +269 -41
- package/templates/react-sdk-reference/src/MashupApp.tsx +186 -85
- package/templates/react-sdk-reference/src/PortalApp.tsx +10 -34
- package/templates/react-sdk-reference/src/components/component-map.ts +2 -7
- package/templates/react-sdk-reference/src/components/designSystemExtension/AlertBanner/AlertBanner.tsx +7 -28
- package/templates/react-sdk-reference/src/components/designSystemExtension/Banner/Banner.tsx +12 -7
- package/templates/react-sdk-reference/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +35 -33
- package/templates/react-sdk-reference/src/components/designSystemExtension/DetailsFields/DetailsFields.tsx +6 -27
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/FieldGroup.tsx +15 -11
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx +7 -7
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/FieldValueList.tsx +18 -12
- package/templates/react-sdk-reference/src/components/designSystemExtension/Operator/Operator.tsx +27 -25
- package/templates/react-sdk-reference/src/components/designSystemExtension/Pulse/Pulse.tsx +4 -4
- package/templates/react-sdk-reference/src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx +8 -40
- package/templates/react-sdk-reference/src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +9 -9
- package/templates/react-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +26 -20
- package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.tsx +35 -17
- package/templates/react-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +27 -25
- package/templates/react-sdk-reference/src/components/field/Currency/Currency.tsx +10 -6
- package/templates/react-sdk-reference/src/components/field/Currency/currency-utils.ts +1 -1
- package/templates/react-sdk-reference/src/components/field/Date/Date.tsx +20 -7
- package/templates/react-sdk-reference/src/components/field/DateTime/DateTime.tsx +23 -8
- package/templates/react-sdk-reference/src/components/field/Decimal/Decimal.tsx +5 -5
- package/templates/react-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +45 -25
- package/templates/react-sdk-reference/src/components/field/Email/Email.tsx +8 -8
- package/templates/react-sdk-reference/src/components/field/Group/Group.tsx +1 -1
- package/templates/react-sdk-reference/src/components/field/Integer/Integer.tsx +5 -5
- package/templates/react-sdk-reference/src/components/field/Location/Location.tsx +21 -16
- package/templates/react-sdk-reference/src/components/field/Multiselect/Multiselect.tsx +42 -27
- package/templates/react-sdk-reference/src/components/field/Multiselect/utils.ts +43 -29
- package/templates/react-sdk-reference/src/components/field/ObjectReference/ObjectReference.tsx +53 -30
- package/templates/react-sdk-reference/src/components/field/ObjectReference/utils.ts +12 -11
- package/templates/react-sdk-reference/src/components/field/Percentage/Percentage.tsx +6 -6
- package/templates/react-sdk-reference/src/components/field/Phone/Phone.tsx +12 -12
- package/templates/react-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +38 -16
- package/templates/react-sdk-reference/src/components/field/RichText/RichText.tsx +17 -4
- package/templates/react-sdk-reference/src/components/field/ScalarList/ScalarList.tsx +5 -5
- package/templates/react-sdk-reference/src/components/field/SelectableCard/SelectableCard.tsx +31 -18
- package/templates/react-sdk-reference/src/components/field/SelectableCard/utils.tsx +28 -20
- package/templates/react-sdk-reference/src/components/field/SemanticLink/SemanticLink.tsx +28 -19
- package/templates/react-sdk-reference/src/components/field/SemanticLink/utils.ts +3 -1
- package/templates/react-sdk-reference/src/components/field/TextArea/TextArea.tsx +4 -4
- package/templates/react-sdk-reference/src/components/field/TextInput/TextInput.tsx +4 -4
- package/templates/react-sdk-reference/src/components/field/Time/Time.tsx +20 -7
- package/templates/react-sdk-reference/src/components/field/URL/URL.tsx +7 -7
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReference.tsx +14 -14
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReferenceUtils.ts +2 -2
- package/templates/react-sdk-reference/src/components/helpers/case-utils.tsx +5 -5
- package/templates/react-sdk-reference/src/components/helpers/data_page.ts +3 -3
- package/templates/react-sdk-reference/src/components/helpers/date-format-utils.ts +5 -5
- package/templates/react-sdk-reference/src/components/helpers/field-group-utils.ts +2 -7
- package/templates/react-sdk-reference/src/components/helpers/formatters/Boolean.ts +9 -3
- package/templates/react-sdk-reference/src/components/helpers/formatters/Currency.ts +18 -6
- package/templates/react-sdk-reference/src/components/helpers/formatters/CurrencyMap.ts +168 -168
- package/templates/react-sdk-reference/src/components/helpers/formatters/Date.ts +5 -5
- package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +8 -5
- package/templates/react-sdk-reference/src/components/helpers/instructions-utils.ts +2 -2
- package/templates/react-sdk-reference/src/components/helpers/simpleTableHelpers.ts +54 -30
- package/templates/react-sdk-reference/src/components/helpers/state-utils.tsx +5 -2
- package/templates/react-sdk-reference/src/components/helpers/template-utils.ts +5 -4
- package/templates/react-sdk-reference/src/components/helpers/utils.ts +3 -3
- package/templates/react-sdk-reference/src/components/helpers/versionHelpers.ts +3 -1
- package/templates/react-sdk-reference/src/components/index.ts +1 -4
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/AdvancedSearch.tsx +18 -10
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroup/persistUtils.ts +3 -3
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +26 -90
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/hooks.ts +8 -5
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/utils.ts +8 -4
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/TemplateContext.ts +1 -1
- package/templates/react-sdk-reference/src/components/template/AppShell/AppShell.tsx +28 -19
- package/templates/react-sdk-reference/src/components/template/BannerPage/BannerPage.tsx +2 -2
- package/templates/react-sdk-reference/src/components/template/CaseSummary/CaseSummary.tsx +5 -5
- package/templates/react-sdk-reference/src/components/template/CaseView/CaseView.tsx +35 -16
- package/templates/react-sdk-reference/src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +10 -10
- package/templates/react-sdk-reference/src/components/template/Confirmation/Confirmation.tsx +12 -26
- package/templates/react-sdk-reference/src/components/template/DataReference/DataReference.tsx +41 -124
- package/templates/react-sdk-reference/src/components/template/DataReference/DataReferenceAdvancedSearchContext.ts +2 -2
- package/templates/react-sdk-reference/src/components/template/DataReference/SearchForm.tsx +18 -78
- package/templates/react-sdk-reference/src/components/template/DataReference/utils.ts +18 -12
- package/templates/react-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +4 -12
- package/templates/react-sdk-reference/src/components/template/DefaultForm/utils/index.ts +3 -3
- package/templates/react-sdk-reference/src/components/template/DefaultPage/DefaultPage.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/Details/Details/Details.tsx +6 -8
- package/templates/react-sdk-reference/src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +7 -14
- package/templates/react-sdk-reference/src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +7 -14
- package/templates/react-sdk-reference/src/components/template/Details/DynamicTabs/DynamicTabs.tsx +16 -8
- package/templates/react-sdk-reference/src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx +7 -4
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/HierarchicalForm.tsx +20 -5
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/hooks.ts +35 -77
- package/templates/react-sdk-reference/src/components/template/InlineDashboard/InlineDashboard.tsx +10 -10
- package/templates/react-sdk-reference/src/components/template/ListView/DefaultViewMeta.ts +31 -31
- package/templates/react-sdk-reference/src/components/template/ListView/ListView.tsx +173 -133
- package/templates/react-sdk-reference/src/components/template/ListView/hooks.ts +17 -10
- package/templates/react-sdk-reference/src/components/template/ListView/utils.ts +64 -51
- package/templates/react-sdk-reference/src/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +6 -6
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWide/NarrowWide.tsx +6 -6
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +8 -18
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +7 -1
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumn/OneColumn.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnTab/OneColumnTab.tsx +1 -1
- package/templates/react-sdk-reference/src/components/template/PromotedFilters/PromotedFilters.tsx +13 -40
- package/templates/react-sdk-reference/src/components/template/SelfServiceCaseView/SelfServiceCaseView.tsx +19 -16
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTable/SimpleTable.tsx +8 -7
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +84 -203
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +15 -5
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.tsx +15 -29
- package/templates/react-sdk-reference/src/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +7 -7
- package/templates/react-sdk-reference/src/components/template/SubTabs/SubTabs.tsx +1 -1
- package/templates/react-sdk-reference/src/components/template/SubTabs/tabUtils.ts +13 -11
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/TwoColumn.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrow/WideNarrow.tsx +6 -6
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +13 -24
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +3 -3
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +7 -1
- package/templates/react-sdk-reference/src/components/template/WssNavBar/WssNavBar.tsx +25 -25
- package/templates/react-sdk-reference/src/components/template/utils.tsx +6 -6
- package/templates/react-sdk-reference/src/components/widget/AppAnnouncement/AppAnnouncement.tsx +9 -9
- package/templates/react-sdk-reference/src/components/widget/Attachment/Attachment.tsx +125 -79
- package/templates/react-sdk-reference/src/components/widget/Attachment/AttachmentUtils.ts +58 -33
- package/templates/react-sdk-reference/src/components/widget/CaseHistory/CaseHistory.tsx +14 -12
- package/templates/react-sdk-reference/src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +19 -7
- package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/FileUtility.tsx +137 -107
- package/templates/react-sdk-reference/src/components/widget/Followers/Followers.tsx +4 -4
- package/templates/react-sdk-reference/src/components/widget/QuickCreate/QuickCreate.tsx +15 -11
- package/templates/react-sdk-reference/src/components/widget/SummaryItem/SummaryItem.tsx +25 -18
- package/templates/react-sdk-reference/src/components/widget/SummaryList/SummaryList.tsx +7 -2
- package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.tsx +30 -116
- package/templates/react-sdk-reference/src/main.tsx +1 -1
- package/templates/react-sdk-reference/tsconfig.json +2 -1
- package/templates/react-sdk-reference/vite.config.ts +51 -26
- package/templates/wc-sdk-reference/package.json +3 -3
- package/templates/wc-sdk-reference/src/index.ts +10 -10
- package/templates/wc-sdk-reference/tsconfig.json +1 -0
|
@@ -11,9 +11,12 @@ Read the user's message carefully. Extract:
|
|
|
11
11
|
- **Base components folder** — the root folder that contains (or will contain) the component type subfolders (e.g. `src/components/`)
|
|
12
12
|
- **Component types in scope** — which types to generate (default: all four if not specified)
|
|
13
13
|
|
|
14
|
-
Both **design system** and **base components folder** are required. If either is missing or ambiguous,
|
|
14
|
+
Both **design system** and **base components folder** are required. If either is missing or ambiguous, you MUST stop and ask the user before proceeding. Do not infer any value from the project structure, `.instructions.md` files, existing folders, or any other source.
|
|
15
|
+
|
|
16
|
+
⛔ **STOP** — If the user's message does not explicitly state BOTH the design system AND the base components folder, ask for the missing items now. Do not proceed to Step 1 until you have explicit answers from the user for all required inputs.
|
|
15
17
|
|
|
16
18
|
Example questions (ask only the ones that are actually missing):
|
|
19
|
+
|
|
17
20
|
1. Which design system should I use? (e.g. Ant Design, Chakra UI, Carbon, Radix UI)
|
|
18
21
|
2. What is your base components folder? (e.g. `src/components/`) — subfolders `field/`, `template/`, `widget/`, and `designSystemExtension/` will be used under it.
|
|
19
22
|
|
|
@@ -21,13 +24,13 @@ Example questions (ask only the ones that are actually missing):
|
|
|
21
24
|
|
|
22
25
|
Extract which types the user wants from the message:
|
|
23
26
|
|
|
24
|
-
| User says
|
|
25
|
-
|
|
26
|
-
| "generate all components"
|
|
27
|
-
| "generate field and widget components"
|
|
28
|
-
| "generate widget, template components"
|
|
29
|
-
| "generate all components except templates" | field + widget + designSystemExtension
|
|
30
|
-
| "replace everything"
|
|
27
|
+
| User says | Types in scope |
|
|
28
|
+
| ------------------------------------------ | ------------------------------------------------- |
|
|
29
|
+
| "generate all components" | field + template + widget + designSystemExtension |
|
|
30
|
+
| "generate field and widget components" | field + widget |
|
|
31
|
+
| "generate widget, template components" | widget + template |
|
|
32
|
+
| "generate all components except templates" | field + widget + designSystemExtension |
|
|
33
|
+
| "replace everything" | field + template + widget + designSystemExtension |
|
|
31
34
|
|
|
32
35
|
Default to **all four types** if the message does not restrict the scope.
|
|
33
36
|
|
|
@@ -35,11 +38,11 @@ Default to **all four types** if the message does not restrict the scope.
|
|
|
35
38
|
|
|
36
39
|
Once the base folder is known, derive the output path for each type in scope:
|
|
37
40
|
|
|
38
|
-
| Type
|
|
39
|
-
|
|
40
|
-
| field
|
|
41
|
-
| template
|
|
42
|
-
| widget
|
|
41
|
+
| Type | Derived path |
|
|
42
|
+
| --------------------- | ------------------------------- |
|
|
43
|
+
| field | `<base>/field/` |
|
|
44
|
+
| template | `<base>/template/` |
|
|
45
|
+
| widget | `<base>/widget/` |
|
|
43
46
|
| designSystemExtension | `<base>/designSystemExtension/` |
|
|
44
47
|
|
|
45
48
|
Once design system, base folder, and type scope are resolved, continue to Step 1.
|
|
@@ -50,11 +53,11 @@ Once design system, base folder, and type scope are resolved, continue to Step 1
|
|
|
50
53
|
|
|
51
54
|
Read the general skill file for every type in scope. Do this upfront — do not re-read per component.
|
|
52
55
|
|
|
53
|
-
| Type
|
|
54
|
-
|
|
55
|
-
| field
|
|
56
|
-
| template
|
|
57
|
-
| widget
|
|
56
|
+
| Type | Skill file to read |
|
|
57
|
+
| --------------------- | ------------------------------------------- |
|
|
58
|
+
| field | `.github/skills/field-components.md` |
|
|
59
|
+
| template | `.github/skills/template-components.md` |
|
|
60
|
+
| widget | `.github/skills/widget-components.md` |
|
|
58
61
|
| designSystemExtension | `.github/skills/design-system-extension.md` |
|
|
59
62
|
|
|
60
63
|
Keep all loaded skill files active throughout the entire session.
|
|
@@ -63,20 +66,58 @@ Keep all loaded skill files active throughout the entire session.
|
|
|
63
66
|
|
|
64
67
|
## Step 2 — Install and discover the design system (once)
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
69
|
+
### 2a — Check and install the DS package
|
|
70
|
+
|
|
71
|
+
Run this command in your terminal:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
cat package.json | grep "<design-system-package>"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If the design system package is **not** listed in `dependencies` or `devDependencies`, install it:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm install <design-system-package>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Also install any peer dependencies documented in the package's README. Report what was installed.
|
|
84
|
+
|
|
85
|
+
### 2b — Discover the DS API from installed files
|
|
86
|
+
|
|
87
|
+
Run these commands to discover the actual API (do NOT rely on training knowledge):
|
|
88
|
+
|
|
89
|
+
1. Read the README for correct import paths and usage patterns:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
cat node_modules/<designSystem>/README.md
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
2. List every exported component:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
grep "^export" node_modules/<designSystem>/dist/index.d.ts 2>/dev/null || grep -rl "^export" node_modules/<designSystem> --include="index.d.ts" | head -3 | xargs grep "^export"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
3. For every component you plan to use across all types in scope, read its TypeScript prop interface:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
find node_modules/<designSystem> -name "ComponentName.d.ts" | head -3
|
|
105
|
+
grep -A 40 "interface.*Props" <path-from-above>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Focus on primitives needed across **all types in scope**:
|
|
109
|
+
- **field**: form input controls (Input, Select, Checkbox, DatePicker, etc.)
|
|
110
|
+
- **template**: grid/layout primitives (Grid, Flex, Columns, SimpleGrid, etc.)
|
|
111
|
+
- **widget**: card/list/table/button/badge primitives
|
|
112
|
+
- **designSystemExtension**: alert/notification/avatar primitives
|
|
113
|
+
|
|
114
|
+
4. Also check:
|
|
115
|
+
- Whether the DS has a **form layout wrapper** (label + input + helper text) — use it instead of manual margins
|
|
116
|
+
- Whether it has **size/density/variant conventions** — use built-in props rather than custom padding
|
|
117
|
+
- Whether it has a **companion icons package** — read its exports before using any icon name; never guess icon names
|
|
118
|
+
- Whether it has **CSS tokens** — use design system CSS custom properties for spacing; never hardcode `px` values
|
|
119
|
+
|
|
120
|
+
Only use component names and prop names confirmed in these files.
|
|
80
121
|
|
|
81
122
|
Build a unified **DS API reference map** covering all types in scope. Reuse it throughout — do not repeat discovery commands per component.
|
|
82
123
|
|
|
@@ -89,6 +130,7 @@ For every type in scope, check whether each component's `<outputPath>/<Component
|
|
|
89
130
|
Collect all existing components across all types and report them in one consolidated list:
|
|
90
131
|
|
|
91
132
|
> "The following N components already exist across [types]: [list grouped by type]. How should I proceed?
|
|
133
|
+
>
|
|
92
134
|
> - **Overwrite all** — replace all existing implementations
|
|
93
135
|
> - **Skip existing** — only generate components that don't exist yet
|
|
94
136
|
> - **Cancel** — stop without generating anything"
|
|
@@ -99,56 +141,271 @@ Wait for the user's answer before proceeding. If none exist, continue immediatel
|
|
|
99
141
|
|
|
100
142
|
## Step 4 — Generate field components (skip if field not in scope)
|
|
101
143
|
|
|
102
|
-
If `field` is in scope,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
144
|
+
If `field` is in scope, generate each of the 27 field components in order:
|
|
145
|
+
|
|
146
|
+
**For each field component:**
|
|
147
|
+
|
|
148
|
+
### 4.1 — Read the component-specific skill file (MANDATORY — do not skip)
|
|
149
|
+
|
|
150
|
+
Read the file `.github/skills/field-skills/<ComponentName>.md` using your file reading tool. This step is **required** for every component that has a skill file — do not rely solely on the general `field-components.md`.
|
|
151
|
+
|
|
152
|
+
After reading, extract and keep active:
|
|
153
|
+
|
|
154
|
+
- **Behavioral Contract** — state management, option loading, edge cases specific to this component
|
|
155
|
+
- **Design System Mapping** table — the recommended DS component for the chosen design system
|
|
156
|
+
- **UI control type** — use this to select the closest DS primitive if the chosen DS is not in the mapping table
|
|
157
|
+
|
|
158
|
+
If no skill file exists at that path, use the general behavioral skeleton from `field-components.md` loaded in Step 1.
|
|
159
|
+
|
|
160
|
+
⚠️ The general skill provides the skeleton. The component-specific skill provides the **exact event handling, option-loading logic, and edge cases**. Both are needed.
|
|
161
|
+
|
|
162
|
+
### 4.2 — Generate the component files
|
|
163
|
+
|
|
164
|
+
Create the directory `<base>/field/<ComponentName>/`.
|
|
165
|
+
|
|
166
|
+
Create `<ComponentName>.tsx` using this structure from `field-components.md` (loaded in Step 1):
|
|
167
|
+
|
|
168
|
+
1. Imports: React hooks + `handleEvent` from `../../helpers/event-utils` + `getComponentFromRegistry` from `@pega/sdk-react` + `PConnFieldProps` + DS input from Step 2
|
|
169
|
+
2. Interface extending `PConnFieldProps` with any extra props from the component skill file
|
|
170
|
+
3. Destructure: `getPConnect`, `label`, `required`, `disabled`, `value`, `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `hideLabel`, `placeholder`
|
|
171
|
+
4. Display mode guards: if `DISPLAY_ONLY` or `STACKED_LARGE_VAL` → return `FieldValueList`
|
|
172
|
+
5. Return → DS form input from Step 2, with `onBlur` calling `handleEvent(actions, 'changeNblur', propName, inputValue)`
|
|
173
|
+
|
|
174
|
+
Pass `data-test-id={testId}` on the underlying interactive element.
|
|
175
|
+
|
|
176
|
+
Create `index.tsx`:
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
export { default } from './<ComponentName>';
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### 4.3 — Register the component
|
|
183
|
+
|
|
184
|
+
Edit `src/components/component-map.ts`:
|
|
185
|
+
|
|
186
|
+
1. Add an import at the top in the **Fields** section
|
|
187
|
+
2. Add an entry in `getSampleComponentMap()` under the fields comment
|
|
188
|
+
|
|
189
|
+
### 4.4 — Batch checkpoint
|
|
190
|
+
|
|
191
|
+
After every **5 field components**, run:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
npm run build
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Fix any errors before continuing.
|
|
198
|
+
|
|
199
|
+
### 4.5 — Report progress
|
|
200
|
+
|
|
201
|
+
After each component: "`<ComponentName>` ✓ — using `<DS component name>`"
|
|
108
202
|
|
|
109
203
|
---
|
|
110
204
|
|
|
111
205
|
## Step 5 — Generate template components (skip if template not in scope)
|
|
112
206
|
|
|
113
|
-
If `template` is in scope,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
207
|
+
If `template` is in scope, generate each of the 32 template components in order:
|
|
208
|
+
|
|
209
|
+
**For each template component:**
|
|
210
|
+
|
|
211
|
+
### 5.1 — Read the component-specific skill file (MANDATORY — do not skip)
|
|
212
|
+
|
|
213
|
+
Read the file `.github/skills/template-skills/<ComponentName>.md` using your file reading tool. This step is **required** for every component — do not rely solely on the general `template-components.md`.
|
|
214
|
+
|
|
215
|
+
After reading, extract and keep active:
|
|
216
|
+
|
|
217
|
+
- **Template category** — Layout (uses DS grid from Step 2) | Form (PConnect bridge + CSS) | Page (region extraction + PConnect bridge)
|
|
218
|
+
- **Behavioral Contract** — sub-variants, region handling, slot rendering logic
|
|
219
|
+
- **Design System Mapping** table — the recommended DS layout primitive (for Layout templates only)
|
|
220
|
+
|
|
221
|
+
If no skill file exists at that path, use the general pattern from `template-components.md` loaded in Step 1.
|
|
222
|
+
|
|
223
|
+
⚠️ The general skill provides the pattern skeletons. The component-specific skill provides the **exact region structure, sub-variant keys, and rendering logic**. Both are needed.
|
|
224
|
+
|
|
225
|
+
### 5.2 — Generate the component files
|
|
226
|
+
|
|
227
|
+
Create the directory `<base>/template/<ComponentName>/`.
|
|
228
|
+
|
|
229
|
+
Create `<ComponentName>.tsx` using the structure matching the template category from `template-components.md` (loaded in Step 1):
|
|
230
|
+
|
|
231
|
+
- **Layout**: `PropsWithChildren` + `templateCol` parsing (split on whitespace, strip units, compute ratios) + DS grid/flex from Step 2 rendering children in computed column ratios. On mobile: columns must stack to full width.
|
|
232
|
+
- **Form**: `createElement(createPConnectComponent(), ...)` for each child from `getPConnect().getChildren()[0].getPConnect().getChildren()`. No DS primitives.
|
|
233
|
+
- **Page**: `createElement(createPConnectComponent(), ...)` for each region from `getPConnect().getChildren()`. No DS primitives.
|
|
234
|
+
|
|
235
|
+
Apply the Behavioral Contract from the component skill file.
|
|
236
|
+
|
|
237
|
+
Create `index.tsx` if required by the skill file:
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
export { default } from './<ComponentName>';
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Create any CSS file required by the skill file.
|
|
244
|
+
|
|
245
|
+
### 5.3 — Register the component
|
|
246
|
+
|
|
247
|
+
Edit `src/components/component-map.ts`:
|
|
248
|
+
|
|
249
|
+
1. Add an import at the top in the **Templates** section
|
|
250
|
+
2. Add an entry in `getSampleComponentMap()` under the templates comment
|
|
251
|
+
3. For sub-variants (e.g., TwoColumnPage, TwoColumnTab), register each key separately
|
|
252
|
+
|
|
253
|
+
### 5.4 — Batch checkpoint
|
|
254
|
+
|
|
255
|
+
After every **5 template components**, run:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
npm run build
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Fix any errors before continuing.
|
|
262
|
+
|
|
263
|
+
### 5.5 — Report progress
|
|
264
|
+
|
|
265
|
+
After each component: "`<ComponentName>` ✓ — `<Layout | Form | Page>` template"
|
|
119
266
|
|
|
120
267
|
---
|
|
121
268
|
|
|
122
269
|
## Step 6 — Generate widget components (skip if widget not in scope)
|
|
123
270
|
|
|
124
|
-
If `widget` is in scope,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
-
|
|
271
|
+
If `widget` is in scope, generate each of the 9 widget components in order:
|
|
272
|
+
|
|
273
|
+
**For each widget component:**
|
|
274
|
+
|
|
275
|
+
### 6.1 — Read the component-specific skill file (MANDATORY — do not skip)
|
|
276
|
+
|
|
277
|
+
Read the file `.github/skills/widget-skills/<ComponentName>.md` using your file reading tool. This step is **required** for every component that has a skill file — do not rely solely on the general `widget-components.md`.
|
|
278
|
+
|
|
279
|
+
After reading, extract and keep active:
|
|
280
|
+
|
|
281
|
+
- **Behavioral Contract** — the exact PCore API calls, state variables, event handlers, and edge cases specific to this widget
|
|
282
|
+
- **Design System Mapping** table — the recommended DS primitive for this component's presentation layer
|
|
283
|
+
- **Props interface** — any required/optional props beyond the base `PConnProps`
|
|
284
|
+
|
|
285
|
+
If no skill file exists at that path (e.g., `SummaryList`), use the general data-fetching pattern from `widget-components.md` loaded in Step 1.
|
|
286
|
+
|
|
287
|
+
⚠️ The general skill provides the skeleton. The component-specific skill provides the **exact data flow and behavioral logic**. Both are needed — generating from only the general skill will produce components that render but don't fetch or display data correctly.
|
|
288
|
+
|
|
289
|
+
### 6.2 — Generate the component files
|
|
290
|
+
|
|
291
|
+
Create the directory `<base>/widget/<ComponentName>/`.
|
|
292
|
+
|
|
293
|
+
Create `<ComponentName>.tsx` using this structure from `widget-components.md` (loaded in Step 1):
|
|
294
|
+
|
|
295
|
+
1. Imports (React hooks + DS components from Step 2 + `PConnProps` from `@pega/sdk-react`)
|
|
296
|
+
2. Interface extending PConnProps with props from the component skill file's Props table
|
|
297
|
+
3. Component function: destructure `getPConnect`, call `getPConnect()` to get `pConn`
|
|
298
|
+
4. `useEffect` → data fetch using the exact PCore API call from the skill file's Behavioral Contract
|
|
299
|
+
5. Return → DS Card/List/Table primitive from Step 2 API map, rendering the fetched data
|
|
300
|
+
|
|
301
|
+
Fill in the `// [DS RENDER]` section with DS primitives confirmed in Step 2. The data-fetching logic comes from the skill file's Behavioral Contract — do NOT invent API calls.
|
|
302
|
+
|
|
303
|
+
Create `index.tsx`:
|
|
304
|
+
|
|
305
|
+
```typescript
|
|
306
|
+
export { default } from './<ComponentName>';
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Create any CSS or utility files required by the skill file.
|
|
310
|
+
|
|
311
|
+
### 6.3 — Register the component
|
|
312
|
+
|
|
313
|
+
Edit `src/components/component-map.ts`:
|
|
314
|
+
|
|
315
|
+
1. Add an import at the top in the **Widgets** section
|
|
316
|
+
2. Add an entry in `getSampleComponentMap()` under the widgets comment
|
|
317
|
+
|
|
318
|
+
### 6.4 — Batch checkpoint
|
|
319
|
+
|
|
320
|
+
After every **5 widget components**, run:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
npm run build
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Fix any errors before continuing.
|
|
327
|
+
|
|
328
|
+
### 6.5 — Report progress
|
|
329
|
+
|
|
330
|
+
After each component: "`<ComponentName>` ✓ — using `<DS card/list primitive>`"
|
|
131
331
|
|
|
132
332
|
---
|
|
133
333
|
|
|
134
334
|
## Step 7 — Generate design system extension components (skip if DSE not in scope)
|
|
135
335
|
|
|
136
|
-
If `designSystemExtension` is in scope,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
-
|
|
336
|
+
If `designSystemExtension` is in scope, generate each of the 11 DSE components in order:
|
|
337
|
+
|
|
338
|
+
**For each DSE component:**
|
|
339
|
+
|
|
340
|
+
### 7.1 — Read the component-specific skill file (MANDATORY — do not skip)
|
|
341
|
+
|
|
342
|
+
Read the file `.github/skills/design-system-extension-skills/<ComponentName>.md` using your file reading tool. This step is **required** for every component that has a skill file — do not rely solely on the general `design-system-extension.md`.
|
|
343
|
+
|
|
344
|
+
After reading, extract and keep active:
|
|
345
|
+
|
|
346
|
+
- **Pattern classification** — B (Pure display) / A (PConnect display) / C (Complex display)
|
|
347
|
+
- **Behavioral Contract** — prop handling, variant mapping, rendering logic, edge cases
|
|
348
|
+
- **Design System Mapping** table — the recommended DS primitive (Pattern B components only)
|
|
349
|
+
|
|
350
|
+
If no skill file exists at that path, use the general pattern from `design-system-extension.md` loaded in Step 1.
|
|
351
|
+
|
|
352
|
+
⚠️ The general skill provides the pattern skeletons. The component-specific skill provides the **exact prop interface, variant logic, and edge cases**. Both are needed.
|
|
353
|
+
|
|
354
|
+
### 7.2 — Generate the component files
|
|
355
|
+
|
|
356
|
+
Create the directory `<base>/designSystemExtension/<ComponentName>/`.
|
|
357
|
+
|
|
358
|
+
Create `<ComponentName>.tsx` using the structure matching the pattern from `design-system-extension.md` (loaded in Step 1):
|
|
359
|
+
|
|
360
|
+
- **Pattern B** (Pure display — AlertBanner, Banner, Operator, WssQuickCreate): variant mapping (urgent→error, warning→warning, info→info, success→success) + DS Alert/Card/Avatar primitive from Step 2. No `getPConnect`.
|
|
361
|
+
- **Pattern A** (PConnect display — CaseSummaryFields, DetailsFields, FieldValueList): CSS classes + optional DS typography, no DS component primitives. May use `getPConnect`.
|
|
362
|
+
- **Pattern C** (Complex display — FieldGroup, FieldGroupList, Pulse, RichTextEditor): `createElement(createPConnectComponent(), ...)` for PConnect children, semantic HTML. No DS primitives.
|
|
363
|
+
|
|
364
|
+
Apply the Behavioral Contract from the component skill file.
|
|
365
|
+
|
|
366
|
+
Create `index.tsx` if required by the skill file:
|
|
367
|
+
|
|
368
|
+
```typescript
|
|
369
|
+
export { default } from './<ComponentName>';
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
Create any CSS file required by the skill file.
|
|
373
|
+
|
|
374
|
+
### 7.3 — Register the component
|
|
375
|
+
|
|
376
|
+
Edit `src/components/component-map.ts`:
|
|
377
|
+
|
|
378
|
+
1. Add an import at the top in the **Design System Extension** section
|
|
379
|
+
2. Add an entry in `getSampleComponentMap()` under the DSE comment
|
|
380
|
+
|
|
381
|
+
### 7.4 — Batch checkpoint
|
|
382
|
+
|
|
383
|
+
After every **5 DSE components**, run:
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
npm run build
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
Fix any errors before continuing.
|
|
390
|
+
|
|
391
|
+
### 7.5 — Report progress
|
|
392
|
+
|
|
393
|
+
After each component: "`<ComponentName>` ✓ — Pattern `<B/A/C>`"
|
|
143
394
|
|
|
144
395
|
---
|
|
145
396
|
|
|
146
397
|
## Step 8 — Verify the build
|
|
147
398
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
399
|
+
Run:
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
npm run build
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
Fix any TypeScript or build errors before reporting completion.
|
|
406
|
+
|
|
407
|
+
Report a final summary:
|
|
408
|
+
|
|
409
|
+
- Total components generated, grouped by type
|
|
410
|
+
- All entries added to `component-map.ts`
|
|
411
|
+
- Any components skipped (if "skip existing" was chosen in Step 3)
|