@frontegg/js 6.174.0-alpha.0 → 6.174.0
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/index.js +1 -1
- package/node/index.js +1 -1
- package/node/version.js +1 -1
- package/package.json +2 -2
- package/umd/frontegg.development.js +119 -436
- package/umd/frontegg.production.min.js +1 -1
- package/umd/frontegg.production.min.js.LICENSE.txt +1 -1
- package/version.js +1 -1
|
@@ -1445,7 +1445,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1445
1445
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1446
1446
|
/* harmony export */ });
|
|
1447
1447
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
1448
|
-
cdnVersion: '6.174.0
|
|
1448
|
+
cdnVersion: '6.174.0'
|
|
1449
1449
|
});
|
|
1450
1450
|
|
|
1451
1451
|
/***/ }),
|
|
@@ -24733,7 +24733,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24733
24733
|
/* harmony export */ });
|
|
24734
24734
|
/* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
|
|
24735
24735
|
/* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
|
|
24736
|
-
/** @license Frontegg v6.174.0
|
|
24736
|
+
/** @license Frontegg v6.174.0
|
|
24737
24737
|
*
|
|
24738
24738
|
* This source code is licensed under the MIT license found in the
|
|
24739
24739
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -24900,11 +24900,9 @@ __exportStar(__webpack_require__(/*! ./feature-flag.evaluator */ "../../node_mod
|
|
|
24900
24900
|
"use strict";
|
|
24901
24901
|
|
|
24902
24902
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24903
|
-
exports.NotEntitledJustification = exports.createPermissionCheckRegex = exports.checkPermission = exports.prepareAttributes = exports.evaluateIsEntitledToPermissions = exports.evaluateIsEntitledToFeature = exports.OperationEnum = exports.TreatmentEnum = exports.
|
|
24903
|
+
exports.NotEntitledJustification = exports.createPermissionCheckRegex = exports.checkPermission = exports.prepareAttributes = exports.evaluateIsEntitledToPermissions = exports.evaluateIsEntitledToFeature = exports.OperationEnum = exports.TreatmentEnum = exports.evaluateFeatureFlag = void 0;
|
|
24904
24904
|
var feature_flags_1 = __webpack_require__(/*! ./feature-flags */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/feature-flags/index.js");
|
|
24905
24905
|
Object.defineProperty(exports, "evaluateFeatureFlag", ({ enumerable: true, get: function () { return feature_flags_1.evaluateFeatureFlag; } }));
|
|
24906
|
-
var plans_1 = __webpack_require__(/*! ./plans */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/plans/index.js");
|
|
24907
|
-
Object.defineProperty(exports, "evaluatePlan", ({ enumerable: true, get: function () { return plans_1.evaluatePlan; } }));
|
|
24908
24906
|
var rules_1 = __webpack_require__(/*! ./rules */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js");
|
|
24909
24907
|
Object.defineProperty(exports, "TreatmentEnum", ({ enumerable: true, get: function () { return rules_1.TreatmentEnum; } }));
|
|
24910
24908
|
var types_1 = __webpack_require__(/*! ./operations/types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
|
|
@@ -25523,65 +25521,6 @@ var OperationEnum;
|
|
|
25523
25521
|
|
|
25524
25522
|
/***/ }),
|
|
25525
25523
|
|
|
25526
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/plans/index.js":
|
|
25527
|
-
/*!****************************************************************************************!*\
|
|
25528
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/plans/index.js ***!
|
|
25529
|
-
\****************************************************************************************/
|
|
25530
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
25531
|
-
|
|
25532
|
-
"use strict";
|
|
25533
|
-
|
|
25534
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25535
|
-
if (k2 === undefined) k2 = k;
|
|
25536
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25537
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
25538
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25539
|
-
}
|
|
25540
|
-
Object.defineProperty(o, k2, desc);
|
|
25541
|
-
}) : (function(o, m, k, k2) {
|
|
25542
|
-
if (k2 === undefined) k2 = k;
|
|
25543
|
-
o[k2] = m[k];
|
|
25544
|
-
}));
|
|
25545
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25546
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
25547
|
-
};
|
|
25548
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25549
|
-
__exportStar(__webpack_require__(/*! ./plan.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/plans/plan.evaluator.js"), exports);
|
|
25550
|
-
//# sourceMappingURL=index.js.map
|
|
25551
|
-
|
|
25552
|
-
/***/ }),
|
|
25553
|
-
|
|
25554
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/plans/plan.evaluator.js":
|
|
25555
|
-
/*!*************************************************************************************************!*\
|
|
25556
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/plans/plan.evaluator.js ***!
|
|
25557
|
-
\*************************************************************************************************/
|
|
25558
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
25559
|
-
|
|
25560
|
-
"use strict";
|
|
25561
|
-
|
|
25562
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25563
|
-
exports.evaluatePlan = void 0;
|
|
25564
|
-
const rules_1 = __webpack_require__(/*! ../rules */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js");
|
|
25565
|
-
function evaluatePlan(plan, attributes) {
|
|
25566
|
-
const treatableRule = findTreatableRule(plan, attributes);
|
|
25567
|
-
if (treatableRule) {
|
|
25568
|
-
return { treatment: treatableRule.treatment };
|
|
25569
|
-
}
|
|
25570
|
-
return { treatment: plan.defaultTreatment };
|
|
25571
|
-
}
|
|
25572
|
-
exports.evaluatePlan = evaluatePlan;
|
|
25573
|
-
function findTreatableRule(plan, attributes) {
|
|
25574
|
-
var _a;
|
|
25575
|
-
return (_a = plan.rules) === null || _a === void 0 ? void 0 : _a.find((rule) => {
|
|
25576
|
-
const evaluator = (0, rules_1.createRuleEvaluator)({ rule });
|
|
25577
|
-
const result = evaluator(attributes);
|
|
25578
|
-
return result === rules_1.RuleEvaluationResultEnum.Treatable;
|
|
25579
|
-
});
|
|
25580
|
-
}
|
|
25581
|
-
//# sourceMappingURL=plan.evaluator.js.map
|
|
25582
|
-
|
|
25583
|
-
/***/ }),
|
|
25584
|
-
|
|
25585
25524
|
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js":
|
|
25586
25525
|
/*!****************************************************************************************!*\
|
|
25587
25526
|
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js ***!
|
|
@@ -25665,322 +25604,17 @@ var RuleEvaluationResultEnum;
|
|
|
25665
25604
|
|
|
25666
25605
|
/***/ }),
|
|
25667
25606
|
|
|
25668
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/
|
|
25669
|
-
|
|
25670
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/
|
|
25671
|
-
|
|
25672
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
25673
|
-
|
|
25674
|
-
"use strict";
|
|
25675
|
-
|
|
25676
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25677
|
-
if (k2 === undefined) k2 = k;
|
|
25678
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25679
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
25680
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25681
|
-
}
|
|
25682
|
-
Object.defineProperty(o, k2, desc);
|
|
25683
|
-
}) : (function(o, m, k, k2) {
|
|
25684
|
-
if (k2 === undefined) k2 = k;
|
|
25685
|
-
o[k2] = m[k];
|
|
25686
|
-
}));
|
|
25687
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25688
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
25689
|
-
};
|
|
25690
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25691
|
-
__exportStar(__webpack_require__(/*! ./is-entitled-to-feature */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/index.js"), exports);
|
|
25692
|
-
__exportStar(__webpack_require__(/*! ./is-entitled-to-permission */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-permission/index.js"), exports);
|
|
25693
|
-
__exportStar(__webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js"), exports);
|
|
25694
|
-
__exportStar(__webpack_require__(/*! ./utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/utils/index.js"), exports);
|
|
25695
|
-
//# sourceMappingURL=index.js.map
|
|
25696
|
-
|
|
25697
|
-
/***/ }),
|
|
25698
|
-
|
|
25699
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/direct-entitlement.evaluator.js":
|
|
25700
|
-
/*!*************************************************************************************************************************************************************!*\
|
|
25701
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/direct-entitlement.evaluator.js ***!
|
|
25702
|
-
\*************************************************************************************************************************************************************/
|
|
25703
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
25704
|
-
|
|
25705
|
-
"use strict";
|
|
25706
|
-
|
|
25707
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25708
|
-
exports.directEntitlementEvalutor = void 0;
|
|
25709
|
-
const types_1 = __webpack_require__(/*! ../../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js");
|
|
25710
|
-
function directEntitlementEvalutor(featureKey, userEntitlementsContext, attributes = {}) {
|
|
25711
|
-
const feature = userEntitlementsContext.features[featureKey];
|
|
25712
|
-
let hasExpired = false;
|
|
25713
|
-
if (feature && feature.expireTime !== null) {
|
|
25714
|
-
hasExpired = feature.expireTime !== types_1.NO_EXPIRATION_TIME && feature.expireTime < Date.now();
|
|
25715
|
-
if (!hasExpired) {
|
|
25716
|
-
return { isEntitled: true };
|
|
25717
|
-
}
|
|
25718
|
-
}
|
|
25719
|
-
return {
|
|
25720
|
-
isEntitled: false,
|
|
25721
|
-
justification: hasExpired ? types_1.NotEntitledJustification.BUNDLE_EXPIRED : types_1.NotEntitledJustification.MISSING_FEATURE,
|
|
25722
|
-
};
|
|
25723
|
-
}
|
|
25724
|
-
exports.directEntitlementEvalutor = directEntitlementEvalutor;
|
|
25725
|
-
//# sourceMappingURL=direct-entitlement.evaluator.js.map
|
|
25726
|
-
|
|
25727
|
-
/***/ }),
|
|
25728
|
-
|
|
25729
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/feature-flag.evaluator.js":
|
|
25730
|
-
/*!*******************************************************************************************************************************************************!*\
|
|
25731
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/feature-flag.evaluator.js ***!
|
|
25732
|
-
\*******************************************************************************************************************************************************/
|
|
25733
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
25734
|
-
|
|
25735
|
-
"use strict";
|
|
25736
|
-
|
|
25737
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25738
|
-
exports.featureFlagEvaluator = void 0;
|
|
25739
|
-
const types_1 = __webpack_require__(/*! ../../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js");
|
|
25740
|
-
const feature_flags_1 = __webpack_require__(/*! ../../../feature-flags */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/feature-flags/index.js");
|
|
25741
|
-
const attributes_utils_1 = __webpack_require__(/*! ../../utils/attributes.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/utils/attributes.utils.js");
|
|
25742
|
-
const rules_1 = __webpack_require__(/*! ../../../rules */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js");
|
|
25743
|
-
function featureFlagEvaluator(featureKey, userEntitlementsContext, attributes = {}) {
|
|
25744
|
-
const feature = userEntitlementsContext.features[featureKey];
|
|
25745
|
-
if (feature && feature.featureFlag) {
|
|
25746
|
-
const preparedAttributes = (0, attributes_utils_1.prepareAttributes)(attributes);
|
|
25747
|
-
const { treatment } = (0, feature_flags_1.evaluateFeatureFlag)(feature.featureFlag, preparedAttributes);
|
|
25748
|
-
if (treatment === rules_1.TreatmentEnum.True) {
|
|
25749
|
-
return { isEntitled: true };
|
|
25750
|
-
}
|
|
25751
|
-
}
|
|
25752
|
-
return {
|
|
25753
|
-
isEntitled: false,
|
|
25754
|
-
justification: types_1.NotEntitledJustification.MISSING_FEATURE,
|
|
25755
|
-
};
|
|
25756
|
-
}
|
|
25757
|
-
exports.featureFlagEvaluator = featureFlagEvaluator;
|
|
25758
|
-
//# sourceMappingURL=feature-flag.evaluator.js.map
|
|
25759
|
-
|
|
25760
|
-
/***/ }),
|
|
25761
|
-
|
|
25762
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/index.js":
|
|
25763
|
-
/*!**************************************************************************************************************************************!*\
|
|
25764
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/index.js ***!
|
|
25765
|
-
\**************************************************************************************************************************************/
|
|
25766
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
25767
|
-
|
|
25768
|
-
"use strict";
|
|
25769
|
-
|
|
25770
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25771
|
-
exports.getIsEntitledEvaluators = void 0;
|
|
25772
|
-
const direct_entitlement_evaluator_1 = __webpack_require__(/*! ./direct-entitlement.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/direct-entitlement.evaluator.js");
|
|
25773
|
-
const feature_flag_evaluator_1 = __webpack_require__(/*! ./feature-flag.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/feature-flag.evaluator.js");
|
|
25774
|
-
const plan_targeting_rules_evaluator_1 = __webpack_require__(/*! ./plan-targeting-rules.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/plan-targeting-rules.evaluator.js");
|
|
25775
|
-
function getIsEntitledEvaluators() {
|
|
25776
|
-
return [direct_entitlement_evaluator_1.directEntitlementEvalutor, feature_flag_evaluator_1.featureFlagEvaluator, plan_targeting_rules_evaluator_1.planTargetingRulesEvalutor];
|
|
25777
|
-
}
|
|
25778
|
-
exports.getIsEntitledEvaluators = getIsEntitledEvaluators;
|
|
25779
|
-
//# sourceMappingURL=index.js.map
|
|
25780
|
-
|
|
25781
|
-
/***/ }),
|
|
25782
|
-
|
|
25783
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/plan-targeting-rules.evaluator.js":
|
|
25784
|
-
/*!***************************************************************************************************************************************************************!*\
|
|
25785
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/plan-targeting-rules.evaluator.js ***!
|
|
25786
|
-
\***************************************************************************************************************************************************************/
|
|
25787
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
25788
|
-
|
|
25789
|
-
"use strict";
|
|
25790
|
-
|
|
25791
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25792
|
-
exports.planTargetingRulesEvalutor = void 0;
|
|
25793
|
-
const types_1 = __webpack_require__(/*! ../../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js");
|
|
25794
|
-
const attributes_utils_1 = __webpack_require__(/*! ../../utils/attributes.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/utils/attributes.utils.js");
|
|
25795
|
-
const rules_1 = __webpack_require__(/*! ../../../rules */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js");
|
|
25796
|
-
const plans_1 = __webpack_require__(/*! ../../../plans */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/plans/index.js");
|
|
25797
|
-
function planTargetingRulesEvalutor(featureKey, userEntitlementsContext, attributes = {}) {
|
|
25798
|
-
const feature = userEntitlementsContext.features[featureKey];
|
|
25799
|
-
if (feature && feature.planIds && feature.planIds.length > 0) {
|
|
25800
|
-
const preparedAttributes = (0, attributes_utils_1.prepareAttributes)(attributes);
|
|
25801
|
-
const plans = userEntitlementsContext.plans;
|
|
25802
|
-
for (const planId of feature.planIds) {
|
|
25803
|
-
const plan = plans[planId];
|
|
25804
|
-
if (plan) {
|
|
25805
|
-
const { treatment } = (0, plans_1.evaluatePlan)(plan, preparedAttributes);
|
|
25806
|
-
if (treatment === rules_1.TreatmentEnum.True) {
|
|
25807
|
-
return { isEntitled: true };
|
|
25808
|
-
}
|
|
25809
|
-
}
|
|
25810
|
-
}
|
|
25811
|
-
}
|
|
25812
|
-
return {
|
|
25813
|
-
isEntitled: false,
|
|
25814
|
-
justification: types_1.NotEntitledJustification.MISSING_FEATURE,
|
|
25815
|
-
};
|
|
25816
|
-
}
|
|
25817
|
-
exports.planTargetingRulesEvalutor = planTargetingRulesEvalutor;
|
|
25818
|
-
//# sourceMappingURL=plan-targeting-rules.evaluator.js.map
|
|
25819
|
-
|
|
25820
|
-
/***/ }),
|
|
25821
|
-
|
|
25822
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/index.js":
|
|
25823
|
-
/*!***************************************************************************************************************************!*\
|
|
25824
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/index.js ***!
|
|
25825
|
-
\***************************************************************************************************************************/
|
|
25826
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
25827
|
-
|
|
25828
|
-
"use strict";
|
|
25829
|
-
|
|
25830
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25831
|
-
if (k2 === undefined) k2 = k;
|
|
25832
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25833
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
25834
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25835
|
-
}
|
|
25836
|
-
Object.defineProperty(o, k2, desc);
|
|
25837
|
-
}) : (function(o, m, k, k2) {
|
|
25838
|
-
if (k2 === undefined) k2 = k;
|
|
25839
|
-
o[k2] = m[k];
|
|
25840
|
-
}));
|
|
25841
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25842
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
25843
|
-
};
|
|
25844
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25845
|
-
__exportStar(__webpack_require__(/*! ./is-entitled-to-feature.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/is-entitled-to-feature.evaluator.js"), exports);
|
|
25846
|
-
//# sourceMappingURL=index.js.map
|
|
25847
|
-
|
|
25848
|
-
/***/ }),
|
|
25849
|
-
|
|
25850
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/is-entitled-to-feature.evaluator.js":
|
|
25851
|
-
/*!******************************************************************************************************************************************************!*\
|
|
25852
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/is-entitled-to-feature.evaluator.js ***!
|
|
25853
|
-
\******************************************************************************************************************************************************/
|
|
25854
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
25855
|
-
|
|
25856
|
-
"use strict";
|
|
25857
|
-
|
|
25858
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25859
|
-
exports.evaluateIsEntitledToFeature = void 0;
|
|
25860
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js");
|
|
25861
|
-
const utils_1 = __webpack_require__(/*! ../utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/utils/index.js");
|
|
25862
|
-
const evaluators_1 = __webpack_require__(/*! ./evaluators */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/evaluators/index.js");
|
|
25863
|
-
function evaluateIsEntitledToFeature(featureKey, userEntitlementsContext, attributes = {}) {
|
|
25864
|
-
if (!userEntitlementsContext) {
|
|
25865
|
-
return { isEntitled: false, justification: types_1.NotEntitledJustification.MISSING_FEATURE };
|
|
25866
|
-
}
|
|
25867
|
-
const entitlementResults = [];
|
|
25868
|
-
for (const evaluator of (0, evaluators_1.getIsEntitledEvaluators)()) {
|
|
25869
|
-
entitlementResults.push(evaluator(featureKey, userEntitlementsContext, attributes));
|
|
25870
|
-
if (!(0, utils_1.shouldContinue)(entitlementResults)) {
|
|
25871
|
-
break;
|
|
25872
|
-
}
|
|
25873
|
-
}
|
|
25874
|
-
return (0, utils_1.getResult)(entitlementResults);
|
|
25875
|
-
}
|
|
25876
|
-
exports.evaluateIsEntitledToFeature = evaluateIsEntitledToFeature;
|
|
25877
|
-
//# sourceMappingURL=is-entitled-to-feature.evaluator.js.map
|
|
25878
|
-
|
|
25879
|
-
/***/ }),
|
|
25880
|
-
|
|
25881
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-permission/index.js":
|
|
25882
|
-
/*!******************************************************************************************************************************!*\
|
|
25883
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-permission/index.js ***!
|
|
25884
|
-
\******************************************************************************************************************************/
|
|
25885
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
25886
|
-
|
|
25887
|
-
"use strict";
|
|
25888
|
-
|
|
25889
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25890
|
-
if (k2 === undefined) k2 = k;
|
|
25891
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25892
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
25893
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25894
|
-
}
|
|
25895
|
-
Object.defineProperty(o, k2, desc);
|
|
25896
|
-
}) : (function(o, m, k, k2) {
|
|
25897
|
-
if (k2 === undefined) k2 = k;
|
|
25898
|
-
o[k2] = m[k];
|
|
25899
|
-
}));
|
|
25900
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25901
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
25902
|
-
};
|
|
25903
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25904
|
-
__exportStar(__webpack_require__(/*! ./is-entitled-to-permission.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-permission/is-entitled-to-permission.evaluator.js"), exports);
|
|
25905
|
-
//# sourceMappingURL=index.js.map
|
|
25906
|
-
|
|
25907
|
-
/***/ }),
|
|
25908
|
-
|
|
25909
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-permission/is-entitled-to-permission.evaluator.js":
|
|
25910
|
-
/*!************************************************************************************************************************************************************!*\
|
|
25911
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-permission/is-entitled-to-permission.evaluator.js ***!
|
|
25912
|
-
\************************************************************************************************************************************************************/
|
|
25913
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
25914
|
-
|
|
25915
|
-
"use strict";
|
|
25916
|
-
|
|
25917
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25918
|
-
exports.evaluateIsEntitledToPermissions = void 0;
|
|
25919
|
-
const is_entitled_to_feature_evaluator_1 = __webpack_require__(/*! ../is-entitled-to-feature/is-entitled-to-feature.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled-to-feature/is-entitled-to-feature.evaluator.js");
|
|
25920
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js");
|
|
25921
|
-
const utils_1 = __webpack_require__(/*! ../utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/utils/index.js");
|
|
25922
|
-
const permissions_utils_1 = __webpack_require__(/*! ../utils/permissions.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/utils/permissions.utils.js");
|
|
25923
|
-
function evaluateIsEntitledToPermissions(permissionKey, userEntitlementsContext, attributes) {
|
|
25924
|
-
if (!userEntitlementsContext) {
|
|
25925
|
-
return { isEntitled: false, justification: types_1.NotEntitledJustification.MISSING_PERMISSION };
|
|
25926
|
-
}
|
|
25927
|
-
const hasPermission = (0, permissions_utils_1.checkPermission)(userEntitlementsContext.permissions, permissionKey);
|
|
25928
|
-
if (!hasPermission) {
|
|
25929
|
-
return { isEntitled: false, justification: types_1.NotEntitledJustification.MISSING_PERMISSION };
|
|
25930
|
-
}
|
|
25931
|
-
const linkedFeatures = getLinkedFeatures(permissionKey, userEntitlementsContext);
|
|
25932
|
-
if (!linkedFeatures.length) {
|
|
25933
|
-
return { isEntitled: true };
|
|
25934
|
-
}
|
|
25935
|
-
const entitlementResults = [];
|
|
25936
|
-
for (const featureKey of linkedFeatures) {
|
|
25937
|
-
entitlementResults.push((0, is_entitled_to_feature_evaluator_1.evaluateIsEntitledToFeature)(featureKey, userEntitlementsContext, attributes));
|
|
25938
|
-
if (!(0, utils_1.shouldContinue)(entitlementResults)) {
|
|
25939
|
-
break;
|
|
25940
|
-
}
|
|
25941
|
-
}
|
|
25942
|
-
return (0, utils_1.getResult)(entitlementResults);
|
|
25943
|
-
}
|
|
25944
|
-
exports.evaluateIsEntitledToPermissions = evaluateIsEntitledToPermissions;
|
|
25945
|
-
function getLinkedFeatures(permissionKey, userEntitlementsContext) {
|
|
25946
|
-
return Object.keys(userEntitlementsContext.features).filter((featureKey) => userEntitlementsContext.features[featureKey].linkedPermissions.includes(permissionKey));
|
|
25947
|
-
}
|
|
25948
|
-
//# sourceMappingURL=is-entitled-to-permission.evaluator.js.map
|
|
25949
|
-
|
|
25950
|
-
/***/ }),
|
|
25951
|
-
|
|
25952
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js":
|
|
25953
|
-
/*!****************************************************************************************************!*\
|
|
25954
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js ***!
|
|
25955
|
-
\****************************************************************************************************/
|
|
25956
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
25957
|
-
|
|
25958
|
-
"use strict";
|
|
25959
|
-
|
|
25960
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25961
|
-
exports.NO_EXPIRATION_TIME = exports.NotEntitledJustification = void 0;
|
|
25962
|
-
var NotEntitledJustification;
|
|
25963
|
-
(function (NotEntitledJustification) {
|
|
25964
|
-
NotEntitledJustification["MISSING_FEATURE"] = "MISSING_FEATURE";
|
|
25965
|
-
NotEntitledJustification["MISSING_PERMISSION"] = "MISSING_PERMISSION";
|
|
25966
|
-
NotEntitledJustification["BUNDLE_EXPIRED"] = "BUNDLE_EXPIRED";
|
|
25967
|
-
})(NotEntitledJustification = exports.NotEntitledJustification || (exports.NotEntitledJustification = {}));
|
|
25968
|
-
exports.NO_EXPIRATION_TIME = -1;
|
|
25969
|
-
//# sourceMappingURL=types.js.map
|
|
25970
|
-
|
|
25971
|
-
/***/ }),
|
|
25972
|
-
|
|
25973
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/utils/attributes.utils.js":
|
|
25974
|
-
/*!*********************************************************************************************************************!*\
|
|
25975
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/utils/attributes.utils.js ***!
|
|
25976
|
-
\*********************************************************************************************************************/
|
|
25607
|
+
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/attributes.utils.js":
|
|
25608
|
+
/*!***************************************************************************************************************!*\
|
|
25609
|
+
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/attributes.utils.js ***!
|
|
25610
|
+
\***************************************************************************************************************/
|
|
25977
25611
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
25978
25612
|
|
|
25979
25613
|
"use strict";
|
|
25980
25614
|
|
|
25981
25615
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25982
25616
|
exports.modifyObjectKeysWithPrefix = exports.defaultFronteggAttributesMapper = exports.prepareAttributes = void 0;
|
|
25983
|
-
const flatten_utils_1 = __webpack_require__(/*! ./flatten.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/
|
|
25617
|
+
const flatten_utils_1 = __webpack_require__(/*! ./flatten.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/flatten.utils.js");
|
|
25984
25618
|
/**
|
|
25985
25619
|
* Merges both `custom` and `jwt` records, map Frontegg attributes and modifies record keys with corrisponding prefixes
|
|
25986
25620
|
*
|
|
@@ -26023,45 +25657,10 @@ exports.modifyObjectKeysWithPrefix = modifyObjectKeysWithPrefix;
|
|
|
26023
25657
|
|
|
26024
25658
|
/***/ }),
|
|
26025
25659
|
|
|
26026
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/
|
|
26027
|
-
|
|
26028
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/
|
|
26029
|
-
|
|
26030
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
26031
|
-
|
|
26032
|
-
"use strict";
|
|
26033
|
-
|
|
26034
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
26035
|
-
exports.shouldContinue = exports.getResult = void 0;
|
|
26036
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js");
|
|
26037
|
-
function getResult(entitlementResults) {
|
|
26038
|
-
let hasExpired = false;
|
|
26039
|
-
for (const entitlementResult of entitlementResults) {
|
|
26040
|
-
if (entitlementResult.isEntitled) {
|
|
26041
|
-
return entitlementResult;
|
|
26042
|
-
}
|
|
26043
|
-
if (entitlementResult.justification === types_1.NotEntitledJustification.BUNDLE_EXPIRED) {
|
|
26044
|
-
hasExpired = true;
|
|
26045
|
-
}
|
|
26046
|
-
}
|
|
26047
|
-
return {
|
|
26048
|
-
isEntitled: false,
|
|
26049
|
-
justification: hasExpired ? types_1.NotEntitledJustification.BUNDLE_EXPIRED : types_1.NotEntitledJustification.MISSING_FEATURE,
|
|
26050
|
-
};
|
|
26051
|
-
}
|
|
26052
|
-
exports.getResult = getResult;
|
|
26053
|
-
function shouldContinue(entitlementResults) {
|
|
26054
|
-
return entitlementResults.every(({ isEntitled }) => !isEntitled);
|
|
26055
|
-
}
|
|
26056
|
-
exports.shouldContinue = shouldContinue;
|
|
26057
|
-
//# sourceMappingURL=entitlement-results.utils.js.map
|
|
26058
|
-
|
|
26059
|
-
/***/ }),
|
|
26060
|
-
|
|
26061
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/utils/flatten.utils.js":
|
|
26062
|
-
/*!******************************************************************************************************************!*\
|
|
26063
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/utils/flatten.utils.js ***!
|
|
26064
|
-
\******************************************************************************************************************/
|
|
25660
|
+
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/flatten.utils.js":
|
|
25661
|
+
/*!************************************************************************************************************!*\
|
|
25662
|
+
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/flatten.utils.js ***!
|
|
25663
|
+
\************************************************************************************************************/
|
|
26065
25664
|
/***/ ((__unused_webpack_module, exports) => {
|
|
26066
25665
|
|
|
26067
25666
|
"use strict";
|
|
@@ -26107,10 +25706,10 @@ function keyIdentity(key) {
|
|
|
26107
25706
|
|
|
26108
25707
|
/***/ }),
|
|
26109
25708
|
|
|
26110
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/
|
|
26111
|
-
|
|
26112
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/
|
|
26113
|
-
|
|
25709
|
+
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/index.js":
|
|
25710
|
+
/*!****************************************************************************************************!*\
|
|
25711
|
+
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/index.js ***!
|
|
25712
|
+
\****************************************************************************************************/
|
|
26114
25713
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
26115
25714
|
|
|
26116
25715
|
"use strict";
|
|
@@ -26130,17 +25729,87 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26130
25729
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26131
25730
|
};
|
|
26132
25731
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
26133
|
-
__exportStar(__webpack_require__(/*! ./
|
|
26134
|
-
__exportStar(__webpack_require__(/*! ./
|
|
26135
|
-
__exportStar(__webpack_require__(/*! ./
|
|
25732
|
+
__exportStar(__webpack_require__(/*! ./is-entitled.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled.evaluator.js"), exports);
|
|
25733
|
+
__exportStar(__webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js"), exports);
|
|
25734
|
+
__exportStar(__webpack_require__(/*! ./attributes.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/attributes.utils.js"), exports);
|
|
25735
|
+
__exportStar(__webpack_require__(/*! ./permissions.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/permissions.utils.js"), exports);
|
|
26136
25736
|
//# sourceMappingURL=index.js.map
|
|
26137
25737
|
|
|
26138
25738
|
/***/ }),
|
|
26139
25739
|
|
|
26140
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/
|
|
26141
|
-
|
|
26142
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/
|
|
26143
|
-
|
|
25740
|
+
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled.evaluator.js":
|
|
25741
|
+
/*!********************************************************************************************************************!*\
|
|
25742
|
+
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled.evaluator.js ***!
|
|
25743
|
+
\********************************************************************************************************************/
|
|
25744
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
25745
|
+
|
|
25746
|
+
"use strict";
|
|
25747
|
+
|
|
25748
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25749
|
+
exports.evaluateIsEntitledToPermissions = exports.evaluateIsEntitledToFeature = void 0;
|
|
25750
|
+
const types_1 = __webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js");
|
|
25751
|
+
const feature_flags_1 = __webpack_require__(/*! ../feature-flags */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/feature-flags/index.js");
|
|
25752
|
+
const attributes_utils_1 = __webpack_require__(/*! ./attributes.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/attributes.utils.js");
|
|
25753
|
+
const rules_1 = __webpack_require__(/*! ../rules */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js");
|
|
25754
|
+
const permissions_utils_1 = __webpack_require__(/*! ./permissions.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/permissions.utils.js");
|
|
25755
|
+
function evaluateIsEntitledToFeature(featureKey, userEntitlementsContext, attributes = {}) {
|
|
25756
|
+
const feature = userEntitlementsContext.features[featureKey];
|
|
25757
|
+
let hasExpired = false;
|
|
25758
|
+
if (feature && feature.expireTime !== null) {
|
|
25759
|
+
hasExpired = feature.expireTime !== types_1.NO_EXPIRATION_TIME && feature.expireTime < Date.now();
|
|
25760
|
+
if (!hasExpired) {
|
|
25761
|
+
return { isEntitled: true };
|
|
25762
|
+
}
|
|
25763
|
+
}
|
|
25764
|
+
if (feature && feature.featureFlag) {
|
|
25765
|
+
const preparedAttributes = (0, attributes_utils_1.prepareAttributes)(attributes);
|
|
25766
|
+
const { treatment } = (0, feature_flags_1.evaluateFeatureFlag)(feature.featureFlag, preparedAttributes);
|
|
25767
|
+
if (treatment === rules_1.TreatmentEnum.True) {
|
|
25768
|
+
return { isEntitled: true };
|
|
25769
|
+
}
|
|
25770
|
+
}
|
|
25771
|
+
return {
|
|
25772
|
+
isEntitled: false,
|
|
25773
|
+
justification: hasExpired ? types_1.NotEntitledJustification.BUNDLE_EXPIRED : types_1.NotEntitledJustification.MISSING_FEATURE,
|
|
25774
|
+
};
|
|
25775
|
+
}
|
|
25776
|
+
exports.evaluateIsEntitledToFeature = evaluateIsEntitledToFeature;
|
|
25777
|
+
function evaluateIsEntitledToPermissions(permissionKey, userEntitlementsContext, attributes) {
|
|
25778
|
+
const hasPermission = (0, permissions_utils_1.checkPermission)(userEntitlementsContext.permissions, permissionKey);
|
|
25779
|
+
if (!hasPermission) {
|
|
25780
|
+
return { isEntitled: false, justification: types_1.NotEntitledJustification.MISSING_PERMISSION };
|
|
25781
|
+
}
|
|
25782
|
+
const linkedFeatures = getLinkedFeatures(permissionKey, userEntitlementsContext);
|
|
25783
|
+
if (!linkedFeatures.length) {
|
|
25784
|
+
return { isEntitled: true };
|
|
25785
|
+
}
|
|
25786
|
+
let hasExpired = false;
|
|
25787
|
+
for (const featureKey of linkedFeatures) {
|
|
25788
|
+
const { isEntitled, justification } = evaluateIsEntitledToFeature(featureKey, userEntitlementsContext, attributes);
|
|
25789
|
+
if (isEntitled) {
|
|
25790
|
+
return { isEntitled: true };
|
|
25791
|
+
}
|
|
25792
|
+
if (justification === types_1.NotEntitledJustification.BUNDLE_EXPIRED) {
|
|
25793
|
+
hasExpired = true;
|
|
25794
|
+
}
|
|
25795
|
+
}
|
|
25796
|
+
return {
|
|
25797
|
+
isEntitled: false,
|
|
25798
|
+
justification: hasExpired ? types_1.NotEntitledJustification.BUNDLE_EXPIRED : types_1.NotEntitledJustification.MISSING_FEATURE,
|
|
25799
|
+
};
|
|
25800
|
+
}
|
|
25801
|
+
exports.evaluateIsEntitledToPermissions = evaluateIsEntitledToPermissions;
|
|
25802
|
+
function getLinkedFeatures(permissionKey, userEntitlementsContext) {
|
|
25803
|
+
return Object.keys(userEntitlementsContext.features).filter((featureKey) => userEntitlementsContext.features[featureKey].linkedPermissions.includes(permissionKey));
|
|
25804
|
+
}
|
|
25805
|
+
//# sourceMappingURL=is-entitled.evaluator.js.map
|
|
25806
|
+
|
|
25807
|
+
/***/ }),
|
|
25808
|
+
|
|
25809
|
+
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/permissions.utils.js":
|
|
25810
|
+
/*!****************************************************************************************************************!*\
|
|
25811
|
+
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/permissions.utils.js ***!
|
|
25812
|
+
\****************************************************************************************************************/
|
|
26144
25813
|
/***/ ((__unused_webpack_module, exports) => {
|
|
26145
25814
|
|
|
26146
25815
|
"use strict";
|
|
@@ -26159,6 +25828,27 @@ exports.createPermissionCheckRegex = createPermissionCheckRegex;
|
|
|
26159
25828
|
|
|
26160
25829
|
/***/ }),
|
|
26161
25830
|
|
|
25831
|
+
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js":
|
|
25832
|
+
/*!****************************************************************************************************!*\
|
|
25833
|
+
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js ***!
|
|
25834
|
+
\****************************************************************************************************/
|
|
25835
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
25836
|
+
|
|
25837
|
+
"use strict";
|
|
25838
|
+
|
|
25839
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25840
|
+
exports.NO_EXPIRATION_TIME = exports.NotEntitledJustification = void 0;
|
|
25841
|
+
var NotEntitledJustification;
|
|
25842
|
+
(function (NotEntitledJustification) {
|
|
25843
|
+
NotEntitledJustification["MISSING_FEATURE"] = "MISSING_FEATURE";
|
|
25844
|
+
NotEntitledJustification["MISSING_PERMISSION"] = "MISSING_PERMISSION";
|
|
25845
|
+
NotEntitledJustification["BUNDLE_EXPIRED"] = "BUNDLE_EXPIRED";
|
|
25846
|
+
})(NotEntitledJustification = exports.NotEntitledJustification || (exports.NotEntitledJustification = {}));
|
|
25847
|
+
exports.NO_EXPIRATION_TIME = -1;
|
|
25848
|
+
//# sourceMappingURL=types.js.map
|
|
25849
|
+
|
|
25850
|
+
/***/ }),
|
|
25851
|
+
|
|
26162
25852
|
/***/ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js":
|
|
26163
25853
|
/*!********************************************************************!*\
|
|
26164
25854
|
!*** ../../node_modules/@frontegg/rest-api/ContextHolder/index.js ***!
|
|
@@ -26633,10 +26323,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26633
26323
|
/* harmony import */ var _fetch__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../fetch */ "../../node_modules/@frontegg/rest-api/fetch.js");
|
|
26634
26324
|
/* harmony import */ var _jwt__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../jwt */ "../../node_modules/@frontegg/rest-api/jwt.js");
|
|
26635
26325
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./interfaces */ "../../node_modules/@frontegg/rest-api/auth/interfaces.js");
|
|
26636
|
-
/* harmony import */ var
|
|
26326
|
+
/* harmony import */ var _entitlements__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../entitlements */ "../../node_modules/@frontegg/rest-api/entitlements/index.js");
|
|
26637
26327
|
/* harmony import */ var _entitlements_interfaces__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../entitlements/interfaces */ "../../node_modules/@frontegg/rest-api/entitlements/interfaces.js");
|
|
26638
26328
|
/* harmony import */ var _feature_flags__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../feature-flags */ "../../node_modules/@frontegg/rest-api/feature-flags/index.js");
|
|
26639
|
-
/* harmony import */ var
|
|
26329
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./constants */ "../../node_modules/@frontegg/rest-api/auth/constants.js");
|
|
26640
26330
|
|
|
26641
26331
|
|
|
26642
26332
|
const _excluded = ["type"],
|
|
@@ -27363,20 +27053,13 @@ async function getUserAuthorization() {
|
|
|
27363
27053
|
async function getMeV2() {
|
|
27364
27054
|
return (0,_fetch__WEBPACK_IMPORTED_MODULE_11__.Get)(`${_constants__WEBPACK_IMPORTED_MODULE_12__.urls.identity.users.v2}/me`);
|
|
27365
27055
|
}
|
|
27366
|
-
|
|
27367
|
-
const noThrowLoadEntitlements = async () => {
|
|
27368
|
-
try {
|
|
27369
|
-
return await (0,_entitlements__WEBPACK_IMPORTED_MODULE_13__.loadEntitlementsV2)();
|
|
27370
|
-
} catch (e) {}
|
|
27371
|
-
};
|
|
27372
|
-
|
|
27373
27056
|
async function getMeAndEntitlements() {
|
|
27374
|
-
const [useEntitlementsV2] = _feature_flags__WEBPACK_IMPORTED_MODULE_8__.FeatureFlags.getFeatureFlags([
|
|
27057
|
+
const [useEntitlementsV2] = _feature_flags__WEBPACK_IMPORTED_MODULE_8__.FeatureFlags.getFeatureFlags([_constants__WEBPACK_IMPORTED_MODULE_13__.USE_ENTITLEMENTS_V2_ENDPOINT_FF], _ContextHolder__WEBPACK_IMPORTED_MODULE_5__.ContextHolder.getAppName() || '');
|
|
27375
27058
|
const actions = [{
|
|
27376
27059
|
action: getMeV2,
|
|
27377
27060
|
shouldLoad: true
|
|
27378
27061
|
}, {
|
|
27379
|
-
action: useEntitlementsV2 ?
|
|
27062
|
+
action: useEntitlementsV2 ? _entitlements__WEBPACK_IMPORTED_MODULE_14__.loadEntitlementsV2 : _entitlements__WEBPACK_IMPORTED_MODULE_14__.loadEntitlements,
|
|
27380
27063
|
shouldLoad: shouldLoadEntitlements()
|
|
27381
27064
|
}, {
|
|
27382
27065
|
action: getUserAuthorization,
|
|
@@ -28829,7 +28512,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28829
28512
|
/* harmony import */ var _users_interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./users/interfaces */ "../../node_modules/@frontegg/rest-api/users/interfaces.js");
|
|
28830
28513
|
/* harmony import */ var _entitlements_interfaces__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./entitlements/interfaces */ "../../node_modules/@frontegg/rest-api/entitlements/interfaces.js");
|
|
28831
28514
|
/* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./security-center/interfaces */ "../../node_modules/@frontegg/rest-api/security-center/interfaces.js");
|
|
28832
|
-
/** @license Frontegg v3.1.
|
|
28515
|
+
/** @license Frontegg v3.1.57
|
|
28833
28516
|
*
|
|
28834
28517
|
* This source code is licensed under the MIT license found in the
|
|
28835
28518
|
* LICENSE file in the root directory of this source tree.
|