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5E,QAAS,KACTgD,aAAa,EACbqC,SAAS,EACTV,YAAaL,EAAaC,2JC5iCtB2B,GAAgB,gBAAGC,EAAH,EAAGA,SAAH,OACpB,gBAAK1G,UAAU,gCACb,SAAC,GAAD,CACEqD,cAAesD,GAAAA,GACf/L,YAAa,CACXO,KAAM,GAAF,OAAKyL,GAAAA,IAAL,OAAmBC,GAAAA,GAAAA,gBACvBzL,KAAM,GAAF,OAAKwL,GAAAA,IAAL,OAAmBF,MANT,EAYtBD,GAAc9I,UAAYmJ,GAAAA,GAE1B,yKCtBe,SAASC,EAAUC,EAAUC,GAC1C,GAA0B,mBAAfA,GAA4C,OAAfA,EACtC,MAAM,IAAIC,UAAU,sDAEtBF,EAASlL,UAAYnF,OAAOwQ,OAAOF,GAAcA,EAAWnL,UAAW,CACrEmB,YAAa,CACXvG,MAAOsQ,EACPI,UAAU,EACVC,cAAc,KAGlB1Q,OAAO2D,eAAe0M,EAAU,YAAa,CAC3CI,UAAU,IAERH,IAAY,OAAeD,EAAUC,EAC3C,mPCde,SAASK,EAA2BC,EAAM5K,GACvD,GAAIA,IAA2B,YAAlB,OAAQA,IAAsC,mBAATA,GAChD,OAAOA,EACF,QAAa,IAATA,EACT,MAAM,IAAIuK,UAAU,4DAEtB,OAAO,OAAsBK,EAC/B","sources":["webpack:///../node_modules/@paypalcorp/helpcomponents-trackers/dist/@paypalcorp/helpcomponents-trackers.esm.js","webpack:///./components/refund-tracker/index.js","webpack:///../node_modules/@babel/runtime/helpers/esm/inherits.js","webpack:///../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"],"sourcesContent":["import { PAYPAL_THEME } from '@paypalcorp/pp-react-theme';\nimport _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';\nimport React, { Fragment, useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider } from '@emotion/react';\nimport _typeof from '@babel/runtime/helpers/esm/typeof';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\nimport _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';\nimport _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';\nimport _asyncToGenerator from '@babel/runtime/helpers/esm/asyncToGenerator';\nimport _regeneratorRuntime from '@babel/runtime/regenerator';\nimport { BodyText, CaptionText, HeadingText } from '@paypalcorp/pp-react-text';\nimport { Card } from '@paypalcorp/pp-react-card';\nimport { Icon } from '@paypalcorp/pp-react-icons';\nimport { LoadingSpinner } from '@paypalcorp/pp-react-loading-spinner';\nimport '../__generated__/styles/trackers.css';\n\n/**\n * method to validate is empty.\n * @param value\n * @returns {boolean}\n */\nvar isEmpty = function (value) {\n return value === null || _typeof(value) === 'object' && Object.keys(value).length === 0 || typeof value === 'string' && value.trim().length === 0;\n};\n\n/**\n * Returns value from the content based on the key.\n * @param content\n * @param key\n * @returns {*}\n */\nvar getContentValue = function (content, key) {\n try {\n if (_typeof(content) === 'object' && !isEmpty(content)) {\n var path = key.split('.');\n while (path.length && (content = content[path.shift()]));\n return content;\n }\n return '';\n } catch (e) {\n return '';\n }\n};\n\n/**\n * Deep clone to remove the reference of the object.\n * @param data\n * @returns {*}\n */\nvar deepClone = function (data) {\n try {\n return JSON.parse(JSON.stringify(data));\n } catch (e) {\n return data;\n }\n};\n\n/**\n * Get corresponding directionality.\n * 1) First get the direction from html element where this component is loaded\n * 2) If no dir attribute value is found on html element then get the directionality from service response configs object.\n * 3) default fallback to ltr\n *\n * @param responseData\n * @returns {string}\n */\nvar getDirectionality = function (data) {\n try {\n var htmlEl = document.getElementsByTagName('html');\n var __htmlDir = htmlEl[0].dir;\n if (!isEmpty(__htmlDir)) {\n return __htmlDir;\n }\n var config = data && (data.info || data.config);\n if (config && config.directionality) {\n return config.directionality;\n }\n return 'ltr';\n } catch (e) {\n return 'ltr';\n }\n};\n\n// --------End of session storage ---------------\n\nvar getParsedErrorMessage = function (err) {\n if (!err) {\n return {};\n }\n return Object.assign({}, err, {\n // Explicitly pull Error's non-enumerable properties\n name: err.name,\n message: err.message,\n stack: err.stack\n });\n};\n\n/**\n * Finds the transaction from the given transactions using transaction id.\n *\n * @param transactions\n * @param transactionId\n * @returns {{index: (*|number|never), transaction: *}}\n */\nvar getTransaction = function (transactions, transactionId) {\n var index = transactions.findIndex(function (transaction) {\n return transaction.id === transactionId;\n });\n return {\n index: index,\n transaction: transactions[index]\n };\n};\nvar setCollapseForTransactions = function (transactions) {\n var collapseAll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n // If collapseAll is not set, expand the first transaction by default.\n if (Array.isArray(transactions) && transactions.length && !collapseAll) {\n transactions[0].isExpanded = true;\n return transactions;\n }\n\n // Else by default all transactions are set to false in service\n return transactions;\n};\nvar getFinalTransactionsToDisplay = function (data) {\n var transactions = data.transactions,\n configs = data.configs;\n var finalTransactions = [];\n if (!Array.isArray(transactions)) {\n return finalTransactions;\n }\n var showEChecks = configs && configs.refunds && configs.refunds.showEChecks || false;\n\n // remote config is true to show all pending transactions including e-checks\n if (showEChecks) {\n finalTransactions = transactions;\n } else {\n // If remote config is false show only the transactions with lifecycles.\n finalTransactions = transactions.filter(function (transaction) {\n return !isEmpty(transaction.lifecycles);\n });\n }\n return finalTransactions;\n};\n\n/**\n * Common method to set accordion expanded state.\n * @param transactions\n * @param selectedTransaction\n * @returns {*}\n */\nvar getUpdatedTransactionsToggle = function (transactions, selectedTransaction) {\n var nextStateTransactions = deepClone(transactions);\n var transactionToUpdate = getTransaction(transactions, selectedTransaction.id);\n nextStateTransactions[transactionToUpdate.index] = Object.assign({}, transactionToUpdate.transaction, {\n isExpanded: !transactionToUpdate.transaction.isExpanded\n });\n return nextStateTransactions;\n};\nvar getToggleTypeForFPTI = function (transaction) {\n return !transaction.isExpanded ? 'expand' : 'collapse';\n};\n\n/**\n * Filter states to get only the supported types for lifecycle.\n * @param states\n * @param config\n * @returns []\n */\nvar getSupportedStatesForRefunds = function (states, config) {\n if (Array.isArray(states) && states.length) {\n var supportedTypesInRc = config.refundsSupportedLifeCycleTypes || [];\n return states.filter(function (state) {\n return supportedTypesInRc.includes(state.name);\n });\n }\n return [];\n};\n\nfunction ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nvar defaultOptions = {\n pgrp: 'main:help:components',\n page: 'main:help:components',\n comp: 'helpComponents'\n};\nvar analyticsObject = function () {\n try {\n return window && window.PAYPAL && window.PAYPAL.analytics;\n } catch (e) {\n return {};\n }\n};\n\n// Get FPTI otions\nvar getFPTIOptions = function (fptiOptions, eventType) {\n var fpti = window && window.fpti ? deepClone(window.fpti) : {};\n\n // clearing out error props in case they exist\n fpti.erpg = undefined;\n fpti.erfd = undefined;\n fpti.eccd = undefined;\n\n // Merge client passed fptiOptions with fpti object.\n fpti = _objectSpread$2(_objectSpread$2({}, fpti), fptiOptions);\n\n // TODO :: This logic needs to be revisited.\n // FPTI options passed through props\n\n if (isEmpty(fpti.page) || isEmpty(fpti.pgrp)) {\n fpti.page = defaultOptions.page;\n fpti.pgrp = defaultOptions.pgrp;\n }\n\n // Resetting to empty string for not to set link/pgln,phlk for ac events.\n fpti.link = '';\n fpti.pgln = '';\n fpti.pglk = '';\n\n // For click events\n if (fptiOptions.link) {\n fpti.link = fptiOptions.link;\n fpti.pgln = \"\".concat(fpti.page, \"|\").concat(fptiOptions.link);\n fpti.pglk = \"\".concat(fpti.pgrp, \"|\").concat(fptiOptions.link);\n }\n\n // Add event name to FPTI object\n fpti.event_name = '';\n if (fptiOptions.event_name) {\n fpti.event_name = fptiOptions.event_name;\n }\n\n // component name priority - fpti options props/analytics window object/default fallback\n if (isEmpty(fpti.comp)) {\n fpti.comp = defaultOptions.comp;\n }\n // Set event Type\n fpti.e = eventType ? eventType : 'ac'; // default activity event\n\n return fpti;\n};\n\n/**\n * @description\n *\n * Logs click metrics\n * @param {Object} fptiOptions\n * @property {String} options.data.page - Page name if not provided derived from the base page\n * @property {String} options.data.pgrp - Page group if not provided derived from the base page\n * e.g. var options = {data: {page:'page_name', pgrp: 'page_group_name'} }\n */\n//https://github.paypal.com/pages/Tracking-R/client-side-instrumentation/react.html#/links?_k=flh93g\nvar recordClickEvent = function (fptiOptions) {\n if (analyticsObject()) {\n var options = getFPTIOptions(fptiOptions, 'cl');\n window.PAYPAL.analytics.Analytics.prototype.recordClick({\n data: options\n });\n }\n};\n\n// Record Activity Events\nvar recordEvent = function (fptiOptions) {\n if (analyticsObject()) {\n var options = getFPTIOptions(fptiOptions, 'ac');\n window.PAYPAL.analytics.Analytics.prototype.recordEvent(options.event_name, {\n data: options\n });\n }\n};\n\n// FPTI Prop Type\nvar FPTI_OBJECT = {\n page: PropTypes.string.isRequired,\n pgrp: PropTypes.string.isRequired,\n comp: PropTypes.string\n};\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inherits(ErrorBoundary, _React$Component);\n var _super = _createSuper(ErrorBoundary);\n function ErrorBoundary(props) {\n var _this;\n _classCallCheck(this, ErrorBoundary);\n _this = _super.call(this, props);\n _this.state = {\n error: null,\n errorInfo: null\n };\n return _this;\n }\n _createClass(ErrorBoundary, [{\n key: \"componentDidCatch\",\n value: function componentDidCatch(err, errorInfo) {\n this.setState({\n err: err,\n errorInfo: errorInfo\n });\n if (typeof this.props.cbOnError === 'function') {\n // Callback function to track errors.\n this.props.cbOnError(err, errorInfo);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!this.state.error) {\n // render any custom fallback UI\n return this.props.children;\n }\n if (this.props.suppressError) {\n return /*#__PURE__*/React.createElement(\"div\", null);\n }\n return /*#__PURE__*/React.createElement(\"h1\", null, 'Something went wrong in loading the widget.');\n }\n }]);\n return ErrorBoundary;\n}(React.Component);\nErrorBoundary.propTypes = {\n suppressError: PropTypes.bool.isRequired,\n children: PropTypes.node,\n cbOnError: PropTypes.func.isRequired // callback function on error.\n};\n\nvar progressLayoutTypes = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n AUTO: 'auto'\n};\nvar statusTypes = {\n COMPLETED: 'COMPLETED',\n PENDING: 'PENDING'\n};\nvar transactionStatusTypes = {\n E_CHECK: 'ECHECK_PENDING'\n};\nvar supportedProgressLayoutTypes = [progressLayoutTypes.AUTO, progressLayoutTypes.HORIZONTAL, progressLayoutTypes.VERTICAL];\n\n// //https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/onreadystatechange\nvar getData = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(url) {\n var config,\n method,\n req,\n response,\n _args = arguments;\n return _regeneratorRuntime.wrap(function (_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n config = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};\n method = config.method || 'GET';\n _context.prev = 2;\n req = new XMLHttpRequest();\n req.open(method, url, true);\n req.withCredentials = config.withCredentials || false;\n _context.next = 8;\n return new Promise(function (resolve, reject) {\n req.onreadystatechange = function () {\n if (req.readyState === 4) {\n if (req.status >= 200 && req.status < 300) {\n var result = JSON.parse(req.response || req.responseText);\n resolve(result);\n } else {\n reject(\"HTTP Error: \".concat(req.status));\n }\n }\n };\n req.addEventListener('error', function (event) {\n reject(event);\n });\n req.send();\n });\n case 8:\n response = _context.sent;\n return _context.abrupt(\"return\", {\n data: response\n });\n case 12:\n _context.prev = 12;\n _context.t0 = _context[\"catch\"](2);\n return _context.abrupt(\"return\", Promise.reject(_context.t0));\n case 15:\n case \"end\":\n return _context.stop();\n }\n }, _callee, null, [[2, 12]]);\n }));\n return function () {\n return _ref.apply(this, arguments);\n };\n}();\n\nvar checkCircle = function () {\n var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '24';\n var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '24';\n return /*#__PURE__*/React.createElement(\"svg\", {\n style: {\n fill: 'white'\n },\n version: \"1.1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n width: width,\n height: height,\n viewBox: \"0 0 48 48\"\n }, /*#__PURE__*/React.createElement(\"title\", null, \"check-circle\"), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.259 31.519l18.011-19.203c0.378-0.403 1.011-0.423 1.413-0.045s0.423 1.011 0.045 1.413l-18.759 20c-0.402 0.428-1.084 0.42-1.475-0.018l-7.241-8.106c-0.368-0.412-0.332-1.044 0.079-1.412s1.044-0.332 1.412 0.079l6.514 7.291z\"\n }));\n};\n\n// Steps component to render each step.\nvar Steps = function (props) {\n var steps = props.steps;\n var getStepClassName = function (step) {\n if (step.status === statusTypes.COMPLETED) {\n return 'progress-bar--container-body--line-container__step--completed';\n }\n if (step.status === statusTypes.PENDING) {\n return 'progress-bar--container-body--line-container__step--pending';\n }\n return '';\n };\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"progress-bar--container-body--line-container__step\"\n }, function renderSteps() {\n return steps.map(function (step, index) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: getStepClassName(step),\n key: index\n }, checkCircle());\n });\n }()));\n};\nSteps.propTypes = {\n steps: PropTypes.arrayOf(PropTypes.shape({}))\n};\n\nvar StepLabels = function (props) {\n var steps = props.steps;\n return /*#__PURE__*/React.createElement(Fragment, null, function renderSteps() {\n return steps.map(function (step, index) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"progress-bar--container-body__steps-labels--label\",\n key: index\n }, /*#__PURE__*/React.createElement(BodyText, {\n className: \"no-margin\"\n }, ' ', getContentValue(step, 'content.statusLabel'), ' '), /*#__PURE__*/React.createElement(BodyText, {\n className: \"no-margin progress-bar--container-body__steps-labels--label_statusDateTime\"\n }, getContentValue(step, 'content.statusDateTime'), ' '));\n });\n }());\n};\nStepLabels.propTypes = {\n steps: PropTypes.arrayOf(PropTypes.shape({}))\n};\n\nvar StepsIndicator = function (props) {\n var steps = props.steps,\n completedProgressLineStyle = props.completedProgressLineStyle,\n progressLineStyle = props.progressLineStyle;\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"progress-bar--container-body--line-container\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"progress-bar--container-body--line-container__progress-line\",\n style: progressLineStyle\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"progress-bar--container-body--line-container__progress-line--completed-progress\",\n style: completedProgressLineStyle\n })), /*#__PURE__*/React.createElement(Steps, {\n steps: steps\n })), /*#__PURE__*/React.createElement(\"div\", {\n className: \"progress-bar--container-body__steps-labels\"\n }, /*#__PURE__*/React.createElement(StepLabels, {\n steps: steps\n })));\n};\nStepsIndicator.propTypes = {\n steps: PropTypes.arrayOf(PropTypes.shape({})),\n completedProgressLineStyle: PropTypes.shape({}),\n progressLineStyle: PropTypes.shape({})\n};\nStepsIndicator.defaultProps = {};\n\n// Horizontal progress bar\nvar ProgressBarHorizontal = function (props) {\n var steps = props.steps,\n layout = props.layout;\n var layoutClassName = \"progress-bar--horizontal \".concat(layout === progressLayoutTypes.HORIZONTAL ? 'progress-bar--horizontal__forced' : '');\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: layoutClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"progress-bar--container-body\"\n }, /*#__PURE__*/React.createElement(StepsIndicator, {\n steps: steps,\n layout: layout,\n completedProgressLineStyle: function completedProgressWidthStyle() {\n var completedPercentage = 0;\n var stepWidth = 100 / (steps.length - 1);\n steps.forEach(function (step) {\n if (step.status === statusTypes.COMPLETED) {\n if (!step.start_state) {\n completedPercentage += stepWidth;\n }\n }\n });\n return {\n width: completedPercentage + '%',\n height: '100%'\n };\n }()\n }))));\n};\nProgressBarHorizontal.propTypes = {\n steps: PropTypes.arrayOf(PropTypes.shape({})),\n layout: PropTypes.string\n};\nProgressBarHorizontal.defaultProps = {};\n\n// Vertical progress bar\nvar ProgressBarVertical = function (props) {\n var steps = props.steps,\n layout = props.layout;\n var layoutClassName = \"progress-bar--vertical \".concat(layout === progressLayoutTypes.VERTICAL ? 'progress-bar--vertical__forced' : '');\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: layoutClassName\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"progress-bar--container-body\"\n }, /*#__PURE__*/React.createElement(StepsIndicator, {\n steps: steps,\n layout: layout,\n completedProgressLineStyle: function completedProgressHeight() {\n var completedPercentage = 0;\n var stepWidth = 100 / (steps.length - 1);\n steps.forEach(function (step) {\n if (step.status === statusTypes.COMPLETED) {\n if (!step.start_state) {\n completedPercentage += stepWidth;\n }\n }\n });\n return {\n height: completedPercentage + '%',\n width: '100%'\n };\n }(),\n progressLineStyle: function progressLineStyle() {\n return {\n height: steps.length * 80 + 'px'\n };\n }()\n }))));\n};\nProgressBarVertical.propTypes = {\n steps: PropTypes.arrayOf(PropTypes.shape({})),\n layout: PropTypes.string\n};\nProgressBarVertical.defaultProps = {};\n\n// Progress Bar Version 1\nvar ProgressBarV1 = function (props) {\n var stepStates = props.stepStates,\n progressLayout = props.progressLayout,\n directionality = props.directionality;\n\n // Render corresponding progress bar layout based on the user props.\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"hc-trackers--progress-bar\",\n dir: directionality\n }, function renderCorrespondingLayout() {\n // Validation to check if array and has min 1 state.\n if (!Array.isArray(stepStates) || Array.isArray(stepStates) && !stepStates.length) {\n return null;\n }\n switch (progressLayout) {\n case progressLayoutTypes.HORIZONTAL:\n return /*#__PURE__*/React.createElement(ProgressBarHorizontal, {\n steps: stepStates,\n layout: progressLayout\n });\n case progressLayoutTypes.VERTICAL:\n return /*#__PURE__*/React.createElement(ProgressBarVertical, {\n steps: stepStates,\n layout: progressLayout\n });\n default:\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(ProgressBarHorizontal, {\n steps: stepStates,\n layout: progressLayout\n }), /*#__PURE__*/React.createElement(ProgressBarVertical, {\n steps: stepStates,\n layout: progressLayout\n }));\n }\n }());\n};\nProgressBarV1.propTypes = {\n stepStates: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n progressLayout: PropTypes.oneOf([progressLayoutTypes.HORIZONTAL, progressLayoutTypes.VERTICAL, progressLayoutTypes.AUTO]),\n directionality: PropTypes.string\n};\nProgressBarV1.defaultProps = {\n progressLayout: progressLayoutTypes.AUTO,\n directionality: 'ltr'\n};\n\nvar TransactionItem = function (props) {\n var transaction = props.transaction,\n toggleTransactionHandler = props.toggleTransactionHandler,\n toggleKeyPressHandler = props.toggleKeyPressHandler,\n progressLayout = props.progressLayout,\n directionality = props.directionality,\n metaData = props.metaData,\n config = props.config;\n var transactionHeaderStyle = \"transaction-header \".concat(transaction.isExpanded ? 'transaction-header--expanded' : '');\n\n //TODO:: if this TransactionItem component is able to reused by withdrawl component then move this below function to common helper.\n\n var showECheckContainer = function (item) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-expanded--container_echeck_content\",\n dir: directionality\n }, /*#__PURE__*/React.createElement(BodyText, {\n className: \"no-margin\"\n }, getContentValue(item, 'content.eCheckStatus')));\n };\n var renderTransactionLifeCycle = function (item) {\n //Check if transaction has life cycles.\n if (!item || !Array.isArray(item.lifecycles) || item.lifecycles.length <= 0) {\n //If transaction has no life cycles and if it is E-CHECK refund.\n if (item.detailed_status === transactionStatusTypes.E_CHECK) {\n return showECheckContainer(item);\n }\n return null;\n }\n\n // If transaction has life cycle.\n // validate the lifecycle has states.\n var states = item.lifecycles[0].states;\n\n // TODO:: currently filtering the unsupported states in here -\n // Revisit this during withdrawl or only other tracker implementation to make this a common place.\n var supportedStates = getSupportedStatesForRefunds(states, config);\n if (supportedStates && Array.isArray(supportedStates) && supportedStates.length) {\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-expanded--container_label\",\n dir: directionality\n }, /*#__PURE__*/React.createElement(BodyText, null, getContentValue(metaData, 'transactionProgressHeader'))), /*#__PURE__*/React.createElement(ProgressBarV1, {\n stepStates: supportedStates,\n progressLayout: progressLayout,\n directionality: directionality\n }));\n }\n return /*#__PURE__*/React.createElement(\"div\", null);\n };\n\n // Render transaction expanded content include transaction id, counter party info, and transaction amount\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"li\", {\n key: transaction.id,\n className: \"transaction-list--item\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: transactionHeaderStyle,\n tabIndex: \"0\",\n onClick: function onClick() {\n return toggleTransactionHandler(transaction);\n },\n onKeyPress: function onKeyPress(e) {\n return toggleKeyPressHandler(e, transaction);\n }\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-header--left-section\",\n dir: directionality\n }, /*#__PURE__*/React.createElement(BodyText, {\n className: \"no-margin\"\n }, getContentValue(transaction, 'content.transactionDateSH'))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-header--middle-section\",\n dir: directionality\n }, /*#__PURE__*/React.createElement(BodyText, {\n className: \"no-margin transaction-header--middle-section__transaction_title\"\n }, getContentValue(transaction, 'counterparty.name'))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-header--right-section\",\n dir: directionality\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"transaction-header--right-section__amount\"\n }, /*#__PURE__*/React.createElement(BodyText, {\n className: \"no-margin\"\n }, getContentValue(transaction, 'content.grossAmount'), ' ', getContentValue(transaction, 'gross.currency_code'))), /*#__PURE__*/React.createElement(\"span\", {\n className: \"transaction-header--right-section__icon\"\n }, function getAccordionIcon(item) {\n if (!item.isExpanded) {\n return /*#__PURE__*/React.createElement(Icon, {\n name: \"chevron-down\",\n size: \"md\"\n });\n }\n return /*#__PURE__*/React.createElement(Icon, {\n name: \"chevron-up\",\n size: \"md\"\n });\n }(transaction)))), function renderTransactionDetails(item) {\n //If transaction is not expanded return empty div.\n if (!item.isExpanded) {\n return /*#__PURE__*/React.createElement(\"div\", null);\n }\n\n //if transaction is expanded render transaction details.\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-expanded--container\"\n }, renderTransactionLifeCycle(item), /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-expanded--container_transaction-details\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-expanded--container_transaction-details--left_container\",\n dir: directionality\n }, /*#__PURE__*/React.createElement(BodyText, {\n strong: true,\n className: \"transaction-expanded--container_transaction-details--left_container--trans_label\"\n }, getContentValue(metaData, 'transactionIdLabel')), /*#__PURE__*/React.createElement(BodyText, {\n className: \"transaction-expanded--container_transaction-details--left_container--trans_id\"\n }, item.id)), /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-expanded--container_transaction-details--right_container\",\n dir: directionality\n }, /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(BodyText, {\n strong: true,\n className: \"no-margin no-padding\"\n }, getContentValue(metaData, 'transactionSummaryHeader')), /*#__PURE__*/React.createElement(CaptionText, {\n className: \"no-margin no-padding\"\n }, getContentValue(item, 'content.transactionCounterPartyName')), /*#__PURE__*/React.createElement(CaptionText, {\n className: \"no-margin no-padding\"\n }, getContentValue(item, 'content.transactionCounterPartyEmail'))), /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(BodyText, {\n className: \"transaction-expanded--container_transaction-details--right_container--trans_details_title\"\n }, getContentValue(metaData, 'transactionSummaryDetailsHeader')), /*#__PURE__*/React.createElement(\"div\", {\n className: \"border-btm transaction-expanded--container_transaction-details--right_container--trans_amount_details\"\n }, /*#__PURE__*/React.createElement(BodyText, {\n className: \"transaction-expanded--container_transaction-details--right_container--trans_amount_details_sub_left \"\n }, getContentValue(metaData, 'transactionSummaryTotal')), /*#__PURE__*/React.createElement(BodyText, {\n className: \"transaction-expanded--container_transaction-details--right_container--trans_amount_details_sub_right\"\n }, getContentValue(item, 'content.grossAmount'), ' ', getContentValue(item, 'gross.currency_code'))), /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-expanded--container_transaction-details--right_container--trans_amount_details\"\n }, /*#__PURE__*/React.createElement(BodyText, {\n className: \"transaction-expanded--container_transaction-details--right_container--trans_amount_details_sub_left\"\n }, getContentValue(metaData, 'transactionTotalAmountLabel')), /*#__PURE__*/React.createElement(BodyText, {\n className: \"transaction-expanded--container_transaction-details--right_container--trans_amount_details_sub_right\"\n }, getContentValue(item, 'content.grossAmount'), ' ', getContentValue(item, 'gross.currency_code')))))));\n }(transaction)));\n};\nTransactionItem.propTypes = {\n transaction: PropTypes.shape({}).isRequired,\n toggleTransactionHandler: PropTypes.func,\n toggleKeyPressHandler: PropTypes.func,\n progressLayout: PropTypes.string,\n directionality: PropTypes.string,\n metaData: PropTypes.shape({}),\n config: PropTypes.shape({})\n};\n\nfunction ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nvar RefundsTracker = function (props) {\n var data = props.data,\n componentName = props.componentName,\n fptiOptions = props.fptiOptions,\n progressLayout = props.progressLayout,\n directionality = props.directionality,\n transactionsToDisplay = props.transactionsToDisplay,\n collapseAll = props.collapseAll,\n version = props.version;\n var _useState = useState(setCollapseForTransactions(transactionsToDisplay, collapseAll)),\n _useState2 = _slicedToArray(_useState, 2),\n transactions = _useState2[0],\n updateTransactions = _useState2[1];\n\n // On component mount, Fire impression event.\n useEffect(function () {\n //If has transactions then fire an impression event to state the component is loaded.\n if (Array.isArray(transactions) && transactions.length) {\n // Fire activity event\n recordEvent(_objectSpread$1({\n comp: componentName,\n event_name: 'hc_refund_tracker_widget_shown'\n }, fptiOptions));\n }\n }, []);\n\n // Toggle accordion handler - this is a callback method to TransactionItem\n var __toggleAccordionHandler = function (selectedTransaction) {\n var updatedTransactions = getUpdatedTransactionsToggle(transactions, selectedTransaction);\n updateTransactions(updatedTransactions);\n\n // FPTI\n var toggleType = getToggleTypeForFPTI(selectedTransaction);\n var updatedFptiOptions = _objectSpread$1({\n link: \"refunds-tracker|toggle|\".concat(selectedTransaction.id, \"|\").concat(toggleType),\n comp: componentName\n }, fptiOptions);\n recordClickEvent(updatedFptiOptions);\n };\n\n // transaction toggle on key press handler.\n var __toggleOnKeyPressHandler = function (e, transactionId) {\n if (e.which === 13) {\n __toggleAccordionHandler(transactionId);\n }\n };\n var renderTransactionList = function () {\n return /*#__PURE__*/React.createElement(\"ul\", {\n className: \"transaction-list\"\n }, transactions.map(function (transaction) {\n return /*#__PURE__*/React.createElement(TransactionItem, {\n key: transaction.id,\n transaction: transaction,\n progressLayout: progressLayout,\n directionality: directionality,\n toggleTransactionHandler: __toggleAccordionHandler,\n toggleKeyPressHandler: __toggleOnKeyPressHandler,\n metaData: data.metaData,\n config: data.configs\n });\n }));\n };\n return /*#__PURE__*/React.createElement(Fragment, null, function renderRefundsTracker() {\n // If transactions to show then render the component else return null;\n if (Array.isArray(transactions) && transactions.length) {\n if (version === 'v2') {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"hc-help-refunds-tracker\",\n dir: directionality\n }, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Card.Header, null, getContentValue(data.metaData, 'trackerHeader')), /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-container\",\n dir: directionality\n }, renderTransactionList())));\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"hc-help-refunds-tracker\",\n dir: directionality\n }, /*#__PURE__*/React.createElement(HeadingText, {\n size: \"sm\"\n }, getContentValue(data.metaData, 'trackerHeader')), /*#__PURE__*/React.createElement(\"div\", {\n className: \"transaction-container\",\n dir: directionality\n }, renderTransactionList()));\n }\n return null;\n }());\n};\nRefundsTracker.propTypes = {\n data: PropTypes.shape({\n transactions: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n metaData: PropTypes.shape({}).isRequired,\n configs: PropTypes.shape({}).isRequired\n }).isRequired,\n transactionsToDisplay: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n componentName: PropTypes.string,\n fptiOptions: PropTypes.shape(FPTI_OBJECT),\n progressLayout: PropTypes.oneOf(supportedProgressLayoutTypes),\n directionality: PropTypes.string,\n collapseAll: PropTypes.bool,\n version: PropTypes.string\n};\n\nvar sizes = {\n SMALL: 'sm',\n MEDIUM: 'md',\n LARGE: 'lg'\n};\nvar spinnerTypes = {\n SHIMMER: 'shimmer',\n LOADER: 'loader'\n};\n\nfunction Loader(props) {\n var spinnerType = props.spinnerType,\n spinnerSize = props.spinnerSize,\n customLoaderStyle = props.customLoaderStyle;\n return function renderLoader() {\n // Shimmer loader\n var customStyle;\n if (spinnerType === spinnerTypes.SHIMMER) {\n customStyle = customLoaderStyle || {\n height: '12rem',\n width: '100%'\n };\n return /*#__PURE__*/React.createElement(\"div\", {\n style: customStyle\n }, /*#__PURE__*/React.createElement(Card, {\n isLoading: true\n }));\n }\n\n // Spinning loader\n\n customStyle = customLoaderStyle || {\n display: 'flex',\n justifyContent: 'center'\n };\n return /*#__PURE__*/React.createElement(\"div\", {\n style: customStyle\n }, /*#__PURE__*/React.createElement(LoadingSpinner, {\n screenReaderText: \"loading\",\n size: spinnerSize\n }));\n }();\n}\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nvar getTransactionsUrl = function () {\n return '/smarthelp/api/hc-get-transactions?refunds=true';\n};\nvar Refunds = function (props) {\n var collapseAll = props.collapseAll,\n spinnerSize = props.spinnerSize,\n componentName = props.componentName,\n fptiOptions = props.fptiOptions,\n suppressError = props.suppressError,\n progressLayout = props.progressLayout,\n devMode = props.devMode,\n devData = props.devData,\n version = props.version,\n spinnerType = props.spinnerType,\n customLoaderStyle = props.customLoaderStyle;\n\n // state\n var _useState = useState({\n originalData: null,\n isLoading: true,\n transactionsToDisplay: null,\n hasError: false,\n directionality: 'ltr'\n }),\n _useState2 = _slicedToArray(_useState, 2),\n refundsData = _useState2[0],\n updateRefundsData = _useState2[1];\n var getRefundTransactionsData = function () {\n getData(getTransactionsUrl()).then(function (response) {\n var data = response.data;\n return updateRefundsData({\n originalData: data,\n transactionsToDisplay: getFinalTransactionsToDisplay(data),\n isLoading: false,\n hasError: false,\n directionality: getDirectionality(data)\n });\n }).catch(function () {\n return updateRefundsData({\n isLoading: false,\n hasError: true,\n transactions: null,\n directionality: 'ltr'\n });\n });\n };\n\n // On component mount\n useEffect(function () {\n // On dev mode get the dummy data which is passed through props\n if (devMode) {\n return setTimeout(function () {\n return updateRefundsData({\n originalData: devData,\n transactionsToDisplay: getFinalTransactionsToDisplay(devData),\n isLoading: false,\n hasError: false,\n directionality: getDirectionality(devData)\n });\n }, 2000);\n }\n return getRefundTransactionsData();\n }, []);\n\n // Method to handle events on component error.\n // On component error fire impression event to track error cases.\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"hc-help-tracker\"\n }, /*#__PURE__*/React.createElement(ErrorBoundary, {\n suppressError: suppressError,\n cbOnError: function handleErrorCatch(err, errorInfo) {\n var errorFptiOptions = {\n page: \"\".concat(fptiOptions.page, \"-error\"),\n pgrp: fptiOptions.pgrp,\n event_name: 'hc_refund_tracker_widget_catch_error',\n error_description: getParsedErrorMessage(err),\n error_source: errorInfo\n };\n recordEvent(_objectSpread({\n comp: componentName\n }, errorFptiOptions));\n }\n }, /*#__PURE__*/React.createElement(ThemeProvider, {\n theme: PAYPAL_THEME\n }, function renderRefundTracker() {\n var isLoading = refundsData.isLoading,\n hasError = refundsData.hasError,\n transactionsToDisplay = refundsData.transactionsToDisplay,\n originalData = refundsData.originalData,\n directionality = refundsData.directionality;\n\n // If data is not loaded yet. Return spinner/loader\n if (isLoading) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"hc-help-tracker--spinner\"\n }, /*#__PURE__*/React.createElement(Loader, {\n spinnerType: spinnerType,\n spinnerSize: spinnerSize,\n customLoaderStyle: customLoaderStyle\n }));\n }\n\n // If has any error with XHR call. fire an FPTI.\n if (hasError) {\n recordEvent(_objectSpread({\n comp: componentName,\n event_name: 'hc_refund_tracker_widget_service_error'\n }, fptiOptions));\n return /*#__PURE__*/React.createElement(\"div\", null);\n }\n\n // If transaction to display is less than the original data after the filter\n // then track it so that we can know why the transaction are missing.\n var transactions = originalData.transactions;\n if ((Array.isArray(transactions) && transactions.length) > (Array.isArray(transactionsToDisplay) && transactionsToDisplay.length)) {\n recordEvent(_objectSpread({\n comp: componentName,\n event_name: 'hc_refund_tracker_missing_transactions'\n }, fptiOptions));\n }\n\n // If no transactions exists after filter based on the remote configs and statuses\n if (!(Array.isArray(transactionsToDisplay) && transactionsToDisplay.length)) {\n recordEvent(_objectSpread({\n comp: componentName,\n event_name: 'hc_refund_tracker_widget_not_shown'\n }, fptiOptions));\n return /*#__PURE__*/React.createElement(\"div\", null);\n }\n return /*#__PURE__*/React.createElement(RefundsTracker, {\n transactionsToDisplay: transactionsToDisplay,\n progressLayout: progressLayout,\n fptiOptions: fptiOptions,\n componentName: componentName,\n data: originalData,\n directionality: directionality,\n collapseAll: collapseAll,\n version: version\n });\n }())));\n};\n\n// Refunds Tracker props\nRefunds.propTypes = {\n progressLayout: PropTypes.oneOf(supportedProgressLayoutTypes),\n suppressError: PropTypes.bool,\n fptiOptions: PropTypes.shape(FPTI_OBJECT).isRequired,\n spinnerSize: PropTypes.oneOf([sizes.SMALL, sizes.MEDIUM, sizes.LARGE]),\n componentName: PropTypes.string.isRequired,\n version: PropTypes.string,\n collapseAll: PropTypes.bool,\n spinnerType: PropTypes.oneOf([spinnerTypes.SHIMMER, spinnerTypes.LOADER]),\n customLoaderStyle: PropTypes.string,\n // development/github pages purpose only\n devMode: PropTypes.bool,\n devData: PropTypes.shape({})\n};\n\n// Refunds Tracker default props\nRefunds.defaultProps = {\n progressLayout: progressLayoutTypes.AUTO,\n suppressError: true,\n spinnerSize: sizes.LARGE,\n version: 'v1',\n collapseAll: true,\n devMode: false,\n spinnerType: spinnerTypes.SHIMMER\n};\n\nexport { Refunds as HcRefundsTracker };\n","import React from 'react'\nimport { HcRefundsTracker } from '@paypalcorp/helpcomponents-trackers'\nimport { TRACKER_DATA } from '../../utils/prop-type-shape'\nimport {\n COMPONENT_NAME,\n componentNames,\n FPTI_PREFIX,\n} from '../../utils/analytics/fpti-constants'\n\nconst RefundTracker = ({ pageName }) => (\n