jsf.js_next_gen 4.0.0-RC.32 → 4.0.0-RC.33

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.
@@ -2917,8 +2917,9 @@ exports.Config = Config;
2917
2917
  * limitations under the License.
2918
2918
  */
2919
2919
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2920
- exports.QueryFormStringCollector = exports.QueryFormDataCollector = exports.FormDataCollector = exports.AssocArrayCollector = exports.Run = exports.ArrayAssocArrayCollector = exports.InverseArrayCollector = exports.ArrayCollector = exports.FlatMapStreamDataSource = exports.MappedStreamDataSource = exports.FilteredStreamDatasource = exports.ArrayStreamDataSource = exports.SequenceDataSource = exports.MultiStreamDatasource = exports.ITERATION_STATUS = void 0;
2920
+ exports.QueryFormStringCollector = exports.QueryFormDataCollector = exports.FormDataCollector = exports.ConfigCollector = exports.AssocArrayCollector = exports.Run = exports.ArrayAssocArrayCollector = exports.InverseArrayCollector = exports.ArrayCollector = exports.FlatMapStreamDataSource = exports.MappedStreamDataSource = exports.FilteredStreamDatasource = exports.ArrayStreamDataSource = exports.SequenceDataSource = exports.MultiStreamDatasource = exports.ITERATION_STATUS = void 0;
2921
2921
  const Stream_1 = __webpack_require__(/*! ./Stream */ "./node_modules/mona-dish/src/main/typescript/Stream.ts");
2922
+ const Monad_1 = __webpack_require__(/*! ./Monad */ "./node_modules/mona-dish/src/main/typescript/Monad.ts");
2922
2923
  /**
2923
2924
  * special status of the datasource location pointer
2924
2925
  * if an access, outside of the possible data boundaries is happening
@@ -3208,7 +3209,7 @@ class FlatMapStreamDataSource {
3208
3209
  var _a;
3209
3210
  //easy access trial
3210
3211
  if ((this === null || this === void 0 ? void 0 : this.activeDataSource) && ((_a = this === null || this === void 0 ? void 0 : this.activeDataSource) === null || _a === void 0 ? void 0 : _a.lookAhead(cnt)) != ITERATION_STATUS.EO_STRM) {
3211
- //this should coverr 95% of all accesses
3212
+ //this should cover 95% of all cases
3212
3213
  return this === null || this === void 0 ? void 0 : this.activeDataSource.lookAhead(cnt);
3213
3214
  }
3214
3215
  /**
@@ -3230,25 +3231,33 @@ class FlatMapStreamDataSource {
3230
3231
  if (this.activeDataSource) {
3231
3232
  readjustSkip(this.activeDataSource);
3232
3233
  }
3233
- //the idea is basically to look into the streams subsequentially for a match
3234
+ //the idea is basically to look into the streams sub-sequentially for a match
3234
3235
  //after each stream we have to take into consideration that the skipCnt is
3235
3236
  //reduced by the number of datasets we already have looked into in the previous stream/datasource
3236
- //unfortunately for now we have to loop into them so we introduce a small o2 here
3237
+ //unfortunately for now we have to loop into them, so we introduce a small o2 here
3237
3238
  for (let dsLoop = 1; true; dsLoop++) {
3238
- let currDatasource = this.inputDataSource.lookAhead(dsLoop);
3239
+ let datasourceData = this.inputDataSource.lookAhead(dsLoop);
3239
3240
  //we have looped out
3240
- if (currDatasource === ITERATION_STATUS.EO_STRM) {
3241
+ //no embedded data anymore? we are done, data
3242
+ //can either be a scalar an array or another datasource
3243
+ if (datasourceData === ITERATION_STATUS.EO_STRM) {
3241
3244
  return ITERATION_STATUS.EO_STRM;
3242
3245
  }
3243
- let mapped = this.mapFunc(currDatasource);
3246
+ let mappedData = this.mapFunc(datasourceData);
3244
3247
  //it either comes in as datasource or as array
3245
- let currentDataSource = this.toDatasource(mapped);
3248
+ //both cases must be unified into a datasource
3249
+ let currentDataSource = this.toDatasource(mappedData);
3250
+ //we now run again a lookahead
3246
3251
  let ret = currentDataSource.lookAhead(cnt);
3252
+ //if the value is found then we are set
3247
3253
  if (ret != ITERATION_STATUS.EO_STRM) {
3248
3254
  return ret;
3249
3255
  }
3250
- readjustSkip(currDatasource);
3256
+ //reduce the next lookahead by the number of elements
3257
+ //we are now skipping in the current data source
3258
+ readjustSkip(currentDataSource);
3251
3259
  }
3260
+ return ITERATION_STATUS.EO_STRM;
3252
3261
  }
3253
3262
  toDatasource(mapped) {
3254
3263
  let ds = Array.isArray(mapped) ? new ArrayStreamDataSource(...mapped) : mapped;
@@ -3260,7 +3269,6 @@ class FlatMapStreamDataSource {
3260
3269
  while (!next && this.inputDataSource.hasNext()) {
3261
3270
  let mapped = this.mapFunc(this.inputDataSource.next());
3262
3271
  this.activeDataSource = this.toDatasource(mapped);
3263
- ;
3264
3272
  next = this.activeDataSource.hasNext();
3265
3273
  }
3266
3274
  return next;
@@ -3358,6 +3366,18 @@ class AssocArrayCollector {
3358
3366
  }
3359
3367
  }
3360
3368
  exports.AssocArrayCollector = AssocArrayCollector;
3369
+ /**
3370
+ * A Config collector similar to the FormDFata Collector
3371
+ */
3372
+ class ConfigCollector {
3373
+ constructor() {
3374
+ this.finalValue = new Monad_1.Config({});
3375
+ }
3376
+ collect(element) {
3377
+ this.finalValue.append(element.key).value = element.value;
3378
+ }
3379
+ }
3380
+ exports.ConfigCollector = ConfigCollector;
3361
3381
  /**
3362
3382
  * Form data collector for key value pair streams
3363
3383
  */
Binary file
Binary file