@pega/react-sdk-components 23.1.10 → 23.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +17 -0
- package/SECURITY.md +10 -0
- package/lib/bridge/Context/StoreContext.js +3 -3
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +24 -47
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +17 -28
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +2 -2
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -10
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +30 -27
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +9 -15
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/index.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +5 -4
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +23 -12
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -16
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +1 -0
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +7 -11
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +15 -15
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +49 -62
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +2 -3
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +7 -10
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +7 -9
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +5 -11
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +2 -2
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +21 -23
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +8 -3
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +76 -68
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/CancelAlert/index.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +16 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +59 -45
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +13 -34
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +4 -5
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +14 -10
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +8 -8
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +2 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +18 -28
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Decimal/index.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +13 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +105 -29
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +8 -9
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Email/index.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +13 -0
- package/lib/components/field/Group/Group.d.ts.map +1 -0
- package/lib/components/field/Group/Group.js +15 -0
- package/lib/components/field/Group/Group.js.map +1 -0
- package/lib/components/field/Group/index.d.ts +2 -0
- package/lib/components/field/Group/index.d.ts.map +1 -0
- package/lib/components/field/Group/index.js +2 -0
- package/lib/components/field/Group/index.js.map +1 -0
- package/lib/components/field/Integer/Integer.d.ts +1 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +6 -6
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/MultiSelect/Multiselect.d.ts +3 -0
- package/lib/components/field/MultiSelect/Multiselect.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/Multiselect.js +175 -0
- package/lib/components/field/MultiSelect/Multiselect.js.map +1 -0
- package/lib/components/field/MultiSelect/index.d.ts +2 -0
- package/lib/components/field/MultiSelect/index.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/index.js +2 -0
- package/lib/components/field/MultiSelect/index.js.map +1 -0
- package/lib/components/field/MultiSelect/utils.d.ts +10 -0
- package/lib/components/field/MultiSelect/utils.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/utils.js +197 -0
- package/lib/components/field/MultiSelect/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +2 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +25 -28
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +9 -10
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/Phone/index.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +18 -21
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.d.ts +1 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +9 -8
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +7 -9
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +4 -8
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/utils.js +8 -8
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +5 -5
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +2 -2
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +7 -6
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/TextInput/index.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +7 -7
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +6 -6
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/URL/index.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +3 -3
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +11 -11
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js +2 -2
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
- package/lib/components/helpers/attachmentHelpers.js +6 -6
- package/lib/components/helpers/attachmentHelpers.js.map +1 -1
- package/lib/components/helpers/case-utils.d.ts.map +1 -1
- package/lib/components/helpers/case-utils.js +5 -5
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +1 -0
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +4 -1
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js +2 -3
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.js.map +1 -1
- package/lib/components/helpers/event-utils.js +3 -3
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.js +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js +9 -20
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +2 -2
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +13 -14
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +500 -500
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.d.ts +4 -4
- package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Date.js +20 -20
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/common.d.ts.map +1 -1
- package/lib/components/helpers/formatters/common.js +1 -1
- package/lib/components/helpers/formatters/common.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +6 -6
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js +25 -19
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts +5 -0
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -0
- package/lib/components/helpers/instructions-utils.js +36 -0
- package/lib/components/helpers/instructions-utils.js.map +1 -0
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/reactContextHelpers.js +1 -1
- package/lib/components/helpers/reactContextHelpers.js.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +44 -52
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js +6 -8
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.d.ts +1 -1
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js +1 -2
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -1
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +3 -8
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +1 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +2 -2
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +10 -14
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/ActionButtons/index.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +10 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +68 -71
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Assignment/index.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +3 -5
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +4 -5
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/AssignmentCard/index.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +11 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +36 -158
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js +30 -30
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +9 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +36 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +178 -160
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +9 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js +29 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +10 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.js +102 -0
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts +2 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.js +2 -0
- package/lib/components/infra/Containers/SimpleView/index.js.map +1 -0
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +17 -24
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/helpers.d.ts +2 -0
- package/lib/components/infra/Containers/helpers.d.ts.map +1 -0
- package/lib/components/infra/Containers/helpers.js +7 -0
- package/lib/components/infra/Containers/helpers.js.map +1 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +3 -4
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +13 -17
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +10 -12
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +9 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +8 -17
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/DeferLoad/index.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +15 -14
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +11 -15
- package/lib/components/infra/MultiStep/MultiStep.d.ts +5 -7
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +29 -80
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/MultiStep/index.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +103 -105
- package/lib/components/infra/NavBar/NavBar.d.ts +3 -3
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +18 -52
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +9 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +6 -13
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +2 -3
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +2 -3
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +14 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +40 -62
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/RootContainer/index.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +2 -2
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +18 -21
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +6 -8
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +10 -9
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +3 -4
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +6 -11
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.css +22 -23
- package/lib/components/template/AppShell/AppShell.d.ts +6 -7
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +23 -29
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +4 -4
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +3 -3
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +3 -4
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +44 -8
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +3 -4
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +18 -41
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +3 -3
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +37 -7
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +3 -4
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +7 -14
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +4 -4
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +35 -49
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.css +7 -3
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +8 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +5 -14
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +8 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +5 -13
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +3 -4
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +5 -10
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +8 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +5 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +8 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +5 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/index.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +7 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +6 -17
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +2 -2
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +8 -9
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +3 -4
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +3 -9
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +3 -4
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +7 -6
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +2 -2
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +16 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +106 -181
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +4 -6
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +38 -46
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +3 -3
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js +2 -10
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +8 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +5 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js +2 -5
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +3 -5
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -4
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +9 -8
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +2 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -4
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.css +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +10 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +12 -29
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +19 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +17 -20
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +12 -7
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +124 -134
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +14 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +9 -21
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -5
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +4 -4
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +6 -9
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +2 -4
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +4 -4
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +14 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +2 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +4 -4
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +14 -12
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +2 -10
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +8 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +5 -16
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js +2 -5
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +3 -3
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/index.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +3 -2
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +20 -37
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +2 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +10 -19
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +60 -1
- package/lib/components/widget/Attachment/Attachment.d.ts +8 -1
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +279 -353
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/index.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +37 -31
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/CaseHistory/index.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +4 -3
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +2 -4
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +2 -2
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +107 -136
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +4 -4
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +8 -16
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +8 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +57 -35
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -9
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +3 -2
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +8 -23
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryItem/index.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +3 -2
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +3 -3
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +4 -4
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +31 -67
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/components_map.d.ts +2 -2
- package/lib/components_map.d.ts.map +1 -1
- package/lib/components_map.js +4 -2
- package/lib/components_map.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +21 -4
- package/lib/hooks/useConsolidatedRef.js +2 -2
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/sdk-local-component-map.js +2 -2
- package/lib/sdk-pega-component-map.d.ts +6 -0
- package/lib/sdk-pega-component-map.js +106 -100
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +14 -15
- package/package.json +5 -2
- package/lib/components/helpers/auth.d.ts +0 -18
- package/lib/components/helpers/auth.d.ts.map +0 -1
- package/lib/components/helpers/auth.js +0 -752
- package/lib/components/helpers/auth.js.map +0 -1
- package/lib/components/helpers/authManager.d.ts +0 -21
- package/lib/components/helpers/authManager.d.ts.map +0 -1
- package/lib/components/helpers/authManager.js +0 -864
- package/lib/components/helpers/authManager.js.map +0 -1
- package/lib/components/helpers/config_access.d.ts +0 -3
- package/lib/components/helpers/config_access.d.ts.map +0 -1
- package/lib/components/helpers/config_access.js +0 -198
- package/lib/components/helpers/config_access.js.map +0 -1
|
@@ -1,752 +0,0 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
7
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
8
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
9
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
|
-
};
|
|
12
|
-
var _PegaAuth_instances, _PegaAuth_config, _PegaAuth_dynState, _PegaAuth_reloadSS, _PegaAuth_reloadConfig, _PegaAuth_updateConfig, _PegaAuth_importSingleLib, _PegaAuth_importNodeLibs, _PegaAuth_buildAuthorizeUrl, _PegaAuth_authCodeStart, _PegaAuth_updateSessionIndex, _PegaAuth_sha256Hash, _PegaAuth_encode64, _PegaAuth_base64UrlSafeEncode, _PegaAuth_getRandomString, _PegaAuth_getCodeChallenge, _PegaAuth_getAgent;
|
|
13
|
-
class PegaAuth {
|
|
14
|
-
// Current properties within dynState structure:
|
|
15
|
-
// codeVerifier, state, sessionIndex, sessionIndexAttempts, acRedirectUri
|
|
16
|
-
constructor(ssKeyConfig, ssKeyDynState) {
|
|
17
|
-
_PegaAuth_instances.add(this);
|
|
18
|
-
// The properties within config structure are expected to be more static config values that are then
|
|
19
|
-
// used to properly make various OAuth endpoint calls.
|
|
20
|
-
_PegaAuth_config.set(this, null);
|
|
21
|
-
// Any dynamic state is stored separately in its own structure. If a sessionStorage key is passed in
|
|
22
|
-
// without a Dynamic State key.
|
|
23
|
-
_PegaAuth_dynState.set(this, {});
|
|
24
|
-
if (typeof ssKeyConfig === 'string') {
|
|
25
|
-
this.ssKeyConfig = ssKeyConfig;
|
|
26
|
-
this.ssKeyDynState = ssKeyDynState || `${ssKeyConfig}_DS`;
|
|
27
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_reloadConfig).call(this);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
// object with config structure is passed in
|
|
31
|
-
__classPrivateFieldSet(this, _PegaAuth_config, ssKeyConfig, "f");
|
|
32
|
-
__classPrivateFieldSet(this, _PegaAuth_dynState, ssKeyDynState, "f");
|
|
33
|
-
}
|
|
34
|
-
this.urlencoded = 'application/x-www-form-urlencoded';
|
|
35
|
-
this.isNode = typeof window === 'undefined';
|
|
36
|
-
// For isNode path the below attributes are initialized on first method invocation
|
|
37
|
-
if (!this.isNode) {
|
|
38
|
-
this.crypto = window.crypto;
|
|
39
|
-
this.subtle = window.crypto.subtle;
|
|
40
|
-
}
|
|
41
|
-
if (Object.keys(__classPrivateFieldGet(this, _PegaAuth_config, "f")).length > 0) {
|
|
42
|
-
if (!__classPrivateFieldGet(this, _PegaAuth_config, "f").serverType) {
|
|
43
|
-
__classPrivateFieldGet(this, _PegaAuth_config, "f").serverType = 'infinity';
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
throw new Error('invalid config settings');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
async login() {
|
|
51
|
-
if (this.isNode && !this.crypto) {
|
|
52
|
-
// Deferring dynamic loading of node libraries til this first method to avoid doing this in constructor
|
|
53
|
-
await __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_importNodeLibs).call(this);
|
|
54
|
-
}
|
|
55
|
-
const { grantType, noPKCE } = __classPrivateFieldGet(this, _PegaAuth_config, "f");
|
|
56
|
-
if (grantType && grantType !== 'authCode') {
|
|
57
|
-
return this.getToken();
|
|
58
|
-
}
|
|
59
|
-
// Make sure browser in a secure context, else PKCE will fail
|
|
60
|
-
if (!this.isNode && !noPKCE && !window.isSecureContext) {
|
|
61
|
-
throw new Error(`Authorization code grant flow failed due to insecure browser context at ${window.location.origin}. Use localhost or https.`);
|
|
62
|
-
}
|
|
63
|
-
return __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_authCodeStart).call(this);
|
|
64
|
-
}
|
|
65
|
-
// Login redirect
|
|
66
|
-
loginRedirect() {
|
|
67
|
-
// eslint-disable-next-line no-restricted-globals
|
|
68
|
-
const state = btoa(location.origin);
|
|
69
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_buildAuthorizeUrl).call(this, state).then((url) => {
|
|
70
|
-
// eslint-disable-next-line no-restricted-globals
|
|
71
|
-
location.href = url;
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
// check state
|
|
75
|
-
checkStateMatch(state) {
|
|
76
|
-
return state === __classPrivateFieldGet(this, _PegaAuth_dynState, "f").state;
|
|
77
|
-
}
|
|
78
|
-
// For PKCE token endpoint includes code_verifier
|
|
79
|
-
getToken(authCode) {
|
|
80
|
-
// Reload config to pick up the previously stored codeVerifier
|
|
81
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_reloadConfig).call(this);
|
|
82
|
-
const { serverType, isolationId, clientId, clientSecret, tokenUri, grantType, customTokenParams, userIdentifier, password, noPKCE } = __classPrivateFieldGet(this, _PegaAuth_config, "f");
|
|
83
|
-
const { sessionIndex, acRedirectUri, codeVerifier } = __classPrivateFieldGet(this, _PegaAuth_dynState, "f");
|
|
84
|
-
const bAuthCode = !grantType || grantType === 'authCode';
|
|
85
|
-
if (bAuthCode && !authCode && !this.isNode) {
|
|
86
|
-
const queryString = window.location.search;
|
|
87
|
-
const urlParams = new URLSearchParams(queryString);
|
|
88
|
-
authCode = urlParams.get('code');
|
|
89
|
-
}
|
|
90
|
-
const formData = new URLSearchParams();
|
|
91
|
-
formData.append('client_id', clientId);
|
|
92
|
-
if (clientSecret) {
|
|
93
|
-
formData.append('client_secret', clientSecret);
|
|
94
|
-
}
|
|
95
|
-
/* eslint-disable camelcase */
|
|
96
|
-
const fullGTName = {
|
|
97
|
-
authCode: 'authorization_code',
|
|
98
|
-
clientCreds: 'client_credentials',
|
|
99
|
-
customBearer: 'custom-bearer',
|
|
100
|
-
passwordCreds: 'password'
|
|
101
|
-
}[grantType];
|
|
102
|
-
const grant_type = fullGTName || grantType || 'authorization_code';
|
|
103
|
-
formData.append('grant_type', grant_type);
|
|
104
|
-
if (serverType === 'launchpad' && grantType !== 'authCode') {
|
|
105
|
-
formData.append('isolation_ids', isolationId);
|
|
106
|
-
}
|
|
107
|
-
if (bAuthCode) {
|
|
108
|
-
formData.append('code', authCode);
|
|
109
|
-
formData.append('redirect_uri', acRedirectUri);
|
|
110
|
-
if (!noPKCE) {
|
|
111
|
-
formData.append('code_verifier', codeVerifier);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
else if (sessionIndex) {
|
|
115
|
-
formData.append('session_index', sessionIndex);
|
|
116
|
-
}
|
|
117
|
-
/* eslint-enable camelcase */
|
|
118
|
-
if (grantType === 'customBearer' && customTokenParams) {
|
|
119
|
-
Object.keys(customTokenParams).forEach((param) => {
|
|
120
|
-
formData.append(param, customTokenParams[param]);
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
if (grantType !== 'authCode') {
|
|
124
|
-
formData.append('enable_psyncId', 'true');
|
|
125
|
-
}
|
|
126
|
-
if (grantType === 'passwordCreds') {
|
|
127
|
-
formData.append('username', userIdentifier);
|
|
128
|
-
formData.append('password', atob(password));
|
|
129
|
-
}
|
|
130
|
-
return fetch(tokenUri, {
|
|
131
|
-
agent: __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_getAgent).call(this),
|
|
132
|
-
method: 'POST',
|
|
133
|
-
headers: new Headers({
|
|
134
|
-
'content-type': this.urlencoded
|
|
135
|
-
}),
|
|
136
|
-
body: formData.toString()
|
|
137
|
-
})
|
|
138
|
-
.then((response) => response.json())
|
|
139
|
-
.then((token) => {
|
|
140
|
-
if (token.errors || token.error) {
|
|
141
|
-
// eslint-disable-next-line no-console
|
|
142
|
-
console.error(`Token endpoint error: ${JSON.stringify(token.errors || token.error)}`);
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
// .expires_in contains the # of seconds before access token expires
|
|
146
|
-
// add property to keep track of current time when the token expires
|
|
147
|
-
token.eA = Date.now() + token.expires_in * 1000;
|
|
148
|
-
// Clear authCode related config state: state, codeVerifier, acRedirectUri
|
|
149
|
-
if (__classPrivateFieldGet(this, _PegaAuth_dynState, "f").state) {
|
|
150
|
-
delete __classPrivateFieldGet(this, _PegaAuth_dynState, "f").state;
|
|
151
|
-
}
|
|
152
|
-
if (__classPrivateFieldGet(this, _PegaAuth_dynState, "f").codeVerifier) {
|
|
153
|
-
delete __classPrivateFieldGet(this, _PegaAuth_dynState, "f").codeVerifier;
|
|
154
|
-
}
|
|
155
|
-
if (__classPrivateFieldGet(this, _PegaAuth_dynState, "f").acRedirectUri) {
|
|
156
|
-
delete __classPrivateFieldGet(this, _PegaAuth_dynState, "f").acRedirectUri;
|
|
157
|
-
}
|
|
158
|
-
// If there is a session_index then move this to the peConfig structure (as used on authorize)
|
|
159
|
-
if (token.session_index) {
|
|
160
|
-
__classPrivateFieldGet(this, _PegaAuth_dynState, "f").sessionIndex = token.session_index;
|
|
161
|
-
}
|
|
162
|
-
// If we got a token and have a session index, then reset the sessionIndexAttempts
|
|
163
|
-
if (__classPrivateFieldGet(this, _PegaAuth_dynState, "f").sessionIndex) {
|
|
164
|
-
__classPrivateFieldGet(this, _PegaAuth_dynState, "f").sessionIndexAttempts = 0;
|
|
165
|
-
}
|
|
166
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateConfig).call(this);
|
|
167
|
-
}
|
|
168
|
-
return token;
|
|
169
|
-
})
|
|
170
|
-
.catch((e) => {
|
|
171
|
-
// eslint-disable-next-line no-console
|
|
172
|
-
console.error(`Token endpoint error: ${e}`);
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
/* eslint-disable camelcase */
|
|
176
|
-
async refreshToken(refresh_token) {
|
|
177
|
-
const { clientId, clientSecret, tokenUri } = __classPrivateFieldGet(this, _PegaAuth_config, "f");
|
|
178
|
-
if (this.isNode && !this.crypto) {
|
|
179
|
-
// Deferring dynamic loading of node libraries til this first method to avoid doing this in constructor
|
|
180
|
-
await __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_importNodeLibs).call(this);
|
|
181
|
-
}
|
|
182
|
-
if (!refresh_token) {
|
|
183
|
-
return null;
|
|
184
|
-
}
|
|
185
|
-
const formData = new URLSearchParams();
|
|
186
|
-
formData.append('client_id', clientId);
|
|
187
|
-
if (clientSecret) {
|
|
188
|
-
formData.append('client_secret', clientSecret);
|
|
189
|
-
}
|
|
190
|
-
formData.append('grant_type', 'refresh_token');
|
|
191
|
-
formData.append('refresh_token', refresh_token);
|
|
192
|
-
return fetch(tokenUri, {
|
|
193
|
-
agent: __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_getAgent).call(this),
|
|
194
|
-
method: 'POST',
|
|
195
|
-
headers: new Headers({
|
|
196
|
-
'content-type': this.urlencoded
|
|
197
|
-
}),
|
|
198
|
-
body: formData.toString()
|
|
199
|
-
})
|
|
200
|
-
.then((response) => {
|
|
201
|
-
if (!response.ok && response.status === 401) {
|
|
202
|
-
return null;
|
|
203
|
-
}
|
|
204
|
-
return response.json();
|
|
205
|
-
})
|
|
206
|
-
.then((token) => {
|
|
207
|
-
if (token) {
|
|
208
|
-
// .expires_in contains the # of seconds before access token expires
|
|
209
|
-
// add property to keep track of current time when the token expires
|
|
210
|
-
token.eA = Date.now() + token.expires_in * 1000;
|
|
211
|
-
}
|
|
212
|
-
return token;
|
|
213
|
-
})
|
|
214
|
-
.catch((e) => {
|
|
215
|
-
// eslint-disable-next-line no-console
|
|
216
|
-
console.warn(`Refresh token failed: ${e}`);
|
|
217
|
-
return null;
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
async revokeTokens(access_token, refresh_token = null) {
|
|
221
|
-
if (Object.keys(__classPrivateFieldGet(this, _PegaAuth_config, "f")).length === 0) {
|
|
222
|
-
// Must have a config structure to proceed
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
const { clientId, clientSecret, revokeUri } = __classPrivateFieldGet(this, _PegaAuth_config, "f");
|
|
226
|
-
if (this.isNode && !this.crypto) {
|
|
227
|
-
// Deferring dynamic loading of node libraries til this first method to avoid doing this in constructor
|
|
228
|
-
await __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_importNodeLibs).call(this);
|
|
229
|
-
}
|
|
230
|
-
const hdrs = { 'content-type': this.urlencoded };
|
|
231
|
-
if (clientSecret) {
|
|
232
|
-
const basicCreds = btoa(`${clientId}:${clientSecret}`);
|
|
233
|
-
hdrs.authorization = `Basic ${basicCreds}`;
|
|
234
|
-
}
|
|
235
|
-
const aTknProps = ['access_token'];
|
|
236
|
-
if (refresh_token) {
|
|
237
|
-
aTknProps.push('refresh_token');
|
|
238
|
-
}
|
|
239
|
-
aTknProps.forEach((prop) => {
|
|
240
|
-
const formData = new URLSearchParams();
|
|
241
|
-
if (!clientSecret) {
|
|
242
|
-
formData.append('client_id', clientId);
|
|
243
|
-
}
|
|
244
|
-
formData.append('token', prop === 'access_token' ? access_token : refresh_token);
|
|
245
|
-
formData.append('token_type_hint', prop);
|
|
246
|
-
fetch(revokeUri, {
|
|
247
|
-
agent: __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_getAgent).call(this),
|
|
248
|
-
method: 'POST',
|
|
249
|
-
headers: new Headers(hdrs),
|
|
250
|
-
body: formData.toString()
|
|
251
|
-
})
|
|
252
|
-
.then((response) => {
|
|
253
|
-
if (!response.ok) {
|
|
254
|
-
// eslint-disable-next-line no-console
|
|
255
|
-
console.error(`Error revoking ${prop}:${response.status}`);
|
|
256
|
-
}
|
|
257
|
-
})
|
|
258
|
-
.catch((e) => {
|
|
259
|
-
// eslint-disable-next-line no-console
|
|
260
|
-
console.error(`Error revoking ${prop}; ${e}`);
|
|
261
|
-
});
|
|
262
|
-
});
|
|
263
|
-
__classPrivateFieldGet(this, _PegaAuth_config, "f").silentAuthFailed = false;
|
|
264
|
-
// Also clobber any sessionIndex
|
|
265
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateSessionIndex).call(this, null);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
_PegaAuth_config = new WeakMap(), _PegaAuth_dynState = new WeakMap(), _PegaAuth_instances = new WeakSet(), _PegaAuth_reloadSS = function _PegaAuth_reloadSS(ssKey) {
|
|
269
|
-
const sItem = window.sessionStorage.getItem(ssKey);
|
|
270
|
-
let obj = {};
|
|
271
|
-
if (sItem) {
|
|
272
|
-
try {
|
|
273
|
-
obj = JSON.parse(sItem);
|
|
274
|
-
}
|
|
275
|
-
catch (e) {
|
|
276
|
-
try {
|
|
277
|
-
obj = JSON.parse(atob(sItem));
|
|
278
|
-
}
|
|
279
|
-
catch (err) {
|
|
280
|
-
obj = {};
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
if (ssKey === this.ssKeyConfig) {
|
|
285
|
-
__classPrivateFieldSet(this, _PegaAuth_config, sItem ? obj : {}, "f");
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
__classPrivateFieldSet(this, _PegaAuth_dynState, sItem ? obj : {}, "f");
|
|
289
|
-
}
|
|
290
|
-
}, _PegaAuth_reloadConfig = function _PegaAuth_reloadConfig() {
|
|
291
|
-
if (this.ssKeyConfig) {
|
|
292
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_reloadSS).call(this, this.ssKeyConfig);
|
|
293
|
-
}
|
|
294
|
-
if (this.ssKeyDynState) {
|
|
295
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_reloadSS).call(this, this.ssKeyDynState);
|
|
296
|
-
}
|
|
297
|
-
}, _PegaAuth_updateConfig = function _PegaAuth_updateConfig() {
|
|
298
|
-
// transform must occur unless it is explicitly disabled
|
|
299
|
-
const transform = __classPrivateFieldGet(this, _PegaAuth_config, "f").transform !== false;
|
|
300
|
-
// May not need to write out Config info all the time, but there is a scenario where a
|
|
301
|
-
// non obfuscated value is passed in and then it needs to be obfuscated
|
|
302
|
-
if (this.ssKeyConfig) {
|
|
303
|
-
const sConfig = JSON.stringify(__classPrivateFieldGet(this, _PegaAuth_config, "f"));
|
|
304
|
-
window.sessionStorage.setItem(this.ssKeyConfig, transform ? btoa(sConfig) : sConfig);
|
|
305
|
-
}
|
|
306
|
-
if (this.ssKeyDynState) {
|
|
307
|
-
const sDynState = JSON.stringify(__classPrivateFieldGet(this, _PegaAuth_dynState, "f"));
|
|
308
|
-
window.sessionStorage.setItem(this.ssKeyDynState, transform ? btoa(sDynState) : sDynState);
|
|
309
|
-
}
|
|
310
|
-
if (__classPrivateFieldGet(this, _PegaAuth_config, "f").fnDynStateChangedCB) {
|
|
311
|
-
__classPrivateFieldGet(this, _PegaAuth_config, "f").fnDynStateChangedCB();
|
|
312
|
-
}
|
|
313
|
-
}, _PegaAuth_importSingleLib = async function _PegaAuth_importSingleLib(libName, libProp, bLoadAlways = false) {
|
|
314
|
-
// eslint-disable-next-line no-undef
|
|
315
|
-
if (!bLoadAlways && typeof (this.isNode ? global : window)[libProp] !== 'undefined') {
|
|
316
|
-
// eslint-disable-next-line no-undef
|
|
317
|
-
this[libProp] = (this.isNode ? global : window)[libProp];
|
|
318
|
-
return this[libProp];
|
|
319
|
-
}
|
|
320
|
-
// Needed to explicitly make import argument a string by using template literals to fix a compile
|
|
321
|
-
// error: Critical dependency: the request of a dependency is an expression
|
|
322
|
-
return import(`${libName}`)
|
|
323
|
-
.then((mod) => {
|
|
324
|
-
this[libProp] = mod.default;
|
|
325
|
-
})
|
|
326
|
-
.catch((e) => {
|
|
327
|
-
// eslint-disable-next-line no-console
|
|
328
|
-
console.error(`Library ${libName} failed to load. ${e}`);
|
|
329
|
-
throw e;
|
|
330
|
-
});
|
|
331
|
-
}, _PegaAuth_importNodeLibs = async function _PegaAuth_importNodeLibs() {
|
|
332
|
-
// Also current assumption is using Node 18 or better
|
|
333
|
-
// With 18.3 there is now a native fetch (but may want to force use of node-fetch)
|
|
334
|
-
const useNodeFetch = !!__classPrivateFieldGet(this, _PegaAuth_config, "f").useNodeFetch;
|
|
335
|
-
return Promise.all([
|
|
336
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_importSingleLib).call(this, 'node-fetch', 'fetch', useNodeFetch),
|
|
337
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_importSingleLib).call(this, 'open', 'open'),
|
|
338
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_importSingleLib).call(this, 'node:crypto', 'crypto', true),
|
|
339
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_importSingleLib).call(this, 'node:https', 'https'),
|
|
340
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_importSingleLib).call(this, 'node:http', 'http'),
|
|
341
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_importSingleLib).call(this, 'node:fs', 'fs')
|
|
342
|
-
]).then(() => {
|
|
343
|
-
this.subtle = this.crypto?.subtle || this.crypto.webcrypto.subtle;
|
|
344
|
-
if ((typeof fetch === 'undefined' || useNodeFetch) && this.fetch) {
|
|
345
|
-
/* eslint-disable-next-line no-global-assign */
|
|
346
|
-
fetch = this.fetch;
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
}, _PegaAuth_buildAuthorizeUrl =
|
|
350
|
-
// For PKCE the authorize includes a code_challenge & code_challenge_method as well
|
|
351
|
-
async function _PegaAuth_buildAuthorizeUrl(state) {
|
|
352
|
-
const { serverType, clientId, redirectUri, authorizeUri, authService, appAlias, userIdentifier, password, noPKCE, isolationId } = __classPrivateFieldGet(this, _PegaAuth_config, "f");
|
|
353
|
-
const { sessionIndex, } = __classPrivateFieldGet(this, _PegaAuth_dynState, "f");
|
|
354
|
-
const bInfinity = serverType === 'infinity';
|
|
355
|
-
if (!noPKCE) {
|
|
356
|
-
// Generate random string of 64 chars for verifier. RFC 7636 says from 43-128 chars
|
|
357
|
-
const buf = new Uint8Array(64);
|
|
358
|
-
this.crypto.getRandomValues(buf);
|
|
359
|
-
__classPrivateFieldGet(this, _PegaAuth_dynState, "f").codeVerifier = __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_base64UrlSafeEncode).call(this, buf);
|
|
360
|
-
}
|
|
361
|
-
// If sessionIndex exists then increment attempts count (we will stop sending session_index after two failures)
|
|
362
|
-
// With Infinity '24 we can now properly detect a invalid_session_index error, but can't for earlier versions
|
|
363
|
-
if (sessionIndex) {
|
|
364
|
-
__classPrivateFieldGet(this, _PegaAuth_dynState, "f").sessionIndexAttempts += 1;
|
|
365
|
-
}
|
|
366
|
-
// We use state to verify that the received code is for the right authorize transaction
|
|
367
|
-
// eslint-disable-next-line no-unneeded-ternary
|
|
368
|
-
__classPrivateFieldGet(this, _PegaAuth_dynState, "f").state = `${state ? state : ''}.${__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_getRandomString).call(this, 32)}`;
|
|
369
|
-
// The same redirectUri needs to be provided to token endpoint, so save this away incase redirectUri is
|
|
370
|
-
// adjusted for next authorize
|
|
371
|
-
__classPrivateFieldGet(this, _PegaAuth_dynState, "f").acRedirectUri = redirectUri;
|
|
372
|
-
// Persist codeVerifier in session storage so it survives the redirects that are to follow
|
|
373
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateConfig).call(this);
|
|
374
|
-
// Trim alias to include just the real alias piece
|
|
375
|
-
const addtlScope = appAlias ? `+app.alias.${appAlias.replace(/^app\//, '')}` : '';
|
|
376
|
-
const scope = bInfinity ? `openid${addtlScope}` : 'user_info';
|
|
377
|
-
// Add explicit creds if specified to try to avoid login popup
|
|
378
|
-
const authServiceArg = authService ? `&authentication_service=${encodeURIComponent(authService)}` : '';
|
|
379
|
-
const sessionIndexArg = sessionIndex && __classPrivateFieldGet(this, _PegaAuth_dynState, "f").sessionIndexAttempts < 3 ? `&session_index=${sessionIndex}` : '';
|
|
380
|
-
const userIdentifierArg = userIdentifier ? `&UserIdentifier=${encodeURIComponent(userIdentifier)}` : '';
|
|
381
|
-
const passwordArg = password && userIdentifier ? `&Password=${encodeURIComponent(atob(password))}` : '';
|
|
382
|
-
const moreAuthArgs = bInfinity
|
|
383
|
-
? `&enable_psyncId=true${authServiceArg}${sessionIndexArg}${userIdentifierArg}${passwordArg}`
|
|
384
|
-
: `&isolationID=${isolationId}`;
|
|
385
|
-
let pkceArgs = '';
|
|
386
|
-
if (!noPKCE) {
|
|
387
|
-
const cc = await __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_getCodeChallenge).call(this, __classPrivateFieldGet(this, _PegaAuth_dynState, "f").codeVerifier);
|
|
388
|
-
pkceArgs = `&code_challenge=${cc}&code_challenge_method=S256`;
|
|
389
|
-
}
|
|
390
|
-
return `${authorizeUri}?client_id=${clientId}&response_type=code&redirect_uri=${redirectUri}&scope=${scope}&state=${__classPrivateFieldGet(this, _PegaAuth_dynState, "f").state}${pkceArgs}${moreAuthArgs}`;
|
|
391
|
-
}, _PegaAuth_authCodeStart =
|
|
392
|
-
// authCode login issues the authorize endpoint transaction and deals with redirects
|
|
393
|
-
async function _PegaAuth_authCodeStart() {
|
|
394
|
-
const fnGetRedirectUriOrigin = () => {
|
|
395
|
-
const redirectUri = __classPrivateFieldGet(this, _PegaAuth_config, "f").redirectUri;
|
|
396
|
-
const nRootOffset = redirectUri.indexOf('//');
|
|
397
|
-
const nFirstPathOffset = nRootOffset !== -1 ? redirectUri.indexOf('/', nRootOffset + 2) : -1;
|
|
398
|
-
return nFirstPathOffset !== -1 ? redirectUri.substring(0, nFirstPathOffset) : redirectUri;
|
|
399
|
-
};
|
|
400
|
-
const redirectOrigin = fnGetRedirectUriOrigin();
|
|
401
|
-
const state = this.isNode ? '' : btoa(window.location.origin);
|
|
402
|
-
return new Promise((resolve, reject) => {
|
|
403
|
-
let theUrl = null; // holds the crafted authorize url
|
|
404
|
-
let myWindow = null; // popup or iframe
|
|
405
|
-
let elIframe = null;
|
|
406
|
-
let elCloseBtn = null;
|
|
407
|
-
const iframeTimeout = __classPrivateFieldGet(this, _PegaAuth_config, "f").silentTimeout !== undefined ? __classPrivateFieldGet(this, _PegaAuth_config, "f").silentTimeout : 5000;
|
|
408
|
-
let bWinIframe = true;
|
|
409
|
-
let tmrAuthComplete = null;
|
|
410
|
-
let checkWindowClosed = null;
|
|
411
|
-
let bDisablePromptNone = false;
|
|
412
|
-
const myWinOnLoad = () => {
|
|
413
|
-
try {
|
|
414
|
-
if (bWinIframe) {
|
|
415
|
-
elIframe.contentWindow.postMessage({ type: 'PegaAuth' }, redirectOrigin);
|
|
416
|
-
}
|
|
417
|
-
else {
|
|
418
|
-
myWindow.postMessage({ type: 'PegaAuth' }, redirectOrigin);
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
catch (e) {
|
|
422
|
-
// Exception trying to postMessage on load (perhaps should console.warn)
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
const fnSetSilentAuthFailed = (bSet) => {
|
|
426
|
-
__classPrivateFieldGet(this, _PegaAuth_config, "f").silentAuthFailed = bSet;
|
|
427
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateConfig).call(this);
|
|
428
|
-
};
|
|
429
|
-
/* eslint-disable prefer-promise-reject-errors */
|
|
430
|
-
const fnOpenPopup = () => {
|
|
431
|
-
if (__classPrivateFieldGet(this, _PegaAuth_config, "f").noPopups) {
|
|
432
|
-
return reject('no-popups');
|
|
433
|
-
}
|
|
434
|
-
// Since displaying a visible window, clear the silent auth failed flag
|
|
435
|
-
fnSetSilentAuthFailed(false);
|
|
436
|
-
myWindow = (this.isNode ? this.open : window.open)(theUrl, '_blank', 'width=700,height=500,left=200,top=100');
|
|
437
|
-
if (!myWindow) {
|
|
438
|
-
// Blocked by popup-blocker
|
|
439
|
-
return reject('blocked');
|
|
440
|
-
}
|
|
441
|
-
checkWindowClosed = setInterval(() => {
|
|
442
|
-
if (myWindow.closed) {
|
|
443
|
-
clearInterval(checkWindowClosed);
|
|
444
|
-
reject('closed');
|
|
445
|
-
}
|
|
446
|
-
}, 500);
|
|
447
|
-
if (!this.isNode) {
|
|
448
|
-
try {
|
|
449
|
-
myWindow.addEventListener('load', myWinOnLoad, true);
|
|
450
|
-
}
|
|
451
|
-
catch (e) {
|
|
452
|
-
// Exception trying to add onload handler to opened window
|
|
453
|
-
// eslint-disable-next-line no-console
|
|
454
|
-
console.error(`Error adding event listener on popup window: ${e}`);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
/* eslint-enable prefer-promise-reject-errors */
|
|
459
|
-
const fnCloseIframe = () => {
|
|
460
|
-
elIframe.parentNode.removeChild(elIframe);
|
|
461
|
-
elCloseBtn.parentNode.removeChild(elCloseBtn);
|
|
462
|
-
elIframe = null;
|
|
463
|
-
elCloseBtn = null;
|
|
464
|
-
bWinIframe = false;
|
|
465
|
-
};
|
|
466
|
-
const fnCloseAndReject = () => {
|
|
467
|
-
fnCloseIframe();
|
|
468
|
-
/* eslint-disable-next-line prefer-promise-reject-errors */
|
|
469
|
-
reject('closed');
|
|
470
|
-
};
|
|
471
|
-
const fnAuthMessageReceiver = (event) => {
|
|
472
|
-
// Check origin to make sure it is the redirect origin
|
|
473
|
-
if (event.origin !== redirectOrigin)
|
|
474
|
-
return;
|
|
475
|
-
if (!event.data || !event.data.type || event.data.type !== 'PegaAuth')
|
|
476
|
-
return;
|
|
477
|
-
const aArgs = ['code', 'state', 'error', 'errorDesc'];
|
|
478
|
-
const aValues = [];
|
|
479
|
-
for (let i = 0; i < aArgs.length; i += 1) {
|
|
480
|
-
const arg = aArgs[i];
|
|
481
|
-
aValues[arg] = event.data[arg] ? event.data[arg].toString() : null;
|
|
482
|
-
}
|
|
483
|
-
if (aValues.error || (aValues.code && aValues.state === __classPrivateFieldGet(this, _PegaAuth_dynState, "f").state)) {
|
|
484
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
485
|
-
fnGetTokenAndFinish(aValues.code, aValues.error, aValues.errorDesc);
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
const fnEnableMessageReceiver = (bEnable) => {
|
|
489
|
-
if (bEnable) {
|
|
490
|
-
window.addEventListener('message', fnAuthMessageReceiver, false);
|
|
491
|
-
window.authCodeCallback = (code, state1, error, errorDesc) => {
|
|
492
|
-
if (error || (code && state1 === __classPrivateFieldGet(this, _PegaAuth_dynState, "f").state)) {
|
|
493
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
494
|
-
fnGetTokenAndFinish(code, error, errorDesc);
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
else {
|
|
499
|
-
window.removeEventListener('message', fnAuthMessageReceiver, false);
|
|
500
|
-
delete window.authCodeCallback;
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
const doAuthorize = () => {
|
|
504
|
-
// If there is a userIdentifier and password specified or an external SSO auth service,
|
|
505
|
-
// we can try to use this silently in an iFrame first
|
|
506
|
-
bWinIframe =
|
|
507
|
-
!this.isNode &&
|
|
508
|
-
!__classPrivateFieldGet(this, _PegaAuth_config, "f").silentAuthFailed &&
|
|
509
|
-
iframeTimeout > 0 &&
|
|
510
|
-
((!!__classPrivateFieldGet(this, _PegaAuth_config, "f").userIdentifier && !!__classPrivateFieldGet(this, _PegaAuth_config, "f").password) ||
|
|
511
|
-
__classPrivateFieldGet(this, _PegaAuth_config, "f").iframeLoginUI ||
|
|
512
|
-
__classPrivateFieldGet(this, _PegaAuth_config, "f").authService !== 'pega');
|
|
513
|
-
// Enable message receiver
|
|
514
|
-
if (!this.isNode) {
|
|
515
|
-
fnEnableMessageReceiver(true);
|
|
516
|
-
}
|
|
517
|
-
if (bWinIframe) {
|
|
518
|
-
const nFrameZLevel = 99999;
|
|
519
|
-
elIframe = document.createElement('iframe');
|
|
520
|
-
elIframe.id = `pe${__classPrivateFieldGet(this, _PegaAuth_config, "f").clientId}`;
|
|
521
|
-
const loginBoxWidth = 500;
|
|
522
|
-
const loginBoxHeight = 700;
|
|
523
|
-
const oStyle = elIframe.style;
|
|
524
|
-
oStyle.position = 'absolute';
|
|
525
|
-
oStyle.display = 'none';
|
|
526
|
-
oStyle.zIndex = nFrameZLevel;
|
|
527
|
-
oStyle.top = `${Math.round(Math.max(window.innerHeight - loginBoxHeight, 0) / 2)}px`;
|
|
528
|
-
oStyle.left = `${Math.round(Math.max(window.innerWidth - loginBoxWidth, 0) / 2)}px`;
|
|
529
|
-
oStyle.width = '500px';
|
|
530
|
-
oStyle.height = '700px';
|
|
531
|
-
// Add Iframe to top of document DOM to have it load
|
|
532
|
-
document.body.insertBefore(elIframe, document.body.firstChild);
|
|
533
|
-
// document.getElementsByTagName('body')[0].appendChild(elIframe);
|
|
534
|
-
elIframe.addEventListener('load', myWinOnLoad, true);
|
|
535
|
-
// Disallow iframe content attempts to navigate main window
|
|
536
|
-
elIframe.setAttribute('sandbox', 'allow-scripts allow-forms allow-same-origin');
|
|
537
|
-
// Adding prompt=none as this is standard OIDC way to communicate no UI is expected (expecting Pega security to support this one day)
|
|
538
|
-
elIframe.setAttribute('src', bDisablePromptNone ? theUrl : `${theUrl}&prompt=none`);
|
|
539
|
-
const svgCloseBtn = `<?xml version="1.0" encoding="UTF-8"?>
|
|
540
|
-
<svg width="34px" height="34px" viewBox="0 0 34 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
541
|
-
<title>Dismiss - Black</title>
|
|
542
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
543
|
-
<g transform="translate(1.000000, 1.000000)">
|
|
544
|
-
<circle fill="#252C32" cx="16" cy="16" r="16"></circle>
|
|
545
|
-
<g transform="translate(9.109375, 9.214844)" fill="#FFFFFF" fill-rule="nonzero">
|
|
546
|
-
<path d="M12.7265625,0 L0,12.6210938 L1.0546875,13.5703125 L13.78125,1.0546875 L12.7265625,0 Z M13.7460938,12.5507812 L1.01953125,0 L0,1.01953125 L12.7617188,13.6054688 L13.7460938,12.5507812 Z"></path>
|
|
547
|
-
</g>
|
|
548
|
-
</g>
|
|
549
|
-
</g>
|
|
550
|
-
</svg>`;
|
|
551
|
-
const bCloseWithinFrame = false;
|
|
552
|
-
elCloseBtn = document.createElement('img');
|
|
553
|
-
elCloseBtn.onclick = fnCloseAndReject;
|
|
554
|
-
elCloseBtn.src = `data:image/svg+xml;base64,${btoa(svgCloseBtn)}`;
|
|
555
|
-
const oBtnStyle = elCloseBtn.style;
|
|
556
|
-
oBtnStyle.cursor = 'pointer';
|
|
557
|
-
// If svg doesn't set width and height might want to set oBtStyle width and height to something like '2em'
|
|
558
|
-
oBtnStyle.position = 'absolute';
|
|
559
|
-
oBtnStyle.display = 'none';
|
|
560
|
-
oBtnStyle.zIndex = nFrameZLevel + 1;
|
|
561
|
-
const nTopOffset = bCloseWithinFrame ? 5 : -10;
|
|
562
|
-
const nRightOffset = bCloseWithinFrame ? -34 : -20;
|
|
563
|
-
const nTop = Math.round(Math.max(window.innerHeight - loginBoxHeight, 0) / 2) + nTopOffset;
|
|
564
|
-
oBtnStyle.top = `${nTop}px`;
|
|
565
|
-
const nLeft = Math.round(Math.max(window.innerWidth - loginBoxWidth, 0) / 2) + loginBoxWidth + nRightOffset;
|
|
566
|
-
oBtnStyle.left = `${nLeft}px`;
|
|
567
|
-
document.body.insertBefore(elCloseBtn, document.body.firstChild);
|
|
568
|
-
// If the password was wrong, then the login screen will be in the iframe
|
|
569
|
-
// ..and with Pega without realization of US-372314 it may replace the top (main portal) window
|
|
570
|
-
// For now set a timer and if the timer expires, remove the iFrame and use same url within
|
|
571
|
-
// visible window
|
|
572
|
-
tmrAuthComplete = setTimeout(() => {
|
|
573
|
-
clearTimeout(tmrAuthComplete);
|
|
574
|
-
/*
|
|
575
|
-
// remove password from config
|
|
576
|
-
if (this.#config.password) {
|
|
577
|
-
delete this.#config.password;
|
|
578
|
-
this.#updateConfig();
|
|
579
|
-
}
|
|
580
|
-
*/
|
|
581
|
-
// Display the iframe where the redirects did not succeed (or invoke a popup window)
|
|
582
|
-
if (__classPrivateFieldGet(this, _PegaAuth_config, "f").iframeLoginUI) {
|
|
583
|
-
elIframe.style.display = 'block';
|
|
584
|
-
elCloseBtn.style.display = 'block';
|
|
585
|
-
}
|
|
586
|
-
else {
|
|
587
|
-
fnCloseIframe();
|
|
588
|
-
fnOpenPopup();
|
|
589
|
-
}
|
|
590
|
-
}, iframeTimeout);
|
|
591
|
-
}
|
|
592
|
-
else {
|
|
593
|
-
if (this.isNode) {
|
|
594
|
-
// Determine port to listen to by extracting it from redirect uri
|
|
595
|
-
const { redirectUri, cert, key } = __classPrivateFieldGet(this, _PegaAuth_config, "f");
|
|
596
|
-
const isHttp = redirectUri.startsWith('http:');
|
|
597
|
-
const nLocalhost = redirectUri.indexOf('localhost:');
|
|
598
|
-
const nSlash = redirectUri.indexOf('/', nLocalhost + 10);
|
|
599
|
-
const nPort = parseInt(redirectUri.substring(nLocalhost + 10, nSlash), 10);
|
|
600
|
-
if (nLocalhost !== -1) {
|
|
601
|
-
const options = key && cert && !isHttp
|
|
602
|
-
? {
|
|
603
|
-
key: this.fs.readFileSync(key),
|
|
604
|
-
cert: this.fs.readFileSync(cert)
|
|
605
|
-
}
|
|
606
|
-
: {};
|
|
607
|
-
const server = (isHttp ? this.http : this.https).createServer(options, (req, res) => {
|
|
608
|
-
const { winTitle, winBodyHtml } = __classPrivateFieldGet(this, _PegaAuth_config, "f");
|
|
609
|
-
res.writeHead(200, { 'Content-Type': 'text/html' });
|
|
610
|
-
// Auto closing window for now. Can always leave it up and allow authConfig props to set title and bodyHtml
|
|
611
|
-
res.end(`<html><head><title>${winTitle}</title><script>window.close();</script></head><body>${winBodyHtml}</body></html>`);
|
|
612
|
-
const queryString = req.url.split('?')[1];
|
|
613
|
-
const urlParams = new URLSearchParams(queryString);
|
|
614
|
-
const code = urlParams.get('code');
|
|
615
|
-
const state1 = urlParams.get('state');
|
|
616
|
-
const error = urlParams.get('error');
|
|
617
|
-
const errorDesc = urlParams.get('error_description');
|
|
618
|
-
if (error || (code && state1 === __classPrivateFieldGet(this, _PegaAuth_dynState, "f").state)) {
|
|
619
|
-
// Stop receiving connections and close when all are handled.
|
|
620
|
-
server.close();
|
|
621
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
622
|
-
fnGetTokenAndFinish(code, error, errorDesc);
|
|
623
|
-
}
|
|
624
|
-
});
|
|
625
|
-
/* eslint-enable no-undef */
|
|
626
|
-
server.listen(nPort);
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
fnOpenPopup();
|
|
630
|
-
}
|
|
631
|
-
};
|
|
632
|
-
/* Retrieve token(s) and close login window */
|
|
633
|
-
const fnGetTokenAndFinish = (code, error, errorDesc) => {
|
|
634
|
-
// Can clear state in session info at this point
|
|
635
|
-
delete __classPrivateFieldGet(this, _PegaAuth_dynState, "f").state;
|
|
636
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateConfig).call(this);
|
|
637
|
-
if (!this.isNode) {
|
|
638
|
-
fnEnableMessageReceiver(false);
|
|
639
|
-
if (bWinIframe) {
|
|
640
|
-
clearTimeout(tmrAuthComplete);
|
|
641
|
-
fnCloseIframe();
|
|
642
|
-
}
|
|
643
|
-
else {
|
|
644
|
-
clearInterval(checkWindowClosed);
|
|
645
|
-
myWindow.close();
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
if (code) {
|
|
649
|
-
this.getToken(code)
|
|
650
|
-
.then((token) => {
|
|
651
|
-
resolve(token);
|
|
652
|
-
})
|
|
653
|
-
.catch((e) => {
|
|
654
|
-
reject(e);
|
|
655
|
-
});
|
|
656
|
-
}
|
|
657
|
-
else if (error) {
|
|
658
|
-
// Handle some errors in a special manner and pass others back to client
|
|
659
|
-
if (error === 'login_required') {
|
|
660
|
-
// eslint-disable-next-line no-console
|
|
661
|
-
console.warn('silent authentication failed...starting full authentication');
|
|
662
|
-
const bSpecialDebugPath = false;
|
|
663
|
-
if (bSpecialDebugPath) {
|
|
664
|
-
fnSetSilentAuthFailed(false);
|
|
665
|
-
bDisablePromptNone = true;
|
|
666
|
-
}
|
|
667
|
-
else {
|
|
668
|
-
fnSetSilentAuthFailed(true);
|
|
669
|
-
bDisablePromptNone = false;
|
|
670
|
-
}
|
|
671
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_buildAuthorizeUrl).call(this, state).then((url) => {
|
|
672
|
-
theUrl = url;
|
|
673
|
-
doAuthorize();
|
|
674
|
-
});
|
|
675
|
-
}
|
|
676
|
-
else if (error === 'invalid_session_index') {
|
|
677
|
-
// eslint-disable-next-line no-console
|
|
678
|
-
console.warn('auth session no longer valid...starting new session');
|
|
679
|
-
// In these scenarios, not much user can do without just starting a new session, so do that
|
|
680
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateSessionIndex).call(this, null);
|
|
681
|
-
fnSetSilentAuthFailed(false);
|
|
682
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_buildAuthorizeUrl).call(this, state).then((url) => {
|
|
683
|
-
theUrl = url;
|
|
684
|
-
doAuthorize();
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
else {
|
|
688
|
-
// eslint-disable-next-line no-console
|
|
689
|
-
console.warn(`Authorize failed: ${error}. ${errorDesc}\nFailing authorize url: ${theUrl}`);
|
|
690
|
-
throw new Error(error, { cause: errorDesc });
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_buildAuthorizeUrl).call(this, state).then((url) => {
|
|
695
|
-
theUrl = url;
|
|
696
|
-
doAuthorize();
|
|
697
|
-
});
|
|
698
|
-
});
|
|
699
|
-
}, _PegaAuth_updateSessionIndex = function _PegaAuth_updateSessionIndex(sessionIndex) {
|
|
700
|
-
if (sessionIndex) {
|
|
701
|
-
__classPrivateFieldGet(this, _PegaAuth_dynState, "f").sessionIndex = sessionIndex;
|
|
702
|
-
__classPrivateFieldGet(this, _PegaAuth_dynState, "f").sessionIndexAttempts = 0;
|
|
703
|
-
}
|
|
704
|
-
else if (__classPrivateFieldGet(this, _PegaAuth_dynState, "f").sessionIndex) {
|
|
705
|
-
delete __classPrivateFieldGet(this, _PegaAuth_dynState, "f").sessionIndex;
|
|
706
|
-
}
|
|
707
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateConfig).call(this);
|
|
708
|
-
}, _PegaAuth_sha256Hash = function _PegaAuth_sha256Hash(str) {
|
|
709
|
-
// Found that the Node implementation of subtle.digest is yielding incorrect results
|
|
710
|
-
// so using a different set of apis to get expected results.
|
|
711
|
-
if (this.isNode) {
|
|
712
|
-
return new Promise((resolve) => {
|
|
713
|
-
resolve(this.crypto.createHash('sha256').update(str).digest());
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
return this.subtle.digest('SHA-256', new TextEncoder().encode(str));
|
|
717
|
-
}, _PegaAuth_encode64 = function _PegaAuth_encode64(buff) {
|
|
718
|
-
return btoa(new Uint8Array(buff).reduce((s, b) => s + String.fromCharCode(b), ''));
|
|
719
|
-
}, _PegaAuth_base64UrlSafeEncode = function _PegaAuth_base64UrlSafeEncode(buf) {
|
|
720
|
-
return __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_encode64).call(this, buf).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
|
|
721
|
-
}, _PegaAuth_getRandomString = function _PegaAuth_getRandomString(nSize) {
|
|
722
|
-
const buf = new Uint8Array(nSize);
|
|
723
|
-
this.crypto.getRandomValues(buf);
|
|
724
|
-
return __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_base64UrlSafeEncode).call(this, buf);
|
|
725
|
-
}, _PegaAuth_getCodeChallenge =
|
|
726
|
-
/* Calc code verifier if necessary
|
|
727
|
-
*/
|
|
728
|
-
/* eslint-disable camelcase */
|
|
729
|
-
async function _PegaAuth_getCodeChallenge(code_verifier) {
|
|
730
|
-
return __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_sha256Hash).call(this, code_verifier)
|
|
731
|
-
.then((hashed) => {
|
|
732
|
-
return __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_base64UrlSafeEncode).call(this, hashed);
|
|
733
|
-
})
|
|
734
|
-
.catch((error) => {
|
|
735
|
-
// eslint-disable-next-line no-console
|
|
736
|
-
console.error(`Error calculation code challenge for PKCE: ${error}`);
|
|
737
|
-
})
|
|
738
|
-
.finally(() => {
|
|
739
|
-
return null;
|
|
740
|
-
});
|
|
741
|
-
}, _PegaAuth_getAgent = function _PegaAuth_getAgent() {
|
|
742
|
-
if (this.isNode && __classPrivateFieldGet(this, _PegaAuth_config, "f").ignoreInvalidCerts) {
|
|
743
|
-
const options = { rejectUnauthorized: false };
|
|
744
|
-
if (__classPrivateFieldGet(this, _PegaAuth_config, "f").legacyTLS) {
|
|
745
|
-
options.secureOptions = this.crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT;
|
|
746
|
-
}
|
|
747
|
-
return new this.https.Agent(options);
|
|
748
|
-
}
|
|
749
|
-
return undefined;
|
|
750
|
-
};
|
|
751
|
-
export default PegaAuth;
|
|
752
|
-
//# sourceMappingURL=auth.js.map
|