jsf.js_next_gen 4.0.0-RC.7 → 4.0.0-RC.8

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.
@@ -3361,6 +3361,15 @@ exports.Stream = Stream;
3361
3361
  *
3362
3362
  */
3363
3363
  class LazyStream {
3364
+ static of(...values) {
3365
+ return new LazyStream(new SourcesCollectors_1.ArrayStreamDataSource(...values));
3366
+ }
3367
+ static ofAssoc(data) {
3368
+ return this.of(...Object.keys(data)).map(key => [key, data[key]]);
3369
+ }
3370
+ static ofStreamDataSource(value) {
3371
+ return new LazyStream(value);
3372
+ }
3364
3373
  constructor(parent) {
3365
3374
  this._limits = -1;
3366
3375
  /*
@@ -3371,15 +3380,6 @@ class LazyStream {
3371
3380
  this.pos = -1;
3372
3381
  this.dataSource = parent;
3373
3382
  }
3374
- static of(...values) {
3375
- return new LazyStream(new SourcesCollectors_1.ArrayStreamDataSource(...values));
3376
- }
3377
- static ofAssoc(data) {
3378
- return this.of(...Object.keys(data)).map(key => [key, data[key]]);
3379
- }
3380
- static ofStreamDataSource(value) {
3381
- return new LazyStream(value);
3382
- }
3383
3383
  hasNext() {
3384
3384
  if (this.isOverLimits()) {
3385
3385
  return false;
@@ -5247,10 +5247,8 @@ exports.Assertions = void 0;
5247
5247
  * limitations under the License.
5248
5248
  */
5249
5249
  const mona_dish_1 = __webpack_require__(/*! mona-dish */ "./node_modules/mona-dish/src/main/typescript/index_core.ts");
5250
- const Lang_1 = __webpack_require__(/*! ./Lang */ "./src/main/typescript/impl/util/Lang.ts");
5251
- var getMessage = Lang_1.ExtLang.getMessage;
5252
- var makeException = Lang_1.ExtLang.makeException;
5253
5250
  const Const_1 = __webpack_require__(/*! ../core/Const */ "./src/main/typescript/impl/core/Const.ts");
5251
+ const Lang_1 = __webpack_require__(/*! ./Lang */ "./src/main/typescript/impl/util/Lang.ts");
5254
5252
  /**
5255
5253
  * a set of internal code assertions
5256
5254
  * which raise an error
@@ -5265,12 +5263,12 @@ var Assertions;
5265
5263
  assertFunction(options.getIf(Const_1.ON_EVENT).value);
5266
5264
  //improve the error messages if an empty elem is passed
5267
5265
  //Assertions.assertElementExists(elem);
5268
- assert(elem.isPresent(), getMessage("ERR_MUST_BE_PROVIDED1", "{0}: source must be provided or exist", "source element id"), "faces.ajax.request", "ArgNotSet");
5266
+ assert(elem.isPresent(), Lang_1.ExtLang.getMessage("ERR_MUST_BE_PROVIDED1", "{0}: source must be provided or exist", "source element id"), "faces.ajax.request", "ArgNotSet");
5269
5267
  }
5270
5268
  Assertions.assertRequestIntegrity = assertRequestIntegrity;
5271
5269
  function assertUrlExists(node) {
5272
5270
  if (node.attr(Const_1.ATTR_URL).isAbsent()) {
5273
- throw Assertions.raiseError(new Error(), getMessage("ERR_RED_URL", null, "processRedirect"), "processRedirect");
5271
+ throw Assertions.raiseError(new Error(), Lang_1.ExtLang.getMessage("ERR_RED_URL", null, "processRedirect"), "processRedirect");
5274
5272
  }
5275
5273
  }
5276
5274
  Assertions.assertUrlExists = assertUrlExists;
@@ -5299,7 +5297,7 @@ var Assertions;
5299
5297
  let finalName = name !== null && name !== void 0 ? name : Const_1.MALFORMEDXML;
5300
5298
  let finalMessage = message !== null && message !== void 0 ? message : Const_1.EMPTY_STR;
5301
5299
  //TODO clean up the messy makeException, this is a perfect case for encapsulation and sane defaults
5302
- return makeException(error, finalTitle, finalName, "Response", caller || ((arguments.caller) ? arguments.caller.toString() : "_raiseError"), finalMessage);
5300
+ return Lang_1.ExtLang.makeException(error, finalTitle, finalName, "Response", caller || ((arguments.caller) ? arguments.caller.toString() : "_raiseError"), finalMessage);
5303
5301
  }
5304
5302
  Assertions.raiseError = raiseError;
5305
5303
  /*
@@ -5322,6 +5320,13 @@ var Assertions;
5322
5320
  assertType(value, "function", msg, caller, title);
5323
5321
  }
5324
5322
  Assertions.assertFunction = assertFunction;
5323
+ function assertDelay(value) {
5324
+ if (!(value >= 0)) { // >= 0 abbreviation which covers all cases of non positive values,
5325
+ // including NaN and non numeric strings, no type equality is deliberate here,
5326
+ throw new Error("Invalid delay value: " + value);
5327
+ }
5328
+ }
5329
+ Assertions.assertDelay = assertDelay;
5325
5330
  })(Assertions = exports.Assertions || (exports.Assertions = {}));
5326
5331
 
5327
5332
 
@@ -6137,6 +6142,8 @@ const mona_dish_1 = __webpack_require__(/*! mona-dish */ "./node_modules/mona-di
6137
6142
  const Const_1 = __webpack_require__(/*! ../core/Const */ "./src/main/typescript/impl/core/Const.ts");
6138
6143
  const Lang_1 = __webpack_require__(/*! ../util/Lang */ "./src/main/typescript/impl/util/Lang.ts");
6139
6144
  const ExtDomQuery_1 = __webpack_require__(/*! ../util/ExtDomQuery */ "./src/main/typescript/impl/util/ExtDomQuery.ts");
6145
+ const Assertions_1 = __webpack_require__(/*! ../util/Assertions */ "./src/main/typescript/impl/util/Assertions.ts");
6146
+ var assertDelay = Assertions_1.Assertions.assertDelay;
6140
6147
  /**
6141
6148
  * Resolver functions for various aspects of the request data
6142
6149
  *
@@ -6199,7 +6206,15 @@ exports.resolveTimeout = resolveTimeout;
6199
6206
  function resolveDelay(options) {
6200
6207
  var _a;
6201
6208
  let getCfg = Lang_1.ExtLang.getLocalOrGlobalConfig;
6202
- return (_a = options.getIf(Const_1.CTX_PARAM_DELAY).value) !== null && _a !== void 0 ? _a : getCfg(options.value, Const_1.CTX_PARAM_DELAY, 0);
6209
+ // null or non undefined will automatically be mapped to 0 aka no delay
6210
+ let ret = (_a = options.getIf(Const_1.CTX_PARAM_DELAY).value) !== null && _a !== void 0 ? _a : getCfg(options.value, Const_1.CTX_PARAM_DELAY, 0);
6211
+ // if delay === none, no delay must be used, aka delay 0
6212
+ if ('none' === ret) {
6213
+ ret = 0;
6214
+ }
6215
+ // negative, or invalid values will automatically get a js exception
6216
+ assertDelay(ret);
6217
+ return ret;
6203
6218
  }
6204
6219
  exports.resolveDelay = resolveDelay;
6205
6220
  /**
Binary file
Binary file