@medipass/utils 11.69.3-feature-migrate-utils-to-ts.1 → 11.70.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.
- package/.eslintrc +3 -0
- package/CHANGELOG.md +11 -0
- package/{billable-items-f8291b1e.js → billable-items-01050ba2.js} +0 -0
- package/blah.js +2 -0
- package/build-validation-schema.js +1 -14
- package/{businesses-2633ab9b.js → businesses-e3a20604.js} +0 -0
- package/chart.js +0 -2
- package/constants.js +9 -0
- package/{forms-e1c51a53.js → forms-f06ca97e.js} +0 -0
- package/get-select-options.js +0 -1
- package/google-addresses.js +7 -17
- package/{health-fund-accounts-88eac93c.js → health-fund-accounts-3cd8650f.js} +0 -0
- package/{health-fund-settings-e7a0f2ec.js → health-fund-settings-43327826.js} +0 -0
- package/{health-funds-7fea63a0.js → health-funds-300facef.js} +0 -0
- package/intercom.js +2 -7
- package/{members-8eb8d8d0.js → members-cb4f73a9.js} +0 -0
- package/{modalities-2dfbea63.js → modalities-b360d521.js} +0 -0
- package/package.json +6 -9
- package/{patients-dd3709c1.js → patients-2083dd9c.js} +0 -0
- package/{payment-methods-d36bc018.js → payment-methods-4fa2d01f.js} +0 -0
- package/{practices-d6c480f1.js → practices-3e703f22.js} +0 -0
- package/{products-0a392564.js → products-bd313cb4.js} +0 -0
- package/{professional-categories-157d1767.js → professional-categories-e2e5284b.js} +0 -0
- package/redux-actions.js +3 -13
- package/redux-reducer.js +0 -1
- package/sentry.js +1 -3
- package/service-items.js +34 -5
- package/{services-f8480eba.js → services-2e25cdac.js} +0 -0
- package/{specialties-25fbb171.js → specialties-7640b7e3.js} +0 -0
- package/{staff-646053b7.js → staff-990794cd.js} +0 -0
- package/{subscriptions-aef302aa.js → subscriptions-45c1321a.js} +0 -0
- package/test-framework/fixtures/billable-items.js +1 -1
- package/test-framework/fixtures/businesses.js +1 -1
- package/test-framework/fixtures/forms.js +1 -1
- package/test-framework/fixtures/health-fund-accounts.js +1 -1
- package/test-framework/fixtures/health-fund-settings.js +1 -1
- package/test-framework/fixtures/health-funds.js +1 -1
- package/test-framework/fixtures/index.js +18 -18
- package/test-framework/fixtures/members.js +1 -1
- package/test-framework/fixtures/modalities.js +1 -1
- package/test-framework/fixtures/patients.js +1 -1
- package/test-framework/fixtures/payment-methods.js +1 -1
- package/test-framework/fixtures/practices.js +1 -1
- package/test-framework/fixtures/products.js +1 -1
- package/test-framework/fixtures/professional-categories.js +1 -1
- package/test-framework/fixtures/services.js +1 -1
- package/test-framework/fixtures/specialties.js +1 -1
- package/test-framework/fixtures/staff.js +1 -1
- package/test-framework/fixtures/subscriptions.js +1 -1
- package/test-framework/fixtures/transactions.js +1 -1
- package/transaction-details-by-funder.js +0 -1
- package/transaction-status.js +2 -2
- package/{transactions-4a08e450.js → transactions-6e5fd92d.js} +0 -0
- package/validate-form.js +3 -3
- package/.eslintrc.cjs +0 -3
- package/lib/__tests__/get-env.test.d.ts +0 -1
- package/lib/__tests__/get-staff-type-display-name.test.d.ts +0 -1
- package/lib/__tests__/redux-actions.test.d.ts +0 -1
- package/lib/__tests__/redux-reducer.test.d.ts +0 -1
- package/lib/__tests__/validate.test.d.ts +0 -1
- package/lib/build-validation-schema.d.ts +0 -149
- package/lib/chart.d.ts +0 -9
- package/lib/claim-payment-status-formatted.d.ts +0 -6
- package/lib/claim-payment-status-icons.d.ts +0 -4
- package/lib/claim-payment-status-text-classes.d.ts +0 -4
- package/lib/constants.d.ts +0 -321
- package/lib/countries.d.ts +0 -10
- package/lib/datetime.d.ts +0 -2
- package/lib/document-types-formatted.d.ts +0 -9
- package/lib/document-types-icons.d.ts +0 -4
- package/lib/document-types-text-classes.d.ts +0 -4
- package/lib/documents/workflow-state-formatted-text-classes.d.ts +0 -6
- package/lib/documents/workflow-state-formatted.d.ts +0 -6
- package/lib/documents/workflow-state-icons.d.ts +0 -5
- package/lib/form-applications/assign-values-to-sections.d.ts +0 -5
- package/lib/funders.d.ts +0 -20
- package/lib/get-env.d.ts +0 -22
- package/lib/get-select-options.d.ts +0 -9
- package/lib/get-staff-type-display-name.d.ts +0 -2
- package/lib/google-addresses.d.ts +0 -3
- package/lib/i18n/index.d.ts +0 -8
- package/lib/i18n/translations.d.ts +0 -28
- package/lib/index.d.ts +0 -47
- package/lib/intercom.d.ts +0 -16
- package/lib/normalise-abn.d.ts +0 -2
- package/lib/parse-health-fund-card-fields.d.ts +0 -2
- package/lib/payment-options.d.ts +0 -13
- package/lib/products.d.ts +0 -4
- package/lib/redux-actions.d.ts +0 -35
- package/lib/redux-reducer.d.ts +0 -24
- package/lib/sanitise-url.d.ts +0 -4
- package/lib/scroll.d.ts +0 -2
- package/lib/sensitive-keys.d.ts +0 -3
- package/lib/sentry.d.ts +0 -15
- package/lib/service-items.d.ts +0 -37
- package/lib/status-icons.d.ts +0 -4
- package/lib/status-text-classes.d.ts +0 -4
- package/lib/test-framework/fixtures/accounts.d.ts +0 -28
- package/lib/test-framework/fixtures/billable-items.d.ts +0 -17
- package/lib/test-framework/fixtures/businesses.d.ts +0 -43
- package/lib/test-framework/fixtures/documents.d.ts +0 -113
- package/lib/test-framework/fixtures/form-application-templates.d.ts +0 -66
- package/lib/test-framework/fixtures/form-applications.d.ts +0 -30
- package/lib/test-framework/fixtures/forms.d.ts +0 -41
- package/lib/test-framework/fixtures/health-fund-accounts.d.ts +0 -10
- package/lib/test-framework/fixtures/health-fund-settings.d.ts +0 -12
- package/lib/test-framework/fixtures/health-funds.d.ts +0 -90
- package/lib/test-framework/fixtures/index.d.ts +0 -39
- package/lib/test-framework/fixtures/members.d.ts +0 -43
- package/lib/test-framework/fixtures/message-mappings.d.ts +0 -19
- package/lib/test-framework/fixtures/modalities.d.ts +0 -9
- package/lib/test-framework/fixtures/patients.d.ts +0 -36
- package/lib/test-framework/fixtures/payment-methods.d.ts +0 -16
- package/lib/test-framework/fixtures/practices.d.ts +0 -105
- package/lib/test-framework/fixtures/products.d.ts +0 -46
- package/lib/test-framework/fixtures/professional-categories.d.ts +0 -9
- package/lib/test-framework/fixtures/services.d.ts +0 -93
- package/lib/test-framework/fixtures/specialties.d.ts +0 -10
- package/lib/test-framework/fixtures/staff.d.ts +0 -139
- package/lib/test-framework/fixtures/subscriptions.d.ts +0 -142
- package/lib/test-framework/fixtures/transaction-reports.d.ts +0 -156
- package/lib/test-framework/fixtures/transactions.d.ts +0 -1832
- package/lib/test-framework/fixtures/workflow-exceptions.d.ts +0 -25
- package/lib/test-framework/react.d.ts +0 -8
- package/lib/transaction-details-by-funder.d.ts +0 -33
- package/lib/transaction-status-formatted.d.ts +0 -9
- package/lib/transaction-status-helpers.d.ts +0 -20
- package/lib/transaction-status-icons.d.ts +0 -4
- package/lib/transaction-status-text-classes.d.ts +0 -4
- package/lib/transaction-status.d.ts +0 -1
- package/lib/validate-form.d.ts +0 -45
- package/lib/validate.d.ts +0 -15
- package/lib/webpack-config.d.ts +0 -4
- package/lib/workflow-state-formatted-text-classes.d.ts +0 -5
- package/lib/workflow-state-formatted.d.ts +0 -4
- package/tsconfig.json +0 -32
package/.eslintrc
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [11.70.0](https://github.com/medipass/web-medicules/compare/@medipass/utils@11.69.2...@medipass/utils@11.70.0) (2022-10-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **react-core:** add suspend modal ([#696](https://github.com/medipass/web-medicules/issues/696)) ([3857f2b](https://github.com/medipass/web-medicules/commit/3857f2b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [11.69.2](https://github.com/medipass/web-medicules/compare/@medipass/utils@11.69.1...@medipass/utils@11.69.2) (2022-09-27)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @medipass/utils
|
|
File without changes
|
package/blah.js
ADDED
|
@@ -1092,49 +1092,42 @@ var getFieldSchema = function getFieldSchema(field) {
|
|
|
1092
1092
|
switch (fieldAttributes.type) {
|
|
1093
1093
|
case 'string':
|
|
1094
1094
|
{
|
|
1095
|
-
// @ts-expect-error TS(2740): Type 'StringSchema<string, Record<string, any>, st... Remove this comment to see the full error message
|
|
1096
1095
|
schema = schema.string();
|
|
1097
1096
|
break;
|
|
1098
1097
|
}
|
|
1099
1098
|
|
|
1100
1099
|
case 'object':
|
|
1101
1100
|
{
|
|
1102
|
-
// @ts-expect-error TS(2740): Type 'OptionalObjectSchema<ObjectShape, Record<str... Remove this comment to see the full error message
|
|
1103
1101
|
schema = schema.object();
|
|
1104
1102
|
break;
|
|
1105
1103
|
}
|
|
1106
1104
|
|
|
1107
1105
|
case 'array':
|
|
1108
1106
|
{
|
|
1109
|
-
// @ts-expect-error TS(2740): Type 'OptionalArraySchema<AnySchema<any, any, any>... Remove this comment to see the full error message
|
|
1110
1107
|
schema = schema.array();
|
|
1111
1108
|
break;
|
|
1112
1109
|
}
|
|
1113
1110
|
|
|
1114
1111
|
case 'boolean':
|
|
1115
1112
|
{
|
|
1116
|
-
// @ts-expect-error TS(2740): Type 'BooleanSchema<boolean, Record<string, any>, ... Remove this comment to see the full error message
|
|
1117
1113
|
schema = schema.boolean();
|
|
1118
1114
|
break;
|
|
1119
1115
|
}
|
|
1120
1116
|
|
|
1121
1117
|
case 'date':
|
|
1122
1118
|
{
|
|
1123
|
-
// @ts-expect-error TS(2740): Type 'DateSchema<Date, Record<string, any>, Date>'... Remove this comment to see the full error message
|
|
1124
1119
|
schema = schema.date();
|
|
1125
1120
|
break;
|
|
1126
1121
|
}
|
|
1127
1122
|
|
|
1128
1123
|
case 'number':
|
|
1129
1124
|
{
|
|
1130
|
-
// @ts-expect-error TS(2740): Type 'NumberSchema<number, Record<string, any>, nu... Remove this comment to see the full error message
|
|
1131
1125
|
schema = schema.number();
|
|
1132
1126
|
break;
|
|
1133
1127
|
}
|
|
1134
1128
|
|
|
1135
1129
|
default:
|
|
1136
1130
|
{
|
|
1137
|
-
// @ts-expect-error TS(2322): Type 'StringSchema<string, Record<string, any>, st... Remove this comment to see the full error message
|
|
1138
1131
|
schema = schema.string();
|
|
1139
1132
|
}
|
|
1140
1133
|
}
|
|
@@ -1146,8 +1139,7 @@ var getFieldSchema = function getFieldSchema(field) {
|
|
|
1146
1139
|
{
|
|
1147
1140
|
if (defaultFieldExists && !field.required) {
|
|
1148
1141
|
return;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1142
|
+
}
|
|
1151
1143
|
|
|
1152
1144
|
schema = schema.required(validator.message);
|
|
1153
1145
|
break;
|
|
@@ -1155,35 +1147,30 @@ var getFieldSchema = function getFieldSchema(field) {
|
|
|
1155
1147
|
|
|
1156
1148
|
case 'test':
|
|
1157
1149
|
{
|
|
1158
|
-
// @ts-expect-error TS(2339): Property 'test' does not exist on type 'typeof imp... Remove this comment to see the full error message
|
|
1159
1150
|
schema = schema.test(field.name, validator.message, validator.fn);
|
|
1160
1151
|
break;
|
|
1161
1152
|
}
|
|
1162
1153
|
|
|
1163
1154
|
case 'email':
|
|
1164
1155
|
{
|
|
1165
|
-
// @ts-expect-error TS(2339): Property 'email' does not exist on type 'typeof im... Remove this comment to see the full error message
|
|
1166
1156
|
schema = schema.email(validator.message);
|
|
1167
1157
|
break;
|
|
1168
1158
|
}
|
|
1169
1159
|
|
|
1170
1160
|
case 'min':
|
|
1171
1161
|
{
|
|
1172
|
-
// @ts-expect-error TS(2339): Property 'min' does not exist on type 'typeof impo... Remove this comment to see the full error message
|
|
1173
1162
|
schema = schema.min(validator.length, validator.message);
|
|
1174
1163
|
break;
|
|
1175
1164
|
}
|
|
1176
1165
|
|
|
1177
1166
|
case 'matches':
|
|
1178
1167
|
{
|
|
1179
|
-
// @ts-expect-error TS(2339): Property 'matches' does not exist on type 'typeof ... Remove this comment to see the full error message
|
|
1180
1168
|
schema = schema.matches(validator.pattern, validator.message);
|
|
1181
1169
|
break;
|
|
1182
1170
|
}
|
|
1183
1171
|
|
|
1184
1172
|
case 'oneOf':
|
|
1185
1173
|
{
|
|
1186
|
-
// @ts-expect-error TS(2339): Property 'oneOf' does not exist on type 'typeof im... Remove this comment to see the full error message
|
|
1187
1174
|
schema = schema.oneOf([yup.ref(validator.fieldName), null], validator.message);
|
|
1188
1175
|
break;
|
|
1189
1176
|
}
|
|
File without changes
|
package/chart.js
CHANGED
|
@@ -14,9 +14,7 @@ var buildChartLabelsFromDataset = function buildChartLabelsFromDataset(dataset,
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
return dataset.map(function (data) {
|
|
17
|
-
// @ts-expect-error TS(2339): Property 'format' does not exist on type '{}'.
|
|
18
17
|
if (opts.format) {
|
|
19
|
-
// @ts-expect-error TS(2339): Property 'format' does not exist on type '{}'.
|
|
20
18
|
return moment(data[labelKey]).format(opts.format);
|
|
21
19
|
}
|
|
22
20
|
|
package/constants.js
CHANGED
|
@@ -213,6 +213,14 @@ var STATUSES = {
|
|
|
213
213
|
};
|
|
214
214
|
/* ====== END: STATUSES ======= */
|
|
215
215
|
|
|
216
|
+
/* ====== START: BUSINESS STATUSES ======= */
|
|
217
|
+
|
|
218
|
+
var BUSINESS_STATUSES = {
|
|
219
|
+
ACTIVE: 'ACTIVE',
|
|
220
|
+
SUSPENDED: 'SUSPENDED'
|
|
221
|
+
};
|
|
222
|
+
/* ====== END: BUSINESS STATUSES ======= */
|
|
223
|
+
|
|
216
224
|
/* ====== START: PAYMENT STATUSES ======= */
|
|
217
225
|
|
|
218
226
|
var PAYMENT_STATUSES = {
|
|
@@ -413,6 +421,7 @@ var ECLIPSE_OVERSEAS_CLAIM_TYPES = {
|
|
|
413
421
|
|
|
414
422
|
exports.AUS_STATES = AUS_STATES;
|
|
415
423
|
exports.AVAILABLE_PRODUCTS = AVAILABLE_PRODUCTS;
|
|
424
|
+
exports.BUSINESS_STATUSES = BUSINESS_STATUSES;
|
|
416
425
|
exports.DOCUMENT_STATUSES = DOCUMENT_STATUSES;
|
|
417
426
|
exports.DOCUMENT_TYPES = DOCUMENT_TYPES;
|
|
418
427
|
exports.DOCUMENT_WORKFLOW_STATES = DOCUMENT_WORKFLOW_STATES;
|
|
File without changes
|
package/get-select-options.js
CHANGED
|
@@ -22,7 +22,6 @@ var getSelectOptions = function getSelectOptions(values, labelKey, valueKey, opt
|
|
|
22
22
|
return values.map(function (value, i) {
|
|
23
23
|
return {
|
|
24
24
|
key: _get(value, '_id', i),
|
|
25
|
-
// @ts-expect-error TS(2339): Property 'labelKeyFunc' does not exist on type '{}... Remove this comment to see the full error message
|
|
26
25
|
label: opts.labelKeyFunc ? opts.labelKeyFunc(value) : _get(value, labelKey),
|
|
27
26
|
value: valueKey ? _get(value, valueKey) : value
|
|
28
27
|
};
|
package/google-addresses.js
CHANGED
|
@@ -103,29 +103,19 @@ var parseAddress = function parseAddress(addressComponents) {
|
|
|
103
103
|
var requestData = {};
|
|
104
104
|
|
|
105
105
|
if (addressComponents) {
|
|
106
|
-
var address = mapAddressComponents(addressComponents);
|
|
106
|
+
var address = mapAddressComponents(addressComponents);
|
|
107
107
|
|
|
108
108
|
if (address.route) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"" + (address.subpremise ? address.subpremise.longName + "/" : '') + ( // @ts-expect-error
|
|
112
|
-
(address.streetNumber ? address.streetNumber.longName : '') + " ") + ( // @ts-expect-error
|
|
113
|
-
"" + address.route.longName);
|
|
114
|
-
} // @ts-expect-error TS(2339): Property 'country' does not exist on type '{}'.
|
|
115
|
-
|
|
109
|
+
requestData.address = "" + (address.subpremise ? address.subpremise.longName + "/" : '') + ((address.streetNumber ? address.streetNumber.longName : '') + " ") + ("" + address.route.longName);
|
|
110
|
+
}
|
|
116
111
|
|
|
117
112
|
if (address.country) {
|
|
118
|
-
|
|
119
|
-
requestData.countryCode = address.country.shortName; // @ts-expect-error TS(2339): Property 'country' does not exist on type '{}'.
|
|
120
|
-
|
|
113
|
+
requestData.countryCode = address.country.shortName;
|
|
121
114
|
requestData.country = address.country.longName;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
requestData.state = address.state ? address.state.longName : null; // @ts-expect-error TS(2339): Property 'city' does not exist on type '{}'.
|
|
126
|
-
|
|
127
|
-
requestData.city = address.city ? address.city.longName : null; // @ts-expect-error TS(2339): Property 'postcode' does not exist on type '{}'.
|
|
115
|
+
}
|
|
128
116
|
|
|
117
|
+
requestData.state = address.state ? address.state.longName : null;
|
|
118
|
+
requestData.city = address.city ? address.city.longName : null;
|
|
129
119
|
requestData.postcode = address.postcode ? address.postcode.longName : null;
|
|
130
120
|
}
|
|
131
121
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/intercom.js
CHANGED
|
@@ -22,7 +22,6 @@ var bootIntercom = /*#__PURE__*/function () {
|
|
|
22
22
|
switch (_context.prev = _context.next) {
|
|
23
23
|
case 0:
|
|
24
24
|
return _context.abrupt("return", window.Intercom('boot', _objectSpread({}, data, {
|
|
25
|
-
// @ts-expect-error TS(2339): Property 'INTERCOM_APP_ID' does not exist on type ... Remove this comment to see the full error message
|
|
26
25
|
app_id: getEnv.default.INTERCOM_APP_ID,
|
|
27
26
|
// eslint-disable-line camelcase
|
|
28
27
|
user_hash: data.intercomHash
|
|
@@ -39,17 +38,14 @@ var bootIntercom = /*#__PURE__*/function () {
|
|
|
39
38
|
return function bootIntercom(_x) {
|
|
40
39
|
return _ref.apply(this, arguments);
|
|
41
40
|
};
|
|
42
|
-
}();
|
|
43
|
-
|
|
41
|
+
}();
|
|
44
42
|
var showNewMessage = function showNewMessage(message) {
|
|
45
43
|
return window.Intercom('showNewMessage', typeof message === 'string' ? message : '');
|
|
46
44
|
}; // eslint-disable-line new-cap
|
|
47
|
-
// @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
|
|
48
45
|
|
|
49
46
|
var shutdownIntercom = function shutdownIntercom() {
|
|
50
47
|
return window.Intercom('shutdown');
|
|
51
48
|
}; // eslint-disable-line new-cap
|
|
52
|
-
// @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
|
|
53
49
|
|
|
54
50
|
var trackEvent = function trackEvent(name, data) {
|
|
55
51
|
return window.Intercom('trackEvent', name, data);
|
|
@@ -81,8 +77,7 @@ var trackCreateVirtualTerminalInvoice = function trackCreateVirtualTerminalInvoi
|
|
|
81
77
|
};
|
|
82
78
|
var trackCreateQuote = function trackCreateQuote(data) {
|
|
83
79
|
return trackEvent('created-quote', data);
|
|
84
|
-
};
|
|
85
|
-
|
|
80
|
+
};
|
|
86
81
|
var updateIntercom = function updateIntercom(data) {
|
|
87
82
|
return window.Intercom('update', data);
|
|
88
83
|
}; // eslint-disable-line new-cap
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medipass/utils",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.70.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -8,13 +8,12 @@
|
|
|
8
8
|
"build": "BABEL_RUNTIME=true node ../../scripts/build.js",
|
|
9
9
|
"clean": "node ../../scripts/clean.js",
|
|
10
10
|
"develop": "BABEL_RUNTIME=true node ../../scripts/build.js --watch",
|
|
11
|
-
"lint": "eslint
|
|
12
|
-
"lint:fix": "eslint
|
|
11
|
+
"lint": "eslint src/",
|
|
12
|
+
"lint:fix": "eslint src/ --fix",
|
|
13
13
|
"prepare": "yarn build",
|
|
14
14
|
"postpublish": "yarn clean",
|
|
15
15
|
"test": "yarn lint && jest",
|
|
16
|
-
"test-ci": "yarn lint && jest --silent"
|
|
17
|
-
"check-types": "tsc --noEmit --project tsconfig.json"
|
|
16
|
+
"test-ci": "yarn lint && jest --silent"
|
|
18
17
|
},
|
|
19
18
|
"author": "Jake Moxey",
|
|
20
19
|
"peerDependencies": {
|
|
@@ -45,11 +44,9 @@
|
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
46
|
"@babel/plugin-transform-runtime": "7.8.3",
|
|
48
|
-
"@types/jest": "29.1.2",
|
|
49
47
|
"redux-mock-store": "^1.3.0",
|
|
50
48
|
"redux-thunk": "^2.2.0",
|
|
51
|
-
"rimraf": "^2.6.2"
|
|
52
|
-
"typescript": "4.8.4"
|
|
49
|
+
"rimraf": "^2.6.2"
|
|
53
50
|
},
|
|
54
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "8d8c735f93da3bb40d8605cd9331b9c073fc4da1"
|
|
55
52
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/redux-actions.js
CHANGED
|
@@ -91,9 +91,7 @@ var sdkActionCreator = function sdkActionCreator(sdkAction, actions, funcs) {
|
|
|
91
91
|
while (1) {
|
|
92
92
|
switch (_context.prev = _context.next) {
|
|
93
93
|
case 0:
|
|
94
|
-
// @ts-expect-error TS(2339): Property 'request' does not exist on type '{}'.
|
|
95
94
|
if (actions.request) {
|
|
96
|
-
// @ts-expect-error TS(2339): Property 'request' does not exist on type '{}'.
|
|
97
95
|
dispatch(actions.request());
|
|
98
96
|
}
|
|
99
97
|
|
|
@@ -104,15 +102,11 @@ var sdkActionCreator = function sdkActionCreator(sdkAction, actions, funcs) {
|
|
|
104
102
|
case 4:
|
|
105
103
|
data = _context.sent;
|
|
106
104
|
|
|
107
|
-
// @ts-expect-error TS(2339): Property 'success' does not exist on type '{}'.
|
|
108
105
|
if (actions.success) {
|
|
109
|
-
// @ts-expect-error TS(2339): Property 'success' does not exist on type '{}'.
|
|
110
106
|
dispatch(actions.success(data));
|
|
111
|
-
}
|
|
112
|
-
|
|
107
|
+
}
|
|
113
108
|
|
|
114
109
|
if (funcs.success) {
|
|
115
|
-
// @ts-expect-error TS(2339): Property 'success' does not exist on type '{}'.
|
|
116
110
|
funcs.success(data);
|
|
117
111
|
}
|
|
118
112
|
|
|
@@ -125,17 +119,13 @@ var sdkActionCreator = function sdkActionCreator(sdkAction, actions, funcs) {
|
|
|
125
119
|
|
|
126
120
|
if (errorData.statusCode === 403 && !errorData.message) {
|
|
127
121
|
errorData.message = 'You are forbidden to view this resource.';
|
|
128
|
-
}
|
|
129
|
-
|
|
122
|
+
}
|
|
130
123
|
|
|
131
124
|
if (actions.failure) {
|
|
132
|
-
// @ts-expect-error TS(2339): Property 'failure' does not exist on type '{}'.
|
|
133
125
|
dispatch(actions.failure(errorData));
|
|
134
|
-
}
|
|
135
|
-
|
|
126
|
+
}
|
|
136
127
|
|
|
137
128
|
if (funcs.failure) {
|
|
138
|
-
// @ts-expect-error TS(2339): Property 'failure' does not exist on type '{}'.
|
|
139
129
|
funcs.failure(errorData);
|
|
140
130
|
}
|
|
141
131
|
|
package/redux-reducer.js
CHANGED
|
@@ -83,7 +83,6 @@ var getRootReducer = function getRootReducer(appReducer, _temp5) {
|
|
|
83
83
|
var newState = _objectSpread({}, state);
|
|
84
84
|
|
|
85
85
|
if (action.type === reduxActions.CLEAR_ALL_STATE) {
|
|
86
|
-
// @ts-expect-error TS(2769): No overload matches this call.
|
|
87
86
|
newState = _objectSpread({}, _pick(state, persistKeys));
|
|
88
87
|
}
|
|
89
88
|
|
package/sentry.js
CHANGED
|
@@ -24,8 +24,7 @@ var STATUS_CODES = {
|
|
|
24
24
|
|
|
25
25
|
var _ignore = function _ignore(error) {
|
|
26
26
|
return process.env.NODE_ENV === 'test' || error.message === ERROR_MESSAGES.NETWORK_ERROR || _get(error, 'data.statusCode') === STATUS_CODES.UNAUTHORIZED || _get(error, 'data.statusCode') >= STATUS_CODES.SERVER_ERROR || _get(error, 'data.errorCode') === ERROR_CODES.INVALID_AUTHENTICATION;
|
|
27
|
-
};
|
|
28
|
-
|
|
27
|
+
};
|
|
29
28
|
|
|
30
29
|
var clearUserContext = function clearUserContext() {
|
|
31
30
|
return Sentry.setUser();
|
|
@@ -50,7 +49,6 @@ var logError = function logError(_error, _temp) {
|
|
|
50
49
|
if (error instanceof Error) {
|
|
51
50
|
var _error2, _error2$config;
|
|
52
51
|
|
|
53
|
-
// @ts-expect-error TS(2339): Property 'config' does not exist on type 'Error'.
|
|
54
52
|
var errorHeaders = (_error2 = error) == null ? void 0 : (_error2$config = _error2.config) == null ? void 0 : _error2$config.headers;
|
|
55
53
|
var maskedErrorHeaders = masked(errorHeaders, ['Authorization']);
|
|
56
54
|
error = _set(error, 'config.headers', maskedErrorHeaders);
|
package/service-items.js
CHANGED
|
@@ -4,9 +4,11 @@ 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
|
+
require('./constants.js');
|
|
7
8
|
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty'));
|
|
8
9
|
var _get = _interopDefault(require('lodash/get'));
|
|
9
10
|
var _isEmpty = _interopDefault(require('lodash/isEmpty'));
|
|
11
|
+
var funders = require('./funders.js');
|
|
10
12
|
|
|
11
13
|
function 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; }
|
|
12
14
|
|
|
@@ -25,7 +27,17 @@ var calculateTotalAmount = function calculateTotalAmount(serviceItems, opts) {
|
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
var total = serviceItems.reduce(function (total, item) {
|
|
28
|
-
var
|
|
30
|
+
var includeQuantity = _get(opts, 'includeQuantity');
|
|
31
|
+
|
|
32
|
+
if (funders.isIcare(_get(opts, 'funder.code')) && _get(item, 'unit') === 'minutes') {
|
|
33
|
+
includeQuantity = false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var prices = calculateAmounts({
|
|
37
|
+
isTaxable: Boolean(opts.includeGST && item.isTaxable),
|
|
38
|
+
initialGrossAmount: item != null && item.grossAmount ? parseFloat((item == null ? void 0 : item.grossAmount) || 0) : parseFloat((item == null ? void 0 : item.feeAmount) || 0),
|
|
39
|
+
quantity: includeQuantity ? item.quantity : 1
|
|
40
|
+
});
|
|
29
41
|
var itemTotal = undefined;
|
|
30
42
|
|
|
31
43
|
if (opts.isSubTotal) {
|
|
@@ -49,9 +61,22 @@ var calculateTotalDiscountAmount = function calculateTotalDiscountAmount(service
|
|
|
49
61
|
}, 0);
|
|
50
62
|
};
|
|
51
63
|
var calculateTotalGSTAmount = function calculateTotalGSTAmount(serviceItems, opts) {
|
|
64
|
+
if (opts === void 0) {
|
|
65
|
+
opts = {};
|
|
66
|
+
}
|
|
52
67
|
|
|
53
68
|
return serviceItems.reduce(function (total, item) {
|
|
54
|
-
var
|
|
69
|
+
var includeQuantity = _get(opts, 'includeQuantity');
|
|
70
|
+
|
|
71
|
+
if (funders.isIcare(_get(opts, 'funder.code')) && _get(item, 'unit') === 'minutes') {
|
|
72
|
+
includeQuantity = false;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
var prices = calculateAmounts({
|
|
76
|
+
isTaxable: item.isTaxable,
|
|
77
|
+
initialGrossAmount: parseFloat((item == null ? void 0 : item.grossAmount) || 0),
|
|
78
|
+
quantity: includeQuantity ? item.quantity : 1
|
|
79
|
+
});
|
|
55
80
|
var gstAmount = prices == null ? void 0 : prices.taxAmount;
|
|
56
81
|
return total + gstAmount;
|
|
57
82
|
}, 0);
|
|
@@ -66,7 +91,8 @@ var applyDiscountToServiceItems = function applyDiscountToServiceItems(serviceIt
|
|
|
66
91
|
|
|
67
92
|
if (discountType === 'percentage') {
|
|
68
93
|
percentage = parseFloat(discount) / 100;
|
|
69
|
-
}
|
|
94
|
+
} // $FlowFixMe
|
|
95
|
+
|
|
70
96
|
|
|
71
97
|
return serviceItems.map(function (serviceItem) {
|
|
72
98
|
return _objectSpread({}, serviceItem, {
|
|
@@ -166,8 +192,11 @@ function mapItemsToClaimItems(transaction) {
|
|
|
166
192
|
});
|
|
167
193
|
return newItems;
|
|
168
194
|
}
|
|
169
|
-
var calculateAmounts = function calculateAmounts(
|
|
170
|
-
var
|
|
195
|
+
var calculateAmounts = function calculateAmounts(_ref3) {
|
|
196
|
+
var isTaxable = _ref3.isTaxable,
|
|
197
|
+
initialGrossAmount = _ref3.initialGrossAmount;
|
|
198
|
+
var grossAmount = parseFloat(initialGrossAmount || 0);
|
|
199
|
+
var feeAmount = parseFloat(initialGrossAmount || 0);
|
|
171
200
|
var taxAmount = 0;
|
|
172
201
|
|
|
173
202
|
if (!isTaxable) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var transactions = require('../../transactions-
|
|
6
|
-
var subscriptions = require('../../subscriptions-
|
|
7
|
-
var staff = require('../../staff-
|
|
8
|
-
var specialties = require('../../specialties-
|
|
9
|
-
var services = require('../../services-
|
|
10
|
-
var professionalCategories = require('../../professional-categories-
|
|
11
|
-
var products = require('../../products-
|
|
12
|
-
var practices = require('../../practices-
|
|
13
|
-
var paymentMethods = require('../../payment-methods-
|
|
14
|
-
var patients = require('../../patients-
|
|
15
|
-
var modalities = require('../../modalities-
|
|
16
|
-
var members = require('../../members-
|
|
17
|
-
var billableItems = require('../../billable-items-
|
|
18
|
-
var businesses = require('../../businesses-
|
|
19
|
-
var forms = require('../../forms-
|
|
20
|
-
var healthFundAccounts = require('../../health-fund-accounts-
|
|
21
|
-
var healthFundSettings = require('../../health-fund-settings-
|
|
22
|
-
var healthFunds = require('../../health-funds-
|
|
5
|
+
var transactions = require('../../transactions-6e5fd92d.js');
|
|
6
|
+
var subscriptions = require('../../subscriptions-45c1321a.js');
|
|
7
|
+
var staff = require('../../staff-990794cd.js');
|
|
8
|
+
var specialties = require('../../specialties-7640b7e3.js');
|
|
9
|
+
var services = require('../../services-2e25cdac.js');
|
|
10
|
+
var professionalCategories = require('../../professional-categories-e2e5284b.js');
|
|
11
|
+
var products = require('../../products-bd313cb4.js');
|
|
12
|
+
var practices = require('../../practices-3e703f22.js');
|
|
13
|
+
var paymentMethods = require('../../payment-methods-4fa2d01f.js');
|
|
14
|
+
var patients = require('../../patients-2083dd9c.js');
|
|
15
|
+
var modalities = require('../../modalities-b360d521.js');
|
|
16
|
+
var members = require('../../members-cb4f73a9.js');
|
|
17
|
+
var billableItems = require('../../billable-items-01050ba2.js');
|
|
18
|
+
var businesses = require('../../businesses-e3a20604.js');
|
|
19
|
+
var forms = require('../../forms-f06ca97e.js');
|
|
20
|
+
var healthFundAccounts = require('../../health-fund-accounts-3cd8650f.js');
|
|
21
|
+
var healthFundSettings = require('../../health-fund-settings-43327826.js');
|
|
22
|
+
var healthFunds = require('../../health-funds-300facef.js');
|
|
23
23
|
|
|
24
24
|
var index = {
|
|
25
25
|
billableItems: billableItems.billableItems,
|