jsf.js_next_gen 4.0.0-RC.3 → 4.0.0-RC.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.
@@ -8280,11 +8280,11 @@ var oam;
8280
8280
  }
8281
8281
  mona_dish_1.DQ.byId(element).delete();
8282
8282
  };
8283
- // noinspection JSUnusedGlobalSymbols
8283
+ // noinspection JSUnusedGlobalSymbols,JSUnusedLocalSymbols
8284
8284
  /**
8285
8285
  * does special form submit remapping
8286
8286
  * re-maps the issuing command link into something,
8287
- * a decode of the command link on the server can understand
8287
+ * the "decode" of the command link on the server can understand
8288
8288
  *
8289
8289
  * @param formName
8290
8290
  * @param linkId
@@ -8292,19 +8292,21 @@ var oam;
8292
8292
  * @param params
8293
8293
  */
8294
8294
  oam.submitForm = function (formName, linkId, target, params) {
8295
- var _a, _b, _c, _d;
8295
+ var _a, _b, _c, _d, _e, _f;
8296
8296
  var clearFn = 'clearFormHiddenParams_' + formName.replace(/-/g, '\$:').replace(/:/g, '_');
8297
8297
  (_a = window === null || window === void 0 ? void 0 : window[clearFn]) === null || _a === void 0 ? void 0 : _a.call(window, formName);
8298
8298
  //autoscroll code
8299
8299
  if (((_d = (_c = (_b = window === null || window === void 0 ? void 0 : window.myfaces) === null || _b === void 0 ? void 0 : _b.core) === null || _c === void 0 ? void 0 : _c.config) === null || _d === void 0 ? void 0 : _d.autoScroll) && (window === null || window === void 0 ? void 0 : window.getScrolling)) {
8300
8300
  myfaces.oam.setHiddenInput(formName, 'autoScroll', window === null || window === void 0 ? void 0 : window.getScrolling());
8301
8301
  }
8302
- mona_dish_1.Stream.ofAssoc(params).each(function (param) {
8303
- myfaces.oam.setHiddenInput(formName, param[0], param[1]);
8302
+ var paramsStream = Array.isArray(params) ? mona_dish_1.Stream.of.apply(mona_dish_1.Stream, params) : mona_dish_1.Stream.ofAssoc(params);
8303
+ paramsStream.each(function (_a) {
8304
+ var key = _a[0], data = _a[1];
8305
+ return myfaces.oam.setHiddenInput(formName, key, data);
8304
8306
  });
8305
8307
  //we call the namespaced function, to allow decoration, via a direct call we would
8306
- myfaces.oam.setHiddenInput(formName, "".concat(formName, ":_idcl"), linkId);
8307
- mona_dish_1.DQ.byId(document.forms[formName]).each(function (form) {
8308
+ myfaces.oam.setHiddenInput(formName, "".concat(formName, ":_idcl"), linkId !== null && linkId !== void 0 ? linkId : '');
8309
+ mona_dish_1.DQ.byId((_f = (_e = document.forms) === null || _e === void 0 ? void 0 : _e[formName]) !== null && _f !== void 0 ? _f : document.getElementById(formName)).each(function (form) {
8308
8310
  var _a;
8309
8311
  var ATTR_TARGET = "target";
8310
8312
  var formElement = form.getAsElem(0).value;
@@ -8321,8 +8323,10 @@ var oam;
8321
8323
  }
8322
8324
  finally {
8323
8325
  form.attr(ATTR_TARGET).value = oldTarget;
8324
- mona_dish_1.Stream.ofAssoc(params).each(function (param) {
8325
- myfaces.oam.clearHiddenInput(formName, param[0]);
8326
+ // noinspection JSUnusedLocalSymbols
8327
+ paramsStream.each(function (_a) {
8328
+ var key = _a[0], data = _a[1];
8329
+ myfaces.oam.clearHiddenInput(formName, key);
8326
8330
  });
8327
8331
  myfaces.oam.clearHiddenInput(formName, "".concat(formName, ":_idcl"));
8328
8332
  }
Binary file
Binary file