@medipass/utils 11.68.1-fix-package-release.0 → 11.68.3
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/CHANGELOG.md +33 -0
- package/billable-items-01050ba2.js +27 -0
- package/blah.js +2 -0
- package/build-validation-schema.js +1282 -0
- package/businesses-e3a20604.js +53 -0
- package/chart.js +45 -0
- package/claim-payment-status-formatted.js +12 -0
- package/claim-payment-status-icons.js +10 -0
- package/claim-payment-status-text-classes.js +10 -0
- package/constants.js +460 -0
- package/countries.js +1011 -0
- package/datetime.js +36 -0
- package/document-types-formatted.js +13 -0
- package/document-types-icons.js +10 -0
- package/document-types-text-classes.js +10 -0
- package/documents/workflow-state-formatted-text-classes.js +12 -0
- package/documents/workflow-state-formatted.js +15 -0
- package/documents/workflow-state-icons.js +10 -0
- package/form-applications/assign-values-to-sections.js +29 -0
- package/forms-f06ca97e.js +51 -0
- package/funders.js +122 -0
- package/get-env.js +196 -0
- package/get-select-options.js +65 -0
- package/get-staff-type-display-name.js +12 -0
- package/google-addresses.js +127 -0
- package/health-fund-accounts-3cd8650f.js +20 -0
- package/health-fund-settings-43327826.js +22 -0
- package/health-funds-300facef.js +194 -0
- package/i18n/index.js +59 -0
- package/i18n/translations.js +36 -0
- package/index.js +56 -0
- package/intercom.js +101 -0
- package/members-cb4f73a9.js +53 -0
- package/modalities-b360d521.js +19 -0
- package/normalise-abn.js +22 -0
- package/package.json +2 -2
- package/parse-health-fund-card-fields.js +12 -0
- package/patients-2083dd9c.js +46 -0
- package/payment-methods-4fa2d01f.js +26 -0
- package/payment-options.js +52 -0
- package/practices-3e703f22.js +87 -0
- package/products-bd313cb4.js +83 -0
- package/products.js +31 -0
- package/professional-categories-e2e5284b.js +19 -0
- package/redux-actions.js +161 -0
- package/redux-reducer.js +112 -0
- package/sanitise-url.js +17 -0
- package/scroll.js +9 -0
- package/sensitive-keys.js +9 -0
- package/sentry.js +112 -0
- package/service-items.js +230 -0
- package/services-2e25cdac.js +127 -0
- package/specialties-7640b7e3.js +20 -0
- package/staff-990794cd.js +161 -0
- package/status-icons.js +10 -0
- package/status-text-classes.js +10 -0
- package/subscriptions-45c1321a.js +160 -0
- package/test-framework/fixtures/accounts.js +34 -0
- package/test-framework/fixtures/billable-items.js +9 -0
- package/test-framework/fixtures/businesses.js +9 -0
- package/test-framework/fixtures/documents.js +121 -0
- package/test-framework/fixtures/form-application-templates.js +74 -0
- package/test-framework/fixtures/form-applications.js +39 -0
- package/test-framework/fixtures/forms.js +9 -0
- package/test-framework/fixtures/health-fund-accounts.js +9 -0
- package/test-framework/fixtures/health-fund-settings.js +9 -0
- package/test-framework/fixtures/health-funds.js +10 -0
- package/test-framework/fixtures/index.js +45 -0
- package/test-framework/fixtures/members.js +9 -0
- package/test-framework/fixtures/message-mappings.js +61 -0
- package/test-framework/fixtures/modalities.js +9 -0
- package/test-framework/fixtures/patients.js +9 -0
- package/test-framework/fixtures/payment-methods.js +9 -0
- package/test-framework/fixtures/practices.js +11 -0
- package/test-framework/fixtures/products.js +10 -0
- package/test-framework/fixtures/professional-categories.js +9 -0
- package/test-framework/fixtures/services.js +11 -0
- package/test-framework/fixtures/specialties.js +9 -0
- package/test-framework/fixtures/staff.js +12 -0
- package/test-framework/fixtures/subscriptions.js +13 -0
- package/test-framework/fixtures/transaction-reports.js +206 -0
- package/test-framework/fixtures/transactions.js +22 -0
- package/test-framework/fixtures/workflow-exceptions.js +32 -0
- package/test-framework/react.js +38 -0
- package/transaction-details-by-funder.js +81 -0
- package/transaction-status-formatted.js +13 -0
- package/transaction-status-helpers.js +77 -0
- package/transaction-status-icons.js +10 -0
- package/transaction-status-text-classes.js +10 -0
- package/transaction-status.js +42 -0
- package/transactions-6e5fd92d.js +1883 -0
- package/validate-form.js +388 -0
- package/validate.js +37 -0
- package/webpack-config.js +27 -0
- package/workflow-state-formatted-text-classes.js +12 -0
- package/workflow-state-formatted.js +13 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
|
+
|
|
7
|
+
var _regeneratorRuntime = _interopDefault(require('@babel/runtime/regenerator'));
|
|
8
|
+
var _asyncToGenerator = _interopDefault(require('@babel/runtime/helpers/asyncToGenerator'));
|
|
9
|
+
var reactPlacesAutocomplete = require('react-places-autocomplete');
|
|
10
|
+
var _forEach = _interopDefault(require('lodash/forEach'));
|
|
11
|
+
var _forOwn = _interopDefault(require('lodash/forOwn'));
|
|
12
|
+
|
|
13
|
+
var ADDRESS_COMPONENT_MAPPINGS = {
|
|
14
|
+
subpremise: 'subpremise',
|
|
15
|
+
streetNumber: 'street_number',
|
|
16
|
+
route: 'route',
|
|
17
|
+
country: 'country',
|
|
18
|
+
state: 'administrative_area_level_1',
|
|
19
|
+
city: 'locality',
|
|
20
|
+
postcode: 'postal_code'
|
|
21
|
+
};
|
|
22
|
+
function geocodeAddress(address) {
|
|
23
|
+
return new Promise( /*#__PURE__*/function () {
|
|
24
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(res, rej) {
|
|
25
|
+
var results, latLng;
|
|
26
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
27
|
+
while (1) {
|
|
28
|
+
switch (_context2.prev = _context2.next) {
|
|
29
|
+
case 0:
|
|
30
|
+
_context2.prev = 0;
|
|
31
|
+
_context2.next = 3;
|
|
32
|
+
return reactPlacesAutocomplete.geocodeByAddress(address);
|
|
33
|
+
|
|
34
|
+
case 3:
|
|
35
|
+
results = _context2.sent;
|
|
36
|
+
_context2.next = 6;
|
|
37
|
+
return reactPlacesAutocomplete.getLatLng(results[0]);
|
|
38
|
+
|
|
39
|
+
case 6:
|
|
40
|
+
latLng = _context2.sent;
|
|
41
|
+
res({
|
|
42
|
+
results: results,
|
|
43
|
+
latLng: latLng
|
|
44
|
+
});
|
|
45
|
+
_context2.next = 13;
|
|
46
|
+
break;
|
|
47
|
+
|
|
48
|
+
case 10:
|
|
49
|
+
_context2.prev = 10;
|
|
50
|
+
_context2.t0 = _context2["catch"](0);
|
|
51
|
+
|
|
52
|
+
if (_context2.t0 === 'OVER_QUERY_LIMIT') {
|
|
53
|
+
setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
54
|
+
var result;
|
|
55
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
56
|
+
while (1) {
|
|
57
|
+
switch (_context.prev = _context.next) {
|
|
58
|
+
case 0:
|
|
59
|
+
result = geocodeAddress(address);
|
|
60
|
+
res(result);
|
|
61
|
+
|
|
62
|
+
case 2:
|
|
63
|
+
case "end":
|
|
64
|
+
return _context.stop();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}, _callee);
|
|
68
|
+
})), 1000);
|
|
69
|
+
} else {
|
|
70
|
+
rej(_context2.t0);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
case 13:
|
|
74
|
+
case "end":
|
|
75
|
+
return _context2.stop();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, _callee2, null, [[0, 10]]);
|
|
79
|
+
}));
|
|
80
|
+
|
|
81
|
+
return function (_x, _x2) {
|
|
82
|
+
return _ref.apply(this, arguments);
|
|
83
|
+
};
|
|
84
|
+
}());
|
|
85
|
+
}
|
|
86
|
+
var mapAddressComponents = function mapAddressComponents(addressComponents) {
|
|
87
|
+
var components = {};
|
|
88
|
+
|
|
89
|
+
_forEach(addressComponents, function (component) {
|
|
90
|
+
_forOwn(ADDRESS_COMPONENT_MAPPINGS, function (mapping, key) {
|
|
91
|
+
if (component.types[0] === mapping) {
|
|
92
|
+
components[key] = {
|
|
93
|
+
longName: component.long_name,
|
|
94
|
+
shortName: component.short_name
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
return components;
|
|
101
|
+
};
|
|
102
|
+
var parseAddress = function parseAddress(addressComponents) {
|
|
103
|
+
var requestData = {};
|
|
104
|
+
|
|
105
|
+
if (addressComponents) {
|
|
106
|
+
var address = mapAddressComponents(addressComponents);
|
|
107
|
+
|
|
108
|
+
if (address.route) {
|
|
109
|
+
requestData.address = "" + (address.subpremise ? address.subpremise.longName + "/" : '') + ((address.streetNumber ? address.streetNumber.longName : '') + " ") + ("" + address.route.longName);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (address.country) {
|
|
113
|
+
requestData.countryCode = address.country.shortName;
|
|
114
|
+
requestData.country = address.country.longName;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
requestData.state = address.state ? address.state.longName : null;
|
|
118
|
+
requestData.city = address.city ? address.city.longName : null;
|
|
119
|
+
requestData.postcode = address.postcode ? address.postcode.longName : null;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return requestData;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
exports.geocodeAddress = geocodeAddress;
|
|
126
|
+
exports.mapAddressComponents = mapAddressComponents;
|
|
127
|
+
exports.parseAddress = parseAddress;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var defaultHealthFundAccount = {
|
|
4
|
+
memberNumber: '123456789',
|
|
5
|
+
lastFour: '6789',
|
|
6
|
+
rank: '01',
|
|
7
|
+
issueNumber: '01',
|
|
8
|
+
cardNumber: '01',
|
|
9
|
+
brand: 'Brand',
|
|
10
|
+
memberState: '01',
|
|
11
|
+
issueDate: '20/12/2000'
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
var healthFundAccounts = /*#__PURE__*/Object.freeze({
|
|
15
|
+
__proto__: null,
|
|
16
|
+
defaultHealthFundAccount: defaultHealthFundAccount
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
exports.defaultHealthFundAccount = defaultHealthFundAccount;
|
|
20
|
+
exports.healthFundAccounts = healthFundAccounts;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var defaultHealthFundSetting = {
|
|
4
|
+
_id: 'healthFundSettingTrustedProviderDefaultId',
|
|
5
|
+
settingType: 'trusted_provider',
|
|
6
|
+
healthFundId: 'healthFundDefaultId',
|
|
7
|
+
modalityId: 'modalityDefaultId',
|
|
8
|
+
practiceId: 'practiceDefaultId',
|
|
9
|
+
staffId: 'staffPractitionerDefaultId',
|
|
10
|
+
providerNumber: 'provider1',
|
|
11
|
+
enabled: true,
|
|
12
|
+
created: new Date('2017-10-01T00:00:00'),
|
|
13
|
+
modified: new Date('2017-10-01T00:00:00')
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
var healthFundSettings = /*#__PURE__*/Object.freeze({
|
|
17
|
+
__proto__: null,
|
|
18
|
+
defaultHealthFundSetting: defaultHealthFundSetting
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
exports.defaultHealthFundSetting = defaultHealthFundSetting;
|
|
22
|
+
exports.healthFundSettings = healthFundSettings;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var defaultHealthFund = {
|
|
4
|
+
_id: 'healthFundDefaultId',
|
|
5
|
+
code: 'BHE',
|
|
6
|
+
fullName: 'Be Healthy Pty Ltd',
|
|
7
|
+
displayName: 'B Healthy',
|
|
8
|
+
logoUrl: 'http://s3/image',
|
|
9
|
+
logoSmallUrl: 'http://s3/smallimage',
|
|
10
|
+
primaryColor: '#003363',
|
|
11
|
+
cardBgColorFront: '#a5ba22',
|
|
12
|
+
cardBgColorBack: '#aa22b2',
|
|
13
|
+
cardLogoUrl: 'http://s3/cardlogo',
|
|
14
|
+
cardImageUrl: 'http://s3/cardimage',
|
|
15
|
+
cardFields: [{
|
|
16
|
+
id: 'membershipNumber',
|
|
17
|
+
displayName: 'Customer number',
|
|
18
|
+
cardLabel: 'Cust no',
|
|
19
|
+
cardPosition: 'front',
|
|
20
|
+
cardInline: true,
|
|
21
|
+
cardStyle: "left: 10%; top: 10%; color: '#ffffff';",
|
|
22
|
+
// eslint-disable-line
|
|
23
|
+
reactNative: {
|
|
24
|
+
fieldPositionStyle: {
|
|
25
|
+
hello: 'world'
|
|
26
|
+
},
|
|
27
|
+
fieldTextStyle: {
|
|
28
|
+
hello: 'world'
|
|
29
|
+
},
|
|
30
|
+
fieldTextHighlightStyle: {
|
|
31
|
+
hello: 'world'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
inputType: 'text',
|
|
35
|
+
minLength: 1,
|
|
36
|
+
maxLength: 10,
|
|
37
|
+
mandatory: true
|
|
38
|
+
}, {
|
|
39
|
+
id: 'cardRank',
|
|
40
|
+
displayName: 'Reference number',
|
|
41
|
+
cardLabel: 'Ref no',
|
|
42
|
+
cardPosition: 'front',
|
|
43
|
+
cardInline: true,
|
|
44
|
+
cardStyle: "right: 20%; bottom: 10%; color: 'red';",
|
|
45
|
+
// eslint-disable-line
|
|
46
|
+
reactNative: {
|
|
47
|
+
fieldPositionStyle: {
|
|
48
|
+
hello: 'world'
|
|
49
|
+
},
|
|
50
|
+
fieldTextStyle: {
|
|
51
|
+
hello: 'world'
|
|
52
|
+
},
|
|
53
|
+
fieldTextHighlightStyle: {
|
|
54
|
+
hello: 'world'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
inputType: 'numeric',
|
|
58
|
+
minLength: 1,
|
|
59
|
+
maxLength: 10,
|
|
60
|
+
mandatory: true
|
|
61
|
+
}, {
|
|
62
|
+
id: 'cardIssueNumber',
|
|
63
|
+
displayName: 'Card issue number',
|
|
64
|
+
cardLabel: 'Card issue no',
|
|
65
|
+
cardPosition: 'back',
|
|
66
|
+
cardInline: true,
|
|
67
|
+
cardStyle: 'top: 30%;',
|
|
68
|
+
reactNative: {
|
|
69
|
+
fieldPositionStyle: {
|
|
70
|
+
hello: 'world'
|
|
71
|
+
},
|
|
72
|
+
fieldTextStyle: {
|
|
73
|
+
hello: 'world'
|
|
74
|
+
},
|
|
75
|
+
fieldTextHighlightStyle: {
|
|
76
|
+
hello: 'world'
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
inputType: 'alphanumeric',
|
|
80
|
+
minLength: 1,
|
|
81
|
+
maxLength: 10,
|
|
82
|
+
mandatory: true
|
|
83
|
+
}],
|
|
84
|
+
mfa: {
|
|
85
|
+
enabled: true,
|
|
86
|
+
strategy: 'sms',
|
|
87
|
+
expiresIn: 28,
|
|
88
|
+
expiresInType: 'days'
|
|
89
|
+
},
|
|
90
|
+
isPublic: true,
|
|
91
|
+
created: new Date('2015-01-01T00:00:00'),
|
|
92
|
+
modified: new Date('2015-01-02T00:00:00Z')
|
|
93
|
+
};
|
|
94
|
+
var medicareHealthFund = {
|
|
95
|
+
_id: 'medicareHealthFundDefaultId',
|
|
96
|
+
code: 'MDC',
|
|
97
|
+
fullName: 'Medicare',
|
|
98
|
+
displayName: 'Medicare',
|
|
99
|
+
logoUrl: 'http://s3/image',
|
|
100
|
+
logoSmallUrl: 'http://s3/smallimage',
|
|
101
|
+
primaryColor: '#ff0000',
|
|
102
|
+
cardBgColorFront: '#a5ba22',
|
|
103
|
+
cardBgColorBack: '#aa22b2',
|
|
104
|
+
cardLogoUrl: 'http://s3/cardlogo',
|
|
105
|
+
cardImageUrl: 'http://s3/cardimage',
|
|
106
|
+
cardFields: [{
|
|
107
|
+
id: 'membershipNumber',
|
|
108
|
+
displayName: 'Customer number',
|
|
109
|
+
cardLabel: 'Cust no',
|
|
110
|
+
cardPosition: 'front',
|
|
111
|
+
cardInline: true,
|
|
112
|
+
cardStyle: "left: 10%; top: 10%; color: '#ffffff';",
|
|
113
|
+
// eslint-disable-line
|
|
114
|
+
reactNative: {
|
|
115
|
+
fieldPositionStyle: {
|
|
116
|
+
hello: 'world'
|
|
117
|
+
},
|
|
118
|
+
fieldTextStyle: {
|
|
119
|
+
hello: 'world'
|
|
120
|
+
},
|
|
121
|
+
fieldTextHighlightStyle: {
|
|
122
|
+
hello: 'world'
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
inputType: 'text',
|
|
126
|
+
minLength: 1,
|
|
127
|
+
maxLength: 10,
|
|
128
|
+
mandatory: true
|
|
129
|
+
}, {
|
|
130
|
+
id: 'cardRank',
|
|
131
|
+
displayName: 'Reference number',
|
|
132
|
+
cardLabel: 'Ref no',
|
|
133
|
+
cardPosition: 'front',
|
|
134
|
+
cardInline: true,
|
|
135
|
+
cardStyle: "right: 20%; bottom: 10%; color: 'red';",
|
|
136
|
+
// eslint-disable-line
|
|
137
|
+
reactNative: {
|
|
138
|
+
fieldPositionStyle: {
|
|
139
|
+
hello: 'world'
|
|
140
|
+
},
|
|
141
|
+
fieldTextStyle: {
|
|
142
|
+
hello: 'world'
|
|
143
|
+
},
|
|
144
|
+
fieldTextHighlightStyle: {
|
|
145
|
+
hello: 'world'
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
inputType: 'numeric',
|
|
149
|
+
minLength: 1,
|
|
150
|
+
maxLength: 10,
|
|
151
|
+
mandatory: true
|
|
152
|
+
}, {
|
|
153
|
+
id: 'cardIssueNumber',
|
|
154
|
+
displayName: 'Card issue number',
|
|
155
|
+
cardLabel: 'Card issue no',
|
|
156
|
+
cardPosition: 'back',
|
|
157
|
+
cardInline: true,
|
|
158
|
+
cardStyle: 'top: 30%;',
|
|
159
|
+
reactNative: {
|
|
160
|
+
fieldPositionStyle: {
|
|
161
|
+
hello: 'world'
|
|
162
|
+
},
|
|
163
|
+
fieldTextStyle: {
|
|
164
|
+
hello: 'world'
|
|
165
|
+
},
|
|
166
|
+
fieldTextHighlightStyle: {
|
|
167
|
+
hello: 'world'
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
inputType: 'alphanumeric',
|
|
171
|
+
minLength: 1,
|
|
172
|
+
maxLength: 10,
|
|
173
|
+
mandatory: true
|
|
174
|
+
}],
|
|
175
|
+
mfa: {
|
|
176
|
+
enabled: true,
|
|
177
|
+
strategy: 'sms',
|
|
178
|
+
expiresIn: 28,
|
|
179
|
+
expiresInType: 'days'
|
|
180
|
+
},
|
|
181
|
+
isPublic: true,
|
|
182
|
+
created: new Date('2015-01-01T00:00:00'),
|
|
183
|
+
modified: new Date('2015-01-02T00:00:00Z')
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
var healthFunds = /*#__PURE__*/Object.freeze({
|
|
187
|
+
__proto__: null,
|
|
188
|
+
defaultHealthFund: defaultHealthFund,
|
|
189
|
+
medicareHealthFund: medicareHealthFund
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
exports.defaultHealthFund = defaultHealthFund;
|
|
193
|
+
exports.healthFunds = healthFunds;
|
|
194
|
+
exports.medicareHealthFund = medicareHealthFund;
|
package/i18n/index.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
|
+
|
|
7
|
+
require('../constants.js');
|
|
8
|
+
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty'));
|
|
9
|
+
var translations = require('./translations.js');
|
|
10
|
+
var i18n = _interopDefault(require('i18next'));
|
|
11
|
+
var reactI18next = require('react-i18next');
|
|
12
|
+
|
|
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; }
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
17
|
+
function getResources(translations$1) {
|
|
18
|
+
return translations.regionsList.reduce(function (resources, region) {
|
|
19
|
+
var _objectSpread3;
|
|
20
|
+
|
|
21
|
+
return _objectSpread({}, resources, (_objectSpread3 = {}, _objectSpread3[region] = {
|
|
22
|
+
translation: Object.entries(translations$1).reduce(function (currentTranslations, _ref) {
|
|
23
|
+
var _objectSpread2;
|
|
24
|
+
|
|
25
|
+
var key = _ref[0],
|
|
26
|
+
value = _ref[1];
|
|
27
|
+
return _objectSpread({}, currentTranslations, (_objectSpread2 = {}, _objectSpread2[key] = value[region], _objectSpread2));
|
|
28
|
+
}, {})
|
|
29
|
+
}, _objectSpread3));
|
|
30
|
+
}, {});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var index = {
|
|
34
|
+
i18n: {},
|
|
35
|
+
setup: function setup(_ref2) {
|
|
36
|
+
var region = _ref2.region;
|
|
37
|
+
this.i18n = i18n.use(reactI18next.initReactI18next).init({
|
|
38
|
+
resources: getResources(translations.default),
|
|
39
|
+
lng: region,
|
|
40
|
+
fallbackLng: 'au',
|
|
41
|
+
keySeparator: false,
|
|
42
|
+
// we do not use keys in form messages.welcome
|
|
43
|
+
interpolation: {
|
|
44
|
+
escapeValue: false // react already safes from xss
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
Object.keys(reactI18next).forEach(function (k) {
|
|
52
|
+
if (k !== 'default') Object.defineProperty(exports, k, {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () {
|
|
55
|
+
return reactI18next[k];
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
exports.default = index;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var constants = require('../constants.js');
|
|
6
|
+
|
|
7
|
+
var regionsList = Object.values(constants.REGIONS);
|
|
8
|
+
var translations = {
|
|
9
|
+
$: {
|
|
10
|
+
au: '$',
|
|
11
|
+
uk: '£'
|
|
12
|
+
},
|
|
13
|
+
business: {
|
|
14
|
+
au: 'business',
|
|
15
|
+
uk: 'company'
|
|
16
|
+
},
|
|
17
|
+
Business: {
|
|
18
|
+
au: 'Business',
|
|
19
|
+
uk: 'Company'
|
|
20
|
+
},
|
|
21
|
+
'Business number': {
|
|
22
|
+
au: 'ABN/ACN',
|
|
23
|
+
uk: 'Company number'
|
|
24
|
+
},
|
|
25
|
+
'placeholders.businessNumber': {
|
|
26
|
+
au: '53 123 456 789',
|
|
27
|
+
uk: '01234567'
|
|
28
|
+
},
|
|
29
|
+
'fields.businessNumber': {
|
|
30
|
+
au: 'abn',
|
|
31
|
+
uk: 'companyNumber'
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.default = translations;
|
|
36
|
+
exports.regionsList = regionsList;
|
package/index.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('./constants.js');
|
|
6
|
+
require('lodash/capitalize');
|
|
7
|
+
require('@babel/runtime/helpers/defineProperty');
|
|
8
|
+
require('yup');
|
|
9
|
+
require('core-js/es6/promise');
|
|
10
|
+
require('core-js/es6/set');
|
|
11
|
+
var validate = require('./validate.js');
|
|
12
|
+
require('@babel/runtime/regenerator');
|
|
13
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
14
|
+
require('lodash/get');
|
|
15
|
+
var transactionStatusTextClasses = require('./transaction-status-text-classes.js');
|
|
16
|
+
var claimPaymentStatusIcons = require('./claim-payment-status-icons.js');
|
|
17
|
+
var claimPaymentStatusTextClasses = require('./claim-payment-status-text-classes.js');
|
|
18
|
+
var transactionStatusHelpers = require('./transaction-status-helpers.js');
|
|
19
|
+
require('lodash/isEmpty');
|
|
20
|
+
var statusTextClasses = require('./status-text-classes.js');
|
|
21
|
+
require('@sentry/browser');
|
|
22
|
+
require('redux-sentry-middleware');
|
|
23
|
+
require('masked');
|
|
24
|
+
require('lodash/set');
|
|
25
|
+
var sensitiveKeys = require('./sensitive-keys.js');
|
|
26
|
+
var sentry = require('./sentry.js');
|
|
27
|
+
require('lodash/pick');
|
|
28
|
+
var reduxActions = require('./redux-actions.js');
|
|
29
|
+
var reduxReducer = require('./redux-reducer.js');
|
|
30
|
+
require('lodash/omitBy');
|
|
31
|
+
var getEnv = require('./get-env.js');
|
|
32
|
+
var intercom = require('./intercom.js');
|
|
33
|
+
require('moment');
|
|
34
|
+
var chart = require('./chart.js');
|
|
35
|
+
var getSelectOptions = require('./get-select-options.js');
|
|
36
|
+
var getStaffTypeDisplayName = require('./get-staff-type-display-name.js');
|
|
37
|
+
|
|
38
|
+
var index = {
|
|
39
|
+
chart: chart.default,
|
|
40
|
+
claimPaymentStatusIcons: claimPaymentStatusIcons.default,
|
|
41
|
+
claimPaymentStatusTextClasses: claimPaymentStatusTextClasses.default,
|
|
42
|
+
getEnv: getEnv.default,
|
|
43
|
+
getSelectOptions: getSelectOptions.default,
|
|
44
|
+
getStaffTypeDisplayName: getStaffTypeDisplayName.default,
|
|
45
|
+
intercom: intercom.default,
|
|
46
|
+
sentry: sentry.default,
|
|
47
|
+
reduxActions: reduxActions.default,
|
|
48
|
+
reduxReducer: reduxReducer.default,
|
|
49
|
+
sensitiveKeys: sensitiveKeys.default,
|
|
50
|
+
statusTextClasses: statusTextClasses.default,
|
|
51
|
+
transactionStatusHelpers: transactionStatusHelpers.default,
|
|
52
|
+
transactionStatusTextClasses: transactionStatusTextClasses.default,
|
|
53
|
+
validate: validate.default
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.default = index;
|
package/intercom.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
|
+
|
|
7
|
+
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty'));
|
|
8
|
+
var _regeneratorRuntime = _interopDefault(require('@babel/runtime/regenerator'));
|
|
9
|
+
var _asyncToGenerator = _interopDefault(require('@babel/runtime/helpers/asyncToGenerator'));
|
|
10
|
+
require('lodash/get');
|
|
11
|
+
require('lodash/isEmpty');
|
|
12
|
+
require('lodash/omitBy');
|
|
13
|
+
var getEnv = require('./get-env.js');
|
|
14
|
+
|
|
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
|
+
|
|
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
|
+
var bootIntercom = /*#__PURE__*/function () {
|
|
19
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(data) {
|
|
20
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
21
|
+
while (1) {
|
|
22
|
+
switch (_context.prev = _context.next) {
|
|
23
|
+
case 0:
|
|
24
|
+
return _context.abrupt("return", window.Intercom('boot', _objectSpread({}, data, {
|
|
25
|
+
app_id: getEnv.default.INTERCOM_APP_ID,
|
|
26
|
+
// eslint-disable-line camelcase
|
|
27
|
+
user_hash: data.intercomHash
|
|
28
|
+
})));
|
|
29
|
+
|
|
30
|
+
case 1:
|
|
31
|
+
case "end":
|
|
32
|
+
return _context.stop();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}, _callee);
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
return function bootIntercom(_x) {
|
|
39
|
+
return _ref.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
}();
|
|
42
|
+
var showNewMessage = function showNewMessage(message) {
|
|
43
|
+
return window.Intercom('showNewMessage', typeof message === 'string' ? message : '');
|
|
44
|
+
}; // eslint-disable-line new-cap
|
|
45
|
+
|
|
46
|
+
var shutdownIntercom = function shutdownIntercom() {
|
|
47
|
+
return window.Intercom('shutdown');
|
|
48
|
+
}; // eslint-disable-line new-cap
|
|
49
|
+
|
|
50
|
+
var trackEvent = function trackEvent(name, data) {
|
|
51
|
+
return window.Intercom('trackEvent', name, data);
|
|
52
|
+
}; // eslint-disable-line new-cap
|
|
53
|
+
|
|
54
|
+
var trackCreateDVAInvoice = function trackCreateDVAInvoice(data) {
|
|
55
|
+
return trackEvent('created-dva-invoice', data);
|
|
56
|
+
};
|
|
57
|
+
var trackCreateHICAPSInvoice = function trackCreateHICAPSInvoice(data) {
|
|
58
|
+
return trackEvent('created-hicaps-invoice', data);
|
|
59
|
+
};
|
|
60
|
+
var trackCreateGarrisonInvoice = function trackCreateGarrisonInvoice(data) {
|
|
61
|
+
return trackEvent('created-garrison-invoice', data);
|
|
62
|
+
};
|
|
63
|
+
var trackCreateMedicareInvoice = function trackCreateMedicareInvoice(data) {
|
|
64
|
+
return trackEvent('created-medicare-invoice', data);
|
|
65
|
+
};
|
|
66
|
+
var trackCreatePatientFundedInvoice = function trackCreatePatientFundedInvoice(data) {
|
|
67
|
+
return trackEvent('created-patient-funded-invoice', data);
|
|
68
|
+
};
|
|
69
|
+
var trackCreateNDISInvoice = function trackCreateNDISInvoice(data) {
|
|
70
|
+
return trackEvent('created-ndis-invoice', data);
|
|
71
|
+
};
|
|
72
|
+
var trackCreateOHCInvoice = function trackCreateOHCInvoice(data) {
|
|
73
|
+
return trackEvent('created-ohc-invoice', data);
|
|
74
|
+
};
|
|
75
|
+
var trackCreateVirtualTerminalInvoice = function trackCreateVirtualTerminalInvoice(data) {
|
|
76
|
+
return trackEvent('created-virtual-terminal-invoice', data);
|
|
77
|
+
};
|
|
78
|
+
var trackCreateQuote = function trackCreateQuote(data) {
|
|
79
|
+
return trackEvent('created-quote', data);
|
|
80
|
+
};
|
|
81
|
+
var updateIntercom = function updateIntercom(data) {
|
|
82
|
+
return window.Intercom('update', data);
|
|
83
|
+
}; // eslint-disable-line new-cap
|
|
84
|
+
|
|
85
|
+
var intercom = {};
|
|
86
|
+
|
|
87
|
+
exports.bootIntercom = bootIntercom;
|
|
88
|
+
exports.default = intercom;
|
|
89
|
+
exports.showNewMessage = showNewMessage;
|
|
90
|
+
exports.shutdownIntercom = shutdownIntercom;
|
|
91
|
+
exports.trackCreateDVAInvoice = trackCreateDVAInvoice;
|
|
92
|
+
exports.trackCreateGarrisonInvoice = trackCreateGarrisonInvoice;
|
|
93
|
+
exports.trackCreateHICAPSInvoice = trackCreateHICAPSInvoice;
|
|
94
|
+
exports.trackCreateMedicareInvoice = trackCreateMedicareInvoice;
|
|
95
|
+
exports.trackCreateNDISInvoice = trackCreateNDISInvoice;
|
|
96
|
+
exports.trackCreateOHCInvoice = trackCreateOHCInvoice;
|
|
97
|
+
exports.trackCreatePatientFundedInvoice = trackCreatePatientFundedInvoice;
|
|
98
|
+
exports.trackCreateQuote = trackCreateQuote;
|
|
99
|
+
exports.trackCreateVirtualTerminalInvoice = trackCreateVirtualTerminalInvoice;
|
|
100
|
+
exports.trackEvent = trackEvent;
|
|
101
|
+
exports.updateIntercom = updateIntercom;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var defaultMember = {
|
|
4
|
+
_id: 'memberDefaultId',
|
|
5
|
+
organisationId: 'organisationDefaultId',
|
|
6
|
+
firstName: 'Bruce',
|
|
7
|
+
lastName: 'Wayne',
|
|
8
|
+
firstNameLowerCase: 'bruce',
|
|
9
|
+
lastNameLowerCase: 'wayne',
|
|
10
|
+
email: 'mockaccountemail@localz.co',
|
|
11
|
+
mobile: '0400111222',
|
|
12
|
+
mobileE164: '+61400111222',
|
|
13
|
+
searchWords: ['bruce', 'wayne', 'bruce wayne', 'wayne bruce', '0400111222', '+61400111222', 'mockaccountemail@localz.co'],
|
|
14
|
+
healthFundSearchWords: ['bruce', 'wayne', 'bruce wayne', 'wayne bruce', '0400111222', '+61400111222', 'mockaccountemail@localz.co', '123456789'],
|
|
15
|
+
gender: 'M',
|
|
16
|
+
dob: new Date('1984-02-19T00:00:00+10:00'),
|
|
17
|
+
dobString: '1984-02-19',
|
|
18
|
+
address: '1 Batcave Street',
|
|
19
|
+
city: 'Gotham City',
|
|
20
|
+
postcode: '3000',
|
|
21
|
+
state: 'Victoria',
|
|
22
|
+
country: 'Australia',
|
|
23
|
+
countryCode: 'au',
|
|
24
|
+
lnglat: [145.066048, -37.923254],
|
|
25
|
+
status: 'ACTIVE',
|
|
26
|
+
medicareAccount: {
|
|
27
|
+
membershipNumber: '111222222',
|
|
28
|
+
lastFour: '2222',
|
|
29
|
+
cardRank: '02',
|
|
30
|
+
expiryMonth: '11',
|
|
31
|
+
expiryYear: '2020'
|
|
32
|
+
},
|
|
33
|
+
emergencyContact: {
|
|
34
|
+
firstName: 'Alfred',
|
|
35
|
+
lastName: 'Pennyworth',
|
|
36
|
+
mobile: '+61400333999',
|
|
37
|
+
landline: '+61390009999',
|
|
38
|
+
relationship: 'Butler'
|
|
39
|
+
},
|
|
40
|
+
defaultHealthFundAccountId: 'healthFundAccountDefaultId',
|
|
41
|
+
defaultHealthFundAccountCardRank: '01',
|
|
42
|
+
defaultHealthFundId: 'healthFundDefaultId',
|
|
43
|
+
created: new Date('2015-01-01T00:00:00'),
|
|
44
|
+
modified: new Date('2015-01-02T00:00:00Z')
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var members = /*#__PURE__*/Object.freeze({
|
|
48
|
+
__proto__: null,
|
|
49
|
+
defaultMember: defaultMember
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
exports.defaultMember = defaultMember;
|
|
53
|
+
exports.members = members;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var defaultModality = {
|
|
4
|
+
_id: 'modalityDefaultId',
|
|
5
|
+
fullName: 'Chiropractic',
|
|
6
|
+
displayName: 'mockDisplayName',
|
|
7
|
+
relatedPracticeTypeIds: ['practiceTypeDefaultId'],
|
|
8
|
+
status: 'ACTIVE',
|
|
9
|
+
created: new Date('2015-01-01T00:00:00'),
|
|
10
|
+
modified: new Date('2015-01-02T00:00:00Z')
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
var modalities = /*#__PURE__*/Object.freeze({
|
|
14
|
+
__proto__: null,
|
|
15
|
+
defaultModality: defaultModality
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
exports.defaultModality = defaultModality;
|
|
19
|
+
exports.modalities = modalities;
|