@medipass/utils 11.70.0 → 11.71.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.
Files changed (136) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.cjs +3 -0
  3. package/CHANGELOG.md +11 -0
  4. package/{billable-items-01050ba2.js → billable-items-f8291b1e.js} +0 -0
  5. package/build-validation-schema.js +14 -1
  6. package/{businesses-e3a20604.js → businesses-2633ab9b.js} +0 -0
  7. package/chart.js +2 -0
  8. package/{forms-f06ca97e.js → forms-e1c51a53.js} +0 -0
  9. package/get-select-options.js +1 -0
  10. package/google-addresses.js +17 -7
  11. package/{health-fund-accounts-3cd8650f.js → health-fund-accounts-88eac93c.js} +0 -0
  12. package/{health-fund-settings-43327826.js → health-fund-settings-e7a0f2ec.js} +0 -0
  13. package/{health-funds-300facef.js → health-funds-7fea63a0.js} +0 -0
  14. package/intercom.js +7 -2
  15. package/lib/__tests__/get-env.test.d.ts +1 -0
  16. package/lib/__tests__/get-staff-type-display-name.test.d.ts +1 -0
  17. package/lib/__tests__/redux-actions.test.d.ts +1 -0
  18. package/lib/__tests__/redux-reducer.test.d.ts +1 -0
  19. package/lib/__tests__/validate.test.d.ts +1 -0
  20. package/lib/build-validation-schema.d.ts +149 -0
  21. package/lib/chart.d.ts +9 -0
  22. package/lib/claim-payment-status-formatted.d.ts +6 -0
  23. package/lib/claim-payment-status-icons.d.ts +4 -0
  24. package/lib/claim-payment-status-text-classes.d.ts +4 -0
  25. package/lib/constants.d.ts +325 -0
  26. package/lib/countries.d.ts +10 -0
  27. package/lib/datetime.d.ts +2 -0
  28. package/lib/document-types-formatted.d.ts +9 -0
  29. package/lib/document-types-icons.d.ts +4 -0
  30. package/lib/document-types-text-classes.d.ts +4 -0
  31. package/lib/documents/workflow-state-formatted-text-classes.d.ts +6 -0
  32. package/lib/documents/workflow-state-formatted.d.ts +6 -0
  33. package/lib/documents/workflow-state-icons.d.ts +5 -0
  34. package/lib/form-applications/assign-values-to-sections.d.ts +5 -0
  35. package/lib/funders.d.ts +20 -0
  36. package/lib/get-env.d.ts +22 -0
  37. package/lib/get-select-options.d.ts +9 -0
  38. package/lib/get-staff-type-display-name.d.ts +2 -0
  39. package/lib/google-addresses.d.ts +3 -0
  40. package/lib/i18n/index.d.ts +8 -0
  41. package/lib/i18n/translations.d.ts +28 -0
  42. package/lib/index.d.ts +47 -0
  43. package/lib/intercom.d.ts +16 -0
  44. package/lib/normalise-abn.d.ts +2 -0
  45. package/lib/parse-health-fund-card-fields.d.ts +2 -0
  46. package/lib/payment-options.d.ts +13 -0
  47. package/lib/products.d.ts +4 -0
  48. package/lib/redux-actions.d.ts +35 -0
  49. package/lib/redux-reducer.d.ts +24 -0
  50. package/lib/sanitise-url.d.ts +4 -0
  51. package/lib/scroll.d.ts +2 -0
  52. package/lib/sensitive-keys.d.ts +3 -0
  53. package/lib/sentry.d.ts +15 -0
  54. package/lib/service-items.d.ts +37 -0
  55. package/lib/status-icons.d.ts +4 -0
  56. package/lib/status-text-classes.d.ts +4 -0
  57. package/lib/test-framework/fixtures/accounts.d.ts +28 -0
  58. package/lib/test-framework/fixtures/billable-items.d.ts +17 -0
  59. package/lib/test-framework/fixtures/businesses.d.ts +43 -0
  60. package/lib/test-framework/fixtures/documents.d.ts +113 -0
  61. package/lib/test-framework/fixtures/form-application-templates.d.ts +66 -0
  62. package/lib/test-framework/fixtures/form-applications.d.ts +30 -0
  63. package/lib/test-framework/fixtures/forms.d.ts +41 -0
  64. package/lib/test-framework/fixtures/health-fund-accounts.d.ts +10 -0
  65. package/lib/test-framework/fixtures/health-fund-settings.d.ts +12 -0
  66. package/lib/test-framework/fixtures/health-funds.d.ts +90 -0
  67. package/lib/test-framework/fixtures/index.d.ts +39 -0
  68. package/lib/test-framework/fixtures/members.d.ts +43 -0
  69. package/lib/test-framework/fixtures/message-mappings.d.ts +19 -0
  70. package/lib/test-framework/fixtures/modalities.d.ts +9 -0
  71. package/lib/test-framework/fixtures/patients.d.ts +36 -0
  72. package/lib/test-framework/fixtures/payment-methods.d.ts +16 -0
  73. package/lib/test-framework/fixtures/practices.d.ts +105 -0
  74. package/lib/test-framework/fixtures/products.d.ts +46 -0
  75. package/lib/test-framework/fixtures/professional-categories.d.ts +9 -0
  76. package/lib/test-framework/fixtures/services.d.ts +93 -0
  77. package/lib/test-framework/fixtures/specialties.d.ts +10 -0
  78. package/lib/test-framework/fixtures/staff.d.ts +139 -0
  79. package/lib/test-framework/fixtures/subscriptions.d.ts +142 -0
  80. package/lib/test-framework/fixtures/transaction-reports.d.ts +156 -0
  81. package/lib/test-framework/fixtures/transactions.d.ts +1832 -0
  82. package/lib/test-framework/fixtures/workflow-exceptions.d.ts +25 -0
  83. package/lib/test-framework/react.d.ts +8 -0
  84. package/lib/transaction-details-by-funder.d.ts +33 -0
  85. package/lib/transaction-status-formatted.d.ts +9 -0
  86. package/lib/transaction-status-helpers.d.ts +20 -0
  87. package/lib/transaction-status-icons.d.ts +4 -0
  88. package/lib/transaction-status-text-classes.d.ts +4 -0
  89. package/lib/transaction-status.d.ts +1 -0
  90. package/lib/validate-form.d.ts +45 -0
  91. package/lib/validate.d.ts +15 -0
  92. package/lib/webpack-config.d.ts +4 -0
  93. package/lib/workflow-state-formatted-text-classes.d.ts +5 -0
  94. package/lib/workflow-state-formatted.d.ts +4 -0
  95. package/{members-cb4f73a9.js → members-8eb8d8d0.js} +0 -0
  96. package/{modalities-b360d521.js → modalities-2dfbea63.js} +0 -0
  97. package/package.json +9 -6
  98. package/{patients-2083dd9c.js → patients-dd3709c1.js} +0 -0
  99. package/{payment-methods-4fa2d01f.js → payment-methods-d36bc018.js} +0 -0
  100. package/{practices-3e703f22.js → practices-d6c480f1.js} +0 -0
  101. package/{products-bd313cb4.js → products-0a392564.js} +0 -0
  102. package/{professional-categories-e2e5284b.js → professional-categories-157d1767.js} +0 -0
  103. package/redux-actions.js +13 -3
  104. package/redux-reducer.js +1 -0
  105. package/sentry.js +3 -1
  106. package/service-items.js +5 -34
  107. package/{services-2e25cdac.js → services-f8480eba.js} +0 -0
  108. package/{specialties-7640b7e3.js → specialties-25fbb171.js} +0 -0
  109. package/{staff-990794cd.js → staff-646053b7.js} +0 -0
  110. package/{subscriptions-45c1321a.js → subscriptions-aef302aa.js} +0 -0
  111. package/test-framework/fixtures/billable-items.js +1 -1
  112. package/test-framework/fixtures/businesses.js +1 -1
  113. package/test-framework/fixtures/forms.js +1 -1
  114. package/test-framework/fixtures/health-fund-accounts.js +1 -1
  115. package/test-framework/fixtures/health-fund-settings.js +1 -1
  116. package/test-framework/fixtures/health-funds.js +1 -1
  117. package/test-framework/fixtures/index.js +18 -18
  118. package/test-framework/fixtures/members.js +1 -1
  119. package/test-framework/fixtures/modalities.js +1 -1
  120. package/test-framework/fixtures/patients.js +1 -1
  121. package/test-framework/fixtures/payment-methods.js +1 -1
  122. package/test-framework/fixtures/practices.js +1 -1
  123. package/test-framework/fixtures/products.js +1 -1
  124. package/test-framework/fixtures/professional-categories.js +1 -1
  125. package/test-framework/fixtures/services.js +1 -1
  126. package/test-framework/fixtures/specialties.js +1 -1
  127. package/test-framework/fixtures/staff.js +1 -1
  128. package/test-framework/fixtures/subscriptions.js +1 -1
  129. package/test-framework/fixtures/transactions.js +1 -1
  130. package/transaction-details-by-funder.js +1 -0
  131. package/transaction-status.js +2 -2
  132. package/{transactions-6e5fd92d.js → transactions-4a08e450.js} +0 -0
  133. package/tsconfig.json +32 -0
  134. package/validate-form.js +3 -3
  135. package/.eslintrc +0 -3
  136. package/blah.js +0 -2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var transactions = require('../../transactions-6e5fd92d.js');
5
+ var transactions = require('../../transactions-4a08e450.js');
6
6
 
7
7
 
8
8
 
@@ -68,6 +68,7 @@ var funderSections = Object.freeze({
68
68
  * Default to section support if no funder code is provided, to allow patient claims to be
69
69
  * supported for all sections.
70
70
  */
71
+ // @ts-expect-error TS(1016): A required parameter cannot follow an optional par... Remove this comment to see the full error message
71
72
 
72
73
  var isFunderSectionSupported = function isFunderSectionSupported(funderCode, section) {
73
74
  if (!funderCode || !funderSections[funderCode]) {
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
6
 
7
+ var constants = require('./constants.js');
7
8
  var _get = _interopDefault(require('lodash/get'));
8
- var constants = require('@medipass/utils/constants');
9
- var funders = require('@medipass/utils/funders');
9
+ var funders = require('./funders.js');
10
10
 
11
11
  function getOverrideStatus(transaction, defaultStatus) {
12
12
  var status = defaultStatus;
package/tsconfig.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2019",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Node",
6
+ "lib": [
7
+ "ESNext",
8
+ "ESNext.AsyncIterable",
9
+ "DOM"
10
+ ],
11
+ "allowJs": true,
12
+ "skipLibCheck": true,
13
+ "esModuleInterop": true,
14
+ "allowSyntheticDefaultImports": true,
15
+ "experimentalDecorators": true,
16
+ "strict": false,
17
+ "resolveJsonModule": true,
18
+ "isolatedModules": true,
19
+ "jsx": "react",
20
+ "rootDir": "src",
21
+ "baseUrl": "src",
22
+ "outDir": "lib",
23
+ "typeRoots" : ["node_modules/@types", "types"],
24
+ "types": ["jest"],
25
+ "forceConsistentCasingInFileNames": true,
26
+ "declaration": true
27
+ },
28
+ "include": ["src", "types"],
29
+ "exclude": [
30
+ "node_modules"
31
+ ]
32
+ }
package/validate-form.js CHANGED
@@ -74,17 +74,17 @@ var isLengthWithSpacesGreaterThanOrEqualTo = function isLengthWithSpacesGreaterT
74
74
  };
75
75
  var isGreaterThanOrEqualTo = function isGreaterThanOrEqualTo(length) {
76
76
  return function (value) {
77
- return !value || parseFloat(value, 10) >= length ? undefined : "Must be greater than or equal to " + length;
77
+ return !value || parseFloat(value) >= length ? undefined : "Must be greater than or equal to " + length;
78
78
  };
79
79
  };
80
80
  var isGreaterThan = function isGreaterThan(length) {
81
81
  return function (value) {
82
- return !value || parseFloat(value, 10) > length ? undefined : "Must be greater than " + length;
82
+ return !value || parseFloat(value) > length ? undefined : "Must be greater than " + length;
83
83
  };
84
84
  };
85
85
  var isLessThanOrEqualTo = function isLessThanOrEqualTo(length) {
86
86
  return function (value) {
87
- return !value || parseFloat(value, 10) <= length ? undefined : "Must be less than or equal to " + length;
87
+ return !value || parseFloat(value) <= length ? undefined : "Must be less than or equal to " + length;
88
88
  };
89
89
  };
90
90
  var hasUppercaseLetter = function hasUppercaseLetter(value) {
package/.eslintrc DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": ["../../.eslintrc.json"]
3
- }
package/blah.js DELETED
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-