@frontegg/js 6.148.0-alpha.3 → 6.148.0-alpha.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.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.148.0-alpha.3
1
+ /** @license Frontegg v6.148.0-alpha.5
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v6.148.0-alpha.3
1
+ /** @license Frontegg v6.148.0-alpha.5
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/node/version.js CHANGED
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _default = {
8
- cdnVersion: '6.148.0-alpha.3'
8
+ cdnVersion: '6.148.0-alpha.5'
9
9
  };
10
10
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@frontegg/js",
3
- "version": "6.148.0-alpha.3",
3
+ "version": "6.148.0-alpha.5",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",
7
7
  "dependencies": {
8
8
  "@babel/runtime": "^7.18.6",
9
- "@frontegg/types": "6.148.0-alpha.3"
9
+ "@frontegg/types": "6.148.0-alpha.5"
10
10
  },
11
11
  "browserslist": {
12
12
  "production": [
@@ -1414,7 +1414,7 @@ __webpack_require__.r(__webpack_exports__);
1414
1414
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1415
1415
  /* harmony export */ });
1416
1416
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
1417
- cdnVersion: '6.148.0-alpha.3'
1417
+ cdnVersion: '6.148.0-alpha.5'
1418
1418
  });
1419
1419
 
1420
1420
  /***/ }),
@@ -23245,7 +23245,7 @@ __webpack_require__.r(__webpack_exports__);
23245
23245
  /* harmony export */ });
23246
23246
  /* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
23247
23247
  /* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
23248
- /** @license Frontegg v6.148.0-alpha.3
23248
+ /** @license Frontegg v6.148.0-alpha.5
23249
23249
  *
23250
23250
  * This source code is licensed under the MIT license found in the
23251
23251
  * LICENSE file in the root directory of this source tree.
@@ -23644,10 +23644,17 @@ exports.useDateBetweenOperation = useDateBetweenOperation;
23644
23644
  "use strict";
23645
23645
 
23646
23646
  Object.defineProperty(exports, "__esModule", ({ value: true }));
23647
- exports.DateSanitizersMapper = exports.sanitizeDateRange = exports.sanitizeSingleDate = void 0;
23647
+ exports.DateSanitizersMapper = exports.sanitizeDateRange = exports.sanitizeSingleDate = exports.isValidDate = exports.sanitizeDateValue = void 0;
23648
23648
  const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
23649
+ const sanitizeDateValue = (value) => {
23650
+ return new Date(value);
23651
+ };
23652
+ exports.sanitizeDateValue = sanitizeDateValue;
23653
+ const isValidDate = (value) => value instanceof Date && !isNaN(value);
23654
+ exports.isValidDate = isValidDate;
23649
23655
  const sanitizeSingleDate = (value) => {
23650
- const sanitizedValue = value.date ? { date: value.date } : undefined;
23656
+ const sanitizedDateValue = value.date ? (0, exports.sanitizeDateValue)(value.date) : undefined;
23657
+ const sanitizedValue = sanitizedDateValue && (0, exports.isValidDate)(sanitizedDateValue) ? { date: sanitizedDateValue } : undefined;
23651
23658
  return {
23652
23659
  isSanitized: !!sanitizedValue,
23653
23660
  sanitizedValue,
@@ -23796,10 +23803,10 @@ const sanitizeNumericRange = (value) => {
23796
23803
  exports.sanitizeNumericRange = sanitizeNumericRange;
23797
23804
  exports.NumericSanitizersMapper = {
23798
23805
  [types_1.OperationEnum.Equal]: exports.sanitizeSingleNumber,
23799
- [types_1.OperationEnum.GreaterThan]: exports.sanitizeNumericRange,
23806
+ [types_1.OperationEnum.GreaterThan]: exports.sanitizeSingleNumber,
23800
23807
  [types_1.OperationEnum.GreaterThanEqual]: exports.sanitizeSingleNumber,
23801
23808
  [types_1.OperationEnum.LesserThan]: exports.sanitizeSingleNumber,
23802
- [types_1.OperationEnum.LesserThanEqual]: exports.sanitizeNumericRange,
23809
+ [types_1.OperationEnum.LesserThanEqual]: exports.sanitizeSingleNumber,
23803
23810
  [types_1.OperationEnum.BetweenNumeric]: exports.sanitizeNumericRange,
23804
23811
  };
23805
23812
  //# sourceMappingURL=sanitizers.js.map
@@ -26955,7 +26962,7 @@ __webpack_require__.r(__webpack_exports__);
26955
26962
  /* harmony import */ var _users_interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./users/interfaces */ "../../node_modules/@frontegg/rest-api/users/interfaces.js");
26956
26963
  /* harmony import */ var _entitlements_interfaces__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./entitlements/interfaces */ "../../node_modules/@frontegg/rest-api/entitlements/interfaces.js");
26957
26964
  /* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./security-center/interfaces */ "../../node_modules/@frontegg/rest-api/security-center/interfaces.js");
26958
- /** @license Frontegg v3.1.38
26965
+ /** @license Frontegg v3.1.40
26959
26966
  *
26960
26967
  * This source code is licensed under the MIT license found in the
26961
26968
  * LICENSE file in the root directory of this source tree.