@rh-support/utils 2.1.16 → 2.1.19
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/README.md +2 -0
- package/lib/cjs/apiUtils.js +2 -2
- package/lib/cjs/appUtils.js +4 -4
- package/lib/cjs/cacheUtils.js +2 -2
- package/lib/cjs/caseUtils.js +4 -4
- package/lib/cjs/csvUtils.js +16 -16
- package/lib/cjs/dateUtils.d.ts +1 -1
- package/lib/cjs/dateUtils.d.ts.map +1 -1
- package/lib/cjs/dateUtils.js +6 -6
- package/lib/cjs/dropdownUtils.d.ts +1 -1
- package/lib/cjs/dropdownUtils.d.ts.map +1 -1
- package/lib/cjs/dropdownUtils.js +2 -2
- package/lib/cjs/eventUtils.js +1 -1
- package/lib/cjs/hostNameUtils.d.ts.map +1 -1
- package/lib/cjs/hostNameUtils.js +1 -2
- package/lib/cjs/hydraConfigUtils.d.ts +1 -1
- package/lib/cjs/hydraConfigUtils.d.ts.map +1 -1
- package/lib/cjs/hydraConfigUtils.js +9 -9
- package/lib/cjs/index.js +5 -1
- package/lib/cjs/insightRuleInfoUtils.js +2 -2
- package/lib/cjs/productsUtils.js +12 -12
- package/lib/cjs/recommendationUtils.js +2 -2
- package/lib/cjs/scrollUtils.js +2 -2
- package/lib/cjs/searchApiUtils.d.ts +1 -1
- package/lib/cjs/searchApiUtils.d.ts.map +1 -1
- package/lib/cjs/searchApiUtils.js +1 -1
- package/lib/cjs/solrUtils.d.ts +4 -4
- package/lib/cjs/solrUtils.d.ts.map +1 -1
- package/lib/cjs/solrUtils.js +7 -8
- package/lib/cjs/styleUtils.js +1 -1
- package/lib/cjs/urlUtils.d.ts +3 -1
- package/lib/cjs/urlUtils.d.ts.map +1 -1
- package/lib/cjs/urlUtils.js +1 -1
- package/lib/cjs/userUtils.js +1 -1
- package/lib/esm/dateUtils.d.ts +1 -1
- package/lib/esm/dateUtils.d.ts.map +1 -1
- package/lib/esm/dropdownUtils.d.ts +1 -1
- package/lib/esm/dropdownUtils.d.ts.map +1 -1
- package/lib/esm/hostNameUtils.d.ts.map +1 -1
- package/lib/esm/hydraConfigUtils.d.ts +1 -1
- package/lib/esm/hydraConfigUtils.d.ts.map +1 -1
- package/lib/esm/searchApiUtils.d.ts +1 -1
- package/lib/esm/searchApiUtils.d.ts.map +1 -1
- package/lib/esm/solrUtils.d.ts +4 -4
- package/lib/esm/solrUtils.d.ts.map +1 -1
- package/lib/esm/solrUtils.js +1 -2
- package/lib/esm/urlUtils.d.ts +3 -1
- package/lib/esm/urlUtils.d.ts.map +1 -1
- package/package.json +19 -10
package/README.md
CHANGED
package/lib/cjs/apiUtils.js
CHANGED
|
@@ -28,7 +28,7 @@ function haventLoadedMetadata(apiResponse, isEmptyCallback) {
|
|
|
28
28
|
}
|
|
29
29
|
exports.haventLoadedMetadata = haventLoadedMetadata;
|
|
30
30
|
function haventLoadedProductsMetadata(apiResponse) {
|
|
31
|
-
return isEmpty_1.default(apiResponse.data.productsResult) && !apiResponse.isFetching && !apiResponse.isError;
|
|
31
|
+
return (0, isEmpty_1.default)(apiResponse.data.productsResult) && !apiResponse.isFetching && !apiResponse.isError;
|
|
32
32
|
}
|
|
33
33
|
exports.haventLoadedProductsMetadata = haventLoadedProductsMetadata;
|
|
34
34
|
/**
|
|
@@ -40,7 +40,7 @@ exports.haventLoadedProductsMetadata = haventLoadedProductsMetadata;
|
|
|
40
40
|
*/
|
|
41
41
|
const getTrimmedSpecialCharacters = (description = '', limit = 4000) => {
|
|
42
42
|
if (description) {
|
|
43
|
-
const removeSpecialCharacters = trim_1.default(description.replace(/[^a-zA-Z0-9 ]/g, '').replace(/ {2,}/g, ' '));
|
|
43
|
+
const removeSpecialCharacters = (0, trim_1.default)(description.replace(/[^a-zA-Z0-9 ]/g, '').replace(/ {2,}/g, ' '));
|
|
44
44
|
const encodedDescription = encodeURIComponent(removeSpecialCharacters);
|
|
45
45
|
const trimmedDescription = encodedDescription.slice(0, limit);
|
|
46
46
|
return decodeURIComponent(trimmedDescription) || '';
|
package/lib/cjs/appUtils.js
CHANGED
|
@@ -27,17 +27,17 @@ const getAccessHostname = () => {
|
|
|
27
27
|
};
|
|
28
28
|
exports.getAccessHostname = getAccessHostname;
|
|
29
29
|
const getAppVersion = () => {
|
|
30
|
-
return get_1.default(window.seVersionInfo || window.supportVersionInfo || {}, 'packageVersion');
|
|
30
|
+
return (0, get_1.default)(window.seVersionInfo || window.supportVersionInfo || {}, 'packageVersion');
|
|
31
31
|
};
|
|
32
32
|
exports.getAppVersion = getAppVersion;
|
|
33
33
|
const strataHeaders = {};
|
|
34
34
|
const getStrataHeaders = (appName, accountNumber) => ({
|
|
35
|
-
redhat_client: `${appName} ${exports.getAppVersion()}`,
|
|
35
|
+
redhat_client: `${appName} ${(0, exports.getAppVersion)()}`,
|
|
36
36
|
account_number: accountNumber,
|
|
37
37
|
});
|
|
38
38
|
exports.getStrataHeaders = getStrataHeaders;
|
|
39
39
|
const setStrataHeaders = (appName, accountNumber) => {
|
|
40
|
-
const newStrataHeaders = exports.getStrataHeaders(appName, accountNumber);
|
|
40
|
+
const newStrataHeaders = (0, exports.getStrataHeaders)(appName, accountNumber);
|
|
41
41
|
strataHeaders.redhat_client = newStrataHeaders.redhat_client;
|
|
42
42
|
strataHeaders.account_number = newStrataHeaders.account_number;
|
|
43
43
|
};
|
|
@@ -56,7 +56,7 @@ const fteHostNames = ['access.devgssfte.devlab.phx1.redhat.com', 'fte.foo.redhat
|
|
|
56
56
|
const ciHostNames = ['access.devgssci.devlab.phx1.redhat.com', 'ci.foo.redhat.com', 'fooci.redhat.com'];
|
|
57
57
|
const stageHostNames = ['access.stage.redhat.com', 'stage.foo.redhat.com', 'foostage.redhat.com'];
|
|
58
58
|
const getUserAgentForCaseMode = (isCaseCreate) => {
|
|
59
|
-
return isCaseCreate ? `Portal Case Management ${exports.getAppVersion()}` : `Solution Engine ${exports.getAppVersion()}`;
|
|
59
|
+
return isCaseCreate ? `Portal Case Management ${(0, exports.getAppVersion)()}` : `Solution Engine ${(0, exports.getAppVersion)()}`;
|
|
60
60
|
};
|
|
61
61
|
exports.getUserAgentForCaseMode = getUserAgentForCaseMode;
|
|
62
62
|
const securedSupport = { pathPrefix: '', isGs4: false };
|
package/lib/cjs/cacheUtils.js
CHANGED
|
@@ -100,7 +100,7 @@ class CacheUtilsService {
|
|
|
100
100
|
if (namespace) {
|
|
101
101
|
return this.localForage.keys().then((keys) => {
|
|
102
102
|
if (keys) {
|
|
103
|
-
return filter_1.default(keys, (key) => includes_1.default(key, namespace));
|
|
103
|
+
return (0, filter_1.default)(keys, (key) => (0, includes_1.default)(key, namespace));
|
|
104
104
|
}
|
|
105
105
|
else {
|
|
106
106
|
return [];
|
|
@@ -119,7 +119,7 @@ class CacheUtilsService {
|
|
|
119
119
|
return __awaiter(this, void 0, void 0, function* () {
|
|
120
120
|
try {
|
|
121
121
|
const keys = yield this.keys();
|
|
122
|
-
forEach_1.default(keys, (k) => {
|
|
122
|
+
(0, forEach_1.default)(keys, (k) => {
|
|
123
123
|
this.localForage.getItem(k).then((c) => {
|
|
124
124
|
if (c.expiresAt && +new Date() > c.expiresAt) {
|
|
125
125
|
this.localForage.removeItem(k);
|
package/lib/cjs/caseUtils.js
CHANGED
|
@@ -18,7 +18,7 @@ var PreviousCaseTypes;
|
|
|
18
18
|
PreviousCaseTypes["FEATURE_ENHANCEMENT"] = "Feature / Enhancement Request";
|
|
19
19
|
PreviousCaseTypes["RCA_ONLY"] = "RCA Only";
|
|
20
20
|
PreviousCaseTypes["OTHER"] = "Other";
|
|
21
|
-
})(PreviousCaseTypes
|
|
21
|
+
})(PreviousCaseTypes || (exports.PreviousCaseTypes = PreviousCaseTypes = {}));
|
|
22
22
|
// New Case Types
|
|
23
23
|
var NewCaseTypes;
|
|
24
24
|
(function (NewCaseTypes) {
|
|
@@ -30,12 +30,12 @@ var NewCaseTypes;
|
|
|
30
30
|
NewCaseTypes["IDEA"] = "Idea";
|
|
31
31
|
NewCaseTypes["ROOT_CAUSE_ANALYSIS"] = "Root cause analysis";
|
|
32
32
|
NewCaseTypes["OTHER"] = "Other";
|
|
33
|
-
})(NewCaseTypes
|
|
33
|
+
})(NewCaseTypes || (exports.NewCaseTypes = NewCaseTypes = {}));
|
|
34
34
|
function canManageCase(loggedInUserJwtToken) {
|
|
35
35
|
if (!loggedInUserJwtToken || !loggedInUserJwtToken.realm_access) {
|
|
36
36
|
return false;
|
|
37
37
|
}
|
|
38
|
-
return includes_1.default(loggedInUserJwtToken.realm_access.roles, 'portal_manage_cases');
|
|
38
|
+
return (0, includes_1.default)(loggedInUserJwtToken.realm_access.roles, 'portal_manage_cases');
|
|
39
39
|
}
|
|
40
40
|
exports.canManageCase = canManageCase;
|
|
41
41
|
function humanizeSize(fileSize) {
|
|
@@ -96,7 +96,7 @@ function isValidCaseNumber(caseNumber) {
|
|
|
96
96
|
}
|
|
97
97
|
exports.isValidCaseNumber = isValidCaseNumber;
|
|
98
98
|
function areAllValidCaseNumbers(items) {
|
|
99
|
-
return isEmpty_1.default(find_1.default(items, (item) => !isValidCaseNumber(item.trim())));
|
|
99
|
+
return (0, isEmpty_1.default)((0, find_1.default)(items, (item) => !isValidCaseNumber(item.trim())));
|
|
100
100
|
}
|
|
101
101
|
exports.areAllValidCaseNumbers = areAllValidCaseNumbers;
|
|
102
102
|
function linkifyLinks(text = '') {
|
package/lib/cjs/csvUtils.js
CHANGED
|
@@ -19,15 +19,15 @@ exports.isArrays = isArrays;
|
|
|
19
19
|
const jsonsHeaders = (array) => Array.from(array.map((json) => Object.keys(json)).reduce((a, b) => new Set([...a, ...b]), []));
|
|
20
20
|
exports.jsonsHeaders = jsonsHeaders;
|
|
21
21
|
const jsons2arrays = (jsons, headers) => {
|
|
22
|
-
headers = headers || exports.jsonsHeaders(jsons);
|
|
22
|
+
headers = headers || (0, exports.jsonsHeaders)(jsons);
|
|
23
23
|
// allow headers to have custom labels, defaulting to having the header data key be the label
|
|
24
24
|
let headerLabels = headers;
|
|
25
25
|
let headerKeys = headers;
|
|
26
|
-
if (exports.isJsons(headers)) {
|
|
26
|
+
if ((0, exports.isJsons)(headers)) {
|
|
27
27
|
headerLabels = headers.map((header) => header.label);
|
|
28
28
|
headerKeys = headers.map((header) => ({ key: header['key'], transformFn: header['transform'] }));
|
|
29
29
|
}
|
|
30
|
-
const data = jsons.map((object) => headerKeys.map((header) => exports.getHeaderValue(header.key, object, header.transformFn)));
|
|
30
|
+
const data = jsons.map((object) => headerKeys.map((header) => (0, exports.getHeaderValue)(header.key, object, header.transformFn)));
|
|
31
31
|
return [headerLabels, ...data];
|
|
32
32
|
};
|
|
33
33
|
exports.jsons2arrays = jsons2arrays;
|
|
@@ -41,13 +41,13 @@ const getHeaderValue = (property, obj, transformFn = defaultTransformFn) => {
|
|
|
41
41
|
arr.splice(1);
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
return exports.escapeDoubleQuotes(o[p]);
|
|
44
|
+
return (0, exports.escapeDoubleQuotes)(o[p]);
|
|
45
45
|
}
|
|
46
46
|
}, obj);
|
|
47
47
|
// if at any point the nested keys passed do not exist then looks for key `property` in object obj
|
|
48
48
|
return foundValue === undefined
|
|
49
49
|
? property in obj
|
|
50
|
-
? exports.escapeDoubleQuotes(obj[property])
|
|
50
|
+
? (0, exports.escapeDoubleQuotes)(obj[property])
|
|
51
51
|
: ''
|
|
52
52
|
: transformFn(foundValue);
|
|
53
53
|
};
|
|
@@ -58,31 +58,31 @@ const joiner = (data, separator = ',', enclosingCharacter = '"') => {
|
|
|
58
58
|
return data
|
|
59
59
|
.filter((e) => e)
|
|
60
60
|
.map((row) => row
|
|
61
|
-
.map((element) => exports.elementOrEmpty(element))
|
|
61
|
+
.map((element) => (0, exports.elementOrEmpty)(element))
|
|
62
62
|
.map((column) => `${enclosingCharacter}${column}${enclosingCharacter}`)
|
|
63
63
|
.join(separator))
|
|
64
64
|
.join(`\n`);
|
|
65
65
|
};
|
|
66
66
|
exports.joiner = joiner;
|
|
67
|
-
const arrays2csv = (data, headers, separator, enclosingCharacter) => exports.joiner(headers ? [headers, ...data] : data, separator, enclosingCharacter);
|
|
67
|
+
const arrays2csv = (data, headers, separator, enclosingCharacter) => (0, exports.joiner)(headers ? [headers, ...data] : data, separator, enclosingCharacter);
|
|
68
68
|
exports.arrays2csv = arrays2csv;
|
|
69
|
-
const jsons2csv = (data, headers, separator, enclosingCharacter) => exports.joiner(exports.jsons2arrays(data, headers), separator, enclosingCharacter);
|
|
69
|
+
const jsons2csv = (data, headers, separator, enclosingCharacter) => (0, exports.joiner)((0, exports.jsons2arrays)(data, headers), separator, enclosingCharacter);
|
|
70
70
|
exports.jsons2csv = jsons2csv;
|
|
71
71
|
const string2csv = (data, headers, separator = ',', enclosingCharacter = '"') => headers ? `${headers.join(separator)}\n${data}` : data;
|
|
72
72
|
exports.string2csv = string2csv;
|
|
73
73
|
const toCSV = (data, headers, separator = ',', enclosingCharacter = '"') => {
|
|
74
|
-
if (exports.isJsons(data))
|
|
75
|
-
return exports.jsons2csv(data, headers, separator, enclosingCharacter);
|
|
76
|
-
if (exports.isArrays(data))
|
|
77
|
-
return exports.arrays2csv(data, headers, separator, enclosingCharacter);
|
|
74
|
+
if ((0, exports.isJsons)(data))
|
|
75
|
+
return (0, exports.jsons2csv)(data, headers, separator, enclosingCharacter);
|
|
76
|
+
if ((0, exports.isArrays)(data))
|
|
77
|
+
return (0, exports.arrays2csv)(data, headers, separator, enclosingCharacter);
|
|
78
78
|
if (typeof data === 'string')
|
|
79
|
-
return exports.string2csv(data, headers, separator);
|
|
79
|
+
return (0, exports.string2csv)(data, headers, separator);
|
|
80
80
|
throw new TypeError(`Data should be a "String", "Array of arrays" OR "Array of objects" `);
|
|
81
81
|
};
|
|
82
82
|
exports.toCSV = toCSV;
|
|
83
83
|
const buildURI = (data, headers, uFEFF = true, separator = ',', enclosingCharacter = '"') => {
|
|
84
|
-
const csv = exports.toCSV(data, headers, separator, enclosingCharacter);
|
|
85
|
-
const type = exports.isSafari() ? 'application/csv' : 'text/csv';
|
|
84
|
+
const csv = (0, exports.toCSV)(data, headers, separator, enclosingCharacter);
|
|
85
|
+
const type = (0, exports.isSafari)() ? 'application/csv' : 'text/csv';
|
|
86
86
|
const blob = new Blob([uFEFF ? '\uFEFF' : '', csv], { type });
|
|
87
87
|
const dataURI = `data:${type};charset=utf-8,${uFEFF ? '\uFEFF' : ''}${csv}`;
|
|
88
88
|
const URL = window.URL || window.webkitURL;
|
|
@@ -90,7 +90,7 @@ const buildURI = (data, headers, uFEFF = true, separator = ',', enclosingCharact
|
|
|
90
90
|
};
|
|
91
91
|
exports.buildURI = buildURI;
|
|
92
92
|
const downloadCSV = (data, headers, fileName = 'csvGenerator') => {
|
|
93
|
-
const uri = exports.buildURI(data, headers);
|
|
93
|
+
const uri = (0, exports.buildURI)(data, headers);
|
|
94
94
|
const element = document.createElement('a');
|
|
95
95
|
element.setAttribute('href', uri);
|
|
96
96
|
element.setAttribute('target', '_self');
|
package/lib/cjs/dateUtils.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const getTimezoneOffsetFromTZName: (tzName: string) => string;
|
|
|
6
6
|
export declare const getPastUTCDateFromNow: (pastDays: number) => string;
|
|
7
7
|
export declare const isCurrentDateSameAsOrBeforeDate: (date: string, granularity?: moment.unitOfTime.StartOf) => boolean;
|
|
8
8
|
export declare const isFutureDate: (date: string, granularity?: moment.unitOfTime.StartOf) => boolean;
|
|
9
|
-
|
|
9
|
+
type AddToDate = {
|
|
10
10
|
days: number;
|
|
11
11
|
date?: string;
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../src/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,eAAO,MAAM,UAAU,wCAGX,KAAK,qBAAqB,WASrC,CAAC;AAEF,eAAO,MAAM,cAAc,wCAGf,KAAK,qBAAqB,WAerC,CAAC;AAEF,eAAO,MAAM,OAAO,SAAU,MAAM,KAAG,MAAmC,CAAC;AAE3E,eAAO,MAAM,2BAA2B,WAAY,MAAM,WAEzD,CAAC;AAEF,eAAO,MAAM,qBAAqB,aAAc,MAAM,KAAG,MAExD,CAAC;AAEF,eAAO,MAAM,+BAA+B,SAClC,MAAM,gBACC,OAAO,UAAU,CAAC,OAAO,KACvC,OAEF,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,gBAAe,OAAO,UAAU,CAAC,OAAO,YAEhF,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../src/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,eAAO,MAAM,UAAU,wCAGX,KAAK,qBAAqB,WASrC,CAAC;AAEF,eAAO,MAAM,cAAc,wCAGf,KAAK,qBAAqB,WAerC,CAAC;AAEF,eAAO,MAAM,OAAO,SAAU,MAAM,KAAG,MAAmC,CAAC;AAE3E,eAAO,MAAM,2BAA2B,WAAY,MAAM,WAEzD,CAAC;AAEF,eAAO,MAAM,qBAAqB,aAAc,MAAM,KAAG,MAExD,CAAC;AAEF,eAAO,MAAM,+BAA+B,SAClC,MAAM,gBACC,OAAO,UAAU,CAAC,OAAO,KACvC,OAEF,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,gBAAe,OAAO,UAAU,CAAC,OAAO,YAEhF,CAAC;AAEF,KAAK,SAAS,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,SAAS,kBAG9C,CAAC;AAQF,eAAO,MAAM,YAAY,wBAAyB,MAAM,cAAc,MAAM,cAe3E,CAAC"}
|
package/lib/cjs/dateUtils.js
CHANGED
|
@@ -28,30 +28,30 @@ const formatDateTime = (date, locale = 'en-us', format = {
|
|
|
28
28
|
if (!date) {
|
|
29
29
|
return '';
|
|
30
30
|
}
|
|
31
|
-
return exports.formatDate(date, locale, format);
|
|
31
|
+
return (0, exports.formatDate)(date, locale, format);
|
|
32
32
|
};
|
|
33
33
|
exports.formatDateTime = formatDateTime;
|
|
34
34
|
const isoDate = (date) => new Date(date).toString();
|
|
35
35
|
exports.isoDate = isoDate;
|
|
36
36
|
const getTimezoneOffsetFromTZName = (tzName) => {
|
|
37
|
-
return moment_timezone_1.default().tz(tzName).format('Z');
|
|
37
|
+
return (0, moment_timezone_1.default)().tz(tzName).format('Z');
|
|
38
38
|
};
|
|
39
39
|
exports.getTimezoneOffsetFromTZName = getTimezoneOffsetFromTZName;
|
|
40
40
|
const getPastUTCDateFromNow = (pastDays) => {
|
|
41
|
-
return moment_timezone_1.default().subtract(pastDays, 'days').utc().format();
|
|
41
|
+
return (0, moment_timezone_1.default)().subtract(pastDays, 'days').utc().format();
|
|
42
42
|
};
|
|
43
43
|
exports.getPastUTCDateFromNow = getPastUTCDateFromNow;
|
|
44
44
|
const isCurrentDateSameAsOrBeforeDate = (date, granularity = 'day') => {
|
|
45
|
-
return moment_timezone_1.default(moment_timezone_1.default.now()).isSameOrBefore(date, granularity);
|
|
45
|
+
return (0, moment_timezone_1.default)(moment_timezone_1.default.now()).isSameOrBefore(date, granularity);
|
|
46
46
|
};
|
|
47
47
|
exports.isCurrentDateSameAsOrBeforeDate = isCurrentDateSameAsOrBeforeDate;
|
|
48
48
|
const isFutureDate = (date, granularity = 'day') => {
|
|
49
|
-
return moment_timezone_1.default(date).isAfter(moment_timezone_1.default(), granularity);
|
|
49
|
+
return (0, moment_timezone_1.default)(date).isAfter((0, moment_timezone_1.default)(), granularity);
|
|
50
50
|
};
|
|
51
51
|
exports.isFutureDate = isFutureDate;
|
|
52
52
|
const addDaysToDate = (params) => {
|
|
53
53
|
const { days, date = new Date() } = params;
|
|
54
|
-
return moment_timezone_1.default(date).add(days, 'days');
|
|
54
|
+
return (0, moment_timezone_1.default)(date).add(days, 'days');
|
|
55
55
|
};
|
|
56
56
|
exports.addDaysToDate = addDaysToDate;
|
|
57
57
|
// split traffic based on time and weight
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IKeyValue, IOption, KeyOfExtractedType } from '@rh-support/types/shared';
|
|
2
|
-
|
|
2
|
+
type labelKeyFunction<O> = (item: O) => string;
|
|
3
3
|
export interface IToOptionsConfig<O> {
|
|
4
4
|
labelKey?: labelKeyFunction<O> | KeyOfExtractedType<O, IOption<O>['label']>;
|
|
5
5
|
additionalInfoKey?: KeyOfExtractedType<O, IOption<O>['additionalInfo']>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdownUtils.d.ts","sourceRoot":"","sources":["../../src/dropdownUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAIlF,
|
|
1
|
+
{"version":3,"file":"dropdownUtils.d.ts","sourceRoot":"","sources":["../../src/dropdownUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAIlF,KAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;AAC/C,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5E,iBAAiB,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACxE,WAAW,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAClC,WAAW,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5D,oBAAoB,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC5E,oBAAoB,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC5E,oBAAoB,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC5E,aAAa,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;CACnE;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,GAAE,gBAAgB,CAAC,CAAC,CAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CA+BlF;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,GAAE,gBAAgB,CAAC,CAAC,CAAM,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAE7F;AAED,wBAAgB,yBAAyB,CACrC,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,EAC9C,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,EACpB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,MAAM,CAWR"}
|
package/lib/cjs/dropdownUtils.js
CHANGED
|
@@ -10,7 +10,7 @@ function toOption(value, config = {}) {
|
|
|
10
10
|
return (value && {
|
|
11
11
|
value,
|
|
12
12
|
label: ((config === null || config === void 0 ? void 0 : config.labelKey)
|
|
13
|
-
? isFunction_1.default(config === null || config === void 0 ? void 0 : config.labelKey)
|
|
13
|
+
? (0, isFunction_1.default)(config === null || config === void 0 ? void 0 : config.labelKey)
|
|
14
14
|
? config === null || config === void 0 ? void 0 : config.labelKey(value)
|
|
15
15
|
: value[config === null || config === void 0 ? void 0 : config.labelKey] || ''
|
|
16
16
|
: value),
|
|
@@ -38,7 +38,7 @@ function toOption(value, config = {}) {
|
|
|
38
38
|
}
|
|
39
39
|
exports.toOption = toOption;
|
|
40
40
|
function toOptions(values, config = {}) {
|
|
41
|
-
return map_1.default(values, (v) => toOption(v, config));
|
|
41
|
+
return (0, map_1.default)(values, (v) => toOption(v, config));
|
|
42
42
|
}
|
|
43
43
|
exports.toOptions = toOptions;
|
|
44
44
|
function getDropdownBtnPlaceholder(btnPlaceholder, selectedValues, type, totalLength, totalLengthString) {
|
package/lib/cjs/eventUtils.js
CHANGED
|
@@ -19,7 +19,7 @@ exports.haltEvent = haltEvent;
|
|
|
19
19
|
function pendoTrackEvent(name, properties = {}) {
|
|
20
20
|
const pendo = window.pendo;
|
|
21
21
|
// log the event for prod and local envirnoment
|
|
22
|
-
if (!isEmpty_1.default(pendo) && (hydrajs_1.Env.getEnvName() === hydrajs_1.Env.EnvNames.PROD || hydrajs_1.Env.isLocalEnv())) {
|
|
22
|
+
if (!(0, isEmpty_1.default)(pendo) && (hydrajs_1.Env.getEnvName() === hydrajs_1.Env.EnvNames.PROD || hydrajs_1.Env.isLocalEnv())) {
|
|
23
23
|
pendo.track(name, properties);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostNameUtils.d.ts","sourceRoot":"","sources":["../../src/hostNameUtils.ts"],"names":[],"mappings":"AAEA,aAAK,cAAc;IACf,kBAAkB,uBAAuB;CAC5C;AAED,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"hostNameUtils.d.ts","sourceRoot":"","sources":["../../src/hostNameUtils.ts"],"names":[],"mappings":"AAEA,aAAK,cAAc;IACf,kBAAkB,uBAAuB;CAC5C;AAED,QAAA,MAAM,UAAU,cAqBf,CAAC;AAEF,QAAA,MAAM,4BAA4B,eAAgB,MAAM,WAGvD,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,4BAA4B,EAAE,CAAC"}
|
package/lib/cjs/hostNameUtils.js
CHANGED
|
@@ -5,8 +5,7 @@ const hydrajs_1 = require("@cee-eng/hydrajs");
|
|
|
5
5
|
var APP_HOST_NAMES;
|
|
6
6
|
(function (APP_HOST_NAMES) {
|
|
7
7
|
APP_HOST_NAMES["supportHubHostName"] = "supportHubHostName";
|
|
8
|
-
})(APP_HOST_NAMES || (APP_HOST_NAMES = {}));
|
|
9
|
-
exports.APP_HOST_NAMES = APP_HOST_NAMES;
|
|
8
|
+
})(APP_HOST_NAMES || (exports.APP_HOST_NAMES = APP_HOST_NAMES = {}));
|
|
10
9
|
const getSFDCEnv = () => {
|
|
11
10
|
const env = hydrajs_1.Env.getEnvName();
|
|
12
11
|
// Prod HostName
|
|
@@ -3,7 +3,7 @@ export declare enum PCM_CONFIG_FIELD_TYPE {
|
|
|
3
3
|
JSON = "JSON",
|
|
4
4
|
JSON_ARRAY = "JSON-ARRAY",
|
|
5
5
|
JSON_HASHMAP = "JSON-HASHMAP",
|
|
6
|
-
FEATURE_FLAG = "FEATURE-FLAG"
|
|
6
|
+
FEATURE_FLAG = "FEATURE-FLAG",// to handle values like 0 and 1
|
|
7
7
|
STRING_COMMA_SEPERATED = "STRING-COMMA-SEPERATED",
|
|
8
8
|
STRING = "STRING",
|
|
9
9
|
NUMBER = "NUMBER"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydraConfigUtils.d.ts","sourceRoot":"","sources":["../../src/hydraConfigUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAO1E,oBAAY,qBAAqB;IAC7B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;
|
|
1
|
+
{"version":3,"file":"hydraConfigUtils.d.ts","sourceRoot":"","sources":["../../src/hydraConfigUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAO1E,oBAAY,qBAAqB;IAC7B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB,CAAE,gCAAgC;IAC/D,sBAAsB,2BAA2B;IACjD,MAAM,WAAW;IACjB,MAAM,WAAW;CACpB;AAED,iBAAS,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,qBAA4B,OAgCzG;AAED,QAAA,MAAM,eAAe,WAAY,YAAY,EAAE,aAAa,MAAM,cAAa,qBAAqB,QAuCnG,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -18,9 +18,9 @@ var PCM_CONFIG_FIELD_TYPE;
|
|
|
18
18
|
PCM_CONFIG_FIELD_TYPE["STRING_COMMA_SEPERATED"] = "STRING-COMMA-SEPERATED";
|
|
19
19
|
PCM_CONFIG_FIELD_TYPE["STRING"] = "STRING";
|
|
20
20
|
PCM_CONFIG_FIELD_TYPE["NUMBER"] = "NUMBER";
|
|
21
|
-
})(PCM_CONFIG_FIELD_TYPE
|
|
21
|
+
})(PCM_CONFIG_FIELD_TYPE || (exports.PCM_CONFIG_FIELD_TYPE = PCM_CONFIG_FIELD_TYPE = {}));
|
|
22
22
|
function getConfigField(config, fieldName, fieldType = null) {
|
|
23
|
-
let values = reduce_1.default(config, (result, v) => {
|
|
23
|
+
let values = (0, reduce_1.default)(config, (result, v) => {
|
|
24
24
|
return v.fieldName.startsWith(fieldName) ? [...result, v.fieldValue] : result;
|
|
25
25
|
}, []);
|
|
26
26
|
if (fieldType && fieldType === PCM_CONFIG_FIELD_TYPE.STRING) {
|
|
@@ -41,9 +41,9 @@ function getConfigField(config, fieldName, fieldType = null) {
|
|
|
41
41
|
if (fieldType === PCM_CONFIG_FIELD_TYPE.JSON)
|
|
42
42
|
return parsed;
|
|
43
43
|
if (fieldType === PCM_CONFIG_FIELD_TYPE.JSON_ARRAY)
|
|
44
|
-
return reduce_1.default(parsed, concat_1.default);
|
|
44
|
+
return (0, reduce_1.default)(parsed, concat_1.default);
|
|
45
45
|
if (fieldType === PCM_CONFIG_FIELD_TYPE.JSON_HASHMAP)
|
|
46
|
-
return reduce_1.default(parsed, merge_1.default);
|
|
46
|
+
return (0, reduce_1.default)(parsed, merge_1.default);
|
|
47
47
|
}
|
|
48
48
|
catch (error) {
|
|
49
49
|
console.log(error);
|
|
@@ -51,8 +51,8 @@ function getConfigField(config, fieldName, fieldType = null) {
|
|
|
51
51
|
}
|
|
52
52
|
exports.getConfigField = getConfigField;
|
|
53
53
|
const getFieldInParts = (config, fieldName, fieldType = null) => {
|
|
54
|
-
const values = reduce_1.default(config, (result, v) => {
|
|
55
|
-
return startsWith_1.default(v.fieldName, fieldName) ? [...result, v.fieldValue] : result;
|
|
54
|
+
const values = (0, reduce_1.default)(config, (result, v) => {
|
|
55
|
+
return (0, startsWith_1.default)(v.fieldName, fieldName) ? [...result, v.fieldValue] : result;
|
|
56
56
|
}, []);
|
|
57
57
|
if (values.length === 0) {
|
|
58
58
|
return null;
|
|
@@ -62,17 +62,17 @@ const getFieldInParts = (config, fieldName, fieldType = null) => {
|
|
|
62
62
|
}
|
|
63
63
|
try {
|
|
64
64
|
if (fieldType === 'STRING-COMMA-SEPERATED') {
|
|
65
|
-
return reduce_1.default(values, (acc, value) => {
|
|
65
|
+
return (0, reduce_1.default)(values, (acc, value) => {
|
|
66
66
|
return acc.concat(value.split(','));
|
|
67
67
|
}, []);
|
|
68
68
|
}
|
|
69
|
-
const parsed = map_1.default(values, JSON.parse);
|
|
69
|
+
const parsed = (0, map_1.default)(values, JSON.parse);
|
|
70
70
|
if (fieldType === 'JSON') {
|
|
71
71
|
return parsed;
|
|
72
72
|
}
|
|
73
73
|
// if (fieldType === 'JSON-ARRAY') { return reduce(parsed, concat); }
|
|
74
74
|
if (fieldType === 'JSON-HASHMAP') {
|
|
75
|
-
return reduce_1.default(parsed, merge_1.default);
|
|
75
|
+
return (0, reduce_1.default)(parsed, merge_1.default);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
catch (error) {
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -7,13 +7,13 @@ exports.parseDotTemplate = exports.getRuleReasonHtml = void 0;
|
|
|
7
7
|
const ui_toolkit_1 = require("@cee-eng/ui-toolkit");
|
|
8
8
|
const doT_1 = __importDefault(require("dot/doT"));
|
|
9
9
|
const assign_1 = __importDefault(require("lodash/assign"));
|
|
10
|
-
doT_1.default.templateSettings = assign_1.default({}, doT_1.default.templateSettings, {
|
|
10
|
+
doT_1.default.templateSettings = (0, assign_1.default)({}, doT_1.default.templateSettings, {
|
|
11
11
|
varname: 'pydata',
|
|
12
12
|
strip: false,
|
|
13
13
|
});
|
|
14
14
|
function getRuleReasonHtml(ruleReason, reportDetails) {
|
|
15
15
|
const resultText = parseDotTemplate(ruleReason, reportDetails);
|
|
16
|
-
const html = ui_toolkit_1.markdownToHTML(resultText);
|
|
16
|
+
const html = (0, ui_toolkit_1.markdownToHTML)(resultText);
|
|
17
17
|
return html;
|
|
18
18
|
}
|
|
19
19
|
exports.getRuleReasonHtml = getRuleReasonHtml;
|
package/lib/cjs/productsUtils.js
CHANGED
|
@@ -14,26 +14,26 @@ const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
|
14
14
|
const validatorUtils_1 = require("./validatorUtils");
|
|
15
15
|
const handleProductSearchResponse = (productsResultAll, productsResultEntitled = [], topCount = 5) => {
|
|
16
16
|
const productsResultEntitledMap = {};
|
|
17
|
-
forEach_1.default(productsResultEntitled, (p) => {
|
|
17
|
+
(0, forEach_1.default)(productsResultEntitled, (p) => {
|
|
18
18
|
// If (p.supportedForCustomer)
|
|
19
19
|
// Needs confirmation froom CCM team before adding
|
|
20
20
|
productsResultEntitledMap[`${p.name}`] = p;
|
|
21
21
|
});
|
|
22
|
-
const productsResult = map_1.default(productsResultAll, (product) => {
|
|
22
|
+
const productsResult = (0, map_1.default)(productsResultAll, (product) => {
|
|
23
23
|
var _c, _d;
|
|
24
24
|
const entitledProduct = productsResultEntitledMap[product.product];
|
|
25
25
|
const uniqueVersions = getUniqueSortedVersions(product.versions);
|
|
26
|
-
return Object.assign(Object.assign(Object.assign({}, product), entitledProduct), { versions: uniqueVersions, isEntitledProduct: !isEmpty_1.default(entitledProduct), featuredVersion: ((_c = product.versions) === null || _c === void 0 ? void 0 : _c.includes(product.featuredVersion))
|
|
26
|
+
return Object.assign(Object.assign(Object.assign({}, product), entitledProduct), { versions: uniqueVersions, isEntitledProduct: !(0, isEmpty_1.default)(entitledProduct), featuredVersion: ((_c = product.versions) === null || _c === void 0 ? void 0 : _c.includes(product.featuredVersion))
|
|
27
27
|
? product.featuredVersion
|
|
28
28
|
: (_d = product === null || product === void 0 ? void 0 : product.versions[0]) !== null && _d !== void 0 ? _d : '' });
|
|
29
29
|
});
|
|
30
30
|
// We get products based on the highest number of support cases
|
|
31
31
|
const topProducts = getTopProducts(productsResult, topCount);
|
|
32
|
-
const productsResultSorted = orderBy_1.default(productsResult, ['product'], ['asc']);
|
|
32
|
+
const productsResultSorted = (0, orderBy_1.default)(productsResult, ['product'], ['asc']);
|
|
33
33
|
return {
|
|
34
34
|
productsResult: productsResultSorted,
|
|
35
35
|
topProducts,
|
|
36
|
-
otherProducts: difference_1.default(productsResultSorted, topProducts),
|
|
36
|
+
otherProducts: (0, difference_1.default)(productsResultSorted, topProducts),
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
exports.handleProductSearchResponse = handleProductSearchResponse;
|
|
@@ -48,11 +48,11 @@ const handleEntitledProductResponse = (productsResultEntitled = []) => {
|
|
|
48
48
|
return Object.assign(Object.assign({}, product), { product: product.name, isEntitledProduct: true });
|
|
49
49
|
});
|
|
50
50
|
const topProducts = getTopProducts(productsResult);
|
|
51
|
-
const productsResultSorted = orderBy_1.default(productsResult, ['product'], ['asc']);
|
|
51
|
+
const productsResultSorted = (0, orderBy_1.default)(productsResult, ['product'], ['asc']);
|
|
52
52
|
return {
|
|
53
53
|
productsResult: productsResultSorted,
|
|
54
54
|
topProducts,
|
|
55
|
-
otherProducts: difference_1.default(productsResultSorted, topProducts),
|
|
55
|
+
otherProducts: (0, difference_1.default)(productsResultSorted, topProducts),
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
exports.handleEntitledProductResponse = handleEntitledProductResponse;
|
|
@@ -62,9 +62,9 @@ exports.handleEntitledProductResponse = handleEntitledProductResponse;
|
|
|
62
62
|
* @param products Partial<ISEProduct>
|
|
63
63
|
*/
|
|
64
64
|
function getTopProducts(products, topCount = 5) {
|
|
65
|
-
const toReturn = remove_1.default([...products], (o) => o.recentlyFiledAgainst);
|
|
65
|
+
const toReturn = (0, remove_1.default)([...products], (o) => o.recentlyFiledAgainst);
|
|
66
66
|
if (toReturn.length < topCount) {
|
|
67
|
-
const generalTopProducts = remove_1.default([...products], (o) => !o.recentlyFiledAgainst && o.isTopProduct);
|
|
67
|
+
const generalTopProducts = (0, remove_1.default)([...products], (o) => !o.recentlyFiledAgainst && o.isTopProduct);
|
|
68
68
|
toReturn.push(...generalTopProducts);
|
|
69
69
|
}
|
|
70
70
|
return toReturn.slice(0, topCount);
|
|
@@ -79,7 +79,7 @@ function getVersionIfOnlyVersion(versions) {
|
|
|
79
79
|
}
|
|
80
80
|
exports.getVersionIfOnlyVersion = getVersionIfOnlyVersion;
|
|
81
81
|
function getUniqueSortedVersions(versions) {
|
|
82
|
-
return exports.versionSort(uniq_1.default(versions));
|
|
82
|
+
return (0, exports.versionSort)((0, uniq_1.default)(versions));
|
|
83
83
|
}
|
|
84
84
|
exports.getUniqueSortedVersions = getUniqueSortedVersions;
|
|
85
85
|
const versionSorter = (_a, _b) => {
|
|
@@ -122,9 +122,9 @@ function getVersion(version) {
|
|
|
122
122
|
// if either of the split array is not a number then it is not a regular version.
|
|
123
123
|
// there is no need to check if the second or third is a number because it is possible for the version to have a letter the version "number"
|
|
124
124
|
// e.g. 1.x or 1.2.x
|
|
125
|
-
if (!validatorUtils_1.isNumber(splitArray[0]))
|
|
125
|
+
if (!(0, validatorUtils_1.isNumber)(splitArray[0]))
|
|
126
126
|
return { major: version };
|
|
127
|
-
else if (!validatorUtils_1.isNumber(splitArray[1]))
|
|
127
|
+
else if (!(0, validatorUtils_1.isNumber)(splitArray[1]))
|
|
128
128
|
return { major: version.split('.')[0] };
|
|
129
129
|
else
|
|
130
130
|
return { major: version.split('.')[0], minor: version.split('.')[1] };
|
|
@@ -7,11 +7,11 @@ exports.cleanupMarkDown = exports.decodeMarkTag = exports.truncate = exports.rep
|
|
|
7
7
|
const dompurify_1 = __importDefault(require("dompurify"));
|
|
8
8
|
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
9
9
|
function getRecommendationTitle(doc) {
|
|
10
|
-
return !isEmpty_1.default(doc.publishedTitle) ? doc.publishedTitle : doc.allTitle;
|
|
10
|
+
return !(0, isEmpty_1.default)(doc.publishedTitle) ? doc.publishedTitle : doc.allTitle;
|
|
11
11
|
}
|
|
12
12
|
exports.getRecommendationTitle = getRecommendationTitle;
|
|
13
13
|
function getRecommendationAbstract(doc) {
|
|
14
|
-
return !isEmpty_1.default(doc.publishedAbstract) ? doc.publishedAbstract : doc.abstract;
|
|
14
|
+
return !(0, isEmpty_1.default)(doc.publishedAbstract) ? doc.publishedAbstract : doc.abstract;
|
|
15
15
|
}
|
|
16
16
|
exports.getRecommendationAbstract = getRecommendationAbstract;
|
|
17
17
|
function computeRecommendationTitle(doc) {
|
package/lib/cjs/scrollUtils.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.isElementInViewport = exports.scrollIntoView = void 0;
|
|
|
7
7
|
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
8
8
|
function scrollIntoView(sectionRef, options) {
|
|
9
9
|
var _a, _b, _c;
|
|
10
|
-
if (isEmpty_1.default(sectionRef === null || sectionRef === void 0 ? void 0 : sectionRef.current))
|
|
10
|
+
if ((0, isEmpty_1.default)(sectionRef === null || sectionRef === void 0 ? void 0 : sectionRef.current))
|
|
11
11
|
return;
|
|
12
12
|
if (!!(options === null || options === void 0 ? void 0 : options.onlyIfNotInViewport) && isElementInViewport(sectionRef, options === null || options === void 0 ? void 0 : options.navBarRef))
|
|
13
13
|
return;
|
|
@@ -61,7 +61,7 @@ function scrollIntoView(sectionRef, options) {
|
|
|
61
61
|
exports.scrollIntoView = scrollIntoView;
|
|
62
62
|
function isElementInViewport(el, topStaticNavRef) {
|
|
63
63
|
var _a, _b;
|
|
64
|
-
if (isEmpty_1.default(el === null || el === void 0 ? void 0 : el.current)) {
|
|
64
|
+
if ((0, isEmpty_1.default)(el === null || el === void 0 ? void 0 : el.current)) {
|
|
65
65
|
return false;
|
|
66
66
|
}
|
|
67
67
|
const topNavHeight = (_b = (_a = topStaticNavRef === null || topStaticNavRef === void 0 ? void 0 : topStaticNavRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0;
|
|
@@ -2,7 +2,7 @@ import { ISearchSolrQuery } from '@cee-eng/hydrajs/@types/api/search';
|
|
|
2
2
|
import { ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
|
|
3
3
|
export declare const documentKindToInclude = "documentKind:(\"Solution\" OR \"Video\" OR \"Article\" OR \"Errata\" OR \"Vulnerability\" OR \"Cve\" OR \"LabInfo\")";
|
|
4
4
|
export declare const issuesDefaultParamsObj: ISearchSolrQuery;
|
|
5
|
-
export
|
|
5
|
+
export type IRecommendationAdditionalFilters = {
|
|
6
6
|
[key in keyof ISolrRecommendation]?: string[] | {
|
|
7
7
|
values: string[];
|
|
8
8
|
exclude: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchApiUtils.d.ts","sourceRoot":"","sources":["../../src/searchApiUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAG/E,eAAO,MAAM,qBAAqB,yHAC0E,CAAC;AAE7G,eAAO,MAAM,sBAAsB,EAAE,gBAapC,CAAC;AAMF,
|
|
1
|
+
{"version":3,"file":"searchApiUtils.d.ts","sourceRoot":"","sources":["../../src/searchApiUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAG/E,eAAO,MAAM,qBAAqB,yHAC0E,CAAC;AAE7G,eAAO,MAAM,sBAAsB,EAAE,gBAapC,CAAC;AAMF,MAAM,MAAM,gCAAgC,GAAG;KAC1C,GAAG,IAAI,MAAM,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,IAAI,CAAA;KAAE;CACtF,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,iBAAiB,KAAA,QAc5E;AAED,wBAAgB,aAAa,CACzB,IAAI,EAAE,MAAM,EACZ,yBAAyB,EAAE,MAAM,EACjC,iBAAiB,CAAC,EAAE,gCAAgC,EACpD,WAAW,CAAC,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWxB"}
|
|
@@ -40,7 +40,7 @@ function addFiltersToFieldQueries(fqArray, additionalFilters) {
|
|
|
40
40
|
}
|
|
41
41
|
exports.addFiltersToFieldQueries = addFiltersToFieldQueries;
|
|
42
42
|
function getSolrParams(rows, highlighted_fragment_size, additionalFilters, QueryFields) {
|
|
43
|
-
const cloneIssueParams = cloneDeep_1.default(exports.issuesDefaultParamsObj);
|
|
43
|
+
const cloneIssueParams = (0, cloneDeep_1.default)(exports.issuesDefaultParamsObj);
|
|
44
44
|
const issueParamsObj = Object.assign(Object.assign({}, cloneIssueParams), { rows, 'hl.fragsize': highlighted_fragment_size, seQueryFields: QueryFields || false });
|
|
45
45
|
additionalFilters && addFiltersToFieldQueries(issueParamsObj.fq, additionalFilters);
|
|
46
46
|
return issueParamsObj;
|
package/lib/cjs/solrUtils.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare function solr(init?: ISolrQP): {
|
|
|
32
32
|
beginOr: () => any;
|
|
33
33
|
endOr: () => any;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type ISolrResponseToFacetFields<T> = {
|
|
36
36
|
[key in keyof T]?: IFacetResponse[];
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
@@ -41,8 +41,8 @@ export declare type ISolrResponseToFacetFields<T> = {
|
|
|
41
41
|
* Accepts solrResponse and then return the facet values in an object map
|
|
42
42
|
* with key being the facet key and value being of type IFacetResponse
|
|
43
43
|
*/
|
|
44
|
-
export declare function solrResponseToFacetFields<T, U>(solrResponse: T): ISolrResponseToFacetFields<U>;
|
|
45
|
-
export
|
|
44
|
+
export declare function solrResponseToFacetFields<T, U extends object>(solrResponse: T): ISolrResponseToFacetFields<U>;
|
|
45
|
+
export type ISolrResponseToPivotFields<T, U> = {
|
|
46
46
|
[key in keyof T]?: U[];
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
@@ -52,7 +52,7 @@ export declare type ISolrResponseToPivotFields<T, U> = {
|
|
|
52
52
|
* with key being the pivot key(ex: 'case_product,case_version') and
|
|
53
53
|
* value being of type IFacetResponse and also next pivot as the key and its value again of type IFacetResponse.
|
|
54
54
|
*/
|
|
55
|
-
export declare function solrResponseToPivotFields<T, U, V>(solrResponse: T): ISolrResponseToPivotFields<U, V>;
|
|
55
|
+
export declare function solrResponseToPivotFields<T, U extends object, V>(solrResponse: T): ISolrResponseToPivotFields<U, V>;
|
|
56
56
|
/**
|
|
57
57
|
*
|
|
58
58
|
* @param fieldValueMap
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solrUtils.d.ts","sourceRoot":"","sources":["../../src/solrUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,MAAM,WAAW,OAAO;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,kCAAkC,CAAC,EAAE,MAAM,CAAC;IAC5C,qCAAqC,CAAC,EAAE,MAAM,CAAC;CAClD;AAsBD,wBAAgB,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO;YAOnB,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,QAAQ,MAAM;;;;;oBAmBlC,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,QAAQ,MAAM;wBAWtC,MAAM,gBAAgB,MAAM,EAAE;wBAS9B,MAAM,gBAAgB,MAAM,EAAE;iBAOvC,OAAO;;;EAoBzB;AAED,
|
|
1
|
+
{"version":3,"file":"solrUtils.d.ts","sourceRoot":"","sources":["../../src/solrUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,MAAM,WAAW,OAAO;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,kCAAkC,CAAC,EAAE,MAAM,CAAC;IAC5C,qCAAqC,CAAC,EAAE,MAAM,CAAC;CAClD;AAsBD,wBAAgB,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO;YAOnB,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,QAAQ,MAAM;;;;;oBAmBlC,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,QAAQ,MAAM;wBAWtC,MAAM,gBAAgB,MAAM,EAAE;wBAS9B,MAAM,gBAAgB,MAAM,EAAE;iBAOvC,OAAO;;;EAoBzB;AAED,MAAM,MAAM,0BAA0B,CAAC,CAAC,IAAI;KACvC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE;CACtC,CAAC;AAEF;;;;;GAKG;AAEH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,0BAA0B,CAAC,CAAC,CAAC,CAmB7G;AAED,MAAM,MAAM,0BAA0B,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1C,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;CACzB,CAAC;AAEF;;;;;;GAMG;AAEH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,CAYnH;AAmBD;;;;;;GAMG;AAEH,wBAAgB,cAAc,CAAC,aAAa,KAAA,EAAE,mBAAmB,UAAQ,OA4BxE;AA+BD;;;;;;;;GAQG;AAEH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,MAU3C"}
|
package/lib/cjs/solrUtils.js
CHANGED
|
@@ -9,7 +9,7 @@ const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
|
9
9
|
const lucene_1 = __importDefault(require("lucene"));
|
|
10
10
|
const solr_query_builder_1 = __importDefault(require("solr-query-builder"));
|
|
11
11
|
function If(cond, v) {
|
|
12
|
-
return !isEmpty_1.default(cond) ? v || cond : '';
|
|
12
|
+
return !(0, isEmpty_1.default)(cond) ? v || cond : '';
|
|
13
13
|
}
|
|
14
14
|
function processFQValue(val, { join }) {
|
|
15
15
|
// val can be one of
|
|
@@ -35,7 +35,7 @@ function solr(init) {
|
|
|
35
35
|
let partialTag = [];
|
|
36
36
|
const solr = {
|
|
37
37
|
fq: (k, v, tag, options = { processValue: { join: 'OR' } }) => {
|
|
38
|
-
if (isEmpty_1.default(v))
|
|
38
|
+
if ((0, isEmpty_1.default)(v))
|
|
39
39
|
return solr;
|
|
40
40
|
const _fq = query.fq || [];
|
|
41
41
|
const _tag = If(tag, `{!tag=${tag}}`);
|
|
@@ -54,7 +54,7 @@ function solr(init) {
|
|
|
54
54
|
return solr;
|
|
55
55
|
},
|
|
56
56
|
preBuiltfq: (k, v, tag) => {
|
|
57
|
-
if (isEmpty_1.default(v))
|
|
57
|
+
if ((0, isEmpty_1.default)(v))
|
|
58
58
|
return solr;
|
|
59
59
|
const _fq = query.fq || [];
|
|
60
60
|
const _tag = If(tag, `{!tag=${tag}}`);
|
|
@@ -105,7 +105,7 @@ exports.solr = solr;
|
|
|
105
105
|
* with key being the facet key and value being of type IFacetResponse
|
|
106
106
|
*/
|
|
107
107
|
function solrResponseToFacetFields(solrResponse) {
|
|
108
|
-
const solrFacets = get_1.default(solrResponse, 'facet_counts.facet_fields', {});
|
|
108
|
+
const solrFacets = (0, get_1.default)(solrResponse, 'facet_counts.facet_fields', {});
|
|
109
109
|
const facets = {};
|
|
110
110
|
Object.keys(solrFacets).forEach((_facetKey) => {
|
|
111
111
|
const facetKey = _facetKey;
|
|
@@ -130,10 +130,9 @@ exports.solrResponseToFacetFields = solrResponseToFacetFields;
|
|
|
130
130
|
* value being of type IFacetResponse and also next pivot as the key and its value again of type IFacetResponse.
|
|
131
131
|
*/
|
|
132
132
|
function solrResponseToPivotFields(solrResponse) {
|
|
133
|
-
const solrPivots = get_1.default(solrResponse, 'facet_counts.facet_pivot', {});
|
|
133
|
+
const solrPivots = (0, get_1.default)(solrResponse, 'facet_counts.facet_pivot', {});
|
|
134
134
|
const pivots = {};
|
|
135
|
-
Object.keys(solrPivots).forEach((
|
|
136
|
-
const pivotKey = _pivotKey;
|
|
135
|
+
Object.keys(solrPivots).forEach((pivotKey) => {
|
|
137
136
|
pivots[pivotKey] = [];
|
|
138
137
|
for (let i = 0; i < solrPivots[pivotKey].length; i++) {
|
|
139
138
|
pivots[pivotKey].push(createPivotObject(solrPivots[pivotKey][i]));
|
|
@@ -235,7 +234,7 @@ function parseSolrQuery(query) {
|
|
|
235
234
|
if (!query)
|
|
236
235
|
return {};
|
|
237
236
|
const parsedQuery = lucene_1.default.parse(query);
|
|
238
|
-
if (isEmpty_1.default(parsedQuery)) {
|
|
237
|
+
if ((0, isEmpty_1.default)(parsedQuery)) {
|
|
239
238
|
return {};
|
|
240
239
|
}
|
|
241
240
|
const filterObject = {};
|
package/lib/cjs/styleUtils.js
CHANGED
|
@@ -8,7 +8,7 @@ var StyleVariants;
|
|
|
8
8
|
StyleVariants[StyleVariants["WARNING"] = 2] = "WARNING";
|
|
9
9
|
StyleVariants[StyleVariants["DEFAULT"] = 3] = "DEFAULT";
|
|
10
10
|
StyleVariants[StyleVariants["DANGER"] = 4] = "DANGER";
|
|
11
|
-
})(StyleVariants
|
|
11
|
+
})(StyleVariants || (exports.StyleVariants = StyleVariants = {}));
|
|
12
12
|
function getBGColorStyle(styleVariant) {
|
|
13
13
|
return {
|
|
14
14
|
backgroundColor: getStyleVariantColor(styleVariant),
|
package/lib/cjs/urlUtils.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IParseOptions, IStringifyOptions } from 'qs';
|
|
2
|
-
export declare function getUrlParsedParams(urlParams: string, options?: IParseOptions):
|
|
2
|
+
export declare function getUrlParsedParams(urlParams: string, options?: IParseOptions): {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
};
|
|
3
5
|
export declare function getStringifiedParams<T>(object: T, options?: IStringifyOptions): string;
|
|
4
6
|
export declare const REDHAT_DOT_COM_HOSTNAMES: {
|
|
5
7
|
QA: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlUtils.d.ts","sourceRoot":"","sources":["../../src/urlUtils.ts"],"names":[],"mappings":"AACA,OAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AAG1D,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa
|
|
1
|
+
{"version":3,"file":"urlUtils.d.ts","sourceRoot":"","sources":["../../src/urlUtils.ts"],"names":[],"mappings":"AACA,OAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AAG1D,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;;EAG5E;AAGD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,UAG7E;AAED,eAAO,MAAM,wBAAwB;;;;;CAKpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,sBAW/B,CAAC;AAKF,eAAO,MAAM,iBAAiB,QAAS,MAAM,WAK5C,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAS,MAAM,WAGhD,CAAC;AAEF,eAAO,MAAM,2BAA2B,QAC/B,MAAM,kBACI,MAAM,EAAE,KACxB,MAKF,CAAC;AAMF,eAAO,MAAM,qBAAqB,iBAChB,MAAM,GAAG,MAAM,YACnB,MAAM;;;MAEjB,MAOF,CAAC;AAEF,eAAO,MAAM,UAAU,QAAS,MAAM,KAAG,OAExC,CAAC"}
|
package/lib/cjs/urlUtils.js
CHANGED
|
@@ -65,7 +65,7 @@ const getUpdatedQueryString = (currentQuery, newQuery, { resetSearchParams = fal
|
|
|
65
65
|
const currentQueryObj = typeof currentQuery === 'string' ? getUrlParsedParams(currentQuery) : currentQuery;
|
|
66
66
|
const mergedQueryObject = Object.assign(Object.assign({}, currentQueryObj), newQuery);
|
|
67
67
|
const updatedQuery = removeEmptyParams
|
|
68
|
-
? pickBy_1.default(mergedQueryObject, (item) => !isFieldValueEmpty(item))
|
|
68
|
+
? (0, pickBy_1.default)(mergedQueryObject, (item) => !isFieldValueEmpty(item))
|
|
69
69
|
: mergedQueryObject;
|
|
70
70
|
return !resetSearchParams ? getStringifiedParams(updatedQuery) : getStringifiedParams(newQuery);
|
|
71
71
|
};
|
package/lib/cjs/userUtils.js
CHANGED
|
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.sortHydraContacts = void 0;
|
|
7
7
|
const sortBy_1 = __importDefault(require("lodash/sortBy"));
|
|
8
8
|
const sortHydraContacts = (hydraContacts) => {
|
|
9
|
-
return sortBy_1.default(hydraContacts, 'firstName', 'lastName');
|
|
9
|
+
return (0, sortBy_1.default)(hydraContacts, 'firstName', 'lastName');
|
|
10
10
|
};
|
|
11
11
|
exports.sortHydraContacts = sortHydraContacts;
|
package/lib/esm/dateUtils.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const getTimezoneOffsetFromTZName: (tzName: string) => string;
|
|
|
6
6
|
export declare const getPastUTCDateFromNow: (pastDays: number) => string;
|
|
7
7
|
export declare const isCurrentDateSameAsOrBeforeDate: (date: string, granularity?: moment.unitOfTime.StartOf) => boolean;
|
|
8
8
|
export declare const isFutureDate: (date: string, granularity?: moment.unitOfTime.StartOf) => boolean;
|
|
9
|
-
|
|
9
|
+
type AddToDate = {
|
|
10
10
|
days: number;
|
|
11
11
|
date?: string;
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../src/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,eAAO,MAAM,UAAU,wCAGX,KAAK,qBAAqB,WASrC,CAAC;AAEF,eAAO,MAAM,cAAc,wCAGf,KAAK,qBAAqB,WAerC,CAAC;AAEF,eAAO,MAAM,OAAO,SAAU,MAAM,KAAG,MAAmC,CAAC;AAE3E,eAAO,MAAM,2BAA2B,WAAY,MAAM,WAEzD,CAAC;AAEF,eAAO,MAAM,qBAAqB,aAAc,MAAM,KAAG,MAExD,CAAC;AAEF,eAAO,MAAM,+BAA+B,SAClC,MAAM,gBACC,OAAO,UAAU,CAAC,OAAO,KACvC,OAEF,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,gBAAe,OAAO,UAAU,CAAC,OAAO,YAEhF,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../src/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,eAAO,MAAM,UAAU,wCAGX,KAAK,qBAAqB,WASrC,CAAC;AAEF,eAAO,MAAM,cAAc,wCAGf,KAAK,qBAAqB,WAerC,CAAC;AAEF,eAAO,MAAM,OAAO,SAAU,MAAM,KAAG,MAAmC,CAAC;AAE3E,eAAO,MAAM,2BAA2B,WAAY,MAAM,WAEzD,CAAC;AAEF,eAAO,MAAM,qBAAqB,aAAc,MAAM,KAAG,MAExD,CAAC;AAEF,eAAO,MAAM,+BAA+B,SAClC,MAAM,gBACC,OAAO,UAAU,CAAC,OAAO,KACvC,OAEF,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,gBAAe,OAAO,UAAU,CAAC,OAAO,YAEhF,CAAC;AAEF,KAAK,SAAS,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,SAAS,kBAG9C,CAAC;AAQF,eAAO,MAAM,YAAY,wBAAyB,MAAM,cAAc,MAAM,cAe3E,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IKeyValue, IOption, KeyOfExtractedType } from '@rh-support/types/shared';
|
|
2
|
-
|
|
2
|
+
type labelKeyFunction<O> = (item: O) => string;
|
|
3
3
|
export interface IToOptionsConfig<O> {
|
|
4
4
|
labelKey?: labelKeyFunction<O> | KeyOfExtractedType<O, IOption<O>['label']>;
|
|
5
5
|
additionalInfoKey?: KeyOfExtractedType<O, IOption<O>['additionalInfo']>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdownUtils.d.ts","sourceRoot":"","sources":["../../src/dropdownUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAIlF,
|
|
1
|
+
{"version":3,"file":"dropdownUtils.d.ts","sourceRoot":"","sources":["../../src/dropdownUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAIlF,KAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;AAC/C,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5E,iBAAiB,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACxE,WAAW,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAClC,WAAW,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5D,oBAAoB,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC5E,oBAAoB,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC5E,oBAAoB,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC5E,aAAa,CAAC,EAAE,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;CACnE;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,GAAE,gBAAgB,CAAC,CAAC,CAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CA+BlF;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,GAAE,gBAAgB,CAAC,CAAC,CAAM,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAE7F;AAED,wBAAgB,yBAAyB,CACrC,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,EAC9C,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,EACpB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,MAAM,CAWR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostNameUtils.d.ts","sourceRoot":"","sources":["../../src/hostNameUtils.ts"],"names":[],"mappings":"AAEA,aAAK,cAAc;IACf,kBAAkB,uBAAuB;CAC5C;AAED,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"hostNameUtils.d.ts","sourceRoot":"","sources":["../../src/hostNameUtils.ts"],"names":[],"mappings":"AAEA,aAAK,cAAc;IACf,kBAAkB,uBAAuB;CAC5C;AAED,QAAA,MAAM,UAAU,cAqBf,CAAC;AAEF,QAAA,MAAM,4BAA4B,eAAgB,MAAM,WAGvD,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,4BAA4B,EAAE,CAAC"}
|
|
@@ -3,7 +3,7 @@ export declare enum PCM_CONFIG_FIELD_TYPE {
|
|
|
3
3
|
JSON = "JSON",
|
|
4
4
|
JSON_ARRAY = "JSON-ARRAY",
|
|
5
5
|
JSON_HASHMAP = "JSON-HASHMAP",
|
|
6
|
-
FEATURE_FLAG = "FEATURE-FLAG"
|
|
6
|
+
FEATURE_FLAG = "FEATURE-FLAG",// to handle values like 0 and 1
|
|
7
7
|
STRING_COMMA_SEPERATED = "STRING-COMMA-SEPERATED",
|
|
8
8
|
STRING = "STRING",
|
|
9
9
|
NUMBER = "NUMBER"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydraConfigUtils.d.ts","sourceRoot":"","sources":["../../src/hydraConfigUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAO1E,oBAAY,qBAAqB;IAC7B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;
|
|
1
|
+
{"version":3,"file":"hydraConfigUtils.d.ts","sourceRoot":"","sources":["../../src/hydraConfigUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAO1E,oBAAY,qBAAqB;IAC7B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB,CAAE,gCAAgC;IAC/D,sBAAsB,2BAA2B;IACjD,MAAM,WAAW;IACjB,MAAM,WAAW;CACpB;AAED,iBAAS,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,qBAA4B,OAgCzG;AAED,QAAA,MAAM,eAAe,WAAY,YAAY,EAAE,aAAa,MAAM,cAAa,qBAAqB,QAuCnG,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { ISearchSolrQuery } from '@cee-eng/hydrajs/@types/api/search';
|
|
|
2
2
|
import { ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
|
|
3
3
|
export declare const documentKindToInclude = "documentKind:(\"Solution\" OR \"Video\" OR \"Article\" OR \"Errata\" OR \"Vulnerability\" OR \"Cve\" OR \"LabInfo\")";
|
|
4
4
|
export declare const issuesDefaultParamsObj: ISearchSolrQuery;
|
|
5
|
-
export
|
|
5
|
+
export type IRecommendationAdditionalFilters = {
|
|
6
6
|
[key in keyof ISolrRecommendation]?: string[] | {
|
|
7
7
|
values: string[];
|
|
8
8
|
exclude: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchApiUtils.d.ts","sourceRoot":"","sources":["../../src/searchApiUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAG/E,eAAO,MAAM,qBAAqB,yHAC0E,CAAC;AAE7G,eAAO,MAAM,sBAAsB,EAAE,gBAapC,CAAC;AAMF,
|
|
1
|
+
{"version":3,"file":"searchApiUtils.d.ts","sourceRoot":"","sources":["../../src/searchApiUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAG/E,eAAO,MAAM,qBAAqB,yHAC0E,CAAC;AAE7G,eAAO,MAAM,sBAAsB,EAAE,gBAapC,CAAC;AAMF,MAAM,MAAM,gCAAgC,GAAG;KAC1C,GAAG,IAAI,MAAM,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,IAAI,CAAA;KAAE;CACtF,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,iBAAiB,KAAA,QAc5E;AAED,wBAAgB,aAAa,CACzB,IAAI,EAAE,MAAM,EACZ,yBAAyB,EAAE,MAAM,EACjC,iBAAiB,CAAC,EAAE,gCAAgC,EACpD,WAAW,CAAC,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWxB"}
|
package/lib/esm/solrUtils.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare function solr(init?: ISolrQP): {
|
|
|
32
32
|
beginOr: () => any;
|
|
33
33
|
endOr: () => any;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type ISolrResponseToFacetFields<T> = {
|
|
36
36
|
[key in keyof T]?: IFacetResponse[];
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
@@ -41,8 +41,8 @@ export declare type ISolrResponseToFacetFields<T> = {
|
|
|
41
41
|
* Accepts solrResponse and then return the facet values in an object map
|
|
42
42
|
* with key being the facet key and value being of type IFacetResponse
|
|
43
43
|
*/
|
|
44
|
-
export declare function solrResponseToFacetFields<T, U>(solrResponse: T): ISolrResponseToFacetFields<U>;
|
|
45
|
-
export
|
|
44
|
+
export declare function solrResponseToFacetFields<T, U extends object>(solrResponse: T): ISolrResponseToFacetFields<U>;
|
|
45
|
+
export type ISolrResponseToPivotFields<T, U> = {
|
|
46
46
|
[key in keyof T]?: U[];
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
@@ -52,7 +52,7 @@ export declare type ISolrResponseToPivotFields<T, U> = {
|
|
|
52
52
|
* with key being the pivot key(ex: 'case_product,case_version') and
|
|
53
53
|
* value being of type IFacetResponse and also next pivot as the key and its value again of type IFacetResponse.
|
|
54
54
|
*/
|
|
55
|
-
export declare function solrResponseToPivotFields<T, U, V>(solrResponse: T): ISolrResponseToPivotFields<U, V>;
|
|
55
|
+
export declare function solrResponseToPivotFields<T, U extends object, V>(solrResponse: T): ISolrResponseToPivotFields<U, V>;
|
|
56
56
|
/**
|
|
57
57
|
*
|
|
58
58
|
* @param fieldValueMap
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solrUtils.d.ts","sourceRoot":"","sources":["../../src/solrUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,MAAM,WAAW,OAAO;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,kCAAkC,CAAC,EAAE,MAAM,CAAC;IAC5C,qCAAqC,CAAC,EAAE,MAAM,CAAC;CAClD;AAsBD,wBAAgB,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO;YAOnB,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,QAAQ,MAAM;;;;;oBAmBlC,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,QAAQ,MAAM;wBAWtC,MAAM,gBAAgB,MAAM,EAAE;wBAS9B,MAAM,gBAAgB,MAAM,EAAE;iBAOvC,OAAO;;;EAoBzB;AAED,
|
|
1
|
+
{"version":3,"file":"solrUtils.d.ts","sourceRoot":"","sources":["../../src/solrUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,MAAM,WAAW,OAAO;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,kCAAkC,CAAC,EAAE,MAAM,CAAC;IAC5C,qCAAqC,CAAC,EAAE,MAAM,CAAC;CAClD;AAsBD,wBAAgB,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO;YAOnB,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,QAAQ,MAAM;;;;;oBAmBlC,MAAM,KAAK,MAAM,GAAG,MAAM,EAAE,QAAQ,MAAM;wBAWtC,MAAM,gBAAgB,MAAM,EAAE;wBAS9B,MAAM,gBAAgB,MAAM,EAAE;iBAOvC,OAAO;;;EAoBzB;AAED,MAAM,MAAM,0BAA0B,CAAC,CAAC,IAAI;KACvC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE;CACtC,CAAC;AAEF;;;;;GAKG;AAEH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,YAAY,EAAE,CAAC,GAAG,0BAA0B,CAAC,CAAC,CAAC,CAmB7G;AAED,MAAM,MAAM,0BAA0B,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1C,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;CACzB,CAAC;AAEF;;;;;;GAMG;AAEH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,CAYnH;AAmBD;;;;;;GAMG;AAEH,wBAAgB,cAAc,CAAC,aAAa,KAAA,EAAE,mBAAmB,UAAQ,OA4BxE;AA+BD;;;;;;;;GAQG;AAEH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,MAU3C"}
|
package/lib/esm/solrUtils.js
CHANGED
|
@@ -124,8 +124,7 @@ export function solrResponseToFacetFields(solrResponse) {
|
|
|
124
124
|
export function solrResponseToPivotFields(solrResponse) {
|
|
125
125
|
const solrPivots = get(solrResponse, 'facet_counts.facet_pivot', {});
|
|
126
126
|
const pivots = {};
|
|
127
|
-
Object.keys(solrPivots).forEach((
|
|
128
|
-
const pivotKey = _pivotKey;
|
|
127
|
+
Object.keys(solrPivots).forEach((pivotKey) => {
|
|
129
128
|
pivots[pivotKey] = [];
|
|
130
129
|
for (let i = 0; i < solrPivots[pivotKey].length; i++) {
|
|
131
130
|
pivots[pivotKey].push(createPivotObject(solrPivots[pivotKey][i]));
|
package/lib/esm/urlUtils.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IParseOptions, IStringifyOptions } from 'qs';
|
|
2
|
-
export declare function getUrlParsedParams(urlParams: string, options?: IParseOptions):
|
|
2
|
+
export declare function getUrlParsedParams(urlParams: string, options?: IParseOptions): {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
};
|
|
3
5
|
export declare function getStringifiedParams<T>(object: T, options?: IStringifyOptions): string;
|
|
4
6
|
export declare const REDHAT_DOT_COM_HOSTNAMES: {
|
|
5
7
|
QA: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlUtils.d.ts","sourceRoot":"","sources":["../../src/urlUtils.ts"],"names":[],"mappings":"AACA,OAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AAG1D,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa
|
|
1
|
+
{"version":3,"file":"urlUtils.d.ts","sourceRoot":"","sources":["../../src/urlUtils.ts"],"names":[],"mappings":"AACA,OAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AAG1D,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;;EAG5E;AAGD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,UAG7E;AAED,eAAO,MAAM,wBAAwB;;;;;CAKpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,sBAW/B,CAAC;AAKF,eAAO,MAAM,iBAAiB,QAAS,MAAM,WAK5C,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAS,MAAM,WAGhD,CAAC;AAEF,eAAO,MAAM,2BAA2B,QAC/B,MAAM,kBACI,MAAM,EAAE,KACxB,MAKF,CAAC;AAMF,eAAO,MAAM,qBAAqB,iBAChB,MAAM,GAAG,MAAM,YACnB,MAAM;;;MAEjB,MAOF,CAAC;AAEF,eAAO,MAAM,UAAU,QAAS,MAAM,KAAG,OAExC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/utils",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.19",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"prepublishOnly": "npm run build"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@cee-eng/hydrajs": "4.
|
|
48
|
+
"@cee-eng/hydrajs": "4.17.1",
|
|
49
49
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
50
50
|
"dompurify": "^2.2.6",
|
|
51
|
-
"i18next": "^
|
|
51
|
+
"i18next": "^22.5.1",
|
|
52
52
|
"js-markdown-extra": "^1.2.4",
|
|
53
53
|
"lazysizes": "^5.3.2",
|
|
54
54
|
"localforage": "^1.10.0",
|
|
@@ -59,34 +59,43 @@
|
|
|
59
59
|
"solr-query-builder": "1.0.1"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cee-eng/hydrajs": "4.
|
|
62
|
+
"@cee-eng/hydrajs": "4.17.1",
|
|
63
63
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
64
|
-
"@rh-support/types": "2.0.
|
|
64
|
+
"@rh-support/types": "2.0.3",
|
|
65
65
|
"dompurify": "^2.2.6",
|
|
66
66
|
"dot": "^1.1.3",
|
|
67
|
-
"i18next": "^
|
|
67
|
+
"i18next": "^22.5.1",
|
|
68
68
|
"js-markdown-extra": "^1.2.4",
|
|
69
69
|
"lazysizes": "^5.3.2",
|
|
70
70
|
"localforage": "^1.10.0",
|
|
71
71
|
"lodash": "^4.17.21",
|
|
72
72
|
"lucene": "^2.1.1",
|
|
73
73
|
"marked": "^1.2.4",
|
|
74
|
-
"qs": "^6.
|
|
74
|
+
"qs": "^6.7.0",
|
|
75
|
+
"react": "18.2.0",
|
|
75
76
|
"solr-query-builder": "1.0.1"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
79
|
"@types/dompurify": "^2.2.1",
|
|
80
|
+
"@types/jest": "^29.5.11",
|
|
79
81
|
"@types/lodash": "^4.14.140",
|
|
80
82
|
"@types/lucene": "^2.1.0",
|
|
81
83
|
"@types/marked": "^1.1.0",
|
|
84
|
+
"@types/node": "^20.11.3",
|
|
82
85
|
"@types/qs": "^6.9.1",
|
|
83
|
-
"@types/react": "^
|
|
84
|
-
"@types/react-dom": "^
|
|
86
|
+
"@types/react": "^18.2.20",
|
|
87
|
+
"@types/react-dom": "^18.2.18",
|
|
88
|
+
"jest": "^29.7.0",
|
|
89
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
85
90
|
"moment-timezone": "^0.5.40"
|
|
86
91
|
},
|
|
92
|
+
"overrides": {
|
|
93
|
+
"@types/react": "^18.2.20",
|
|
94
|
+
"@types/react-dom": "^18.2.18"
|
|
95
|
+
},
|
|
87
96
|
"browserslist": [
|
|
88
97
|
"defaults and supports es6-module",
|
|
89
98
|
"maintained node versions"
|
|
90
99
|
],
|
|
91
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "f95bf012016d8a689c69d518b98266a3ac0292d9"
|
|
92
101
|
}
|