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
|
@@ -48,6 +48,7 @@ import logClientEvent from './helpers/logClientEvent';
|
|
|
48
48
|
import initLogCollection from './server/initLogCollection';
|
|
49
49
|
import getMonthName from './helpers/getMonthName';
|
|
50
50
|
import genCSV from './helpers/genCSV';
|
|
51
|
+
import canReviewLogs from './helpers/canReviewLogs';
|
|
51
52
|
import ModalButtonType from './types/ModalButtonType';
|
|
52
53
|
import ModalSize from './types/ModalSize';
|
|
53
54
|
import ModalType from './types/ModalType';
|
|
@@ -63,4 +64,4 @@ import LogBuiltInMetadata from './types/LogBuiltInMetadata';
|
|
|
63
64
|
import LogMetadataType from './types/LogMetadataType';
|
|
64
65
|
import IntelliTableColumn from './types/IntelliTableColumn';
|
|
65
66
|
import PickableItem from './components/ItemPicker/types/PickableItem';
|
|
66
|
-
export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, alert, confirm, showFatalError, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, stubServerEndpoint, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, visitServerEndpoint, logClientEvent, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, IntelliTableColumn, PickableItem, ParamType, };
|
|
67
|
+
export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, alert, confirm, showFatalError, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, stubServerEndpoint, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, canReviewLogs, visitServerEndpoint, logClientEvent, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, IntelliTableColumn, PickableItem, ParamType, };
|
package/dist/esm/index.js
CHANGED
|
@@ -5124,6 +5124,31 @@ const initLogCollection = (Collection) => {
|
|
|
5124
5124
|
});
|
|
5125
5125
|
};
|
|
5126
5126
|
|
|
5127
|
+
// Cache user's ability
|
|
5128
|
+
let canReview = undefined;
|
|
5129
|
+
/**
|
|
5130
|
+
* Check if the current user can review logs
|
|
5131
|
+
* @author Gabe Abrams
|
|
5132
|
+
* @returns true if current user can review logs
|
|
5133
|
+
*/
|
|
5134
|
+
const canReviewLogs = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
5135
|
+
// If cached, use that value
|
|
5136
|
+
if (canReview !== undefined) {
|
|
5137
|
+
return canReview;
|
|
5138
|
+
}
|
|
5139
|
+
// Ask on server
|
|
5140
|
+
try {
|
|
5141
|
+
canReview = !!(yield visitServerEndpoint({
|
|
5142
|
+
path: LOG_REVIEW_STATUS_ROUTE,
|
|
5143
|
+
method: 'GET',
|
|
5144
|
+
}));
|
|
5145
|
+
}
|
|
5146
|
+
catch (err) {
|
|
5147
|
+
canReview = false;
|
|
5148
|
+
}
|
|
5149
|
+
return canReview;
|
|
5150
|
+
});
|
|
5151
|
+
|
|
5127
5152
|
/**
|
|
5128
5153
|
* Days of the week
|
|
5129
5154
|
* @author Gabe Abrams
|
|
@@ -5140,5 +5165,5 @@ var DayOfWeek;
|
|
|
5140
5165
|
})(DayOfWeek || (DayOfWeek = {}));
|
|
5141
5166
|
var DayOfWeek$1 = DayOfWeek;
|
|
5142
5167
|
|
|
5143
|
-
export { AppWrapper, ButtonInputGroup, CSVDownloadButton, CheckboxButton, CopiableBox, DAY_IN_MS, DayOfWeek$1 as DayOfWeek, Drawer, ErrorBox, ErrorWithCode, HOUR_IN_MS, IntelliTable, ItemPicker, LoadingSpinner, LogAction$1 as LogAction, LogBuiltInMetadata, LogReviewer, LogSource$1 as LogSource, LogType$1 as LogType, MINUTE_IN_MS, Modal, ModalButtonType$1 as ModalButtonType, ModalSize$1 as ModalSize, ModalType$1 as ModalType, ParamType$1 as ParamType, PopFailureMark, PopPendingMark, PopSuccessMark, RadioButton, ReactKitErrorCode$1 as ReactKitErrorCode, SimpleDateChooser, TabBox, Variant$1 as Variant, abbreviate, alert$1 as alert, avg, ceilToNumDecimals, confirm, floorToNumDecimals, forceNumIntoBounds, genCSV, genRouteHandler, getHumanReadableDate, getMonthName, getOrdinal, getPartOfDay, getTimeInfoInET, handleError, handleSuccess, initLogCollection, initServer, logClientEvent, onlyKeepLetters, padDecimalZeros, padZerosLeft, parallelLimit, roundToNumDecimals, showFatalError, startMinWait, stringsToHumanReadableList, stubServerEndpoint, sum, visitServerEndpoint, waitMs };
|
|
5168
|
+
export { AppWrapper, ButtonInputGroup, CSVDownloadButton, CheckboxButton, CopiableBox, DAY_IN_MS, DayOfWeek$1 as DayOfWeek, Drawer, ErrorBox, ErrorWithCode, HOUR_IN_MS, IntelliTable, ItemPicker, LoadingSpinner, LogAction$1 as LogAction, LogBuiltInMetadata, LogReviewer, LogSource$1 as LogSource, LogType$1 as LogType, MINUTE_IN_MS, Modal, ModalButtonType$1 as ModalButtonType, ModalSize$1 as ModalSize, ModalType$1 as ModalType, ParamType$1 as ParamType, PopFailureMark, PopPendingMark, PopSuccessMark, RadioButton, ReactKitErrorCode$1 as ReactKitErrorCode, SimpleDateChooser, TabBox, Variant$1 as Variant, abbreviate, alert$1 as alert, avg, canReviewLogs, ceilToNumDecimals, confirm, floorToNumDecimals, forceNumIntoBounds, genCSV, genRouteHandler, getHumanReadableDate, getMonthName, getOrdinal, getPartOfDay, getTimeInfoInET, handleError, handleSuccess, initLogCollection, initServer, logClientEvent, onlyKeepLetters, padDecimalZeros, padZerosLeft, parallelLimit, roundToNumDecimals, showFatalError, startMinWait, stringsToHumanReadableList, stubServerEndpoint, sum, visitServerEndpoint, waitMs };
|
|
5144
5169
|
//# sourceMappingURL=index.js.map
|