@rh-support/utils 2.1.4 → 2.1.5
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.
|
@@ -28,5 +28,6 @@ interface IGetVersionReturnValue {
|
|
|
28
28
|
minor?: string;
|
|
29
29
|
}
|
|
30
30
|
export declare function getVersion(version: string): IGetVersionReturnValue;
|
|
31
|
+
export declare function isSpecialSupportOfferingEnabled(allProducts: Partial<ISEProduct>[], selectedProduct: string): boolean;
|
|
31
32
|
export {};
|
|
32
33
|
//# sourceMappingURL=productsUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productsUtils.d.ts","sourceRoot":"","sources":["../../src/productsUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAWhF,MAAM,WAAW,4BAA4B;IACzC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IACnC,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IACrC,cAAc,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;CACzC;AAED,eAAO,MAAM,2BAA2B,sBACjB,UAAU,EAAE,2BACP,UAAU,EAAE,aAC1B,MAAM,KACjB,4BA4BF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,4BACd,UAAU,EAAE,KACrC,4BAeF,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,QAAQ,SAAI,GAAG,OAAO,CAAC,UAAU,CAAC,EAAE,CAOnG;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,WAE/C;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAEzD;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAEzD;AAED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;AAEF,UAAU,sBAAsB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,sBAAsB,CAkBlE;AAED,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,eAAe,EAAE,MAAM,WAK1G"}
|
package/lib/cjs/productsUtils.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getVersion = exports.versionSort = exports.versionSorter = exports.getUniqueSortedVersions = exports.getVersionIfOnlyVersion = exports.isOnlyVersion = exports.getTopProducts = exports.handleEntitledProductResponse = exports.handleProductSearchResponse = void 0;
|
|
6
|
+
exports.isSpecialSupportOfferingEnabled = exports.getVersion = exports.versionSort = exports.versionSorter = exports.getUniqueSortedVersions = exports.getVersionIfOnlyVersion = exports.isOnlyVersion = exports.getTopProducts = exports.handleEntitledProductResponse = exports.handleProductSearchResponse = void 0;
|
|
7
7
|
const difference_1 = __importDefault(require("lodash/difference"));
|
|
8
8
|
const forEach_1 = __importDefault(require("lodash/forEach"));
|
|
9
9
|
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
@@ -130,3 +130,9 @@ function getVersion(version) {
|
|
|
130
130
|
return { major: version.split('.')[0], minor: version.split('.')[1] };
|
|
131
131
|
}
|
|
132
132
|
exports.getVersion = getVersion;
|
|
133
|
+
function isSpecialSupportOfferingEnabled(allProducts, selectedProduct) {
|
|
134
|
+
var _c;
|
|
135
|
+
const productHasSpecialSupportOffering = (_c = allProducts.find((product) => product.name === selectedProduct)) === null || _c === void 0 ? void 0 : _c.hasSpecialSupportOffering;
|
|
136
|
+
return productHasSpecialSupportOffering;
|
|
137
|
+
}
|
|
138
|
+
exports.isSpecialSupportOfferingEnabled = isSpecialSupportOfferingEnabled;
|
|
@@ -28,5 +28,6 @@ interface IGetVersionReturnValue {
|
|
|
28
28
|
minor?: string;
|
|
29
29
|
}
|
|
30
30
|
export declare function getVersion(version: string): IGetVersionReturnValue;
|
|
31
|
+
export declare function isSpecialSupportOfferingEnabled(allProducts: Partial<ISEProduct>[], selectedProduct: string): boolean;
|
|
31
32
|
export {};
|
|
32
33
|
//# sourceMappingURL=productsUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productsUtils.d.ts","sourceRoot":"","sources":["../../src/productsUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAWhF,MAAM,WAAW,4BAA4B;IACzC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IACnC,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IACrC,cAAc,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;CACzC;AAED,eAAO,MAAM,2BAA2B,sBACjB,UAAU,EAAE,2BACP,UAAU,EAAE,aAC1B,MAAM,KACjB,4BA4BF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,4BACd,UAAU,EAAE,KACrC,4BAeF,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,QAAQ,SAAI,GAAG,OAAO,CAAC,UAAU,CAAC,EAAE,CAOnG;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,WAE/C;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAEzD;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAEzD;AAED,eAAO,MAAM,aAAa,OAAQ,MAAM,MAAM,M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,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,sBAAsB,CAkBlE;AAED,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,eAAe,EAAE,MAAM,WAK1G"}
|
package/lib/esm/productsUtils.js
CHANGED
|
@@ -115,3 +115,8 @@ export function getVersion(version) {
|
|
|
115
115
|
else
|
|
116
116
|
return { major: version.split('.')[0], minor: version.split('.')[1] };
|
|
117
117
|
}
|
|
118
|
+
export function isSpecialSupportOfferingEnabled(allProducts, selectedProduct) {
|
|
119
|
+
var _c;
|
|
120
|
+
const productHasSpecialSupportOffering = (_c = allProducts.find((product) => product.name === selectedProduct)) === null || _c === void 0 ? void 0 : _c.hasSpecialSupportOffering;
|
|
121
|
+
return productHasSpecialSupportOffering;
|
|
122
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/utils",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"prepublishOnly": "npm run build"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@cee-eng/hydrajs": "4.16.
|
|
48
|
+
"@cee-eng/hydrajs": "4.16.15",
|
|
49
49
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
50
50
|
"dompurify": "^2.2.6",
|
|
51
51
|
"i18next": "^19.0.1",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"solr-query-builder": "1.0.1"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cee-eng/hydrajs": "4.16.
|
|
62
|
+
"@cee-eng/hydrajs": "4.16.15",
|
|
63
63
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
64
64
|
"@rh-support/types": "2.0.2",
|
|
65
65
|
"dompurify": "^2.2.6",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"defaults and supports es6-module",
|
|
89
89
|
"maintained node versions"
|
|
90
90
|
],
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "bfb34bcd3654c4842810f4e62b940ccf6f0b0dc4"
|
|
92
92
|
}
|