@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
package/templates/react-sdk-reference/.github/prompts/generate-template-components.prompt.md
CHANGED
|
@@ -11,9 +11,12 @@ Read the user's message carefully. Extract:
|
|
|
11
11
|
- **Output base path** — the folder where template components should be generated (e.g. `src/components/template/`)
|
|
12
12
|
- **Component list** — which templates to generate (default: all 32 listed below)
|
|
13
13
|
|
|
14
|
-
Both **design system** and **output base path** are required. If either is missing or ambiguous,
|
|
14
|
+
Both **design system** and **output base path** 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 output path, 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. Where should the template components be generated? (e.g. `src/components/template/`)
|
|
19
22
|
|
|
@@ -25,40 +28,40 @@ Once both are known, continue to Step 1.
|
|
|
25
28
|
|
|
26
29
|
### Full component list (default — 32 templates)
|
|
27
30
|
|
|
28
|
-
| Component
|
|
29
|
-
|
|
30
|
-
| AdvancedSearch
|
|
31
|
-
| AppShell
|
|
32
|
-
| BannerPage
|
|
33
|
-
| CaseSummary
|
|
34
|
-
| CaseView
|
|
35
|
-
| CaseViewActionsMenu
|
|
36
|
-
| Confirmation
|
|
37
|
-
| DataReference
|
|
38
|
-
| DefaultForm
|
|
39
|
-
| DefaultPage
|
|
40
|
-
| Details
|
|
41
|
-
| DetailsSubTabs
|
|
42
|
-
| DetailsThreeColumn
|
|
43
|
-
| DetailsTwoColumn
|
|
44
|
-
| DynamicTabs
|
|
45
|
-
| FieldGroupTemplate
|
|
46
|
-
| HierarchicalForm
|
|
47
|
-
| InlineDashboard
|
|
48
|
-
| InlineDashboardPage
|
|
49
|
-
| ListPage
|
|
50
|
-
| ListView
|
|
51
|
-
| MultiReferenceReadOnly
|
|
52
|
-
| NarrowWide
|
|
53
|
-
| OneColumn
|
|
54
|
-
| PromotedFilters
|
|
55
|
-
| SelfServiceCaseView
|
|
56
|
-
| SimpleTable
|
|
57
|
-
| SingleReferenceReadOnly | Display
|
|
58
|
-
| SubTabs
|
|
59
|
-
| TwoColumn
|
|
60
|
-
| WideNarrow
|
|
61
|
-
| WssNavBar
|
|
31
|
+
| Component | Category |
|
|
32
|
+
| ----------------------- | ---------- |
|
|
33
|
+
| AdvancedSearch | Page |
|
|
34
|
+
| AppShell | Page |
|
|
35
|
+
| BannerPage | Page |
|
|
36
|
+
| CaseSummary | Page |
|
|
37
|
+
| CaseView | Page |
|
|
38
|
+
| CaseViewActionsMenu | Widget |
|
|
39
|
+
| Confirmation | Page |
|
|
40
|
+
| DataReference | Form |
|
|
41
|
+
| DefaultForm | Form |
|
|
42
|
+
| DefaultPage | Page |
|
|
43
|
+
| Details | Layout |
|
|
44
|
+
| DetailsSubTabs | Layout |
|
|
45
|
+
| DetailsThreeColumn | Layout |
|
|
46
|
+
| DetailsTwoColumn | Layout |
|
|
47
|
+
| DynamicTabs | Navigation |
|
|
48
|
+
| FieldGroupTemplate | Form |
|
|
49
|
+
| HierarchicalForm | Form |
|
|
50
|
+
| InlineDashboard | Page |
|
|
51
|
+
| InlineDashboardPage | Page |
|
|
52
|
+
| ListPage | Page |
|
|
53
|
+
| ListView | Page |
|
|
54
|
+
| MultiReferenceReadOnly | Display |
|
|
55
|
+
| NarrowWide | Layout |
|
|
56
|
+
| OneColumn | Layout |
|
|
57
|
+
| PromotedFilters | Widget |
|
|
58
|
+
| SelfServiceCaseView | Page |
|
|
59
|
+
| SimpleTable | Table |
|
|
60
|
+
| SingleReferenceReadOnly | Display |
|
|
61
|
+
| SubTabs | Navigation |
|
|
62
|
+
| TwoColumn | Layout |
|
|
63
|
+
| WideNarrow | Layout |
|
|
64
|
+
| WssNavBar | Navigation |
|
|
62
65
|
|
|
63
66
|
---
|
|
64
67
|
|
|
@@ -67,6 +70,7 @@ Once both are known, continue to Step 1.
|
|
|
67
70
|
Read the full contents of `.github/skills/template-components.md`.
|
|
68
71
|
|
|
69
72
|
This gives you:
|
|
73
|
+
|
|
70
74
|
- **Layout template pattern** — DS-agnostic grid skeleton with `// [DS GRID]` placeholder; `templateCol` parsing logic; responsive behavior rules
|
|
71
75
|
- **Design System Adaptation section** — how to map the chosen DS's grid/flex primitive to the computed column ratios
|
|
72
76
|
- **Form template pattern** — PConnect bridge via `createElement(createPConnectComponent(), ...)` and `connectToState`; no DS involved
|
|
@@ -79,19 +83,51 @@ Keep this context active throughout the entire generation session. Do not re-rea
|
|
|
79
83
|
|
|
80
84
|
## Step 2 — Install and discover the design system (once)
|
|
81
85
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
### 2a — Check and install the DS package
|
|
87
|
+
|
|
88
|
+
Run this command in your terminal:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
cat package.json | grep "<design-system-package>"
|
|
92
|
+
```
|
|
86
93
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
If the design system package is **not** listed in `dependencies` or `devDependencies`, install it:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm install <design-system-package>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Also install any peer dependencies documented in the package's README. Report what was installed.
|
|
101
|
+
|
|
102
|
+
### 2b — Discover the DS layout API from installed files
|
|
92
103
|
|
|
93
104
|
> You only need layout-related DS components. Form and page templates do not use the DS.
|
|
94
105
|
|
|
106
|
+
Run these commands to discover the actual API (do NOT rely on training knowledge):
|
|
107
|
+
|
|
108
|
+
1. Read the README for correct import paths and usage patterns:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
cat node_modules/<designSystem>/README.md
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
2. List every exported component — focus on layout primitives (Grid, Columns, Flex, SimpleGrid, Row, Col):
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
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"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
3. For every grid/layout component you plan to use, read its prop interface:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
find node_modules/<designSystem> -name "Grid.d.ts" -o -name "Col.d.ts" -o -name "Flex.d.ts" | head -5
|
|
124
|
+
grep -A 40 "interface.*Props" <path-from-above>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
4. Note **responsive breakpoint APIs** and **column sizing conventions** (e.g., 12-column grid, fractional units, span props).
|
|
128
|
+
|
|
129
|
+
Only use component names and prop names confirmed in these files.
|
|
130
|
+
|
|
95
131
|
Build a **DS layout API reference** from this discovery. Reuse it for every layout template — do not repeat these commands per component.
|
|
96
132
|
|
|
97
133
|
---
|
|
@@ -101,7 +137,9 @@ Build a **DS layout API reference** from this discovery. Reuse it for every layo
|
|
|
101
137
|
For each component in the list, check whether `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
|
|
102
138
|
|
|
103
139
|
If **any** exist, report them all at once and ask:
|
|
140
|
+
|
|
104
141
|
> "The following N components already exist: [list]. How should I proceed?
|
|
142
|
+
>
|
|
105
143
|
> - **Overwrite all** — replace all existing implementations
|
|
106
144
|
> - **Skip existing** — only generate components that don't exist yet
|
|
107
145
|
> - **Cancel** — stop without generating anything"
|
|
@@ -114,43 +152,78 @@ Wait for the user's answer before proceeding. If none exist, continue immediatel
|
|
|
114
152
|
|
|
115
153
|
For each component in the resolved list (in the order listed in Step 0):
|
|
116
154
|
|
|
117
|
-
### 4a — Read the component-specific skill file
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
-
|
|
155
|
+
### 4a — Read the component-specific skill file (MANDATORY — do not skip)
|
|
156
|
+
|
|
157
|
+
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`.
|
|
158
|
+
|
|
159
|
+
After reading, extract and keep active:
|
|
160
|
+
|
|
161
|
+
- **Template category** — Layout (uses DS grid from Step 2) | Form (PConnect bridge + CSS) | Page (region extraction + PConnect bridge)
|
|
162
|
+
- **Behavioral Contract** — sub-variants, region handling, slot rendering logic
|
|
163
|
+
- **Design System Mapping** table — the recommended DS layout primitive (for Layout templates only)
|
|
164
|
+
|
|
165
|
+
If no skill file exists at that path, use the general pattern from `template-components.md` loaded in Step 1.
|
|
166
|
+
|
|
167
|
+
⚠️ The general skill file (`template-components.md`) provides the pattern skeletons. The component-specific skill file provides the **exact region structure, sub-variant keys, and rendering logic**. Both are needed — generating from only the general skill will produce templates with wrong region counts or missing sub-variant registrations.
|
|
125
168
|
|
|
126
169
|
### 4b — Generate the component files
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
170
|
+
|
|
171
|
+
Create the directory `<outputPath>/<ComponentName>/`.
|
|
172
|
+
|
|
173
|
+
Create `<ComponentName>.tsx` using the structure matching the template category from `template-components.md` (loaded in Step 1):
|
|
174
|
+
|
|
175
|
+
- **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.
|
|
176
|
+
- **Form**: `createElement(createPConnectComponent(), ...)` for each child from `getPConnect().getChildren()[0].getPConnect().getChildren()`. No DS primitives.
|
|
177
|
+
- **Page**: `createElement(createPConnectComponent(), ...)` for each region from `getPConnect().getChildren()`. No DS primitives.
|
|
178
|
+
|
|
179
|
+
Apply the Behavioral Contract from the component skill file (sub-variants, region handling, slot logic).
|
|
180
|
+
|
|
181
|
+
Create `index.tsx` if required by the skill file:
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
export { default } from './<ComponentName>';
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Create any CSS file required by the skill file (e.g., `DefaultForm.css` with grid classes).
|
|
138
188
|
|
|
139
189
|
### 4c — Register the component
|
|
140
|
-
Execute **Step 6** from `.github/prompts/add-component.prompt.md` for this component:
|
|
141
|
-
- Add the import to `src/components/component-map.ts` in the Templates section
|
|
142
|
-
- Add the entry to `getSampleComponentMap()` under the templates comment
|
|
143
|
-
- For sub-variants (e.g., TwoColumnPage, TwoColumnTab), register each key separately pointing to its own file or a shared implementation as specified in the skill file
|
|
144
|
-
- Do not reorder or restructure any existing entries
|
|
145
190
|
|
|
146
|
-
|
|
191
|
+
Edit `src/components/component-map.ts`:
|
|
192
|
+
|
|
193
|
+
1. Add an import at the top of the file in the **Templates** section:
|
|
194
|
+
```typescript
|
|
195
|
+
import <ComponentName> from './template/<ComponentName>';
|
|
196
|
+
```
|
|
197
|
+
2. Add an entry in the return object of `getSampleComponentMap()` under the templates comment:
|
|
198
|
+
```typescript
|
|
199
|
+
<ComponentName>,
|
|
200
|
+
```
|
|
201
|
+
3. For sub-variants (e.g., TwoColumnPage, TwoColumnTab), register each key separately pointing to its own file or a shared implementation as specified in the skill file.
|
|
202
|
+
|
|
203
|
+
Do not reorder or restructure any existing entries.
|
|
204
|
+
|
|
205
|
+
### 4d — Batch checkpoint
|
|
206
|
+
|
|
207
|
+
After every **5 components**, run:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
npm run build
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Fix any TypeScript or build errors before continuing to the next component. This prevents error accumulation.
|
|
214
|
+
|
|
215
|
+
### 4e — Report progress
|
|
216
|
+
|
|
147
217
|
After each component: "`<ComponentName>` ✓ — `<Layout | Form | Page>` template`<, using <DS component name> for grid>` if layout"
|
|
148
218
|
|
|
149
219
|
---
|
|
150
220
|
|
|
151
221
|
## Step 5 — Verify the build
|
|
152
222
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
223
|
+
Run:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
npm run build
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
If build errors occur, fix them before reporting completion. Report a summary: list of all files created and all entries added to `component-map.ts`.
|
|
@@ -11,9 +11,12 @@ Read the user's message carefully. Extract:
|
|
|
11
11
|
- **Output base path** — the folder where widget components should be generated (e.g. `src/components/widget/`)
|
|
12
12
|
- **Component list** — which widgets to generate (default: all 9 listed below)
|
|
13
13
|
|
|
14
|
-
Both **design system** and **output base path** are required. If either is missing or ambiguous,
|
|
14
|
+
Both **design system** and **output base path** 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 output path, 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. Where should the widget components be generated? (e.g. `src/components/widget/`)
|
|
19
22
|
|
|
@@ -23,17 +26,17 @@ Once both are known, continue to Step 1.
|
|
|
23
26
|
|
|
24
27
|
### Full component list (default — 9 widgets)
|
|
25
28
|
|
|
26
|
-
| Component
|
|
27
|
-
|
|
28
|
-
| AppAnnouncement | System-wide announcements
|
|
29
|
-
| Attachment
|
|
30
|
-
| CaseHistory
|
|
31
|
-
| FileUtility
|
|
32
|
-
| Followers
|
|
33
|
-
| QuickCreate
|
|
34
|
-
| SummaryItem
|
|
35
|
-
| SummaryList
|
|
36
|
-
| ToDo
|
|
29
|
+
| Component | Description |
|
|
30
|
+
| --------------- | --------------------------- |
|
|
31
|
+
| AppAnnouncement | System-wide announcements |
|
|
32
|
+
| Attachment | File upload/download |
|
|
33
|
+
| CaseHistory | Case audit trail |
|
|
34
|
+
| FileUtility | File management utility |
|
|
35
|
+
| Followers | Case followers list |
|
|
36
|
+
| QuickCreate | Quick case creation buttons |
|
|
37
|
+
| SummaryItem | Single summary card |
|
|
38
|
+
| SummaryList | List of summary cards |
|
|
39
|
+
| ToDo | Assignment worklist |
|
|
37
40
|
|
|
38
41
|
---
|
|
39
42
|
|
|
@@ -42,6 +45,7 @@ Once both are known, continue to Step 1.
|
|
|
42
45
|
Read the full contents of `.github/skills/widget-components.md`.
|
|
43
46
|
|
|
44
47
|
This gives you:
|
|
48
|
+
|
|
45
49
|
- The DS-agnostic data-fetching skeleton with `// [DS RENDER]` placeholder
|
|
46
50
|
- The Design System Adaptation guide (primitive mapping table, icon discovery rules)
|
|
47
51
|
- All common Pega APIs used in widgets: `PCore.getDataPageUtils()`, `PCore.getMashupApi()`, `PCore.getAttachmentUtils()`, `pConn.getCaseInfo()`, etc.
|
|
@@ -55,17 +59,52 @@ Keep this context active throughout the entire generation session. Do not re-rea
|
|
|
55
59
|
|
|
56
60
|
## Step 2 — Install and discover the design system (once)
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
### 2a — Check and install the DS package
|
|
63
|
+
|
|
64
|
+
Run this command in your terminal:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
cat package.json | grep "<design-system-package>"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If the design system package is **not** listed in `dependencies` or `devDependencies`, install it:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install <design-system-package>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Also install any peer dependencies documented in the package's README. Report what was installed.
|
|
77
|
+
|
|
78
|
+
### 2b — Discover the DS API from installed files
|
|
79
|
+
|
|
80
|
+
Run these commands to discover the actual API (do NOT rely on training knowledge):
|
|
81
|
+
|
|
82
|
+
1. Read the README for correct import paths and usage patterns:
|
|
62
83
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
84
|
+
```bash
|
|
85
|
+
cat node_modules/<designSystem>/README.md
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
2. List every exported component:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
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"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
3. For every component you plan to use (Card, List, Table, Button, Badge, Spinner), read its prop interface:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
find node_modules/<designSystem> -name "ComponentName.d.ts" | head -3
|
|
98
|
+
grep -A 40 "interface.*Props" <path-from-above>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
4. Check for a **companion icon package** — if it exists, read its exports before using any icon name. Never guess icon names.
|
|
102
|
+
|
|
103
|
+
5. Check for **size/variant conventions** — use built-in props rather than custom padding.
|
|
104
|
+
|
|
105
|
+
6. Check for **CSS tokens** — use design system CSS custom properties for spacing; never hardcode `px` values.
|
|
106
|
+
|
|
107
|
+
Only use component names and prop names confirmed in these files.
|
|
69
108
|
|
|
70
109
|
Build a **DS UI primitive reference map** from this discovery. Reuse it for every widget — do not repeat these commands per component.
|
|
71
110
|
|
|
@@ -76,7 +115,9 @@ Build a **DS UI primitive reference map** from this discovery. Reuse it for ever
|
|
|
76
115
|
For each component in the list, check whether `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
|
|
77
116
|
|
|
78
117
|
If **any** exist, report them all at once and ask:
|
|
118
|
+
|
|
79
119
|
> "The following N components already exist: [list]. How should I proceed?
|
|
120
|
+
>
|
|
80
121
|
> - **Overwrite all** — replace all existing implementations
|
|
81
122
|
> - **Skip existing** — only generate components that don't exist yet
|
|
82
123
|
> - **Cancel** — stop without generating anything"
|
|
@@ -89,41 +130,79 @@ Wait for the user's answer before proceeding. If none exist, continue immediatel
|
|
|
89
130
|
|
|
90
131
|
For each component in the resolved list (in the order listed in Step 0):
|
|
91
132
|
|
|
92
|
-
### 4a — Read the component-specific skill file
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
133
|
+
### 4a — Read the component-specific skill file (MANDATORY — do not skip)
|
|
134
|
+
|
|
135
|
+
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`.
|
|
136
|
+
|
|
137
|
+
After reading, extract and keep active:
|
|
138
|
+
|
|
139
|
+
- **Behavioral Contract** — the exact PCore API calls, state variables, event handlers, and edge cases specific to this widget
|
|
140
|
+
- **Design System Mapping** table — the recommended DS primitive for this component's presentation layer
|
|
141
|
+
- **Props interface** — any required/optional props beyond the base `PConnProps`
|
|
142
|
+
|
|
143
|
+
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.
|
|
144
|
+
|
|
145
|
+
⚠️ The general skill file (`widget-components.md`) provides the skeleton. The component-specific skill file 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.
|
|
99
146
|
|
|
100
147
|
### 4b — Generate the component files
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
148
|
+
|
|
149
|
+
Create the directory `<outputPath>/<ComponentName>/`.
|
|
150
|
+
|
|
151
|
+
Create `<ComponentName>.tsx` using this structure from `widget-components.md` (loaded in Step 1):
|
|
152
|
+
|
|
153
|
+
1. Imports (React hooks + DS components from Step 2 + `PConnProps` from `@pega/sdk-react`)
|
|
154
|
+
2. Interface extending PConnProps with props from the component skill file's Props table
|
|
155
|
+
3. Component function: destructure `getPConnect`, call `getPConnect()` to get `pConn`
|
|
156
|
+
4. `useEffect` → data fetch using the exact PCore API call from the skill file's Behavioral Contract
|
|
157
|
+
5. Return → DS Card/List/Table primitive from Step 2 API map, rendering the fetched data
|
|
158
|
+
|
|
159
|
+
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.
|
|
160
|
+
|
|
161
|
+
Create `index.tsx`:
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
export { default } from './<ComponentName>';
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Create any CSS or utility files required by the skill file.
|
|
112
168
|
|
|
113
169
|
### 4c — Register the component
|
|
114
|
-
Execute **Step 6** from `.github/prompts/add-component.prompt.md` for this component:
|
|
115
|
-
- Add the import to `src/components/component-map.ts` in the Widgets section
|
|
116
|
-
- Add the entry to `getSampleComponentMap()` under the widgets comment
|
|
117
|
-
- Do not reorder or restructure any existing entries
|
|
118
170
|
|
|
119
|
-
|
|
171
|
+
Edit `src/components/component-map.ts`:
|
|
172
|
+
|
|
173
|
+
1. Add an import at the top of the file in the **Widgets** section:
|
|
174
|
+
```typescript
|
|
175
|
+
import <ComponentName> from './widget/<ComponentName>';
|
|
176
|
+
```
|
|
177
|
+
2. Add an entry in the return object of `getSampleComponentMap()` under the widgets comment:
|
|
178
|
+
```typescript
|
|
179
|
+
<ComponentName>,
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Do not reorder or restructure any existing entries.
|
|
183
|
+
|
|
184
|
+
### 4d — Batch checkpoint
|
|
185
|
+
|
|
186
|
+
After every **5 components**, run:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
npm run build
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Fix any TypeScript or build errors before continuing to the next component. This prevents error accumulation.
|
|
193
|
+
|
|
194
|
+
### 4e — Report progress
|
|
195
|
+
|
|
120
196
|
After each component: "`<ComponentName>` ✓ — using `<DS card/list primitive>`"
|
|
121
197
|
|
|
122
198
|
---
|
|
123
199
|
|
|
124
200
|
## Step 5 — Verify the build
|
|
125
201
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
202
|
+
Run:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
npm run build
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
If build errors occur, fix them before reporting completion. Report a summary: list of all files created and all entries added to `component-map.ts`.
|