@copart/ops-tool-kit 1.10.0-alpha.11 → 1.10.0-alpha.12
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 +134 -129
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/dist/ops-tool-kit.js
CHANGED
|
@@ -33,7 +33,7 @@ var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
|
33
33
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
34
34
|
|
|
35
35
|
const name$e = "@copart/ops-tool-kit";
|
|
36
|
-
const version$3 = "1.10.0-alpha.
|
|
36
|
+
const version$3 = "1.10.0-alpha.12";
|
|
37
37
|
const main = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -22336,6 +22336,134 @@ var viewMapper = {
|
|
|
22336
22336
|
release_notes: views.RELEASE_NOTE
|
|
22337
22337
|
};
|
|
22338
22338
|
|
|
22339
|
+
var getRecommendedHelpArticles = function getRecommendedHelpArticles(helpContent) {
|
|
22340
|
+
var articles = !isNil$1(helpContent) ? _toConsumableArray(helpContent === null || helpContent === void 0 ? void 0 : helpContent.helpArticles) : []; // const sortedByLikes = sortedBySequence.sort((a, b) => {
|
|
22341
|
+
// return parseInt(b.likes) - parseInt(a.likes)
|
|
22342
|
+
// })
|
|
22343
|
+
|
|
22344
|
+
var recomendedArticles = articles.filter(function (article) {
|
|
22345
|
+
return article.recomended === 'true';
|
|
22346
|
+
});
|
|
22347
|
+
var sortedBySequence = recomendedArticles.sort(function (a, b) {
|
|
22348
|
+
return parseInt(a.sequence) - parseInt(b.sequence);
|
|
22349
|
+
});
|
|
22350
|
+
return sortedBySequence;
|
|
22351
|
+
};
|
|
22352
|
+
var getFaqs = function getFaqs(helpContent) {
|
|
22353
|
+
var _helpContent$faqs$;
|
|
22354
|
+
|
|
22355
|
+
var faqData = !isNil$1(helpContent) ? (_helpContent$faqs$ = helpContent.faqs[0]) === null || _helpContent$faqs$ === void 0 ? void 0 : _helpContent$faqs$.content : '';
|
|
22356
|
+
if (!faqData) return [];
|
|
22357
|
+
var faqObj = JSON.parse(faqData.slice(faqData.indexOf('wp:acf/faq')).replace('wp:acf/faq', '').replace('/-->', '').trim());
|
|
22358
|
+
var faqs = [];
|
|
22359
|
+
Object.keys(faqObj.data).forEach(function (key, i) {
|
|
22360
|
+
if (key.includes('_question') && !faqObj.data[key].includes('field_')) {
|
|
22361
|
+
faqs.push({
|
|
22362
|
+
question: faqObj.data[key],
|
|
22363
|
+
answer: faqObj.data["".concat(key.replace('question', ''), "answer")].replace(/\n/g, '<br>'),
|
|
22364
|
+
category: faqObj.data["".concat(key.slice(0, key.indexOf('s_')), "_category")],
|
|
22365
|
+
id: i
|
|
22366
|
+
});
|
|
22367
|
+
}
|
|
22368
|
+
});
|
|
22369
|
+
return faqs;
|
|
22370
|
+
};
|
|
22371
|
+
var getReleaseNotes = function getReleaseNotes(helpContent, mihelpAppPath) {
|
|
22372
|
+
var releasenotes = !isNil$1(helpContent) ? _toConsumableArray(helpContent === null || helpContent === void 0 ? void 0 : helpContent.releaseNotes) : [];
|
|
22373
|
+
|
|
22374
|
+
if (!mihelpAppPath) {
|
|
22375
|
+
var releaseNotesByApp = {};
|
|
22376
|
+
releasenotes.forEach(function (note) {
|
|
22377
|
+
if (releaseNotesByApp[note.application]) {
|
|
22378
|
+
releaseNotesByApp[note.application] = [].concat(_toConsumableArray(releaseNotesByApp[note.application]), [note]);
|
|
22379
|
+
} else {
|
|
22380
|
+
releaseNotesByApp[note.application] = [note];
|
|
22381
|
+
}
|
|
22382
|
+
});
|
|
22383
|
+
var latestReleasesByApp = [];
|
|
22384
|
+
Object.keys(releaseNotesByApp).forEach(function (app) {
|
|
22385
|
+
if (releaseNotesByApp[app].length < 2) {
|
|
22386
|
+
latestReleasesByApp.push(releaseNotesByApp[app][0]);
|
|
22387
|
+
return;
|
|
22388
|
+
}
|
|
22389
|
+
|
|
22390
|
+
var latestArticle = releaseNotesByApp[app][0];
|
|
22391
|
+
releaseNotesByApp[app].forEach(function (release) {
|
|
22392
|
+
if (new Date(release.publishDate) > new Date(latestArticle.publishDate)) {
|
|
22393
|
+
latestArticle = release;
|
|
22394
|
+
}
|
|
22395
|
+
});
|
|
22396
|
+
latestReleasesByApp.push(latestArticle);
|
|
22397
|
+
});
|
|
22398
|
+
return latestReleasesByApp;
|
|
22399
|
+
} else {
|
|
22400
|
+
var latestArticle = releasenotes[0];
|
|
22401
|
+
releasenotes.forEach(function (release) {
|
|
22402
|
+
if (new Date(release.publishDate) > new Date(latestArticle.publishDate)) {
|
|
22403
|
+
latestArticle = release;
|
|
22404
|
+
}
|
|
22405
|
+
});
|
|
22406
|
+
return latestArticle ? [latestArticle] : [];
|
|
22407
|
+
}
|
|
22408
|
+
};
|
|
22409
|
+
var timer;
|
|
22410
|
+
var debounce = function debounce(fn, delay) {
|
|
22411
|
+
clearTimeout(timer);
|
|
22412
|
+
timer = setTimeout(function () {
|
|
22413
|
+
return fn();
|
|
22414
|
+
}, delay);
|
|
22415
|
+
};
|
|
22416
|
+
var clearDebounceTimer = function clearDebounceTimer() {
|
|
22417
|
+
clearTimeout(timer);
|
|
22418
|
+
};
|
|
22419
|
+
var handleRedirect = function handleRedirect(type, mihelpAppPath, currentArticle) {
|
|
22420
|
+
var country = storage$1.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
22421
|
+
var coreAppConfig = storage$1.getLocalItem('opsportal-core:config');
|
|
22422
|
+
var uri;
|
|
22423
|
+
|
|
22424
|
+
switch (type) {
|
|
22425
|
+
case redirectContants.OPEN_IN_NEW_TAB:
|
|
22426
|
+
uri = currentArticle.url;
|
|
22427
|
+
break;
|
|
22428
|
+
|
|
22429
|
+
case redirectContants.ALL_HELP_RESOURCES:
|
|
22430
|
+
uri = mihelpAppPath ? "".concat(coreAppConfig.mihelpUri, "/applications/").concat(mihelpAppPath, "?re=").concat(country.toLowerCase()) : "".concat(coreAppConfig.mihelpUri, "?re=").concat(country.toLowerCase());
|
|
22431
|
+
break;
|
|
22432
|
+
|
|
22433
|
+
case redirectContants.HELP_RESOURCES:
|
|
22434
|
+
uri = mihelpAppPath ? "".concat(coreAppConfig.mihelpUri, "/applications/").concat(mihelpAppPath, "?re=").concat(country.toLowerCase(), "#help-resources") : "".concat(coreAppConfig.mihelpUri, "/applications/g2-portal?re=").concat(country.toLowerCase(), "#help-resources");
|
|
22435
|
+
break;
|
|
22436
|
+
|
|
22437
|
+
case redirectContants.FAQS:
|
|
22438
|
+
uri = mihelpAppPath ? "".concat(coreAppConfig.mihelpUri, "/applications/").concat(mihelpAppPath, "?re=").concat(country.toLowerCase(), "#faqs") : "".concat(coreAppConfig.mihelpUri, "/applications/g2-portal?re=").concat(country.toLowerCase(), "#faqs");
|
|
22439
|
+
break;
|
|
22440
|
+
|
|
22441
|
+
case redirectContants.RELEASE_NOTES:
|
|
22442
|
+
uri = mihelpAppPath ? "".concat(coreAppConfig.mihelpUri, "/applications/").concat(mihelpAppPath, "?re=").concat(country.toLowerCase(), "#releases") : "".concat(coreAppConfig.mihelpUri, "/applications/g2-portal?re=").concat(country.toLowerCase(), "#releases");
|
|
22443
|
+
break;
|
|
22444
|
+
}
|
|
22445
|
+
|
|
22446
|
+
window.open(uri, '_blank');
|
|
22447
|
+
};
|
|
22448
|
+
var formatPublishDate = function formatPublishDate(publishdate) {
|
|
22449
|
+
var date = new Date(publishdate);
|
|
22450
|
+
var month = new Intl.DateTimeFormat('en', {
|
|
22451
|
+
month: 'short'
|
|
22452
|
+
}).format(date);
|
|
22453
|
+
var day = new Intl.DateTimeFormat('en', {
|
|
22454
|
+
day: '2-digit'
|
|
22455
|
+
}).format(date);
|
|
22456
|
+
var year = new Intl.DateTimeFormat('en', {
|
|
22457
|
+
year: 'numeric'
|
|
22458
|
+
}).format(date);
|
|
22459
|
+
return "".concat(month, "-").concat(day, "-").concat(year);
|
|
22460
|
+
};
|
|
22461
|
+
var unEscapeChars = function unEscapeChars(str) {
|
|
22462
|
+
return str ? str.replace(/<\/?[^>]+(>|$)/g, '').replace(/&#(\d+);/g, function (match, p1) {
|
|
22463
|
+
return String.fromCodePoint(parseInt(p1, 10));
|
|
22464
|
+
}) : null;
|
|
22465
|
+
};
|
|
22466
|
+
|
|
22339
22467
|
var css_248z$e = ".utilities_ops-app-frame_Help_Help--backdrop {\r\n position: absolute;\r\n z-index: 10000;\r\n height: 100vh;\r\n top: 64px;\r\n width: 100vw;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--miHelpSideBar {\r\n width: 50vw;\r\n position: absolute;\r\n right: 0;\r\n height: calc(100vh - 64px);\r\n padding: 15px;\r\n background-color: white;\r\n overflow-y: auto;\r\n color: #323130;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--title {\r\n font-weight: 600;\r\n font-size: 28px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--header {\r\n margin-bottom: 10px;\r\n display: flex;\r\n justify-content: space-between;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--header .utilities_ops-app-frame_Help_Help--close,\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--close {\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--header .utilities_ops-app-frame_Help_Help--close i,\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--close i {\r\n font-size: 14px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--subHeader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--subHeaderTitle {\r\n font-weight: 600;\r\n font-size: 20px;\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--subHeaderTitle .utilities_ops-app-frame_Help_Help--back {\r\n color: #1d5ab9;\r\n margin-right: 5px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--link {\r\n font-weight: 400;\r\n font-size: 14px;\r\n color: #1d5ab9;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--link i {\r\n font-size: 10px;\r\n position: relative;\r\n top: -5px;\r\n left: 3px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper {\r\n margin-top: 20px;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper h3,\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper h3 {\r\n font-weight: 400;\r\n font-size: 24px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper h3 i {\r\n color: #1d5ab9;\r\n font-size: 10px;\r\n position: relative;\r\n top: -8px;\r\n cursor: pointer;\r\n left: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper ul,\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper ul {\r\n list-style: none;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper ul li,\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper ul li {\r\n font-weight: 400;\r\n font-size: 14px;\r\n margin: 6px 0;\r\n display: flex;\r\n cursor: pointer;\r\n width: -webkit-fit-content;\r\n width: -moz-fit-content;\r\n width: fit-content;\r\n align-items: flex-start;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper ul li:hover,\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper ul li:hover {\r\n color: #1d5ab9;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper ul li img,\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper ul li img {\r\n width: 17px;\r\n margin-right: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpResourcesWrapper .utilities_ops-app-frame_Help_Help--viewMore {\r\n color: #1d5ab9;\r\n cursor: pointer;\r\n font-weight: 400;\r\n font-size: 14px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchWrapper {\r\n width: 100%;\r\n position: relative;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchWrapper span {\r\n position: absolute;\r\n width: 29px;\r\n height: 29px;\r\n background: #f3f2f1;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n bottom: 1.5px;\r\n right: 2px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--mihelpSearch {\r\n width: 100%;\r\n margin-top: 15px;\r\n padding: 0px 10px;\r\n height: 32px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchResultsWrapper {\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchResultsWrapper h3 {\r\n font-weight: 400;\r\n font-size: 24px;\r\n margin-top: 8px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchResultsWrapper .utilities_ops-app-frame_Help_Help--searchResult {\r\n width: 100%;\r\n margin-top: 20px;\r\n border-bottom: 1px solid #dcdcdc;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchResultsWrapper .utilities_ops-app-frame_Help_Help--searchResult p {\r\n margin-top: 13px;\r\n margin-bottom: 30px;\r\n text-overflow: ellipsis;\r\n width: 100%;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--spinnerWrapper {\r\n position: absolute;\r\n background: rgba(0, 0, 0, 0.5);\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--spinnerWrapper svg {\r\n position: absolute;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--overFlowHidden {\r\n overflow: hidden;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--nonInteractive {\r\n opacity: 0.3;\r\n pointer-events: none;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchTitlewrapper {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeswrapper {\r\n color: #cbcbcb;\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--like {\r\n margin-left: 10px;\r\n font-size: 10px;\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--like i {\r\n font-size: 14px;\r\n margin-right: 2px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchTitle {\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchTitle img {\r\n width: 18px;\r\n margin-right: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchTitle span {\r\n font-weight: 600;\r\n font-size: 18px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--searchTitle span:hover {\r\n color: #1d5ab9;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--faqContentWrapper {\r\n width: 100%;\r\n margin-top: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--faqContentWrapper h3 {\r\n font-weight: 300;\r\n font-size: 34px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--faqContentWrapper .utilities_ops-app-frame_Help_Help--faqsList {\r\n width: 100%;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--faqContentWrapper .utilities_ops-app-frame_Help_Help--category {\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--faqContentWrapper .utilities_ops-app-frame_Help_Help--category h3 {\r\n color: #1d5ab9;\r\n font-weight: 600;\r\n font-size: 24px;\r\n margin-top: 18px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--accordian {\r\n border-top: 1px solid #dcdcdc;\r\n padding-top: 13px;\r\n margin-top: 18px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--accordian .utilities_ops-app-frame_Help_Help--question {\r\n font-weight: 400;\r\n font-size: 20px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--accordian .utilities_ops-app-frame_Help_Help--question span {\r\n transition: all 0.2s ease-out;\r\n display: flex;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--accordian .utilities_ops-app-frame_Help_Help--answer {\r\n font-weight: 400;\r\n font-size: 14px;\r\n height: auto;\r\n max-height: 0;\r\n transition: max-height 0.2s ease-out;\r\n overflow: hidden;\r\n margin-top: 13px;\r\n white-space: normal;\r\n}\r\n\r\n/* .accordian .answer span {\r\n white-space: break-spaces;\r\n } */\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNote {\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNote h3 {\r\n font-weight: 400;\r\n font-size: 24px;\r\n margin-top: 13px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNote .utilities_ops-app-frame_Help_Help--releaseNoteContent {\r\n margin-top: 10px;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpArticle {\r\n width: 100%;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpArticle h3 {\r\n font-weight: 400;\r\n font-size: 24px;\r\n margin-top: 13px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--helpArticle .utilities_ops-app-frame_Help_Help--helpArticleWrapper {\r\n margin-top: 10px;\r\n white-space: normal;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--articleFooter {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n margin-top: 30px;\r\n padding-bottom: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper {\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--likeTxt {\r\n font-weight: 600;\r\n font-size: 14px;\r\n margin-right: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--thanksText {\r\n color: rgb(45, 206, 137);\r\n font-weight: bold;\r\n font-size: 16px;\r\n margin-left: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--feedbackWrapper {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--feedbackWrapper textarea {\r\n width: 300px;\r\n height: 100px;\r\n resize: none;\r\n display: block;\r\n margin-bottom: 11px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--feedbackWrapper h5 {\r\n font-size: 18px;\r\n margin-bottom: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likeWrapper .utilities_ops-app-frame_Help_Help--feedbackWrapper span {\r\n background-color: rgb(29, 90, 185);\r\n color: #fff;\r\n padding: 6px 12px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n color: #2dce89;\r\n margin-right: 6px;\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper svg {\r\n border: 1px solid #2dce89 !important;\r\n padding: 5px;\r\n height: 30px;\r\n width: 30px;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper.utilities_ops-app-frame_Help_Help--active svg,\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper svg:hover {\r\n background-color: #2dce89;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper.utilities_ops-app-frame_Help_Help--active svg path,\r\n.utilities_ops-app-frame_Help_Help--likebtnWrapper svg:hover path {\r\n fill: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dislike {\r\n color: #f5365c !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dislike svg {\r\n border: 1px solid #f5365c !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dislike.utilities_ops-app-frame_Help_Help--active svg,\r\n.utilities_ops-app-frame_Help_Help--dislike svg:hover {\r\n background-color: #f5365c !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dateWrapper {\r\n font-style: italic;\r\n /* font-weight: 700; */\r\n font-size: 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dateWrapper b {\r\n font-weight: 700;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--dateWrapper span {\r\n font-weight: 400;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper {\r\n width: 100%;\r\n border-top: 1px solid #edebe9;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--relatedResourcesWrapper h3 {\r\n font-weight: 400;\r\n font-size: 24px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper {\r\n width: 100%;\r\n border: 1px solid #dcdcdc;\r\n padding: 20px;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n margin-top: 50px;\r\n position: relative;\r\n text-align: center;\r\n justify-content: center;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper.utilities_ops-app-frame_Help_Help--noFlex {\r\n display: block;\r\n text-align: left;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper h2 {\r\n font-size: 34px !important;\r\n margin-bottom: 6px !important;\r\n margin-top: 0 !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper p {\r\n font-size: 14px !important;\r\n margin-bottom: 3px !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper p img {\r\n position: relative;\r\n top: 2px;\r\n margin-left: 2px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--submitBtn {\r\n background-color: #1d5ab9;\r\n color: #fff;\r\n padding: 6px 12px;\r\n font-weight: 600;\r\n font-size: 12px;\r\n cursor: pointer;\r\n margin-top: 7px;\r\n border-radius: 2px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--submitBtn.utilities_ops-app-frame_Help_Help--disable {\r\n pointer-events: none;\r\n cursor: default;\r\n background-color: #ccc;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--close {\r\n position: absolute;\r\n top: 0px;\r\n right: 10px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper h3 {\r\n font-weight: 800 !important;\r\n font-size: 20px !important;\r\n line-height: 27px !important;\r\n color: #1d5ab9 !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--CategoryWrapper,\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--questionWrapper {\r\n width: 100%;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--CategoryWrapper label,\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--questionWrapper label {\r\n font-weight: 600;\r\n font-size: 14px;\r\n color: #000100;\r\n margin: 10px 0;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--questionWrapper textarea {\r\n resize: none;\r\n height: 125px;\r\n margin-bottom: 20px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--highlightRed {\r\n font-weight: 600;\r\n color: #f5365c;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--submitQuestionWrapper .utilities_ops-app-frame_Help_Help--successMsg {\r\n color: #1d5ab9;\r\n font-size: 20px !important;\r\n margin-top: 12px;\r\n margin-bottom: 20px !important;\r\n font-weight: 600;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent {\r\n max-width: 700px;\r\n min-width: 600px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent .utilities_ops-app-frame_Help_Help--releaseDialogHeader {\r\n width: 100%;\r\n display: flex;\r\n justify-content: space-between;\r\n background: #edebe9;\r\n padding: 10px 20px;\r\n align-items: center;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent .utilities_ops-app-frame_Help_Help--releaseDialogBody {\r\n padding: 20px 20px 30px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent .utilities_ops-app-frame_Help_Help--releaseDialogHeader h3 {\r\n font-weight: 600;\r\n font-size: 20px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent .utilities_ops-app-frame_Help_Help--releaseDialogHeader span {\r\n font-weight: 600;\r\n font-size: 14px;\r\n -webkit-text-decoration-line: underline;\r\n text-decoration-line: underline;\r\n color: #1d5ab9;\r\n cursor: pointer;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseDialogContent .utilities_ops-app-frame_Help_Help--releaseDialogHeader span i {\r\n font-size: 10px;\r\n position: relative;\r\n top: -6px;\r\n right: -1px;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNoteActive {\r\n padding: 22px;\r\n background-color: #1d5ab9;\r\n color: #fff;\r\n font-size: 32px !important;\r\n width: 100% !important;\r\n border-radius: 10px;\r\n align-items: center !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNoteActive:hover{\r\n color: #fff !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNoteActive img {\r\n width: 65px !important;\r\n margin-right: 25px !important;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNoteActive .utilities_ops-app-frame_Help_Help--releaseTitle {\r\n flex: 1;\r\n}\r\n\r\n.utilities_ops-app-frame_Help_Help--releaseNoteActive .utilities_ops-app-frame_Help_Help--checkNow {\r\n font-weight: 700;\r\n font-size: 14px;\r\n align-self: end;\r\n}\r\n";
|
|
22340
22468
|
styleInject(css_248z$e);
|
|
22341
22469
|
|
|
@@ -22411,7 +22539,7 @@ var ArticleSection = function ArticleSection(_ref) {
|
|
|
22411
22539
|
clickhandler = _ref.clickhandler,
|
|
22412
22540
|
isLatestRelease = _ref.isLatestRelease;
|
|
22413
22541
|
var articles = getArticles();
|
|
22414
|
-
console.log(
|
|
22542
|
+
console.log('+++articles in Article section=', articles);
|
|
22415
22543
|
var highlightRelease = isLatestRelease && title !== 'G2Portal' && articleDetails.type === 'RELEASE_NOTES' && articles.length === 1;
|
|
22416
22544
|
return React__default["default"].createElement("div", {
|
|
22417
22545
|
className: "utilities_ops-app-frame_Help_Help--helpResourcesWrapper"
|
|
@@ -22435,7 +22563,7 @@ var ArticleSection = function ArticleSection(_ref) {
|
|
|
22435
22563
|
src: articleDetails.icon
|
|
22436
22564
|
}), React__default["default"].createElement("span", {
|
|
22437
22565
|
className: "utilities_ops-app-frame_Help_Help--releaseTitle"
|
|
22438
|
-
}, article.title || article.question, highlightRelease && React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("br", null), "is Live Now!")), highlightRelease && React__default["default"].createElement("span", {
|
|
22566
|
+
}, unEscapeChars(article.title) || unEscapeChars(article.question), highlightRelease && React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("br", null), "is Live Now!")), highlightRelease && React__default["default"].createElement("span", {
|
|
22439
22567
|
className: "utilities_ops-app-frame_Help_Help--checkNow"
|
|
22440
22568
|
}, "Check Now!"));
|
|
22441
22569
|
})), articles.length > 5 ? React__default["default"].createElement("span", {
|
|
@@ -22521,7 +22649,7 @@ var SearchResults = function SearchResults(_ref) {
|
|
|
22521
22649
|
return articleClickhandler(viewMapper[result.post_type], result, result.post_type === 'faq');
|
|
22522
22650
|
},
|
|
22523
22651
|
dangerouslySetInnerHTML: {
|
|
22524
|
-
__html: result.post_title
|
|
22652
|
+
__html: unEscapeChars(result.post_title)
|
|
22525
22653
|
}
|
|
22526
22654
|
})), result.post_type === 'help_articles' && React__default["default"].createElement("div", {
|
|
22527
22655
|
className: "utilities_ops-app-frame_Help_Help--likeswrapper"
|
|
@@ -22640,129 +22768,6 @@ var Dislike = function Dislike() {
|
|
|
22640
22768
|
}));
|
|
22641
22769
|
};
|
|
22642
22770
|
|
|
22643
|
-
var getRecommendedHelpArticles = function getRecommendedHelpArticles(helpContent) {
|
|
22644
|
-
var articles = !isNil$1(helpContent) ? _toConsumableArray(helpContent === null || helpContent === void 0 ? void 0 : helpContent.helpArticles) : []; // const sortedByLikes = sortedBySequence.sort((a, b) => {
|
|
22645
|
-
// return parseInt(b.likes) - parseInt(a.likes)
|
|
22646
|
-
// })
|
|
22647
|
-
|
|
22648
|
-
var recomendedArticles = articles.filter(function (article) {
|
|
22649
|
-
return article.recomended === 'true';
|
|
22650
|
-
});
|
|
22651
|
-
var sortedBySequence = recomendedArticles.sort(function (a, b) {
|
|
22652
|
-
return parseInt(a.sequence) - parseInt(b.sequence);
|
|
22653
|
-
});
|
|
22654
|
-
return sortedBySequence;
|
|
22655
|
-
};
|
|
22656
|
-
var getFaqs = function getFaqs(helpContent) {
|
|
22657
|
-
var _helpContent$faqs$;
|
|
22658
|
-
|
|
22659
|
-
var faqData = !isNil$1(helpContent) ? (_helpContent$faqs$ = helpContent.faqs[0]) === null || _helpContent$faqs$ === void 0 ? void 0 : _helpContent$faqs$.content : '';
|
|
22660
|
-
if (!faqData) return [];
|
|
22661
|
-
var faqObj = JSON.parse(faqData.slice(faqData.indexOf('wp:acf/faq')).replace('wp:acf/faq', '').replace('/-->', '').trim());
|
|
22662
|
-
var faqs = [];
|
|
22663
|
-
Object.keys(faqObj.data).forEach(function (key, i) {
|
|
22664
|
-
if (key.includes('_question') && !faqObj.data[key].includes('field_')) {
|
|
22665
|
-
faqs.push({
|
|
22666
|
-
question: faqObj.data[key],
|
|
22667
|
-
answer: faqObj.data["".concat(key.replace('question', ''), "answer")].replace(/\n/g, '<br>'),
|
|
22668
|
-
category: faqObj.data["".concat(key.slice(0, key.indexOf('s_')), "_category")],
|
|
22669
|
-
id: i
|
|
22670
|
-
});
|
|
22671
|
-
}
|
|
22672
|
-
});
|
|
22673
|
-
return faqs;
|
|
22674
|
-
};
|
|
22675
|
-
var getReleaseNotes = function getReleaseNotes(helpContent, mihelpAppPath) {
|
|
22676
|
-
var releasenotes = !isNil$1(helpContent) ? _toConsumableArray(helpContent === null || helpContent === void 0 ? void 0 : helpContent.releaseNotes) : [];
|
|
22677
|
-
|
|
22678
|
-
if (!mihelpAppPath) {
|
|
22679
|
-
var releaseNotesByApp = {};
|
|
22680
|
-
releasenotes.forEach(function (note) {
|
|
22681
|
-
if (releaseNotesByApp[note.application]) {
|
|
22682
|
-
releaseNotesByApp[note.application] = [].concat(_toConsumableArray(releaseNotesByApp[note.application]), [note]);
|
|
22683
|
-
} else {
|
|
22684
|
-
releaseNotesByApp[note.application] = [note];
|
|
22685
|
-
}
|
|
22686
|
-
});
|
|
22687
|
-
var latestReleasesByApp = [];
|
|
22688
|
-
Object.keys(releaseNotesByApp).forEach(function (app) {
|
|
22689
|
-
if (releaseNotesByApp[app].length < 2) {
|
|
22690
|
-
latestReleasesByApp.push(releaseNotesByApp[app][0]);
|
|
22691
|
-
return;
|
|
22692
|
-
}
|
|
22693
|
-
|
|
22694
|
-
var latestArticle = releaseNotesByApp[app][0];
|
|
22695
|
-
releaseNotesByApp[app].forEach(function (release) {
|
|
22696
|
-
if (new Date(release.publishDate) > new Date(latestArticle.publishDate)) {
|
|
22697
|
-
latestArticle = release;
|
|
22698
|
-
}
|
|
22699
|
-
});
|
|
22700
|
-
latestReleasesByApp.push(latestArticle);
|
|
22701
|
-
});
|
|
22702
|
-
return latestReleasesByApp;
|
|
22703
|
-
} else {
|
|
22704
|
-
var latestArticle = releasenotes[0];
|
|
22705
|
-
releasenotes.forEach(function (release) {
|
|
22706
|
-
if (new Date(release.publishDate) > new Date(latestArticle.publishDate)) {
|
|
22707
|
-
latestArticle = release;
|
|
22708
|
-
}
|
|
22709
|
-
});
|
|
22710
|
-
return latestArticle ? [latestArticle] : [];
|
|
22711
|
-
}
|
|
22712
|
-
};
|
|
22713
|
-
var timer;
|
|
22714
|
-
var debounce = function debounce(fn, delay) {
|
|
22715
|
-
clearTimeout(timer);
|
|
22716
|
-
timer = setTimeout(function () {
|
|
22717
|
-
return fn();
|
|
22718
|
-
}, delay);
|
|
22719
|
-
};
|
|
22720
|
-
var clearDebounceTimer = function clearDebounceTimer() {
|
|
22721
|
-
clearTimeout(timer);
|
|
22722
|
-
};
|
|
22723
|
-
var handleRedirect = function handleRedirect(type, mihelpAppPath, currentArticle) {
|
|
22724
|
-
var country = storage$1.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
22725
|
-
var coreAppConfig = storage$1.getLocalItem('opsportal-core:config');
|
|
22726
|
-
var uri;
|
|
22727
|
-
|
|
22728
|
-
switch (type) {
|
|
22729
|
-
case redirectContants.OPEN_IN_NEW_TAB:
|
|
22730
|
-
uri = currentArticle.url;
|
|
22731
|
-
break;
|
|
22732
|
-
|
|
22733
|
-
case redirectContants.ALL_HELP_RESOURCES:
|
|
22734
|
-
uri = mihelpAppPath ? "".concat(coreAppConfig.mihelpUri, "/applications/").concat(mihelpAppPath, "?re=").concat(country.toLowerCase()) : "".concat(coreAppConfig.mihelpUri, "?re=").concat(country.toLowerCase());
|
|
22735
|
-
break;
|
|
22736
|
-
|
|
22737
|
-
case redirectContants.HELP_RESOURCES:
|
|
22738
|
-
uri = mihelpAppPath ? "".concat(coreAppConfig.mihelpUri, "/applications/").concat(mihelpAppPath, "?re=").concat(country.toLowerCase(), "#help-resources") : "".concat(coreAppConfig.mihelpUri, "/applications/g2-portal?re=").concat(country.toLowerCase(), "#help-resources");
|
|
22739
|
-
break;
|
|
22740
|
-
|
|
22741
|
-
case redirectContants.FAQS:
|
|
22742
|
-
uri = mihelpAppPath ? "".concat(coreAppConfig.mihelpUri, "/applications/").concat(mihelpAppPath, "?re=").concat(country.toLowerCase(), "#faqs") : "".concat(coreAppConfig.mihelpUri, "/applications/g2-portal?re=").concat(country.toLowerCase(), "#faqs");
|
|
22743
|
-
break;
|
|
22744
|
-
|
|
22745
|
-
case redirectContants.RELEASE_NOTES:
|
|
22746
|
-
uri = mihelpAppPath ? "".concat(coreAppConfig.mihelpUri, "/applications/").concat(mihelpAppPath, "?re=").concat(country.toLowerCase(), "#releases") : "".concat(coreAppConfig.mihelpUri, "/applications/g2-portal?re=").concat(country.toLowerCase(), "#releases");
|
|
22747
|
-
break;
|
|
22748
|
-
}
|
|
22749
|
-
|
|
22750
|
-
window.open(uri, '_blank');
|
|
22751
|
-
};
|
|
22752
|
-
var formatPublishDate = function formatPublishDate(publishdate) {
|
|
22753
|
-
var date = new Date(publishdate);
|
|
22754
|
-
var month = new Intl.DateTimeFormat('en', {
|
|
22755
|
-
month: 'short'
|
|
22756
|
-
}).format(date);
|
|
22757
|
-
var day = new Intl.DateTimeFormat('en', {
|
|
22758
|
-
day: '2-digit'
|
|
22759
|
-
}).format(date);
|
|
22760
|
-
var year = new Intl.DateTimeFormat('en', {
|
|
22761
|
-
year: 'numeric'
|
|
22762
|
-
}).format(date);
|
|
22763
|
-
return "".concat(month, "-").concat(day, "-").concat(year);
|
|
22764
|
-
};
|
|
22765
|
-
|
|
22766
22771
|
var _styleModuleImportMap$7 = {
|
|
22767
22772
|
"../Help.css": {
|
|
22768
22773
|
"backdrop": "utilities_ops-app-frame_Help_Help--backdrop",
|
|
@@ -32413,7 +32418,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
32413
32418
|
var _ref3 = _asyncToGenerator(
|
|
32414
32419
|
/*#__PURE__*/
|
|
32415
32420
|
regenerator.mark(function _callee2() {
|
|
32416
|
-
var _storage$
|
|
32421
|
+
var _storage$getLocalItem2, _response$data, country, app, url, response, _response$data2, _response$data3, _response$data3$relea, _latestReleaseFromSto, latestReleaseFromStorage, _response$data4, viewedDays;
|
|
32417
32422
|
|
|
32418
32423
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
32419
32424
|
while (1) {
|
|
@@ -32422,7 +32427,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
32422
32427
|
_context2.prev = 0;
|
|
32423
32428
|
country = storage$1.getSessionItem('dashboard', 'selectedCountryA3code');
|
|
32424
32429
|
app = mihelpAppPath || 'g2-portal';
|
|
32425
|
-
url = (_storage$
|
|
32430
|
+
url = (_storage$getLocalItem2 = storage$1.getLocalItem('opsportal-core:config').endpoints) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.getMihelpLatestRelease;
|
|
32426
32431
|
_context2.next = 6;
|
|
32427
32432
|
return axios.get("".concat(url, "?app=").concat(app, "&country=").concat(country), {
|
|
32428
32433
|
headers: {
|