@pega/react-sdk-components 0.23.0
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/lib/bridge/Context/StoreContext.d.ts +4 -0
- package/lib/bridge/Context/StoreContext.d.ts.map +1 -0
- package/lib/bridge/Context/StoreContext.js +10 -0
- package/lib/bridge/Context/StoreContext.js.map +1 -0
- package/lib/bridge/helpers/sdk_component_map.d.ts +3 -0
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -0
- package/lib/bridge/helpers/sdk_component_map.js +239 -0
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -0
- package/lib/bridge/react_pconnect.d.ts +9 -0
- package/lib/bridge/react_pconnect.d.ts.map +1 -0
- package/lib/bridge/react_pconnect.js +334 -0
- package/lib/bridge/react_pconnect.js.map +1 -0
- package/lib/components/designSystemExtensions/CaseSummaryFields/CaseSummaryFields.css +19 -0
- package/lib/components/designSystemExtensions/CaseSummaryFields/CaseSummaryFields.d.ts +13 -0
- package/lib/components/designSystemExtensions/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/CaseSummaryFields/CaseSummaryFields.js +102 -0
- package/lib/components/designSystemExtensions/CaseSummaryFields/CaseSummaryFields.js.map +1 -0
- package/lib/components/designSystemExtensions/CaseSummaryFields/index.d.ts +2 -0
- package/lib/components/designSystemExtensions/CaseSummaryFields/index.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/CaseSummaryFields/index.js +2 -0
- package/lib/components/designSystemExtensions/CaseSummaryFields/index.js.map +1 -0
- package/lib/components/designSystemExtensions/DetailsFields/DetailsFields.d.ts +13 -0
- package/lib/components/designSystemExtensions/DetailsFields/DetailsFields.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/DetailsFields/DetailsFields.js +112 -0
- package/lib/components/designSystemExtensions/DetailsFields/DetailsFields.js.map +1 -0
- package/lib/components/designSystemExtensions/DetailsFields/index.d.ts +2 -0
- package/lib/components/designSystemExtensions/DetailsFields/index.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/DetailsFields/index.js +2 -0
- package/lib/components/designSystemExtensions/DetailsFields/index.js.map +1 -0
- package/lib/components/designSystemExtensions/FieldGroup/FieldGroup.d.ts +4 -0
- package/lib/components/designSystemExtensions/FieldGroup/FieldGroup.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/FieldGroup/FieldGroup.js +76 -0
- package/lib/components/designSystemExtensions/FieldGroup/FieldGroup.js.map +1 -0
- package/lib/components/designSystemExtensions/FieldGroup/index.d.ts +2 -0
- package/lib/components/designSystemExtensions/FieldGroup/index.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/FieldGroup/index.js +2 -0
- package/lib/components/designSystemExtensions/FieldGroup/index.js.map +1 -0
- package/lib/components/designSystemExtensions/FieldGroupList/FieldGroupList.d.ts +4 -0
- package/lib/components/designSystemExtensions/FieldGroupList/FieldGroupList.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/FieldGroupList/FieldGroupList.js +27 -0
- package/lib/components/designSystemExtensions/FieldGroupList/FieldGroupList.js.map +1 -0
- package/lib/components/designSystemExtensions/FieldGroupList/index.d.ts +2 -0
- package/lib/components/designSystemExtensions/FieldGroupList/index.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/FieldGroupList/index.js +2 -0
- package/lib/components/designSystemExtensions/FieldGroupList/index.js.map +1 -0
- package/lib/components/designSystemExtensions/FieldValueList/FieldValueList.d.ts +4 -0
- package/lib/components/designSystemExtensions/FieldValueList/FieldValueList.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/FieldValueList/FieldValueList.js +69 -0
- package/lib/components/designSystemExtensions/FieldValueList/FieldValueList.js.map +1 -0
- package/lib/components/designSystemExtensions/FieldValueList/index.d.ts +2 -0
- package/lib/components/designSystemExtensions/FieldValueList/index.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/FieldValueList/index.js +2 -0
- package/lib/components/designSystemExtensions/FieldValueList/index.js.map +1 -0
- package/lib/components/designSystemExtensions/Operator/Operator.d.ts +11 -0
- package/lib/components/designSystemExtensions/Operator/Operator.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/Operator/Operator.js +154 -0
- package/lib/components/designSystemExtensions/Operator/Operator.js.map +1 -0
- package/lib/components/designSystemExtensions/Operator/index.d.ts +2 -0
- package/lib/components/designSystemExtensions/Operator/index.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/Operator/index.js +2 -0
- package/lib/components/designSystemExtensions/Operator/index.js.map +1 -0
- package/lib/components/designSystemExtensions/Pulse/Pulse.d.ts +3 -0
- package/lib/components/designSystemExtensions/Pulse/Pulse.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/Pulse/Pulse.js +24 -0
- package/lib/components/designSystemExtensions/Pulse/Pulse.js.map +1 -0
- package/lib/components/designSystemExtensions/Pulse/index.d.ts +2 -0
- package/lib/components/designSystemExtensions/Pulse/index.d.ts.map +1 -0
- package/lib/components/designSystemExtensions/Pulse/index.js +2 -0
- package/lib/components/designSystemExtensions/Pulse/index.js.map +1 -0
- package/lib/components/forms/AutoComplete/AutoComplete.d.ts +3 -0
- package/lib/components/forms/AutoComplete/AutoComplete.d.ts.map +1 -0
- package/lib/components/forms/AutoComplete/AutoComplete.js +118 -0
- package/lib/components/forms/AutoComplete/AutoComplete.js.map +1 -0
- package/lib/components/forms/AutoComplete/index.d.ts +2 -0
- package/lib/components/forms/AutoComplete/index.d.ts.map +1 -0
- package/lib/components/forms/AutoComplete/index.js +2 -0
- package/lib/components/forms/AutoComplete/index.js.map +1 -0
- package/lib/components/forms/CancelAlert/CancelAlert.css +24 -0
- package/lib/components/forms/CancelAlert/CancelAlert.d.ts +5 -0
- package/lib/components/forms/CancelAlert/CancelAlert.d.ts.map +1 -0
- package/lib/components/forms/CancelAlert/CancelAlert.js +81 -0
- package/lib/components/forms/CancelAlert/CancelAlert.js.map +1 -0
- package/lib/components/forms/CancelAlert/index.d.ts +2 -0
- package/lib/components/forms/CancelAlert/index.d.ts.map +1 -0
- package/lib/components/forms/CancelAlert/index.js +2 -0
- package/lib/components/forms/CancelAlert/index.js.map +1 -0
- package/lib/components/forms/Checkbox/Checkbox.d.ts +3 -0
- package/lib/components/forms/Checkbox/Checkbox.d.ts.map +1 -0
- package/lib/components/forms/Checkbox/Checkbox.js +34 -0
- package/lib/components/forms/Checkbox/Checkbox.js.map +1 -0
- package/lib/components/forms/Checkbox/index.d.ts +2 -0
- package/lib/components/forms/Checkbox/index.d.ts.map +1 -0
- package/lib/components/forms/Checkbox/index.js +2 -0
- package/lib/components/forms/Checkbox/index.js.map +1 -0
- package/lib/components/forms/Currency/Currency.d.ts +3 -0
- package/lib/components/forms/Currency/Currency.d.ts.map +1 -0
- package/lib/components/forms/Currency/Currency.js +46 -0
- package/lib/components/forms/Currency/Currency.js.map +1 -0
- package/lib/components/forms/Currency/index.d.ts +2 -0
- package/lib/components/forms/Currency/index.d.ts.map +1 -0
- package/lib/components/forms/Currency/index.js +2 -0
- package/lib/components/forms/Currency/index.js.map +1 -0
- package/lib/components/forms/Date/Date.d.ts +3 -0
- package/lib/components/forms/Date/Date.d.ts.map +1 -0
- package/lib/components/forms/Date/Date.js +36 -0
- package/lib/components/forms/Date/Date.js.map +1 -0
- package/lib/components/forms/Date/index.d.ts +2 -0
- package/lib/components/forms/Date/index.d.ts.map +1 -0
- package/lib/components/forms/Date/index.js +2 -0
- package/lib/components/forms/Date/index.js.map +1 -0
- package/lib/components/forms/DateTime/DateTime.d.ts +3 -0
- package/lib/components/forms/DateTime/DateTime.d.ts.map +1 -0
- package/lib/components/forms/DateTime/DateTime.js +35 -0
- package/lib/components/forms/DateTime/DateTime.js.map +1 -0
- package/lib/components/forms/DateTime/index.d.ts +2 -0
- package/lib/components/forms/DateTime/index.d.ts.map +1 -0
- package/lib/components/forms/DateTime/index.js +2 -0
- package/lib/components/forms/DateTime/index.js.map +1 -0
- package/lib/components/forms/Decimal/Decimal.d.ts +3 -0
- package/lib/components/forms/Decimal/Decimal.d.ts.map +1 -0
- package/lib/components/forms/Decimal/Decimal.js +19 -0
- package/lib/components/forms/Decimal/Decimal.js.map +1 -0
- package/lib/components/forms/Decimal/index.d.ts +2 -0
- package/lib/components/forms/Decimal/index.d.ts.map +1 -0
- package/lib/components/forms/Decimal/index.js +2 -0
- package/lib/components/forms/Decimal/index.js.map +1 -0
- package/lib/components/forms/Dropdown/Dropdown.d.ts +3 -0
- package/lib/components/forms/Dropdown/Dropdown.d.ts.map +1 -0
- package/lib/components/forms/Dropdown/Dropdown.js +34 -0
- package/lib/components/forms/Dropdown/Dropdown.js.map +1 -0
- package/lib/components/forms/Dropdown/index.d.ts +2 -0
- package/lib/components/forms/Dropdown/index.d.ts.map +1 -0
- package/lib/components/forms/Dropdown/index.js +2 -0
- package/lib/components/forms/Dropdown/index.js.map +1 -0
- package/lib/components/forms/Email/Email.d.ts +3 -0
- package/lib/components/forms/Email/Email.d.ts.map +1 -0
- package/lib/components/forms/Email/Email.js +28 -0
- package/lib/components/forms/Email/Email.js.map +1 -0
- package/lib/components/forms/Email/index.d.ts +2 -0
- package/lib/components/forms/Email/index.d.ts.map +1 -0
- package/lib/components/forms/Email/index.js +2 -0
- package/lib/components/forms/Email/index.js.map +1 -0
- package/lib/components/forms/Integer/Integer.d.ts +3 -0
- package/lib/components/forms/Integer/Integer.d.ts.map +1 -0
- package/lib/components/forms/Integer/Integer.js +37 -0
- package/lib/components/forms/Integer/Integer.js.map +1 -0
- package/lib/components/forms/Integer/index.d.ts +2 -0
- package/lib/components/forms/Integer/index.d.ts.map +1 -0
- package/lib/components/forms/Integer/index.js +2 -0
- package/lib/components/forms/Integer/index.js.map +1 -0
- package/lib/components/forms/Percentage/Percentage.d.ts +3 -0
- package/lib/components/forms/Percentage/Percentage.d.ts.map +1 -0
- package/lib/components/forms/Percentage/Percentage.js +42 -0
- package/lib/components/forms/Percentage/Percentage.js.map +1 -0
- package/lib/components/forms/Percentage/index.d.ts +2 -0
- package/lib/components/forms/Percentage/index.d.ts.map +1 -0
- package/lib/components/forms/Percentage/index.js +2 -0
- package/lib/components/forms/Percentage/index.js.map +1 -0
- package/lib/components/forms/Phone/Phone.d.ts +3 -0
- package/lib/components/forms/Phone/Phone.d.ts.map +1 -0
- package/lib/components/forms/Phone/Phone.js +36 -0
- package/lib/components/forms/Phone/Phone.js.map +1 -0
- package/lib/components/forms/Phone/index.d.ts +2 -0
- package/lib/components/forms/Phone/index.d.ts.map +1 -0
- package/lib/components/forms/Phone/index.js +2 -0
- package/lib/components/forms/Phone/index.js.map +1 -0
- package/lib/components/forms/RadioButtons/RadioButtons.d.ts +3 -0
- package/lib/components/forms/RadioButtons/RadioButtons.d.ts.map +1 -0
- package/lib/components/forms/RadioButtons/RadioButtons.js +33 -0
- package/lib/components/forms/RadioButtons/RadioButtons.js.map +1 -0
- package/lib/components/forms/RadioButtons/index.d.ts +2 -0
- package/lib/components/forms/RadioButtons/index.d.ts.map +1 -0
- package/lib/components/forms/RadioButtons/index.js +2 -0
- package/lib/components/forms/RadioButtons/index.js.map +1 -0
- package/lib/components/forms/SemanticLink/SemanticLink.d.ts +12 -0
- package/lib/components/forms/SemanticLink/SemanticLink.d.ts.map +1 -0
- package/lib/components/forms/SemanticLink/SemanticLink.js +55 -0
- package/lib/components/forms/SemanticLink/SemanticLink.js.map +1 -0
- package/lib/components/forms/SemanticLink/index.d.ts +2 -0
- package/lib/components/forms/SemanticLink/index.d.ts.map +1 -0
- package/lib/components/forms/SemanticLink/index.js +2 -0
- package/lib/components/forms/SemanticLink/index.js.map +1 -0
- package/lib/components/forms/SemanticLink/utils.d.ts +14 -0
- package/lib/components/forms/SemanticLink/utils.d.ts.map +1 -0
- package/lib/components/forms/SemanticLink/utils.js +42 -0
- package/lib/components/forms/SemanticLink/utils.js.map +1 -0
- package/lib/components/forms/TextArea/TextArea.d.ts +3 -0
- package/lib/components/forms/TextArea/TextArea.d.ts.map +1 -0
- package/lib/components/forms/TextArea/TextArea.js +26 -0
- package/lib/components/forms/TextArea/TextArea.js.map +1 -0
- package/lib/components/forms/TextArea/index.d.ts +2 -0
- package/lib/components/forms/TextArea/index.d.ts.map +1 -0
- package/lib/components/forms/TextArea/index.js +2 -0
- package/lib/components/forms/TextArea/index.js.map +1 -0
- package/lib/components/forms/TextContent/TextContent.d.ts +3 -0
- package/lib/components/forms/TextContent/TextContent.d.ts.map +1 -0
- package/lib/components/forms/TextContent/TextContent.js +29 -0
- package/lib/components/forms/TextContent/TextContent.js.map +1 -0
- package/lib/components/forms/TextContent/index.d.ts +2 -0
- package/lib/components/forms/TextContent/index.d.ts.map +1 -0
- package/lib/components/forms/TextContent/index.js +2 -0
- package/lib/components/forms/TextContent/index.js.map +1 -0
- package/lib/components/forms/TextInput/TextInput.d.ts +3 -0
- package/lib/components/forms/TextInput/TextInput.d.ts.map +1 -0
- package/lib/components/forms/TextInput/TextInput.js +24 -0
- package/lib/components/forms/TextInput/TextInput.js.map +1 -0
- package/lib/components/forms/TextInput/index.d.ts +2 -0
- package/lib/components/forms/TextInput/index.d.ts.map +1 -0
- package/lib/components/forms/TextInput/index.js +2 -0
- package/lib/components/forms/TextInput/index.js.map +1 -0
- package/lib/components/forms/Time/Time.d.ts +3 -0
- package/lib/components/forms/Time/Time.d.ts.map +1 -0
- package/lib/components/forms/Time/Time.js +34 -0
- package/lib/components/forms/Time/Time.js.map +1 -0
- package/lib/components/forms/Time/index.d.ts +2 -0
- package/lib/components/forms/Time/index.d.ts.map +1 -0
- package/lib/components/forms/Time/index.js +2 -0
- package/lib/components/forms/Time/index.js.map +1 -0
- package/lib/components/forms/URL/URL.d.ts +3 -0
- package/lib/components/forms/URL/URL.d.ts.map +1 -0
- package/lib/components/forms/URL/URL.js +22 -0
- package/lib/components/forms/URL/URL.js.map +1 -0
- package/lib/components/forms/URL/index.d.ts +2 -0
- package/lib/components/forms/URL/index.d.ts.map +1 -0
- package/lib/components/forms/URL/index.js +2 -0
- package/lib/components/forms/URL/index.js.map +1 -0
- package/lib/components/forms/UserReference/UserReference.d.ts +43 -0
- package/lib/components/forms/UserReference/UserReference.d.ts.map +1 -0
- package/lib/components/forms/UserReference/UserReference.js +127 -0
- package/lib/components/forms/UserReference/UserReference.js.map +1 -0
- package/lib/components/forms/UserReference/UserReferenceUtils.d.ts +3 -0
- package/lib/components/forms/UserReference/UserReferenceUtils.d.ts.map +1 -0
- package/lib/components/forms/UserReference/UserReferenceUtils.js +14 -0
- package/lib/components/forms/UserReference/UserReferenceUtils.js.map +1 -0
- package/lib/components/forms/UserReference/index.d.ts +2 -0
- package/lib/components/forms/UserReference/index.d.ts.map +1 -0
- package/lib/components/forms/UserReference/index.js +2 -0
- package/lib/components/forms/UserReference/index.js.map +1 -0
- package/lib/components/helpers/auth.d.ts +16 -0
- package/lib/components/helpers/auth.d.ts.map +1 -0
- package/lib/components/helpers/auth.js +437 -0
- package/lib/components/helpers/auth.js.map +1 -0
- package/lib/components/helpers/authManager.d.ts +18 -0
- package/lib/components/helpers/authManager.d.ts.map +1 -0
- package/lib/components/helpers/authManager.js +588 -0
- package/lib/components/helpers/authManager.js.map +1 -0
- package/lib/components/helpers/config_access.d.ts +3 -0
- package/lib/components/helpers/config_access.d.ts.map +1 -0
- package/lib/components/helpers/config_access.js +268 -0
- package/lib/components/helpers/config_access.js.map +1 -0
- package/lib/components/helpers/data_page.d.ts +2 -0
- package/lib/components/helpers/data_page.d.ts.map +1 -0
- package/lib/components/helpers/data_page.js +23 -0
- package/lib/components/helpers/data_page.js.map +1 -0
- package/lib/components/helpers/event-utils.d.ts +3 -0
- package/lib/components/helpers/event-utils.d.ts.map +1 -0
- package/lib/components/helpers/event-utils.js +19 -0
- package/lib/components/helpers/event-utils.js.map +1 -0
- package/lib/components/helpers/field-group-utils.d.ts +3 -0
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -0
- package/lib/components/helpers/field-group-utils.js +57 -0
- package/lib/components/helpers/field-group-utils.js.map +1 -0
- package/lib/components/helpers/formatters/Boolean.d.ts +5 -0
- package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -0
- package/lib/components/helpers/formatters/Boolean.js +31 -0
- package/lib/components/helpers/formatters/Boolean.js.map +1 -0
- package/lib/components/helpers/formatters/Currency.d.ts +10 -0
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -0
- package/lib/components/helpers/formatters/Currency.js +62 -0
- package/lib/components/helpers/formatters/Currency.js.map +1 -0
- package/lib/components/helpers/formatters/CurrencyMap.d.ts +1401 -0
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -0
- package/lib/components/helpers/formatters/CurrencyMap.js +903 -0
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -0
- package/lib/components/helpers/formatters/Date.d.ts +11 -0
- package/lib/components/helpers/formatters/Date.d.ts.map +1 -0
- package/lib/components/helpers/formatters/Date.js +69 -0
- package/lib/components/helpers/formatters/Date.js.map +1 -0
- package/lib/components/helpers/formatters/common.d.ts +3 -0
- package/lib/components/helpers/formatters/common.d.ts.map +1 -0
- package/lib/components/helpers/formatters/common.js +12 -0
- package/lib/components/helpers/formatters/common.js.map +1 -0
- package/lib/components/helpers/formatters/index.d.ts +19 -0
- package/lib/components/helpers/formatters/index.d.ts.map +1 -0
- package/lib/components/helpers/formatters/index.js +104 -0
- package/lib/components/helpers/formatters/index.js.map +1 -0
- package/lib/components/helpers/utils.d.ts +19 -0
- package/lib/components/helpers/utils.d.ts.map +1 -0
- package/lib/components/helpers/utils.js +310 -0
- package/lib/components/helpers/utils.js.map +1 -0
- package/lib/components/helpers/versionHelpers.d.ts +9 -0
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -0
- package/lib/components/helpers/versionHelpers.js +13 -0
- package/lib/components/helpers/versionHelpers.js.map +1 -0
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +16 -0
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -0
- package/lib/components/infra/ActionButtons/ActionButtons.js +42 -0
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -0
- package/lib/components/infra/ActionButtons/index.d.ts +2 -0
- package/lib/components/infra/ActionButtons/index.d.ts.map +1 -0
- package/lib/components/infra/ActionButtons/index.js +2 -0
- package/lib/components/infra/ActionButtons/index.js.map +1 -0
- package/lib/components/infra/Assignment/Assignment.d.ts +17 -0
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -0
- package/lib/components/infra/Assignment/Assignment.js +217 -0
- package/lib/components/infra/Assignment/Assignment.js.map +1 -0
- package/lib/components/infra/Assignment/index.d.ts +2 -0
- package/lib/components/infra/Assignment/index.d.ts.map +1 -0
- package/lib/components/infra/Assignment/index.js +2 -0
- package/lib/components/infra/Assignment/index.js.map +1 -0
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +17 -0
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -0
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +35 -0
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -0
- package/lib/components/infra/AssignmentCard/index.d.ts +2 -0
- package/lib/components/infra/AssignmentCard/index.d.ts.map +1 -0
- package/lib/components/infra/AssignmentCard/index.js +2 -0
- package/lib/components/infra/AssignmentCard/index.js.map +1 -0
- package/lib/components/infra/Attachment/Attachment.css +18 -0
- package/lib/components/infra/Attachment/Attachment.d.ts +4 -0
- package/lib/components/infra/Attachment/Attachment.d.ts.map +1 -0
- package/lib/components/infra/Attachment/Attachment.js +334 -0
- package/lib/components/infra/Attachment/Attachment.js.map +1 -0
- package/lib/components/infra/Attachment/AttachmentUtils.d.ts +13 -0
- package/lib/components/infra/Attachment/AttachmentUtils.d.ts.map +1 -0
- package/lib/components/infra/Attachment/AttachmentUtils.js +72 -0
- package/lib/components/infra/Attachment/AttachmentUtils.js.map +1 -0
- package/lib/components/infra/Attachment/index.d.ts +2 -0
- package/lib/components/infra/Attachment/index.d.ts.map +1 -0
- package/lib/components/infra/Attachment/index.js +2 -0
- package/lib/components/infra/Attachment/index.js.map +1 -0
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +23 -0
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -0
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +370 -0
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -0
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts +13 -0
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -0
- package/lib/components/infra/Containers/FlowContainer/helpers.js +117 -0
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -0
- package/lib/components/infra/Containers/FlowContainer/index.d.ts +2 -0
- package/lib/components/infra/Containers/FlowContainer/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/FlowContainer/index.js +2 -0
- package/lib/components/infra/Containers/FlowContainer/index.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +19 -0
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +248 -0
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/index.d.ts +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/index.js +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/index.js.map +1 -0
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +25 -0
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -0
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +167 -0
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -0
- package/lib/components/infra/Containers/ViewContainer/index.d.ts +2 -0
- package/lib/components/infra/Containers/ViewContainer/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/ViewContainer/index.js +2 -0
- package/lib/components/infra/Containers/ViewContainer/index.js.map +1 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +23 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +110 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -0
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts +35 -0
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -0
- package/lib/components/infra/DashboardFilter/filterUtils.js +134 -0
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -0
- package/lib/components/infra/DashboardFilter/index.d.ts +2 -0
- package/lib/components/infra/DashboardFilter/index.d.ts.map +1 -0
- package/lib/components/infra/DashboardFilter/index.js +2 -0
- package/lib/components/infra/DashboardFilter/index.js.map +1 -0
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +15 -0
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -0
- package/lib/components/infra/DeferLoad/DeferLoad.js +139 -0
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -0
- package/lib/components/infra/DeferLoad/index.d.ts +2 -0
- package/lib/components/infra/DeferLoad/index.d.ts.map +1 -0
- package/lib/components/infra/DeferLoad/index.js +2 -0
- package/lib/components/infra/DeferLoad/index.js.map +1 -0
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +15 -0
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +86 -0
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/lib/components/infra/ErrorBoundary/index.d.ts +2 -0
- package/lib/components/infra/ErrorBoundary/index.d.ts.map +1 -0
- package/lib/components/infra/ErrorBoundary/index.js +2 -0
- package/lib/components/infra/ErrorBoundary/index.js.map +1 -0
- package/lib/components/infra/MultiStep/MultiStep.css +261 -0
- package/lib/components/infra/MultiStep/MultiStep.d.ts +21 -0
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -0
- package/lib/components/infra/MultiStep/MultiStep.js +130 -0
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -0
- package/lib/components/infra/MultiStep/index.d.ts +2 -0
- package/lib/components/infra/MultiStep/index.d.ts.map +1 -0
- package/lib/components/infra/MultiStep/index.js +2 -0
- package/lib/components/infra/MultiStep/index.js.map +1 -0
- package/lib/components/infra/NavBar/NavBar.css +170 -0
- package/lib/components/infra/NavBar/NavBar.d.ts +20 -0
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -0
- package/lib/components/infra/NavBar/NavBar.js +266 -0
- package/lib/components/infra/NavBar/NavBar.js.map +1 -0
- package/lib/components/infra/NavBar/index.d.ts +2 -0
- package/lib/components/infra/NavBar/index.d.ts.map +1 -0
- package/lib/components/infra/NavBar/index.js +2 -0
- package/lib/components/infra/NavBar/index.js.map +1 -0
- package/lib/components/infra/Reference/Reference.d.ts +20 -0
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -0
- package/lib/components/infra/Reference/Reference.js +48 -0
- package/lib/components/infra/Reference/Reference.js.map +1 -0
- package/lib/components/infra/Reference/index.d.ts +2 -0
- package/lib/components/infra/Reference/index.d.ts.map +1 -0
- package/lib/components/infra/Reference/index.js +2 -0
- package/lib/components/infra/Reference/index.js.map +1 -0
- package/lib/components/infra/Region/Region.d.ts +10 -0
- package/lib/components/infra/Region/Region.d.ts.map +1 -0
- package/lib/components/infra/Region/Region.js +11 -0
- package/lib/components/infra/Region/Region.js.map +1 -0
- package/lib/components/infra/Region/index.d.ts +2 -0
- package/lib/components/infra/Region/index.d.ts.map +1 -0
- package/lib/components/infra/Region/index.js +2 -0
- package/lib/components/infra/Region/index.js.map +1 -0
- package/lib/components/infra/RootContainer/RootContainer.d.ts +22 -0
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -0
- package/lib/components/infra/RootContainer/RootContainer.js +258 -0
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -0
- package/lib/components/infra/RootContainer/index.d.ts +2 -0
- package/lib/components/infra/RootContainer/index.d.ts.map +1 -0
- package/lib/components/infra/RootContainer/index.js +2 -0
- package/lib/components/infra/RootContainer/index.js.map +1 -0
- package/lib/components/infra/Stages/Stages.d.ts +11 -0
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -0
- package/lib/components/infra/Stages/Stages.js +94 -0
- package/lib/components/infra/Stages/Stages.js.map +1 -0
- package/lib/components/infra/Stages/index.d.ts +2 -0
- package/lib/components/infra/Stages/index.d.ts.map +1 -0
- package/lib/components/infra/Stages/index.js +2 -0
- package/lib/components/infra/Stages/index.js.map +1 -0
- package/lib/components/infra/ToDo/ToDo.css +87 -0
- package/lib/components/infra/ToDo/ToDo.d.ts +29 -0
- package/lib/components/infra/ToDo/ToDo.d.ts.map +1 -0
- package/lib/components/infra/ToDo/ToDo.js +226 -0
- package/lib/components/infra/ToDo/ToDo.js.map +1 -0
- package/lib/components/infra/ToDo/index.d.ts +2 -0
- package/lib/components/infra/ToDo/index.d.ts.map +1 -0
- package/lib/components/infra/ToDo/index.js +2 -0
- package/lib/components/infra/ToDo/index.js.map +1 -0
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTab.d.ts +3 -0
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTab.d.ts.map +1 -0
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTab.js +23 -0
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTab.js.map +1 -0
- package/lib/components/infra/VerticalTabs/VerticalTabs.d.ts +13 -0
- package/lib/components/infra/VerticalTabs/VerticalTabs.d.ts.map +1 -0
- package/lib/components/infra/VerticalTabs/VerticalTabs.js +50 -0
- package/lib/components/infra/VerticalTabs/VerticalTabs.js.map +1 -0
- package/lib/components/infra/VerticalTabs/index.d.ts +2 -0
- package/lib/components/infra/VerticalTabs/index.d.ts.map +1 -0
- package/lib/components/infra/VerticalTabs/index.js +2 -0
- package/lib/components/infra/VerticalTabs/index.js.map +1 -0
- package/lib/components/infra/View/View.css +8 -0
- package/lib/components/infra/View/View.d.ts +23 -0
- package/lib/components/infra/View/View.d.ts.map +1 -0
- package/lib/components/infra/View/View.js +136 -0
- package/lib/components/infra/View/View.js.map +1 -0
- package/lib/components/infra/View/index.d.ts +2 -0
- package/lib/components/infra/View/index.d.ts.map +1 -0
- package/lib/components/infra/View/index.js +2 -0
- package/lib/components/infra/View/index.js.map +1 -0
- package/lib/components/templates/AppShell/AppShell.css +40 -0
- package/lib/components/templates/AppShell/AppShell.d.ts +24 -0
- package/lib/components/templates/AppShell/AppShell.d.ts.map +1 -0
- package/lib/components/templates/AppShell/AppShell.js +390 -0
- package/lib/components/templates/AppShell/AppShell.js.map +1 -0
- package/lib/components/templates/AppShell/index.d.ts +2 -0
- package/lib/components/templates/AppShell/index.d.ts.map +1 -0
- package/lib/components/templates/AppShell/index.js +2 -0
- package/lib/components/templates/AppShell/index.js.map +1 -0
- package/lib/components/templates/CaseSummary/CaseSummary.d.ts +10 -0
- package/lib/components/templates/CaseSummary/CaseSummary.d.ts.map +1 -0
- package/lib/components/templates/CaseSummary/CaseSummary.js +40 -0
- package/lib/components/templates/CaseSummary/CaseSummary.js.map +1 -0
- package/lib/components/templates/CaseSummary/index.d.ts +2 -0
- package/lib/components/templates/CaseSummary/index.d.ts.map +1 -0
- package/lib/components/templates/CaseSummary/index.js +2 -0
- package/lib/components/templates/CaseSummary/index.js.map +1 -0
- package/lib/components/templates/CaseView/CaseView.d.ts +25 -0
- package/lib/components/templates/CaseView/CaseView.d.ts.map +1 -0
- package/lib/components/templates/CaseView/CaseView.js +180 -0
- package/lib/components/templates/CaseView/CaseView.js.map +1 -0
- package/lib/components/templates/CaseView/CaseViewActionsMenu.d.ts +16 -0
- package/lib/components/templates/CaseView/CaseViewActionsMenu.d.ts.map +1 -0
- package/lib/components/templates/CaseView/CaseViewActionsMenu.js +43 -0
- package/lib/components/templates/CaseView/CaseViewActionsMenu.js.map +1 -0
- package/lib/components/templates/CaseView/index.d.ts +2 -0
- package/lib/components/templates/CaseView/index.d.ts.map +1 -0
- package/lib/components/templates/CaseView/index.js +2 -0
- package/lib/components/templates/CaseView/index.js.map +1 -0
- package/lib/components/templates/DataReference/DataReference.d.ts +32 -0
- package/lib/components/templates/DataReference/DataReference.d.ts.map +1 -0
- package/lib/components/templates/DataReference/DataReference.js +221 -0
- package/lib/components/templates/DataReference/DataReference.js.map +1 -0
- package/lib/components/templates/DataReference/index.d.ts +2 -0
- package/lib/components/templates/DataReference/index.d.ts.map +1 -0
- package/lib/components/templates/DataReference/index.js +2 -0
- package/lib/components/templates/DataReference/index.js.map +1 -0
- package/lib/components/templates/DefaultForm/DefaultForm.css +25 -0
- package/lib/components/templates/DefaultForm/DefaultForm.d.ts +14 -0
- package/lib/components/templates/DefaultForm/DefaultForm.d.ts.map +1 -0
- package/lib/components/templates/DefaultForm/DefaultForm.js +39 -0
- package/lib/components/templates/DefaultForm/DefaultForm.js.map +1 -0
- package/lib/components/templates/DefaultForm/index.d.ts +2 -0
- package/lib/components/templates/DefaultForm/index.d.ts.map +1 -0
- package/lib/components/templates/DefaultForm/index.js +2 -0
- package/lib/components/templates/DefaultForm/index.js.map +1 -0
- package/lib/components/templates/Details/Details/Details.d.ts +8 -0
- package/lib/components/templates/Details/Details/Details.d.ts.map +1 -0
- package/lib/components/templates/Details/Details/Details.js +24 -0
- package/lib/components/templates/Details/Details/Details.js.map +1 -0
- package/lib/components/templates/Details/Details/index.d.ts +2 -0
- package/lib/components/templates/Details/Details/index.d.ts.map +1 -0
- package/lib/components/templates/Details/Details/index.js +2 -0
- package/lib/components/templates/Details/Details/index.js.map +1 -0
- package/lib/components/templates/Details/DetailsSubTabs/DetailsSubTabs.d.ts +18 -0
- package/lib/components/templates/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -0
- package/lib/components/templates/Details/DetailsSubTabs/DetailsSubTabs.js +45 -0
- package/lib/components/templates/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -0
- package/lib/components/templates/Details/DetailsSubTabs/index.d.ts +2 -0
- package/lib/components/templates/Details/DetailsSubTabs/index.d.ts.map +1 -0
- package/lib/components/templates/Details/DetailsSubTabs/index.js +2 -0
- package/lib/components/templates/Details/DetailsSubTabs/index.js.map +1 -0
- package/lib/components/templates/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +7 -0
- package/lib/components/templates/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -0
- package/lib/components/templates/Details/DetailsThreeColumn/DetailsThreeColumn.js +32 -0
- package/lib/components/templates/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -0
- package/lib/components/templates/Details/DetailsThreeColumn/index.d.ts +2 -0
- package/lib/components/templates/Details/DetailsThreeColumn/index.d.ts.map +1 -0
- package/lib/components/templates/Details/DetailsThreeColumn/index.js +2 -0
- package/lib/components/templates/Details/DetailsThreeColumn/index.js.map +1 -0
- package/lib/components/templates/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +7 -0
- package/lib/components/templates/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -0
- package/lib/components/templates/Details/DetailsTwoColumn/DetailsTwoColumn.js +30 -0
- package/lib/components/templates/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -0
- package/lib/components/templates/Details/DetailsTwoColumn/index.d.ts +2 -0
- package/lib/components/templates/Details/DetailsTwoColumn/index.d.ts.map +1 -0
- package/lib/components/templates/Details/DetailsTwoColumn/index.js +2 -0
- package/lib/components/templates/Details/DetailsTwoColumn/index.js.map +1 -0
- package/lib/components/templates/FieldGroupTemplate/FieldGroupTemplate.d.ts +22 -0
- package/lib/components/templates/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -0
- package/lib/components/templates/FieldGroupTemplate/FieldGroupTemplate.js +70 -0
- package/lib/components/templates/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -0
- package/lib/components/templates/FieldGroupTemplate/index.d.ts +2 -0
- package/lib/components/templates/FieldGroupTemplate/index.d.ts.map +1 -0
- package/lib/components/templates/FieldGroupTemplate/index.js +2 -0
- package/lib/components/templates/FieldGroupTemplate/index.js.map +1 -0
- package/lib/components/templates/InlineDashboard/InlineDashboard.d.ts +10 -0
- package/lib/components/templates/InlineDashboard/InlineDashboard.d.ts.map +1 -0
- package/lib/components/templates/InlineDashboard/InlineDashboard.js +48 -0
- package/lib/components/templates/InlineDashboard/InlineDashboard.js.map +1 -0
- package/lib/components/templates/InlineDashboard/index.d.ts +2 -0
- package/lib/components/templates/InlineDashboard/index.d.ts.map +1 -0
- package/lib/components/templates/InlineDashboard/index.js +2 -0
- package/lib/components/templates/InlineDashboard/index.js.map +1 -0
- package/lib/components/templates/InlineDashboardPage/InlineDashboardPage.d.ts +18 -0
- package/lib/components/templates/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -0
- package/lib/components/templates/InlineDashboardPage/InlineDashboardPage.js +34 -0
- package/lib/components/templates/InlineDashboardPage/InlineDashboardPage.js.map +1 -0
- package/lib/components/templates/InlineDashboardPage/index.d.ts +2 -0
- package/lib/components/templates/InlineDashboardPage/index.d.ts.map +1 -0
- package/lib/components/templates/InlineDashboardPage/index.js +2 -0
- package/lib/components/templates/InlineDashboardPage/index.js.map +1 -0
- package/lib/components/templates/ListPage/ListPage.d.ts +16 -0
- package/lib/components/templates/ListPage/ListPage.d.ts.map +1 -0
- package/lib/components/templates/ListPage/ListPage.js +14 -0
- package/lib/components/templates/ListPage/ListPage.js.map +1 -0
- package/lib/components/templates/ListPage/index.d.ts +2 -0
- package/lib/components/templates/ListPage/index.d.ts.map +1 -0
- package/lib/components/templates/ListPage/index.js +2 -0
- package/lib/components/templates/ListPage/index.js.map +1 -0
- package/lib/components/templates/ListView/ListView.css +10 -0
- package/lib/components/templates/ListView/ListView.d.ts +12 -0
- package/lib/components/templates/ListView/ListView.d.ts.map +1 -0
- package/lib/components/templates/ListView/ListView.js +842 -0
- package/lib/components/templates/ListView/ListView.js.map +1 -0
- package/lib/components/templates/ListView/index.d.ts +2 -0
- package/lib/components/templates/ListView/index.d.ts.map +1 -0
- package/lib/components/templates/ListView/index.js +2 -0
- package/lib/components/templates/ListView/index.js.map +1 -0
- package/lib/components/templates/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +17 -0
- package/lib/components/templates/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -0
- package/lib/components/templates/MultiReferenceReadOnly/MultiReferenceReadOnly.js +34 -0
- package/lib/components/templates/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -0
- package/lib/components/templates/MultiReferenceReadOnly/index.d.ts +2 -0
- package/lib/components/templates/MultiReferenceReadOnly/index.d.ts.map +1 -0
- package/lib/components/templates/MultiReferenceReadOnly/index.js +2 -0
- package/lib/components/templates/MultiReferenceReadOnly/index.js.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWide/NarrowWide.css +21 -0
- package/lib/components/templates/NarrowWide/NarrowWide/NarrowWide.d.ts +4 -0
- package/lib/components/templates/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWide/NarrowWide.js +16 -0
- package/lib/components/templates/NarrowWide/NarrowWide/NarrowWide.js.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWide/index.d.ts +2 -0
- package/lib/components/templates/NarrowWide/NarrowWide/index.d.ts.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWide/index.js +2 -0
- package/lib/components/templates/NarrowWide/NarrowWide/index.js.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +7 -0
- package/lib/components/templates/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +35 -0
- package/lib/components/templates/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWideDetails/index.d.ts +2 -0
- package/lib/components/templates/NarrowWide/NarrowWideDetails/index.d.ts.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWideDetails/index.js +2 -0
- package/lib/components/templates/NarrowWide/NarrowWideDetails/index.js.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWideForm/NarrowWideForm.css +21 -0
- package/lib/components/templates/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +4 -0
- package/lib/components/templates/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWideForm/NarrowWideForm.js +10 -0
- package/lib/components/templates/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWideForm/index.d.ts +2 -0
- package/lib/components/templates/NarrowWide/NarrowWideForm/index.d.ts.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWideForm/index.js +2 -0
- package/lib/components/templates/NarrowWide/NarrowWideForm/index.js.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +17 -0
- package/lib/components/templates/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWidePage/NarrowWidePage.js +25 -0
- package/lib/components/templates/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWidePage/index.d.ts +2 -0
- package/lib/components/templates/NarrowWide/NarrowWidePage/index.d.ts.map +1 -0
- package/lib/components/templates/NarrowWide/NarrowWidePage/index.js +2 -0
- package/lib/components/templates/NarrowWide/NarrowWidePage/index.js.map +1 -0
- package/lib/components/templates/OneColumn/OneColumn/OneColumn.d.ts +10 -0
- package/lib/components/templates/OneColumn/OneColumn/OneColumn.d.ts.map +1 -0
- package/lib/components/templates/OneColumn/OneColumn/OneColumn.js +22 -0
- package/lib/components/templates/OneColumn/OneColumn/OneColumn.js.map +1 -0
- package/lib/components/templates/OneColumn/OneColumn/index.d.ts +2 -0
- package/lib/components/templates/OneColumn/OneColumn/index.d.ts.map +1 -0
- package/lib/components/templates/OneColumn/OneColumn/index.js +2 -0
- package/lib/components/templates/OneColumn/OneColumn/index.js.map +1 -0
- package/lib/components/templates/OneColumn/OneColumnPage/OneColumnPage.d.ts +11 -0
- package/lib/components/templates/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -0
- package/lib/components/templates/OneColumn/OneColumnPage/OneColumnPage.js +15 -0
- package/lib/components/templates/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -0
- package/lib/components/templates/OneColumn/OneColumnPage/index.d.ts +2 -0
- package/lib/components/templates/OneColumn/OneColumnPage/index.d.ts.map +1 -0
- package/lib/components/templates/OneColumn/OneColumnPage/index.js +2 -0
- package/lib/components/templates/OneColumn/OneColumnPage/index.js.map +1 -0
- package/lib/components/templates/OneColumn/OneColumnTab/OneColumnTab.d.ts +10 -0
- package/lib/components/templates/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -0
- package/lib/components/templates/OneColumn/OneColumnTab/OneColumnTab.js +11 -0
- package/lib/components/templates/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -0
- package/lib/components/templates/OneColumn/OneColumnTab/index.d.ts +2 -0
- package/lib/components/templates/OneColumn/OneColumnTab/index.d.ts.map +1 -0
- package/lib/components/templates/OneColumn/OneColumnTab/index.js +2 -0
- package/lib/components/templates/OneColumn/OneColumnTab/index.js.map +1 -0
- package/lib/components/templates/PromotedFilters/PromotedFilters.css +7 -0
- package/lib/components/templates/PromotedFilters/PromotedFilters.d.ts +17 -0
- package/lib/components/templates/PromotedFilters/PromotedFilters.d.ts.map +1 -0
- package/lib/components/templates/PromotedFilters/PromotedFilters.js +130 -0
- package/lib/components/templates/PromotedFilters/PromotedFilters.js.map +1 -0
- package/lib/components/templates/PromotedFilters/index.d.ts +2 -0
- package/lib/components/templates/PromotedFilters/index.d.ts.map +1 -0
- package/lib/components/templates/PromotedFilters/index.js +2 -0
- package/lib/components/templates/PromotedFilters/index.js.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTable/SimpleTable.d.ts +3 -0
- package/lib/components/templates/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTable/SimpleTable.js +26 -0
- package/lib/components/templates/SimpleTable/SimpleTable/SimpleTable.js.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTable/index.d.ts +2 -0
- package/lib/components/templates/SimpleTable/SimpleTable/index.d.ts.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTable/index.js +2 -0
- package/lib/components/templates/SimpleTable/SimpleTable/index.js.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +3 -0
- package/lib/components/templates/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTableManual/SimpleTableManual.js +505 -0
- package/lib/components/templates/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTableManual/index.d.ts +2 -0
- package/lib/components/templates/SimpleTable/SimpleTableManual/index.d.ts.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTableManual/index.js +2 -0
- package/lib/components/templates/SimpleTable/SimpleTableManual/index.js.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +35 -0
- package/lib/components/templates/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +105 -0
- package/lib/components/templates/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTableSelect/index.d.ts +2 -0
- package/lib/components/templates/SimpleTable/SimpleTableSelect/index.d.ts.map +1 -0
- package/lib/components/templates/SimpleTable/SimpleTableSelect/index.js +2 -0
- package/lib/components/templates/SimpleTable/SimpleTableSelect/index.js.map +1 -0
- package/lib/components/templates/SimpleTable/helpers.d.ts +79 -0
- package/lib/components/templates/SimpleTable/helpers.d.ts.map +1 -0
- package/lib/components/templates/SimpleTable/helpers.js +306 -0
- package/lib/components/templates/SimpleTable/helpers.js.map +1 -0
- package/lib/components/templates/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +28 -0
- package/lib/components/templates/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -0
- package/lib/components/templates/SingleReferenceReadOnly/SingleReferenceReadOnly.js +51 -0
- package/lib/components/templates/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -0
- package/lib/components/templates/SingleReferenceReadOnly/index.d.ts +2 -0
- package/lib/components/templates/SingleReferenceReadOnly/index.d.ts.map +1 -0
- package/lib/components/templates/SingleReferenceReadOnly/index.js +2 -0
- package/lib/components/templates/SingleReferenceReadOnly/index.js.map +1 -0
- package/lib/components/templates/SubTabs/SubTabs.d.ts +13 -0
- package/lib/components/templates/SubTabs/SubTabs.d.ts.map +1 -0
- package/lib/components/templates/SubTabs/SubTabs.js +33 -0
- package/lib/components/templates/SubTabs/SubTabs.js.map +1 -0
- package/lib/components/templates/SubTabs/index.d.ts +2 -0
- package/lib/components/templates/SubTabs/index.d.ts.map +1 -0
- package/lib/components/templates/SubTabs/index.js +2 -0
- package/lib/components/templates/SubTabs/index.js.map +1 -0
- package/lib/components/templates/SubTabs/tabUtils.d.ts +5 -0
- package/lib/components/templates/SubTabs/tabUtils.d.ts.map +1 -0
- package/lib/components/templates/SubTabs/tabUtils.js +62 -0
- package/lib/components/templates/SubTabs/tabUtils.js.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumn/TwoColumn.css +13 -0
- package/lib/components/templates/TwoColumn/TwoColumn/TwoColumn.d.ts +14 -0
- package/lib/components/templates/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumn/TwoColumn.js +43 -0
- package/lib/components/templates/TwoColumn/TwoColumn/TwoColumn.js.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumn/index.d.ts +2 -0
- package/lib/components/templates/TwoColumn/TwoColumn/index.d.ts.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumn/index.js +2 -0
- package/lib/components/templates/TwoColumn/TwoColumn/index.js.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +11 -0
- package/lib/components/templates/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumnPage/TwoColumnPage.js +16 -0
- package/lib/components/templates/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumnPage/index.d.ts +2 -0
- package/lib/components/templates/TwoColumn/TwoColumnPage/index.d.ts.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumnPage/index.js +2 -0
- package/lib/components/templates/TwoColumn/TwoColumnPage/index.js.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumnTab/TwoColumnTab.css +12 -0
- package/lib/components/templates/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +14 -0
- package/lib/components/templates/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumnTab/TwoColumnTab.js +40 -0
- package/lib/components/templates/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumnTab/index.d.ts +2 -0
- package/lib/components/templates/TwoColumn/TwoColumnTab/index.d.ts.map +1 -0
- package/lib/components/templates/TwoColumn/TwoColumnTab/index.js +2 -0
- package/lib/components/templates/TwoColumn/TwoColumnTab/index.js.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrow/WideNarrow.css +21 -0
- package/lib/components/templates/WideNarrow/WideNarrow/WideNarrow.d.ts +4 -0
- package/lib/components/templates/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrow/WideNarrow.js +16 -0
- package/lib/components/templates/WideNarrow/WideNarrow/WideNarrow.js.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrow/index.d.ts +2 -0
- package/lib/components/templates/WideNarrow/WideNarrow/index.d.ts.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrow/index.js +2 -0
- package/lib/components/templates/WideNarrow/WideNarrow/index.js.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +7 -0
- package/lib/components/templates/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +35 -0
- package/lib/components/templates/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowDetails/index.d.ts +2 -0
- package/lib/components/templates/WideNarrow/WideNarrowDetails/index.d.ts.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowDetails/index.js +2 -0
- package/lib/components/templates/WideNarrow/WideNarrowDetails/index.js.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowForm/WideNarrowForm.css +21 -0
- package/lib/components/templates/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +4 -0
- package/lib/components/templates/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowForm/WideNarrowForm.js +10 -0
- package/lib/components/templates/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowForm/index.d.ts +2 -0
- package/lib/components/templates/WideNarrow/WideNarrowForm/index.d.ts.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowForm/index.js +2 -0
- package/lib/components/templates/WideNarrow/WideNarrowForm/index.js.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +17 -0
- package/lib/components/templates/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowPage/WideNarrowPage.js +25 -0
- package/lib/components/templates/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowPage/index.d.ts +2 -0
- package/lib/components/templates/WideNarrow/WideNarrowPage/index.d.ts.map +1 -0
- package/lib/components/templates/WideNarrow/WideNarrowPage/index.js +2 -0
- package/lib/components/templates/WideNarrow/WideNarrowPage/index.js.map +1 -0
- package/lib/components/templates/utils.d.ts +3 -0
- package/lib/components/templates/utils.d.ts.map +1 -0
- package/lib/components/templates/utils.js +22 -0
- package/lib/components/templates/utils.js.map +1 -0
- package/lib/components/widgets/AppAnnouncement/AppAnnouncement.d.ts +19 -0
- package/lib/components/widgets/AppAnnouncement/AppAnnouncement.d.ts.map +1 -0
- package/lib/components/widgets/AppAnnouncement/AppAnnouncement.js +53 -0
- package/lib/components/widgets/AppAnnouncement/AppAnnouncement.js.map +1 -0
- package/lib/components/widgets/AppAnnouncement/index.d.ts +2 -0
- package/lib/components/widgets/AppAnnouncement/index.d.ts.map +1 -0
- package/lib/components/widgets/AppAnnouncement/index.js +2 -0
- package/lib/components/widgets/AppAnnouncement/index.js.map +1 -0
- package/lib/components/widgets/CaseHistory/CaseHistory.d.ts +10 -0
- package/lib/components/widgets/CaseHistory/CaseHistory.d.ts.map +1 -0
- package/lib/components/widgets/CaseHistory/CaseHistory.js +118 -0
- package/lib/components/widgets/CaseHistory/CaseHistory.js.map +1 -0
- package/lib/components/widgets/CaseHistory/index.d.ts +2 -0
- package/lib/components/widgets/CaseHistory/index.d.ts.map +1 -0
- package/lib/components/widgets/CaseHistory/index.js +2 -0
- package/lib/components/widgets/CaseHistory/index.js.map +1 -0
- package/lib/components/widgets/FileUtility/ActionButtonsForFileUtil.css +27 -0
- package/lib/components/widgets/FileUtility/ActionButtonsForFileUtil.d.ts +4 -0
- package/lib/components/widgets/FileUtility/ActionButtonsForFileUtil.d.ts.map +1 -0
- package/lib/components/widgets/FileUtility/ActionButtonsForFileUtil.js +9 -0
- package/lib/components/widgets/FileUtility/ActionButtonsForFileUtil.js.map +1 -0
- package/lib/components/widgets/FileUtility/FileUtility.css +117 -0
- package/lib/components/widgets/FileUtility/FileUtility.d.ts +4 -0
- package/lib/components/widgets/FileUtility/FileUtility.d.ts.map +1 -0
- package/lib/components/widgets/FileUtility/FileUtility.js +456 -0
- package/lib/components/widgets/FileUtility/FileUtility.js.map +1 -0
- package/lib/components/widgets/FileUtility/index.d.ts +1 -0
- package/lib/components/widgets/FileUtility/index.d.ts.map +1 -0
- package/lib/components/widgets/FileUtility/index.js +2 -0
- package/lib/components/widgets/FileUtility/index.js.map +1 -0
- package/lib/components/widgets/Followers/Followers.d.ts +8 -0
- package/lib/components/widgets/Followers/Followers.d.ts.map +1 -0
- package/lib/components/widgets/Followers/Followers.js +40 -0
- package/lib/components/widgets/Followers/Followers.js.map +1 -0
- package/lib/components/widgets/Followers/index.d.ts +2 -0
- package/lib/components/widgets/Followers/index.d.ts.map +1 -0
- package/lib/components/widgets/Followers/index.js +2 -0
- package/lib/components/widgets/Followers/index.js.map +1 -0
- package/lib/components/widgets/SummaryItem/SummaryItem.css +78 -0
- package/lib/components/widgets/SummaryItem/SummaryItem.d.ts +4 -0
- package/lib/components/widgets/SummaryItem/SummaryItem.d.ts.map +1 -0
- package/lib/components/widgets/SummaryItem/SummaryItem.js +46 -0
- package/lib/components/widgets/SummaryItem/SummaryItem.js.map +1 -0
- package/lib/components/widgets/SummaryItem/index.d.ts +2 -0
- package/lib/components/widgets/SummaryItem/index.d.ts.map +1 -0
- package/lib/components/widgets/SummaryItem/index.js +2 -0
- package/lib/components/widgets/SummaryItem/index.js.map +1 -0
- package/lib/components/widgets/SummaryList/SummaryList.d.ts +3 -0
- package/lib/components/widgets/SummaryList/SummaryList.d.ts.map +1 -0
- package/lib/components/widgets/SummaryList/SummaryList.js +6 -0
- package/lib/components/widgets/SummaryList/SummaryList.js.map +1 -0
- package/lib/components/widgets/SummaryList/index.d.ts +2 -0
- package/lib/components/widgets/SummaryList/index.d.ts.map +1 -0
- package/lib/components/widgets/SummaryList/index.js +2 -0
- package/lib/components/widgets/SummaryList/index.js.map +1 -0
- package/lib/components_map.d.ts +4 -0
- package/lib/components_map.d.ts.map +1 -0
- package/lib/components_map.js +820 -0
- package/lib/components_map.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -0
- package/lib/sdk-pega-component-map.d.ts +156 -0
- package/lib/sdk-pega-component-map.d.ts.map +1 -0
- package/lib/sdk-pega-component-map.js +167 -0
- package/lib/sdk-pega-component-map.js.map +1 -0
- package/package.json +14 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-boolean-value */
|
|
2
|
+
import { Button } from '@material-ui/core';
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
4
|
+
import { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize, getIconForAttachment } from './AttachmentUtils';
|
|
5
|
+
import './Attachment.css';
|
|
6
|
+
import SummaryList from '../../widgets/SummaryList';
|
|
7
|
+
import { CircularProgress } from "@material-ui/core";
|
|
8
|
+
import download from "downloadjs";
|
|
9
|
+
function getCurrentAttachmentsList(context) {
|
|
10
|
+
return PCore.getStoreValue('.attachmentsList', 'context_data', context) || [];
|
|
11
|
+
}
|
|
12
|
+
export default function Attachment(props) {
|
|
13
|
+
const { value, getPConnect, label } = props;
|
|
14
|
+
/* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */
|
|
15
|
+
let { required, disabled } = props;
|
|
16
|
+
[required, disabled] = [required, disabled].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));
|
|
17
|
+
let arFileList$ = [];
|
|
18
|
+
const pConn = getPConnect();
|
|
19
|
+
let fileTemp = {};
|
|
20
|
+
let categoryName = '';
|
|
21
|
+
if (value && value.pyCategoryName) {
|
|
22
|
+
categoryName = value.pyCategoryName;
|
|
23
|
+
}
|
|
24
|
+
let valueRef = pConn.getStateProps().value;
|
|
25
|
+
valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;
|
|
26
|
+
const [file, setFile] = useState(fileTemp);
|
|
27
|
+
const fileDownload = (data, fileName, ext) => {
|
|
28
|
+
const fileData = ext ? `${fileName}.${ext}` : fileName;
|
|
29
|
+
download(atob(data), fileData);
|
|
30
|
+
};
|
|
31
|
+
function _downloadFileFromList(fileObj) {
|
|
32
|
+
PCore.getAttachmentUtils()
|
|
33
|
+
.downloadAttachment(fileObj.pzInsKey, pConn.getContextName())
|
|
34
|
+
.then((content) => {
|
|
35
|
+
const extension = fileObj.pyAttachName.split(".").pop();
|
|
36
|
+
fileDownload(content.data, fileObj.pyFileName, extension);
|
|
37
|
+
})
|
|
38
|
+
.catch(() => { });
|
|
39
|
+
}
|
|
40
|
+
function setNewFiles(arFiles) {
|
|
41
|
+
let index = 0;
|
|
42
|
+
for (const item of arFiles) {
|
|
43
|
+
if (!validateMaxSize(item, 5)) {
|
|
44
|
+
item.error = true;
|
|
45
|
+
item.meta = "File is too big. Max allowed size is 5MB.";
|
|
46
|
+
}
|
|
47
|
+
item.mimeType = item.type;
|
|
48
|
+
item.icon = getIconFromFileType(item.type);
|
|
49
|
+
item.ID = `${new Date().getTime()}I${index}`;
|
|
50
|
+
index += 1;
|
|
51
|
+
}
|
|
52
|
+
return arFiles;
|
|
53
|
+
}
|
|
54
|
+
function getFiles(arFiles) {
|
|
55
|
+
return setNewFiles(arFiles);
|
|
56
|
+
}
|
|
57
|
+
function getNewListUtilityItemProps({ att, cancelFile, downloadFile, deleteFile, removeFile }) {
|
|
58
|
+
let actions;
|
|
59
|
+
if (att.progress && att.progress !== 100) {
|
|
60
|
+
actions = [
|
|
61
|
+
{
|
|
62
|
+
id: `Cancel-${att.ID}`,
|
|
63
|
+
text: "Cancel",
|
|
64
|
+
icon: "times",
|
|
65
|
+
onClick: cancelFile
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
else if (att.links) {
|
|
70
|
+
const isFile = att.type === "FILE";
|
|
71
|
+
const ID = att.ID.replace(/\s/gi, "");
|
|
72
|
+
const actionsMap = new Map([
|
|
73
|
+
[
|
|
74
|
+
"download",
|
|
75
|
+
{
|
|
76
|
+
id: `download-${ID}`,
|
|
77
|
+
text: isFile ? "Download" : "Open",
|
|
78
|
+
icon: isFile ? "download" : "open",
|
|
79
|
+
onClick: downloadFile
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
"delete",
|
|
84
|
+
{
|
|
85
|
+
id: `Delete-${ID}`,
|
|
86
|
+
text: "Delete",
|
|
87
|
+
icon: "trash",
|
|
88
|
+
onClick: deleteFile
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
]);
|
|
92
|
+
actions = [];
|
|
93
|
+
actionsMap.forEach((action, actionKey) => {
|
|
94
|
+
if (att.links[actionKey]) {
|
|
95
|
+
actions.push(action);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
else if (att.error) {
|
|
100
|
+
actions = [
|
|
101
|
+
{
|
|
102
|
+
id: `Remove-${att.ID}`,
|
|
103
|
+
text: "Remove",
|
|
104
|
+
icon: "trash",
|
|
105
|
+
onClick: removeFile
|
|
106
|
+
}
|
|
107
|
+
];
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
id: att.ID,
|
|
111
|
+
visual: {
|
|
112
|
+
icon: getIconForAttachment(att),
|
|
113
|
+
progress: att.progress === 100 ? undefined : att.progress,
|
|
114
|
+
},
|
|
115
|
+
primary: {
|
|
116
|
+
type: att.type,
|
|
117
|
+
name: att.name,
|
|
118
|
+
icon: "trash",
|
|
119
|
+
click: removeFile,
|
|
120
|
+
},
|
|
121
|
+
secondary: {
|
|
122
|
+
text: att.meta
|
|
123
|
+
},
|
|
124
|
+
actions
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
;
|
|
128
|
+
const onFileAdded = (event) => {
|
|
129
|
+
const addedFile = event.target.files[0];
|
|
130
|
+
setFile({
|
|
131
|
+
props: {
|
|
132
|
+
name: addedFile.name,
|
|
133
|
+
icon: getIconFromFileType(addedFile.type),
|
|
134
|
+
},
|
|
135
|
+
inProgress: true
|
|
136
|
+
});
|
|
137
|
+
const arFiles$ = getFiles(event.target.files);
|
|
138
|
+
const myFiles = Array.from(arFiles$);
|
|
139
|
+
const onUploadProgress = () => { };
|
|
140
|
+
const errorHandler = () => { };
|
|
141
|
+
PCore.getAttachmentUtils()
|
|
142
|
+
.uploadAttachment(myFiles[0], onUploadProgress, errorHandler, pConn.getContextName())
|
|
143
|
+
.then((fileRes) => {
|
|
144
|
+
let reqObj;
|
|
145
|
+
if (PCore.getPCoreVersion()?.includes('8.7')) {
|
|
146
|
+
reqObj = {
|
|
147
|
+
type: "File",
|
|
148
|
+
attachmentFieldName: valueRef,
|
|
149
|
+
category: categoryName,
|
|
150
|
+
ID: fileRes.ID
|
|
151
|
+
};
|
|
152
|
+
pConn.attachmentsInfo = reqObj;
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
reqObj = {
|
|
156
|
+
type: "File",
|
|
157
|
+
label: valueRef,
|
|
158
|
+
category: categoryName,
|
|
159
|
+
handle: fileRes.ID,
|
|
160
|
+
ID: fileRes.clientFileID
|
|
161
|
+
};
|
|
162
|
+
PCore.getStateUtils().updateState(pConn.getContextName(), 'attachmentsList', [reqObj], {
|
|
163
|
+
pageReference: 'context_data',
|
|
164
|
+
isArrayDeepMerge: false
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
const fieldName = pConn.getStateProps().value;
|
|
168
|
+
const context = pConn.getContextName();
|
|
169
|
+
PCore.getMessageManager().clearMessages({
|
|
170
|
+
type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,
|
|
171
|
+
property: fieldName,
|
|
172
|
+
pageReference: pConn.getPageReference(),
|
|
173
|
+
context
|
|
174
|
+
});
|
|
175
|
+
myFiles[0].meta = "Uploaded Successfully";
|
|
176
|
+
arFileList$ = myFiles.map((att) => {
|
|
177
|
+
return getNewListUtilityItemProps({
|
|
178
|
+
att,
|
|
179
|
+
downloadFile: null,
|
|
180
|
+
cancelFile: null,
|
|
181
|
+
deleteFile: null,
|
|
182
|
+
removeFile: null
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
setFile((current) => {
|
|
186
|
+
return {
|
|
187
|
+
...current,
|
|
188
|
+
props: {
|
|
189
|
+
...current.props,
|
|
190
|
+
arFileList$
|
|
191
|
+
},
|
|
192
|
+
inProgress: false,
|
|
193
|
+
attachmentUploaded: true,
|
|
194
|
+
showMenuIcon: false
|
|
195
|
+
};
|
|
196
|
+
});
|
|
197
|
+
})
|
|
198
|
+
.catch(() => {
|
|
199
|
+
// just catching the rethrown error at uploadAttachment
|
|
200
|
+
// to handle Unhandled rejections
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
function _removeFileFromList(item, list) {
|
|
204
|
+
const arFileList = file.props ? file.props.arFileList$ : list;
|
|
205
|
+
const fileIndex = arFileList.findIndex(element => element?.id === item?.id);
|
|
206
|
+
if (PCore.getPCoreVersion()?.includes('8.7')) {
|
|
207
|
+
if (value) {
|
|
208
|
+
pConn.attachmentsInfo = {
|
|
209
|
+
type: "File",
|
|
210
|
+
attachmentFieldName: valueRef,
|
|
211
|
+
delete: true
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
if (fileIndex > -1) {
|
|
215
|
+
arFileList.splice(parseInt(fileIndex, 10), 1);
|
|
216
|
+
}
|
|
217
|
+
;
|
|
218
|
+
setFile((current) => {
|
|
219
|
+
return {
|
|
220
|
+
...current,
|
|
221
|
+
props: {
|
|
222
|
+
...current.props,
|
|
223
|
+
arFileList
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
const attachmentsList = [];
|
|
230
|
+
const currentAttachmentList = getCurrentAttachmentsList(pConn.getContextName()).filter((f) => f.label !== valueRef);
|
|
231
|
+
if (value && value.pxResults && +value.pyCount > 0) {
|
|
232
|
+
const deletedFile = {
|
|
233
|
+
type: "File",
|
|
234
|
+
label: valueRef,
|
|
235
|
+
delete: true,
|
|
236
|
+
responseProps: {
|
|
237
|
+
pzInsKey: arFileList[fileIndex].id
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
// updating the redux store to help form-handler in passing the data to delete the file from server
|
|
241
|
+
PCore.getStateUtils().updateState(pConn.getContextName(), 'attachmentsList', [...currentAttachmentList, deletedFile], {
|
|
242
|
+
pageReference: 'context_data',
|
|
243
|
+
isArrayDeepMerge: false
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
PCore.getStateUtils().updateState(pConn.getContextName(), 'attachmentsList', [...currentAttachmentList, ...attachmentsList], {
|
|
248
|
+
pageReference: 'context_data',
|
|
249
|
+
isArrayDeepMerge: false
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
if (fileIndex > -1) {
|
|
253
|
+
arFileList.splice(parseInt(fileIndex, 10), 1);
|
|
254
|
+
}
|
|
255
|
+
;
|
|
256
|
+
setFile((current) => {
|
|
257
|
+
return {
|
|
258
|
+
...current,
|
|
259
|
+
props: {
|
|
260
|
+
...current.props,
|
|
261
|
+
arFileList
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
useEffect(() => {
|
|
268
|
+
if (value && value.pxResults && +value.pyCount > 0) {
|
|
269
|
+
fileTemp = buildFilePropsFromResponse(value.pxResults[0]);
|
|
270
|
+
if (fileTemp.responseProps) {
|
|
271
|
+
if (!pConn.attachmentsInfo) {
|
|
272
|
+
pConn.attachmentsInfo = {
|
|
273
|
+
type: "File",
|
|
274
|
+
attachmentFieldName: valueRef,
|
|
275
|
+
category: categoryName
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
if (fileTemp.responseProps.pzInsKey && !fileTemp.responseProps.pzInsKey.includes("temp")) {
|
|
279
|
+
fileTemp.props.type = fileTemp.responseProps.pyMimeFileExtension;
|
|
280
|
+
fileTemp.props.mimeType = fileTemp.responseProps.pyMimeFileExtension;
|
|
281
|
+
fileTemp.props.ID = fileTemp.responseProps.pzInsKey;
|
|
282
|
+
// create the actions for the "more" menu on the attachment
|
|
283
|
+
const arMenuList = [];
|
|
284
|
+
let oMenu = {};
|
|
285
|
+
oMenu.icon = "download";
|
|
286
|
+
oMenu.text = "Download";
|
|
287
|
+
oMenu.onClick = () => { _downloadFileFromList(value.pxResults[0]); };
|
|
288
|
+
arMenuList.push(oMenu);
|
|
289
|
+
oMenu = {};
|
|
290
|
+
oMenu.icon = "trash";
|
|
291
|
+
oMenu.text = "Delete";
|
|
292
|
+
oMenu.onClick = () => { _removeFileFromList(arFileList$[0], arFileList$); };
|
|
293
|
+
arMenuList.push(oMenu);
|
|
294
|
+
arFileList$.push(getNewListUtilityItemProps({
|
|
295
|
+
att: fileTemp.props,
|
|
296
|
+
downloadFile: null,
|
|
297
|
+
cancelFile: null,
|
|
298
|
+
deleteFile: null,
|
|
299
|
+
removeFile: null
|
|
300
|
+
}));
|
|
301
|
+
arFileList$[0].actions = arMenuList;
|
|
302
|
+
setFile((current) => {
|
|
303
|
+
return {
|
|
304
|
+
...current,
|
|
305
|
+
props: {
|
|
306
|
+
...current.props,
|
|
307
|
+
arFileList$
|
|
308
|
+
},
|
|
309
|
+
inProgress: false,
|
|
310
|
+
attachmentUploaded: true,
|
|
311
|
+
showMenuIcon: true
|
|
312
|
+
};
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}, [""]);
|
|
318
|
+
let content = (React.createElement("div", { className: 'file-div' },
|
|
319
|
+
file.inProgress && (React.createElement("div", { className: "progress-div" },
|
|
320
|
+
React.createElement(CircularProgress, null))),
|
|
321
|
+
React.createElement("div", { hidden: true, id: "attachment-ID" }, valueRef),
|
|
322
|
+
React.createElement("label", { htmlFor: valueRef },
|
|
323
|
+
React.createElement("input", { style: { display: 'none' }, id: valueRef, name: 'upload-photo', type: 'file', required: required, onChange: onFileAdded }),
|
|
324
|
+
React.createElement(Button, { variant: 'outlined', color: 'primary', component: "span" }, "Upload file"))));
|
|
325
|
+
if (file && file.attachmentUploaded && file.props.arFileList$ && file.props.arFileList$.length > 0) {
|
|
326
|
+
content = (React.createElement("div", null,
|
|
327
|
+
file.showMenuIcon && (React.createElement(SummaryList, { "arItems$": file.props.arFileList$, "menuIconOverrideAction$": _removeFileFromList })),
|
|
328
|
+
!file.showMenuIcon && (React.createElement(SummaryList, { "menuIconOverride$": 'trash', "arItems$": file.props.arFileList$, "menuIconOverrideAction$": _removeFileFromList }))));
|
|
329
|
+
}
|
|
330
|
+
return (React.createElement("div", { className: 'file-upload-container' },
|
|
331
|
+
React.createElement("span", { className: 'label' }, label),
|
|
332
|
+
React.createElement("section", null, content)));
|
|
333
|
+
}
|
|
334
|
+
//# sourceMappingURL=Attachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../../../../src/components/infra/Attachment/Attachment.tsx"],"names":[],"mappings":"AAAA,4CAA4C;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC3H,OAAO,kBAAkB,CAAC;AAC1B,OAAO,WAAW,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAIlC,SAAS,yBAAyB,CAAC,OAAO;IACxC,OAAO,KAAK,CAAC,aAAa,CAAC,kBAAkB,EAAE,cAAc,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;AAChF,CAAC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EAAE,EAAE,EAAC,eAAe,IAAE,QAAQ,CAAO;QACtD,+BAAO,OAAO,EAAE,QAAQ;YACtB,+BACE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC1B,EAAE,EAAE,QAAQ,EACZ,IAAI,EAAC,cAAc,EACnB,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,WAAW,GACrB;YACF,oBAAC,MAAM,IAAC,OAAO,EAAC,UAAU,EAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAC,MAAM,kBAElD,CACH,CACN,CACP,CAAC;IAEF,IAAI,IAAI,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;QAClG,OAAO,GAAG,CACR;YACI,IAAI,CAAC,YAAY,IAAI,CAAC,oBAAC,WAAW,gBAAW,IAAI,CAAC,KAAK,CAAC,WAAW,6BAA2B,mBAAmB,GAAgB,CAAC;YAClI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,oBAAC,WAAW,yBAAmB,OAAO,cAAW,IAAI,CAAC,KAAK,CAAC,WAAW,6BAA2B,mBAAmB,GAAgB,CAAC,CAC3J,CAEP,CAAC;KACH;IAED,OAAO,CACL,6BAAK,SAAS,EAAC,uBAAuB;QACpC,8BAAM,SAAS,EAAC,OAAO,IAAE,KAAK,CAAQ;QACtC,qCAAU,OAAO,CAAW,CACxB,CACP,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable react/jsx-boolean-value */\n\nimport { Button } from '@material-ui/core';\nimport React, { useState, useEffect } from 'react';\nimport { buildFilePropsFromResponse, getIconFromFileType, validateMaxSize, getIconForAttachment } from './AttachmentUtils';\nimport './Attachment.css';\nimport SummaryList from '../../widgets/SummaryList'\nimport { CircularProgress } from \"@material-ui/core\";\nimport download from \"downloadjs\";\n\ndeclare const PCore: any;\n\nfunction getCurrentAttachmentsList(context) {\n return PCore.getStoreValue('.attachmentsList', 'context_data', context) || [];\n}\n\nexport default function Attachment(props) {\n const {value, getPConnect, label} = props;\n /* this is a temporary fix because required is supposed to be passed as a boolean and NOT as a string */\n let { required, disabled } = props;\n [required, disabled] = [required, disabled].map(\n prop => prop === true || (typeof prop === 'string' && prop === 'true')\n );\n let arFileList$: Array<any> = [];\n const pConn = getPConnect();\n\n let fileTemp: any = {};\n\n let categoryName = '';\n if (value && value.pyCategoryName) {\n categoryName = value.pyCategoryName;\n }\n\n let valueRef = pConn.getStateProps().value;\n valueRef = valueRef.indexOf('.') === 0 ? valueRef.substring(1) : valueRef;\n const [file, setFile] = useState(fileTemp);\n\n const fileDownload = (data, fileName, ext) => {\n const fileData = ext ? `${fileName}.${ext}` : fileName;\n download(atob(data), fileData);\n };\n\n function _downloadFileFromList(fileObj: any) {\n PCore.getAttachmentUtils()\n .downloadAttachment(fileObj.pzInsKey, pConn.getContextName())\n .then((content) => {\n const extension = fileObj.pyAttachName.split(\".\").pop();\n fileDownload(content.data, fileObj.pyFileName, extension);\n })\n .catch(() => {});\n }\n\n function setNewFiles(arFiles) {\n let index = 0;\n for (const item of arFiles) {\n if (!validateMaxSize(item, 5)) {\n item.error = true;\n item.meta = \"File is too big. Max allowed size is 5MB.\";\n }\n item.mimeType = item.type;\n item.icon = getIconFromFileType(item.type);\n item.ID = `${new Date().getTime()}I${index}`;\n index+=1;\n }\n return arFiles;\n }\n\n function getFiles(arFiles: Array<any>) {\n return setNewFiles(arFiles);\n }\n\n function getNewListUtilityItemProps({\n att,\n cancelFile,\n downloadFile,\n deleteFile,\n removeFile\n }) {\n let actions;\n if (att.progress && att.progress !== 100) {\n actions = [\n {\n id: `Cancel-${att.ID}`,\n text: \"Cancel\",\n icon: \"times\",\n onClick: cancelFile\n }\n ];\n } else if (att.links) {\n const isFile = att.type === \"FILE\";\n const ID = att.ID.replace(/\\s/gi, \"\");\n const actionsMap = new Map([\n [\n \"download\",\n {\n id: `download-${ID}`,\n text: isFile ? \"Download\" : \"Open\",\n icon: isFile ? \"download\" : \"open\",\n onClick: downloadFile\n }\n ],\n [\n \"delete\",\n {\n id: `Delete-${ID}`,\n text: \"Delete\",\n icon: \"trash\",\n onClick: deleteFile\n }\n ]\n ]);\n actions = [];\n actionsMap.forEach((action, actionKey) => {\n if (att.links[actionKey]) {\n actions.push(action);\n }\n });\n } else if (att.error) {\n actions = [\n {\n id: `Remove-${att.ID}`,\n text: \"Remove\",\n icon: \"trash\",\n onClick: removeFile\n }\n ];\n }\n return {\n id: att.ID,\n visual: {\n icon: getIconForAttachment(att),\n progress: att.progress === 100 ? undefined: att.progress,\n },\n primary: {\n type: att.type,\n name: att.name,\n icon: \"trash\",\n click: removeFile,\n },\n secondary: {\n text: att.meta\n },\n actions\n };\n };\n\n const onFileAdded = (event) => {\n const addedFile = event.target.files[0];\n setFile({\n props: {\n name: addedFile.name,\n icon: getIconFromFileType(addedFile.type),\n },\n inProgress: true\n });\n const arFiles$ = getFiles(event.target.files);\n const myFiles: any = Array.from(arFiles$);\n\n const onUploadProgress = () => {};\n\n const errorHandler = () => {};\n\n PCore.getAttachmentUtils()\n .uploadAttachment(\n myFiles[0],\n onUploadProgress,\n errorHandler,\n pConn.getContextName()\n )\n .then((fileRes) => {\n let reqObj;\n if (PCore.getPCoreVersion()?.includes('8.7')) {\n reqObj = {\n type: \"File\",\n attachmentFieldName: valueRef,\n category: categoryName,\n ID: fileRes.ID\n };\n pConn.attachmentsInfo = reqObj;\n } else {\n reqObj = {\n type: \"File\",\n label: valueRef,\n category: categoryName,\n handle: fileRes.ID,\n ID: fileRes.clientFileID\n };\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n 'attachmentsList',\n [reqObj],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n }\n const fieldName = pConn.getStateProps().value;\n const context = pConn.getContextName();\n\n PCore.getMessageManager().clearMessages({\n type: PCore.getConstants().MESSAGES.MESSAGES_TYPE_ERROR,\n property: fieldName,\n pageReference: pConn.getPageReference(),\n context\n });\n myFiles[0].meta = \"Uploaded Successfully\";\n\n arFileList$ = myFiles.map((att) => {\n return getNewListUtilityItemProps({\n att,\n downloadFile: null,\n cancelFile: null,\n deleteFile: null,\n removeFile: null\n });\n });\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList$\n },\n inProgress: false,\n attachmentUploaded: true,\n showMenuIcon: false\n };\n });\n })\n\n .catch(() => {\n // just catching the rethrown error at uploadAttachment\n // to handle Unhandled rejections\n });\n };\n\n function _removeFileFromList(item: any, list) {\n const arFileList = file.props ? file.props.arFileList$ : list;\n const fileIndex = arFileList.findIndex(element => element?.id === item?.id);\n if (PCore.getPCoreVersion()?.includes('8.7')) {\n if (value) {\n pConn.attachmentsInfo = {\n type: \"File\",\n attachmentFieldName: valueRef,\n delete: true\n };\n }\n if (fileIndex > -1) { arFileList.splice(parseInt(fileIndex, 10), 1) };\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList\n },\n };\n });\n } else {\n const attachmentsList = [];\n const currentAttachmentList = getCurrentAttachmentsList(pConn.getContextName()).filter(\n (f) => f.label !== valueRef\n );\n if (value && value.pxResults && +value.pyCount > 0) {\n const deletedFile = {\n type: \"File\",\n label: valueRef,\n delete: true,\n responseProps: {\n pzInsKey: arFileList[fileIndex].id\n },\n };\n // updating the redux store to help form-handler in passing the data to delete the file from server\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n 'attachmentsList',\n [...currentAttachmentList, deletedFile],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n } else {\n PCore.getStateUtils().updateState(\n pConn.getContextName(),\n 'attachmentsList',\n [...currentAttachmentList, ...attachmentsList],\n {\n pageReference: 'context_data',\n isArrayDeepMerge: false\n }\n );\n }\n if (fileIndex > -1) { arFileList.splice(parseInt(fileIndex, 10), 1) };\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList\n },\n };\n });\n }\n }\n\n useEffect(() => {\n if (value && value.pxResults && +value.pyCount > 0) {\n fileTemp = buildFilePropsFromResponse(value.pxResults[0]);\n\n if (fileTemp.responseProps) {\n if (!pConn.attachmentsInfo) {\n pConn.attachmentsInfo = {\n type: \"File\",\n attachmentFieldName: valueRef,\n category: categoryName\n };\n }\n\n if (fileTemp.responseProps.pzInsKey && !fileTemp.responseProps.pzInsKey.includes(\"temp\")) {\n\n fileTemp.props.type = fileTemp.responseProps.pyMimeFileExtension;\n fileTemp.props.mimeType = fileTemp.responseProps.pyMimeFileExtension;\n fileTemp.props.ID = fileTemp.responseProps.pzInsKey;\n // create the actions for the \"more\" menu on the attachment\n const arMenuList: Array<any> = [];\n let oMenu: any = {};\n\n oMenu.icon = \"download\";\n oMenu.text = \"Download\";\n oMenu.onClick = () => { _downloadFileFromList(value.pxResults[0])}\n arMenuList.push(oMenu);\n oMenu = {};\n oMenu.icon = \"trash\";\n oMenu.text = \"Delete\";\n oMenu.onClick = () => { _removeFileFromList(arFileList$[0], arFileList$)}\n arMenuList.push(oMenu);\n\n arFileList$.push(getNewListUtilityItemProps({\n att: fileTemp.props,\n downloadFile: null,\n cancelFile: null,\n deleteFile: null,\n removeFile: null\n }));\n arFileList$[0].actions = arMenuList;\n\n setFile((current) => {\n return {\n ...current,\n props: {\n ...current.props,\n arFileList$\n },\n inProgress: false,\n attachmentUploaded: true,\n showMenuIcon: true\n };\n });\n }\n }\n }\n }, [\"\"]);\n\n let content = (\n <div className='file-div'>\n {file.inProgress && (<div className=\"progress-div\"><CircularProgress /></div>)}\n <div hidden={true} id=\"attachment-ID\">{valueRef}</div>\n <label htmlFor={valueRef}>\n <input\n style={{ display: 'none' }}\n id={valueRef}\n name='upload-photo'\n type='file'\n required={required}\n onChange={onFileAdded}\n />\n <Button variant='outlined' color='primary' component=\"span\">\n Upload file\n </Button>\n </label>\n </div>\n );\n\n if (file && file.attachmentUploaded && file.props.arFileList$ && file.props.arFileList$.length > 0) {\n content = (\n <div>\n {file.showMenuIcon && (<SummaryList arItems$={file.props.arFileList$} menuIconOverrideAction$={_removeFileFromList}></SummaryList>)}\n {!file.showMenuIcon && (<SummaryList menuIconOverride$='trash' arItems$={file.props.arFileList$} menuIconOverrideAction$={_removeFileFromList}></SummaryList>)}\n </div>\n\n );\n }\n\n return (\n <div className='file-upload-container'>\n <span className='label'>{label}</span>\n <section>{content}</section>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function validateMaxSize(fileObj: any, maxSizeInMB: any): boolean;
|
|
2
|
+
export function fileDownload(data: any, fileName: any, ext: any): void;
|
|
3
|
+
export function getIconFromFileType(fileType: any): string;
|
|
4
|
+
export function getIconForAttachment(attachment: any): any;
|
|
5
|
+
export function buildFilePropsFromResponse(respObj: any): {
|
|
6
|
+
props: {
|
|
7
|
+
meta: string;
|
|
8
|
+
name: any;
|
|
9
|
+
icon: string;
|
|
10
|
+
};
|
|
11
|
+
responseProps: any;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=AttachmentUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Attachment/AttachmentUtils.js"],"names":[],"mappings":"AAEO,yEAGN;AAEM,uEAQN;AAEM,2DAyBN;AAEM,2DAaN;AAEM;;;;;;;EAWN"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import download from 'downloadjs';
|
|
2
|
+
export const validateMaxSize = (fileObj, maxSizeInMB) => {
|
|
3
|
+
const fileSize = (fileObj.size / 1048576).toFixed(2);
|
|
4
|
+
return parseFloat(fileSize) < parseFloat(maxSizeInMB);
|
|
5
|
+
};
|
|
6
|
+
export const fileDownload = (data, fileName, ext) => {
|
|
7
|
+
const name = ext ? `${fileName}.${ext}` : fileName;
|
|
8
|
+
// Temp fix: downloading EMAIl type attachment as html file
|
|
9
|
+
if (ext === 'html') {
|
|
10
|
+
download(data, name, 'text/html');
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
download(atob(data), name);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export const getIconFromFileType = (fileType) => {
|
|
17
|
+
let icon = 'document-doc';
|
|
18
|
+
if (!fileType)
|
|
19
|
+
return icon;
|
|
20
|
+
if (fileType.startsWith('audio')) {
|
|
21
|
+
icon = 'audio';
|
|
22
|
+
}
|
|
23
|
+
else if (fileType.startsWith('video')) {
|
|
24
|
+
icon = 'video';
|
|
25
|
+
}
|
|
26
|
+
else if (fileType.startsWith('image')) {
|
|
27
|
+
icon = 'picture';
|
|
28
|
+
}
|
|
29
|
+
else if (fileType.includes('pdf')) {
|
|
30
|
+
icon = 'document-pdf';
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
const [, subtype] = fileType.split('/');
|
|
34
|
+
const foundMatch = (sources) => {
|
|
35
|
+
return sources.some((key) => subtype.includes(key));
|
|
36
|
+
};
|
|
37
|
+
if (foundMatch(['excel', 'spreadsheet'])) {
|
|
38
|
+
icon = 'document-xls';
|
|
39
|
+
}
|
|
40
|
+
else if (foundMatch(['zip', 'compressed', 'gzip', 'rar', 'tar'])) {
|
|
41
|
+
icon = 'document-compress';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return icon;
|
|
45
|
+
};
|
|
46
|
+
export const getIconForAttachment = (attachment) => {
|
|
47
|
+
let icon;
|
|
48
|
+
switch (attachment.type) {
|
|
49
|
+
case "FILE":
|
|
50
|
+
icon = this.getIconFromFileType(attachment.mimeType);
|
|
51
|
+
break;
|
|
52
|
+
case "URL":
|
|
53
|
+
icon = "chain";
|
|
54
|
+
break;
|
|
55
|
+
default:
|
|
56
|
+
icon = "document-doc";
|
|
57
|
+
}
|
|
58
|
+
return icon;
|
|
59
|
+
};
|
|
60
|
+
export const buildFilePropsFromResponse = (respObj) => {
|
|
61
|
+
return {
|
|
62
|
+
props: {
|
|
63
|
+
meta: `${respObj.pyCategoryName}, ${respObj.pxCreateOperator}`,
|
|
64
|
+
name: respObj.pyAttachName,
|
|
65
|
+
icon: getIconFromFileType(respObj.pyMimeFileExtension)
|
|
66
|
+
},
|
|
67
|
+
responseProps: {
|
|
68
|
+
...respObj
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=AttachmentUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentUtils.js","sourceRoot":"","sources":["../../../../src/components/infra/Attachment/AttachmentUtils.js"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE;IACtD,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE;IAClD,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IACnD,2DAA2D;IAC3D,IAAI,GAAG,KAAK,MAAM,EAAE;QAClB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;KACnC;SAAM;QACL,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;KAC5B;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,EAAE;IAC9C,IAAI,IAAI,GAAG,cAAc,CAAC;IAC1B,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IA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,cAAc,CAAC;KACzB;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,OAAO,EAAE,EAAE;IACpD,OAAO;QACL,KAAK,EAAE;YACL,IAAI,EAAE,GAAG,OAAO,CAAC,cAAc,KAAK,OAAO,CAAC,gBAAgB,EAAE;YAC9D,IAAI,EAAE,OAAO,CAAC,YAAY;YAC1B,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC,mBAAmB,CAAC;SACvD;QACD,aAAa,EAAE;YACb,GAAG,OAAO;SACX;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import download from 'downloadjs';\n\nexport const validateMaxSize = (fileObj, maxSizeInMB) => {\n const fileSize = (fileObj.size / 1048576).toFixed(2);\n return parseFloat(fileSize) < parseFloat(maxSizeInMB);\n};\n\nexport const fileDownload = (data, fileName, ext) => {\n const name = ext ? `${fileName}.${ext}` : fileName;\n // Temp fix: downloading EMAIl type attachment as html file\n if (ext === 'html') {\n download(data, name, 'text/html');\n } else {\n download(atob(data), name);\n }\n};\n\nexport const getIconFromFileType = (fileType) => {\n let icon = 'document-doc';\n if (!fileType) return icon;\n if (fileType.startsWith('audio')) {\n icon = 'audio';\n } else if (fileType.startsWith('video')) {\n icon = 'video';\n } else if (fileType.startsWith('image')) {\n icon = 'picture';\n } else if (fileType.includes('pdf')) {\n icon = 'document-pdf';\n } else {\n const [, subtype] = fileType.split('/');\n const foundMatch = (sources) => {\n return sources.some((key) => subtype.includes(key));\n };\n\n if (foundMatch(['excel', 'spreadsheet'])) {\n icon = 'document-xls';\n } else if (foundMatch(['zip', 'compressed', 'gzip', 'rar', 'tar'])) {\n icon = 'document-compress';\n }\n }\n\n return icon;\n};\n\nexport const getIconForAttachment = (attachment) => {\n let icon;\n switch (attachment.type) {\n case \"FILE\":\n icon = this.getIconFromFileType(attachment.mimeType);\n break;\n case \"URL\":\n icon = \"chain\";\n break;\n default:\n icon = \"document-doc\";\n }\n return icon;\n};\n\nexport const buildFilePropsFromResponse = (respObj) => {\n return {\n props: {\n meta: `${respObj.pyCategoryName}, ${respObj.pxCreateOperator}`,\n name: respObj.pyAttachName,\n icon: getIconFromFileType(respObj.pyMimeFileExtension)\n },\n responseProps: {\n ...respObj\n }\n };\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Attachment/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/infra/Attachment/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { default } from './Attachment';"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
declare function FlowContainer(props: any): JSX.Element;
|
|
4
|
+
declare namespace FlowContainer {
|
|
5
|
+
var defaultProps: {
|
|
6
|
+
children: null;
|
|
7
|
+
getPConnect: null;
|
|
8
|
+
name: string;
|
|
9
|
+
routingInfo: null;
|
|
10
|
+
pageMessages: null;
|
|
11
|
+
};
|
|
12
|
+
var propTypes: {
|
|
13
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
14
|
+
getPConnect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
name: PropTypes.Requireable<string>;
|
|
16
|
+
routingInfo: PropTypes.Requireable<{
|
|
17
|
+
[x: string]: any;
|
|
18
|
+
}>;
|
|
19
|
+
pageMessages: PropTypes.Requireable<any[]>;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export default FlowContainer;
|
|
23
|
+
//# sourceMappingURL=FlowContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/FlowContainer/FlowContainer.tsx"],"names":[],"mappings":";AAGA,OAAO,SAAS,MAAM,YAAY,CAAC;AAgDnC,iBAAwB,aAAa,CAAC,KAAK,KAAA,eA4c1C;kBA5cuB,aAAa;;;;;;;;;;;;;;;;;;eAAb,aAAa"}
|