@medipass/utils 11.81.0 → 11.81.1

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.
Files changed (69) hide show
  1. package/babel.config.js +2 -2
  2. package/build-validation-schema.js +301 -269
  3. package/chart.js +12 -8
  4. package/claim-payment-status-formatted.js +1 -1
  5. package/claim-payment-status-icons.js +1 -1
  6. package/claim-payment-status-text-classes.js +1 -1
  7. package/datetime.js +10 -6
  8. package/document-types-formatted.js +1 -1
  9. package/document-types-icons.js +1 -1
  10. package/document-types-text-classes.js +1 -1
  11. package/documents/workflow-state-formatted-text-classes.js +1 -1
  12. package/documents/workflow-state-formatted.js +7 -5
  13. package/documents/workflow-state-icons.js +1 -1
  14. package/form-applications/assign-values-to-sections.js +6 -4
  15. package/funders.js +6 -4
  16. package/get-env.js +14 -23
  17. package/get-select-options.js +11 -9
  18. package/get-staff-type-display-name.js +1 -1
  19. package/google-addresses.js +17 -12
  20. package/i18n/index.js +18 -17
  21. package/i18n/translations.js +1 -1
  22. package/index.js +41 -41
  23. package/intercom.js +16 -12
  24. package/masked.js +12 -8
  25. package/package.json +4 -5
  26. package/parse-health-fund-card-fields.js +1 -1
  27. package/practices-d6c480f1.js +2 -2
  28. package/products.js +8 -6
  29. package/redux-actions.js +15 -10
  30. package/redux-reducer.js +15 -11
  31. package/sanitise-url.js +6 -4
  32. package/scroll.js +1 -1
  33. package/sensitive-keys.js +1 -1
  34. package/sentry.js +48 -25
  35. package/service-items.js +26 -21
  36. package/status-icons.js +1 -1
  37. package/status-text-classes.js +1 -1
  38. package/test-framework/fixtures/billable-items.js +2 -2
  39. package/test-framework/fixtures/businesses.js +2 -2
  40. package/test-framework/fixtures/forms.js +2 -2
  41. package/test-framework/fixtures/health-fund-accounts.js +2 -2
  42. package/test-framework/fixtures/health-fund-settings.js +2 -2
  43. package/test-framework/fixtures/health-funds.js +3 -3
  44. package/test-framework/fixtures/index.js +37 -37
  45. package/test-framework/fixtures/members.js +2 -2
  46. package/test-framework/fixtures/modalities.js +2 -2
  47. package/test-framework/fixtures/patients.js +2 -2
  48. package/test-framework/fixtures/payment-methods.js +2 -2
  49. package/test-framework/fixtures/practices.js +4 -4
  50. package/test-framework/fixtures/products.js +3 -3
  51. package/test-framework/fixtures/professional-categories.js +2 -2
  52. package/test-framework/fixtures/services.js +4 -4
  53. package/test-framework/fixtures/specialties.js +2 -2
  54. package/test-framework/fixtures/staff.js +5 -5
  55. package/test-framework/fixtures/subscriptions.js +6 -6
  56. package/test-framework/fixtures/transactions.js +14 -14
  57. package/transaction-status-formatted.js +1 -1
  58. package/transaction-status-helpers.js +9 -7
  59. package/transaction-status-icons.js +1 -1
  60. package/transaction-status-text-classes.js +1 -1
  61. package/transaction-status.js +11 -9
  62. package/tsconfig.json +1 -1
  63. package/validate-form.js +37 -27
  64. package/validate.js +32 -11
  65. package/webpack-config.js +5 -3
  66. package/workflow-state-formatted-text-classes.js +1 -1
  67. package/workflow-state-formatted.js +7 -5
  68. package/test-framework/react.d.ts +0 -8
  69. package/test-framework/react.js +0 -39
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var billableItems = require('../../billable-items-f8291b1e.js');
5
+ var testFramework_fixtures_billableItems = require('../../billable-items-f8291b1e.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultBillableItem = billableItems.defaultBillableItem;
9
+ exports.defaultBillableItem = testFramework_fixtures_billableItems.defaultBillableItem;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var businesses = require('../../businesses-e02c0f4b.js');
5
+ var testFramework_fixtures_businesses = require('../../businesses-e02c0f4b.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultBusiness = businesses.defaultBusiness;
9
+ exports.defaultBusiness = testFramework_fixtures_businesses.defaultBusiness;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var forms = require('../../forms-e1c51a53.js');
5
+ var testFramework_fixtures_forms = require('../../forms-e1c51a53.js');
6
6
 
7
7
 
8
8
 
9
- exports.formDefault = forms.formDefault;
9
+ exports.formDefault = testFramework_fixtures_forms.formDefault;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var healthFundAccounts = require('../../health-fund-accounts-88eac93c.js');
5
+ var testFramework_fixtures_healthFundAccounts = require('../../health-fund-accounts-88eac93c.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultHealthFundAccount = healthFundAccounts.defaultHealthFundAccount;
9
+ exports.defaultHealthFundAccount = testFramework_fixtures_healthFundAccounts.defaultHealthFundAccount;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var healthFundSettings = require('../../health-fund-settings-e7a0f2ec.js');
5
+ var testFramework_fixtures_healthFundSettings = require('../../health-fund-settings-e7a0f2ec.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultHealthFundSetting = healthFundSettings.defaultHealthFundSetting;
9
+ exports.defaultHealthFundSetting = testFramework_fixtures_healthFundSettings.defaultHealthFundSetting;
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var healthFunds = require('../../health-funds-7fea63a0.js');
5
+ var testFramework_fixtures_healthFunds = require('../../health-funds-7fea63a0.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultHealthFund = healthFunds.defaultHealthFund;
10
- exports.medicareHealthFund = healthFunds.medicareHealthFund;
9
+ exports.defaultHealthFund = testFramework_fixtures_healthFunds.defaultHealthFund;
10
+ exports.medicareHealthFund = testFramework_fixtures_healthFunds.medicareHealthFund;
@@ -2,44 +2,44 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var transactions = require('../../transactions-de03f65c.js');
6
- var subscriptions = require('../../subscriptions-aef302aa.js');
7
- var staff = require('../../staff-646053b7.js');
8
- var specialties = require('../../specialties-25fbb171.js');
9
- var services = require('../../services-f8480eba.js');
10
- var professionalCategories = require('../../professional-categories-157d1767.js');
11
- var products = require('../../products-0a392564.js');
12
- var practices = require('../../practices-d6c480f1.js');
13
- var paymentMethods = require('../../payment-methods-d36bc018.js');
14
- var patients = require('../../patients-dd3709c1.js');
15
- var modalities = require('../../modalities-2dfbea63.js');
16
- var members = require('../../members-8eb8d8d0.js');
17
- var billableItems = require('../../billable-items-f8291b1e.js');
18
- var businesses = require('../../businesses-e02c0f4b.js');
19
- var forms = require('../../forms-e1c51a53.js');
20
- var healthFundAccounts = require('../../health-fund-accounts-88eac93c.js');
21
- var healthFundSettings = require('../../health-fund-settings-e7a0f2ec.js');
22
- var healthFunds = require('../../health-funds-7fea63a0.js');
5
+ var testFramework_fixtures_billableItems = require('../../billable-items-f8291b1e.js');
6
+ var testFramework_fixtures_businesses = require('../../businesses-e02c0f4b.js');
7
+ var testFramework_fixtures_forms = require('../../forms-e1c51a53.js');
8
+ var testFramework_fixtures_healthFundAccounts = require('../../health-fund-accounts-88eac93c.js');
9
+ var testFramework_fixtures_healthFundSettings = require('../../health-fund-settings-e7a0f2ec.js');
10
+ var testFramework_fixtures_healthFunds = require('../../health-funds-7fea63a0.js');
11
+ var testFramework_fixtures_members = require('../../members-8eb8d8d0.js');
12
+ var testFramework_fixtures_modalities = require('../../modalities-2dfbea63.js');
13
+ var testFramework_fixtures_patients = require('../../patients-dd3709c1.js');
14
+ var testFramework_fixtures_paymentMethods = require('../../payment-methods-d36bc018.js');
15
+ var testFramework_fixtures_practices = require('../../practices-d6c480f1.js');
16
+ var testFramework_fixtures_products = require('../../products-0a392564.js');
17
+ var testFramework_fixtures_professionalCategories = require('../../professional-categories-157d1767.js');
18
+ var testFramework_fixtures_services = require('../../services-f8480eba.js');
19
+ var testFramework_fixtures_specialties = require('../../specialties-25fbb171.js');
20
+ var testFramework_fixtures_staff = require('../../staff-646053b7.js');
21
+ var testFramework_fixtures_subscriptions = require('../../subscriptions-aef302aa.js');
22
+ var testFramework_fixtures_transactions = require('../../transactions-de03f65c.js');
23
23
 
24
24
  var index = {
25
- billableItems: billableItems.billableItems,
26
- businesses: businesses.businesses,
27
- forms: forms.forms,
28
- healthFundAccounts: healthFundAccounts.healthFundAccounts,
29
- healthFundSettings: healthFundSettings.healthFundSettings,
30
- healthFunds: healthFunds.healthFunds,
31
- members: members.members,
32
- modalities: modalities.modalities,
33
- patients: patients.patients,
34
- paymentMethods: paymentMethods.paymentMethods,
35
- practices: practices.practices$1,
36
- products: products.products,
37
- professionalCategories: professionalCategories.professionalCategories,
38
- services: services.services,
39
- specialties: specialties.specialties,
40
- staff: staff.staff,
41
- subscriptions: subscriptions.subscriptions,
42
- transactions: transactions.transactions
25
+ billableItems: testFramework_fixtures_billableItems.billableItems,
26
+ businesses: testFramework_fixtures_businesses.businesses,
27
+ forms: testFramework_fixtures_forms.forms,
28
+ healthFundAccounts: testFramework_fixtures_healthFundAccounts.healthFundAccounts,
29
+ healthFundSettings: testFramework_fixtures_healthFundSettings.healthFundSettings,
30
+ healthFunds: testFramework_fixtures_healthFunds.healthFunds,
31
+ members: testFramework_fixtures_members.members,
32
+ modalities: testFramework_fixtures_modalities.modalities,
33
+ patients: testFramework_fixtures_patients.patients,
34
+ paymentMethods: testFramework_fixtures_paymentMethods.paymentMethods,
35
+ practices: testFramework_fixtures_practices.practices,
36
+ products: testFramework_fixtures_products.products,
37
+ professionalCategories: testFramework_fixtures_professionalCategories.professionalCategories,
38
+ services: testFramework_fixtures_services.services,
39
+ specialties: testFramework_fixtures_specialties.specialties,
40
+ staff: testFramework_fixtures_staff.staff,
41
+ subscriptions: testFramework_fixtures_subscriptions.subscriptions,
42
+ transactions: testFramework_fixtures_transactions.transactions
43
43
  };
44
44
 
45
- exports.default = index;
45
+ exports["default"] = index;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var members = require('../../members-8eb8d8d0.js');
5
+ var testFramework_fixtures_members = require('../../members-8eb8d8d0.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultMember = members.defaultMember;
9
+ exports.defaultMember = testFramework_fixtures_members.defaultMember;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var modalities = require('../../modalities-2dfbea63.js');
5
+ var testFramework_fixtures_modalities = require('../../modalities-2dfbea63.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultModality = modalities.defaultModality;
9
+ exports.defaultModality = testFramework_fixtures_modalities.defaultModality;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var patients = require('../../patients-dd3709c1.js');
5
+ var testFramework_fixtures_patients = require('../../patients-dd3709c1.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultPatient = patients.defaultPatient;
9
+ exports.defaultPatient = testFramework_fixtures_patients.defaultPatient;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var paymentMethods = require('../../payment-methods-d36bc018.js');
5
+ var testFramework_fixtures_paymentMethods = require('../../payment-methods-d36bc018.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultPaymentMethod = paymentMethods.defaultPaymentMethod;
9
+ exports.defaultPaymentMethod = testFramework_fixtures_paymentMethods.defaultPaymentMethod;
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var practices = require('../../practices-d6c480f1.js');
5
+ var testFramework_fixtures_practices = require('../../practices-d6c480f1.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultPractice = practices.defaultPractice;
10
- exports.defaultPractice2 = practices.defaultPractice2;
11
- exports.practices = practices.practices;
9
+ exports.defaultPractice = testFramework_fixtures_practices.defaultPractice;
10
+ exports.defaultPractice2 = testFramework_fixtures_practices.defaultPractice2;
11
+ exports.practices = testFramework_fixtures_practices.practices$1;
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var products = require('../../products-0a392564.js');
5
+ var testFramework_fixtures_products = require('../../products-0a392564.js');
6
6
 
7
7
 
8
8
 
9
- exports.productBasic = products.productBasic;
10
- exports.productPro = products.productPro;
9
+ exports.productBasic = testFramework_fixtures_products.productBasic;
10
+ exports.productPro = testFramework_fixtures_products.productPro;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var professionalCategories = require('../../professional-categories-157d1767.js');
5
+ var testFramework_fixtures_professionalCategories = require('../../professional-categories-157d1767.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultProfessionalCategory = professionalCategories.defaultProfessionalCategory;
9
+ exports.defaultProfessionalCategory = testFramework_fixtures_professionalCategories.defaultProfessionalCategory;
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var services = require('../../services-f8480eba.js');
5
+ var testFramework_fixtures_services = require('../../services-f8480eba.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultService = services.defaultService;
10
- exports.defaultServiceItems = services.defaultServiceItems;
11
- exports.serviceWithMultipleClaimItems = services.serviceWithMultipleClaimItems;
9
+ exports.defaultService = testFramework_fixtures_services.defaultService;
10
+ exports.defaultServiceItems = testFramework_fixtures_services.defaultServiceItems;
11
+ exports.serviceWithMultipleClaimItems = testFramework_fixtures_services.serviceWithMultipleClaimItems;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var specialties = require('../../specialties-25fbb171.js');
5
+ var testFramework_fixtures_specialties = require('../../specialties-25fbb171.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultSpecialty = specialties.defaultSpecialty;
9
+ exports.defaultSpecialty = testFramework_fixtures_specialties.defaultSpecialty;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var staff = require('../../staff-646053b7.js');
5
+ var testFramework_fixtures_staff = require('../../staff-646053b7.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultPractitioner = staff.defaultPractitioner;
10
- exports.defaultPractitioner2 = staff.defaultPractitioner2;
11
- exports.practitionerWithActivePendingProviderSet = staff.practitionerWithActivePendingProviderSet;
12
- exports.practitionerWithPendingProviderSet = staff.practitionerWithPendingProviderSet;
9
+ exports.defaultPractitioner = testFramework_fixtures_staff.defaultPractitioner;
10
+ exports.defaultPractitioner2 = testFramework_fixtures_staff.defaultPractitioner2;
11
+ exports.practitionerWithActivePendingProviderSet = testFramework_fixtures_staff.practitionerWithActivePendingProviderSet;
12
+ exports.practitionerWithPendingProviderSet = testFramework_fixtures_staff.practitionerWithPendingProviderSet;
@@ -2,12 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var subscriptions = require('../../subscriptions-aef302aa.js');
5
+ var testFramework_fixtures_subscriptions = require('../../subscriptions-aef302aa.js');
6
6
 
7
7
 
8
8
 
9
- exports.subscriptionBasic = subscriptions.subscriptionBasic;
10
- exports.subscriptionPro = subscriptions.subscriptionPro;
11
- exports.subscriptionProEnded = subscriptions.subscriptionProEnded;
12
- exports.subscriptionProUpcoming = subscriptions.subscriptionProUpcoming;
13
- exports.subscriptionProWithoutPaymentMethod = subscriptions.subscriptionProWithoutPaymentMethod;
9
+ exports.subscriptionBasic = testFramework_fixtures_subscriptions.subscriptionBasic;
10
+ exports.subscriptionPro = testFramework_fixtures_subscriptions.subscriptionPro;
11
+ exports.subscriptionProEnded = testFramework_fixtures_subscriptions.subscriptionProEnded;
12
+ exports.subscriptionProUpcoming = testFramework_fixtures_subscriptions.subscriptionProUpcoming;
13
+ exports.subscriptionProWithoutPaymentMethod = testFramework_fixtures_subscriptions.subscriptionProWithoutPaymentMethod;
@@ -2,20 +2,20 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var transactions = require('../../transactions-de03f65c.js');
5
+ var testFramework_fixtures_transactions = require('../../transactions-de03f65c.js');
6
6
 
7
7
 
8
8
 
9
- exports.defaultTransaction = transactions.defaultTransaction;
10
- exports.transactionForMemberRequestQuote = transactions.transactionForMemberRequestQuote;
11
- exports.transactionForMemberRequestQuoteComplete = transactions.transactionForMemberRequestQuoteComplete;
12
- exports.transactionQuoteDefault = transactions.transactionQuoteDefault;
13
- exports.transactionWithApprovedInPersonPayment = transactions.transactionWithApprovedInPersonPayment;
14
- exports.transactionWithApprovedPayment = transactions.transactionWithApprovedPayment;
15
- exports.transactionWithClaim = transactions.transactionWithClaim;
16
- exports.transactionWithMedicareClaim = transactions.transactionWithMedicareClaim;
17
- exports.transactionWithMultipleRefundedPayments = transactions.transactionWithMultipleRefundedPayments;
18
- exports.transactionWithOtherItems = transactions.transactionWithOtherItems;
19
- exports.transactionWithPendingMedicareClaim = transactions.transactionWithPendingMedicareClaim;
20
- exports.transactionWithPendingMedicareClaimAndClaimant = transactions.transactionWithPendingMedicareClaimAndClaimant;
21
- exports.transactionWithRefundedPayment = transactions.transactionWithRefundedPayment;
9
+ exports.defaultTransaction = testFramework_fixtures_transactions.defaultTransaction;
10
+ exports.transactionForMemberRequestQuote = testFramework_fixtures_transactions.transactionForMemberRequestQuote;
11
+ exports.transactionForMemberRequestQuoteComplete = testFramework_fixtures_transactions.transactionForMemberRequestQuoteComplete;
12
+ exports.transactionQuoteDefault = testFramework_fixtures_transactions.transactionQuoteDefault;
13
+ exports.transactionWithApprovedInPersonPayment = testFramework_fixtures_transactions.transactionWithApprovedInPersonPayment;
14
+ exports.transactionWithApprovedPayment = testFramework_fixtures_transactions.transactionWithApprovedPayment;
15
+ exports.transactionWithClaim = testFramework_fixtures_transactions.transactionWithClaim;
16
+ exports.transactionWithMedicareClaim = testFramework_fixtures_transactions.transactionWithMedicareClaim;
17
+ exports.transactionWithMultipleRefundedPayments = testFramework_fixtures_transactions.transactionWithMultipleRefundedPayments;
18
+ exports.transactionWithOtherItems = testFramework_fixtures_transactions.transactionWithOtherItems;
19
+ exports.transactionWithPendingMedicareClaim = testFramework_fixtures_transactions.transactionWithPendingMedicareClaim;
20
+ exports.transactionWithPendingMedicareClaimAndClaimant = testFramework_fixtures_transactions.transactionWithPendingMedicareClaimAndClaimant;
21
+ exports.transactionWithRefundedPayment = testFramework_fixtures_transactions.transactionWithRefundedPayment;
@@ -10,4 +10,4 @@ var transactionStatusFormatted = {
10
10
  PROVIDER: (_PROVIDER = {}, _PROVIDER[constants.TRANSACTION_STATUSES.PARTIALLY_REFUNDED] = 'Partial refund', _PROVIDER[constants.TRANSACTION_STATUSES.UNDER_REVIEW] = 'Under review', _PROVIDER[constants.TRANSACTION_STATUSES.ERRORED] = 'Errored', _PROVIDER)
11
11
  };
12
12
 
13
- exports.default = transactionStatusFormatted;
13
+ exports["default"] = transactionStatusFormatted;
@@ -2,13 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
-
5
+ var _capitalize = require('lodash/capitalize');
7
6
  var constants = require('./constants.js');
8
- var _capitalize = _interopDefault(require('lodash/capitalize'));
9
7
  var claimPaymentStatusIcons = require('./claim-payment-status-icons.js');
10
8
  var claimPaymentStatusTextClasses = require('./claim-payment-status-text-classes.js');
11
9
 
10
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
+
12
+ var _capitalize__default = /*#__PURE__*/_interopDefaultLegacy(_capitalize);
13
+
12
14
  var getPaymentStatus = function getPaymentStatus(_ref) {
13
15
  var paymentStatus = _ref.paymentStatus,
14
16
  transactionStatus = _ref.transactionStatus,
@@ -27,7 +29,7 @@ var getPaymentStatus = function getPaymentStatus(_ref) {
27
29
  return 'Paid in person';
28
30
  }
29
31
 
30
- return paymentStatus ? _capitalize(paymentStatus) : 'Pending';
32
+ return paymentStatus ? _capitalize__default["default"](paymentStatus) : 'Pending';
31
33
  }; // @ts-expect-error TS(7031): Binding element 'paymentStatus' implicitly has an ... Remove this comment to see the full error message
32
34
 
33
35
  var getPaymentTextClass = function getPaymentTextClass(_ref2) {
@@ -49,7 +51,7 @@ var getPaymentTextClass = function getPaymentTextClass(_ref2) {
49
51
  } // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
50
52
 
51
53
 
52
- return claimPaymentStatusTextClasses.default[paymentStatus] || 'warning';
54
+ return claimPaymentStatusTextClasses["default"][paymentStatus] || 'warning';
53
55
  }; // @ts-expect-error TS(7031): Binding element 'paymentStatus' implicitly has an ... Remove this comment to see the full error message
54
56
 
55
57
  var getPaymentIcon = function getPaymentIcon(_ref3) {
@@ -71,11 +73,11 @@ var getPaymentIcon = function getPaymentIcon(_ref3) {
71
73
  } // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
72
74
 
73
75
 
74
- return claimPaymentStatusIcons.default[paymentStatus] || 'fa-clock';
76
+ return claimPaymentStatusIcons["default"][paymentStatus] || 'fa-clock';
75
77
  };
76
78
  var transactionStatusHelper = {};
77
79
 
78
- exports.default = transactionStatusHelper;
80
+ exports["default"] = transactionStatusHelper;
79
81
  exports.getPaymentIcon = getPaymentIcon;
80
82
  exports.getPaymentStatus = getPaymentStatus;
81
83
  exports.getPaymentTextClass = getPaymentTextClass;
@@ -7,4 +7,4 @@ var constants = require('./constants.js');
7
7
  var _transactionStatusIco;
8
8
  var transactionStatusIcons = (_transactionStatusIco = {}, _transactionStatusIco[constants.TRANSACTION_STATUSES.COMPLETED] = 'fas fa-check', _transactionStatusIco[constants.TRANSACTION_STATUSES.CANCELLED] = 'fas fa-times', _transactionStatusIco[constants.TRANSACTION_STATUSES.PENDING] = 'fas fa-clock', _transactionStatusIco[constants.TRANSACTION_STATUSES.UNDER_REVIEW] = 'fas fa-clock', _transactionStatusIco[constants.TRANSACTION_STATUSES.PARTIALLY_REFUNDED] = 'fas fa-check', _transactionStatusIco[constants.TRANSACTION_STATUSES.REFUNDED] = 'fas fa-undo', _transactionStatusIco[constants.TRANSACTION_STATUSES.ERRORED] = 'fa fa-exclamation-triangle', _transactionStatusIco);
9
9
 
10
- exports.default = transactionStatusIcons;
10
+ exports["default"] = transactionStatusIcons;
@@ -7,4 +7,4 @@ var constants = require('./constants.js');
7
7
  var _transactionStatusTex;
8
8
  var transactionStatusTextClasses = (_transactionStatusTex = {}, _transactionStatusTex[constants.TRANSACTION_STATUSES.NEW] = 'primary', _transactionStatusTex[constants.TRANSACTION_STATUSES.PENDING] = 'warning', _transactionStatusTex[constants.TRANSACTION_STATUSES.REQUESTED] = 'warning', _transactionStatusTex[constants.TRANSACTION_STATUSES.COMPLETED] = 'success', _transactionStatusTex[constants.TRANSACTION_STATUSES.CANCELLED] = 'danger', _transactionStatusTex[constants.TRANSACTION_STATUSES.REFUNDED] = '', _transactionStatusTex[constants.TRANSACTION_STATUSES.PARTIALLY_REFUNDED] = 'success', _transactionStatusTex[constants.TRANSACTION_STATUSES.UNDER_REVIEW] = 'warning', _transactionStatusTex[constants.TRANSACTION_STATUSES.ERRORED] = 'danger', _transactionStatusTex[constants.TRANSACTION_STATUSES.SUBMITTED] = 'warning', _transactionStatusTex[constants.TRANSACTION_STATUSES.OUTSTANDING] = 'warning', _transactionStatusTex[constants.TRANSACTION_STATUSES.DECLINED] = 'danger', _transactionStatusTex[constants.TRANSACTION_STATUSES.APPROVED] = 'success', _transactionStatusTex[constants.TRANSACTION_STATUSES.ARCHIVED] = '', _transactionStatusTex);
9
9
 
10
- exports.default = transactionStatusTextClasses;
10
+ exports["default"] = transactionStatusTextClasses;
@@ -2,34 +2,36 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
-
5
+ var _get = require('lodash/get');
7
6
  var constants = require('./constants.js');
8
- var _get = _interopDefault(require('lodash/get'));
9
7
  var funders = require('./funders.js');
10
8
 
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ var _get__default = /*#__PURE__*/_interopDefaultLegacy(_get);
12
+
11
13
  function getOverrideStatus(transaction, defaultStatus) {
12
14
  var status = defaultStatus;
13
15
 
14
- if (funders.isMedicare(_get(transaction, 'claims[0].funder.code'))) {
15
- var isClaimRejected = _get(transaction, 'claims[0].status') === constants.TRANSACTION_STATUSES.REJECTED;
16
+ if (funders.isMedicare(_get__default["default"](transaction, 'claims[0].funder.code'))) {
17
+ var isClaimRejected = _get__default["default"](transaction, 'claims[0].status') === constants.TRANSACTION_STATUSES.REJECTED;
16
18
  var isTransactionCompleted = transaction.status === constants.TRANSACTION_STATUSES.COMPLETED;
17
19
 
18
- var hasMedicareErrored = _get(transaction, 'medicare.hasFatalError');
20
+ var hasMedicareErrored = _get__default["default"](transaction, 'medicare.hasFatalError');
19
21
 
20
22
  if (isClaimRejected && isTransactionCompleted && !hasMedicareErrored) {
21
23
  status = constants.TRANSACTION_STATUSES.UNDER_REVIEW;
22
24
  }
23
25
 
24
- var isClaimPending = _get(transaction, 'claims[0].status') === constants.TRANSACTION_STATUSES.PENDING && transaction.status !== constants.TRANSACTION_STATUSES.CANCELLED;
26
+ var isClaimPending = _get__default["default"](transaction, 'claims[0].status') === constants.TRANSACTION_STATUSES.PENDING && transaction.status !== constants.TRANSACTION_STATUSES.CANCELLED;
25
27
 
26
28
  if (isClaimPending) {
27
29
  status = constants.TRANSACTION_STATUSES.PENDING;
28
30
  }
29
31
  }
30
32
 
31
- if (funders.isIcare(_get(transaction, 'claims[0].funder.code')) && _get(transaction, '_schemaVersion') === '2') {
32
- var _isClaimPending = _get(transaction, 'status') === constants.TRANSACTION_STATUSES.PENDING;
33
+ if (funders.isIcare(_get__default["default"](transaction, 'claims[0].funder.code')) && _get__default["default"](transaction, '_schemaVersion') === '2') {
34
+ var _isClaimPending = _get__default["default"](transaction, 'status') === constants.TRANSACTION_STATUSES.PENDING;
33
35
 
34
36
  if (_isClaimPending) {
35
37
  status = constants.TRANSACTION_STATUSES.SUBMITTED;
package/tsconfig.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "baseUrl": "src",
23
23
  "outDir": ".",
24
24
  "typeRoots" : ["node_modules/@types", "types"],
25
- "types": ["jest"],
25
+ "types": ["jest", "node",],
26
26
  "forceConsistentCasingInFileNames": true,
27
27
  "declaration": true
28
28
  },