dce-reactkit 3.2.2-beta.2 → 3.2.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +26 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/esm/index.js +26 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/index.d.ts +8 -1
- package/package.json +1 -1
- package/src/index.ts +2 -0
package/dist/cjs/index.js
CHANGED
|
@@ -5132,6 +5132,31 @@ const initLogCollection = (Collection) => {
|
|
|
5132
5132
|
});
|
|
5133
5133
|
};
|
|
5134
5134
|
|
|
5135
|
+
// Cache user's ability
|
|
5136
|
+
let canReview = undefined;
|
|
5137
|
+
/**
|
|
5138
|
+
* Check if the current user can review logs
|
|
5139
|
+
* @author Gabe Abrams
|
|
5140
|
+
* @returns true if current user can review logs
|
|
5141
|
+
*/
|
|
5142
|
+
const canReviewLogs = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
5143
|
+
// If cached, use that value
|
|
5144
|
+
if (canReview !== undefined) {
|
|
5145
|
+
return canReview;
|
|
5146
|
+
}
|
|
5147
|
+
// Ask on server
|
|
5148
|
+
try {
|
|
5149
|
+
canReview = !!(yield visitServerEndpoint({
|
|
5150
|
+
path: LOG_REVIEW_STATUS_ROUTE,
|
|
5151
|
+
method: 'GET',
|
|
5152
|
+
}));
|
|
5153
|
+
}
|
|
5154
|
+
catch (err) {
|
|
5155
|
+
canReview = false;
|
|
5156
|
+
}
|
|
5157
|
+
return canReview;
|
|
5158
|
+
});
|
|
5159
|
+
|
|
5135
5160
|
/**
|
|
5136
5161
|
* Days of the week
|
|
5137
5162
|
* @author Gabe Abrams
|
|
@@ -5184,6 +5209,7 @@ exports.Variant = Variant$1;
|
|
|
5184
5209
|
exports.abbreviate = abbreviate;
|
|
5185
5210
|
exports.alert = alert$1;
|
|
5186
5211
|
exports.avg = avg;
|
|
5212
|
+
exports.canReviewLogs = canReviewLogs;
|
|
5187
5213
|
exports.ceilToNumDecimals = ceilToNumDecimals;
|
|
5188
5214
|
exports.confirm = confirm;
|
|
5189
5215
|
exports.floorToNumDecimals = floorToNumDecimals;
|