@pega/sdk 0.0.1
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 +201 -0
- package/README.md +111 -0
- package/SECURITY.md +10 -0
- package/dist/index.js +753 -0
- package/package.json +41 -0
- package/templates/angular-sdk-reference/.github/AGENTS.md +23 -0
- package/templates/angular-sdk-reference/.github/copilot-instructions.md +40 -0
- package/templates/angular-sdk-reference/.github/skills/pega-sdk-component.md +48 -0
- package/templates/angular-sdk-reference/angular.json +34 -0
- package/templates/angular-sdk-reference/package.json +31 -0
- package/templates/angular-sdk-reference/sdk-config.json +26 -0
- package/templates/angular-sdk-reference/src/app/app.component.ts +54 -0
- package/templates/angular-sdk-reference/src/index.html +12 -0
- package/templates/angular-sdk-reference/src/main.ts +4 -0
- package/templates/angular-sdk-reference/src/styles.css +19 -0
- package/templates/angular-sdk-reference/tsconfig.json +32 -0
- package/templates/react-native-sdk-reference/.github/AGENTS.md +23 -0
- package/templates/react-native-sdk-reference/.github/copilot-instructions.md +40 -0
- package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +48 -0
- package/templates/react-native-sdk-reference/App.tsx +51 -0
- package/templates/react-native-sdk-reference/app.json +11 -0
- package/templates/react-native-sdk-reference/package.json +22 -0
- package/templates/react-native-sdk-reference/sdk-config.json +14 -0
- package/templates/react-native-sdk-reference/tsconfig.json +12 -0
- package/templates/react-sdk-reference/.github/copilot-instructions.md +185 -0
- package/templates/react-sdk-reference/.github/instructions/component-map.instructions.md +40 -0
- package/templates/react-sdk-reference/.github/instructions/dse-component.instructions.md +77 -0
- package/templates/react-sdk-reference/.github/instructions/field-component.instructions.md +73 -0
- package/templates/react-sdk-reference/.github/instructions/template-component.instructions.md +94 -0
- package/templates/react-sdk-reference/.github/instructions/widget-component.instructions.md +89 -0
- package/templates/react-sdk-reference/.github/prompts/add-component.prompt.md +21 -0
- package/templates/react-sdk-reference/.github/prompts/component-manifest.json +111 -0
- package/templates/react-sdk-reference/.github/prompts/identify-components.prompt.md +110 -0
- package/templates/react-sdk-reference/.github/prompts/replace-all-fields.prompt.md +48 -0
- package/templates/react-sdk-reference/.github/prompts/replace-component.prompt.md +81 -0
- package/templates/react-sdk-reference/.github/prompts/replace-design-system.prompt.md +524 -0
- package/templates/react-sdk-reference/.github/prompts/replace-field.prompt.md +41 -0
- package/templates/react-sdk-reference/.github/prompts/swap-design-system.prompt.md +49 -0
- package/templates/react-sdk-reference/.github/skills/component-contracts.md +140 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/AlertBanner.md +135 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Banner.md +149 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/CaseSummaryFields.md +154 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/DetailsFields.md +144 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroup.md +131 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroupList.md +111 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldValueList.md +115 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Operator.md +149 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Pulse.md +83 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/RichTextEditor.md +206 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/WssQuickCreate.md +135 -0
- package/templates/react-sdk-reference/.github/skills/design-system-extension.md +249 -0
- package/templates/react-sdk-reference/.github/skills/field-components.md +262 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/AutoComplete.md +112 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/CancelAlert.md +203 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Checkbox.md +158 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Currency.md +106 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Date.md +99 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/DateTime.md +103 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Decimal.md +98 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Dropdown.md +114 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Email.md +107 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Group.md +90 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Integer.md +87 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Location.md +136 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Multiselect.md +164 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/ObjectReference.md +164 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Percentage.md +92 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Phone.md +110 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/RadioButtons.md +146 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/RichText.md +138 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/ScalarList.md +124 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/SelectableCard.md +216 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/SemanticLink.md +148 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/TextArea.md +96 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/TextContent.md +101 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/TextInput.md +104 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/Time.md +88 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/URL.md +85 -0
- package/templates/react-sdk-reference/.github/skills/field-skills/UserReference.md +180 -0
- package/templates/react-sdk-reference/.github/skills/run-and-verify.md +68 -0
- package/templates/react-sdk-reference/.github/skills/swap-design-system.md +105 -0
- package/templates/react-sdk-reference/.github/skills/template-components.md +285 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/AdvancedSearch.md +144 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/AppShell.md +122 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/BannerPage.md +83 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseSummary.md +100 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseView.md +131 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/CaseViewActionsMenu.md +126 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/Confirmation.md +107 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DataReference.md +120 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultForm.md +102 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DefaultPage.md +110 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/Details.md +88 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsSubTabs.md +95 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsThreeColumn.md +78 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DetailsTwoColumn.md +78 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/DynamicTabs.md +101 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/FieldGroupTemplate.md +109 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/HierarchicalForm.md +113 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboard.md +104 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboardPage.md +85 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/ListPage.md +68 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/ListView.md +139 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/MultiReferenceReadOnly.md +80 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/NarrowWide.md +141 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/OneColumn.md +109 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/PromotedFilters.md +124 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/SelfServiceCaseView.md +135 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/SimpleTable.md +127 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/SingleReferenceReadOnly.md +103 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/SubTabs.md +79 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/TwoColumn.md +131 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/WideNarrow.md +150 -0
- package/templates/react-sdk-reference/.github/skills/template-skills/WssNavBar.md +135 -0
- package/templates/react-sdk-reference/.github/skills/widget-components.md +234 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/AppAnnouncement.md +82 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/Attachment.md +146 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/CaseHistory.md +107 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/FileUtility.md +200 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/Followers.md +99 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/QuickCreate.md +114 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/SummaryItem.md +167 -0
- package/templates/react-sdk-reference/.github/skills/widget-skills/ToDo.md +190 -0
- package/templates/react-sdk-reference/AGENTS.md +59 -0
- package/templates/react-sdk-reference/assets/icons/analytics-good-solid.svg +3 -0
- package/templates/react-sdk-reference/assets/icons/cart-solid.svg +3 -0
- package/templates/react-sdk-reference/assets/icons/headset.svg +3 -0
- package/templates/react-sdk-reference/assets/icons/mobile-phone-solid.svg +3 -0
- package/templates/react-sdk-reference/assets/icons/money-solid.svg +3 -0
- package/templates/react-sdk-reference/assets/icons/multi-device-solid.svg +3 -0
- package/templates/react-sdk-reference/index.html +36 -0
- package/templates/react-sdk-reference/package.json +52 -0
- package/templates/react-sdk-reference/sdk-config.json +26 -0
- package/templates/react-sdk-reference/src/AppSelector.tsx +18 -0
- package/templates/react-sdk-reference/src/FallbackComponent.tsx +40 -0
- package/templates/react-sdk-reference/src/MashupApp.styles.ts +105 -0
- package/templates/react-sdk-reference/src/MashupApp.tsx +254 -0
- package/templates/react-sdk-reference/src/PortalApp.tsx +175 -0
- package/templates/react-sdk-reference/src/components/component-map.ts +255 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/AlertBanner/AlertBanner.css +46 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/AlertBanner/AlertBanner.tsx +91 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/AlertBanner/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Banner/Banner.css +39 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Banner/Banner.tsx +53 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Banner/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +16 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +270 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/CaseSummaryFields/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/DetailsFields/DetailsFields.tsx +164 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/DetailsFields/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/FieldGroup.tsx +79 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx +58 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/FieldValueList.tsx +84 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Operator/Operator.tsx +220 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Operator/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Pulse/Pulse.tsx +33 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Pulse/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx +201 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/RichTextEditor/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +33 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +48 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/WssQuickCreate/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +218 -0
- package/templates/react-sdk-reference/src/components/field/AutoComplete/config-ext.json +10 -0
- package/templates/react-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.css +24 -0
- package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.tsx +148 -0
- package/templates/react-sdk-reference/src/components/field/CancelAlert/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +263 -0
- package/templates/react-sdk-reference/src/components/field/Checkbox/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Currency/Currency.tsx +111 -0
- package/templates/react-sdk-reference/src/components/field/Currency/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/field/Currency/currency-utils.ts +67 -0
- package/templates/react-sdk-reference/src/components/field/Currency/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Date/Date.tsx +94 -0
- package/templates/react-sdk-reference/src/components/field/Date/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/field/Date/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/DateTime/DateTime.tsx +101 -0
- package/templates/react-sdk-reference/src/components/field/DateTime/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/DateTime/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Decimal/Decimal.tsx +122 -0
- package/templates/react-sdk-reference/src/components/field/Decimal/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Decimal/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +238 -0
- package/templates/react-sdk-reference/src/components/field/Dropdown/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Email/Email.tsx +96 -0
- package/templates/react-sdk-reference/src/components/field/Email/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Email/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Group/Group.tsx +41 -0
- package/templates/react-sdk-reference/src/components/field/Group/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/Group/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Integer/Integer.tsx +100 -0
- package/templates/react-sdk-reference/src/components/field/Integer/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Integer/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Location/Location.css +4 -0
- package/templates/react-sdk-reference/src/components/field/Location/Location.tsx +258 -0
- package/templates/react-sdk-reference/src/components/field/Location/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Location/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Multiselect/Multiselect.tsx +238 -0
- package/templates/react-sdk-reference/src/components/field/Multiselect/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Multiselect/utils.ts +230 -0
- package/templates/react-sdk-reference/src/components/field/ObjectReference/ObjectReference.tsx +235 -0
- package/templates/react-sdk-reference/src/components/field/ObjectReference/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/ObjectReference/utils.ts +111 -0
- package/templates/react-sdk-reference/src/components/field/Percentage/Percentage.tsx +112 -0
- package/templates/react-sdk-reference/src/components/field/Percentage/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Percentage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Phone/Phone.tsx +113 -0
- package/templates/react-sdk-reference/src/components/field/Phone/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Phone/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +158 -0
- package/templates/react-sdk-reference/src/components/field/RadioButtons/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/RadioButtons/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/RichText/RichText.css +79 -0
- package/templates/react-sdk-reference/src/components/field/RichText/RichText.tsx +98 -0
- package/templates/react-sdk-reference/src/components/field/RichText/config-ext.json +10 -0
- package/templates/react-sdk-reference/src/components/field/RichText/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/ScalarList/ScalarList.tsx +63 -0
- package/templates/react-sdk-reference/src/components/field/ScalarList/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/ScalarList/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/SelectableCard/SelectableCard.tsx +189 -0
- package/templates/react-sdk-reference/src/components/field/SelectableCard/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/SelectableCard/utils.tsx +223 -0
- package/templates/react-sdk-reference/src/components/field/SemanticLink/SemanticLink.tsx +208 -0
- package/templates/react-sdk-reference/src/components/field/SemanticLink/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/SemanticLink/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/SemanticLink/utils.ts +49 -0
- package/templates/react-sdk-reference/src/components/field/TextArea/TextArea.tsx +94 -0
- package/templates/react-sdk-reference/src/components/field/TextArea/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/TextContent/TextContent.tsx +46 -0
- package/templates/react-sdk-reference/src/components/field/TextContent/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/TextContent/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/TextInput/TextInput.tsx +92 -0
- package/templates/react-sdk-reference/src/components/field/TextInput/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Time/Time.tsx +79 -0
- package/templates/react-sdk-reference/src/components/field/Time/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/Time/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/URL/URL.tsx +89 -0
- package/templates/react-sdk-reference/src/components/field/URL/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/field/URL/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReference.tsx +198 -0
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReferenceUtils.ts +13 -0
- package/templates/react-sdk-reference/src/components/field/UserReference/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/UserReference/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/helpers/attachmentShared.ts +6 -0
- package/templates/react-sdk-reference/src/components/helpers/case-utils.tsx +99 -0
- package/templates/react-sdk-reference/src/components/helpers/common-utils.ts +26 -0
- package/templates/react-sdk-reference/src/components/helpers/data_page.ts +20 -0
- package/templates/react-sdk-reference/src/components/helpers/date-format-utils.ts +76 -0
- package/templates/react-sdk-reference/src/components/helpers/event-utils.ts +20 -0
- package/templates/react-sdk-reference/src/components/helpers/field-group-utils.ts +63 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/Boolean.ts +21 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/Currency.ts +77 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/CurrencyMap.ts +913 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/Date.ts +71 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/common.ts +14 -0
- package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +130 -0
- package/templates/react-sdk-reference/src/components/helpers/instructions-utils.ts +38 -0
- package/templates/react-sdk-reference/src/components/helpers/object-utils.ts +10 -0
- package/templates/react-sdk-reference/src/components/helpers/reactContextHelpers.ts +3 -0
- package/templates/react-sdk-reference/src/components/helpers/simpleTableHelpers.ts +452 -0
- package/templates/react-sdk-reference/src/components/helpers/state-utils.tsx +43 -0
- package/templates/react-sdk-reference/src/components/helpers/template-utils.ts +76 -0
- package/templates/react-sdk-reference/src/components/helpers/utils.ts +349 -0
- package/templates/react-sdk-reference/src/components/helpers/versionHelpers.ts +14 -0
- package/templates/react-sdk-reference/src/components/index.ts +8 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/AdvancedSearch.tsx +86 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroup/persistUtils.ts +52 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +329 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/TemplateContext.ts +11 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/AppShell/AppShell.css +35 -0
- package/templates/react-sdk-reference/src/components/template/AppShell/AppShell.tsx +259 -0
- package/templates/react-sdk-reference/src/components/template/AppShell/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/BannerPage/BannerPage.tsx +54 -0
- package/templates/react-sdk-reference/src/components/template/BannerPage/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/template/BannerPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/CaseSummary/CaseSummary.tsx +79 -0
- package/templates/react-sdk-reference/src/components/template/CaseSummary/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/CaseSummary/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/CaseView/CaseView.tsx +261 -0
- package/templates/react-sdk-reference/src/components/template/CaseView/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/CaseView/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +117 -0
- package/templates/react-sdk-reference/src/components/template/CaseViewActionsMenu/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Confirmation/Confirmation.tsx +102 -0
- package/templates/react-sdk-reference/src/components/template/Confirmation/config-ext.json +11 -0
- package/templates/react-sdk-reference/src/components/template/Confirmation/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/DataReference.tsx +590 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/DataReferenceAdvancedSearchContext.ts +10 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/SearchForm.tsx +213 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/DataReference/utils.ts +90 -0
- package/templates/react-sdk-reference/src/components/template/DefaultForm/DefaultForm.css +34 -0
- package/templates/react-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +74 -0
- package/templates/react-sdk-reference/src/components/template/DefaultForm/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/DefaultForm/utils/index.ts +26 -0
- package/templates/react-sdk-reference/src/components/template/DefaultPage/DefaultPage.tsx +108 -0
- package/templates/react-sdk-reference/src/components/template/DefaultPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Details/Details/Details.tsx +74 -0
- package/templates/react-sdk-reference/src/components/template/Details/Details/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +58 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsSubTabs/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsSubTabs/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +79 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsThreeColumn/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsThreeColumn/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +79 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsTwoColumn/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/Details/DetailsTwoColumn/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/Details/DynamicTabs/DynamicTabs.tsx +79 -0
- package/templates/react-sdk-reference/src/components/template/Details/DynamicTabs/config.json +36 -0
- package/templates/react-sdk-reference/src/components/template/Details/DynamicTabs/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx +116 -0
- package/templates/react-sdk-reference/src/components/template/FieldGroupTemplate/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/HierarchicalForm.tsx +58 -0
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/hooks.ts +293 -0
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/InlineDashboard/InlineDashboard.tsx +72 -0
- package/templates/react-sdk-reference/src/components/template/InlineDashboard/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/InlineDashboardPage/InlineDashboardPage.tsx +39 -0
- package/templates/react-sdk-reference/src/components/template/InlineDashboardPage/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/template/InlineDashboardPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/ListPage/ListPage.tsx +16 -0
- package/templates/react-sdk-reference/src/components/template/ListPage/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/template/ListPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/ListView/DefaultViewMeta.ts +220 -0
- package/templates/react-sdk-reference/src/components/template/ListView/ListView.css +10 -0
- package/templates/react-sdk-reference/src/components/template/ListView/ListView.tsx +1391 -0
- package/templates/react-sdk-reference/src/components/template/ListView/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/ListView/hooks.ts +93 -0
- package/templates/react-sdk-reference/src/components/template/ListView/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/ListView/utils.ts +781 -0
- package/templates/react-sdk-reference/src/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +52 -0
- package/templates/react-sdk-reference/src/components/template/MultiReferenceReadOnly/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWide/NarrowWide.css +19 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWide/NarrowWide.tsx +37 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWide/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +85 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideDetails/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideDetails/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +19 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +22 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +28 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWidePage/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWidePage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/ObjectPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumn/OneColumn.tsx +32 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumn/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumn/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnPage/OneColumnPage.tsx +17 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnPage/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnTab/OneColumnTab.tsx +11 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnTab/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnTab/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/PromotedFilters/PromotedFilters.css +7 -0
- package/templates/react-sdk-reference/src/components/template/PromotedFilters/PromotedFilters.tsx +204 -0
- package/templates/react-sdk-reference/src/components/template/PromotedFilters/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SelfServiceCaseView/SelfServiceCaseView.tsx +153 -0
- package/templates/react-sdk-reference/src/components/template/SelfServiceCaseView/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTable/SimpleTable.tsx +126 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTable/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTable/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +985 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +122 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.tsx +207 -0
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelectReadonly/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +71 -0
- package/templates/react-sdk-reference/src/components/template/SingleReferenceReadOnly/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SubTabs/SubTabs.tsx +46 -0
- package/templates/react-sdk-reference/src/components/template/SubTabs/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/SubTabs/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/SubTabs/tabUtils.ts +185 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/TwoColumn.css +12 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/TwoColumn.tsx +54 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +17 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnPage/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.css +12 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +54 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrow/WideNarrow.css +19 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrow/WideNarrow.tsx +37 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrow/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +96 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowDetails/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowDetails/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +19 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +22 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +28 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowPage/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowPage/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/WssNavBar/WssNavBar.css +11 -0
- package/templates/react-sdk-reference/src/components/template/WssNavBar/WssNavBar.tsx +160 -0
- package/templates/react-sdk-reference/src/components/template/WssNavBar/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/utils.tsx +58 -0
- package/templates/react-sdk-reference/src/components/widget/AppAnnouncement/AppAnnouncement.tsx +60 -0
- package/templates/react-sdk-reference/src/components/widget/AppAnnouncement/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/widget/AppAnnouncement/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/Attachment/Attachment.css +95 -0
- package/templates/react-sdk-reference/src/components/widget/Attachment/Attachment.tsx +541 -0
- package/templates/react-sdk-reference/src/components/widget/Attachment/Attachment.types.ts +96 -0
- package/templates/react-sdk-reference/src/components/widget/Attachment/AttachmentUtils.ts +316 -0
- package/templates/react-sdk-reference/src/components/widget/Attachment/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/CaseHistory/CaseHistory.tsx +171 -0
- package/templates/react-sdk-reference/src/components/widget/CaseHistory/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/widget/CaseHistory/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +13 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +32 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/ActionButtonsForFileUtil/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/FileUtility.css +118 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/FileUtility.tsx +653 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/Followers/Followers.tsx +43 -0
- package/templates/react-sdk-reference/src/components/widget/Followers/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/widget/Followers/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/QuickCreate/QuickCreate.tsx +88 -0
- package/templates/react-sdk-reference/src/components/widget/QuickCreate/config-ext.json +9 -0
- package/templates/react-sdk-reference/src/components/widget/QuickCreate/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/SummaryItem/SummaryItem.css +76 -0
- package/templates/react-sdk-reference/src/components/widget/SummaryItem/SummaryItem.tsx +89 -0
- package/templates/react-sdk-reference/src/components/widget/SummaryItem/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/SummaryList/SummaryList.tsx +23 -0
- package/templates/react-sdk-reference/src/components/widget/SummaryList/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.css +81 -0
- package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.tsx +507 -0
- package/templates/react-sdk-reference/src/components/widget/ToDo/config-ext.json +8 -0
- package/templates/react-sdk-reference/src/components/widget/ToDo/index.tsx +1 -0
- package/templates/react-sdk-reference/src/main.tsx +13 -0
- package/templates/react-sdk-reference/src/mui-theme-augmentation.d.ts +6 -0
- package/templates/react-sdk-reference/tsconfig.json +24 -0
- package/templates/react-sdk-reference/vite.config.ts +65 -0
- package/templates/wc-sdk-reference/.github/AGENTS.md +23 -0
- package/templates/wc-sdk-reference/.github/copilot-instructions.md +40 -0
- package/templates/wc-sdk-reference/.github/skills/pega-sdk-component.md +48 -0
- package/templates/wc-sdk-reference/index.html +21 -0
- package/templates/wc-sdk-reference/package.json +19 -0
- package/templates/wc-sdk-reference/sdk-config.json +19 -0
- package/templates/wc-sdk-reference/src/index.ts +98 -0
- package/templates/wc-sdk-reference/tsconfig.json +21 -0
- package/templates/wc-sdk-reference/vite.config.ts +8 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
export const styles = {
|
|
4
|
+
fallback: {
|
|
5
|
+
container: {
|
|
6
|
+
border: '1px solid #ddd',
|
|
7
|
+
borderRadius: 4,
|
|
8
|
+
margin: 4,
|
|
9
|
+
padding: 8,
|
|
10
|
+
fontSize: 13,
|
|
11
|
+
fontFamily: 'system-ui, sans-serif',
|
|
12
|
+
} satisfies CSSProperties,
|
|
13
|
+
label: {
|
|
14
|
+
background: '#f0f4ff',
|
|
15
|
+
padding: '4px 8px',
|
|
16
|
+
borderRadius: 3,
|
|
17
|
+
fontSize: 12,
|
|
18
|
+
fontWeight: 600,
|
|
19
|
+
color: '#1a56db',
|
|
20
|
+
marginBottom: 4,
|
|
21
|
+
} satisfies CSSProperties,
|
|
22
|
+
props: {
|
|
23
|
+
fontSize: 11,
|
|
24
|
+
color: '#555',
|
|
25
|
+
margin: '4px 0',
|
|
26
|
+
maxHeight: 100,
|
|
27
|
+
overflow: 'auto',
|
|
28
|
+
background: '#fafafa',
|
|
29
|
+
padding: 4,
|
|
30
|
+
borderRadius: 3,
|
|
31
|
+
} satisfies CSSProperties,
|
|
32
|
+
children: {
|
|
33
|
+
paddingLeft: 12,
|
|
34
|
+
} satisfies CSSProperties,
|
|
35
|
+
},
|
|
36
|
+
root: {
|
|
37
|
+
padding: 16,
|
|
38
|
+
fontFamily: 'system-ui, sans-serif',
|
|
39
|
+
} satisfies CSSProperties,
|
|
40
|
+
app: {
|
|
41
|
+
container: {
|
|
42
|
+
fontFamily: 'system-ui, sans-serif',
|
|
43
|
+
} satisfies CSSProperties,
|
|
44
|
+
header: {
|
|
45
|
+
padding: '1rem 1.5rem',
|
|
46
|
+
background: '#1e293b',
|
|
47
|
+
color: '#fff',
|
|
48
|
+
display: 'flex',
|
|
49
|
+
justifyContent: 'space-between',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
} satisfies CSSProperties,
|
|
52
|
+
headerTitle: {
|
|
53
|
+
fontWeight: 600,
|
|
54
|
+
} satisfies CSSProperties,
|
|
55
|
+
logoutButton: {
|
|
56
|
+
background: 'transparent',
|
|
57
|
+
border: '1px solid #64748b',
|
|
58
|
+
color: '#94a3b8',
|
|
59
|
+
padding: '0.375rem 0.75rem',
|
|
60
|
+
borderRadius: '0.375rem',
|
|
61
|
+
cursor: 'pointer',
|
|
62
|
+
fontSize: '0.8125rem',
|
|
63
|
+
} satisfies CSSProperties,
|
|
64
|
+
content: {
|
|
65
|
+
maxWidth: 720,
|
|
66
|
+
margin: '2rem auto',
|
|
67
|
+
padding: '0 1.5rem',
|
|
68
|
+
} satisfies CSSProperties,
|
|
69
|
+
welcome: {
|
|
70
|
+
textAlign: 'center',
|
|
71
|
+
marginBottom: '2rem',
|
|
72
|
+
} satisfies CSSProperties,
|
|
73
|
+
welcomeHeading: {
|
|
74
|
+
fontSize: '1.5rem',
|
|
75
|
+
fontWeight: 600,
|
|
76
|
+
marginBottom: '0.75rem',
|
|
77
|
+
} satisfies CSSProperties,
|
|
78
|
+
welcomeText: {
|
|
79
|
+
color: '#64748b',
|
|
80
|
+
marginBottom: '1.5rem',
|
|
81
|
+
} satisfies CSSProperties,
|
|
82
|
+
createButton: {
|
|
83
|
+
background: '#2563eb',
|
|
84
|
+
color: '#fff',
|
|
85
|
+
border: 'none',
|
|
86
|
+
padding: '0.625rem 1.5rem',
|
|
87
|
+
borderRadius: '0.375rem',
|
|
88
|
+
fontSize: '0.9375rem',
|
|
89
|
+
fontWeight: 500,
|
|
90
|
+
cursor: 'pointer',
|
|
91
|
+
} satisfies CSSProperties,
|
|
92
|
+
formArea: {
|
|
93
|
+
background: '#fff',
|
|
94
|
+
border: '1px solid #e2e8f0',
|
|
95
|
+
borderRadius: '0.75rem',
|
|
96
|
+
padding: '1.5rem',
|
|
97
|
+
boxShadow: '0 1px 3px rgba(0,0,0,0.04)',
|
|
98
|
+
} satisfies CSSProperties,
|
|
99
|
+
loading: {
|
|
100
|
+
textAlign: 'center',
|
|
101
|
+
padding: '2rem',
|
|
102
|
+
color: '#64748b',
|
|
103
|
+
} satisfies CSSProperties,
|
|
104
|
+
},
|
|
105
|
+
};
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Mashup sample — demonstrates @pega/sdk-react
|
|
3
|
+
* in embedded/mashup mode with ZERO dependency on @pega/react-sdk-components.
|
|
4
|
+
*
|
|
5
|
+
* Flow:
|
|
6
|
+
* 1. Auth via AuthClient → @pega/auth
|
|
7
|
+
* 2. Bootstrap via BootstrapClient.loadMashup()
|
|
8
|
+
* 3. Show "Create Case" button
|
|
9
|
+
* 4. On click → PCore.getMashupApi().createCase()
|
|
10
|
+
* 5. PConnectComponent renders the case form via registered sample components
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
14
|
+
|
|
15
|
+
// ── React adapter (includes sdk-core re-exports) ───────────────────────────────────────
|
|
16
|
+
import {
|
|
17
|
+
PConnectComponent,
|
|
18
|
+
PegaStoreContext,
|
|
19
|
+
registerComponentCreator,
|
|
20
|
+
} from '@pega/sdk-react';
|
|
21
|
+
|
|
22
|
+
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
23
|
+
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
24
|
+
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
|
25
|
+
import { ThemeProvider as LegacyThemeProvider } from '@mui/styles';
|
|
26
|
+
|
|
27
|
+
// ── Sample components (local to this app) ───────────────────────────────────────────────────────
|
|
28
|
+
import { registerSampleComponents } from './components/component-map';
|
|
29
|
+
|
|
30
|
+
// ── @pega/auth for SDK config access ────────────────────────────────────────
|
|
31
|
+
import { getSdkConfig } from '@pega/auth/lib/sdk-auth-manager';
|
|
32
|
+
import { AuthClient } from '@pega/auth';
|
|
33
|
+
|
|
34
|
+
import { styles } from './MashupApp.styles';
|
|
35
|
+
import { FallbackComponent } from './FallbackComponent';
|
|
36
|
+
|
|
37
|
+
// ─── Create component registry + register sample components ─────────────────
|
|
38
|
+
// const registry =
|
|
39
|
+
// createComponentRegistry<React.ComponentType<Record<string, unknown>>>();
|
|
40
|
+
// registerSampleComponents(registry);
|
|
41
|
+
|
|
42
|
+
// ─── Root Component ─────────────────────────────────────────────────────────
|
|
43
|
+
const muiTheme = createTheme();
|
|
44
|
+
|
|
45
|
+
function RootComponent({
|
|
46
|
+
renderProps,
|
|
47
|
+
registry,
|
|
48
|
+
}: {
|
|
49
|
+
renderProps: Record<string, unknown>;
|
|
50
|
+
registry: any;
|
|
51
|
+
}) {
|
|
52
|
+
const contextValue = useMemo(() => ({ store: PCore.getStore() }), []);
|
|
53
|
+
|
|
54
|
+
const getPConnect = renderProps.getPConnect as () => any;
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<ThemeProvider theme={muiTheme}>
|
|
58
|
+
<LegacyThemeProvider theme={muiTheme}>
|
|
59
|
+
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
60
|
+
<PegaStoreContext.Provider value={contextValue}>
|
|
61
|
+
<div style={styles.root}>
|
|
62
|
+
<PConnectComponent
|
|
63
|
+
getPConnect={getPConnect}
|
|
64
|
+
componentRegistry={registry}
|
|
65
|
+
fallback={FallbackComponent}
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
</PegaStoreContext.Provider>
|
|
69
|
+
</LocalizationProvider>
|
|
70
|
+
</LegacyThemeProvider>
|
|
71
|
+
</ThemeProvider>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// ─── Mashup App ─────────────────────────────────────────────────────────────
|
|
76
|
+
function MashupApp() {
|
|
77
|
+
const [isPegaReady, setIsPegaReady] = useState(false);
|
|
78
|
+
const [rootProps, setRootProps] = useState<Record<string, unknown> | null>(
|
|
79
|
+
null,
|
|
80
|
+
);
|
|
81
|
+
const [showForm, setShowForm] = useState(false);
|
|
82
|
+
const [loading, setLoading] = useState(false);
|
|
83
|
+
const authClientRef = useRef<AuthClient | null>(null);
|
|
84
|
+
|
|
85
|
+
let registry;
|
|
86
|
+
|
|
87
|
+
// ── 1. Auth + Bootstrap mashup on mount ─────────────────────────────────
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
let cancelled = false;
|
|
90
|
+
|
|
91
|
+
async function bootstrap() {
|
|
92
|
+
const auth = new AuthClient();
|
|
93
|
+
authClientRef.current = auth;
|
|
94
|
+
|
|
95
|
+
const locale = sessionStorage.getItem('rsdk_locale') || undefined;
|
|
96
|
+
await auth.login({ appName: 'embedded', mainRedirect: true, locale });
|
|
97
|
+
if (cancelled) return;
|
|
98
|
+
|
|
99
|
+
sessionStorage.setItem('isLoggedIn', 'true');
|
|
100
|
+
|
|
101
|
+
const {
|
|
102
|
+
BootstrapClient,
|
|
103
|
+
compareSdkPCoreVersions,
|
|
104
|
+
createComponentRegistry,
|
|
105
|
+
// @ts-ignore
|
|
106
|
+
} = PCore.getInitialiser().getSdkCore();
|
|
107
|
+
|
|
108
|
+
// ─── Create component registry + register sample components ─────────────────
|
|
109
|
+
registry = createComponentRegistry();
|
|
110
|
+
registerSampleComponents(registry);
|
|
111
|
+
|
|
112
|
+
// Register component creator so PCore uses our bridge
|
|
113
|
+
registerComponentCreator(registry, FallbackComponent);
|
|
114
|
+
|
|
115
|
+
const client = new BootstrapClient({
|
|
116
|
+
componentRegistry: registry,
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const result = await client.loadMashup({
|
|
120
|
+
onPCoreReady: () => {
|
|
121
|
+
compareSdkPCoreVersions();
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
if (cancelled) return;
|
|
126
|
+
|
|
127
|
+
setRootProps(result.rootProps);
|
|
128
|
+
setIsPegaReady(true);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
bootstrap().catch(console.error);
|
|
132
|
+
|
|
133
|
+
return () => {
|
|
134
|
+
cancelled = true;
|
|
135
|
+
};
|
|
136
|
+
}, []);
|
|
137
|
+
|
|
138
|
+
// ── 2. Subscribe to PCore lifecycle events ──────────────────────────────
|
|
139
|
+
useEffect(() => {
|
|
140
|
+
if (!isPegaReady) return;
|
|
141
|
+
|
|
142
|
+
const cancelId = 'mashupApp-cancel';
|
|
143
|
+
const doneId = 'mashupApp-assignmentDone';
|
|
144
|
+
|
|
145
|
+
PCore.getPubSubUtils().subscribe(
|
|
146
|
+
PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL,
|
|
147
|
+
() => setShowForm(false),
|
|
148
|
+
cancelId,
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
PCore.getPubSubUtils().subscribe(
|
|
152
|
+
PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS
|
|
153
|
+
.END_OF_ASSIGNMENT_PROCESSING,
|
|
154
|
+
() => setShowForm(false),
|
|
155
|
+
doneId,
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
return () => {
|
|
159
|
+
PCore.getPubSubUtils().unsubscribe(
|
|
160
|
+
PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL,
|
|
161
|
+
cancelId,
|
|
162
|
+
);
|
|
163
|
+
PCore.getPubSubUtils().unsubscribe(
|
|
164
|
+
PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS
|
|
165
|
+
.END_OF_ASSIGNMENT_PROCESSING,
|
|
166
|
+
doneId,
|
|
167
|
+
);
|
|
168
|
+
};
|
|
169
|
+
}, [isPegaReady]);
|
|
170
|
+
|
|
171
|
+
// ── 3. Create case via MashupApi ────────────────────────────────────────
|
|
172
|
+
const handleCreateCase = useCallback(async () => {
|
|
173
|
+
if (!isPegaReady) return;
|
|
174
|
+
|
|
175
|
+
setLoading(true);
|
|
176
|
+
setShowForm(true);
|
|
177
|
+
|
|
178
|
+
try {
|
|
179
|
+
const sdkConfig = await getSdkConfig();
|
|
180
|
+
const mashupCaseType = (
|
|
181
|
+
sdkConfig as Record<string, Record<string, unknown>>
|
|
182
|
+
).serverConfig.appMashupCaseType as string;
|
|
183
|
+
|
|
184
|
+
await PCore.getMashupApi().createCase(
|
|
185
|
+
mashupCaseType,
|
|
186
|
+
PCore.getConstants().APP.APP,
|
|
187
|
+
{ pageName: 'pyEmbedAssignment', startingFields: {} },
|
|
188
|
+
);
|
|
189
|
+
} catch (err) {
|
|
190
|
+
console.error('Error creating case:', err);
|
|
191
|
+
setShowForm(false);
|
|
192
|
+
} finally {
|
|
193
|
+
setLoading(false);
|
|
194
|
+
}
|
|
195
|
+
}, [isPegaReady]);
|
|
196
|
+
|
|
197
|
+
// ── Render ──────────────────────────────────────────────────────────────
|
|
198
|
+
if (!isPegaReady) {
|
|
199
|
+
return (
|
|
200
|
+
<div className='loading-container'>
|
|
201
|
+
<span className='loading-text'>Authenticating and loading Pega...</span>
|
|
202
|
+
</div>
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return (
|
|
207
|
+
<div id='pega-root' style={styles.app.container}>
|
|
208
|
+
{/* Header */}
|
|
209
|
+
<div style={styles.app.header}>
|
|
210
|
+
<span style={styles.app.headerTitle}>
|
|
211
|
+
Pega SDK — React Mashup Sample
|
|
212
|
+
</span>
|
|
213
|
+
<button
|
|
214
|
+
type='button'
|
|
215
|
+
onClick={() => authClientRef.current?.logout()}
|
|
216
|
+
style={styles.app.logoutButton}
|
|
217
|
+
>
|
|
218
|
+
Logout
|
|
219
|
+
</button>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
<div style={styles.app.content}>
|
|
223
|
+
{!showForm && (
|
|
224
|
+
<div style={styles.app.welcome}>
|
|
225
|
+
<h2 style={styles.app.welcomeHeading}>Ready to go</h2>
|
|
226
|
+
<p style={styles.app.welcomeText}>
|
|
227
|
+
Click below to create a new case and see the Pega form components
|
|
228
|
+
in action.
|
|
229
|
+
</p>
|
|
230
|
+
<button
|
|
231
|
+
type='button'
|
|
232
|
+
onClick={handleCreateCase}
|
|
233
|
+
style={styles.app.createButton}
|
|
234
|
+
>
|
|
235
|
+
Create Case
|
|
236
|
+
</button>
|
|
237
|
+
</div>
|
|
238
|
+
)}
|
|
239
|
+
|
|
240
|
+
{/* {showForm && ( */}
|
|
241
|
+
<div style={styles.app.formArea}>
|
|
242
|
+
{loading ? (
|
|
243
|
+
<div style={styles.app.loading}>Loading case form...</div>
|
|
244
|
+
) : rootProps ? (
|
|
245
|
+
<RootComponent renderProps={rootProps} registry={registry} />
|
|
246
|
+
) : null}
|
|
247
|
+
</div>
|
|
248
|
+
{/* )} */}
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export { MashupApp };
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Portal sample — demonstrates @pega/sdk-react
|
|
3
|
+
* in full portal mode.
|
|
4
|
+
*
|
|
5
|
+
* Flow:
|
|
6
|
+
* 1. Auth via AuthClient → @pega/auth (mainRedirect: true for portal)
|
|
7
|
+
* 2. Bootstrap via BootstrapClient.loadPortal()
|
|
8
|
+
* 3. PConnectComponent renders the full portal UI via registered sample components
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
12
|
+
import { useLocation } from 'react-router-dom';
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
PConnectComponent,
|
|
16
|
+
PegaStoreContext,
|
|
17
|
+
registerComponentCreator,
|
|
18
|
+
} from '@pega/sdk-react';
|
|
19
|
+
|
|
20
|
+
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
21
|
+
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
22
|
+
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
|
23
|
+
import { ThemeProvider as LegacyThemeProvider } from '@mui/styles';
|
|
24
|
+
|
|
25
|
+
import { registerSampleComponents } from './components/component-map';
|
|
26
|
+
import { getSdkConfig } from '@pega/auth/lib/sdk-auth-manager';
|
|
27
|
+
import { AuthClient } from '@pega/auth';
|
|
28
|
+
|
|
29
|
+
import { FallbackComponent } from './FallbackComponent';
|
|
30
|
+
|
|
31
|
+
// ─── Root Component ─────────────────────────────────────────────────────────
|
|
32
|
+
const muiTheme = createTheme();
|
|
33
|
+
|
|
34
|
+
function RootComponent({
|
|
35
|
+
renderProps,
|
|
36
|
+
registry,
|
|
37
|
+
}: {
|
|
38
|
+
renderProps: Record<string, unknown>;
|
|
39
|
+
registry: any;
|
|
40
|
+
}) {
|
|
41
|
+
const contextValue = useMemo(() => ({ store: PCore.getStore() }), []);
|
|
42
|
+
const getPConnect = renderProps.getPConnect as () => any;
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<ThemeProvider theme={muiTheme}>
|
|
46
|
+
<LegacyThemeProvider theme={muiTheme}>
|
|
47
|
+
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
48
|
+
<PegaStoreContext.Provider value={contextValue}>
|
|
49
|
+
<PConnectComponent
|
|
50
|
+
getPConnect={getPConnect}
|
|
51
|
+
componentRegistry={registry}
|
|
52
|
+
fallback={FallbackComponent}
|
|
53
|
+
/>
|
|
54
|
+
</PegaStoreContext.Provider>
|
|
55
|
+
</LocalizationProvider>
|
|
56
|
+
</LegacyThemeProvider>
|
|
57
|
+
</ThemeProvider>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ─── Portal App ─────────────────────────────────────────────────────────────
|
|
62
|
+
function PortalApp() {
|
|
63
|
+
const [isPegaReady, setIsPegaReady] = useState(false);
|
|
64
|
+
const [rootProps, setRootProps] = useState<Record<string, unknown> | null>(
|
|
65
|
+
null,
|
|
66
|
+
);
|
|
67
|
+
const authClientRef = useRef<AuthClient | null>(null);
|
|
68
|
+
const registryRef = useRef<unknown>(null);
|
|
69
|
+
|
|
70
|
+
const { search } = useLocation();
|
|
71
|
+
const query = useMemo(() => new URLSearchParams(search), [search]);
|
|
72
|
+
|
|
73
|
+
// Capture query params into sessionStorage
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
const portalParam = query.get('portal');
|
|
76
|
+
if (portalParam) {
|
|
77
|
+
sessionStorage.setItem('rsdk_portalName', portalParam);
|
|
78
|
+
}
|
|
79
|
+
const localeParam = query.get('locale');
|
|
80
|
+
if (localeParam) {
|
|
81
|
+
sessionStorage.setItem('rsdk_locale', localeParam);
|
|
82
|
+
}
|
|
83
|
+
}, [query]);
|
|
84
|
+
|
|
85
|
+
// ── Auth + Bootstrap portal on mount ─────────────────────────────────
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
let cancelled = false;
|
|
88
|
+
|
|
89
|
+
async function bootstrap() {
|
|
90
|
+
const auth = new AuthClient();
|
|
91
|
+
authClientRef.current = auth;
|
|
92
|
+
|
|
93
|
+
const locale = sessionStorage.getItem('rsdk_locale') || undefined;
|
|
94
|
+
await auth.login({ appName: 'portal', mainRedirect: true, locale });
|
|
95
|
+
if (cancelled) return;
|
|
96
|
+
|
|
97
|
+
sessionStorage.setItem('isLoggedIn', 'true');
|
|
98
|
+
|
|
99
|
+
const {
|
|
100
|
+
BootstrapClient,
|
|
101
|
+
compareSdkPCoreVersions,
|
|
102
|
+
createComponentRegistry,
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
} = PCore.getInitialiser().getSdkCore();
|
|
105
|
+
|
|
106
|
+
// Create component registry + register sample components
|
|
107
|
+
const registry = createComponentRegistry();
|
|
108
|
+
registerSampleComponents(registry);
|
|
109
|
+
registerComponentCreator(registry, FallbackComponent);
|
|
110
|
+
registryRef.current = registry;
|
|
111
|
+
|
|
112
|
+
// Determine which portal to load
|
|
113
|
+
const sdkConfig = (await getSdkConfig()) as Record<
|
|
114
|
+
string,
|
|
115
|
+
Record<string, unknown>
|
|
116
|
+
>;
|
|
117
|
+
const appPortal = sdkConfig.serverConfig.appPortal as string;
|
|
118
|
+
const excludePortals = (sdkConfig.serverConfig.excludePortals ??
|
|
119
|
+
[]) as string[];
|
|
120
|
+
|
|
121
|
+
const queryPortal = sessionStorage.getItem('rsdk_portalName');
|
|
122
|
+
const portalName = queryPortal || appPortal || undefined;
|
|
123
|
+
|
|
124
|
+
const client = new BootstrapClient({
|
|
125
|
+
sdkConfig: {
|
|
126
|
+
serverConfig: { infinityRestServerUrl: '', appAlias: '' },
|
|
127
|
+
authConfig: { clientId: '' },
|
|
128
|
+
},
|
|
129
|
+
componentRegistry: registry,
|
|
130
|
+
targetId: 'pega-root',
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
console.log(
|
|
134
|
+
`Loading portal: ${portalName}, excluding portals: ${excludePortals}`,
|
|
135
|
+
);
|
|
136
|
+
const result = await client.loadPortal({
|
|
137
|
+
portalName,
|
|
138
|
+
excludePortals,
|
|
139
|
+
onPCoreReady: () => {
|
|
140
|
+
compareSdkPCoreVersions();
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
if (cancelled) return;
|
|
145
|
+
|
|
146
|
+
setRootProps(result.rootProps);
|
|
147
|
+
setIsPegaReady(true);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
bootstrap().catch(console.error);
|
|
151
|
+
|
|
152
|
+
return () => {
|
|
153
|
+
cancelled = true;
|
|
154
|
+
};
|
|
155
|
+
}, []);
|
|
156
|
+
|
|
157
|
+
// ── Render ──────────────────────────────────────────────────────────────
|
|
158
|
+
if (!isPegaReady || !rootProps) {
|
|
159
|
+
return (
|
|
160
|
+
<div className='loading-container'>
|
|
161
|
+
<span className='loading-text'>
|
|
162
|
+
Authenticating and loading portal...
|
|
163
|
+
</span>
|
|
164
|
+
</div>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return (
|
|
169
|
+
<div id='pega-root'>
|
|
170
|
+
<RootComponent renderProps={rootProps} registry={registryRef.current} />
|
|
171
|
+
</div>
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export { PortalApp };
|