@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,238 @@
|
|
|
1
|
+
# PConnect: Case & Data Info, Validation Checks, Sub-API Access Points
|
|
2
|
+
|
|
3
|
+
> Part of the [PCore / PConnect API Reference skills](../README.md). Methods documented here are called on a `PConnect` instance (`pConn`), obtained via the `getPConnect()` prop passed to every component.
|
|
4
|
+
>
|
|
5
|
+
> `getActionsApi()`, `getValidationApi()`, `getContainerManager()`, `getCaseInfo()`, `getDataInfo()`, and `getListActions()` are accessors only — see [pconnect-actions-api.md](./pconnect-actions-api.md), [pconnect-validation-api.md](./pconnect-validation-api.md), [pconnect-container-manager.md](./pconnect-container-manager.md), [pconnect-case-info-data-info-localization.md](./pconnect-case-info-data-info-localization.md), and [pconnect-list-actions.md](./pconnect-list-actions.md) for the full method catalogs of the objects they return.
|
|
6
|
+
|
|
7
|
+
## `getCaseInfo()`
|
|
8
|
+
|
|
9
|
+
**Purpose:** Returns a `CaseInfo` instance for the case bound to the current context — the entry point for case-level accessors (ID, class name, key, business ID, stages, and so on).
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
getCaseInfo(): CaseInfo
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Example:**
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
const caseId = pConn.getCaseInfo().getBusinessID();
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Notes:** See [pconnect-case-info-data-info-localization.md](./pconnect-case-info-data-info-localization.md) for the full `CaseInfo` method catalog.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## `getDataInfo()`
|
|
28
|
+
|
|
29
|
+
**Purpose:** Returns a `DataInfo` instance for the data object bound to the current context.
|
|
30
|
+
|
|
31
|
+
**Signature:**
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
getDataInfo(): DataInfo
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Example:**
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
const contextKey = pConn.getDataInfo().getContextKey();
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Notes:** See [pconnect-case-info-data-info-localization.md](./pconnect-case-info-data-info-localization.md) for the full `DataInfo` method catalog.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## `getCaseSummary()`
|
|
48
|
+
|
|
49
|
+
**Purpose:** Returns a snapshot of case summary information (case ID, urgency, class, name, and related metadata). Per the typedefs the object has `caseID` (the case ID), `ID` (the **assignment** ID, for example `ASSIGN-WORKLIST ... !FLOW`), `caseClass`, `name`, `urgency`, `routedTo` and `isCaseWideAction()`.
|
|
50
|
+
|
|
51
|
+
**Signature:**
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
getCaseSummary(): Record<string, unknown>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Example:**
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
const caseId = pConn.getCaseSummary().caseID; // `.ID` is the assignment ID, not the case ID
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## `getReferencedUser(userId)`
|
|
66
|
+
|
|
67
|
+
**Purpose:** Looks up a referenced user (from the view's referenced-users data) by user identifier.
|
|
68
|
+
|
|
69
|
+
**Signature:**
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
getReferencedUser(userId: string): { userId: string; UserName: string } | null
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Example:**
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
const userName = pConn.getReferencedUser(userId)?.UserName;
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## `getCaseStages()`
|
|
84
|
+
|
|
85
|
+
**Purpose:** Returns the case's stages, read directly from the current case's data in state.
|
|
86
|
+
|
|
87
|
+
**Signature:**
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
getCaseStages(): unknown[]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Example:**
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
const stages = pConn.getCaseStages();
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Notes:** This is distinct from `CaseInfo.getCaseStages(caseID, contextName)` (a different method, on the sub-API returned by [`getCaseInfo()`](#getcaseinfo)), which fetches stage data asynchronously from the server — see [pconnect-case-info-data-info-localization.md](./pconnect-case-info-data-info-localization.md).
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## `getStageID()`
|
|
104
|
+
|
|
105
|
+
**Purpose:** Returns the current stage ID, read directly from the current case's data in state.
|
|
106
|
+
|
|
107
|
+
**Signature:**
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
getStageID(): string
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Example:**
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
const stageID = pConn.getStageID();
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## `isConditionExist()`
|
|
122
|
+
|
|
123
|
+
**Purpose:** Returns `true` if the component has an expression or a "when" condition configured.
|
|
124
|
+
|
|
125
|
+
**Signature:**
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
isConditionExist(): boolean
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Example:**
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
if (pConn.isConditionExist()) {
|
|
135
|
+
// this component's visibility/value depends on a condition
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## `isBoundToState()`
|
|
142
|
+
|
|
143
|
+
**Purpose:** Returns `true` if the component has any property reference bound to it.
|
|
144
|
+
|
|
145
|
+
**Signature:**
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
isBoundToState(): boolean
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Example:**
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
if (pConn.isBoundToState()) {
|
|
155
|
+
// component reads/writes a state-bound property
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## `getValidationApi()`
|
|
162
|
+
|
|
163
|
+
**Purpose:** Returns a `ValidationApi` instance used to validate the current field.
|
|
164
|
+
|
|
165
|
+
**Signature:**
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
getValidationApi(): ValidationApi
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Example:**
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
const result = pConn.getValidationApi().validate(inputValue);
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Notes:** See [pconnect-validation-api.md](./pconnect-validation-api.md) for the full method catalog.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## `getActionsApi()`
|
|
182
|
+
|
|
183
|
+
**Purpose:** Returns an `ActionsApi` instance used to dispatch case/work-level operations.
|
|
184
|
+
|
|
185
|
+
**Signature:**
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
getActionsApi(): ActionsApi
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Example:**
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
const actionsApi = pConn.getActionsApi();
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Notes:** See [pconnect-actions-api.md](./pconnect-actions-api.md) for the full `ActionsApi` method catalog.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## `getContainerManager()`
|
|
202
|
+
|
|
203
|
+
**Purpose:** Returns a `ContainerManager` instance used to manage the items within a container region.
|
|
204
|
+
|
|
205
|
+
**Signature:**
|
|
206
|
+
|
|
207
|
+
```typescript
|
|
208
|
+
getContainerManager(): ContainerManager
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Example:**
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
const containerManager = pConn.getContainerManager();
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Notes:** See [pconnect-container-manager.md](./pconnect-container-manager.md) for the full method catalog.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## `getListActions()`
|
|
222
|
+
|
|
223
|
+
**Purpose:** Returns a `ListActions` instance with APIs for list-related operations (insert, delete, reorder, and selection) on components bound to page-list data.
|
|
224
|
+
|
|
225
|
+
**Signature:**
|
|
226
|
+
|
|
227
|
+
```typescript
|
|
228
|
+
getListActions(): ListActions
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Example:**
|
|
232
|
+
|
|
233
|
+
```typescript
|
|
234
|
+
const listActions = pConn.getListActions();
|
|
235
|
+
const selectedRows = await listActions.getSelectedRows(true);
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**Notes:** See [pconnect-list-actions.md](./pconnect-list-actions.md) for the full `ListActions` method catalog.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# ContainerManager
|
|
2
|
+
|
|
3
|
+
> Part of the [PCore / PConnect API Reference skills](../README.md). Obtained via `pConn.getContainerManager()`.
|
|
4
|
+
|
|
5
|
+
## `initializeContainers(containerInfo)`
|
|
6
|
+
|
|
7
|
+
**Purpose:** Initializes a container (single or multiple type) within a complex component.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
initializeContainers(containerInfo: { type?: 'single' | 'multiple'; name?: string }): Promise<unknown>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Example:**
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
await pConn.getContainerManager().initializeContainers({ type: 'single', name: containerName });
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## `addContainerItem(containerInfo)`
|
|
24
|
+
|
|
25
|
+
**Purpose:** Adds an item to a container.
|
|
26
|
+
|
|
27
|
+
**Signature:**
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
addContainerItem(containerInfo: {
|
|
31
|
+
context?: string;
|
|
32
|
+
semanticURL?: string;
|
|
33
|
+
containerItemID?: string | null;
|
|
34
|
+
target?: string;
|
|
35
|
+
caseViewMode?: string;
|
|
36
|
+
data?: { coreHeaders?: unknown; classID?: string };
|
|
37
|
+
}): Promise<unknown>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Example:**
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
await pConn.getContainerManager().addContainerItem({ context, semanticURL: '' });
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## `updateContainerItem(containerInfo)`
|
|
49
|
+
|
|
50
|
+
**Purpose:** Updates the data of an existing item within a container.
|
|
51
|
+
|
|
52
|
+
**Signature:**
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
updateContainerItem(containerInfo: { context: string; key?: string; target?: string; data?: Record<string, unknown> }): Promise<unknown>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Example:**
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
await pConn.getContainerManager().updateContainerItem({ context: containerItemID, data: { caseInfo } });
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## `activateContainerItem(containerInfo)`
|
|
67
|
+
|
|
68
|
+
**Purpose:** Activates a specific item within a container (for example, bringing a modal/tab item to the foreground).
|
|
69
|
+
|
|
70
|
+
**Signature:**
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
activateContainerItem(containerInfo: { containerItemID: string; context?: string }): Promise<unknown>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Example:**
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
await pConn.getContainerManager().activateContainerItem({ containerItemID });
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## `removeContainerItem(containerInfo)`
|
|
85
|
+
|
|
86
|
+
**Purpose:** Removes an item from a container.
|
|
87
|
+
|
|
88
|
+
**Signature:**
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
removeContainerItem(containerInfo: { containerItemID: string; skipReleaseLockRequest?: boolean }): Promise<unknown>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Example:**
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
await pConn.getContainerManager().removeContainerItem({ containerItemID });
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## `resetContainers(containerInfo)`
|
|
103
|
+
|
|
104
|
+
**Purpose:** Resets a container (or containers) back to its initial state.
|
|
105
|
+
|
|
106
|
+
**Signature:**
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
resetContainers(containerInfo: { name: string; context: string }): Promise<unknown>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Example:**
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
await pConn.getContainerManager().resetContainers({ name: 'preview', context: 'app' });
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## `addTransientItem(containerInfo)`
|
|
121
|
+
|
|
122
|
+
**Purpose:** Adds a transient item to a container — used to hold values (for example, search filters or inline-edit staging data) that should not be submitted with the case's regular content.
|
|
123
|
+
|
|
124
|
+
**Signature:**
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
addTransientItem(containerInfo: { id: string; sourceContainerItemId?: string }): string
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Example:**
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
const transientId = pConn.getContainerManager().addTransientItem({
|
|
134
|
+
id: 'InlineEdit',
|
|
135
|
+
sourceContainerItemId: pConn.getContextName()
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Notes:** Returns the newly created transient item's ID synchronously (not a `Promise`).
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## `updateTransientData(transientObject)`
|
|
144
|
+
|
|
145
|
+
**Purpose:** Updates the data held by a transient item.
|
|
146
|
+
|
|
147
|
+
**Signature:**
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
updateTransientData(transientObject: { transientItemID: string; data: Record<string, unknown> }): void
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Example:**
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
pConn.getContainerManager().updateTransientData({ transientItemID, data: { comment } });
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## `removeTransientItem(transientItemInfo)`
|
|
162
|
+
|
|
163
|
+
**Purpose:** Removes a transient item.
|
|
164
|
+
|
|
165
|
+
**Signature:**
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
removeTransientItem(transientItemInfo: { transientItemID: string }): void
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Example:**
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
pConn.getContainerManager().removeTransientItem({ transientItemID });
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## `hasContainerItems()`
|
|
180
|
+
|
|
181
|
+
**Purpose:** Checks whether the container has any items.
|
|
182
|
+
|
|
183
|
+
**Signature:**
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
hasContainerItems(): boolean
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Example:**
|
|
190
|
+
|
|
191
|
+
```typescript
|
|
192
|
+
if (pConn.getContainerManager().hasContainerItems()) {
|
|
193
|
+
// container has at least one item
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## `isContainerInitialized()`
|
|
200
|
+
|
|
201
|
+
**Purpose:** Checks whether the container has been initialized.
|
|
202
|
+
|
|
203
|
+
**Signature:**
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
isContainerInitialized(): boolean
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Example:**
|
|
210
|
+
|
|
211
|
+
```typescript
|
|
212
|
+
if (!pConn.getContainerManager().isContainerInitialized()) {
|
|
213
|
+
pConn.getContainerManager().initializeContainers({ type: 'single', name: containerName });
|
|
214
|
+
}
|
|
215
|
+
```
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# ListActions
|
|
2
|
+
|
|
3
|
+
> Part of the [PCore / PConnect API Reference skills](../README.md). Obtained via `pConn.getListActions()`. Used by components that render and edit page-list (repeating) data — tables, lists, and embedded-data grids.
|
|
4
|
+
|
|
5
|
+
## `insert(payload, index, pageRef?, options?)`
|
|
6
|
+
|
|
7
|
+
**Purpose:** Inserts a new row into the referenced list at the given index.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
insert(
|
|
13
|
+
payload: object,
|
|
14
|
+
index: number,
|
|
15
|
+
pageRef?: string,
|
|
16
|
+
options?: { skipStateUpdate?: boolean; insertIfEmpty?: boolean; skipDirtyValidation?: boolean }
|
|
17
|
+
): void
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Example:**
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
pConn.getListActions().insert({ Name: 'New Employee' }, 0);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## `update(payload, index, options?)`
|
|
29
|
+
|
|
30
|
+
**Purpose:** Updates an existing row at the given index in the referenced list.
|
|
31
|
+
|
|
32
|
+
**Signature:**
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
update(payload: object, index: number, options?: { pageRef?: string; skipStateUpdate?: boolean }): void
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Example:**
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
pConn.getListActions().update({ Name: 'John', Experience: 2 }, 0);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## `updateProperty(propertyName, value, options?)`
|
|
47
|
+
|
|
48
|
+
**Purpose:** Updates a single field within a row of the referenced list (rather than the whole row).
|
|
49
|
+
|
|
50
|
+
**Signature:**
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
updateProperty(
|
|
54
|
+
propertyName: string | undefined,
|
|
55
|
+
value: GenericObject | undefined,
|
|
56
|
+
options?: { skipStateUpdate?: boolean; isArrayDeepMerge?: boolean; skipDirtyValidation?: boolean }
|
|
57
|
+
): void
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Example:**
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
pConn.getListActions().updateProperty('.Name', 'John Doe' as unknown as GenericObject);
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Notes:** `GenericObject` is `Record<string, unknown>`. The 5.1.0 typedefs type `value` as `GenericObject | undefined`, even though the typedef's own example passes a string; a primitive therefore needs a cast to compile (as in the example above).
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## `deleteEntry(index, pageRef?, options?)`
|
|
71
|
+
|
|
72
|
+
**Purpose:** Deletes the row at the given index in the referenced list.
|
|
73
|
+
|
|
74
|
+
**Signature:**
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
deleteEntry(index: number, pageRef?: string, options?: { skipStateUpdate?: boolean }): void
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Example:**
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
pConn.getListActions().deleteEntry(0);
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## `reorder(fromIndex, toIndex)`
|
|
89
|
+
|
|
90
|
+
**Purpose:** Moves a row from one position to another within the referenced list.
|
|
91
|
+
|
|
92
|
+
**Signature:**
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
reorder(fromIndex: number, toIndex: number): void
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Example:**
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
pConn.getListActions().reorder(1, 0);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## `setSelectedRows(rows, options?)`
|
|
107
|
+
|
|
108
|
+
**Purpose:** Marks a set of rows as selected/deselected in application state.
|
|
109
|
+
|
|
110
|
+
**Signature:**
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
setSelectedRows(rows: Record<string, unknown>[], options?: { skipPageInstructions: boolean }): Promise<void>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Example:**
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
await pConn.getListActions().setSelectedRows([{ $key: rowKey, $selected: true, Name: 'Alice' }]);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## `getSelectedRows(withPayload?)`
|
|
125
|
+
|
|
126
|
+
**Purpose:** Returns the currently selected rows in the referenced list.
|
|
127
|
+
|
|
128
|
+
**Signature:**
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
getSelectedRows(withPayload?: boolean): Promise<string[] | object[]>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Example:**
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
const selectedRows = await pConn.getListActions().getSelectedRows(true);
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Notes:** When `withPayload` is `false` (the default), resolves to a `string[]` of the selected rows' unique keys; when `true`, resolves to an `object[]` of the full row data.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## `clearSelectedRows()`
|
|
145
|
+
|
|
146
|
+
**Purpose:** Deselects all currently selected rows.
|
|
147
|
+
|
|
148
|
+
**Signature:**
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
clearSelectedRows(): Promise<void>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Example:**
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
await pConn.getListActions().clearSelectedRows();
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## `setVisibility(isVisible)`
|
|
163
|
+
|
|
164
|
+
**Purpose:** Informs the framework whether the referenced editable list is currently mounted on screen, which controls whether page instructions are generated for it.
|
|
165
|
+
|
|
166
|
+
**Signature:**
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
setVisibility(isVisible: boolean): void
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Example:**
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
pConn.getListActions().setVisibility(true);
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## `initDefaultPageInstructions(property, propertyNames, uniqueField?)`
|
|
181
|
+
|
|
182
|
+
**Purpose:** Registers update instructions for a list's existing (already-populated) rows, for fields that need to be included in the submit payload.
|
|
183
|
+
|
|
184
|
+
**Signature:**
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
initDefaultPageInstructions(property: string, propertyNames: string[], uniqueField?: string): void
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Example:**
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
pConn.getListActions().initDefaultPageInstructions('.Employees', ['pyGUID', 'pyName'], '.EmbedListUUID__');
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## `deleteAll(property, options?)`
|
|
199
|
+
|
|
200
|
+
**Purpose:** Deletes every row from the referenced list.
|
|
201
|
+
|
|
202
|
+
**Signature:**
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
deleteAll(property: string, options?: { skipStateUpdate?: boolean }): void
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Example:**
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
pConn.getListActions().deleteAll('.ShippingAddress');
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## `replacePage(property, payload, options?)`
|
|
217
|
+
|
|
218
|
+
**Purpose:** Replaces the data of an embedded page property, resetting its associated fields.
|
|
219
|
+
|
|
220
|
+
**Signature:**
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
replacePage(property: string, payload: object, options?: { skipStateUpdate?: boolean }): void
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Example:**
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
pConn.getListActions().replacePage('.ShippingAddress', { pyCountry: 'US' });
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Notes:** Commonly used for an address field when the country changes and dependent fields (state/province) must reset.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## `deletePage(property, options?)`
|
|
237
|
+
|
|
238
|
+
**Purpose:** Deletes an embedded page property.
|
|
239
|
+
|
|
240
|
+
**Signature:**
|
|
241
|
+
|
|
242
|
+
```typescript
|
|
243
|
+
deletePage(property: string, options?: { skipStateUpdate?: boolean }): void
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Example:**
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
pConn.getListActions().deletePage('.ShippingAddress');
|
|
250
|
+
```
|