jsf.js_next_gen 4.0.2-beta.3 → 4.0.2-beta.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.
Files changed (46) hide show
  1. package/dist/window/faces-development.js +26 -11
  2. package/dist/window/faces-development.js.map +1 -1
  3. package/dist/window/faces.js +1 -1
  4. package/dist/window/faces.js.map +1 -1
  5. package/dist/window/jsf-development.js +26 -11
  6. package/dist/window/jsf-development.js.map +1 -1
  7. package/dist/window/jsf.js +1 -1
  8. package/dist/window/jsf.js.map +1 -1
  9. package/package.json +7 -8
  10. package/src/main/typescript/impl/util/FileUtils.ts +3 -2
  11. package/src/main/typescript/impl/xhrCore/XhrRequest.ts +24 -10
  12. package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +28 -0
  13. package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +201 -2
  14. package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
  15. package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
  16. package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
  17. package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
  18. package/target/impl/util/FileUtils.js +3 -2
  19. package/target/impl/util/FileUtils.js.map +1 -1
  20. package/target/impl/xhrCore/XhrRequest.js +23 -9
  21. package/target/impl/xhrCore/XhrRequest.js.map +1 -1
  22. package/target/test/frameworkBase/_ext/shared/StandardInits.js +26 -0
  23. package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
  24. package/target/test/xhrCore/RequestTest.spec.js +176 -1
  25. package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
  26. package/target/test-classes/.gz +0 -0
  27. package/target/test-classes/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class +0 -0
  28. package/target/test-classes/fileuploadtest.html +24 -0
  29. package/target/test-classes/jsf-development.js +3559 -0
  30. package/target/test-classes/jsf-development.js.br +0 -0
  31. package/target/test-classes/jsf-development.js.gz +0 -0
  32. package/target/test-classes/jsf-development.js.map +1 -0
  33. package/target/test-classes/jsf.js +3 -0
  34. package/target/test-classes/jsf.js.br +0 -0
  35. package/target/test-classes/jsf.js.gz +0 -0
  36. package/webpack.config.ts +1 -23
  37. package/dist/window/faces-development.js.br +0 -0
  38. package/dist/window/faces-development.js.gz +0 -0
  39. package/dist/window/faces.js.br +0 -0
  40. package/dist/window/faces.js.gz +0 -0
  41. package/dist/window/jsf-development.js.br +0 -0
  42. package/dist/window/jsf-development.js.gz +0 -0
  43. package/dist/window/jsf.js.br +0 -0
  44. package/dist/window/jsf.js.gz +0 -0
  45. package/webpack.config.js +0 -71
  46. package/webpack.config.js.map +0 -1
@@ -6099,14 +6099,15 @@ exports.encodeFormData = encodeFormData;
6099
6099
  */
6100
6100
  function decodeEncodedValues(encoded) {
6101
6101
  const filterBlanks = item => !!(item || '').replace(/\s+/g, '');
6102
- const splitKeyValuePair = line => {
6102
+ const splitKeyValuePair = _line => {
6103
+ let line = decodeURIComponent(_line);
6103
6104
  let index = line.indexOf("=");
6104
6105
  if (index == -1) {
6105
6106
  return [line];
6106
6107
  }
6107
6108
  return [line.substring(0, index), line.substring(index + 1)];
6108
6109
  };
6109
- let requestParamEntries = decodeURIComponent(encoded).split(/&/gi);
6110
+ let requestParamEntries = encoded.split(/&/gi);
6110
6111
  return requestParamEntries.filter(filterBlanks).map(splitKeyValuePair);
6111
6112
  }
6112
6113
  exports.decodeEncodedValues = decodeEncodedValues;
@@ -8033,15 +8034,7 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
8033
8034
  this.requestContext.$nspEnabled = true;
8034
8035
  requestPassThroughParams.$nspEnabled = true;
8035
8036
  }
8036
- const issuingItemId = this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value;
8037
- if (issuingItemId) {
8038
- const itemValue = mona_dish_1.DQ.byId(issuingItemId).inputValue;
8039
- if (itemValue.isPresent()) {
8040
- const arr = new ExtDomQuery_1.ExtConfig({});
8041
- arr.assign(issuingItemId).value = itemValue.value;
8042
- formData.shallowMerge(arr, true, true);
8043
- }
8044
- }
8037
+ this.appendIssuingItem(formData);
8045
8038
  this.responseContext = requestPassThroughParams.deepCopy;
8046
8039
  // we have to shift the internal passthroughs around to build up our response context
8047
8040
  const responseContext = this.responseContext;
@@ -8269,6 +8262,28 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
8269
8262
  const eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_ERROR);
8270
8263
  AjaxImpl_1.Implementation.sendError(errorData, eventHandler);
8271
8264
  }
8265
+ appendIssuingItem(formData) {
8266
+ const issuingItemId = this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value;
8267
+ //not encoded
8268
+ if (issuingItemId && formData.getIf(issuingItemId).isAbsent()) {
8269
+ const issuingItem = mona_dish_1.DQ.byId(issuingItemId);
8270
+ const itemValue = issuingItem.inputValue;
8271
+ const arr = new ExtDomQuery_1.ExtConfig({});
8272
+ const type = issuingItem.type.orElse("").value.toLowerCase();
8273
+ //Checkbox and radio only value pass if checked is set, otherwise they should not show
8274
+ //up at all, and if checked is set, they either can have a value or simply being boolean
8275
+ if ((type == "checkbox" || type == "radio") && issuingItem.attr("checked").isAbsent()) {
8276
+ return;
8277
+ }
8278
+ else if ((type == "checkbox" || type == "radio")) {
8279
+ arr.assign(issuingItemId).value = itemValue.orElse(true).value;
8280
+ }
8281
+ else {
8282
+ arr.assign(issuingItemId).value = itemValue.value;
8283
+ }
8284
+ formData.shallowMerge(arr, true, true);
8285
+ }
8286
+ }
8272
8287
  }
8273
8288
  exports.XhrRequest = XhrRequest;
8274
8289