@medipass/utils 11.79.2-chore-settlement-form-validations.0 → 11.79.2-chore-environment-variables.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 (96) hide show
  1. package/env.d.ts +10 -0
  2. package/package.json +2 -2
  3. package/validate-form.d.ts +0 -3
  4. package/abn.js +0 -92
  5. package/billable-items-f8291b1e.js +0 -27
  6. package/build-validation-schema.js +0 -1315
  7. package/businesses-2633ab9b.js +0 -53
  8. package/chart.js +0 -51
  9. package/claim-payment-status-formatted.js +0 -12
  10. package/claim-payment-status-icons.js +0 -10
  11. package/claim-payment-status-text-classes.js +0 -10
  12. package/constants.js +0 -445
  13. package/countries.js +0 -1011
  14. package/datetime.js +0 -37
  15. package/document-types-formatted.js +0 -13
  16. package/document-types-icons.js +0 -10
  17. package/document-types-text-classes.js +0 -10
  18. package/documents/workflow-state-formatted-text-classes.js +0 -12
  19. package/documents/workflow-state-formatted.js +0 -15
  20. package/documents/workflow-state-icons.js +0 -10
  21. package/form-applications/assign-values-to-sections.js +0 -34
  22. package/forms-e1c51a53.js +0 -51
  23. package/funders.js +0 -111
  24. package/get-env.js +0 -221
  25. package/get-select-options.js +0 -67
  26. package/get-staff-type-display-name.js +0 -13
  27. package/google-addresses.js +0 -141
  28. package/health-fund-accounts-88eac93c.js +0 -20
  29. package/health-fund-settings-e7a0f2ec.js +0 -22
  30. package/health-funds-7fea63a0.js +0 -194
  31. package/i18n/index.js +0 -61
  32. package/i18n/translations.js +0 -36
  33. package/index.js +0 -57
  34. package/intercom.js +0 -111
  35. package/members-8eb8d8d0.js +0 -53
  36. package/modalities-2dfbea63.js +0 -19
  37. package/parse-health-fund-card-fields.js +0 -15
  38. package/patients-dd3709c1.js +0 -46
  39. package/payment-methods-d36bc018.js +0 -26
  40. package/payment-options.js +0 -62
  41. package/practices-d6c480f1.js +0 -87
  42. package/products-0a392564.js +0 -83
  43. package/products.js +0 -31
  44. package/professional-categories-157d1767.js +0 -19
  45. package/redux-actions.js +0 -184
  46. package/redux-reducer.js +0 -124
  47. package/sanitise-url.js +0 -19
  48. package/scroll.js +0 -12
  49. package/sensitive-keys.js +0 -9
  50. package/sentry.js +0 -120
  51. package/service-items.js +0 -231
  52. package/services-f8480eba.js +0 -127
  53. package/specialties-25fbb171.js +0 -20
  54. package/staff-646053b7.js +0 -161
  55. package/status-icons.js +0 -10
  56. package/status-text-classes.js +0 -10
  57. package/subscriptions-aef302aa.js +0 -160
  58. package/test-framework/fixtures/accounts.js +0 -34
  59. package/test-framework/fixtures/billable-items.js +0 -9
  60. package/test-framework/fixtures/businesses.js +0 -9
  61. package/test-framework/fixtures/documents.js +0 -118
  62. package/test-framework/fixtures/form-application-templates.js +0 -74
  63. package/test-framework/fixtures/form-applications.js +0 -39
  64. package/test-framework/fixtures/forms.js +0 -9
  65. package/test-framework/fixtures/health-fund-accounts.js +0 -9
  66. package/test-framework/fixtures/health-fund-settings.js +0 -9
  67. package/test-framework/fixtures/health-funds.js +0 -10
  68. package/test-framework/fixtures/index.js +0 -45
  69. package/test-framework/fixtures/members.js +0 -9
  70. package/test-framework/fixtures/message-mappings.js +0 -61
  71. package/test-framework/fixtures/modalities.js +0 -9
  72. package/test-framework/fixtures/patients.js +0 -9
  73. package/test-framework/fixtures/payment-methods.js +0 -9
  74. package/test-framework/fixtures/practices.js +0 -11
  75. package/test-framework/fixtures/products.js +0 -10
  76. package/test-framework/fixtures/professional-categories.js +0 -9
  77. package/test-framework/fixtures/services.js +0 -11
  78. package/test-framework/fixtures/specialties.js +0 -9
  79. package/test-framework/fixtures/staff.js +0 -12
  80. package/test-framework/fixtures/subscriptions.js +0 -13
  81. package/test-framework/fixtures/transaction-reports.js +0 -241
  82. package/test-framework/fixtures/transactions.js +0 -21
  83. package/test-framework/fixtures/workflow-exceptions.js +0 -32
  84. package/test-framework/react.js +0 -39
  85. package/transaction-details-by-funder.js +0 -80
  86. package/transaction-status-formatted.js +0 -13
  87. package/transaction-status-helpers.js +0 -81
  88. package/transaction-status-icons.js +0 -10
  89. package/transaction-status-text-classes.js +0 -10
  90. package/transaction-status.js +0 -42
  91. package/transactions-de03f65c.js +0 -1757
  92. package/validate-form.js +0 -463
  93. package/validate.js +0 -64
  94. package/webpack-config.js +0 -30
  95. package/workflow-state-formatted-text-classes.js +0 -12
  96. package/workflow-state-formatted.js +0 -13
package/env.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export declare const REACT_APP_ENV: string | undefined;
2
+ export declare const REACT_APP_ERROR_MESSAGE__INTERNET_ERROR: string | undefined;
3
+ export declare const REACT_APP_ERROR_MESSAGE__NETWORK_ERROR: string | undefined;
4
+ export declare const REACT_APP_ERROR_MESSAGE__SERVER_ERROR: string | undefined;
5
+ export declare const REACT_APP_ERROR_MESSAGE__PAYMENT_GATEWAY_ERROR: string | undefined;
6
+ export declare const REACT_APP_ERROR_MESSAGE__PAYMENT_ERROR: string | undefined;
7
+ export declare const REACT_APP_ERROR_MESSAGE__PAYMENT_GATEWAY_FIELDS: string | undefined;
8
+ export declare const REACT_APP_REGION: string | undefined;
9
+ export declare const REACT_APP_LOCAL_PORT: string | undefined;
10
+ export declare const BABEL_RUNTIME: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medipass/utils",
3
- "version": "11.79.2-chore-settlement-form-validations.0",
3
+ "version": "11.79.2-chore-environment-variables.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -52,5 +52,5 @@
52
52
  "rimraf": "^2.6.2",
53
53
  "typescript": "4.8.4"
54
54
  },
55
- "gitHead": "11f973f6d67bcd9adad1eacbf3d8a2a92c088d35"
55
+ "gitHead": "19111b430bededfbe231bd4410e88f48302de371"
56
56
  }
@@ -1,6 +1,3 @@
1
- export declare const IS_VALID_BANK_ACCOUNT_NAME_REGEX: RegExp;
2
- export declare const IS_VALID_NUMBER_REGEX: RegExp;
3
- export declare const IS_VALID_MEDIBANK_PROVIDER_NUMBER_REGEX: RegExp;
4
1
  export declare const isRequired: (value: any) => "This field is required" | undefined;
5
2
  export declare const isNumber: (value: any) => "This field must only contain numbers" | undefined;
6
3
  export declare const isEqualTo: (target: any, message?: string) => (value: any) => string | undefined;
package/abn.js DELETED
@@ -1,92 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var ABN_LENGTH = 11;
6
- var ACN_LENGTH = 9;
7
- var normaliseAbn = function normaliseAbn(abn) {
8
- 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
9
-
10
- if (trimmedABN.length === ABN_LENGTH) {
11
- return trimmedABN.substring(0, 2) + ' ' + trimmedABN.substring(2, 5) + ' ' + trimmedABN.substring(5, 8) + ' ' + trimmedABN.substring(8);
12
- } //The input is an ACN, in which case the format should be 999 999 999
13
-
14
-
15
- if (trimmedABN.length === ACN_LENGTH) {
16
- return trimmedABN.substring(0, 3) + ' ' + trimmedABN.substring(3, 6) + ' ' + trimmedABN.substring(6);
17
- }
18
-
19
- return abn;
20
- };
21
- var isValidAbn = function isValidAbn(abn) {
22
- var VALID_ABN_LENGTH = 11; // strip whitespace from value
23
-
24
- abn = String(abn).replace(/\s+/g, '');
25
-
26
- if (abn.length === VALID_ABN_LENGTH) {
27
- var weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
28
- var abnArray = [];
29
-
30
- for (var i = 0; i < abn.length; i++) {
31
- abnArray[i] = abn.charAt(i);
32
- } // subtract 1 from the left-most digit
33
- // @ts-expect-error TS(2362): The left-hand side of an arithmetic operation must... Remove this comment to see the full error message
34
-
35
-
36
- abnArray[0] -= 1; // multiply each of the digits by its weighting factor
37
-
38
- for (var _i = 0; _i < abnArray.length; _i++) {
39
- // @ts-expect-error TS(2362): The left-hand side of an arithmetic operation must... Remove this comment to see the full error message
40
- abnArray[_i] *= weights[_i];
41
- } // sum all the digits
42
-
43
-
44
- var abnSum = 0;
45
-
46
- for (var _i2 = 0; _i2 < abnArray.length; _i2++) {
47
- // @ts-expect-error TS(2322): Type 'string' is not assignable to type 'number'.
48
- abnSum += abnArray[_i2];
49
- }
50
-
51
- return abnSum % 89 === 0;
52
- } else {
53
- return false;
54
- }
55
- };
56
- var isValidAcn = function isValidAcn(acn) {
57
- var VALID_ACN_LENGTH = 9; // strip whitespace from value
58
-
59
- acn = String(acn).replace(/\s+/g, '');
60
-
61
- if (acn.length === VALID_ACN_LENGTH) {
62
- var weights = [8, 7, 6, 5, 4, 3, 2, 1];
63
- var acnArray = [];
64
-
65
- for (var i = 0; i < acn.length; i++) {
66
- acnArray[i] = parseInt(acn.charAt(i));
67
- }
68
-
69
- var acnSum = 0; // sum the digits 1-8
70
-
71
- for (var _i3 = 0; _i3 < weights.length; _i3++) {
72
- acnSum = acnSum + acnArray[_i3] * weights[_i3];
73
- } // divide by 10 and take remainder
74
-
75
-
76
- var remainder = acnSum % 10; // complement the remainder to 10
77
-
78
- var complement = 10 - remainder; // if the complement equals 10, set it to 0
79
-
80
- if (complement === 10) {
81
- complement = 0;
82
- }
83
-
84
- return acnArray[8] === complement;
85
- } else {
86
- return false;
87
- }
88
- };
89
-
90
- exports.isValidAbn = isValidAbn;
91
- exports.isValidAcn = isValidAcn;
92
- exports.normaliseAbn = normaliseAbn;
@@ -1,27 +0,0 @@
1
- 'use strict';
2
-
3
- var defaultBillableItem = {
4
- _id: 'billableItemDefaultId',
5
- organisationId: 'organisationDefaultId',
6
- businessId: 'businessDefaultId',
7
- practiceId: 'practiceDefaultId',
8
- modalityId: 'modalityDefaultId',
9
- staffId: 'staffPractitionerDefaultId',
10
- itemCode: 'mockItemCode',
11
- fullName: 'mockFullName',
12
- displayName: 'mockDisplayName',
13
- description: 'mockDescription',
14
- price: 4000,
15
- searchWords: ['mockitemcode', 'mockfullname', 'mockdisplayname'],
16
- status: 'ACTIVE',
17
- created: new Date('2015-01-01T00:00:00'),
18
- modified: new Date('2015-01-02T00:00:00Z')
19
- };
20
-
21
- var billableItems = /*#__PURE__*/Object.freeze({
22
- __proto__: null,
23
- defaultBillableItem: defaultBillableItem
24
- });
25
-
26
- exports.billableItems = billableItems;
27
- exports.defaultBillableItem = defaultBillableItem;