@frontegg/js 6.164.0-alpha.0 → 6.164.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 +6 -208
- package/umd/frontegg.production.min.js +1 -1
- package/version.js +1 -1
package/index.js
CHANGED
package/node/index.js
CHANGED
package/node/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/js",
|
|
3
|
-
"version": "6.164.0
|
|
3
|
+
"version": "6.164.0",
|
|
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.164.0
|
|
9
|
+
"@frontegg/types": "6.164.0"
|
|
10
10
|
},
|
|
11
11
|
"browserslist": {
|
|
12
12
|
"production": [
|
|
@@ -1417,7 +1417,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1417
1417
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1418
1418
|
/* harmony export */ });
|
|
1419
1419
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
1420
|
-
cdnVersion: '6.164.0
|
|
1420
|
+
cdnVersion: '6.164.0'
|
|
1421
1421
|
});
|
|
1422
1422
|
|
|
1423
1423
|
/***/ }),
|
|
@@ -16907,7 +16907,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16907
16907
|
/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! uuid */ "../../node_modules/uuid/dist/esm-browser/v4.js");
|
|
16908
16908
|
/* harmony import */ var _GroupsState_interfaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../GroupsState/interfaces */ "../../dist/@frontegg/redux-store/auth/GroupsState/interfaces.js");
|
|
16909
16909
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils */ "../../dist/@frontegg/redux-store/utils/errorHandler.js");
|
|
16910
|
-
/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! date-fns */ "../../node_modules/date-fns/esm/addSeconds/index.js");
|
|
16911
16910
|
|
|
16912
16911
|
|
|
16913
16912
|
const _excluded = ["callback"],
|
|
@@ -16944,7 +16943,6 @@ const _excluded = ["callback"],
|
|
|
16944
16943
|
|
|
16945
16944
|
|
|
16946
16945
|
|
|
16947
|
-
|
|
16948
16946
|
const selectTeamState = () => (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.select)(_ => _[_constants__WEBPACK_IMPORTED_MODULE_3__.authStoreName].teamState);
|
|
16949
16947
|
function* getGroupsForUsers() {
|
|
16950
16948
|
try {
|
|
@@ -18056,11 +18054,12 @@ function* addUserMock({
|
|
|
18056
18054
|
})
|
|
18057
18055
|
}));
|
|
18058
18056
|
yield (0,_utils__WEBPACK_IMPORTED_MODULE_9__.delay)();
|
|
18057
|
+
const date = new Date();
|
|
18059
18058
|
const newUser = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, _dummy__WEBPACK_IMPORTED_MODULE_10__.userTeamDemo, {
|
|
18060
18059
|
groups: []
|
|
18061
18060
|
}, body, {
|
|
18062
18061
|
id: `${(0,uuid__WEBPACK_IMPORTED_MODULE_11__["default"])()}`,
|
|
18063
|
-
temporaryExpirationDate: body.expirationInSeconds ?
|
|
18062
|
+
temporaryExpirationDate: body.expirationInSeconds ? new Date(date.setSeconds(date.getSeconds() + body.expirationInSeconds)) : undefined
|
|
18064
18063
|
});
|
|
18065
18064
|
callback == null ? void 0 : callback(newUser);
|
|
18066
18065
|
yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
|
|
@@ -18278,10 +18277,11 @@ function* updateUserExpirationTimeMock({
|
|
|
18278
18277
|
key: _interfaces__WEBPACK_IMPORTED_MODULE_7__.TeamStateKeys.UPDATE_USER_EXPIRATION_TIME,
|
|
18279
18278
|
value: true
|
|
18280
18279
|
}));
|
|
18280
|
+
const date = new Date();
|
|
18281
18281
|
yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_2__.put)(_reducer__WEBPACK_IMPORTED_MODULE_6__.actions.setTeamState({
|
|
18282
18282
|
users: teamState.users.map(user => {
|
|
18283
18283
|
return user.id === body.userId ? (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, user, {
|
|
18284
|
-
temporaryExpirationDate:
|
|
18284
|
+
temporaryExpirationDate: body.expirationInSeconds ? new Date(date.setSeconds(date.getSeconds() + body.expirationInSeconds)) : undefined
|
|
18285
18285
|
}) : user;
|
|
18286
18286
|
})
|
|
18287
18287
|
}));
|
|
@@ -24569,7 +24569,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24569
24569
|
/* harmony export */ });
|
|
24570
24570
|
/* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
|
|
24571
24571
|
/* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
|
|
24572
|
-
/** @license Frontegg v6.164.0
|
|
24572
|
+
/** @license Frontegg v6.164.0
|
|
24573
24573
|
*
|
|
24574
24574
|
* This source code is licensed under the MIT license found in the
|
|
24575
24575
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -35104,208 +35104,6 @@ var createStructuredSelector = function createStructuredSelector(selectors, sele
|
|
|
35104
35104
|
|
|
35105
35105
|
/***/ }),
|
|
35106
35106
|
|
|
35107
|
-
/***/ "../../node_modules/date-fns/esm/_lib/requiredArgs/index.js":
|
|
35108
|
-
/*!******************************************************************!*\
|
|
35109
|
-
!*** ../../node_modules/date-fns/esm/_lib/requiredArgs/index.js ***!
|
|
35110
|
-
\******************************************************************/
|
|
35111
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35112
|
-
|
|
35113
|
-
"use strict";
|
|
35114
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35115
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35116
|
-
/* harmony export */ "default": () => (/* binding */ requiredArgs)
|
|
35117
|
-
/* harmony export */ });
|
|
35118
|
-
function requiredArgs(required, args) {
|
|
35119
|
-
if (args.length < required) {
|
|
35120
|
-
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
35121
|
-
}
|
|
35122
|
-
}
|
|
35123
|
-
|
|
35124
|
-
/***/ }),
|
|
35125
|
-
|
|
35126
|
-
/***/ "../../node_modules/date-fns/esm/_lib/toInteger/index.js":
|
|
35127
|
-
/*!***************************************************************!*\
|
|
35128
|
-
!*** ../../node_modules/date-fns/esm/_lib/toInteger/index.js ***!
|
|
35129
|
-
\***************************************************************/
|
|
35130
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35131
|
-
|
|
35132
|
-
"use strict";
|
|
35133
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35134
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35135
|
-
/* harmony export */ "default": () => (/* binding */ toInteger)
|
|
35136
|
-
/* harmony export */ });
|
|
35137
|
-
function toInteger(dirtyNumber) {
|
|
35138
|
-
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
35139
|
-
return NaN;
|
|
35140
|
-
}
|
|
35141
|
-
|
|
35142
|
-
var number = Number(dirtyNumber);
|
|
35143
|
-
|
|
35144
|
-
if (isNaN(number)) {
|
|
35145
|
-
return number;
|
|
35146
|
-
}
|
|
35147
|
-
|
|
35148
|
-
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
35149
|
-
}
|
|
35150
|
-
|
|
35151
|
-
/***/ }),
|
|
35152
|
-
|
|
35153
|
-
/***/ "../../node_modules/date-fns/esm/addMilliseconds/index.js":
|
|
35154
|
-
/*!****************************************************************!*\
|
|
35155
|
-
!*** ../../node_modules/date-fns/esm/addMilliseconds/index.js ***!
|
|
35156
|
-
\****************************************************************/
|
|
35157
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35158
|
-
|
|
35159
|
-
"use strict";
|
|
35160
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35161
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35162
|
-
/* harmony export */ "default": () => (/* binding */ addMilliseconds)
|
|
35163
|
-
/* harmony export */ });
|
|
35164
|
-
/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_lib/toInteger/index.js */ "../../node_modules/date-fns/esm/_lib/toInteger/index.js");
|
|
35165
|
-
/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toDate/index.js */ "../../node_modules/date-fns/esm/toDate/index.js");
|
|
35166
|
-
/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ "../../node_modules/date-fns/esm/_lib/requiredArgs/index.js");
|
|
35167
|
-
|
|
35168
|
-
|
|
35169
|
-
|
|
35170
|
-
/**
|
|
35171
|
-
* @name addMilliseconds
|
|
35172
|
-
* @category Millisecond Helpers
|
|
35173
|
-
* @summary Add the specified number of milliseconds to the given date.
|
|
35174
|
-
*
|
|
35175
|
-
* @description
|
|
35176
|
-
* Add the specified number of milliseconds to the given date.
|
|
35177
|
-
*
|
|
35178
|
-
* @param {Date|Number} date - the date to be changed
|
|
35179
|
-
* @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
35180
|
-
* @returns {Date} the new date with the milliseconds added
|
|
35181
|
-
* @throws {TypeError} 2 arguments required
|
|
35182
|
-
*
|
|
35183
|
-
* @example
|
|
35184
|
-
* // Add 750 milliseconds to 10 July 2014 12:45:30.000:
|
|
35185
|
-
* const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
35186
|
-
* //=> Thu Jul 10 2014 12:45:30.750
|
|
35187
|
-
*/
|
|
35188
|
-
|
|
35189
|
-
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
35190
|
-
(0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(2, arguments);
|
|
35191
|
-
var timestamp = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate).getTime();
|
|
35192
|
-
var amount = (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(dirtyAmount);
|
|
35193
|
-
return new Date(timestamp + amount);
|
|
35194
|
-
}
|
|
35195
|
-
|
|
35196
|
-
/***/ }),
|
|
35197
|
-
|
|
35198
|
-
/***/ "../../node_modules/date-fns/esm/addSeconds/index.js":
|
|
35199
|
-
/*!***********************************************************!*\
|
|
35200
|
-
!*** ../../node_modules/date-fns/esm/addSeconds/index.js ***!
|
|
35201
|
-
\***********************************************************/
|
|
35202
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35203
|
-
|
|
35204
|
-
"use strict";
|
|
35205
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35206
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35207
|
-
/* harmony export */ "default": () => (/* binding */ addSeconds)
|
|
35208
|
-
/* harmony export */ });
|
|
35209
|
-
/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_lib/toInteger/index.js */ "../../node_modules/date-fns/esm/_lib/toInteger/index.js");
|
|
35210
|
-
/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../addMilliseconds/index.js */ "../../node_modules/date-fns/esm/addMilliseconds/index.js");
|
|
35211
|
-
/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ "../../node_modules/date-fns/esm/_lib/requiredArgs/index.js");
|
|
35212
|
-
|
|
35213
|
-
|
|
35214
|
-
|
|
35215
|
-
/**
|
|
35216
|
-
* @name addSeconds
|
|
35217
|
-
* @category Second Helpers
|
|
35218
|
-
* @summary Add the specified number of seconds to the given date.
|
|
35219
|
-
*
|
|
35220
|
-
* @description
|
|
35221
|
-
* Add the specified number of seconds to the given date.
|
|
35222
|
-
*
|
|
35223
|
-
* @param {Date|Number} date - the date to be changed
|
|
35224
|
-
* @param {Number} amount - the amount of seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
35225
|
-
* @returns {Date} the new date with the seconds added
|
|
35226
|
-
* @throws {TypeError} 2 arguments required
|
|
35227
|
-
*
|
|
35228
|
-
* @example
|
|
35229
|
-
* // Add 30 seconds to 10 July 2014 12:45:00:
|
|
35230
|
-
* const result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)
|
|
35231
|
-
* //=> Thu Jul 10 2014 12:45:30
|
|
35232
|
-
*/
|
|
35233
|
-
|
|
35234
|
-
function addSeconds(dirtyDate, dirtyAmount) {
|
|
35235
|
-
(0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(2, arguments);
|
|
35236
|
-
var amount = (0,_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyAmount);
|
|
35237
|
-
return (0,_addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(dirtyDate, amount * 1000);
|
|
35238
|
-
}
|
|
35239
|
-
|
|
35240
|
-
/***/ }),
|
|
35241
|
-
|
|
35242
|
-
/***/ "../../node_modules/date-fns/esm/toDate/index.js":
|
|
35243
|
-
/*!*******************************************************!*\
|
|
35244
|
-
!*** ../../node_modules/date-fns/esm/toDate/index.js ***!
|
|
35245
|
-
\*******************************************************/
|
|
35246
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35247
|
-
|
|
35248
|
-
"use strict";
|
|
35249
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35250
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35251
|
-
/* harmony export */ "default": () => (/* binding */ toDate)
|
|
35252
|
-
/* harmony export */ });
|
|
35253
|
-
/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_lib/requiredArgs/index.js */ "../../node_modules/date-fns/esm/_lib/requiredArgs/index.js");
|
|
35254
|
-
|
|
35255
|
-
/**
|
|
35256
|
-
* @name toDate
|
|
35257
|
-
* @category Common Helpers
|
|
35258
|
-
* @summary Convert the given argument to an instance of Date.
|
|
35259
|
-
*
|
|
35260
|
-
* @description
|
|
35261
|
-
* Convert the given argument to an instance of Date.
|
|
35262
|
-
*
|
|
35263
|
-
* If the argument is an instance of Date, the function returns its clone.
|
|
35264
|
-
*
|
|
35265
|
-
* If the argument is a number, it is treated as a timestamp.
|
|
35266
|
-
*
|
|
35267
|
-
* If the argument is none of the above, the function returns Invalid Date.
|
|
35268
|
-
*
|
|
35269
|
-
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
35270
|
-
*
|
|
35271
|
-
* @param {Date|Number} argument - the value to convert
|
|
35272
|
-
* @returns {Date} the parsed date in the local time zone
|
|
35273
|
-
* @throws {TypeError} 1 argument required
|
|
35274
|
-
*
|
|
35275
|
-
* @example
|
|
35276
|
-
* // Clone the date:
|
|
35277
|
-
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
35278
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
35279
|
-
*
|
|
35280
|
-
* @example
|
|
35281
|
-
* // Convert the timestamp to date:
|
|
35282
|
-
* const result = toDate(1392098430000)
|
|
35283
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
35284
|
-
*/
|
|
35285
|
-
|
|
35286
|
-
function toDate(argument) {
|
|
35287
|
-
(0,_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments);
|
|
35288
|
-
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
35289
|
-
|
|
35290
|
-
if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {
|
|
35291
|
-
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
35292
|
-
return new Date(argument.getTime());
|
|
35293
|
-
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
35294
|
-
return new Date(argument);
|
|
35295
|
-
} else {
|
|
35296
|
-
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
35297
|
-
// eslint-disable-next-line no-console
|
|
35298
|
-
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"); // eslint-disable-next-line no-console
|
|
35299
|
-
|
|
35300
|
-
console.warn(new Error().stack);
|
|
35301
|
-
}
|
|
35302
|
-
|
|
35303
|
-
return new Date(NaN);
|
|
35304
|
-
}
|
|
35305
|
-
}
|
|
35306
|
-
|
|
35307
|
-
/***/ }),
|
|
35308
|
-
|
|
35309
35107
|
/***/ "../../node_modules/deepmerge/dist/cjs.js":
|
|
35310
35108
|
/*!************************************************!*\
|
|
35311
35109
|
!*** ../../node_modules/deepmerge/dist/cjs.js ***!
|