@medipass/utils 11.74.2-chore-upgrade-react-18.0 → 11.74.2-feature-strict-mode.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/abn.js +3 -0
- package/build-validation-schema.d.ts +7 -7
- package/build-validation-schema.js +21 -4
- package/chart.js +13 -9
- package/datetime.d.ts +1 -1
- package/datetime.js +3 -2
- package/form-applications/assign-values-to-sections.js +16 -11
- package/get-env.js +6 -1
- package/get-select-options.d.ts +1 -1
- package/get-select-options.js +2 -1
- package/get-staff-type-display-name.js +1 -1
- package/google-addresses.js +7 -3
- package/i18n/index.js +2 -0
- package/index.d.ts +2 -2
- package/intercom.js +16 -7
- package/package.json +4 -4
- package/parse-health-fund-card-fields.js +7 -4
- package/payment-options.js +20 -10
- package/redux-actions.d.ts +2 -2
- package/redux-actions.js +74 -61
- package/redux-reducer.d.ts +11 -11
- package/redux-reducer.js +34 -23
- package/sanitise-url.js +2 -0
- package/scroll.d.ts +1 -1
- package/scroll.js +4 -1
- package/sentry.d.ts +1 -1
- package/sentry.js +11 -5
- package/service-items.d.ts +12 -3
- package/service-items.js +10 -4
- package/test-framework/fixtures/message-mappings.d.ts +2 -2
- package/test-framework/fixtures/transaction-reports.d.ts +1 -1
- package/test-framework/fixtures/transactions.d.ts +7 -7
- package/test-framework/react.js +1 -0
- package/transaction-details-by-funder.js +3 -2
- package/transaction-status-helpers.js +8 -4
- package/tsconfig.json +2 -1
- package/validate-form.d.ts +42 -42
- package/validate-form.js +91 -50
- package/validate.js +8 -4
- package/webpack-config.d.ts +1 -1
- package/webpack-config.js +8 -5
package/abn.js
CHANGED
|
@@ -30,11 +30,13 @@ var isValidAbn = function isValidAbn(abn) {
|
|
|
30
30
|
for (var i = 0; i < abn.length; i++) {
|
|
31
31
|
abnArray[i] = abn.charAt(i);
|
|
32
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
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
abnArray[0] -= 1; // multiply each of the digits by its weighting factor
|
|
36
37
|
|
|
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
|
|
38
40
|
abnArray[_i] *= weights[_i];
|
|
39
41
|
} // sum all the digits
|
|
40
42
|
|
|
@@ -42,6 +44,7 @@ var isValidAbn = function isValidAbn(abn) {
|
|
|
42
44
|
var abnSum = 0;
|
|
43
45
|
|
|
44
46
|
for (var _i2 = 0; _i2 < abnArray.length; _i2++) {
|
|
47
|
+
// @ts-expect-error TS(2322): Type 'string' is not assignable to type 'number'.
|
|
45
48
|
abnSum += abnArray[_i2];
|
|
46
49
|
}
|
|
47
50
|
|
|
@@ -23,7 +23,7 @@ export declare const FIELD_VALIDATORS: {
|
|
|
23
23
|
} | {
|
|
24
24
|
type: string;
|
|
25
25
|
message: string;
|
|
26
|
-
fn: (value: any) => boolean;
|
|
26
|
+
fn: (value: any) => boolean | undefined;
|
|
27
27
|
})[];
|
|
28
28
|
};
|
|
29
29
|
email: {
|
|
@@ -140,10 +140,10 @@ export declare const paymentMethodValidationSchema: {
|
|
|
140
140
|
name: string;
|
|
141
141
|
}[];
|
|
142
142
|
export declare const getHealthFundAccountValidationSchema: (cardFields: Record<string, any>) => {
|
|
143
|
-
cardIssueNumber?: import("yup/lib/string").RequiredStringSchema<string, Record<string, any
|
|
144
|
-
expiryDate?: import("yup/lib/string").RequiredStringSchema<string, Record<string, any
|
|
145
|
-
issueDate?: import("yup/lib/string").RequiredStringSchema<string, Record<string, any
|
|
146
|
-
cardRank?: import("yup/lib/string").RequiredStringSchema<string, Record<string, any
|
|
147
|
-
membershipNumber?: import("yup/lib/string").RequiredStringSchema<string, Record<string, any
|
|
148
|
-
cardNumber?: import("yup/lib/string").RequiredStringSchema<string, Record<string, any
|
|
143
|
+
cardIssueNumber?: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>> | undefined;
|
|
144
|
+
expiryDate?: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>> | undefined;
|
|
145
|
+
issueDate?: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>> | undefined;
|
|
146
|
+
cardRank?: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>> | undefined;
|
|
147
|
+
membershipNumber?: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>> | undefined;
|
|
148
|
+
cardNumber?: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>> | undefined;
|
|
149
149
|
};
|
|
@@ -917,6 +917,7 @@ var FIELD_VALIDATORS = {
|
|
|
917
917
|
}, {
|
|
918
918
|
type: 'test',
|
|
919
919
|
message: 'Please enter a valid day between 01 and 31',
|
|
920
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
920
921
|
fn: function fn(value) {
|
|
921
922
|
if (!value) {
|
|
922
923
|
return;
|
|
@@ -929,6 +930,7 @@ var FIELD_VALIDATORS = {
|
|
|
929
930
|
}, {
|
|
930
931
|
type: 'test',
|
|
931
932
|
message: 'Please enter a valid month between 01 and 12',
|
|
933
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
932
934
|
fn: function fn(value) {
|
|
933
935
|
if (!value) {
|
|
934
936
|
return;
|
|
@@ -941,6 +943,7 @@ var FIELD_VALIDATORS = {
|
|
|
941
943
|
}, {
|
|
942
944
|
type: 'test',
|
|
943
945
|
message: 'Please enter a valid year',
|
|
946
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
944
947
|
fn: function fn(value) {
|
|
945
948
|
if (!value) {
|
|
946
949
|
return;
|
|
@@ -953,6 +956,7 @@ var FIELD_VALIDATORS = {
|
|
|
953
956
|
}, {
|
|
954
957
|
type: 'test',
|
|
955
958
|
message: 'Please enter a year greater than 1900',
|
|
959
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
956
960
|
fn: function fn(value) {
|
|
957
961
|
if (!value) {
|
|
958
962
|
return;
|
|
@@ -965,6 +969,7 @@ var FIELD_VALIDATORS = {
|
|
|
965
969
|
}, {
|
|
966
970
|
type: 'test',
|
|
967
971
|
message: "Please enter a year before " + (new Date().getFullYear() + 1),
|
|
972
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
968
973
|
fn: function fn(value) {
|
|
969
974
|
if (!value) {
|
|
970
975
|
return;
|
|
@@ -994,6 +999,7 @@ var FIELD_VALIDATORS = {
|
|
|
994
999
|
}, {
|
|
995
1000
|
type: 'test',
|
|
996
1001
|
message: 'Please enter a valid Australian mobile number',
|
|
1002
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
997
1003
|
fn: function fn(value) {
|
|
998
1004
|
return value ? validate.isMobileNumber(value, 'AU') : true;
|
|
999
1005
|
}
|
|
@@ -1053,6 +1059,7 @@ var FIELD_VALIDATORS = {
|
|
|
1053
1059
|
}, {
|
|
1054
1060
|
type: 'test',
|
|
1055
1061
|
message: 'Please enter a valid card number',
|
|
1062
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
1056
1063
|
fn: function fn(value) {
|
|
1057
1064
|
return lib$1.fns.validateCardNumber(value);
|
|
1058
1065
|
}
|
|
@@ -1066,6 +1073,7 @@ var FIELD_VALIDATORS = {
|
|
|
1066
1073
|
}, {
|
|
1067
1074
|
type: 'test',
|
|
1068
1075
|
message: 'Please enter a valid expiry',
|
|
1076
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
1069
1077
|
fn: function fn(value) {
|
|
1070
1078
|
return lib$1.fns.validateCardExpiry(value);
|
|
1071
1079
|
}
|
|
@@ -1079,16 +1087,19 @@ var FIELD_VALIDATORS = {
|
|
|
1079
1087
|
}, {
|
|
1080
1088
|
type: 'test',
|
|
1081
1089
|
message: 'Please enter a valid CVC',
|
|
1090
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
1082
1091
|
fn: function fn(value) {
|
|
1083
1092
|
return lib$1.fns.validateCardCVC(value);
|
|
1084
1093
|
}
|
|
1085
1094
|
}]
|
|
1086
1095
|
}
|
|
1087
|
-
};
|
|
1096
|
+
}; // @ts-expect-error TS(7006): Parameter 'field' implicitly has an 'any' type.
|
|
1088
1097
|
|
|
1089
1098
|
var getFieldSchema = function getFieldSchema(field) {
|
|
1090
|
-
var key = field.key || field.name;
|
|
1091
|
-
|
|
1099
|
+
var key = field.key || field.name; // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
|
|
1100
|
+
|
|
1101
|
+
var defaultFieldExists = Boolean(FIELD_VALIDATORS[key]); // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
|
|
1102
|
+
|
|
1092
1103
|
var fieldAttributes = defaultFieldExists ? FIELD_VALIDATORS[key] : field;
|
|
1093
1104
|
var schema = yup;
|
|
1094
1105
|
|
|
@@ -1143,6 +1154,7 @@ var getFieldSchema = function getFieldSchema(field) {
|
|
|
1143
1154
|
}
|
|
1144
1155
|
|
|
1145
1156
|
if (fieldAttributes.validators) {
|
|
1157
|
+
// @ts-expect-error TS(7006): Parameter 'validator' implicitly has an 'any' type... Remove this comment to see the full error message
|
|
1146
1158
|
fieldAttributes.validators.forEach(function (validator) {
|
|
1147
1159
|
switch (validator.type) {
|
|
1148
1160
|
case 'required':
|
|
@@ -1206,13 +1218,15 @@ var buildValidationSchema = function buildValidationSchema(fields, overrideSchem
|
|
|
1206
1218
|
fields.forEach(function (field) {
|
|
1207
1219
|
if (!field) {
|
|
1208
1220
|
return;
|
|
1209
|
-
}
|
|
1221
|
+
} // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
|
|
1222
|
+
|
|
1210
1223
|
|
|
1211
1224
|
schema[field.name] = getFieldSchema(field);
|
|
1212
1225
|
});
|
|
1213
1226
|
return yup.object().shape(_objectSpread({}, schema, {}, overrideSchema));
|
|
1214
1227
|
};
|
|
1215
1228
|
/* ===== CUSTOM OVERRIDE SCHEMAS ===== */
|
|
1229
|
+
// @ts-expect-error TS(7006): Parameter 'schema' implicitly has an 'any' type.
|
|
1216
1230
|
|
|
1217
1231
|
var validateHealthFundDate = function validateHealthFundDate(schema, _ref) {
|
|
1218
1232
|
var cardFields = _ref.cardFields,
|
|
@@ -1223,6 +1237,7 @@ var validateHealthFundDate = function validateHealthFundDate(schema, _ref) {
|
|
|
1223
1237
|
var newSchema = schema;
|
|
1224
1238
|
|
|
1225
1239
|
if (cardFields[dayKey]) {
|
|
1240
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
1226
1241
|
newSchema = newSchema.test(fieldKey, _get(cardFields, dayKey + ".validation.message"), function (value) {
|
|
1227
1242
|
var dateArray = value ? value.split('/') : [];
|
|
1228
1243
|
var day = dateArray[0];
|
|
@@ -1231,6 +1246,7 @@ var validateHealthFundDate = function validateHealthFundDate(schema, _ref) {
|
|
|
1231
1246
|
}
|
|
1232
1247
|
|
|
1233
1248
|
if (cardFields[monthKey]) {
|
|
1249
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
1234
1250
|
newSchema = newSchema.test(fieldKey, _get(cardFields, monthKey + ".validation.message"), function (value) {
|
|
1235
1251
|
var dateArray = value ? value.split('/') : [];
|
|
1236
1252
|
var month = dateArray[dateArray.length - 2];
|
|
@@ -1239,6 +1255,7 @@ var validateHealthFundDate = function validateHealthFundDate(schema, _ref) {
|
|
|
1239
1255
|
}
|
|
1240
1256
|
|
|
1241
1257
|
if (cardFields[yearKey]) {
|
|
1258
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
1242
1259
|
newSchema = newSchema.test(fieldKey, _get(cardFields, yearKey + ".validation.message"), function (value) {
|
|
1243
1260
|
var dateArray = value ? value.split('/') : [];
|
|
1244
1261
|
var year = dateArray[dateArray.length - 1];
|
package/chart.js
CHANGED
|
@@ -13,21 +13,25 @@ var buildChartLabelsFromDataset = function buildChartLabelsFromDataset(dataset,
|
|
|
13
13
|
opts = {};
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
if (opts.format) {
|
|
16
|
+
return (// @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
|
|
17
|
+
dataset.map(function (data) {
|
|
19
18
|
// @ts-expect-error TS(2339): Property 'format' does not exist on type '{}'.
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
if (opts.format) {
|
|
20
|
+
// @ts-expect-error TS(2339): Property 'format' does not exist on type '{}'.
|
|
21
|
+
return moment(data[labelKey]).format(opts.format);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return data[labelKey];
|
|
25
|
+
})
|
|
26
|
+
);
|
|
27
|
+
}; // @ts-expect-error TS(7006): Parameter 'dataset' implicitly has an 'any' type.
|
|
22
28
|
|
|
23
|
-
return data[labelKey];
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
29
|
var buildDataPointsFromDataset = function buildDataPointsFromDataset(dataset, dataKey) {
|
|
27
30
|
return dataset.map(function (data) {
|
|
28
31
|
return _get(data, dataKey);
|
|
29
32
|
});
|
|
30
|
-
};
|
|
33
|
+
}; // @ts-expect-error TS(7006): Parameter 'period' implicitly has an 'any' type.
|
|
34
|
+
|
|
31
35
|
var humanizePeriod = function humanizePeriod(period) {
|
|
32
36
|
if (period && period.includes('--')) {
|
|
33
37
|
return '';
|
package/datetime.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const roundToNearestMinutes: (date: any, interval: any) => Date;
|
|
2
|
-
export declare const parseDate: (date: any) => string;
|
|
2
|
+
export declare const parseDate: (date: any) => string | undefined;
|
package/datetime.js
CHANGED
|
@@ -11,11 +11,12 @@ var getMinutes = _interopDefault(require('date-fns/getMinutes'));
|
|
|
11
11
|
var roundToNearestMinutes = function roundToNearestMinutes(date, interval) {
|
|
12
12
|
var roundedMinutes = Math.floor(getMinutes(date) / interval) * interval;
|
|
13
13
|
return setMinutes(startOfMinute(date), roundedMinutes);
|
|
14
|
-
};
|
|
14
|
+
}; // @ts-expect-error TS(7006): Parameter 'date' implicitly has an 'any' type.
|
|
15
15
|
|
|
16
16
|
var isValidDate = function isValidDate(date) {
|
|
17
17
|
return /\d{4}-\d{2}-\d{2}/.test(date);
|
|
18
|
-
};
|
|
18
|
+
}; // @ts-expect-error TS(7006): Parameter 'date' implicitly has an 'any' type.
|
|
19
|
+
|
|
19
20
|
|
|
20
21
|
var parseDate = function parseDate(date) {
|
|
21
22
|
if (!date) {
|
|
@@ -10,20 +10,25 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
10
10
|
|
|
11
11
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
12
|
|
|
13
|
+
// @ts-expect-error TS(7031): Binding element 'sections' implicitly has an 'any'... Remove this comment to see the full error message
|
|
13
14
|
var assignValuesToSections = function assignValuesToSections(_ref) {
|
|
14
15
|
var sections = _ref.sections,
|
|
15
16
|
values = _ref.values;
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
return (// @ts-expect-error TS(7006): Parameter 'section' implicitly has an 'any' type.
|
|
18
|
+
sections.map(function (section) {
|
|
19
|
+
return _objectSpread({}, section, {
|
|
20
|
+
// @ts-expect-error TS(7006): Parameter 'subsection' implicitly has an 'any' typ... Remove this comment to see the full error message
|
|
21
|
+
subsections: section.subsections.map(function (subsection) {
|
|
22
|
+
return _objectSpread({}, subsection, {
|
|
23
|
+
// @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
24
|
+
value: (values.find(function (value) {
|
|
25
|
+
return value._id === subsection._id;
|
|
26
|
+
}) || {}).value
|
|
27
|
+
});
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
})
|
|
31
|
+
);
|
|
27
32
|
};
|
|
28
33
|
|
|
29
34
|
exports.default = assignValuesToSections;
|
package/get-env.js
CHANGED
|
@@ -118,15 +118,18 @@ var getEnv = function getEnv(env) {
|
|
|
118
118
|
};
|
|
119
119
|
|
|
120
120
|
var getEnvironmentsMissingVariables = function getEnvironmentsMissingVariables(envVariables) {
|
|
121
|
+
// @ts-expect-error TS(7034): Variable 'environmentsMissingVariables' implicitly... Remove this comment to see the full error message
|
|
121
122
|
var environmentsMissingVariables = [];
|
|
122
123
|
|
|
123
124
|
for (var _iterator = _createForOfIteratorHelperLoose(REQUIRED_VARIABLES), _step; !(_step = _iterator()).done;) {
|
|
124
125
|
var requiredVariable = _step.value;
|
|
125
126
|
|
|
126
127
|
if (!envVariables[requiredVariable]) {
|
|
128
|
+
// @ts-expect-error TS(7005): Variable 'environmentsMissingVariables' implicitly... Remove this comment to see the full error message
|
|
127
129
|
environmentsMissingVariables = [].concat(environmentsMissingVariables, [requiredVariable]);
|
|
128
130
|
}
|
|
129
|
-
}
|
|
131
|
+
} // @ts-expect-error TS(7005): Variable 'environmentsMissingVariables' implicitly... Remove this comment to see the full error message
|
|
132
|
+
|
|
130
133
|
|
|
131
134
|
return environmentsMissingVariables;
|
|
132
135
|
};
|
|
@@ -140,6 +143,7 @@ var getRequiredEnvironmentVariables = function getRequiredEnvironmentVariables(e
|
|
|
140
143
|
}
|
|
141
144
|
|
|
142
145
|
if (Object.prototype.hasOwnProperty.call(env, key)) {
|
|
146
|
+
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
|
|
143
147
|
missingVariables[key] = getEnvironmentsMissingVariables(env[key]);
|
|
144
148
|
}
|
|
145
149
|
}
|
|
@@ -182,6 +186,7 @@ var Env = /*#__PURE__*/function () {
|
|
|
182
186
|
|
|
183
187
|
for (var key in newEnv) {
|
|
184
188
|
if (Object.prototype.hasOwnProperty.call(newEnv, key)) {
|
|
189
|
+
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
|
|
185
190
|
this[key] = newEnv[key];
|
|
186
191
|
}
|
|
187
192
|
}
|
package/get-select-options.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const getSelectOptions: (values: any, labelKey: any, valueKey?:
|
|
1
|
+
declare const getSelectOptions: (values: any, labelKey: any, valueKey?: null, opts?: {}) => any;
|
|
2
2
|
export default getSelectOptions;
|
|
3
3
|
export declare const getNameMobileEmail: (value: Record<string, any>) => string;
|
|
4
4
|
export declare const getDisplayNameAndICDCode: (value: Record<string, any>) => string;
|
package/get-select-options.js
CHANGED
|
@@ -17,7 +17,8 @@ var getSelectOptions = function getSelectOptions(values, labelKey, valueKey, opt
|
|
|
17
17
|
|
|
18
18
|
if (!values) {
|
|
19
19
|
return [];
|
|
20
|
-
}
|
|
20
|
+
} // @ts-expect-error TS(7006): Parameter 'value' implicitly has an 'any' type.
|
|
21
|
+
|
|
21
22
|
|
|
22
23
|
return values.map(function (value, i) {
|
|
23
24
|
return {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var staffTypeDisplayNames = {
|
|
6
6
|
receptionist: 'practice manager'
|
|
7
|
-
};
|
|
7
|
+
}; // @ts-expect-error TS(7006): Parameter 'staffType' implicitly has an 'any' type... Remove this comment to see the full error message
|
|
8
8
|
|
|
9
9
|
var getStaffTypeDisplayName = function getStaffTypeDisplayName(staffType) {
|
|
10
10
|
return staffTypeDisplayNames[staffType] || staffType;
|
package/google-addresses.js
CHANGED
|
@@ -18,7 +18,8 @@ var ADDRESS_COMPONENT_MAPPINGS = {
|
|
|
18
18
|
state: 'administrative_area_level_1',
|
|
19
19
|
city: 'locality',
|
|
20
20
|
postcode: 'postal_code'
|
|
21
|
-
};
|
|
21
|
+
}; // @ts-expect-error TS(7006): Parameter 'address' implicitly has an 'any' type.
|
|
22
|
+
|
|
22
23
|
function geocodeAddress(address) {
|
|
23
24
|
return new Promise( /*#__PURE__*/function () {
|
|
24
25
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(res, rej) {
|
|
@@ -82,13 +83,15 @@ function geocodeAddress(address) {
|
|
|
82
83
|
return _ref.apply(this, arguments);
|
|
83
84
|
};
|
|
84
85
|
}());
|
|
85
|
-
}
|
|
86
|
+
} // @ts-expect-error TS(7006): Parameter 'addressComponents' implicitly has an 'a... Remove this comment to see the full error message
|
|
87
|
+
|
|
86
88
|
var mapAddressComponents = function mapAddressComponents(addressComponents) {
|
|
87
89
|
var components = {};
|
|
88
90
|
|
|
89
91
|
_forEach(addressComponents, function (component) {
|
|
90
92
|
_forOwn(ADDRESS_COMPONENT_MAPPINGS, function (mapping, key) {
|
|
91
93
|
if (component.types[0] === mapping) {
|
|
94
|
+
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
|
|
92
95
|
components[key] = {
|
|
93
96
|
longName: component.long_name,
|
|
94
97
|
shortName: component.short_name
|
|
@@ -98,7 +101,8 @@ var mapAddressComponents = function mapAddressComponents(addressComponents) {
|
|
|
98
101
|
});
|
|
99
102
|
|
|
100
103
|
return components;
|
|
101
|
-
};
|
|
104
|
+
}; // @ts-expect-error TS(7006): Parameter 'addressComponents' implicitly has an 'a... Remove this comment to see the full error message
|
|
105
|
+
|
|
102
106
|
var parseAddress = function parseAddress(addressComponents) {
|
|
103
107
|
var requestData = {};
|
|
104
108
|
|
package/i18n/index.js
CHANGED
|
@@ -24,6 +24,7 @@ function getResources(translations$1) {
|
|
|
24
24
|
|
|
25
25
|
var key = _ref[0],
|
|
26
26
|
value = _ref[1];
|
|
27
|
+
// @ts-expect-error TS(2571): Object is of type 'unknown'.
|
|
27
28
|
return _objectSpread({}, currentTranslations, (_objectSpread2 = {}, _objectSpread2[key] = value[region], _objectSpread2));
|
|
28
29
|
}, {})
|
|
29
30
|
}, _objectSpread3));
|
|
@@ -32,6 +33,7 @@ function getResources(translations$1) {
|
|
|
32
33
|
|
|
33
34
|
var index = {
|
|
34
35
|
i18n: {},
|
|
36
|
+
// @ts-expect-error TS(7031): Binding element 'region' implicitly has an 'any' t... Remove this comment to see the full error message
|
|
35
37
|
setup: function setup(_ref2) {
|
|
36
38
|
var region = _ref2.region;
|
|
37
39
|
this.i18n = i18n.use(reactI18next.initReactI18next).init({
|
package/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ declare const utils: {
|
|
|
41
41
|
QUOTES_URL: string;
|
|
42
42
|
CHECKOUT_URL: string;
|
|
43
43
|
setup(env: {
|
|
44
|
-
_global?: Record<string, any
|
|
44
|
+
_global?: Record<string, any> | undefined;
|
|
45
45
|
local: Record<string, any>;
|
|
46
46
|
dev: Record<string, any>;
|
|
47
47
|
staging: Record<string, any>;
|
|
@@ -51,7 +51,7 @@ declare const utils: {
|
|
|
51
51
|
}): void;
|
|
52
52
|
clear(): void;
|
|
53
53
|
};
|
|
54
|
-
getSelectOptions: (values: any, labelKey: any, valueKey?:
|
|
54
|
+
getSelectOptions: (values: any, labelKey: any, valueKey?: null, opts?: {}) => any;
|
|
55
55
|
getStaffTypeDisplayName: (staffType: any) => any;
|
|
56
56
|
intercom: {};
|
|
57
57
|
sentry: {};
|
package/intercom.js
CHANGED
|
@@ -15,6 +15,7 @@ var getEnv = require('./get-env.js');
|
|
|
15
15
|
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; }
|
|
16
16
|
|
|
17
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
|
+
|
|
18
19
|
var bootIntercom = /*#__PURE__*/function () {
|
|
19
20
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(data) {
|
|
20
21
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -54,28 +55,36 @@ var shutdownIntercom = function shutdownIntercom() {
|
|
|
54
55
|
var trackEvent = function trackEvent(name, data) {
|
|
55
56
|
return window.Intercom('trackEvent', name, data);
|
|
56
57
|
}; // eslint-disable-line new-cap
|
|
58
|
+
// @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
|
|
57
59
|
|
|
58
60
|
var trackCreateDVAInvoice = function trackCreateDVAInvoice(data) {
|
|
59
61
|
return trackEvent('created-dva-invoice', data);
|
|
60
|
-
};
|
|
62
|
+
}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
|
|
63
|
+
|
|
61
64
|
var trackCreateHICAPSInvoice = function trackCreateHICAPSInvoice(data) {
|
|
62
65
|
return trackEvent('created-hicaps-invoice', data);
|
|
63
|
-
};
|
|
66
|
+
}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
|
|
67
|
+
|
|
64
68
|
var trackCreateMedicareInvoice = function trackCreateMedicareInvoice(data) {
|
|
65
69
|
return trackEvent('created-medicare-invoice', data);
|
|
66
|
-
};
|
|
70
|
+
}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
|
|
71
|
+
|
|
67
72
|
var trackCreatePatientFundedInvoice = function trackCreatePatientFundedInvoice(data) {
|
|
68
73
|
return trackEvent('created-patient-funded-invoice', data);
|
|
69
|
-
};
|
|
74
|
+
}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
|
|
75
|
+
|
|
70
76
|
var trackCreateNDISInvoice = function trackCreateNDISInvoice(data) {
|
|
71
77
|
return trackEvent('created-ndis-invoice', data);
|
|
72
|
-
};
|
|
78
|
+
}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
|
|
79
|
+
|
|
73
80
|
var trackCreateOHCInvoice = function trackCreateOHCInvoice(data) {
|
|
74
81
|
return trackEvent('created-ohc-invoice', data);
|
|
75
|
-
};
|
|
82
|
+
}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
|
|
83
|
+
|
|
76
84
|
var trackCreateVirtualTerminalInvoice = function trackCreateVirtualTerminalInvoice(data) {
|
|
77
85
|
return trackEvent('created-virtual-terminal-invoice', data);
|
|
78
|
-
};
|
|
86
|
+
}; // @ts-expect-error TS(7006): Parameter 'data' implicitly has an 'any' type.
|
|
87
|
+
|
|
79
88
|
var trackCreateQuote = function trackCreateQuote(data) {
|
|
80
89
|
return trackEvent('created-quote', data);
|
|
81
90
|
}; // @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medipass/utils",
|
|
3
|
-
"version": "11.74.2-
|
|
3
|
+
"version": "11.74.2-feature-strict-mode.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"author": "Jake Moxey",
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"react": "
|
|
22
|
-
"react-dom": "
|
|
21
|
+
"react": ">=17.0.0",
|
|
22
|
+
"react-dom": ">=17.0.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/runtime": "7.8.4",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"rimraf": "^2.6.2",
|
|
52
52
|
"typescript": "4.8.4"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "ad0c3ee57beed8dec3dc477a942d485844c415c3"
|
|
55
55
|
}
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
// @ts-expect-error TS(7006): Parameter 'cardFields' implicitly has an 'any' typ... Remove this comment to see the full error message
|
|
5
6
|
var parseHealthFundCardFields = function parseHealthFundCardFields(cardFields) {
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
return (// @ts-expect-error TS(7006): Parameter 'result' implicitly has an 'any' type.
|
|
8
|
+
cardFields.reduce(function (result, field) {
|
|
9
|
+
result[field.id] = field;
|
|
10
|
+
return result;
|
|
11
|
+
}, {})
|
|
12
|
+
);
|
|
10
13
|
};
|
|
11
14
|
|
|
12
15
|
exports.default = parseHealthFundCardFields;
|
package/payment-options.js
CHANGED
|
@@ -6,34 +6,44 @@ var constants = require('./constants.js');
|
|
|
6
6
|
|
|
7
7
|
var isPaymentAuthority = function isPaymentAuthority(paymentOption) {
|
|
8
8
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.PAYMENT_AUTHORITY;
|
|
9
|
-
};
|
|
9
|
+
}; // @ts-expect-error TS(7006): Parameter 'paymentOption' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
10
|
+
|
|
10
11
|
var isExistingPaymentCard = function isExistingPaymentCard(paymentOption) {
|
|
11
12
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.EXISTING_PAYMENT_CARD;
|
|
12
|
-
};
|
|
13
|
+
}; // @ts-expect-error TS(7006): Parameter 'paymentOption' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
14
|
+
|
|
13
15
|
var isNewPaymentCard = function isNewPaymentCard(paymentOption) {
|
|
14
16
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.NEW_PAYMENT_CARD;
|
|
15
|
-
};
|
|
17
|
+
}; // @ts-expect-error TS(7006): Parameter 'paymentOption' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
18
|
+
|
|
16
19
|
var isLink = function isLink(paymentOption) {
|
|
17
20
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.LINK;
|
|
18
|
-
};
|
|
21
|
+
}; // @ts-expect-error TS(7006): Parameter 'paymentOption' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
22
|
+
|
|
19
23
|
var isPaymentCard = function isPaymentCard(paymentOption) {
|
|
20
24
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.PAYMENT_CARD || paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.EXISTING_PAYMENT_CARD || paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.NEW_PAYMENT_CARD;
|
|
21
|
-
};
|
|
25
|
+
}; // @ts-expect-error TS(7006): Parameter 'paymentOption' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
26
|
+
|
|
22
27
|
var isPayInPerson = function isPayInPerson(paymentOption) {
|
|
23
28
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.PAY_IN_PERSON;
|
|
24
|
-
};
|
|
29
|
+
}; // @ts-expect-error TS(7006): Parameter 'paymentOption' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
30
|
+
|
|
25
31
|
var isProcessOutsideMedipass = function isProcessOutsideMedipass(paymentOption) {
|
|
26
32
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.PROCESS_OUTSIDE_MEDIPASS;
|
|
27
|
-
};
|
|
33
|
+
}; // @ts-expect-error TS(7006): Parameter 'paymentOption' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
34
|
+
|
|
28
35
|
var isSendToPhone = function isSendToPhone(paymentOption) {
|
|
29
36
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.PHONE;
|
|
30
|
-
};
|
|
37
|
+
}; // @ts-expect-error TS(7006): Parameter 'paymentOption' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
38
|
+
|
|
31
39
|
var isPaymentHold = function isPaymentHold(paymentOption) {
|
|
32
40
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.HOLD;
|
|
33
|
-
};
|
|
41
|
+
}; // @ts-expect-error TS(7006): Parameter 'paymentOption' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
42
|
+
|
|
34
43
|
var isInstalmentPlan = function isInstalmentPlan(paymentOption) {
|
|
35
44
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.INSTALMENT_PLAN;
|
|
36
|
-
};
|
|
45
|
+
}; // @ts-expect-error TS(7006): Parameter 'paymentOption' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
46
|
+
|
|
37
47
|
var isTerminal = function isTerminal(paymentOption) {
|
|
38
48
|
return paymentOption === constants.TRANSACTION_PAYMENT_OPTIONS.TERMINAL;
|
|
39
49
|
};
|
package/redux-actions.d.ts
CHANGED
|
@@ -29,10 +29,10 @@ export declare function receiveSuccess(type: any, data: any): {
|
|
|
29
29
|
type: any;
|
|
30
30
|
data: any;
|
|
31
31
|
};
|
|
32
|
-
export declare function request(type: any, endpoint: any, data?:
|
|
32
|
+
export declare function request(type: any, endpoint: any, data?: null): {
|
|
33
33
|
type: any;
|
|
34
34
|
endpoint: any;
|
|
35
|
-
data:
|
|
35
|
+
data: null;
|
|
36
36
|
};
|
|
37
37
|
export declare const sdkActionCreator: (sdkAction: any, actions?: {}, funcs?: {}) => (dispatch: any) => Promise<any>;
|
|
38
38
|
declare const reduxActions: {};
|