@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.
- package/.eslintignore +1 -0
- package/.eslintrc.cjs +3 -0
- package/CHANGELOG.md +11 -0
- package/{billable-items-01050ba2.js → billable-items-f8291b1e.js} +0 -0
- package/build-validation-schema.js +14 -1
- package/{businesses-e3a20604.js → businesses-2633ab9b.js} +0 -0
- package/chart.js +2 -0
- package/{forms-f06ca97e.js → forms-e1c51a53.js} +0 -0
- package/get-select-options.js +1 -0
- package/google-addresses.js +17 -7
- package/{health-fund-accounts-3cd8650f.js → health-fund-accounts-88eac93c.js} +0 -0
- package/{health-fund-settings-43327826.js → health-fund-settings-e7a0f2ec.js} +0 -0
- package/{health-funds-300facef.js → health-funds-7fea63a0.js} +0 -0
- package/intercom.js +7 -2
- package/lib/__tests__/get-env.test.d.ts +1 -0
- package/lib/__tests__/get-staff-type-display-name.test.d.ts +1 -0
- package/lib/__tests__/redux-actions.test.d.ts +1 -0
- package/lib/__tests__/redux-reducer.test.d.ts +1 -0
- package/lib/__tests__/validate.test.d.ts +1 -0
- package/lib/build-validation-schema.d.ts +149 -0
- package/lib/chart.d.ts +9 -0
- package/lib/claim-payment-status-formatted.d.ts +6 -0
- package/lib/claim-payment-status-icons.d.ts +4 -0
- package/lib/claim-payment-status-text-classes.d.ts +4 -0
- package/lib/constants.d.ts +325 -0
- package/lib/countries.d.ts +10 -0
- package/lib/datetime.d.ts +2 -0
- package/lib/document-types-formatted.d.ts +9 -0
- package/lib/document-types-icons.d.ts +4 -0
- package/lib/document-types-text-classes.d.ts +4 -0
- package/lib/documents/workflow-state-formatted-text-classes.d.ts +6 -0
- package/lib/documents/workflow-state-formatted.d.ts +6 -0
- package/lib/documents/workflow-state-icons.d.ts +5 -0
- package/lib/form-applications/assign-values-to-sections.d.ts +5 -0
- package/lib/funders.d.ts +20 -0
- package/lib/get-env.d.ts +22 -0
- package/lib/get-select-options.d.ts +9 -0
- package/lib/get-staff-type-display-name.d.ts +2 -0
- package/lib/google-addresses.d.ts +3 -0
- package/lib/i18n/index.d.ts +8 -0
- package/lib/i18n/translations.d.ts +28 -0
- package/lib/index.d.ts +47 -0
- package/lib/intercom.d.ts +16 -0
- package/lib/normalise-abn.d.ts +2 -0
- package/lib/parse-health-fund-card-fields.d.ts +2 -0
- package/lib/payment-options.d.ts +13 -0
- package/lib/products.d.ts +4 -0
- package/lib/redux-actions.d.ts +35 -0
- package/lib/redux-reducer.d.ts +24 -0
- package/lib/sanitise-url.d.ts +4 -0
- package/lib/scroll.d.ts +2 -0
- package/lib/sensitive-keys.d.ts +3 -0
- package/lib/sentry.d.ts +15 -0
- package/lib/service-items.d.ts +37 -0
- package/lib/status-icons.d.ts +4 -0
- package/lib/status-text-classes.d.ts +4 -0
- package/lib/test-framework/fixtures/accounts.d.ts +28 -0
- package/lib/test-framework/fixtures/billable-items.d.ts +17 -0
- package/lib/test-framework/fixtures/businesses.d.ts +43 -0
- package/lib/test-framework/fixtures/documents.d.ts +113 -0
- package/lib/test-framework/fixtures/form-application-templates.d.ts +66 -0
- package/lib/test-framework/fixtures/form-applications.d.ts +30 -0
- package/lib/test-framework/fixtures/forms.d.ts +41 -0
- package/lib/test-framework/fixtures/health-fund-accounts.d.ts +10 -0
- package/lib/test-framework/fixtures/health-fund-settings.d.ts +12 -0
- package/lib/test-framework/fixtures/health-funds.d.ts +90 -0
- package/lib/test-framework/fixtures/index.d.ts +39 -0
- package/lib/test-framework/fixtures/members.d.ts +43 -0
- package/lib/test-framework/fixtures/message-mappings.d.ts +19 -0
- package/lib/test-framework/fixtures/modalities.d.ts +9 -0
- package/lib/test-framework/fixtures/patients.d.ts +36 -0
- package/lib/test-framework/fixtures/payment-methods.d.ts +16 -0
- package/lib/test-framework/fixtures/practices.d.ts +105 -0
- package/lib/test-framework/fixtures/products.d.ts +46 -0
- package/lib/test-framework/fixtures/professional-categories.d.ts +9 -0
- package/lib/test-framework/fixtures/services.d.ts +93 -0
- package/lib/test-framework/fixtures/specialties.d.ts +10 -0
- package/lib/test-framework/fixtures/staff.d.ts +139 -0
- package/lib/test-framework/fixtures/subscriptions.d.ts +142 -0
- package/lib/test-framework/fixtures/transaction-reports.d.ts +156 -0
- package/lib/test-framework/fixtures/transactions.d.ts +1832 -0
- package/lib/test-framework/fixtures/workflow-exceptions.d.ts +25 -0
- package/lib/test-framework/react.d.ts +8 -0
- package/lib/transaction-details-by-funder.d.ts +33 -0
- package/lib/transaction-status-formatted.d.ts +9 -0
- package/lib/transaction-status-helpers.d.ts +20 -0
- package/lib/transaction-status-icons.d.ts +4 -0
- package/lib/transaction-status-text-classes.d.ts +4 -0
- package/lib/transaction-status.d.ts +1 -0
- package/lib/validate-form.d.ts +45 -0
- package/lib/validate.d.ts +15 -0
- package/lib/webpack-config.d.ts +4 -0
- package/lib/workflow-state-formatted-text-classes.d.ts +5 -0
- package/lib/workflow-state-formatted.d.ts +4 -0
- package/{members-cb4f73a9.js → members-8eb8d8d0.js} +0 -0
- package/{modalities-b360d521.js → modalities-2dfbea63.js} +0 -0
- package/package.json +9 -6
- package/{patients-2083dd9c.js → patients-dd3709c1.js} +0 -0
- package/{payment-methods-4fa2d01f.js → payment-methods-d36bc018.js} +0 -0
- package/{practices-3e703f22.js → practices-d6c480f1.js} +0 -0
- package/{products-bd313cb4.js → products-0a392564.js} +0 -0
- package/{professional-categories-e2e5284b.js → professional-categories-157d1767.js} +0 -0
- package/redux-actions.js +13 -3
- package/redux-reducer.js +1 -0
- package/sentry.js +3 -1
- package/service-items.js +5 -34
- package/{services-2e25cdac.js → services-f8480eba.js} +0 -0
- package/{specialties-7640b7e3.js → specialties-25fbb171.js} +0 -0
- package/{staff-990794cd.js → staff-646053b7.js} +0 -0
- package/{subscriptions-45c1321a.js → subscriptions-aef302aa.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 +1 -0
- package/transaction-status.js +2 -2
- package/{transactions-6e5fd92d.js → transactions-4a08e450.js} +0 -0
- package/tsconfig.json +32 -0
- package/validate-form.js +3 -3
- package/.eslintrc +0 -3
- package/blah.js +0 -2
package/.eslintignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
lib/*
|
package/.eslintrc.cjs
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.71.0](https://github.com/medipass/web-medicules/compare/@medipass/utils@11.70.0...@medipass/utils@11.71.0) (2022-10-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **utils:** convert to ts ([#699](https://github.com/medipass/web-medicules/issues/699)) ([e679b9c](https://github.com/medipass/web-medicules/commit/e679b9c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [11.70.0](https://github.com/medipass/web-medicules/compare/@medipass/utils@11.69.2...@medipass/utils@11.70.0) (2022-10-21)
|
|
7
18
|
|
|
8
19
|
|
|
File without changes
|
|
@@ -1092,42 +1092,49 @@ 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
|
|
1095
1096
|
schema = schema.string();
|
|
1096
1097
|
break;
|
|
1097
1098
|
}
|
|
1098
1099
|
|
|
1099
1100
|
case 'object':
|
|
1100
1101
|
{
|
|
1102
|
+
// @ts-expect-error TS(2740): Type 'OptionalObjectSchema<ObjectShape, Record<str... Remove this comment to see the full error message
|
|
1101
1103
|
schema = schema.object();
|
|
1102
1104
|
break;
|
|
1103
1105
|
}
|
|
1104
1106
|
|
|
1105
1107
|
case 'array':
|
|
1106
1108
|
{
|
|
1109
|
+
// @ts-expect-error TS(2740): Type 'OptionalArraySchema<AnySchema<any, any, any>... Remove this comment to see the full error message
|
|
1107
1110
|
schema = schema.array();
|
|
1108
1111
|
break;
|
|
1109
1112
|
}
|
|
1110
1113
|
|
|
1111
1114
|
case 'boolean':
|
|
1112
1115
|
{
|
|
1116
|
+
// @ts-expect-error TS(2740): Type 'BooleanSchema<boolean, Record<string, any>, ... Remove this comment to see the full error message
|
|
1113
1117
|
schema = schema.boolean();
|
|
1114
1118
|
break;
|
|
1115
1119
|
}
|
|
1116
1120
|
|
|
1117
1121
|
case 'date':
|
|
1118
1122
|
{
|
|
1123
|
+
// @ts-expect-error TS(2740): Type 'DateSchema<Date, Record<string, any>, Date>'... Remove this comment to see the full error message
|
|
1119
1124
|
schema = schema.date();
|
|
1120
1125
|
break;
|
|
1121
1126
|
}
|
|
1122
1127
|
|
|
1123
1128
|
case 'number':
|
|
1124
1129
|
{
|
|
1130
|
+
// @ts-expect-error TS(2740): Type 'NumberSchema<number, Record<string, any>, nu... Remove this comment to see the full error message
|
|
1125
1131
|
schema = schema.number();
|
|
1126
1132
|
break;
|
|
1127
1133
|
}
|
|
1128
1134
|
|
|
1129
1135
|
default:
|
|
1130
1136
|
{
|
|
1137
|
+
// @ts-expect-error TS(2322): Type 'StringSchema<string, Record<string, any>, st... Remove this comment to see the full error message
|
|
1131
1138
|
schema = schema.string();
|
|
1132
1139
|
}
|
|
1133
1140
|
}
|
|
@@ -1139,7 +1146,8 @@ var getFieldSchema = function getFieldSchema(field) {
|
|
|
1139
1146
|
{
|
|
1140
1147
|
if (defaultFieldExists && !field.required) {
|
|
1141
1148
|
return;
|
|
1142
|
-
}
|
|
1149
|
+
} // @ts-expect-error TS(2339): Property 'required' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
1150
|
+
|
|
1143
1151
|
|
|
1144
1152
|
schema = schema.required(validator.message);
|
|
1145
1153
|
break;
|
|
@@ -1147,30 +1155,35 @@ var getFieldSchema = function getFieldSchema(field) {
|
|
|
1147
1155
|
|
|
1148
1156
|
case 'test':
|
|
1149
1157
|
{
|
|
1158
|
+
// @ts-expect-error TS(2339): Property 'test' does not exist on type 'typeof imp... Remove this comment to see the full error message
|
|
1150
1159
|
schema = schema.test(field.name, validator.message, validator.fn);
|
|
1151
1160
|
break;
|
|
1152
1161
|
}
|
|
1153
1162
|
|
|
1154
1163
|
case 'email':
|
|
1155
1164
|
{
|
|
1165
|
+
// @ts-expect-error TS(2339): Property 'email' does not exist on type 'typeof im... Remove this comment to see the full error message
|
|
1156
1166
|
schema = schema.email(validator.message);
|
|
1157
1167
|
break;
|
|
1158
1168
|
}
|
|
1159
1169
|
|
|
1160
1170
|
case 'min':
|
|
1161
1171
|
{
|
|
1172
|
+
// @ts-expect-error TS(2339): Property 'min' does not exist on type 'typeof impo... Remove this comment to see the full error message
|
|
1162
1173
|
schema = schema.min(validator.length, validator.message);
|
|
1163
1174
|
break;
|
|
1164
1175
|
}
|
|
1165
1176
|
|
|
1166
1177
|
case 'matches':
|
|
1167
1178
|
{
|
|
1179
|
+
// @ts-expect-error TS(2339): Property 'matches' does not exist on type 'typeof ... Remove this comment to see the full error message
|
|
1168
1180
|
schema = schema.matches(validator.pattern, validator.message);
|
|
1169
1181
|
break;
|
|
1170
1182
|
}
|
|
1171
1183
|
|
|
1172
1184
|
case 'oneOf':
|
|
1173
1185
|
{
|
|
1186
|
+
// @ts-expect-error TS(2339): Property 'oneOf' does not exist on type 'typeof im... Remove this comment to see the full error message
|
|
1174
1187
|
schema = schema.oneOf([yup.ref(validator.fieldName), null], validator.message);
|
|
1175
1188
|
break;
|
|
1176
1189
|
}
|
|
File without changes
|
package/chart.js
CHANGED
|
@@ -14,7 +14,9 @@ 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 '{}'.
|
|
17
18
|
if (opts.format) {
|
|
19
|
+
// @ts-expect-error TS(2339): Property 'format' does not exist on type '{}'.
|
|
18
20
|
return moment(data[labelKey]).format(opts.format);
|
|
19
21
|
}
|
|
20
22
|
|
|
File without changes
|
package/get-select-options.js
CHANGED
|
@@ -22,6 +22,7 @@ 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
|
|
25
26
|
label: opts.labelKeyFunc ? opts.labelKeyFunc(value) : _get(value, labelKey),
|
|
26
27
|
value: valueKey ? _get(value, valueKey) : value
|
|
27
28
|
};
|
package/google-addresses.js
CHANGED
|
@@ -103,19 +103,29 @@ 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); // @ts-expect-error TS(2339): Property 'route' does not exist on type '{}'.
|
|
107
107
|
|
|
108
108
|
if (address.route) {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
// @ts-expect-error TS(2339): Property 'address' does not exist on type '{}'.
|
|
110
|
+
requestData.address = // @ts-expect-error
|
|
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
|
+
|
|
111
116
|
|
|
112
117
|
if (address.country) {
|
|
113
|
-
|
|
118
|
+
// @ts-expect-error TS(2339): Property 'countryCode' does not exist on type '{}'... Remove this comment to see the full error message
|
|
119
|
+
requestData.countryCode = address.country.shortName; // @ts-expect-error TS(2339): Property 'country' does not exist on type '{}'.
|
|
120
|
+
|
|
114
121
|
requestData.country = address.country.longName;
|
|
115
|
-
}
|
|
122
|
+
} // @ts-expect-error TS(2339): Property 'state' does not exist on type '{}'.
|
|
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 '{}'.
|
|
116
128
|
|
|
117
|
-
requestData.state = address.state ? address.state.longName : null;
|
|
118
|
-
requestData.city = address.city ? address.city.longName : null;
|
|
119
129
|
requestData.postcode = address.postcode ? address.postcode.longName : null;
|
|
120
130
|
}
|
|
121
131
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/intercom.js
CHANGED
|
@@ -22,6 +22,7 @@ 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
|
|
25
26
|
app_id: getEnv.default.INTERCOM_APP_ID,
|
|
26
27
|
// eslint-disable-line camelcase
|
|
27
28
|
user_hash: data.intercomHash
|
|
@@ -38,14 +39,17 @@ var bootIntercom = /*#__PURE__*/function () {
|
|
|
38
39
|
return function bootIntercom(_x) {
|
|
39
40
|
return _ref.apply(this, arguments);
|
|
40
41
|
};
|
|
41
|
-
}();
|
|
42
|
+
}(); // @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
|
|
43
|
+
|
|
42
44
|
var showNewMessage = function showNewMessage(message) {
|
|
43
45
|
return window.Intercom('showNewMessage', typeof message === 'string' ? message : '');
|
|
44
46
|
}; // 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
|
|
45
48
|
|
|
46
49
|
var shutdownIntercom = function shutdownIntercom() {
|
|
47
50
|
return window.Intercom('shutdown');
|
|
48
51
|
}; // 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
|
|
49
53
|
|
|
50
54
|
var trackEvent = function trackEvent(name, data) {
|
|
51
55
|
return window.Intercom('trackEvent', name, data);
|
|
@@ -77,7 +81,8 @@ var trackCreateVirtualTerminalInvoice = function trackCreateVirtualTerminalInvoi
|
|
|
77
81
|
};
|
|
78
82
|
var trackCreateQuote = function trackCreateQuote(data) {
|
|
79
83
|
return trackEvent('created-quote', data);
|
|
80
|
-
};
|
|
84
|
+
}; // @ts-expect-error TS(2339): Property 'Intercom' does not exist on type 'Window... Remove this comment to see the full error message
|
|
85
|
+
|
|
81
86
|
var updateIntercom = function updateIntercom(data) {
|
|
82
87
|
return window.Intercom('update', data);
|
|
83
88
|
}; // eslint-disable-line new-cap
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
export declare const FIELD_VALIDATORS: {
|
|
3
|
+
firstName: {
|
|
4
|
+
type: string;
|
|
5
|
+
validators: {
|
|
6
|
+
type: string;
|
|
7
|
+
message: string;
|
|
8
|
+
}[];
|
|
9
|
+
};
|
|
10
|
+
lastName: {
|
|
11
|
+
type: string;
|
|
12
|
+
validators: {
|
|
13
|
+
type: string;
|
|
14
|
+
message: string;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
dob: {
|
|
18
|
+
type: string;
|
|
19
|
+
validators: ({
|
|
20
|
+
type: string;
|
|
21
|
+
message: string;
|
|
22
|
+
fn?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
type: string;
|
|
25
|
+
message: string;
|
|
26
|
+
fn: (value: any) => boolean;
|
|
27
|
+
})[];
|
|
28
|
+
};
|
|
29
|
+
email: {
|
|
30
|
+
type: string;
|
|
31
|
+
validators: {
|
|
32
|
+
type: string;
|
|
33
|
+
message: string;
|
|
34
|
+
}[];
|
|
35
|
+
};
|
|
36
|
+
mobile: {
|
|
37
|
+
type: string;
|
|
38
|
+
validators: ({
|
|
39
|
+
type: string;
|
|
40
|
+
message: string;
|
|
41
|
+
fn?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
type: string;
|
|
44
|
+
message: string;
|
|
45
|
+
fn: (value: any) => any;
|
|
46
|
+
})[];
|
|
47
|
+
};
|
|
48
|
+
password: {
|
|
49
|
+
type: string;
|
|
50
|
+
validators: {
|
|
51
|
+
type: string;
|
|
52
|
+
message: string;
|
|
53
|
+
}[];
|
|
54
|
+
};
|
|
55
|
+
newPassword: {
|
|
56
|
+
type: string;
|
|
57
|
+
validators: ({
|
|
58
|
+
key: string;
|
|
59
|
+
type: string;
|
|
60
|
+
message: string;
|
|
61
|
+
length?: undefined;
|
|
62
|
+
pattern?: undefined;
|
|
63
|
+
} | {
|
|
64
|
+
key: string;
|
|
65
|
+
type: string;
|
|
66
|
+
length: number;
|
|
67
|
+
message: string;
|
|
68
|
+
pattern?: undefined;
|
|
69
|
+
} | {
|
|
70
|
+
key: string;
|
|
71
|
+
type: string;
|
|
72
|
+
pattern: RegExp;
|
|
73
|
+
message: string;
|
|
74
|
+
length?: undefined;
|
|
75
|
+
})[];
|
|
76
|
+
};
|
|
77
|
+
repeatPassword: {
|
|
78
|
+
type: string;
|
|
79
|
+
validators: ({
|
|
80
|
+
type: string;
|
|
81
|
+
message: string;
|
|
82
|
+
fieldName?: undefined;
|
|
83
|
+
} | {
|
|
84
|
+
type: string;
|
|
85
|
+
fieldName: string;
|
|
86
|
+
message: string;
|
|
87
|
+
})[];
|
|
88
|
+
};
|
|
89
|
+
cardNumber: {
|
|
90
|
+
type: string;
|
|
91
|
+
validators: ({
|
|
92
|
+
type: string;
|
|
93
|
+
message: string;
|
|
94
|
+
fn?: undefined;
|
|
95
|
+
} | {
|
|
96
|
+
type: string;
|
|
97
|
+
message: string;
|
|
98
|
+
fn: (value: any) => any;
|
|
99
|
+
})[];
|
|
100
|
+
};
|
|
101
|
+
expiry: {
|
|
102
|
+
type: string;
|
|
103
|
+
validators: ({
|
|
104
|
+
type: string;
|
|
105
|
+
message: string;
|
|
106
|
+
fn?: undefined;
|
|
107
|
+
} | {
|
|
108
|
+
type: string;
|
|
109
|
+
message: string;
|
|
110
|
+
fn: (value: any) => any;
|
|
111
|
+
})[];
|
|
112
|
+
};
|
|
113
|
+
cvc: {
|
|
114
|
+
type: string;
|
|
115
|
+
validators: ({
|
|
116
|
+
type: string;
|
|
117
|
+
message: string;
|
|
118
|
+
fn?: undefined;
|
|
119
|
+
} | {
|
|
120
|
+
type: string;
|
|
121
|
+
message: string;
|
|
122
|
+
fn: (value: any) => any;
|
|
123
|
+
})[];
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
declare const _default: (fields: Array<{
|
|
127
|
+
name: string;
|
|
128
|
+
key?: string;
|
|
129
|
+
required?: boolean;
|
|
130
|
+
validators: Array<Record<string, any>>;
|
|
131
|
+
}>, overrideSchema?: Record<string, any>) => yup.ObjectSchema<{
|
|
132
|
+
[x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
|
|
133
|
+
}, Record<string, any>, import("yup/lib/object").TypeOfShape<{
|
|
134
|
+
[x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
|
|
135
|
+
}>, import("yup/lib/object").AssertsShape<{
|
|
136
|
+
[x: string]: yup.AnySchema<any, any, any> | import("yup/lib/Reference").default<unknown> | import("yup/lib/Lazy").default<any, any>;
|
|
137
|
+
}>>;
|
|
138
|
+
export default _default;
|
|
139
|
+
export declare const paymentMethodValidationSchema: {
|
|
140
|
+
name: string;
|
|
141
|
+
}[];
|
|
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>>;
|
|
149
|
+
};
|
package/lib/chart.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const buildChartLabelsFromDataset: (dataset: any, labelKey: any, opts?: {}) => any;
|
|
2
|
+
export declare const buildDataPointsFromDataset: (dataset: any, dataKey: any) => any;
|
|
3
|
+
export declare const humanizePeriod: (period: any) => string;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
buildChartLabelsFromDataset: (dataset: any, labelKey: any, opts?: {}) => any;
|
|
6
|
+
buildDataPointsFromDataset: (dataset: any, dataKey: any) => any;
|
|
7
|
+
humanizePeriod: (period: any) => string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|