@medipass/utils 11.84.2 → 11.84.3-chore-remove-reacti18next-package.1

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/constants.d.ts CHANGED
@@ -258,10 +258,6 @@ export declare const HICAPS_FORMS: {
258
258
  readonly CLAIMING_PROVIDER_APPLICATION: "HICAPS Claiming Application";
259
259
  };
260
260
  export declare const PMS: readonly ["Best Practice (Allied)", "Best Practice (Premier)", "Clinic to Cloud", "Cliniko", "Coreplus", "Coviu", "Dental4Windows", "Doctors on Demand", "Exact", "Front Desk", "Genie", "Gensolve", "Gentu", "Halaxy / HealthKit", "Iconpractice", "Kalysys", "Lysn", "Medical Director", "Medilink", "Medirecords", "MedTech", "My Appointments", "Myhealth1st", "Nookal", "Oasis", "Owner.health", "Optomate", "Powerdiary", "PPMP", "PracSuite", "Shexie", "Splose", "Sunix", "TM2", "VisitBase", "ZedMed", "Zurili", "Other"];
261
- export declare const REGIONS: {
262
- readonly au: "au";
263
- readonly uk: "uk";
264
- };
265
261
  export declare const VERIFY_MEMBER_HEALTH_FUNDS_CODES: readonly ["BUP"];
266
262
  export declare const INVOICE_ORIGINATING_FLOW: {
267
263
  readonly ALLIED_PHI: "allied-phi";
package/constants.js CHANGED
@@ -317,14 +317,6 @@ var HICAPS_FORMS = {
317
317
  var PMS = ['Best Practice (Allied)', 'Best Practice (Premier)', 'Clinic to Cloud', 'Cliniko', 'Coreplus', 'Coviu', 'Dental4Windows', 'Doctors on Demand', 'Exact', 'Front Desk', 'Genie', 'Gensolve', 'Gentu', 'Halaxy / HealthKit', 'Iconpractice', 'Kalysys', 'Lysn', 'Medical Director', 'Medilink', 'Medirecords', 'MedTech', 'My Appointments', 'Myhealth1st', 'Nookal', 'Oasis', 'Owner.health', 'Optomate', 'Powerdiary', 'PPMP', 'PracSuite', 'Shexie', 'Splose', 'Sunix', 'TM2', 'VisitBase', 'ZedMed', 'Zurili', 'Other'];
318
318
  /* ====== END: PMS ======= */
319
319
 
320
- /* ====== START: REGIONS ======= */
321
-
322
- var REGIONS = {
323
- au: 'au',
324
- uk: 'uk'
325
- };
326
- /* ====== END: REGIONS ======= */
327
-
328
320
  /* ====== START: VERIFY MEMBER HEALTH FUNDS ======= */
329
321
 
330
322
  var VERIFY_MEMBER_HEALTH_FUNDS_CODES = ['BUP'];
@@ -435,7 +427,6 @@ exports.PAYMENT_TYPES = PAYMENT_TYPES;
435
427
  exports.PMS = PMS;
436
428
  exports.PRODUCTS = PRODUCTS;
437
429
  exports.PRODUCT_FEATURES = PRODUCT_FEATURES;
438
- exports.REGIONS = REGIONS;
439
430
  exports.STAFF_TYPES = STAFF_TYPES;
440
431
  exports.STANDALONE_ERRORS = STANDALONE_ERRORS;
441
432
  exports.STATUSES = STATUSES;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medipass/utils",
3
- "version": "11.84.2",
3
+ "version": "11.84.3-chore-remove-reacti18next-package.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -30,10 +30,9 @@
30
30
  "date-fns": "2.16.1",
31
31
  "escape-html": "1.0.3",
32
32
  "google-libphonenumber": "3.2.33",
33
- "i18next": "19.6.3",
34
33
  "jsdom": "22.0.0",
35
34
  "lodash": "4.17.21",
36
- "react-i18next": "11.7.0",
35
+ "moment": "2.22.2",
37
36
  "react-places-autocomplete": "7.3.0",
38
37
  "react-redux": "8.0.5",
39
38
  "redux": "4.2.1",
@@ -50,5 +49,5 @@
50
49
  "rimraf": "^2.6.2",
51
50
  "typescript": "4.8.4"
52
51
  },
53
- "gitHead": "46d157664632350331f2e23206dd0eea7197b087"
52
+ "gitHead": "87e3038c939aa04c5cb497863fac5043eeabcfdb"
54
53
  }
package/i18n/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- export * from 'react-i18next';
2
- declare const index: {
3
- i18n: {};
4
- setup({ region }: {
5
- region: any;
6
- }): void;
7
- };
8
- export default index;
package/i18n/index.js DELETED
@@ -1,62 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- var i18n = require('i18next');
7
- var reactI18next = require('react-i18next');
8
- var i18n_translations = require('./translations.js');
9
- require('../constants.js');
10
-
11
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
-
13
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
14
- var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
15
-
16
- 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; }
17
-
18
- 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__default["default"](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; }
19
-
20
- function getResources(translations) {
21
- return i18n_translations.regionsList.reduce(function (resources, region) {
22
- var _objectSpread3;
23
-
24
- return _objectSpread({}, resources, (_objectSpread3 = {}, _objectSpread3[region] = {
25
- translation: Object.entries(translations).reduce(function (currentTranslations, _ref) {
26
- var _objectSpread2;
27
-
28
- var key = _ref[0],
29
- value = _ref[1];
30
- // @ts-expect-error TS(2571): Object is of type 'unknown'.
31
- return _objectSpread({}, currentTranslations, (_objectSpread2 = {}, _objectSpread2[key] = value[region], _objectSpread2));
32
- }, {})
33
- }, _objectSpread3));
34
- }, {});
35
- }
36
-
37
- var index = {
38
- i18n: {},
39
- // @ts-expect-error TS(7031): Binding element 'region' implicitly has an 'any' t... Remove this comment to see the full error message
40
- setup: function setup(_ref2) {
41
- var region = _ref2.region;
42
- this.i18n = i18n__default["default"].use(reactI18next.initReactI18next).init({
43
- resources: getResources(i18n_translations["default"]),
44
- lng: region,
45
- fallbackLng: 'au',
46
- keySeparator: false,
47
- // we do not use keys in form messages.welcome
48
- interpolation: {
49
- escapeValue: false // react already safes from xss
50
-
51
- }
52
- });
53
- }
54
- };
55
-
56
- exports["default"] = index;
57
- Object.keys(reactI18next).forEach(function (k) {
58
- if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
59
- enumerable: true,
60
- get: function () { return reactI18next[k]; }
61
- });
62
- });
@@ -1,28 +0,0 @@
1
- export declare const regionsList: ("au" | "uk")[];
2
- declare const translations: {
3
- $: {
4
- au: string;
5
- uk: string;
6
- };
7
- business: {
8
- au: string;
9
- uk: string;
10
- };
11
- Business: {
12
- au: string;
13
- uk: string;
14
- };
15
- 'Business number': {
16
- au: string;
17
- uk: string;
18
- };
19
- 'placeholders.businessNumber': {
20
- au: string;
21
- uk: string;
22
- };
23
- 'fields.businessNumber': {
24
- au: string;
25
- uk: string;
26
- };
27
- };
28
- export default translations;
@@ -1,36 +0,0 @@
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',
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;