@medipass/utils 11.81.0 → 11.81.2-feature-pnpm-take-2.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 (98) hide show
  1. package/abn.js +21 -26
  2. package/babel.config.js +2 -2
  3. package/{billable-items-f8291b1e.js → billable-items-5e559447.js} +1 -1
  4. package/build-validation-schema.js +369 -376
  5. package/{businesses-e02c0f4b.js → businesses-073d1417.js} +1 -1
  6. package/chart.js +25 -26
  7. package/claim-payment-status-formatted.js +7 -4
  8. package/claim-payment-status-icons.js +14 -3
  9. package/claim-payment-status-text-classes.js +15 -3
  10. package/constants.js +76 -65
  11. package/countries.js +6 -8
  12. package/datetime.js +18 -17
  13. package/document-types-formatted.js +10 -5
  14. package/document-types-icons.js +5 -3
  15. package/document-types-text-classes.js +6 -3
  16. package/documents/workflow-state-formatted-text-classes.js +14 -5
  17. package/documents/workflow-state-formatted.js +19 -8
  18. package/documents/workflow-state-icons.js +12 -3
  19. package/form-applications/assign-values-to-sections.js +20 -23
  20. package/{forms-e1c51a53.js → forms-646810f2.js} +1 -1
  21. package/funders.js +25 -54
  22. package/get-env.js +60 -102
  23. package/get-select-options.js +30 -45
  24. package/get-staff-type-display-name.js +4 -6
  25. package/google-addresses.js +60 -101
  26. package/{health-fund-accounts-88eac93c.js → health-fund-accounts-8eda8621.js} +1 -1
  27. package/{health-fund-settings-e7a0f2ec.js → health-fund-settings-6d803913.js} +1 -1
  28. package/{health-funds-7fea63a0.js → health-funds-5e838942.js} +2 -2
  29. package/i18n/index.js +34 -34
  30. package/i18n/translations.js +3 -3
  31. package/index.js +40 -42
  32. package/intercom.js +39 -80
  33. package/masked.js +32 -41
  34. package/{members-8eb8d8d0.js → members-e1797829.js} +1 -1
  35. package/{modalities-2dfbea63.js → modalities-d9979fa4.js} +1 -1
  36. package/package.json +10 -11
  37. package/parse-health-fund-card-fields.js +7 -9
  38. package/{patients-dd3709c1.js → patients-aba388c0.js} +1 -1
  39. package/{payment-methods-d36bc018.js → payment-methods-4010f9e5.js} +1 -1
  40. package/payment-options.js +22 -43
  41. package/{practices-d6c480f1.js → practices-17c06e6c.js} +5 -5
  42. package/{products-0a392564.js → products-7054c705.js} +2 -2
  43. package/products.js +10 -15
  44. package/{professional-categories-157d1767.js → professional-categories-0927144e.js} +1 -1
  45. package/redux-actions.js +93 -128
  46. package/redux-reducer.js +80 -83
  47. package/sanitise-url.js +7 -5
  48. package/scroll.js +6 -6
  49. package/sensitive-keys.js +3 -3
  50. package/sentry.js +82 -78
  51. package/service-items.js +91 -125
  52. package/{services-f8480eba.js → services-a81b505c.js} +3 -3
  53. package/{specialties-25fbb171.js → specialties-c29f2f67.js} +1 -1
  54. package/{staff-646053b7.js → staff-fedb5a08.js} +4 -4
  55. package/status-icons.js +13 -3
  56. package/status-text-classes.js +13 -3
  57. package/{subscriptions-aef302aa.js → subscriptions-25d86dab.js} +5 -5
  58. package/test-framework/fixtures/accounts.js +1 -1
  59. package/test-framework/fixtures/billable-items.js +2 -2
  60. package/test-framework/fixtures/businesses.js +2 -2
  61. package/test-framework/fixtures/documents.js +3 -3
  62. package/test-framework/fixtures/form-application-templates.js +1 -1
  63. package/test-framework/fixtures/form-applications.js +1 -1
  64. package/test-framework/fixtures/forms.js +2 -2
  65. package/test-framework/fixtures/health-fund-accounts.js +2 -2
  66. package/test-framework/fixtures/health-fund-settings.js +2 -2
  67. package/test-framework/fixtures/health-funds.js +3 -3
  68. package/test-framework/fixtures/index.js +38 -38
  69. package/test-framework/fixtures/members.js +2 -2
  70. package/test-framework/fixtures/message-mappings.js +1 -1
  71. package/test-framework/fixtures/modalities.js +2 -2
  72. package/test-framework/fixtures/patients.js +2 -2
  73. package/test-framework/fixtures/payment-methods.js +2 -2
  74. package/test-framework/fixtures/practices.js +4 -4
  75. package/test-framework/fixtures/products.js +3 -3
  76. package/test-framework/fixtures/professional-categories.js +2 -2
  77. package/test-framework/fixtures/services.js +4 -4
  78. package/test-framework/fixtures/specialties.js +2 -2
  79. package/test-framework/fixtures/staff.js +5 -5
  80. package/test-framework/fixtures/subscriptions.js +6 -6
  81. package/test-framework/fixtures/transaction-reports.js +6 -6
  82. package/test-framework/fixtures/transactions.js +14 -14
  83. package/test-framework/fixtures/workflow-exceptions.js +2 -2
  84. package/transaction-details-by-funder.js +20 -20
  85. package/transaction-status-formatted.js +15 -5
  86. package/transaction-status-helpers.js +39 -40
  87. package/transaction-status-icons.js +10 -3
  88. package/transaction-status-text-classes.js +17 -3
  89. package/transaction-status.js +14 -19
  90. package/{transactions-de03f65c.js → transactions-92589d19.js} +13 -13
  91. package/tsconfig.json +1 -1
  92. package/validate-form.js +156 -324
  93. package/validate.js +48 -40
  94. package/webpack-config.js +15 -19
  95. package/workflow-state-formatted-text-classes.js +13 -5
  96. package/workflow-state-formatted.js +11 -6
  97. package/test-framework/react.d.ts +0 -8
  98. package/test-framework/react.js +0 -39
package/abn.js CHANGED
@@ -2,46 +2,41 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var ABN_LENGTH = 11;
6
- var normaliseAbn = function normaliseAbn(abn) {
7
- var trimmedABN = abn == null ? void 0 : abn.replace(/\s/g, ''); // The input is an ABN, in which case the format should be 99 999 999 999
5
+ const ABN_LENGTH = 11;
6
+ const normaliseAbn = abn => {
7
+ const trimmedABN = abn == null ? void 0 : abn.replace(/\s/g, '');
8
8
 
9
+ // The input is an ABN, in which case the format should be 99 999 999 999
9
10
  if (trimmedABN.length === ABN_LENGTH) {
10
11
  return trimmedABN.substring(0, 2) + ' ' + trimmedABN.substring(2, 5) + ' ' + trimmedABN.substring(5, 8) + ' ' + trimmedABN.substring(8);
11
12
  }
12
-
13
13
  return abn;
14
14
  };
15
- var isValidAbn = function isValidAbn(abn) {
16
- var VALID_ABN_LENGTH = 11; // strip whitespace from value
15
+ const isValidAbn = abn => {
16
+ const VALID_ABN_LENGTH = 11;
17
17
 
18
+ // strip whitespace from value
18
19
  abn = String(abn).replace(/\s+/g, '');
19
-
20
20
  if (abn.length === VALID_ABN_LENGTH) {
21
- var weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
22
- var abnArray = [];
23
-
24
- for (var i = 0; i < abn.length; i++) {
21
+ const weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
22
+ const abnArray = [];
23
+ for (let i = 0; i < abn.length; i++) {
25
24
  abnArray[i] = abn.charAt(i);
26
- } // subtract 1 from the left-most digit
25
+ }
26
+ // subtract 1 from the left-most digit
27
27
  // @ts-expect-error TS(2362): The left-hand side of an arithmetic operation must... Remove this comment to see the full error message
28
-
29
-
30
- abnArray[0] -= 1; // multiply each of the digits by its weighting factor
31
-
32
- for (var _i = 0; _i < abnArray.length; _i++) {
28
+ abnArray[0] -= 1;
29
+ // multiply each of the digits by its weighting factor
30
+ for (let i = 0; i < abnArray.length; i++) {
33
31
  // @ts-expect-error TS(2362): The left-hand side of an arithmetic operation must... Remove this comment to see the full error message
34
- abnArray[_i] *= weights[_i];
35
- } // sum all the digits
36
-
37
-
38
- var abnSum = 0;
39
-
40
- for (var _i2 = 0; _i2 < abnArray.length; _i2++) {
32
+ abnArray[i] *= weights[i];
33
+ }
34
+ // sum all the digits
35
+ let abnSum = 0;
36
+ for (let i = 0; i < abnArray.length; i++) {
41
37
  // @ts-expect-error TS(2322): Type 'string' is not assignable to type 'number'.
42
- abnSum += abnArray[_i2];
38
+ abnSum += abnArray[i];
43
39
  }
44
-
45
40
  return abnSum % 89 === 0;
46
41
  } else {
47
42
  return false;
package/babel.config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
2
  extends: '../../babel.config.js',
3
- plugins: ['@babel/plugin-transform-runtime', '@babel/plugin-transform-typescript'],
4
- presets: ['@babel/preset-typescript']
3
+ presets: ['@babel/preset-typescript'],
4
+ plugins: []
5
5
  };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var defaultBillableItem = {
3
+ const defaultBillableItem = {
4
4
  _id: 'billableItemDefaultId',
5
5
  organisationId: 'organisationDefaultId',
6
6
  businessId: 'businessDefaultId',