@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,618 @@
|
|
|
1
|
+
# CaseInfo, DataInfo & LocalizationService
|
|
2
|
+
|
|
3
|
+
> Part of the [PCore / PConnect API Reference skills](../README.md). `CaseInfo` is obtained via `pConn.getCaseInfo()`, `DataInfo` via `pConn.getDataInfo()`, and `LocalizationService` via `pConn.getLocalizationService()`.
|
|
4
|
+
|
|
5
|
+
## CaseInfo
|
|
6
|
+
|
|
7
|
+
### `getCaseStages(caseID, contextName, options?)`
|
|
8
|
+
|
|
9
|
+
**Purpose:** Fetches (asynchronously, from the server) the case stages for a specified case.
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
getCaseStages(caseID: string, contextName: string, options?: { caseTypeID?: string }): Promise<unknown>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Example:**
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
const stages = await pConn.getCaseInfo().getCaseStages(caseID, pConn.getContextName());
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Notes:** Distinct from the synchronous `pConn.getCaseStages()` on the `PConnect` object itself, which reads stages directly from state without a network call — see [pconnect-case-validation-utilities.md](./pconnect-case-validation-utilities.md#getcasestages).
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### `getCaseActions(caseID, contextName, options?)`
|
|
28
|
+
|
|
29
|
+
**Purpose:** Fetches (asynchronously, from the server) the available case actions/processes for a specified case.
|
|
30
|
+
|
|
31
|
+
**Signature:**
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
getCaseActions(caseID: string, contextName: string, options?: { caseTypeID?: string }): Promise<unknown>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Example:**
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
const actions = await pConn.getCaseInfo().getCaseActions(caseID, pConn.getContextName());
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### `getCaseTypeName()`
|
|
46
|
+
|
|
47
|
+
**Purpose:** Returns the case type's name.
|
|
48
|
+
|
|
49
|
+
**Signature:**
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
getCaseTypeName(): string | undefined
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Example:**
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
const caseType = pConn.getCaseInfo().getCaseTypeName();
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### `getName()`
|
|
64
|
+
|
|
65
|
+
**Purpose:** Returns the case's name/label.
|
|
66
|
+
|
|
67
|
+
**Signature:**
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
getName(): string
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Example:**
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
const caseName = pConn.getCaseInfo().getName();
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
### `getClassName()`
|
|
82
|
+
|
|
83
|
+
**Purpose:** Returns the case's class name.
|
|
84
|
+
|
|
85
|
+
**Signature:**
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
getClassName(): string
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Example:**
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
const classID = pConn.getCaseInfo().getClassName();
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### `getAvailableProcesses()`
|
|
100
|
+
|
|
101
|
+
**Purpose:** Returns the case's available processes.
|
|
102
|
+
|
|
103
|
+
**Signature:**
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
getAvailableProcesses(): unknown[]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Example:**
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
const processes = pConn.getCaseInfo().getAvailableProcesses();
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### `getKey()`
|
|
118
|
+
|
|
119
|
+
**Purpose:** Returns the case's full key, including class.
|
|
120
|
+
|
|
121
|
+
**Signature:**
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
getKey(): string
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Example:**
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
const caseKey = pConn.getCaseInfo().getKey();
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### `getObjectKey()`
|
|
136
|
+
|
|
137
|
+
**Purpose:** Returns the encoded object identifier for a data-object context.
|
|
138
|
+
|
|
139
|
+
**Signature:**
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
getObjectKey(): string
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Example:**
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
const objectKey = pConn.getCaseInfo().getObjectKey();
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### `getID()`
|
|
154
|
+
|
|
155
|
+
**Purpose:** Returns the short case ID.
|
|
156
|
+
|
|
157
|
+
**Signature:**
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
getID(): string | undefined
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Example:**
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
const caseId = pConn.getCaseInfo().getID();
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### `getAssignmentID()`
|
|
172
|
+
|
|
173
|
+
**Purpose:** Returns the ID of the current assignment.
|
|
174
|
+
|
|
175
|
+
**Signature:**
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
getAssignmentID(): string
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Example:**
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
const assignmentId = pConn.getCaseInfo().getAssignmentID();
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### `getActions()`
|
|
190
|
+
|
|
191
|
+
**Purpose:** Returns the case's action buttons (main and secondary).
|
|
192
|
+
|
|
193
|
+
**Signature:**
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
getActions(): ActionButtons
|
|
197
|
+
|
|
198
|
+
// ActionButtons = { main?: SecondaryButton[]; secondary?: SecondaryButton[] } | undefined
|
|
199
|
+
// SecondaryButton = { actionID: string; jsAction: string; name: string; isErrorButton?: boolean; buttonType?: string }
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Example:**
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
const { main = [], secondary = [] } = pConn.getCaseInfo().getActions() ?? {};
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
### `getActiveFlowActionID()`
|
|
211
|
+
|
|
212
|
+
**Purpose:** Returns the ID of the flow action currently being rendered.
|
|
213
|
+
|
|
214
|
+
**Signature:**
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
getActiveFlowActionID(): string
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Example:**
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
const flowActionID = pConn.getCaseInfo().getActiveFlowActionID();
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### `getParentCaseInfo()`
|
|
229
|
+
|
|
230
|
+
**Purpose:** Returns parent case info when the current assignment belongs to a child case.
|
|
231
|
+
|
|
232
|
+
**Signature:**
|
|
233
|
+
|
|
234
|
+
```typescript
|
|
235
|
+
getParentCaseInfo(): unknown
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**Example:**
|
|
239
|
+
|
|
240
|
+
```typescript
|
|
241
|
+
const parentCaseInfo = pConn.getCaseInfo()?.getParentCaseInfo();
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
### `isPerform()`
|
|
247
|
+
|
|
248
|
+
**Purpose:** Returns `true` if the view is in perform (edit) mode.
|
|
249
|
+
|
|
250
|
+
**Signature:**
|
|
251
|
+
|
|
252
|
+
```typescript
|
|
253
|
+
isPerform(): boolean
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
**Example:**
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
const isPerform = pConn.getCaseInfo().isPerform();
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
### `isReview()`
|
|
265
|
+
|
|
266
|
+
**Purpose:** Returns `true` if the view is in review mode.
|
|
267
|
+
|
|
268
|
+
**Signature:**
|
|
269
|
+
|
|
270
|
+
```typescript
|
|
271
|
+
isReview(): boolean
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Example:**
|
|
275
|
+
|
|
276
|
+
```typescript
|
|
277
|
+
const isReview = pConn.getCaseInfo().isReview();
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
### `isReviewAfterCreateStage()`
|
|
283
|
+
|
|
284
|
+
**Purpose:** Returns `true` if the case is in review mode and its last completed stage was create-type.
|
|
285
|
+
|
|
286
|
+
**Signature:**
|
|
287
|
+
|
|
288
|
+
```typescript
|
|
289
|
+
isReviewAfterCreateStage(): boolean
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Example:**
|
|
293
|
+
|
|
294
|
+
```typescript
|
|
295
|
+
const isReviewAfterCreate = pConn.getCaseInfo().isReviewAfterCreateStage();
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
### `getCurrentAssignmentViewName()`
|
|
301
|
+
|
|
302
|
+
**Purpose:** Returns the name of the current assignment's view.
|
|
303
|
+
|
|
304
|
+
**Signature:**
|
|
305
|
+
|
|
306
|
+
```typescript
|
|
307
|
+
getCurrentAssignmentViewName(): string | null
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Example:**
|
|
311
|
+
|
|
312
|
+
```typescript
|
|
313
|
+
const viewName = pConn.getCaseInfo().getCurrentAssignmentViewName();
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
### `getCurrentAssignmentViewClassName()`
|
|
319
|
+
|
|
320
|
+
**Purpose:** Returns the class name of the current assignment's view.
|
|
321
|
+
|
|
322
|
+
**Signature:**
|
|
323
|
+
|
|
324
|
+
```typescript
|
|
325
|
+
getCurrentAssignmentViewClassName(): string | null
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Example:**
|
|
329
|
+
|
|
330
|
+
```typescript
|
|
331
|
+
const viewClass = pConn.getCaseInfo().getCurrentAssignmentViewClassName();
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
### `getBusinessID()`
|
|
337
|
+
|
|
338
|
+
**Purpose:** Returns the case's business ID (distinct from the internal key).
|
|
339
|
+
|
|
340
|
+
**Signature:**
|
|
341
|
+
|
|
342
|
+
```typescript
|
|
343
|
+
getBusinessID(): string
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
**Example:**
|
|
347
|
+
|
|
348
|
+
```typescript
|
|
349
|
+
const businessID = pConn.getCaseInfo().getBusinessID();
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
### `getAssignments()`
|
|
355
|
+
|
|
356
|
+
**Purpose:** Returns the case's assignments.
|
|
357
|
+
|
|
358
|
+
**Signature:**
|
|
359
|
+
|
|
360
|
+
```typescript
|
|
361
|
+
getAssignments(): unknown
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
**Example:**
|
|
365
|
+
|
|
366
|
+
```typescript
|
|
367
|
+
const assignments = pConn.getCaseInfo().getAssignments();
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
### `getChildAssignments()`
|
|
373
|
+
|
|
374
|
+
**Purpose:** Returns child cases' assignments.
|
|
375
|
+
|
|
376
|
+
**Signature:**
|
|
377
|
+
|
|
378
|
+
```typescript
|
|
379
|
+
getChildAssignments(): unknown
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**Example:**
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
const childAssignments = pConn.getCaseInfo().getChildAssignments();
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
### `isCaseWideLocalAction()`
|
|
391
|
+
|
|
392
|
+
**Purpose:** Checks whether the current action is a case-wide local action.
|
|
393
|
+
|
|
394
|
+
**Signature:**
|
|
395
|
+
|
|
396
|
+
```typescript
|
|
397
|
+
isCaseWideLocalAction(): boolean
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
**Example:**
|
|
401
|
+
|
|
402
|
+
```typescript
|
|
403
|
+
if (pConn.getCaseInfo().isCaseWideLocalAction()) {
|
|
404
|
+
// adjust rendering for a case-wide local action
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
### `getAllAssignments()`
|
|
411
|
+
|
|
412
|
+
**Purpose:** Returns all assignments — the case's own assignments plus any child-case assignments combined.
|
|
413
|
+
|
|
414
|
+
**Signature:**
|
|
415
|
+
|
|
416
|
+
```typescript
|
|
417
|
+
getAllAssignments(): unknown[]
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Example:**
|
|
421
|
+
|
|
422
|
+
```typescript
|
|
423
|
+
const allAssignments = pConn.getCaseInfo().getAllAssignments();
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
### `getActiveCaseActionName()`
|
|
429
|
+
|
|
430
|
+
**Purpose:** Returns the name of the currently active case action.
|
|
431
|
+
|
|
432
|
+
**Signature:**
|
|
433
|
+
|
|
434
|
+
```typescript
|
|
435
|
+
getActiveCaseActionName(): string
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**Example:**
|
|
439
|
+
|
|
440
|
+
```typescript
|
|
441
|
+
const activeActionName = pConn.getCaseInfo().getActiveCaseActionName();
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
### `getFirstCaseActionName()`
|
|
447
|
+
|
|
448
|
+
**Purpose:** Returns the name of the first configured case action.
|
|
449
|
+
|
|
450
|
+
**Signature:**
|
|
451
|
+
|
|
452
|
+
```typescript
|
|
453
|
+
getFirstCaseActionName(): string
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
**Example:**
|
|
457
|
+
|
|
458
|
+
```typescript
|
|
459
|
+
const firstActionName = pConn.getCaseInfo().getFirstCaseActionName();
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
### `hasAssignments()`
|
|
465
|
+
|
|
466
|
+
**Purpose:** Checks whether the case has any assignments.
|
|
467
|
+
|
|
468
|
+
**Signature:**
|
|
469
|
+
|
|
470
|
+
```typescript
|
|
471
|
+
hasAssignments(): boolean
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
**Example:**
|
|
475
|
+
|
|
476
|
+
```typescript
|
|
477
|
+
if (pConn.getCaseInfo().hasAssignments()) {
|
|
478
|
+
// render assignment-dependent UI
|
|
479
|
+
}
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
### `hasMessages()`
|
|
485
|
+
|
|
486
|
+
**Purpose:** Checks whether the case has any messages.
|
|
487
|
+
|
|
488
|
+
**Signature:**
|
|
489
|
+
|
|
490
|
+
```typescript
|
|
491
|
+
hasMessages(): boolean
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
**Example:**
|
|
495
|
+
|
|
496
|
+
```typescript
|
|
497
|
+
if (pConn.getCaseInfo().hasMessages()) {
|
|
498
|
+
// render a messages banner
|
|
499
|
+
}
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
### `hasGetNextWorkLinks()`
|
|
505
|
+
|
|
506
|
+
**Purpose:** Checks whether "get next work" links are available for the case.
|
|
507
|
+
|
|
508
|
+
**Signature:**
|
|
509
|
+
|
|
510
|
+
```typescript
|
|
511
|
+
hasGetNextWorkLinks(): boolean
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
**Example:**
|
|
515
|
+
|
|
516
|
+
```typescript
|
|
517
|
+
if (pConn.getCaseInfo().hasGetNextWorkLinks()) {
|
|
518
|
+
// show a "Get Next Work" action
|
|
519
|
+
}
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## DataInfo
|
|
525
|
+
|
|
526
|
+
### `getContextKey()`
|
|
527
|
+
|
|
528
|
+
**Purpose:** Returns the context key for the data object bound to the current component (the data-object equivalent of `CaseInfo.getID()`).
|
|
529
|
+
|
|
530
|
+
**Signature:**
|
|
531
|
+
|
|
532
|
+
```typescript
|
|
533
|
+
getContextKey(): string | undefined
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
**Example:**
|
|
537
|
+
|
|
538
|
+
```typescript
|
|
539
|
+
const contextKey = pConn.getDataInfo().getContextKey();
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
---
|
|
543
|
+
|
|
544
|
+
## LocalizationService
|
|
545
|
+
|
|
546
|
+
Obtained via `pConn.getLocalizationService(localeReference?)` — see [pconnect-reference-context-component.md](./pconnect-reference-context-component.md#getlocalizationservicelocalereference).
|
|
547
|
+
|
|
548
|
+
### `getLocalizedText(input, args?)`
|
|
549
|
+
|
|
550
|
+
**Purpose:** Retrieves the localized value for a given key/text and substitutes any token arguments.
|
|
551
|
+
|
|
552
|
+
**Signature:**
|
|
553
|
+
|
|
554
|
+
```typescript
|
|
555
|
+
getLocalizedText(input: string, args?: string[]): string
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
**Example:**
|
|
559
|
+
|
|
560
|
+
```typescript
|
|
561
|
+
const label = pConn.getLocalizationService().getLocalizedText('Submit');
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
**Notes:** This is the recommended replacement for the deprecated `pConn.getLocalizedValue()`.
|
|
565
|
+
|
|
566
|
+
---
|
|
567
|
+
|
|
568
|
+
### `getLocalizedMessage(input, args?)`
|
|
569
|
+
|
|
570
|
+
**Purpose:** Retrieves a localized message string from message locale fields (rather than general field-label text).
|
|
571
|
+
|
|
572
|
+
**Signature:**
|
|
573
|
+
|
|
574
|
+
```typescript
|
|
575
|
+
getLocalizedMessage(input: string, args?: string[]): string
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
**Example:**
|
|
579
|
+
|
|
580
|
+
```typescript
|
|
581
|
+
const message = pConn.getLocalizationService().getLocalizedMessage('pyMessageKey');
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
---
|
|
585
|
+
|
|
586
|
+
### `getLocalizedDataPage(input, dataPageName, fieldName, args?)`
|
|
587
|
+
|
|
588
|
+
**Purpose:** Retrieves localized text for a given data page name and field name (for example, option labels sourced from a data page).
|
|
589
|
+
|
|
590
|
+
**Signature:**
|
|
591
|
+
|
|
592
|
+
```typescript
|
|
593
|
+
getLocalizedDataPage(input: string, dataPageName: string, fieldName: string, args?: string[]): string
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
**Example:**
|
|
597
|
+
|
|
598
|
+
```typescript
|
|
599
|
+
const optionLabel = pConn.getLocalizationService().getLocalizedDataPage(optionText, 'D_MyOptions', 'DisplayName');
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
---
|
|
603
|
+
|
|
604
|
+
### `setLookupList(lookupList)`
|
|
605
|
+
|
|
606
|
+
**Purpose:** Sets a custom lookup list used to determine the locale-resolution order for this `LocalizationService` instance.
|
|
607
|
+
|
|
608
|
+
**Signature:**
|
|
609
|
+
|
|
610
|
+
```typescript
|
|
611
|
+
setLookupList(lookupList: string[]): void
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
**Example:**
|
|
615
|
+
|
|
616
|
+
```typescript
|
|
617
|
+
pConn.getLocalizationService().setLookupList(['CASE!MY-CASE-TYPE', 'WORK-']);
|
|
618
|
+
```
|