jsf.js_next_gen 4.0.2-beta.1 → 4.0.2-beta.10
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/dist/docs/assets/main.js +3 -3
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/assets/style.css +450 -362
- package/dist/docs/functions/faces.ajax.addOnError.html +41 -32
- package/dist/docs/functions/faces.ajax.addOnEvent.html +41 -32
- package/dist/docs/functions/faces.ajax.request.html +41 -32
- package/dist/docs/functions/faces.ajax.response.html +42 -32
- package/dist/docs/functions/faces.getClientWindow.html +32 -34
- package/dist/docs/functions/faces.getProjectStage.html +31 -34
- package/dist/docs/functions/faces.getViewState.html +33 -35
- package/dist/docs/functions/faces.push.close.html +40 -31
- package/dist/docs/functions/faces.push.init.html +62 -45
- package/dist/docs/functions/faces.push.open.html +40 -31
- package/dist/docs/functions/faces.util.chain.html +39 -31
- package/dist/docs/functions/myfaces.ab.html +40 -39
- package/dist/docs/functions/myfaces.onDomReady.html +25 -29
- package/dist/docs/index.html +45 -72
- package/dist/docs/modules/faces.ajax.html +36 -29
- package/dist/docs/modules/faces.html +35 -38
- package/dist/docs/modules/faces.push.html +34 -27
- package/dist/docs/modules/faces.util.html +30 -23
- package/dist/docs/modules/myfaces.html +21 -27
- package/dist/docs/modules.html +15 -23
- package/dist/docs/variables/faces.contextpath.html +28 -30
- package/dist/docs/variables/faces.implversion.html +29 -31
- package/dist/docs/variables/faces.separatorchar.html +28 -30
- package/dist/docs/variables/faces.specversion.html +29 -31
- package/dist/docs/variables/myfaces.oam.html +21 -26
- package/dist/window/faces-development.js +166 -68
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +166 -68
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.map +1 -1
- package/faulty_response.html +167 -0
- package/package.json +17 -18
- package/src/main/typescript/impl/AjaxImpl.ts +22 -19
- package/src/main/typescript/impl/PushImpl.ts +1 -1
- package/src/main/typescript/impl/util/FileUtils.ts +3 -2
- package/src/main/typescript/impl/util/HiddenInputBuilder.ts +2 -2
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +28 -8
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +50 -0
- package/src/main/typescript/test/impl/ImplTest.spec.ts +85 -0
- package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +299 -1
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +245 -1
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +3 -3
- package/target/api/_api.js +2 -2
- package/target/api/_api.js.map +1 -1
- package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
- package/target/impl/AjaxImpl.js +22 -20
- package/target/impl/AjaxImpl.js.map +1 -1
- package/target/impl/PushImpl.js +4 -4
- package/target/impl/PushImpl.js.map +1 -1
- package/target/impl/util/Assertions.js +1 -1
- package/target/impl/util/Assertions.js.map +1 -1
- package/target/impl/util/FileUtils.js +3 -2
- package/target/impl/util/FileUtils.js.map +1 -1
- package/target/impl/util/HiddenInputBuilder.js +2 -2
- package/target/impl/util/HiddenInputBuilder.js.map +1 -1
- package/target/impl/util/Lang.js +1 -1
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/xhrCore/ErrorData.js +1 -1
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/Response.js +1 -1
- package/target/impl/xhrCore/Response.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +25 -7
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/myfaces/OamSubmit.js +1 -1
- package/target/myfaces/OamSubmit.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +47 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +1 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
- package/target/test/impl/ImplTest.spec.js +64 -0
- package/target/test/impl/ImplTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js +283 -0
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +212 -0
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js +3 -3
- package/target/test-classes/.gz +0 -0
- package/target/test-classes/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class +0 -0
- package/target/test-classes/fileuploadtest.html +24 -0
- package/target/test-classes/jsf-development.js +3559 -0
- package/target/test-classes/jsf-development.js.br +0 -0
- package/target/test-classes/jsf-development.js.gz +0 -0
- package/target/test-classes/jsf-development.js.map +1 -0
- package/target/test-classes/jsf.js +3 -0
- package/target/test-classes/jsf.js.br +0 -0
- package/target/test-classes/jsf.js.gz +0 -0
- package/webpack.config.ts +1 -23
- package/dist/window/faces-development.js.br +0 -0
- package/dist/window/faces-development.js.gz +0 -0
- package/dist/window/faces.js.br +0 -0
- package/dist/window/faces.js.gz +0 -0
- package/dist/window/jsf-development.js.br +0 -0
- package/dist/window/jsf-development.js.gz +0 -0
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/webpack.config.js +0 -71
- package/webpack.config.js.map +0 -1
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* limitations under the License.
|
|
27
27
|
*/
|
|
28
28
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
29
|
-
exports.shallowMerge = exports.simpleShallowMerge = exports.deepCopy = exports.buildPath = exports.resolve = exports.appendIf = exports.assignIf = exports.append = exports.assign = void 0;
|
|
29
|
+
exports.deepEqual = exports.shallowMerge = exports.simpleShallowMerge = exports.deepCopy = exports.buildPath = exports.resolve = exports.appendIf = exports.assignIf = exports.append = exports.assign = void 0;
|
|
30
30
|
const Es2019Array_1 = __webpack_require__(/*! ./Es2019Array */ "./node_modules/mona-dish/src/main/typescript/Es2019Array.ts");
|
|
31
31
|
/**
|
|
32
32
|
* A nop as assign functionality (aka ignore assign)
|
|
@@ -247,12 +247,71 @@ function simpleShallowMerge(...assocArrays) {
|
|
|
247
247
|
return shallowMerge(true, false, ...assocArrays);
|
|
248
248
|
}
|
|
249
249
|
exports.simpleShallowMerge = simpleShallowMerge;
|
|
250
|
+
function _appendWithOverwrite(withAppend, target, key, arr, toAssign) {
|
|
251
|
+
if (!withAppend) {
|
|
252
|
+
target[key] = arr[key];
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
//overwrite means in this case, no double entries!
|
|
256
|
+
//we do not a deep compare for now a single value compare suffices
|
|
257
|
+
if ('undefined' == typeof (target === null || target === void 0 ? void 0 : target[key])) {
|
|
258
|
+
target[key] = toAssign;
|
|
259
|
+
}
|
|
260
|
+
else if (!Array.isArray(target[key])) {
|
|
261
|
+
let oldVal = target[key];
|
|
262
|
+
let newVals = [];
|
|
263
|
+
//TODO maybe deep deep compare here, but on the other hand it is
|
|
264
|
+
//shallow
|
|
265
|
+
toAssign.forEach(item => {
|
|
266
|
+
if (oldVal != item) {
|
|
267
|
+
newVals.push(item);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
target[key] = new Es2019Array_1.Es2019Array(...[]);
|
|
271
|
+
target[key].push(oldVal);
|
|
272
|
+
target[key].push(...newVals);
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
let oldVal = target[key];
|
|
276
|
+
let newVals = [];
|
|
277
|
+
//TODO deep compare here
|
|
278
|
+
toAssign.forEach(item => {
|
|
279
|
+
if (oldVal.indexOf(item) == -1) {
|
|
280
|
+
newVals.push(item);
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
target[key].push(...newVals);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function _appendWithoutOverwrite(withAppend, target, key, arr, toAssign) {
|
|
288
|
+
if (!withAppend) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
//overwrite means in this case, no double entries!
|
|
293
|
+
//we do not a deep compare for now a single value compare suffices
|
|
294
|
+
if ('undefined' == typeof (target === null || target === void 0 ? void 0 : target[key])) {
|
|
295
|
+
target[key] = toAssign;
|
|
296
|
+
}
|
|
297
|
+
else if (!Array.isArray(target[key])) {
|
|
298
|
+
let oldVal = target[key];
|
|
299
|
+
target[key] = new Es2019Array_1.Es2019Array(...[]);
|
|
300
|
+
target[key].push(oldVal);
|
|
301
|
+
target[key].push(...toAssign);
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
target[key].push(...toAssign);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
250
308
|
/**
|
|
251
309
|
* Shallow merge as in config, but on raw associative arrays
|
|
252
310
|
*
|
|
253
|
-
* @param overwrite
|
|
254
|
-
* @param withAppend
|
|
255
|
-
*
|
|
311
|
+
* @param overwrite overwrite existing keys, if they exist with their subtrees
|
|
312
|
+
* @param withAppend if a key exist append the values or drop them
|
|
313
|
+
* Combination overwrite withappend filters doubles out of merged arrays
|
|
314
|
+
* @param assocArrays array of assoc arres reduced right to left
|
|
256
315
|
*/
|
|
257
316
|
function shallowMerge(overwrite = true, withAppend = false, ...assocArrays) {
|
|
258
317
|
let target = {};
|
|
@@ -265,29 +324,47 @@ function shallowMerge(overwrite = true, withAppend = false, ...assocArrays) {
|
|
|
265
324
|
toAssign = new Es2019Array_1.Es2019Array(...[toAssign]);
|
|
266
325
|
}
|
|
267
326
|
if (overwrite || !(target === null || target === void 0 ? void 0 : target[key])) {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
if ('undefined' == typeof (target === null || target === void 0 ? void 0 : target[key])) {
|
|
273
|
-
target[key] = toAssign;
|
|
274
|
-
}
|
|
275
|
-
else if (!Array.isArray(target[key])) {
|
|
276
|
-
let oldVal = target[key];
|
|
277
|
-
target[key] = new Es2019Array_1.Es2019Array(...[]);
|
|
278
|
-
target[key].push(oldVal);
|
|
279
|
-
target[key].push(...toAssign);
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
target[key].push(...toAssign);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
327
|
+
_appendWithOverwrite(withAppend, target, key, arr, toAssign);
|
|
328
|
+
}
|
|
329
|
+
else if (!overwrite && (target === null || target === void 0 ? void 0 : target[key])) {
|
|
330
|
+
_appendWithoutOverwrite(withAppend, target, key, arr, toAssign);
|
|
285
331
|
}
|
|
286
332
|
});
|
|
287
333
|
});
|
|
288
334
|
return target;
|
|
289
335
|
}
|
|
290
336
|
exports.shallowMerge = shallowMerge;
|
|
337
|
+
//TODO test this, slightly altered from https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
|
|
338
|
+
//he overlooked some optimizations and a shortcut at typeof!
|
|
339
|
+
function deepEqual(obj1, obj2) {
|
|
340
|
+
if (obj1 == obj2) {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
if (typeof obj1 != typeof obj2) {
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
347
|
+
if (obj1.length != obj2.length) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
//arrays must be equal, order as well, there is no way around it
|
|
351
|
+
//this is the major limitation we have
|
|
352
|
+
return obj1.every((item, cnt) => deepEqual(item, obj2[cnt]));
|
|
353
|
+
}
|
|
354
|
+
//string number and other primitives are filtered out here
|
|
355
|
+
if ("object" == typeof obj1 && "object" == typeof obj2) {
|
|
356
|
+
let keys1 = Object.keys(obj1);
|
|
357
|
+
let keys2 = Object.keys(obj2);
|
|
358
|
+
if (keys1.length != keys2.length) {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
return keys1.every(key => keys2.indexOf(key) != -1) &&
|
|
362
|
+
keys1.every(key => deepEqual(obj1[key], obj2[key]));
|
|
363
|
+
}
|
|
364
|
+
return false;
|
|
365
|
+
//done here no match found
|
|
366
|
+
}
|
|
367
|
+
exports.deepEqual = deepEqual;
|
|
291
368
|
|
|
292
369
|
|
|
293
370
|
/***/ }),
|
|
@@ -2506,12 +2583,12 @@ class DomQuery {
|
|
|
2506
2583
|
}
|
|
2507
2584
|
}
|
|
2508
2585
|
}
|
|
2586
|
+
exports.DomQuery = DomQuery;
|
|
2509
2587
|
DomQuery.absent = new DomQuery();
|
|
2510
2588
|
/**
|
|
2511
2589
|
* reference to the environmental global object
|
|
2512
2590
|
*/
|
|
2513
2591
|
DomQuery.global = Global_1._global$;
|
|
2514
|
-
exports.DomQuery = DomQuery;
|
|
2515
2592
|
/**
|
|
2516
2593
|
* Various collectors
|
|
2517
2594
|
* which can be used in conjunction with Streams
|
|
@@ -2911,7 +2988,7 @@ var Lang;
|
|
|
2911
2988
|
return to;
|
|
2912
2989
|
}
|
|
2913
2990
|
Lang.objAssign = objAssign;
|
|
2914
|
-
})(Lang
|
|
2991
|
+
})(Lang || (exports.Lang = Lang = {}));
|
|
2915
2992
|
|
|
2916
2993
|
|
|
2917
2994
|
/***/ }),
|
|
@@ -3193,9 +3270,9 @@ class Optional extends Monad {
|
|
|
3193
3270
|
});
|
|
3194
3271
|
}
|
|
3195
3272
|
}
|
|
3273
|
+
exports.Optional = Optional;
|
|
3196
3274
|
/*default value for absent*/
|
|
3197
3275
|
Optional.absent = Optional.fromNullable(null);
|
|
3198
|
-
exports.Optional = Optional;
|
|
3199
3276
|
// --------------------- From here onwards we break out the side effect free limits ------------
|
|
3200
3277
|
/**
|
|
3201
3278
|
* ValueEmbedder is the writeable version
|
|
@@ -3248,9 +3325,9 @@ class ValueEmbedder extends Optional {
|
|
|
3248
3325
|
return new ValueEmbedder(value, valueKey);
|
|
3249
3326
|
}
|
|
3250
3327
|
}
|
|
3328
|
+
exports.ValueEmbedder = ValueEmbedder;
|
|
3251
3329
|
/*default value for absent*/
|
|
3252
3330
|
ValueEmbedder.absent = ValueEmbedder.fromNullable(null);
|
|
3253
|
-
exports.ValueEmbedder = ValueEmbedder;
|
|
3254
3331
|
|
|
3255
3332
|
|
|
3256
3333
|
/***/ }),
|
|
@@ -3297,7 +3374,7 @@ var ITERATION_STATUS;
|
|
|
3297
3374
|
(function (ITERATION_STATUS) {
|
|
3298
3375
|
ITERATION_STATUS["EO_STRM"] = "__EO_STRM__";
|
|
3299
3376
|
ITERATION_STATUS["BEF_STRM"] = "___BEF_STRM__";
|
|
3300
|
-
})(ITERATION_STATUS
|
|
3377
|
+
})(ITERATION_STATUS || (exports.ITERATION_STATUS = ITERATION_STATUS = {}));
|
|
3301
3378
|
function calculateSkips(next_strm) {
|
|
3302
3379
|
let pos = 1;
|
|
3303
3380
|
while (next_strm.lookAhead(pos) != ITERATION_STATUS.EO_STRM) {
|
|
@@ -4115,7 +4192,7 @@ var faces;
|
|
|
4115
4192
|
}
|
|
4116
4193
|
push.close = close;
|
|
4117
4194
|
})(push = faces.push || (faces.push = {}));
|
|
4118
|
-
})(faces
|
|
4195
|
+
})(faces || (exports.faces = faces = {}));
|
|
4119
4196
|
var myfaces;
|
|
4120
4197
|
(function (myfaces) {
|
|
4121
4198
|
/**
|
|
@@ -4185,7 +4262,7 @@ var myfaces;
|
|
|
4185
4262
|
* legacy oam functions
|
|
4186
4263
|
*/
|
|
4187
4264
|
myfaces.oam = OamSubmit_1.oam;
|
|
4188
|
-
})(myfaces
|
|
4265
|
+
})(myfaces || (exports.myfaces = myfaces = {}));
|
|
4189
4266
|
|
|
4190
4267
|
|
|
4191
4268
|
/***/ }),
|
|
@@ -4370,13 +4447,14 @@ var Implementation;
|
|
|
4370
4447
|
// we can use our lazy stream each functionality to run our chain here.
|
|
4371
4448
|
// by passing a boolean as return value into the onElem call
|
|
4372
4449
|
// we can stop early at the first false, just like the spec requests
|
|
4373
|
-
let ret;
|
|
4450
|
+
let ret = true;
|
|
4374
4451
|
funcs.every(func => {
|
|
4375
4452
|
let returnVal = resolveAndExecute(source, event, func);
|
|
4376
|
-
if (returnVal
|
|
4377
|
-
ret =
|
|
4453
|
+
if (returnVal === false) {
|
|
4454
|
+
ret = false;
|
|
4378
4455
|
}
|
|
4379
|
-
|
|
4456
|
+
//we short circuit in case of false and break the every loop
|
|
4457
|
+
return ret;
|
|
4380
4458
|
});
|
|
4381
4459
|
return ret;
|
|
4382
4460
|
}
|
|
@@ -4762,13 +4840,14 @@ var Implementation;
|
|
|
4762
4840
|
}
|
|
4763
4841
|
}
|
|
4764
4842
|
/**
|
|
4765
|
-
* transforms the user values to the expected
|
|
4766
|
-
*
|
|
4767
|
-
* (
|
|
4768
|
-
*
|
|
4843
|
+
* transforms the user values to the expected values
|
|
4844
|
+
* handling '@none', '@all', '@form', and '@this' appropriately.
|
|
4845
|
+
* (Note: Although we could employ a simple string replacement method,
|
|
4846
|
+
* it could result in duplicate entries under certain conditions.)
|
|
4769
4847
|
*
|
|
4770
|
-
*
|
|
4771
|
-
*
|
|
4848
|
+
* Specific standardized constants such as
|
|
4849
|
+
* '@all', '@none', '@form', and '@this'
|
|
4850
|
+
* require special treatment.
|
|
4772
4851
|
*
|
|
4773
4852
|
* @param targetConfig the target configuration receiving the final values
|
|
4774
4853
|
* @param targetKey the target key
|
|
@@ -4863,15 +4942,14 @@ var Implementation;
|
|
|
4863
4942
|
return targetConfig;
|
|
4864
4943
|
}
|
|
4865
4944
|
/**
|
|
4866
|
-
*
|
|
4867
|
-
*
|
|
4945
|
+
* Filters the provided options using a blacklist to ensure
|
|
4946
|
+
* only pass-through parameters are processed for the Ajax request.
|
|
4868
4947
|
*
|
|
4869
|
-
* Note this is
|
|
4870
|
-
*
|
|
4871
|
-
*
|
|
4872
|
-
* it breaks any legacy code
|
|
4948
|
+
* Note that this issue is leftover from a previous implementation.
|
|
4949
|
+
* The specification-conforming behavior is to use parameters for pass-through values.
|
|
4950
|
+
* This will be addressed soon, after confirming that removal won't break any legacy code.
|
|
4873
4951
|
*
|
|
4874
|
-
* @param {Context} mappedOpts
|
|
4952
|
+
* @param {Context} mappedOpts - The options to be filtered.
|
|
4875
4953
|
*/
|
|
4876
4954
|
function extractLegacyParams(mappedOpts) {
|
|
4877
4955
|
//we now can use the full code reduction given by our stream api
|
|
@@ -4881,8 +4959,9 @@ var Implementation;
|
|
|
4881
4959
|
.reduce(collectAssoc, {});
|
|
4882
4960
|
}
|
|
4883
4961
|
/**
|
|
4884
|
-
*
|
|
4885
|
-
*
|
|
4962
|
+
* Extracts the MyFaces configuration parameters
|
|
4963
|
+
* that augment JSF with additional functionality.
|
|
4964
|
+
*
|
|
4886
4965
|
* @param mappedOpts
|
|
4887
4966
|
* @private
|
|
4888
4967
|
*/
|
|
@@ -4928,7 +5007,7 @@ var Implementation;
|
|
|
4928
5007
|
return new Function("event", sourceCode).call(source, event) !== false;
|
|
4929
5008
|
}
|
|
4930
5009
|
}
|
|
4931
|
-
})(Implementation
|
|
5010
|
+
})(Implementation || (exports.Implementation = Implementation = {}));
|
|
4932
5011
|
|
|
4933
5012
|
|
|
4934
5013
|
/***/ }),
|
|
@@ -5075,14 +5154,14 @@ var PushImpl;
|
|
|
5075
5154
|
this.reconnectAttempts = 0;
|
|
5076
5155
|
}
|
|
5077
5156
|
onerror(event) {
|
|
5078
|
-
var _a, _b;
|
|
5079
|
-
let message = JSON.parse(event.data);
|
|
5157
|
+
var _a, _b, _c;
|
|
5158
|
+
let message = JSON.parse((_a = event === null || event === void 0 ? void 0 : event.data) !== null && _a !== void 0 ? _a : null);
|
|
5080
5159
|
//TODO replace this with a more readable Stream code
|
|
5081
5160
|
for (let i = PushImpl.clientIdsByTokens[this.channelToken].length - 1; i >= 0; i--) {
|
|
5082
5161
|
let socketClientId = PushImpl.clientIdsByTokens[this.channelToken][i];
|
|
5083
5162
|
if (document.getElementById(socketClientId)) {
|
|
5084
5163
|
try {
|
|
5085
|
-
(
|
|
5164
|
+
(_c = (_b = PushImpl.components[socketClientId]) === null || _b === void 0 ? void 0 : _b['onerror']) === null || _c === void 0 ? void 0 : _c.call(_b, message, this.channel, event);
|
|
5086
5165
|
}
|
|
5087
5166
|
catch (e) {
|
|
5088
5167
|
//Ignore
|
|
@@ -5196,7 +5275,7 @@ var PushImpl;
|
|
|
5196
5275
|
}) {
|
|
5197
5276
|
return ((typeof fn !== "function") && (fn = mona_dish_1.DQ.global()[fn]), fn);
|
|
5198
5277
|
}
|
|
5199
|
-
})(PushImpl
|
|
5278
|
+
})(PushImpl || (exports.PushImpl = PushImpl = {}));
|
|
5200
5279
|
|
|
5201
5280
|
|
|
5202
5281
|
/***/ }),
|
|
@@ -5653,7 +5732,7 @@ var Assertions;
|
|
|
5653
5732
|
}
|
|
5654
5733
|
}
|
|
5655
5734
|
Assertions.assertDelay = assertDelay;
|
|
5656
|
-
})(Assertions
|
|
5735
|
+
})(Assertions || (exports.Assertions = Assertions = {}));
|
|
5657
5736
|
|
|
5658
5737
|
|
|
5659
5738
|
/***/ }),
|
|
@@ -6099,14 +6178,15 @@ exports.encodeFormData = encodeFormData;
|
|
|
6099
6178
|
*/
|
|
6100
6179
|
function decodeEncodedValues(encoded) {
|
|
6101
6180
|
const filterBlanks = item => !!(item || '').replace(/\s+/g, '');
|
|
6102
|
-
const splitKeyValuePair =
|
|
6181
|
+
const splitKeyValuePair = _line => {
|
|
6182
|
+
let line = decodeURIComponent(_line);
|
|
6103
6183
|
let index = line.indexOf("=");
|
|
6104
6184
|
if (index == -1) {
|
|
6105
6185
|
return [line];
|
|
6106
6186
|
}
|
|
6107
6187
|
return [line.substring(0, index), line.substring(index + 1)];
|
|
6108
6188
|
};
|
|
6109
|
-
let requestParamEntries =
|
|
6189
|
+
let requestParamEntries = encoded.split(/&/gi);
|
|
6110
6190
|
return requestParamEntries.filter(filterBlanks).map(splitKeyValuePair);
|
|
6111
6191
|
}
|
|
6112
6192
|
exports.decodeEncodedValues = decodeEncodedValues;
|
|
@@ -6220,7 +6300,7 @@ class HiddenInputBuilder {
|
|
|
6220
6300
|
const SEP = (0, Const_1.$faces)().separatorchar;
|
|
6221
6301
|
let existingStates = (0, mona_dish_1.DQ$)(`[name*='${(0, Const_1.$nsp)(this.name)}']`);
|
|
6222
6302
|
let cnt = existingStates.asArray.map(state => {
|
|
6223
|
-
let ident = state.id.orElse("
|
|
6303
|
+
let ident = state.id.orElse("0").value;
|
|
6224
6304
|
ident = ident.substring(ident.lastIndexOf(SEP) + 1);
|
|
6225
6305
|
return parseInt(ident);
|
|
6226
6306
|
})
|
|
@@ -6229,7 +6309,7 @@ class HiddenInputBuilder {
|
|
|
6229
6309
|
})
|
|
6230
6310
|
.reduce((item1, item2) => {
|
|
6231
6311
|
return Math.max(item1, item2);
|
|
6232
|
-
},
|
|
6312
|
+
}, 0); //we start with 1 (see cnt++)
|
|
6233
6313
|
//the maximum new ident is the current max + 1
|
|
6234
6314
|
cnt++;
|
|
6235
6315
|
const newElement = mona_dish_1.DQ.fromMarkup((0, Const_1.$nsp)(this.template));
|
|
@@ -6515,7 +6595,7 @@ var ExtLang;
|
|
|
6515
6595
|
throw makeException(new Error(), null, null, "Impl", "getForm", getMessage("ERR_FORM"));
|
|
6516
6596
|
}
|
|
6517
6597
|
}
|
|
6518
|
-
})(ExtLang
|
|
6598
|
+
})(ExtLang || (exports.ExtLang = ExtLang = {}));
|
|
6519
6599
|
|
|
6520
6600
|
|
|
6521
6601
|
/***/ }),
|
|
@@ -6655,7 +6735,7 @@ var ErrorType;
|
|
|
6655
6735
|
ErrorType["HTTP_ERROR"] = "httpError";
|
|
6656
6736
|
ErrorType["CLIENT_ERROR"] = "clientErrror";
|
|
6657
6737
|
ErrorType["TIMEOUT"] = "timeout";
|
|
6658
|
-
})(ErrorType
|
|
6738
|
+
})(ErrorType || (exports.ErrorType = ErrorType = {}));
|
|
6659
6739
|
/**
|
|
6660
6740
|
* the spec has a problem of having the error
|
|
6661
6741
|
* object somewhat underspecified, there is no clear
|
|
@@ -7265,7 +7345,7 @@ var Response;
|
|
|
7265
7345
|
break;
|
|
7266
7346
|
}
|
|
7267
7347
|
}
|
|
7268
|
-
})(Response
|
|
7348
|
+
})(Response || (exports.Response = Response = {}));
|
|
7269
7349
|
|
|
7270
7350
|
|
|
7271
7351
|
/***/ }),
|
|
@@ -8033,13 +8113,7 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8033
8113
|
this.requestContext.$nspEnabled = true;
|
|
8034
8114
|
requestPassThroughParams.$nspEnabled = true;
|
|
8035
8115
|
}
|
|
8036
|
-
|
|
8037
|
-
if (issuingItemId) {
|
|
8038
|
-
const issuingItem = mona_dish_1.DQ.byId(issuingItemId);
|
|
8039
|
-
const arr = new ExtDomQuery_1.ExtConfig({});
|
|
8040
|
-
arr.assign(issuingItemId).value = issuingItem.val;
|
|
8041
|
-
formData.shallowMerge(arr, true, true);
|
|
8042
|
-
}
|
|
8116
|
+
this.appendIssuingItem(formData);
|
|
8043
8117
|
this.responseContext = requestPassThroughParams.deepCopy;
|
|
8044
8118
|
// we have to shift the internal passthroughs around to build up our response context
|
|
8045
8119
|
const responseContext = this.responseContext;
|
|
@@ -8267,8 +8341,32 @@ class XhrRequest extends AsyncRunnable_1.AsyncRunnable {
|
|
|
8267
8341
|
const eventHandler = (0, RequestDataResolver_1.resolveHandlerFunc)(this.requestContext, this.responseContext, Const_1.ON_ERROR);
|
|
8268
8342
|
AjaxImpl_1.Implementation.sendError(errorData, eventHandler);
|
|
8269
8343
|
}
|
|
8344
|
+
appendIssuingItem(formData) {
|
|
8345
|
+
const issuingItemId = this.internalContext.getIf(Const_1.CTX_PARAM_SRC_CTL_ID).value;
|
|
8346
|
+
//not encoded
|
|
8347
|
+
if (issuingItemId && formData.getIf(issuingItemId).isAbsent()) {
|
|
8348
|
+
const issuingItem = mona_dish_1.DQ.byId(issuingItemId);
|
|
8349
|
+
const itemValue = issuingItem.inputValue;
|
|
8350
|
+
const arr = new ExtDomQuery_1.ExtConfig({});
|
|
8351
|
+
const type = issuingItem.type.orElse("").value.toLowerCase();
|
|
8352
|
+
//Checkbox and radio only value pass if checked is set, otherwise they should not show
|
|
8353
|
+
//up at all, and if checked is set, they either can have a value or simply being boolean
|
|
8354
|
+
if ((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO) && !issuingItem.checked) {
|
|
8355
|
+
return;
|
|
8356
|
+
}
|
|
8357
|
+
else if ((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO)) {
|
|
8358
|
+
arr.assign(issuingItemId).value = itemValue.orElse(true).value;
|
|
8359
|
+
}
|
|
8360
|
+
else if (itemValue.isPresent()) {
|
|
8361
|
+
arr.assign(issuingItemId).value = itemValue.value;
|
|
8362
|
+
}
|
|
8363
|
+
formData.shallowMerge(arr, true, true);
|
|
8364
|
+
}
|
|
8365
|
+
}
|
|
8270
8366
|
}
|
|
8271
8367
|
exports.XhrRequest = XhrRequest;
|
|
8368
|
+
XhrRequest.TYPE_CHECKBOX = "checkbox";
|
|
8369
|
+
XhrRequest.TYPE_RADIO = "radio";
|
|
8272
8370
|
|
|
8273
8371
|
|
|
8274
8372
|
/***/ }),
|
|
@@ -8405,7 +8503,7 @@ var oam;
|
|
|
8405
8503
|
});
|
|
8406
8504
|
return false;
|
|
8407
8505
|
};
|
|
8408
|
-
})(oam
|
|
8506
|
+
})(oam || (exports.oam = oam = {}));
|
|
8409
8507
|
|
|
8410
8508
|
|
|
8411
8509
|
/***/ })
|