@copart/ops-tool-kit 1.12.6-alpha.1 → 1.12.6-alpha.2
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/dist/ops-tool-kit.js +18 -4
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/dist/ops-tool-kit.js
CHANGED
|
@@ -47,7 +47,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
47
47
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
48
48
|
|
|
49
49
|
const name$r = "@copart/ops-tool-kit";
|
|
50
|
-
const version$8 = "1.12.6-alpha.
|
|
50
|
+
const version$8 = "1.12.6-alpha.2";
|
|
51
51
|
const main$1 = "dist/ops-tool-kit.js";
|
|
52
52
|
const style = "dist/ops-tool-kit.css";
|
|
53
53
|
const files = [
|
|
@@ -2622,6 +2622,9 @@ var createOpsStorage = function createOpsStorage() {
|
|
|
2622
2622
|
get userEmail() {
|
|
2623
2623
|
return getLocalItem('login', 'userData.entity_mail');
|
|
2624
2624
|
},
|
|
2625
|
+
get userCountry() {
|
|
2626
|
+
return getLocalItem('login', 'userData.entity_country');
|
|
2627
|
+
},
|
|
2625
2628
|
get accessToken() {
|
|
2626
2629
|
return getLocalItem('login', 'userData.access_token');
|
|
2627
2630
|
},
|
|
@@ -20654,7 +20657,13 @@ var locales = {
|
|
|
20654
20657
|
};
|
|
20655
20658
|
var language = 'en';
|
|
20656
20659
|
var locale = function locale(text) {
|
|
20657
|
-
|
|
20660
|
+
// Try to get translation for the current language
|
|
20661
|
+
var translation = pathOr$1(null, [language, text], locales);
|
|
20662
|
+
// If language doesn't exist or translation is missing, fallback to English
|
|
20663
|
+
if (translation === null || !locales[language]) {
|
|
20664
|
+
return pathOr$1(text, ['en', text], locales);
|
|
20665
|
+
}
|
|
20666
|
+
return translation;
|
|
20658
20667
|
};
|
|
20659
20668
|
|
|
20660
20669
|
var FEEDBACK_ENHANCEMENT_LINK = " https://coparto365.sharepoint.com/Innovations/PCI2016/default.aspx";
|
|
@@ -23334,6 +23343,10 @@ var finnish = {
|
|
|
23334
23343
|
code: 'fi',
|
|
23335
23344
|
description: 'Finnish'
|
|
23336
23345
|
};
|
|
23346
|
+
var portuguese = {
|
|
23347
|
+
code: 'pt',
|
|
23348
|
+
description: 'Portuguese'
|
|
23349
|
+
};
|
|
23337
23350
|
var getLanguages = function getLanguages() {
|
|
23338
23351
|
var selectedCountry = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
|
|
23339
23352
|
var stack = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'c';
|
|
@@ -23383,7 +23396,8 @@ var getLanguages = function getLanguages() {
|
|
|
23383
23396
|
en: english
|
|
23384
23397
|
},
|
|
23385
23398
|
BR: {
|
|
23386
|
-
en: english
|
|
23399
|
+
en: english,
|
|
23400
|
+
pt: portuguese
|
|
23387
23401
|
},
|
|
23388
23402
|
default: stack === 'c' ? {
|
|
23389
23403
|
en: english,
|
|
@@ -35520,7 +35534,7 @@ var fetchAvailableStatuses = /*#__PURE__*/function () {
|
|
|
35520
35534
|
case 0:
|
|
35521
35535
|
coreAppConfig = storage$1.getLocalItem('opsportal-core:config');
|
|
35522
35536
|
endpoints = coreAppConfig.endpoints;
|
|
35523
|
-
country = storage$1.
|
|
35537
|
+
country = storage$1.userCountry || 'US';
|
|
35524
35538
|
endpoint = frontEndUtils.string.substitute(endpoints.getAvailableStatuses, {
|
|
35525
35539
|
country: country
|
|
35526
35540
|
});
|