@pega/custom-dx-components 26.1.11 → 26.1.12-alpha.0.2
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/README.md +6 -2
- package/package.json +48 -64
- package/src/ai/README.md +44 -0
- package/src/ai/catalog/README.md +133 -0
- package/src/ai/catalog/best-practices/README.md +24 -0
- package/src/ai/catalog/best-practices/accessibility-for-async-components.md +53 -0
- package/src/ai/catalog/best-practices/error-handling-and-resiliency.md +116 -0
- package/src/ai/catalog/best-practices/genai-assistant-integration-patterns.md +49 -0
- package/src/ai/catalog/best-practices/performance-and-efficiency.md +109 -0
- package/src/ai/catalog/best-practices/security-considerations.md +93 -0
- package/src/ai/catalog/best-practices/testing-pconnect-components.md +245 -0
- package/src/ai/catalog/best-practices/troubleshooting-common-pitfalls.md +132 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/SKILL.md +44 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/README.md +39 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/approval-workflow-decision.md +47 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/attachment-upload.md +45 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/bulk-action-submit.md +50 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/confirm-before-destructive-action.md +43 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/create-and-stage-new-case.md +45 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/graceful-submit-failure.md +39 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/modal-assignment-submit.md +58 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/multi-step-wizard.md +44 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/resolve-or-ignore-duplicate.md +47 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/safe-case-deletion.md +36 -0
- package/src/ai/catalog/pconnect-case-collaboration/SKILL.md +42 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/README.md +36 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/look-up-user-details.md +43 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/manage-case-attachments.md +51 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/manage-case-participants.md +52 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/participant-and-follower.md +40 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/post-and-manage-feed.md +50 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/relate-cases.md +35 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/tag-case-and-find-related.md +44 -0
- package/src/ai/catalog/pconnect-data-subscriptions/SKILL.md +42 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/README.md +35 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/data-page-subscription-cleanup.md +41 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/publish-and-subscribe-events.md +40 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/pubsub-cleanup.md +38 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/query-paginated-list-data.md +44 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/realtime-case-subscription.md +46 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/refresh-and-update-data.md +41 -0
- package/src/ai/catalog/pconnect-forms-and-fields/SKILL.md +44 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/README.md +36 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/autosave-tracking.md +45 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/cascading-dependent-fields.md +51 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/collect-form-changes-for-manual-save.md +45 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/custom-field-validators.md +44 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/discard-changes-and-reset-form.md +41 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/full-form-validation.md +38 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/persist-widget-ui-state.md +41 -0
- package/src/ai/catalog/pconnect-lists-and-views/SKILL.md +44 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/README.md +35 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/activate-and-switch-container-items.md +52 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/container-item-lifecycle.md +61 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/insert-delete-list-rows.md +40 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/reorder-list-rows.md +39 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/repeating-row-edit.md +39 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/view-personalization.md +60 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/SKILL.md +45 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/README.md +35 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/agent-conversation-for-tasks.md +54 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/bookmarkable-filter-state.md +40 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/deep-link-semantic-url.md +39 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/genai-assistant-conversation.md +43 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/locale-switch-and-relocalize.md +38 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/persist-operator-preferences.md +40 -0
- package/src/ai/catalog/references/architecture-overview.md +52 -0
- package/src/ai/catalog/references/pconnect-actions-api.md +948 -0
- package/src/ai/catalog/references/pconnect-case-info-data-info-localization.md +618 -0
- package/src/ai/catalog/references/pconnect-case-validation-utilities.md +238 -0
- package/src/ai/catalog/references/pconnect-container-manager.md +215 -0
- package/src/ai/catalog/references/pconnect-list-actions.md +250 -0
- package/src/ai/catalog/references/pconnect-misc-suggestions-creation.md +231 -0
- package/src/ai/catalog/references/pconnect-reference-context-component.md +471 -0
- package/src/ai/catalog/references/pconnect-state-config.md +316 -0
- package/src/ai/catalog/references/pconnect-validation-api.md +45 -0
- package/src/ai/catalog/references/pcore-analytics-genai-details.md +50 -0
- package/src/ai/catalog/references/pcore-bootstrap-init-details.md +121 -0
- package/src/ai/catalog/references/pcore-bootstrap-registry-routing.md +253 -0
- package/src/ai/catalog/references/pcore-case-collaboration-details.md +191 -0
- package/src/ai/catalog/references/pcore-case-collaboration-genai.md +264 -0
- package/src/ai/catalog/references/pcore-environment-info-details.md +96 -0
- package/src/ai/catalog/references/pcore-environment-locale-namespace.md +175 -0
- package/src/ai/catalog/references/pcore-messaging-details.md +99 -0
- package/src/ai/catalog/references/pcore-misc-details.md +207 -0
- package/src/ai/catalog/references/pcore-misc-utilities.md +325 -0
- package/src/ai/catalog/references/pcore-rest-data-details.md +164 -0
- package/src/ai/catalog/references/pcore-rest-data-messaging.md +308 -0
- package/src/ai/catalog/references/pcore-store-context-details.md +40 -0
- package/src/ai/catalog/references/pcore-store-context-state.md +130 -0
- package/src/ai/index.js +154 -0
- package/src/ai/project/.claude/skills/boolean/SKILL.md +43 -0
- package/src/ai/project/.claude/skills/case/SKILL.md +58 -0
- package/src/ai/project/.claude/skills/create-dx-component/SKILL.md +98 -0
- package/src/ai/project/.claude/skills/create-dx-component/assets/PConnProps.d.ts +24 -0
- package/src/ai/project/.claude/skills/create-dx-component/assets/create-nonce.ts +5 -0
- package/src/ai/project/.claude/skills/create-dx-component/assets/event-utils.ts +18 -0
- package/src/ai/project/.claude/skills/create-dx-component/assets/styles.ts +7 -0
- package/src/ai/project/.claude/skills/create-dx-component/cookbooks/README.md +28 -0
- package/src/ai/project/.claude/skills/create-dx-component/cookbooks/build-a-data-widget.md +281 -0
- package/src/ai/project/.claude/skills/create-dx-component/cookbooks/field-with-limits-and-validation.md +156 -0
- package/src/ai/project/.claude/skills/create-dx-component/cookbooks/status-badge-field.md +97 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/accessibility.md +71 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/choosing-type-and-subtype.md +79 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/cli-workflow.md +125 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/component-patterns.md +241 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/config-schema.md +296 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/cosmos-components.md +137 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/field-behavior.md +155 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/field-essentials.md +90 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/field-subtypes-extra.md +68 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/localization.md +30 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/pcore-pconnect-apis.md +77 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/presentation-essentials.md +57 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/props-contract.md +182 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/state-matrix.md +102 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/storybook-pattern.md +262 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/styles-pattern.md +54 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/template-essentials.md +87 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/template-patterns.md +131 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/test-pattern.md +215 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/ui-gallery-reuse.md +93 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/widget-essentials.md +84 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/widget-patterns.md +164 -0
- package/src/ai/project/.claude/skills/currency/SKILL.md +46 -0
- package/src/ai/project/.claude/skills/date/SKILL.md +46 -0
- package/src/ai/project/.claude/skills/decimal/SKILL.md +49 -0
- package/src/ai/project/.claude/skills/details/SKILL.md +60 -0
- package/src/ai/project/.claude/skills/email/SKILL.md +42 -0
- package/src/ai/project/.claude/skills/field/SKILL.md +68 -0
- package/src/ai/project/.claude/skills/form/SKILL.md +51 -0
- package/src/ai/project/.claude/skills/generate-component-set/SKILL.md +80 -0
- package/src/ai/project/.claude/skills/generate-component-set/component-manifest.json +161 -0
- package/src/ai/project/.claude/skills/identify-components/SKILL.md +76 -0
- package/src/ai/project/.claude/skills/integer/SKILL.md +45 -0
- package/src/ai/project/.claude/skills/page/SKILL.md +60 -0
- package/src/ai/project/.claude/skills/page-widget/SKILL.md +55 -0
- package/src/ai/project/.claude/skills/percentage/SKILL.md +52 -0
- package/src/ai/project/.claude/skills/phone/SKILL.md +44 -0
- package/src/ai/project/.claude/skills/picklist/SKILL.md +50 -0
- package/src/ai/project/.claude/skills/plan-dx-component/SKILL.md +51 -0
- package/src/ai/project/.claude/skills/plan-dx-component/references/design-system-mapping.md +108 -0
- package/src/ai/project/.claude/skills/plan-dx-component/references/intake.md +146 -0
- package/src/ai/project/.claude/skills/plan-dx-component/references/plan-template.md +76 -0
- package/src/ai/project/.claude/skills/plan-dx-component/references/requirements-template.md +88 -0
- package/src/ai/project/.claude/skills/presentation/SKILL.md +61 -0
- package/src/ai/project/.claude/skills/publish-library/SKILL.md +106 -0
- package/src/ai/project/.claude/skills/radiobuttons/SKILL.md +51 -0
- package/src/ai/project/.claude/skills/review-component/SKILL.md +49 -0
- package/src/ai/project/.claude/skills/review-component/references/checklist.md +77 -0
- package/src/ai/project/.claude/skills/template/SKILL.md +60 -0
- package/src/ai/project/.claude/skills/text/SKILL.md +45 -0
- package/src/ai/project/.claude/skills/update-dx-component/SKILL.md +56 -0
- package/src/ai/project/.claude/skills/update-dx-component/references/maintenance.md +43 -0
- package/src/ai/project/.claude/skills/url/SKILL.md +46 -0
- package/src/ai/project/.claude/skills/validate-component/SKILL.md +78 -0
- package/src/ai/project/.claude/skills/validate-component/references/runtime-troubleshooting.md +56 -0
- package/src/ai/project/.claude/skills/validate-component/scripts/check-component.mjs +327 -0
- package/src/ai/project/.claude/skills/widget/SKILL.md +59 -0
- package/src/ai/project/.gemini/settings.json +5 -0
- package/src/ai/project/AGENTS.md +74 -0
- package/src/ai/readme-section.md +91 -0
- package/src/cli.js +48 -7
- package/src/constants.js +54 -53
- package/src/internal-tests.js +27 -0
- package/src/tasks/ai-toggle/index.js +46 -0
- package/src/tasks/authenticate/helper.js +38 -38
- package/src/tasks/authenticate/index.js +17 -15
- package/src/tasks/build-all/helper.js +4 -4
- package/src/tasks/build-all/index.js +7 -7
- package/src/tasks/build-comp/helper.js +17 -17
- package/src/tasks/build-comp/index.js +10 -10
- package/src/tasks/build-jest-assets/index.js +7 -9
- package/src/tasks/build-lib/helper.js +8 -8
- package/src/tasks/build-lib/index.js +8 -8
- package/src/tasks/bundle/builder/index.js +9 -12
- package/src/tasks/bundle/builder/modules.js +8 -9
- package/src/tasks/bundle/builder/paths.js +2 -19
- package/src/tasks/bundle/builder/webpack.config.js +60 -77
- package/src/tasks/bundle/index.js +8 -8
- package/src/tasks/create/index.js +35 -35
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +1 -36
- package/src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +2 -27
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.ts.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Field/DateTime/date.ts.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +2 -35
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +3 -36
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +4 -39
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +4 -53
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/index.tsx.mustache +5 -5
- package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +3 -36
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +7 -42
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/component-constants.ts +1 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.ts.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +11 -11
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.ts.mustache +3 -13
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.tsx.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +28 -28
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.tsx.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +4 -33
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +3 -33
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +3 -31
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +3 -31
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +3 -35
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +3 -33
- package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.tsx.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +2 -35
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.ts.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS/Avatar.tsx.mustache +19 -15
- package/src/tasks/create/templates/Constellation/Template/DETAILS/Operator.tsx.mustache +6 -6
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +4 -8
- package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.ts.mustache +9 -9
- package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +4 -8
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Avatar.tsx.mustache +19 -15
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Operator.tsx.mustache +6 -6
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.ts.mustache +9 -9
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.ts.mustache +4 -8
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +8 -8
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +8 -8
- package/src/tasks/create/templates/Constellation/Template/PAGE/utils.ts.mustache +4 -9
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.test.tsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +19 -14
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +6 -6
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/index.tsx.mustache +5 -5
- package/src/tasks/create/templates/Launchpad/Field/Text-Phone/index.tsx.mustache +3 -35
- package/src/tasks/create/templates/Launchpad/Field/__components.md +1 -1
- package/src/tasks/create/templates/Launchpad/Template/FORM/demo.stories.tsx.mustache +8 -8
- package/src/tasks/create/templates/Launchpad/Template/FORM-region/demo.stories.tsx.mustache +8 -8
- package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.test.tsx.mustache +3 -3
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/mock.ts.mustache +1 -1
- package/src/tasks/create-all/index.js +42 -41
- package/src/tasks/create-lib/helper.js +13 -13
- package/src/tasks/create-lib/index.js +5 -5
- package/src/tasks/create-version/helper.js +10 -10
- package/src/tasks/create-version/index.js +3 -4
- package/src/tasks/delete/helper.js +20 -19
- package/src/tasks/delete/index.js +2 -2
- package/src/tasks/delete-all/helper.js +26 -25
- package/src/tasks/delete-all/index.js +2 -2
- package/src/tasks/delete-lib/helper.js +6 -6
- package/src/tasks/delete-lib/index.js +6 -6
- package/src/tasks/delete-pub/helper.js +18 -18
- package/src/tasks/delete-pub/index.js +8 -8
- package/src/tasks/delete-version/index.js +2 -2
- package/src/tasks/dev-server/index.js +1 -1
- package/src/tasks/export-archive/helper.js +21 -21
- package/src/tasks/export-archive/index.js +27 -40
- package/src/tasks/export-rc/helper.js +34 -34
- package/src/tasks/export-rc/index.js +21 -31
- package/src/tasks/import-archive/helper.js +39 -39
- package/src/tasks/import-archive/index.js +69 -89
- package/src/tasks/import-comp/helper.js +8 -8
- package/src/tasks/import-comp/index.js +30 -42
- package/src/tasks/index.js +5 -0
- package/src/tasks/init/Node.gitignore +149 -0
- package/src/tasks/init/helper.js +15 -8
- package/src/tasks/init/index.js +115 -35
- package/src/tasks/init/template/.prettierrc.json +4 -1
- package/src/tasks/init/template/.storybook/main.ts +1 -4
- package/src/tasks/init/template/.storybook/manager.ts +1 -1
- package/src/tasks/init/template/.storybook/preview.tsx +2 -2
- package/src/tasks/init/template/.storybook/theme.js +1 -1
- package/src/tasks/init/template/.vscode/extensions.json +0 -1
- package/src/tasks/init/template/README.md +2 -2
- package/src/tasks/init/template/eslint.config.mjs +13 -155
- package/src/tasks/init/template/jest.config.cjs +2 -0
- package/src/tasks/init/template/package-lock.json +26864 -0
- package/src/tasks/init/template/package.json.mustache +19 -74
- package/src/tasks/init/template/setupTests.ts +10 -4
- package/src/tasks/init/template/tsconfig.json +14 -6
- package/src/tasks/internal-test/index.js +21 -0
- package/src/tasks/internal-test-full/index.js +15 -0
- package/src/tasks/internal-test-functional/index.js +15 -0
- package/src/tasks/internal-test-unit/index.js +13 -0
- package/src/tasks/linter/index.js +2 -2
- package/src/tasks/list/helper.js +41 -40
- package/src/tasks/list/index.js +3 -3
- package/src/tasks/list-lib/helper.js +5 -5
- package/src/tasks/list-lib/index.js +8 -8
- package/src/tasks/list-pub/helper.js +23 -16
- package/src/tasks/list-pub/index.js +24 -21
- package/src/tasks/move/helper.js +8 -8
- package/src/tasks/move/index.js +19 -23
- package/src/tasks/promote-webpack/index.js +4 -4
- package/src/tasks/promote-webpack/webpack.config.js +62 -93
- package/src/tasks/publish/helper.js +21 -21
- package/src/tasks/publish/index.js +16 -16
- package/src/tasks/publish-all/helper.js +20 -20
- package/src/tasks/publish-all/index.js +11 -12
- package/src/tasks/publish-archive/helper.js +9 -9
- package/src/tasks/publish-archive/index.js +12 -14
- package/src/tasks/publish-lib/helper.js +3 -3
- package/src/tasks/publish-lib/index.js +28 -34
- package/src/tasks/quarantine/index.js +8 -8
- package/src/tasks/rename/index.js +26 -30
- package/src/tasks/rename-lib/index.js +21 -25
- package/src/tasks/restore/index.js +8 -8
- package/src/tasks/restore-config/index.js +3 -5
- package/src/tasks/set-perm/index.js +8 -8
- package/src/tasks/show-help/index.js +17 -9
- package/src/tasks/show-status/index.js +2 -2
- package/src/tasks/store/index.js +8 -8
- package/src/tasks/switch-lib/helper.js +7 -7
- package/src/tasks/switch-lib/index.js +7 -7
- package/src/tasks/switch-version/helper.js +6 -6
- package/src/tasks/switch-version/index.js +7 -7
- package/src/tasks/update/index.js +1 -1
- package/src/tasks/upgrade/index.js +7 -7
- package/src/tasks/validator/index.js +49 -203
- package/src/util.js +169 -186
- package/src/rules/no-pcore-pconnect-in-presentation.js +0 -103
- package/src/tasks/init/template/.stylelintrc.json +0 -4
- package/src/tasks/init/template/babel.config.cjs +0 -22
- package/src/tasks/init/template/cspell.json +0 -14
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# PCore: Bootstrap, Registration & Routing
|
|
2
|
+
|
|
3
|
+
> Part of the [PCore / PConnect API Reference skills](../README.md). See [pcore-bootstrap-init-details.md](./pcore-bootstrap-init-details.md) for the full method catalogs of `ComponentsRegistry`, `Initialiser`, and `BootstrapUtils`.
|
|
4
|
+
|
|
5
|
+
## `getPCoreVersion()`
|
|
6
|
+
|
|
7
|
+
**Purpose:** Returns the version of the PCore/PConnect APIs for the current runtime.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
getPCoreVersion(): string
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Example:**
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
const pcoreVersion = PCore.getPCoreVersion(); // e.g. "26.1.0"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## `onPCoreReady(callback)`
|
|
24
|
+
|
|
25
|
+
**Purpose:** Registers a callback that fires once the application infrastructure has established the store and is ready to perform its initial render.
|
|
26
|
+
|
|
27
|
+
**Signature:**
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
onPCoreReady(callback: (root: unknown, target: string | null) => void): void
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Example:**
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
PCore.onPCoreReady((root, target) => {
|
|
37
|
+
renderApplication(root, target);
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Notes:** `root.props` provides the top-level component's `getPConnect()`; `target` (or `root.domContainerID`) identifies where to mount the rendered tree.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## `onPCoreCleanup(callback)`
|
|
46
|
+
|
|
47
|
+
**Purpose:** Registers a callback that fires when the application is about to be dismounted (for example, a Web Embed scenario or an explicit logout).
|
|
48
|
+
|
|
49
|
+
**Signature:**
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
onPCoreCleanup(callback: (config: {
|
|
53
|
+
domContainerID: string | null;
|
|
54
|
+
portalTarget: HTMLDivElement;
|
|
55
|
+
styleSheetTarget: HTMLDivElement;
|
|
56
|
+
}) => void): void
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Example:**
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
PCore.onPCoreCleanup(({ domContainerID, portalTarget }) => {
|
|
63
|
+
const target = domContainerID ? document.getElementById(domContainerID) : portalTarget;
|
|
64
|
+
if (target) {
|
|
65
|
+
unmountApplication(target);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Notes:** Primarily relevant for Web Embed integrations, where the mounted application must be cleanly torn down.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## `getComponentsRegistry()`
|
|
75
|
+
|
|
76
|
+
**Purpose:** Returns the component registry, which exposes methods to register or override the components used to render the view tree.
|
|
77
|
+
|
|
78
|
+
**Signature:**
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
getComponentsRegistry(): ComponentsRegistry
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Example:**
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
const registry = PCore.getComponentsRegistry();
|
|
88
|
+
const componentDefinition = registry.getComponent('TextInput');
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Notes:** Useful when replacing a built-in component with a custom implementation, or registering an entirely new component type.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## `checkIfSemanticURL()`
|
|
96
|
+
|
|
97
|
+
**Purpose:** Checks whether the current browser URL is shaped like a semantic URL.
|
|
98
|
+
|
|
99
|
+
**Signature:**
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
checkIfSemanticURL(): boolean
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Example:**
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
if (!PCore.checkIfSemanticURL()) {
|
|
109
|
+
// fall back to non-semantic navigation handling
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## `isValidSemanticURL()`
|
|
116
|
+
|
|
117
|
+
**Purpose:** Checks whether the current browser URL is a semantic URL that also resolves to a registered route.
|
|
118
|
+
|
|
119
|
+
**Signature:**
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
isValidSemanticURL(): boolean
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Example:**
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
if (PCore.isValidSemanticURL()) {
|
|
129
|
+
// safe to restore state from the current semantic URL
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Notes:** Distinct from `checkIfSemanticURL()`, which only checks the URL's shape without validating that it maps to a known route.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## `getViewResources()`
|
|
138
|
+
|
|
139
|
+
**Purpose:** Returns the `ViewResources` API, used to fetch or update view metadata.
|
|
140
|
+
|
|
141
|
+
**Signature:**
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
getViewResources(): ViewResources
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Example:**
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
const viewConfig = PCore.getViewResources().fetchViewResources(viewName, pConn, classID);
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Notes:** `fetchViewResources(viewName, pConn, classID)` resolves view metadata synchronously from the local rule store; `updateViewResources(response)` updates the rule store from a server response asynchronously.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## `configureForBrowserBookmark(payload)`
|
|
158
|
+
|
|
159
|
+
**Purpose:** Configures the browser's URL/bookmark state to reflect the current view or container.
|
|
160
|
+
|
|
161
|
+
**Signature:**
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
configureForBrowserBookmark(payload: {
|
|
165
|
+
context: string;
|
|
166
|
+
containerName: string;
|
|
167
|
+
ruleName?: string;
|
|
168
|
+
className?: string;
|
|
169
|
+
semanticURL?: string;
|
|
170
|
+
}): void
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Example:**
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
PCore.configureForBrowserBookmark({
|
|
177
|
+
context,
|
|
178
|
+
containerName: 'primary',
|
|
179
|
+
ruleName: viewName,
|
|
180
|
+
className
|
|
181
|
+
});
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## `registerComponentCreator(creator)`
|
|
187
|
+
|
|
188
|
+
**Purpose:** Registers the function responsible for turning a `PConnect` context into a rendered component instance — the bridge between core and a specific UI library (React, Angular, Web Components).
|
|
189
|
+
|
|
190
|
+
**Signature:**
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
registerComponentCreator(creator: (pConn: PConnect, additionalProps?: object) => unknown): void
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Example:**
|
|
197
|
+
|
|
198
|
+
```typescript
|
|
199
|
+
PCore.registerComponentCreator((pConn, additionalProps = {}) => {
|
|
200
|
+
const configProps = pConn.getConfigProps();
|
|
201
|
+
return renderComponentForType(pConn.getComponentName(), { ...configProps, ...additionalProps });
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Notes:** Must be registered once during bridge setup, before any component tree is rendered.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## `getInitialiser()`
|
|
210
|
+
|
|
211
|
+
**Purpose:** Returns the `Initialiser`, used during bootstrap to set up routing, services, environment info, and to launch the initial view/portal.
|
|
212
|
+
|
|
213
|
+
**Signature:**
|
|
214
|
+
|
|
215
|
+
```typescript
|
|
216
|
+
getInitialiser(): Initialiser
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Example:**
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
PCore.getInitialiser()
|
|
223
|
+
.start(bootstrapConfig)
|
|
224
|
+
.then(() => {
|
|
225
|
+
// application is ready to render
|
|
226
|
+
});
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Notes:** `start()` returns a `Promise` — chain subsequent bootstrap steps in `.then()`.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## `getBootstrapUtils()`
|
|
234
|
+
|
|
235
|
+
**Purpose:** Returns `BootstrapUtils`, a lower-level API surface for loading and rendering root components during application bootstrap.
|
|
236
|
+
|
|
237
|
+
**Signature:**
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
getBootstrapUtils(): BootstrapUtils
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Example:**
|
|
244
|
+
|
|
245
|
+
```typescript
|
|
246
|
+
PCore.getBootstrapUtils()
|
|
247
|
+
.loadRootComponent('app-root', rootContainer, [], rootElement, stylesElement, true)
|
|
248
|
+
.then(() => {
|
|
249
|
+
// root component is ready
|
|
250
|
+
});
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Notes:** Prefer a higher-level bootstrap entry point (like `getInitialiser()`) when one meets your needs; use `getBootstrapUtils()` only for low-level bootstrap customization.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Case Collaboration — Method Details
|
|
2
|
+
|
|
3
|
+
> Part of the [PCore / PConnect API Reference skills](../README.md). Companion to [pcore-case-collaboration-genai.md](./pcore-case-collaboration-genai.md), which covers the top-level `PCore.get*()` accessors. This file catalogs the methods available on the objects those accessors return.
|
|
4
|
+
>
|
|
5
|
+
> Curated subset — `ContainerUtils` and `CaseUtils` have many additional low-level/internal methods used by the framework's own container bookkeeping; only the methods a component author would plausibly call directly are listed here.
|
|
6
|
+
|
|
7
|
+
## ContainerUtils (via `PCore.getContainerUtils()`)
|
|
8
|
+
|
|
9
|
+
| Method | Signature | Purpose |
|
|
10
|
+
| ----------------------------------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
11
|
+
| `getContainerData(target)` | `(target: string): unknown` | Returns the container's data for a target. |
|
|
12
|
+
| `getContainerItemData(target, containerItem)` | `(target: string, containerItem: string): unknown` | Returns data for a specific container item. |
|
|
13
|
+
| `isContainerItemExists(target, key, callback?)` | `(target: string \| null, key: string, callback?: Function): boolean` | Checks whether a container item with a given key exists. |
|
|
14
|
+
| `getContainerItemName(target, key, callback?)` | `(target: string \| null, key: string \| undefined, callback?: Function): string \| null` | Returns the container item name for a given key. |
|
|
15
|
+
| `isContainerInitialized(context, name)` | `(context: string, name: string): boolean` | Checks whether a container has been initialized. |
|
|
16
|
+
| `getContainerType(context, name)` | `(context: string, name: string): string \| null` | Returns the container type (`single` or `multiple`). |
|
|
17
|
+
| `getActiveContainerItemName(target)` | `(target: string): string \| null` | Returns the currently active container item's name. |
|
|
18
|
+
| `getDataContextName(containerItemName)` | `(containerItemName: string): string \| null` | Returns the data context name for a container item. |
|
|
19
|
+
| `getChildContainers(containerItemName)` | `(containerItemName: string): string[]` | Returns the child containers of a parent container item. |
|
|
20
|
+
| `hasContainerItems(target)` | `(target: string): boolean` | Checks whether a container has any items. |
|
|
21
|
+
| `getContainerLimit(target)` | `(target: string): number` | Returns the maximum number of items allowed in a container. |
|
|
22
|
+
| `isContainerLimitReached(target)` | `(target: string): boolean` | Checks whether the container's item limit has been reached. |
|
|
23
|
+
| `isContainerDirty(containerItemID)` | `(containerItemID: string): boolean` | Checks whether a container item's content has unsaved changes. |
|
|
24
|
+
| `closeContainerItem(containerItemID, options?)` | `(containerItemID: string, options?: { skipDirtyCheck?: boolean }): Promise<unknown>` | Closes a container item, optionally skipping the dirty check. |
|
|
25
|
+
| `getTransientItems(containerItemsID)` | `(containerItemsID: string \| string[]): unknown[]` | Returns the transient items present under a container. |
|
|
26
|
+
|
|
27
|
+
**Example:**
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
const isInitialized = PCore.getContainerUtils().isContainerInitialized(context, containerName);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## AttachmentUtils (via `PCore.getAttachmentUtils()`)
|
|
36
|
+
|
|
37
|
+
| Method | Signature | Purpose |
|
|
38
|
+
| -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| `uploadAttachment(file, onUploadProgress, errorHandler, context, caseID?, attachmentCategory?)` | `(file: Blob & Attachment, onUploadProgress: AxiosRequestConfig['onUploadProgress'], errorHandler: Function, context: string, caseID?: string, attachmentCategory?: string): Promise<object>` | Uploads a file to the server. |
|
|
40
|
+
| `linkAttachmentsToCase(caseID, attachments, attachmentType, context)` | `(...): Promise<unknown>` | Links uploaded files (or URL links) to a case. |
|
|
41
|
+
| `getCaseAttachments(caseID, context, includeThumbnail?)` | `(caseID: string, context: string, includeThumbnail?: boolean): Promise<unknown>` | Retrieves the attachments linked to a case. |
|
|
42
|
+
| `getAttachmentCategories(caseID, type, context)` | `(caseID: string, type: string, context: string): Promise<unknown>` | Retrieves the configured attachment categories for a case. |
|
|
43
|
+
| `downloadAttachment(attachmentID, context, responseEncoding, storageType?, encoding?)` | `(...): Promise<unknown>` | Downloads the binary content of an attachment. |
|
|
44
|
+
| `streamDownloadAttachment(attachmentID, fileName, context)` | `(attachmentID: string, fileName: string, context: string): Promise<void>` | Streams a large attachment to disk via the File System Access API; no-ops if unsupported, cancelled, or the feature flag is off. |
|
|
45
|
+
| `getAttachmentURL(attachmentID)` | `(attachmentID: string): string \| undefined` | Returns the absolute URL of an attachment. |
|
|
46
|
+
| `editAttachment(attachmentID, metadata, context)` | `(attachmentID: string, metadata: { name?: string; description?: string; category?: string }, context: string): Promise<unknown>` | Edits an attachment's name/category. |
|
|
47
|
+
| `deleteAttachment(attachmentID, context)` | `(attachmentID: string, context: string): Promise<unknown>` | Deletes an attachment from a case. |
|
|
48
|
+
| `cancelRequest(fileID)` | `(fileID: string): void` | Cancels an ongoing upload request. |
|
|
49
|
+
|
|
50
|
+
**Example:**
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
const { uploadAttachment } = PCore.getAttachmentUtils();
|
|
54
|
+
await uploadAttachment(file, onProgress, onError, context);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Notes:** Most methods return a `Promise`.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## FeedUtils (via `PCore.getFeedUtils()`)
|
|
62
|
+
|
|
63
|
+
| Method | Signature | Purpose |
|
|
64
|
+
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
|
|
65
|
+
| `getFeeds(context, feedID, feedClass, filters, cancelTokenSource, pConn, isLoadMore)` | `(...): Promise<unknown>` | Retrieves feed/pulse entries for a context. |
|
|
66
|
+
| `postMessage(context, message, pConn, attachmentIDs?, isReply?, recipients?)` | `(...): Promise<unknown>` | Posts a message to a case's feed. |
|
|
67
|
+
| `postCustomMessage(postTypeClassID, payload, pConn)` | `(postTypeClassID: string, payload: unknown, pConn: PConnect): Promise<unknown>` | Posts a custom message type. |
|
|
68
|
+
| `editMessage(params)` | `(params: { messageID: string; message: string; pConn: PConnect }): Promise<unknown>` | Edits an existing feed message. |
|
|
69
|
+
| `likeMessage(params)` | `(params: { context: string; likedBy: boolean; messageID: string; pConn: PConnect }): void` | Likes or unlikes a message. |
|
|
70
|
+
| `deleteMessage(messageID, isReply, replyID, pConn)` | `(messageID: string, isReply: boolean, replyID: string, pConn: PConnect): void` | Deletes a feed message. |
|
|
71
|
+
| `getLikedUsers(messageID, pConn)` | `(messageID: string, pConn: PConnect): Promise<unknown>` | Retrieves the users who liked a message. |
|
|
72
|
+
| `getMentionSuggestions(props, pConn)` | `(props: { searchFor: string; mentionsType: string }, pConn: PConnect): Promise<unknown>` | Retrieves mention suggestions while composing a message. |
|
|
73
|
+
| `getMentionTypes(pConn)` | `(pConn: PConnect): Promise<unknown>` | Retrieves the available mention types. |
|
|
74
|
+
| `getPostTypeView(postTypeClassID, pConnectObj)` | `(postTypeClassID: string, pConnectObj: PConnect): Promise<object>` | Retrieves the view associated with a custom post type. |
|
|
75
|
+
| `getTagSuggestions(props, pConn)` | `(props: { searchFor: string }, pConn: PConnect): Promise<string[]>` | Retrieves tag suggestions while composing a message. |
|
|
76
|
+
|
|
77
|
+
**Example:**
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
await PCore.getFeedUtils().postMessage(context, 'Reviewed and approved.', pConn);
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## TagUtils (via `PCore.getTagUtils()`)
|
|
86
|
+
|
|
87
|
+
| Method | Signature | Purpose |
|
|
88
|
+
| --------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------- |
|
|
89
|
+
| `getTags(caseID, pConnectObj)` | `(caseID: string, pConnectObj: PConnect): Promise<object>` | Retrieves a case's tags (the typedefs type the result only as `object`). |
|
|
90
|
+
| `postTags(caseID, tags, pConnectObj)` | `(caseID: string, tags: { Name: string }[], pConnectObj: PConnect): Promise<object>` | Adds tags to a case. Each tag is `{ Name: string }`. |
|
|
91
|
+
| `removeTag(caseID, tagID, pConnectObj)` | `(caseID: string, tagID: string, pConnectObj: PConnect): Promise<void \| AxiosResponse>` | Removes a tag from a case. |
|
|
92
|
+
| `getTaggedCases(caseID, pConnectObj)` | `(caseID: string, pConnectObj: PConnect): Promise<object>` | Retrieves cases sharing a tag. |
|
|
93
|
+
| `getTagsLandingPageURL(pConnectObj)` | `(pConnectObj: PConnect): Promise<void \| object>` | Retrieves the URL of the tags landing page. |
|
|
94
|
+
|
|
95
|
+
**Example:**
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
const { getTags, postTags } = PCore.getTagUtils();
|
|
99
|
+
const tags = await getTags(caseID, pConn);
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## StakeholderUtils (via `PCore.getStakeholderUtils()`)
|
|
105
|
+
|
|
106
|
+
| Method | Signature | Purpose |
|
|
107
|
+
| -------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
108
|
+
| `getParticipants(caseID, pConnectObj)` | `(caseID: string, pConnectObj: PConnect): Promise<Participant[] \| void>` | Retrieves a case's participants. |
|
|
109
|
+
| `getParticipant(caseID, participantID, pConnectObj)` | `(caseID: string, participantID: string, pConnectObj: PConnect): Promise<Participant \| void>` | Retrieves a single participant by ID. |
|
|
110
|
+
| `getParticipantRoles(caseID, pConnectObj)` | `(caseID: string, pConnectObj: PConnect): Promise<ParticipantRole[] \| void>` | Retrieves the available participant roles for a case. |
|
|
111
|
+
| `createParticipant(caseID, participantRoleID, participantData, pConnectObj, transientContext?)` | `(caseID: string, participantRoleID: string, participantData: ParticipantData, pConnectObj: PConnect, transientContext?: string): Promise<void>` | Creates a new participant. Resolves to `void` (it does not return the created participant). |
|
|
112
|
+
| `updateParticipant(caseID, participantID, participantData, pConnectObj, transientContext?)` | `(caseID: string, participantID: string, participantData: ParticipantData, pConnectObj: PConnect, transientContext?: string): Promise<void>` | Updates an existing participant's details. |
|
|
113
|
+
| `deleteParticipant(caseID, participantID, pConnectObj)` | `(caseID: string, participantID: string, pConnectObj: PConnect): Promise<void>` | Removes a participant from a case. |
|
|
114
|
+
| `getRoleView(caseID, participantRoleID, pConnectObj)` | `(caseID: string, participantRoleID: string, pConnectObj: PConnect): Promise<DxAPIResponseObject>` | Retrieves the view for editing a specific participant role. |
|
|
115
|
+
|
|
116
|
+
**Example:**
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
const participant = await PCore.getStakeholderUtils().getParticipant(caseID, participantID, pConn);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Notes:** `ParticipantData` is `{ content: Record<string, string>; pageInstructions?: object[] }` — the participant fields go inside `content` (for example `{ content: { pyFirstName: 'Sam', pyLastName: 'Smith' } }`). `getParticipant` resolves to `Participant | void`; a `Participant` is `{ data: { content: { pyParticipants: { ID, classID, links, ... }[] } } }`.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## UserApi (via `PCore.getUserApi()`)
|
|
127
|
+
|
|
128
|
+
| Method | Signature | Purpose |
|
|
129
|
+
| ------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------ |
|
|
130
|
+
| `getOperatorDetails(userID, isBusinessID?)` | `(userID: string, isBusinessID?: boolean): Promise<object>` | Retrieves glimpse/profile data for a user. |
|
|
131
|
+
|
|
132
|
+
**Example:**
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
// The typedefs type the result as a bare `object`; at runtime it is an Axios-style response, so cast to read `.data`.
|
|
136
|
+
const { data } = (await PCore.getUserApi().getOperatorDetails(operatorID)) as { data: Record<string, unknown> };
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## CaseFollowerApi (via `PCore.getCaseFollowerApi()`)
|
|
142
|
+
|
|
143
|
+
| Method | Signature | Purpose |
|
|
144
|
+
| ------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------- |
|
|
145
|
+
| `addCaseFollower(caseID, userID, context)` | `(caseID: string, userID: string[], context: string): Promise<object>` | Adds one or more followers (user IDs) to a case. |
|
|
146
|
+
| `deleteCaseFollower(caseID, followerID, context)` | `(caseID: string, followerID: string, context: string): Promise<AxiosResponse>` | Removes a follower from a case. |
|
|
147
|
+
| `getCaseFollowers(caseID, context)` | `(caseID: string, context: string): Promise<Follower[]>` | Retrieves the followers of a case (`Follower = { name: string; ID: string; email: string }`). |
|
|
148
|
+
|
|
149
|
+
**Example:**
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
const { addCaseFollower, getCaseFollowers } = PCore.getCaseFollowerApi();
|
|
153
|
+
await addCaseFollower(caseID, [operatorID], context);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## CaseUtils (via `PCore.getCaseUtils()`)
|
|
159
|
+
|
|
160
|
+
| Method | Signature | Purpose |
|
|
161
|
+
| ---------------------------------- | ------------------------------------------- | ----------------------------------------------------------------- |
|
|
162
|
+
| `isCaseActive(key, target)` | `(key: string, target: string): boolean` | Checks whether a case is active or inactive. |
|
|
163
|
+
| `isExternalCaseType(className)` | `(className: string): boolean` | Checks whether a class name corresponds to an external case type. |
|
|
164
|
+
| `isObjectCaseType(className)` | `(className: string \| undefined): boolean` | Checks whether a class is a data-object case type. |
|
|
165
|
+
| `isExternalObject(className)` | `(className: string): boolean` | Checks whether a class is an external object. |
|
|
166
|
+
| `isRemoteCase(caseClassName)` | `(caseClassName: string): boolean` | Checks whether a case class is a remote (coexistence) case. |
|
|
167
|
+
| `shouldUseUnifiedHandling()` | `(): boolean` | Returns whether unified case/object handling is active. |
|
|
168
|
+
| `getCaseMessages(containerItemID)` | `(containerItemID: string): unknown[]` | Returns the confirmation/case messages for a container item. |
|
|
169
|
+
|
|
170
|
+
**Example:**
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
const isObjectType = PCore.getCaseUtils().isObjectCaseType(caseClassName);
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## RelatedCasesApi (via `PCore.getRelatedCasesApi()`)
|
|
179
|
+
|
|
180
|
+
| Method | Signature | Purpose |
|
|
181
|
+
| --------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------ |
|
|
182
|
+
| `getRelatedCases(caseID, context)` | `(caseID: string, context: string): Promise<object>` | Retrieves a case's related cases. |
|
|
183
|
+
| `addRelatedCases(caseID, relatedCases, context)` | `(caseID: string, relatedCases: object[], context: string): Promise<object>` | Relates one or more cases to a case. |
|
|
184
|
+
| `removeRelatedCase(caseID, relatedCaseID, context)` | `(caseID: string, relatedCaseID: string, context: string): Promise<AxiosResponse>` | Removes a related-case relationship. |
|
|
185
|
+
|
|
186
|
+
**Example:**
|
|
187
|
+
|
|
188
|
+
```typescript
|
|
189
|
+
const { getRelatedCases } = PCore.getRelatedCasesApi();
|
|
190
|
+
const relatedCases = await getRelatedCases(caseID, context);
|
|
191
|
+
```
|