@pega/react-sdk-components 8.23.11 → 23.1.11
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 +7 -10
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +2 -9
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts +15 -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 +6 -9
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +32 -33
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +10 -23
- 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 +8 -3
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +25 -14
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -2
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +6 -18
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +7 -2
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +6 -12
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +49 -67
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -2
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +9 -15
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +75 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -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 +15 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +17 -17
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +12 -2
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +78 -70
- 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 +9 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +13 -13
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +6 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +15 -36
- 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 +5 -6
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +5 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +15 -9
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +5 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +15 -9
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +8 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +13 -29
- 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 -15
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +5 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +12 -11
- 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 +5 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +10 -8
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts +6 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +28 -29
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +5 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +10 -9
- 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 +19 -15
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.d.ts +7 -0
- package/lib/components/field/RichText/RichText.d.ts.map +1 -0
- package/lib/components/field/RichText/RichText.js +54 -0
- package/lib/components/field/RichText/RichText.js.map +1 -0
- package/lib/components/field/RichText/index.d.ts +2 -0
- package/lib/components/field/RichText/index.d.ts.map +1 -0
- package/lib/components/field/RichText/index.js +2 -0
- package/lib/components/field/RichText/index.js.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.js +32 -0
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
- package/lib/components/field/ScalarList/index.d.ts +2 -0
- package/lib/components/field/ScalarList/index.d.ts.map +1 -0
- package/lib/components/field/ScalarList/index.js +2 -0
- package/lib/components/field/ScalarList/index.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +11 -19
- 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 +6 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +8 -6
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +7 -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 +6 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +10 -7
- 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 +5 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +11 -9
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +5 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +10 -8
- 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 +20 -41
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +17 -46
- 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 +3 -3
- 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 -4
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +2 -1
- 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.d.ts +1 -6
- package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
- package/lib/components/helpers/date-format-utils.js.map +1 -1
- package/lib/components/helpers/event-utils.d.ts +1 -1
- package/lib/components/helpers/event-utils.d.ts.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.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js +3 -7
- 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 +6 -6
- 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 +69 -320
- 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 +5 -5
- 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 +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 +12 -12
- 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/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 +3 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +48 -54
- 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 +7 -3
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js +2 -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 +6 -0
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +7 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +6 -13
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +11 -27
- 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 +9 -16
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +71 -74
- 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 +7 -15
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +6 -20
- 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 +10 -20
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +63 -192
- 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 -17
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +179 -172
- 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 +9 -22
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +24 -44
- 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 +9 -20
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +15 -33
- 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 +8 -13
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +11 -22
- 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 +5 -12
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +17 -26
- 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 +10 -18
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +32 -97
- 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 +8 -16
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +19 -66
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +8 -17
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +5 -17
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +4 -8
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +2 -7
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +13 -20
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +41 -80
- 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 +5 -8
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +19 -27
- 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 +4 -10
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +13 -17
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +13 -17
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +10 -32
- 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 +20 -16
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +27 -45
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +12 -24
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +7 -25
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -8
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +48 -12
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +10 -23
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +22 -58
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -15
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +37 -19
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +10 -17
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +10 -28
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +15 -30
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +35 -72
- 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 +7 -11
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +5 -15
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +7 -15
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +8 -21
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -16
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +6 -23
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +7 -15
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +9 -22
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +7 -15
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +9 -22
- 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 +10 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +45 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -0
- package/lib/components/template/Details/DynamicTabs/index.d.ts +2 -0
- package/lib/components/template/Details/DynamicTabs/index.d.ts.map +1 -0
- package/lib/components/template/Details/DynamicTabs/index.js +2 -0
- package/lib/components/template/Details/DynamicTabs/index.js.map +1 -0
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +11 -26
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -8
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +3 -14
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -16
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +9 -17
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +5 -13
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +7 -11
- 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 +15 -8
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +168 -258
- 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 +45 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +165 -32
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +5 -16
- 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 +11 -2
- 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 +7 -15
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +9 -22
- 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 +6 -2
- 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 +8 -15
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +7 -18
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +5 -8
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +9 -13
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +5 -8
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +5 -8
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +2 -7
- 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 +9 -14
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +14 -27
- 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 +62 -13
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +24 -2
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +120 -130
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +14 -29
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +15 -33
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +8 -29
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +5 -11
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +7 -17
- 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 +6 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +15 -24
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +5 -8
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +6 -12
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +15 -21
- 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 +11 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +3 -11
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +7 -15
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +23 -26
- 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 +6 -2
- 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 +8 -15
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +7 -17
- 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 +18 -1
- 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 +9 -17
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +13 -37
- 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 +277 -343
- 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 +4 -7
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +38 -36
- 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 +9 -1
- 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 +5 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +121 -140
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +5 -6
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +10 -25
- 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 +59 -29
- 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 +8 -1
- 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 +8 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +6 -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 +13 -27
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +26 -98
- 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 +39 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +4 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
- package/lib/hooks/useAfterInitialEffect.js +16 -0
- package/lib/hooks/useAfterInitialEffect.js.map +1 -0
- package/lib/hooks/useConsolidatedRef.d.ts +9 -0
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
- package/lib/hooks/useConsolidatedRef.js +30 -0
- package/lib/hooks/useConsolidatedRef.js.map +1 -0
- package/lib/hooks/useUID.d.ts +8 -0
- package/lib/hooks/useUID.d.ts.map +1 -0
- package/lib/hooks/useUID.js +14 -0
- package/lib/hooks/useUID.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/sdk-local-component-map.js +2 -2
- package/lib/sdk-pega-component-map.d.ts +21 -1
- package/lib/sdk-pega-component-map.js +112 -92
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +41 -0
- package/package.json +5 -2
- package/lib/components/helpers/auth.d.ts +0 -16
- package/lib/components/helpers/auth.d.ts.map +0 -1
- package/lib/components/helpers/auth.js +0 -437
- package/lib/components/helpers/auth.js.map +0 -1
- package/lib/components/helpers/authManager.d.ts +0 -18
- package/lib/components/helpers/authManager.d.ts.map +0 -1
- package/lib/components/helpers/authManager.js +0 -592
- 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 -261
- package/lib/components/helpers/config_access.js.map +0 -1
|
@@ -1,437 +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 _PegaAuth_instances, _PegaAuth_updateConfig, _PegaAuth_buildAuthorizeUrl, _PegaAuth_sha256Hash, _PegaAuth_encode64, _PegaAuth_base64UrlSafeEncode, _PegaAuth_getCodeChallenge;
|
|
7
|
-
class PegaAuth {
|
|
8
|
-
constructor(ssKeyConfig) {
|
|
9
|
-
_PegaAuth_instances.add(this);
|
|
10
|
-
this.ssKeyConfig = ssKeyConfig;
|
|
11
|
-
this.bEncodeSI = false;
|
|
12
|
-
this.reloadConfig();
|
|
13
|
-
}
|
|
14
|
-
reloadConfig() {
|
|
15
|
-
const peConfig = window.sessionStorage.getItem(this.ssKeyConfig);
|
|
16
|
-
let obj = {};
|
|
17
|
-
if (peConfig) {
|
|
18
|
-
try {
|
|
19
|
-
obj = JSON.parse(peConfig);
|
|
20
|
-
}
|
|
21
|
-
catch (e) {
|
|
22
|
-
try {
|
|
23
|
-
obj = JSON.parse(window.atob(peConfig));
|
|
24
|
-
}
|
|
25
|
-
catch (e2) {
|
|
26
|
-
obj = {};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
this.config = peConfig ? obj : null;
|
|
31
|
-
}
|
|
32
|
-
async login() {
|
|
33
|
-
const fnGetRedirectUriOrigin = () => {
|
|
34
|
-
const redirectUri = this.config.redirectUri;
|
|
35
|
-
const nRootOffset = redirectUri.indexOf("//");
|
|
36
|
-
const nFirstPathOffset = nRootOffset !== -1 ? redirectUri.indexOf("/", nRootOffset + 2) : -1;
|
|
37
|
-
return nFirstPathOffset !== -1 ? redirectUri.substring(0, nFirstPathOffset) : redirectUri;
|
|
38
|
-
};
|
|
39
|
-
const redirectOrigin = fnGetRedirectUriOrigin();
|
|
40
|
-
// eslint-disable-next-line no-restricted-globals
|
|
41
|
-
const state = window.btoa(location.origin);
|
|
42
|
-
return new Promise((resolve, reject) => {
|
|
43
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_buildAuthorizeUrl).call(this, state).then((url) => {
|
|
44
|
-
let myWindow = null; // popup or iframe
|
|
45
|
-
let elIframe = null;
|
|
46
|
-
let elCloseBtn = null;
|
|
47
|
-
const iframeTimeout = this.config.silentTimeout !== undefined ? this.config.silentTimeout : 5000;
|
|
48
|
-
let bWinIframe = iframeTimeout > 0 && ((!!this.config.userIdentifier && !!this.config.password) || this.config.iframeLoginUI || this.config.authService !== "pega");
|
|
49
|
-
let tmrAuthComplete = null;
|
|
50
|
-
let checkWindowClosed = null;
|
|
51
|
-
const myWinOnLoad = () => {
|
|
52
|
-
try {
|
|
53
|
-
if (bWinIframe) {
|
|
54
|
-
elIframe.contentWindow.postMessage({ type: "PegaAuth" }, redirectOrigin);
|
|
55
|
-
// eslint-disable-next-line no-console
|
|
56
|
-
console.log("authjs(login): loaded a page in iFrame");
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
myWindow.postMessage({ type: "PegaAuth" }, redirectOrigin);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
catch (e) {
|
|
63
|
-
// eslint-disable-next-line no-console
|
|
64
|
-
console.log("authjs(login): Exception trying to postMessage on load");
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
const fnOpenPopup = () => {
|
|
68
|
-
myWindow = window.open(url, '_blank', 'width=700,height=500,left=200,top=100');
|
|
69
|
-
if (!myWindow) {
|
|
70
|
-
// Blocked by popup-blocker
|
|
71
|
-
// eslint-disable-next-line prefer-promise-reject-errors
|
|
72
|
-
return reject("blocked");
|
|
73
|
-
}
|
|
74
|
-
checkWindowClosed = setInterval(() => {
|
|
75
|
-
if (myWindow.closed) {
|
|
76
|
-
clearInterval(checkWindowClosed);
|
|
77
|
-
// eslint-disable-next-line prefer-promise-reject-errors
|
|
78
|
-
reject("closed");
|
|
79
|
-
}
|
|
80
|
-
}, 500);
|
|
81
|
-
try {
|
|
82
|
-
myWindow.addEventListener("load", myWinOnLoad, true);
|
|
83
|
-
}
|
|
84
|
-
catch (e) {
|
|
85
|
-
// eslint-disable-next-line no-console
|
|
86
|
-
console.log("authjs(login): Exception trying to add onload handler to opened window;");
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
const fnCloseIframe = () => {
|
|
90
|
-
elIframe.parentNode.removeChild(elIframe);
|
|
91
|
-
elCloseBtn.parentNode.removeChild(elCloseBtn);
|
|
92
|
-
// eslint-disable-next-line no-multi-assign
|
|
93
|
-
elIframe = elCloseBtn = null;
|
|
94
|
-
bWinIframe = false;
|
|
95
|
-
};
|
|
96
|
-
const fnCloseAndReject = () => {
|
|
97
|
-
fnCloseIframe();
|
|
98
|
-
// eslint-disable-next-line prefer-promise-reject-errors
|
|
99
|
-
reject("closed");
|
|
100
|
-
};
|
|
101
|
-
// If there is a userIdentifier and password specified or an external SSO auth service,
|
|
102
|
-
// we can try to use this silently in an iFrame first
|
|
103
|
-
if (bWinIframe) {
|
|
104
|
-
const nFrameZLevel = 99999;
|
|
105
|
-
elIframe = document.createElement('iframe');
|
|
106
|
-
// eslint-disable-next-line prefer-template
|
|
107
|
-
elIframe.id = 'pe' + this.config.clientId;
|
|
108
|
-
const loginBoxWidth = 500;
|
|
109
|
-
const loginBoxHeight = 700;
|
|
110
|
-
const oStyle = elIframe.style;
|
|
111
|
-
oStyle.position = 'absolute';
|
|
112
|
-
oStyle.display = 'none';
|
|
113
|
-
oStyle.zIndex = nFrameZLevel;
|
|
114
|
-
oStyle.top = `${Math.round(Math.max(window.innerHeight - loginBoxHeight, 0) / 2)}px`;
|
|
115
|
-
oStyle.left = `${Math.round(Math.max(window.innerWidth - loginBoxWidth, 0) / 2)}px`;
|
|
116
|
-
oStyle.width = '500px';
|
|
117
|
-
oStyle.height = '700px';
|
|
118
|
-
// Add Iframe to top of document DOM to have it load
|
|
119
|
-
document.body.insertBefore(elIframe, document.body.firstChild);
|
|
120
|
-
// Add Iframe to DOM to have it load
|
|
121
|
-
document.getElementsByTagName('body')[0].appendChild(elIframe);
|
|
122
|
-
elIframe.addEventListener("load", myWinOnLoad, true);
|
|
123
|
-
// Disallow iframe content attempts to navigate main window
|
|
124
|
-
elIframe.setAttribute("sandbox", "allow-scripts allow-forms allow-same-origin");
|
|
125
|
-
elIframe.setAttribute('src', url);
|
|
126
|
-
const svgCloseBtn = `<?xml version="1.0" encoding="UTF-8"?>
|
|
127
|
-
<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">
|
|
128
|
-
<title>Dismiss - Black</title>
|
|
129
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
130
|
-
<g transform="translate(1.000000, 1.000000)">
|
|
131
|
-
<circle fill="#252C32" cx="16" cy="16" r="16"></circle>
|
|
132
|
-
<g transform="translate(9.109375, 9.214844)" fill="#FFFFFF" fill-rule="nonzero">
|
|
133
|
-
<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>
|
|
134
|
-
</g>
|
|
135
|
-
</g>
|
|
136
|
-
</g>
|
|
137
|
-
</svg>`;
|
|
138
|
-
const bCloseWithinFrame = false;
|
|
139
|
-
elCloseBtn = document.createElement('img');
|
|
140
|
-
elCloseBtn.onclick = fnCloseAndReject;
|
|
141
|
-
// eslint-disable-next-line prefer-template
|
|
142
|
-
elCloseBtn.src = 'data:image/svg+xml;base64,' + window.btoa(svgCloseBtn);
|
|
143
|
-
const oBtnStyle = elCloseBtn.style;
|
|
144
|
-
oBtnStyle.cursor = 'pointer';
|
|
145
|
-
// If svg doesn't set width and height might want to set oBtStyle width and height to something like '2em'
|
|
146
|
-
oBtnStyle.position = 'absolute';
|
|
147
|
-
oBtnStyle.display = 'none';
|
|
148
|
-
oBtnStyle.zIndex = nFrameZLevel + 1;
|
|
149
|
-
const nTopOffset = bCloseWithinFrame ? 5 : -10;
|
|
150
|
-
const nRightOffset = bCloseWithinFrame ? -34 : -20;
|
|
151
|
-
oBtnStyle.top = `${Math.round(Math.max(window.innerHeight - loginBoxHeight, 0) / 2) + nTopOffset}px`;
|
|
152
|
-
oBtnStyle.left = `${Math.round(Math.max(window.innerWidth - loginBoxWidth, 0) / 2) + loginBoxWidth + nRightOffset}px`;
|
|
153
|
-
document.body.insertBefore(elCloseBtn, document.body.firstChild);
|
|
154
|
-
// If the password was wrong, then the login screen will be in the iframe
|
|
155
|
-
// ..and with Pega without realization of US-372314 it may replace the top (main portal) window
|
|
156
|
-
// For now set a timer and if the timer expires, remove the iFrame and use same url within
|
|
157
|
-
// visible window
|
|
158
|
-
tmrAuthComplete = setTimeout(() => {
|
|
159
|
-
clearTimeout(tmrAuthComplete);
|
|
160
|
-
// remove password from config
|
|
161
|
-
if (this.config.password) {
|
|
162
|
-
delete this.config.password;
|
|
163
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateConfig).call(this);
|
|
164
|
-
}
|
|
165
|
-
if (this.config.iframeLoginUI) {
|
|
166
|
-
elIframe.style.display = "block";
|
|
167
|
-
elCloseBtn.style.display = "block";
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
fnCloseIframe();
|
|
171
|
-
fnOpenPopup();
|
|
172
|
-
}
|
|
173
|
-
}, iframeTimeout);
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
fnOpenPopup();
|
|
177
|
-
}
|
|
178
|
-
let authMessageReceiver = null;
|
|
179
|
-
/* Retrieve token(s) and close login window */
|
|
180
|
-
const fnGetTokenAndFinish = (code) => {
|
|
181
|
-
window.removeEventListener("message", authMessageReceiver, false);
|
|
182
|
-
this.getToken(code).then(token => {
|
|
183
|
-
if (bWinIframe) {
|
|
184
|
-
clearTimeout(tmrAuthComplete);
|
|
185
|
-
fnCloseIframe();
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
clearInterval(checkWindowClosed);
|
|
189
|
-
myWindow.close();
|
|
190
|
-
}
|
|
191
|
-
resolve(token);
|
|
192
|
-
})
|
|
193
|
-
.catch(e => {
|
|
194
|
-
reject(e);
|
|
195
|
-
});
|
|
196
|
-
};
|
|
197
|
-
/* Handler to receive the auth code */
|
|
198
|
-
authMessageReceiver = (event) => {
|
|
199
|
-
// Check origin to make sure it is the redirect origin
|
|
200
|
-
if (event.origin !== redirectOrigin)
|
|
201
|
-
return;
|
|
202
|
-
if (!event.data || !event.data.type || event.data.type !== "PegaAuth")
|
|
203
|
-
return;
|
|
204
|
-
// eslint-disable-next-line no-console
|
|
205
|
-
console.log("authjs(login): postMessage received with code");
|
|
206
|
-
const code = event.data.code.toString();
|
|
207
|
-
fnGetTokenAndFinish(code);
|
|
208
|
-
};
|
|
209
|
-
window.addEventListener("message", authMessageReceiver, false);
|
|
210
|
-
window.authCodeCallback = (code) => {
|
|
211
|
-
// eslint-disable-next-line no-console
|
|
212
|
-
console.log("authjs(login): authCodeCallback used with code");
|
|
213
|
-
fnGetTokenAndFinish(code);
|
|
214
|
-
};
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
// Login redirect
|
|
219
|
-
loginRedirect() {
|
|
220
|
-
// eslint-disable-next-line no-restricted-globals
|
|
221
|
-
const state = btoa(location.origin);
|
|
222
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_buildAuthorizeUrl).call(this, state).then((url) => {
|
|
223
|
-
// eslint-disable-next-line no-restricted-globals
|
|
224
|
-
location.href = url;
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
// For PKCE token endpoint includes code_verifier
|
|
228
|
-
getToken(authCode) {
|
|
229
|
-
// Reload config to pick up the previously stored codeVerifier
|
|
230
|
-
this.reloadConfig();
|
|
231
|
-
const { clientId, clientSecret, redirectUri, tokenUri, codeVerifier } = this.config;
|
|
232
|
-
// eslint-disable-next-line no-restricted-globals
|
|
233
|
-
const queryString = location.search;
|
|
234
|
-
const urlParams = new URLSearchParams(queryString);
|
|
235
|
-
const code = authCode || urlParams.get("code");
|
|
236
|
-
const formData = new URLSearchParams();
|
|
237
|
-
formData.append("client_id", clientId);
|
|
238
|
-
if (clientSecret) {
|
|
239
|
-
formData.append("client_secret", clientSecret);
|
|
240
|
-
}
|
|
241
|
-
formData.append("grant_type", "authorization_code");
|
|
242
|
-
formData.append("code", code);
|
|
243
|
-
formData.append("redirect_uri", redirectUri);
|
|
244
|
-
formData.append("code_verifier", codeVerifier);
|
|
245
|
-
return fetch(tokenUri, {
|
|
246
|
-
method: "POST",
|
|
247
|
-
headers: new Headers({
|
|
248
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
249
|
-
}),
|
|
250
|
-
body: formData.toString(),
|
|
251
|
-
})
|
|
252
|
-
.then((response) => response.json())
|
|
253
|
-
.then(token => {
|
|
254
|
-
// .expires_in contains the # of seconds before access token expires
|
|
255
|
-
// add property to keep track of current time when the token expires
|
|
256
|
-
token.eA = Date.now() + (token.expires_in * 1000);
|
|
257
|
-
if (this.config.codeVerifier) {
|
|
258
|
-
delete this.config.codeVerifier;
|
|
259
|
-
}
|
|
260
|
-
// If there is a session_index then move this to the peConfig structure (as used on authorize)
|
|
261
|
-
if (token.session_index) {
|
|
262
|
-
this.config.sessionIndex = token.session_index;
|
|
263
|
-
}
|
|
264
|
-
// If we got a token and have a session index, then reset the sessionIndexAttempts
|
|
265
|
-
if (this.config.sessionIndex) {
|
|
266
|
-
this.config.sessionIndexAttempts = 0;
|
|
267
|
-
}
|
|
268
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateConfig).call(this);
|
|
269
|
-
return token;
|
|
270
|
-
})
|
|
271
|
-
.catch(e => {
|
|
272
|
-
// eslint-disable-next-line no-console
|
|
273
|
-
console.log(e);
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
/* eslint-disable camelcase */
|
|
277
|
-
async refreshToken(refresh_token) {
|
|
278
|
-
const { clientId, clientSecret, tokenUri } = this.config;
|
|
279
|
-
const formData = new URLSearchParams();
|
|
280
|
-
formData.append("client_id", clientId);
|
|
281
|
-
if (clientSecret) {
|
|
282
|
-
formData.append("client_secret", clientSecret);
|
|
283
|
-
}
|
|
284
|
-
formData.append("grant_type", "refresh_token");
|
|
285
|
-
formData.append("refresh_token", refresh_token);
|
|
286
|
-
return fetch(tokenUri, {
|
|
287
|
-
method: "POST",
|
|
288
|
-
headers: new Headers({
|
|
289
|
-
"content-type": "application/x-www-form-urlencoded",
|
|
290
|
-
}),
|
|
291
|
-
body: formData.toString(),
|
|
292
|
-
})
|
|
293
|
-
.then((response) => {
|
|
294
|
-
if (!response.ok && response.status === 401) {
|
|
295
|
-
return null;
|
|
296
|
-
}
|
|
297
|
-
return response.json();
|
|
298
|
-
})
|
|
299
|
-
.then(token => {
|
|
300
|
-
if (token) {
|
|
301
|
-
// .expires_in contains the # of seconds before access token expires
|
|
302
|
-
// add property to keep track of current time when the token expires
|
|
303
|
-
token.eA = Date.now() + (token.expires_in * 1000);
|
|
304
|
-
}
|
|
305
|
-
return token;
|
|
306
|
-
})
|
|
307
|
-
.catch(e => {
|
|
308
|
-
// eslint-disable-next-line no-console
|
|
309
|
-
console.log(e);
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
async revokeTokens(access_token, refresh_token = null) {
|
|
313
|
-
if (!this.config || !this.config.revokeUri) {
|
|
314
|
-
// Must have a config structure and revokeUri to proceed
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
const { clientId, clientSecret, revokeUri } = this.config;
|
|
318
|
-
const hdrs = { "content-type": "application/x-www-form-urlencoded" };
|
|
319
|
-
if (clientSecret) {
|
|
320
|
-
const creds = `${clientId}:${clientSecret}`;
|
|
321
|
-
hdrs.authorization = `Basic ${window.btoa(creds)}`;
|
|
322
|
-
}
|
|
323
|
-
const aTknProps = ["access_token"];
|
|
324
|
-
if (refresh_token) {
|
|
325
|
-
aTknProps.push("refresh_token");
|
|
326
|
-
}
|
|
327
|
-
aTknProps.forEach((prop) => {
|
|
328
|
-
const formData = new URLSearchParams();
|
|
329
|
-
if (!clientSecret) {
|
|
330
|
-
formData.append("client_id", clientId);
|
|
331
|
-
}
|
|
332
|
-
formData.append("token", prop === "access_token" ? access_token : refresh_token);
|
|
333
|
-
formData.append("token_type_hint", prop);
|
|
334
|
-
fetch(revokeUri, {
|
|
335
|
-
method: "POST",
|
|
336
|
-
headers: new Headers(hdrs),
|
|
337
|
-
body: formData.toString(),
|
|
338
|
-
})
|
|
339
|
-
.then((response) => {
|
|
340
|
-
if (!response.ok) {
|
|
341
|
-
// eslint-disable-next-line no-console
|
|
342
|
-
console.log(`Error revoking ${prop}:${response.status}`);
|
|
343
|
-
}
|
|
344
|
-
})
|
|
345
|
-
.catch(e => {
|
|
346
|
-
// eslint-disable-next-line no-console
|
|
347
|
-
console.log(e);
|
|
348
|
-
});
|
|
349
|
-
});
|
|
350
|
-
// Also clobber any sessionIndex
|
|
351
|
-
if (this.config.sessionIndex) {
|
|
352
|
-
delete this.config.sessionIndex;
|
|
353
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateConfig).call(this);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
// For userinfo endpoint to return meaningful data, endpoint must include appAlias (if specified) and authorize must
|
|
357
|
-
// specify profile and optionally email scope to get such info returned
|
|
358
|
-
async getUserinfo(access_token) {
|
|
359
|
-
if (!this.config || !this.config.userinfoUri) {
|
|
360
|
-
// Must have a config structure and userInfo to proceed
|
|
361
|
-
return {};
|
|
362
|
-
}
|
|
363
|
-
const hdrs = { 'authorization': `bearer ${access_token}`, 'content-type': 'application/json;charset=UTF-8' };
|
|
364
|
-
return fetch(this.config.userinfoUri, {
|
|
365
|
-
method: "GET",
|
|
366
|
-
headers: new Headers(hdrs)
|
|
367
|
-
})
|
|
368
|
-
.then(response => {
|
|
369
|
-
if (response.ok) {
|
|
370
|
-
return response.json();
|
|
371
|
-
}
|
|
372
|
-
else {
|
|
373
|
-
// eslint-disable-next-line no-console
|
|
374
|
-
console.log(`Error invoking userinfo: ${response.status}`);
|
|
375
|
-
}
|
|
376
|
-
})
|
|
377
|
-
.then(data => {
|
|
378
|
-
return data;
|
|
379
|
-
})
|
|
380
|
-
.catch(e => {
|
|
381
|
-
// eslint-disable-next-line no-console
|
|
382
|
-
console.log(e);
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
_PegaAuth_instances = new WeakSet(), _PegaAuth_updateConfig = function _PegaAuth_updateConfig() {
|
|
387
|
-
const sSI = JSON.stringify(this.config);
|
|
388
|
-
window.sessionStorage.setItem(this.ssKeyConfig, this.bEncodeSI ? window.btoa(sSI) : sSI);
|
|
389
|
-
}, _PegaAuth_buildAuthorizeUrl =
|
|
390
|
-
// For PKCE the authorize includes a code_challenge & code_challenge_method as well
|
|
391
|
-
async function _PegaAuth_buildAuthorizeUrl(state) {
|
|
392
|
-
const { clientId, redirectUri, authorizeUri, authService, sessionIndex, appAlias, useLocking, userIdentifier, password } = this.config;
|
|
393
|
-
// Generate random string of 64 chars for verifier. RFC 7636 says from 43-128 chars
|
|
394
|
-
let buf = new Uint8Array(64);
|
|
395
|
-
window.crypto.getRandomValues(buf);
|
|
396
|
-
this.config.codeVerifier = __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_base64UrlSafeEncode).call(this, buf);
|
|
397
|
-
// If sessionIndex exists then increment attempts count (we will stop sending session_index after two failures)
|
|
398
|
-
if (sessionIndex) {
|
|
399
|
-
this.config.sessionIndexAttempts += 1;
|
|
400
|
-
}
|
|
401
|
-
// Persist codeVerifier in session storage so it survives the redirects that are to follow
|
|
402
|
-
__classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_updateConfig).call(this);
|
|
403
|
-
if (!state) {
|
|
404
|
-
// Calc random state variable
|
|
405
|
-
buf = new Uint8Array(32);
|
|
406
|
-
window.crypto.getRandomValues(buf);
|
|
407
|
-
state = __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_base64UrlSafeEncode).call(this, buf);
|
|
408
|
-
}
|
|
409
|
-
// Trim alias to include just the real alias piece
|
|
410
|
-
const addtlScope = appAlias ? `+app.alias.${appAlias.replace(/^app\//, '')}` : "";
|
|
411
|
-
// Add explicit creds if specified to try to avoid login popup
|
|
412
|
-
const moreAuthArgs = (authService ? `&authentication_service=${encodeURIComponent(authService)}` : "") +
|
|
413
|
-
(sessionIndex && this.config.sessionIndexAttempts < 3 ? `&session_index=${sessionIndex}` : "") +
|
|
414
|
-
(useLocking ? `&enable_psyncId=true` : '') +
|
|
415
|
-
(userIdentifier ? `&UserIdentifier=${encodeURIComponent(userIdentifier)}` : '') +
|
|
416
|
-
(userIdentifier && password ? `&Password=${encodeURIComponent(window.atob(password))}` : '');
|
|
417
|
-
return __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_getCodeChallenge).call(this, this.config.codeVerifier).then(cc => {
|
|
418
|
-
// Now includes new enable_psyncId=true and session_index params
|
|
419
|
-
return `${authorizeUri}?client_id=${clientId}&response_type=code&redirect_uri=${redirectUri}&scope=openid+email+profile${addtlScope}&state=${state}&code_challenge=${cc}&code_challenge_method=S256${moreAuthArgs}`;
|
|
420
|
-
});
|
|
421
|
-
}, _PegaAuth_sha256Hash = function _PegaAuth_sha256Hash(str) {
|
|
422
|
-
return window.crypto.subtle.digest("SHA-256", new TextEncoder().encode(str));
|
|
423
|
-
}, _PegaAuth_encode64 = function _PegaAuth_encode64(buff) {
|
|
424
|
-
return window.btoa(new Uint8Array(buff).reduce((s, b) => s + String.fromCharCode(b), ''));
|
|
425
|
-
}, _PegaAuth_base64UrlSafeEncode = function _PegaAuth_base64UrlSafeEncode(buf) {
|
|
426
|
-
const s = __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_encode64).call(this, buf).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
427
|
-
return s;
|
|
428
|
-
}, _PegaAuth_getCodeChallenge = function _PegaAuth_getCodeChallenge(code_verifier) {
|
|
429
|
-
return __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_sha256Hash).call(this, code_verifier).then((hashed) => {
|
|
430
|
-
return __classPrivateFieldGet(this, _PegaAuth_instances, "m", _PegaAuth_base64UrlSafeEncode).call(this, hashed);
|
|
431
|
-
}).catch((error) => {
|
|
432
|
-
// eslint-disable-next-line no-console
|
|
433
|
-
console.log(error);
|
|
434
|
-
}).finally(() => { return null; });
|
|
435
|
-
};
|
|
436
|
-
export default PegaAuth;
|
|
437
|
-
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/components/helpers/auth.js"],"names":[],"mappings":";;;;;;AAAA,MAAM,QAAQ;IAEZ,YAAY,WAAW;;QACnB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,YAAY;QACR,MAAM,QAAQ,GAAG,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjE,IAAI,GAAG,GAAG,EAAE,CAAC;QACb,IAAI,QAAQ,EAAG;YACX,IAAI;gBACA,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;aAC9B;YAAC,OAAO,CAAC,EAAE;gBACR,IAAI;oBACA,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;iBAC3C;gBAAC,OAAM,EAAE,EAAE;oBACR,GAAG,GAAG,EAAE,CAAC;iBACZ;aACJ;SACJ;QAED,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC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MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACjF,CAAC,mDAIS,IAAI;IACV,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC9F,CAAC,yEAKoB,GAAG;IACpB,MAAM,CAAC,GAAG,uBAAA,IAAI,+CAAU,MAAd,IAAI,EAAW,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACxF,OAAO,CAAC,CAAC;AACb,CAAC,mEAKiB,aAAa;IAC3B,OAAO,uBAAA,IAAI,iDAAY,MAAhB,IAAI,EAAa,aAAa,CAAC,CAAC,IAAI,CACvC,CAAC,MAAM,EAAE,EAAE;QACT,OAAO,uBAAA,IAAI,0DAAqB,MAAzB,IAAI,EAAsB,MAAM,CAAC,CAAA;IAC1C,CAAC,CACJ,CAAC,KAAK,CACH,CAAC,KAAK,EAAE,EAAE;QACR,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC,CACJ,CAAC,OAAO,CACL,GAAG,EAAE,GAAG,OAAO,IAAI,CAAA,CAAC,CAAC,CACxB,CAAA;AACL,CAAC;AAKH,eAAe,QAAQ,CAAC","sourcesContent":["class PegaAuth {\n\n constructor(ssKeyConfig) {\n this.ssKeyConfig = ssKeyConfig;\n this.bEncodeSI = false;\n this.reloadConfig();\n }\n\n reloadConfig() {\n const peConfig = window.sessionStorage.getItem(this.ssKeyConfig);\n let obj = {};\n if( peConfig ) {\n try {\n obj = JSON.parse(peConfig);\n } catch (e) {\n try {\n obj = JSON.parse(window.atob(peConfig));\n } catch(e2) {\n obj = {};\n }\n }\n }\n\n this.config = peConfig ? obj : null;\n }\n\n #updateConfig() {\n const sSI = JSON.stringify(this.config);\n window.sessionStorage.setItem(this.ssKeyConfig, this.bEncodeSI ? window.btoa(sSI) : sSI);\n }\n\n // For PKCE the authorize includes a code_challenge & code_challenge_method as well\n async #buildAuthorizeUrl(state) {\n const {clientId, redirectUri, authorizeUri, authService, sessionIndex, appAlias, useLocking,\n userIdentifier, password} = this.config;\n\n // Generate random string of 64 chars for verifier. RFC 7636 says from 43-128 chars\n let buf = new Uint8Array(64);\n window.crypto.getRandomValues(buf);\n this.config.codeVerifier = this.#base64UrlSafeEncode(buf);\n // If sessionIndex exists then increment attempts count (we will stop sending session_index after two failures)\n if( sessionIndex ) {\n this.config.sessionIndexAttempts += 1;\n }\n // Persist codeVerifier in session storage so it survives the redirects that are to follow\n this.#updateConfig();\n\n if( !state ) {\n // Calc random state variable\n buf = new Uint8Array(32);\n window.crypto.getRandomValues(buf);\n state = this.#base64UrlSafeEncode(buf);\n }\n\n // Trim alias to include just the real alias piece\n const addtlScope = appAlias ? `+app.alias.${appAlias.replace(/^app\\//, '')}` : \"\";\n\n // Add explicit creds if specified to try to avoid login popup\n const moreAuthArgs =\n (authService ? `&authentication_service=${encodeURIComponent(authService)}` : \"\") +\n (sessionIndex && this.config.sessionIndexAttempts < 3 ? `&session_index=${sessionIndex}` : \"\") +\n (useLocking ? `&enable_psyncId=true` : '') +\n (userIdentifier ? `&UserIdentifier=${encodeURIComponent(userIdentifier)}` : '') +\n (userIdentifier && password ? `&Password=${encodeURIComponent(window.atob(password))}` : '');\n\n return this.#getCodeChallenge(this.config.codeVerifier).then( cc => {\n // Now includes new enable_psyncId=true and session_index params\n return `${authorizeUri}?client_id=${clientId}&response_type=code&redirect_uri=${redirectUri}&scope=openid+email+profile${addtlScope}&state=${state}&code_challenge=${cc}&code_challenge_method=S256${moreAuthArgs}`;\n });\n }\n\n async login() {\n const fnGetRedirectUriOrigin = () => {\n const redirectUri = this.config.redirectUri;\n const nRootOffset = redirectUri.indexOf(\"//\");\n const nFirstPathOffset = nRootOffset !== -1 ? redirectUri.indexOf(\"/\",nRootOffset+2) : -1;\n return nFirstPathOffset !== -1 ? redirectUri.substring(0,nFirstPathOffset) : redirectUri;\n };\n\n const redirectOrigin = fnGetRedirectUriOrigin();\n // eslint-disable-next-line no-restricted-globals\n const state = window.btoa(location.origin);\n\n return new Promise( (resolve, reject) => {\n\n this.#buildAuthorizeUrl(state).then((url) => {\n let myWindow = null; // popup or iframe\n let elIframe = null;\n let elCloseBtn = null\n const iframeTimeout = this.config.silentTimeout !== undefined ? this.config.silentTimeout : 5000;\n let bWinIframe = iframeTimeout > 0 && ((!!this.config.userIdentifier && !!this.config.password) || this.config.iframeLoginUI || this.config.authService !== \"pega\");\n let tmrAuthComplete = null;\n let checkWindowClosed = null;\n const myWinOnLoad = () => {\n try{\n if( bWinIframe ) {\n elIframe.contentWindow.postMessage({type:\"PegaAuth\"}, redirectOrigin);\n // eslint-disable-next-line no-console\n console.log(\"authjs(login): loaded a page in iFrame\");\n } else {\n myWindow.postMessage({type:\"PegaAuth\"}, redirectOrigin);\n }\n } catch(e) {\n // eslint-disable-next-line no-console\n console.log(\"authjs(login): Exception trying to postMessage on load\");\n }\n };\n const fnOpenPopup = () => {\n myWindow = window.open(url, '_blank', 'width=700,height=500,left=200,top=100');\n if( !myWindow ) {\n // Blocked by popup-blocker\n // eslint-disable-next-line prefer-promise-reject-errors\n return reject(\"blocked\");\n }\n checkWindowClosed = setInterval( () => {\n if( myWindow.closed ) {\n clearInterval(checkWindowClosed);\n // eslint-disable-next-line prefer-promise-reject-errors\n reject(\"closed\");\n }\n }, 500);\n try {\n myWindow.addEventListener(\"load\", myWinOnLoad, true);\n } catch(e) {\n // eslint-disable-next-line no-console\n console.log(\"authjs(login): Exception trying to add onload handler to opened window;\")\n }\n };\n\n const fnCloseIframe = () => {\n elIframe.parentNode.removeChild(elIframe);\n elCloseBtn.parentNode.removeChild(elCloseBtn);\n // eslint-disable-next-line no-multi-assign\n elIframe = elCloseBtn = null;\n bWinIframe = false;\n };\n const fnCloseAndReject = () => {\n fnCloseIframe();\n // eslint-disable-next-line prefer-promise-reject-errors\n reject(\"closed\");\n };\n // If there is a userIdentifier and password specified or an external SSO auth service,\n // we can try to use this silently in an iFrame first\n if( bWinIframe ) {\n const nFrameZLevel = 99999;\n elIframe = document.createElement('iframe');\n // eslint-disable-next-line prefer-template\n elIframe.id = 'pe'+this.config.clientId;\n const loginBoxWidth=500;\n const loginBoxHeight=700;\n const oStyle = elIframe.style;\n oStyle.position = 'absolute';\n oStyle.display = 'none';\n oStyle.zIndex = nFrameZLevel;\n oStyle.top=`${Math.round(Math.max(window.innerHeight-loginBoxHeight,0)/2)}px`;\n oStyle.left=`${Math.round(Math.max(window.innerWidth-loginBoxWidth,0)/2)}px`;\n oStyle.width='500px';\n oStyle.height='700px';\n // Add Iframe to top of document DOM to have it load\n document.body.insertBefore(elIframe,document.body.firstChild);\n // Add Iframe to DOM to have it load\n document.getElementsByTagName('body')[0].appendChild(elIframe);\n elIframe.addEventListener(\"load\", myWinOnLoad, true);\n // Disallow iframe content attempts to navigate main window\n elIframe.setAttribute(\"sandbox\",\"allow-scripts allow-forms allow-same-origin\");\n elIframe.setAttribute('src', url);\n\n const svgCloseBtn =\n `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <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\">\n <title>Dismiss - Black</title>\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(1.000000, 1.000000)\">\n <circle fill=\"#252C32\" cx=\"16\" cy=\"16\" r=\"16\"></circle>\n <g transform=\"translate(9.109375, 9.214844)\" fill=\"#FFFFFF\" fill-rule=\"nonzero\">\n <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>\n </g>\n </g>\n </g>\n </svg>`;\n const bCloseWithinFrame = false;\n elCloseBtn = document.createElement('img');\n elCloseBtn.onclick = fnCloseAndReject;\n // eslint-disable-next-line prefer-template\n elCloseBtn.src = 'data:image/svg+xml;base64,' + window.btoa(svgCloseBtn);\n const oBtnStyle = elCloseBtn.style;\n oBtnStyle.cursor = 'pointer';\n // If svg doesn't set width and height might want to set oBtStyle width and height to something like '2em'\n oBtnStyle.position = 'absolute';\n oBtnStyle.display = 'none';\n oBtnStyle.zIndex = nFrameZLevel+1;\n const nTopOffset = bCloseWithinFrame ? 5 : -10;\n const nRightOffset = bCloseWithinFrame ? -34 : -20;\n oBtnStyle.top = `${Math.round(Math.max(window.innerHeight-loginBoxHeight,0)/2)+nTopOffset}px`;\n oBtnStyle.left = `${Math.round(Math.max(window.innerWidth-loginBoxWidth,0)/2)+loginBoxWidth+nRightOffset}px`;\n document.body.insertBefore(elCloseBtn,document.body.firstChild);\n // If the password was wrong, then the login screen will be in the iframe\n // ..and with Pega without realization of US-372314 it may replace the top (main portal) window\n // For now set a timer and if the timer expires, remove the iFrame and use same url within\n // visible window\n tmrAuthComplete = setTimeout( () => {\n clearTimeout(tmrAuthComplete);\n // remove password from config\n if( this.config.password ) {\n delete this.config.password;\n this.#updateConfig();\n }\n\n if( this.config.iframeLoginUI ) {\n elIframe.style.display=\"block\";\n elCloseBtn.style.display=\"block\";\n } else {\n fnCloseIframe();\n fnOpenPopup();\n }\n }, iframeTimeout);\n } else {\n fnOpenPopup();\n }\n\n let authMessageReceiver = null;\n /* Retrieve token(s) and close login window */\n const fnGetTokenAndFinish = (code) => {\n window.removeEventListener(\"message\", authMessageReceiver, false);\n this.getToken(code).then(token => {\n if( bWinIframe ) {\n clearTimeout(tmrAuthComplete);\n fnCloseIframe();\n } else {\n clearInterval(checkWindowClosed);\n myWindow.close();\n }\n resolve(token);\n })\n .catch(e => {\n reject(e);\n });\n };\n /* Handler to receive the auth code */\n authMessageReceiver = (event) => {\n // Check origin to make sure it is the redirect origin\n if( event.origin !== redirectOrigin )\n return;\n if( !event.data || !event.data.type || event.data.type !== \"PegaAuth\" )\n return;\n // eslint-disable-next-line no-console\n console.log(\"authjs(login): postMessage received with code\");\n const code = event.data.code.toString();\n fnGetTokenAndFinish(code);\n };\n window.addEventListener(\"message\", authMessageReceiver, false);\n window.authCodeCallback = (code) => {\n // eslint-disable-next-line no-console\n console.log(\"authjs(login): authCodeCallback used with code\");\n fnGetTokenAndFinish(code);\n };\n });\n });\n }\n\n // Login redirect\n loginRedirect() {\n // eslint-disable-next-line no-restricted-globals\n const state = btoa(location.origin);\n this.#buildAuthorizeUrl(state).then((url) => {\n // eslint-disable-next-line no-restricted-globals\n location.href = url;\n });\n }\n\n\n // For PKCE token endpoint includes code_verifier\n getToken(authCode) {\n // Reload config to pick up the previously stored codeVerifier\n this.reloadConfig();\n\n const {clientId, clientSecret, redirectUri, tokenUri, codeVerifier} = this.config;\n\n // eslint-disable-next-line no-restricted-globals\n const queryString = location.search;\n const urlParams = new URLSearchParams(queryString);\n const code = authCode || urlParams.get(\"code\");\n\n const formData = new URLSearchParams();\n formData.append(\"client_id\", clientId);\n if( clientSecret ) {\n formData.append(\"client_secret\", clientSecret);\n }\n formData.append(\"grant_type\", \"authorization_code\");\n formData.append(\"code\", code);\n formData.append(\"redirect_uri\", redirectUri);\n formData.append(\"code_verifier\", codeVerifier);\n\n return fetch(tokenUri, {\n method: \"POST\",\n headers: new Headers({\n \"content-type\": \"application/x-www-form-urlencoded\",\n }),\n\n body: formData.toString(),\n })\n .then((response) => response.json())\n .then(token => {\n // .expires_in contains the # of seconds before access token expires\n // add property to keep track of current time when the token expires\n token.eA = Date.now() + (token.expires_in * 1000);\n if( this.config.codeVerifier ) {\n delete this.config.codeVerifier;\n }\n // If there is a session_index then move this to the peConfig structure (as used on authorize)\n if( token.session_index ) {\n this.config.sessionIndex = token.session_index;\n }\n // If we got a token and have a session index, then reset the sessionIndexAttempts\n if( this.config.sessionIndex ) {\n this.config.sessionIndexAttempts = 0;\n }\n this.#updateConfig();\n return token;\n })\n .catch(e => {\n // eslint-disable-next-line no-console\n console.log(e)\n });\n }\n\n /* eslint-disable camelcase */\n async refreshToken(refresh_token) {\n const {clientId, clientSecret, tokenUri} = this.config;\n\n const formData = new URLSearchParams();\n formData.append(\"client_id\", clientId);\n if( clientSecret ) {\n formData.append(\"client_secret\", clientSecret);\n }\n formData.append(\"grant_type\", \"refresh_token\");\n formData.append(\"refresh_token\", refresh_token);\n\n return fetch(tokenUri, {\n method: \"POST\",\n headers: new Headers({\n \"content-type\": \"application/x-www-form-urlencoded\",\n }),\n\n body: formData.toString(),\n })\n .then((response) => {\n if( !response.ok && response.status === 401 ) {\n return null;\n }\n return response.json();\n })\n .then(token => {\n if( token ) {\n // .expires_in contains the # of seconds before access token expires\n // add property to keep track of current time when the token expires\n token.eA = Date.now() + (token.expires_in * 1000);\n }\n return token;\n })\n .catch(e => {\n // eslint-disable-next-line no-console\n console.log(e)\n });\n }\n\n async revokeTokens(access_token, refresh_token = null) {\n if( !this.config || !this.config.revokeUri) {\n // Must have a config structure and revokeUri to proceed\n return;\n }\n const {clientId, clientSecret, revokeUri} = this.config;\n\n const hdrs = {\"content-type\":\"application/x-www-form-urlencoded\"};\n if( clientSecret ) {\n const creds = `${clientId}:${clientSecret}`;\n hdrs.authorization = `Basic ${window.btoa(creds)}`;\n }\n const aTknProps = [\"access_token\"];\n if( refresh_token ) {\n aTknProps.push(\"refresh_token\");\n }\n aTknProps.forEach( (prop) => {\n const formData = new URLSearchParams();\n if( !clientSecret ) {\n formData.append(\"client_id\", clientId);\n }\n formData.append(\"token\", prop===\"access_token\" ? access_token : refresh_token);\n formData.append(\"token_type_hint\", prop);\n fetch(revokeUri, {\n method: \"POST\",\n headers: new Headers(hdrs),\n body: formData.toString(),\n })\n .then((response) => {\n if( !response.ok ) {\n // eslint-disable-next-line no-console\n console.log( `Error revoking ${prop}:${response.status}` );\n }\n })\n .catch(e => {\n // eslint-disable-next-line no-console\n console.log(e);\n });\n } );\n // Also clobber any sessionIndex\n if( this.config.sessionIndex ) {\n delete this.config.sessionIndex;\n this.#updateConfig();\n }\n }\n\n // For userinfo endpoint to return meaningful data, endpoint must include appAlias (if specified) and authorize must\n // specify profile and optionally email scope to get such info returned\n async getUserinfo(access_token) {\n if( !this.config || !this.config.userinfoUri ) {\n // Must have a config structure and userInfo to proceed\n return {};\n }\n const hdrs = {'authorization':`bearer ${access_token}`,'content-type':'application/json;charset=UTF-8'};\n return fetch(this.config.userinfoUri, {\n method: \"GET\",\n headers: new Headers(hdrs)})\n .then( response => {\n if( response.ok) {\n return response.json();\n } else {\n // eslint-disable-next-line no-console\n console.log( `Error invoking userinfo: ${response.status}` );\n }\n })\n .then( data => {\n return data;\n })\n .catch(e => {\n // eslint-disable-next-line no-console\n console.log(e);\n });\n }\n\n /* eslint-enable camelcase */\n\n // eslint-disable-next-line class-methods-use-this\n #sha256Hash(str) {\n return window.crypto.subtle.digest(\"SHA-256\", new TextEncoder().encode(str));\n }\n\n // Base64 encode\n // eslint-disable-next-line class-methods-use-this\n #encode64(buff) {\n return window.btoa(new Uint8Array(buff).reduce((s, b) => s + String.fromCharCode(b), ''));\n }\n\n /*\n * Base64 url safe encoding of an array\n */\n #base64UrlSafeEncode(buf) {\n const s = this.#encode64(buf).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n return s;\n }\n\n /* Calc code verifier if necessary\n */\n /* eslint-disable camelcase */\n #getCodeChallenge(code_verifier) {\n return this.#sha256Hash(code_verifier).then (\n (hashed) => {\n return this.#base64UrlSafeEncode(hashed)\n }\n ).catch(\n (error) => {\n // eslint-disable-next-line no-console\n console.log(error)\n }\n ).finally(\n () => { return null }\n )\n }\n /* eslint-enable camelcase */\n\n}\n\nexport default PegaAuth;\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export let gbLoggedIn: boolean;
|
|
2
|
-
export let gbLoginInProgress: boolean;
|
|
3
|
-
export function authNoRedirect(): boolean;
|
|
4
|
-
export function sdkGetAuthHeader(): string | null;
|
|
5
|
-
export function updateLoginStatus(): void;
|
|
6
|
-
export function getUserInfo(bUseSS?: boolean): Promise<any> | undefined;
|
|
7
|
-
export function login(bFullReauth?: boolean): void;
|
|
8
|
-
export function authRedirectCallback(href: any, fnLoggedInCB?: null): void;
|
|
9
|
-
export function loginIfNecessary(appName: string, noMainRedirect?: boolean, deferLogin?: boolean): Promise<void> | undefined;
|
|
10
|
-
export function getHomeUrl(): string;
|
|
11
|
-
export function authIsMainRedirect(): boolean;
|
|
12
|
-
export function authTokenUpdated(tokenInfo: any): void;
|
|
13
|
-
export function logout(): Promise<any>;
|
|
14
|
-
export function authUpdateTokens(token: any): void;
|
|
15
|
-
export function authFullReauth(): void;
|
|
16
|
-
export function sdkSetAuthHeader(authHeader: any): void;
|
|
17
|
-
export function authCustomReauth(): void;
|
|
18
|
-
//# sourceMappingURL=authManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authManager.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/authManager.js"],"names":[],"mappings":"AAOA,+BAAmE;AAEnE,sCAAiF;AA+D1E,0CAEN;AAgIM,kDAEN;AAwGM,0CAGN;AAoFO,wEAwBP;AAEM,mDA0CN;AAEM,2EAiBN;AASM,0CALK,MAAM,mBACN,OAAO,eAEP,OAAO,6BAyClB;AAEM,qCAEN;AAGM,8CAGN;AAGM,uDAEN;AAEM,uCAwCN;AAGM,mDAEN;AAIM,uCAaN;AAIM,wDAYN;AAGM,yCAKN"}
|