jsf.js_next_gen 4.0.0-RC.31 → 4.0.0-RC.32
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/window/faces-development.js +66 -58
- package/dist/window/faces-development.js.br +0 -0
- package/dist/window/faces-development.js.gz +0 -0
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.br +0 -0
- package/dist/window/faces.js.gz +0 -0
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +66 -58
- package/dist/window/jsf-development.js.br +0 -0
- package/dist/window/jsf-development.js.gz +0 -0
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/dist/window/jsf.js.map +1 -1
- package/package.json +1 -1
- package/src/main/typescript/impl/util/FileUtils.ts +45 -18
- package/src/main/typescript/impl/xhrCore/XhrFormData.ts +37 -54
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +3 -7
- package/target/impl/util/FileUtils.js +35 -12
- package/target/impl/util/FileUtils.js.map +1 -1
- package/target/impl/xhrCore/XhrFormData.js +31 -46
- package/target/impl/xhrCore/XhrFormData.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {ArrayCollector, Config, DQ, LazyStream, Stream} from "mona-dish";
|
|
1
|
+
import {ArrayCollector, Config, DomQuery, DQ, LazyStream, Stream} from "mona-dish";
|
|
2
2
|
import {ExtConfig, ExtDomQuery} from "./ExtDomQuery";
|
|
3
|
-
import {EMPTY_STR} from "../core/Const";
|
|
3
|
+
import {$faces, EMPTY_STR} from "../core/Const";
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* various routines for encoding and decoding url parameters
|
|
@@ -20,13 +20,19 @@ export function encodeFormData(formData: Config,
|
|
|
20
20
|
if (formData.isAbsent()) {
|
|
21
21
|
return defaultStr;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
const assocValues = formData.value;
|
|
24
|
+
|
|
25
|
+
const expandValueArrAndRename = key => Stream.of(...assocValues[key]).map(val => paramsMapper(key, val));
|
|
26
|
+
const isPropertyKey = key => assocValues.hasOwnProperty(key);
|
|
27
|
+
const isNotFile = ([, value]) => !(value instanceof ExtDomQuery.global().File);
|
|
28
|
+
const mapIntoUrlParam = keyVal => `${encodeURIComponent(keyVal[0])}=${encodeURIComponent(keyVal[1])}`;
|
|
29
|
+
|
|
30
|
+
const entries = LazyStream.of(...Object.keys(assocValues))
|
|
31
|
+
.filter(isPropertyKey)
|
|
32
|
+
.flatMap(expandValueArrAndRename)
|
|
27
33
|
//we cannot encode file elements that is handled by multipart requests anyway
|
|
28
|
-
.filter(
|
|
29
|
-
.map(
|
|
34
|
+
.filter(isNotFile)
|
|
35
|
+
.map(mapIntoUrlParam)
|
|
30
36
|
.collect(new ArrayCollector());
|
|
31
37
|
|
|
32
38
|
return entries.join("&")
|
|
@@ -37,16 +43,19 @@ export function encodeFormData(formData: Config,
|
|
|
37
43
|
* @param encoded encoded string
|
|
38
44
|
*/
|
|
39
45
|
export function decodeEncodedValues(encoded: string): Stream<string[]> {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
const filterBlanks = item => !!(item || '').replace(/\s+/g, '');
|
|
47
|
+
const splitKeyValuePair = line => {
|
|
48
|
+
let index = line.indexOf("=");
|
|
49
|
+
if (index == -1) {
|
|
50
|
+
return [line];
|
|
51
|
+
}
|
|
52
|
+
return [line.substring(0, index), line.substring(index + 1)];
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
let requestParamEntries = decodeURIComponent(encoded).split(/&/gi);
|
|
56
|
+
return Stream.of(...requestParamEntries)
|
|
57
|
+
.filter(filterBlanks)
|
|
58
|
+
.map(splitKeyValuePair)
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
|
|
@@ -63,4 +72,22 @@ export function resolveFiles(dataSource: DQ): Stream<[string, File]> {
|
|
|
63
72
|
|
|
64
73
|
export function fixKeyWithoutVal(keyVal: any[]) {
|
|
65
74
|
return keyVal.length < 3 ? [keyVal?.[0] ?? [], keyVal?.[1] ?? []] : keyVal;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* gets all the inputs under the form parentItem
|
|
79
|
+
* as stream
|
|
80
|
+
* @param parentItem
|
|
81
|
+
*/
|
|
82
|
+
export function getFormInputsAsStream(parentItem: DomQuery): Stream<string[] | [string, File]> {
|
|
83
|
+
//encoded String
|
|
84
|
+
const viewStateStr = $faces().getViewState(parentItem.getAsElem(0).value);
|
|
85
|
+
|
|
86
|
+
// we now need to decode it and then merge it into the target buf
|
|
87
|
+
// which hosts already our overrides (aka do not override what is already there(
|
|
88
|
+
// after that we need to deal with form elements on a separate level
|
|
89
|
+
const standardInputs: Stream<string[] | [string, File]> = decodeEncodedValues(viewStateStr);
|
|
90
|
+
const fileInputs = resolveFiles(parentItem);
|
|
91
|
+
const allInputs = standardInputs.concat(fileInputs as any)
|
|
92
|
+
return allInputs;
|
|
66
93
|
}
|
|
@@ -20,13 +20,15 @@ import {
|
|
|
20
20
|
decodeEncodedValues,
|
|
21
21
|
encodeFormData,
|
|
22
22
|
resolveFiles,
|
|
23
|
-
fixKeyWithoutVal
|
|
23
|
+
fixKeyWithoutVal, getFormInputsAsStream
|
|
24
24
|
} from "../util/FileUtils";
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
type ParamsMapper<V, K> = (key: V, item: K) => [V, K];
|
|
28
28
|
const defaultParamsMapper: ParamsMapper<string, any> = (key, item) => [key, item];
|
|
29
29
|
|
|
30
|
+
|
|
31
|
+
|
|
30
32
|
/**
|
|
31
33
|
* A unified form data class
|
|
32
34
|
* which builds upon our configuration.
|
|
@@ -35,9 +37,6 @@ const defaultParamsMapper: ParamsMapper<string, any> = (key, item) => [key, item
|
|
|
35
37
|
* due to api constraints on the HTML Form object in IE11
|
|
36
38
|
* and due to the url encoding constraint given by the faces.js spec
|
|
37
39
|
*
|
|
38
|
-
* probably only one needed and one overlay!
|
|
39
|
-
* the entire file input storing probably is redundant now
|
|
40
|
-
* that dom query has been fixed
|
|
41
40
|
*
|
|
42
41
|
* internal storage format
|
|
43
42
|
* every value is stored as an array
|
|
@@ -75,44 +74,15 @@ export class XhrFormData extends Config {
|
|
|
75
74
|
this.applyViewState(this.dataSource);
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
/**
|
|
79
|
-
* generic post init code, for now, this performs some post assign data post-processing
|
|
80
|
-
* @param executes the executable dom nodes which need to be processed into the form data, which we can send
|
|
81
|
-
* in our ajax request
|
|
82
|
-
*/
|
|
83
|
-
resolveRequestType(rootElement: DQ, executes?: Array<string>) {
|
|
84
|
-
if (!executes || executes.indexOf(IDENT_NONE) != -1) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
this.isMultipartRequest = rootElement.isMultipartCandidate(true);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* special case view state handling
|
|
92
|
-
*
|
|
93
|
-
* @param form the form holding the view state value
|
|
94
|
-
*/
|
|
95
|
-
private applyViewState(form: DQ) {
|
|
96
|
-
if (this.getIf($nsp(P_VIEWSTATE)).isPresent()) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
let viewStateElement = form.querySelectorAllDeep(`[name*='${$nsp(P_VIEWSTATE)}'`);
|
|
100
|
-
let viewState = viewStateElement.inputValue;
|
|
101
|
-
this.appendIf(viewState.isPresent(), this.remapKeyForNamingContainer(viewStateElement.name.value)).value = viewState.value;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
77
|
/**
|
|
106
78
|
* @returns a Form data representation, this is needed for file submits
|
|
107
79
|
*/
|
|
108
80
|
toFormData(): FormData {
|
|
109
|
-
let ret: any = new FormData();
|
|
110
|
-
|
|
111
81
|
/*
|
|
112
82
|
* expands key: [item1, item2]
|
|
113
83
|
* to: [{key: item1}, {key, item2}]
|
|
114
84
|
*/
|
|
115
|
-
let
|
|
85
|
+
let expandAssocArray = ([key, item]) =>
|
|
116
86
|
Stream.of(...(item as Array<any>)).map(item => {
|
|
117
87
|
return {key, item};
|
|
118
88
|
});
|
|
@@ -129,12 +99,13 @@ export class XhrFormData extends Config {
|
|
|
129
99
|
/*
|
|
130
100
|
* collects everything into a FormData object
|
|
131
101
|
*/
|
|
102
|
+
let ret: any = new FormData();
|
|
132
103
|
let collectFormData = ({key, item}) => {
|
|
133
104
|
ret.append(key, item)
|
|
134
105
|
};
|
|
135
106
|
|
|
136
107
|
Stream.ofAssoc(this.value)
|
|
137
|
-
.flatMap(
|
|
108
|
+
.flatMap(expandAssocArray)
|
|
138
109
|
.map(remapForNamingContainer)
|
|
139
110
|
.each(collectFormData)
|
|
140
111
|
return ret;
|
|
@@ -149,6 +120,31 @@ export class XhrFormData extends Config {
|
|
|
149
120
|
return encodeFormData(this, this.paramsMapper, defaultStr);
|
|
150
121
|
}
|
|
151
122
|
|
|
123
|
+
/**
|
|
124
|
+
* generic post init code, for now, this performs some post assign data post-processing
|
|
125
|
+
* @param executes the executable dom nodes which need to be processed into the form data, which we can send
|
|
126
|
+
* in our ajax request
|
|
127
|
+
*/
|
|
128
|
+
private resolveRequestType(rootElement: DQ, executes?: Array<string>) {
|
|
129
|
+
if (!executes || executes.indexOf(IDENT_NONE) != -1) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this.isMultipartRequest = rootElement.isMultipartCandidate(true);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* special case view state handling
|
|
137
|
+
*
|
|
138
|
+
* @param form the form holding the view state value
|
|
139
|
+
*/
|
|
140
|
+
private applyViewState(form: DQ) {
|
|
141
|
+
if (this.getIf($nsp(P_VIEWSTATE)).isPresent()) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
let viewStateElement = form.querySelectorAllDeep(`[name*='${$nsp(P_VIEWSTATE)}'`);
|
|
145
|
+
let viewState = viewStateElement.inputValue;
|
|
146
|
+
this.appendIf(viewState.isPresent(), this.remapKeyForNamingContainer(viewStateElement.name.value)).value = viewState.value;
|
|
147
|
+
}
|
|
152
148
|
|
|
153
149
|
/**
|
|
154
150
|
* determines fields to submit
|
|
@@ -156,26 +152,13 @@ export class XhrFormData extends Config {
|
|
|
156
152
|
* @param {Node} parentItem - form element item is nested in
|
|
157
153
|
* @param {Array} partialIds - ids fo PPS
|
|
158
154
|
*/
|
|
159
|
-
|
|
160
|
-
//encoded String
|
|
161
|
-
const viewStateStr = $faces().getViewState(parentItem.getAsElem(0).value);
|
|
162
|
-
|
|
163
|
-
// we now need to decode it and then merge it into the target buf
|
|
164
|
-
// which hosts already our overrides (aka do not override what is already there(
|
|
165
|
-
// after that we need to deal with form elements on a separate level
|
|
166
|
-
const keyValueEntries: Stream<string[] | [string, File]> = decodeEncodedValues(viewStateStr);
|
|
167
|
-
const fileEntries = resolveFiles(parentItem);
|
|
168
|
-
const concatted = keyValueEntries.concat(fileEntries as any)
|
|
169
|
-
const formData = new ExtConfig({});
|
|
170
|
-
|
|
171
|
-
concatted
|
|
172
|
-
.map(fixKeyWithoutVal)
|
|
173
|
-
.map(keyVal => this.paramsMapper(keyVal[0] as string, keyVal[1]))
|
|
174
|
-
.each((entry) => {
|
|
175
|
-
formData.append(entry[0]).value = entry[1];
|
|
176
|
-
});
|
|
155
|
+
private encodeSubmittableFields(parentItem: DQ, partialIds ?: string[]) {
|
|
177
156
|
|
|
178
|
-
|
|
157
|
+
const formInputs = getFormInputsAsStream(parentItem);
|
|
158
|
+
formInputs
|
|
159
|
+
.map(fixKeyWithoutVal)
|
|
160
|
+
.map(([key, value]) => this.paramsMapper(key as string, value))
|
|
161
|
+
.each(([key, value]) => this.append(key).value = value);
|
|
179
162
|
}
|
|
180
163
|
|
|
181
164
|
private remapKeyForNamingContainer(key: string): string {
|
|
@@ -23,7 +23,7 @@ import {ErrorData} from "./ErrorData";
|
|
|
23
23
|
import {EventData} from "./EventData";
|
|
24
24
|
import {ExtLang} from "../util/Lang";
|
|
25
25
|
import {
|
|
26
|
-
$faces,
|
|
26
|
+
$faces,
|
|
27
27
|
BEGIN,
|
|
28
28
|
COMPLETE,
|
|
29
29
|
CONTENT_TYPE,
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
CTX_PARAM_REQ_PASS_THR,
|
|
32
32
|
ERROR,
|
|
33
33
|
HEAD_FACES_REQ,
|
|
34
|
-
MALFORMEDXML,
|
|
34
|
+
MALFORMEDXML,
|
|
35
35
|
NO_TIMEOUT,
|
|
36
36
|
ON_ERROR,
|
|
37
|
-
ON_EVENT, P_EXECUTE,
|
|
37
|
+
ON_EVENT, P_EXECUTE,
|
|
38
38
|
REQ_ACCEPT,
|
|
39
39
|
REQ_TYPE_GET,
|
|
40
40
|
REQ_TYPE_POST, SOURCE,
|
|
@@ -46,12 +46,10 @@ import {
|
|
|
46
46
|
import {
|
|
47
47
|
resolveFinalUrl,
|
|
48
48
|
resolveHandlerFunc,
|
|
49
|
-
resolveViewRootId,
|
|
50
49
|
resoveNamingContainerMapper
|
|
51
50
|
} from "./RequestDataResolver";
|
|
52
51
|
import failSaveExecute = ExtLang.failSaveExecute;
|
|
53
52
|
import {ExtConfig} from "../util/ExtDomQuery";
|
|
54
|
-
import {ResponseProcessor} from "./ResponseProcessor";
|
|
55
53
|
|
|
56
54
|
/**
|
|
57
55
|
* Faces XHR Request Wrapper
|
|
@@ -378,6 +376,4 @@ export class XhrRequest implements AsyncRunnable<XMLHttpRequest> {
|
|
|
378
376
|
let eventHandler = resolveHandlerFunc(this.requestContext, this.responseContext, ON_ERROR);
|
|
379
377
|
Implementation.sendError(errorData, eventHandler);
|
|
380
378
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
379
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fixKeyWithoutVal = exports.resolveFiles = exports.decodeEncodedValues = exports.encodeFormData = void 0;
|
|
3
|
+
exports.getFormInputsAsStream = exports.fixKeyWithoutVal = exports.resolveFiles = exports.decodeEncodedValues = exports.encodeFormData = void 0;
|
|
4
4
|
const mona_dish_1 = require("mona-dish");
|
|
5
5
|
const ExtDomQuery_1 = require("./ExtDomQuery");
|
|
6
6
|
const Const_1 = require("../core/Const");
|
|
@@ -18,13 +18,17 @@ function encodeFormData(formData, paramsMapper = (inStr, inVal) => [inStr, inVal
|
|
|
18
18
|
if (formData.isAbsent()) {
|
|
19
19
|
return defaultStr;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const assocValues = formData.value;
|
|
22
|
+
const expandValueArrAndRename = key => mona_dish_1.Stream.of(...assocValues[key]).map(val => paramsMapper(key, val));
|
|
23
|
+
const isPropertyKey = key => assocValues.hasOwnProperty(key);
|
|
24
|
+
const isNotFile = ([, value]) => !(value instanceof ExtDomQuery_1.ExtDomQuery.global().File);
|
|
25
|
+
const mapIntoUrlParam = keyVal => `${encodeURIComponent(keyVal[0])}=${encodeURIComponent(keyVal[1])}`;
|
|
26
|
+
const entries = mona_dish_1.LazyStream.of(...Object.keys(assocValues))
|
|
27
|
+
.filter(isPropertyKey)
|
|
28
|
+
.flatMap(expandValueArrAndRename)
|
|
25
29
|
//we cannot encode file elements that is handled by multipart requests anyway
|
|
26
|
-
.filter(
|
|
27
|
-
.map(
|
|
30
|
+
.filter(isNotFile)
|
|
31
|
+
.map(mapIntoUrlParam)
|
|
28
32
|
.collect(new mona_dish_1.ArrayCollector());
|
|
29
33
|
return entries.join("&");
|
|
30
34
|
}
|
|
@@ -34,16 +38,18 @@ exports.encodeFormData = encodeFormData;
|
|
|
34
38
|
* @param encoded encoded string
|
|
35
39
|
*/
|
|
36
40
|
function decodeEncodedValues(encoded) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.replace(/\s+/g, ''))
|
|
40
|
-
.map(line => {
|
|
41
|
+
const filterBlanks = item => !!(item || '').replace(/\s+/g, '');
|
|
42
|
+
const splitKeyValuePair = line => {
|
|
41
43
|
let index = line.indexOf("=");
|
|
42
44
|
if (index == -1) {
|
|
43
45
|
return [line];
|
|
44
46
|
}
|
|
45
47
|
return [line.substring(0, index), line.substring(index + 1)];
|
|
46
|
-
}
|
|
48
|
+
};
|
|
49
|
+
let requestParamEntries = decodeURIComponent(encoded).split(/&/gi);
|
|
50
|
+
return mona_dish_1.Stream.of(...requestParamEntries)
|
|
51
|
+
.filter(filterBlanks)
|
|
52
|
+
.map(splitKeyValuePair);
|
|
47
53
|
}
|
|
48
54
|
exports.decodeEncodedValues = decodeEncodedValues;
|
|
49
55
|
function resolveFiles(dataSource) {
|
|
@@ -61,4 +67,21 @@ function fixKeyWithoutVal(keyVal) {
|
|
|
61
67
|
return keyVal.length < 3 ? [(_a = keyVal === null || keyVal === void 0 ? void 0 : keyVal[0]) !== null && _a !== void 0 ? _a : [], (_b = keyVal === null || keyVal === void 0 ? void 0 : keyVal[1]) !== null && _b !== void 0 ? _b : []] : keyVal;
|
|
62
68
|
}
|
|
63
69
|
exports.fixKeyWithoutVal = fixKeyWithoutVal;
|
|
70
|
+
/**
|
|
71
|
+
* gets all the inputs under the form parentItem
|
|
72
|
+
* as stream
|
|
73
|
+
* @param parentItem
|
|
74
|
+
*/
|
|
75
|
+
function getFormInputsAsStream(parentItem) {
|
|
76
|
+
//encoded String
|
|
77
|
+
const viewStateStr = (0, Const_1.$faces)().getViewState(parentItem.getAsElem(0).value);
|
|
78
|
+
// we now need to decode it and then merge it into the target buf
|
|
79
|
+
// which hosts already our overrides (aka do not override what is already there(
|
|
80
|
+
// after that we need to deal with form elements on a separate level
|
|
81
|
+
const standardInputs = decodeEncodedValues(viewStateStr);
|
|
82
|
+
const fileInputs = resolveFiles(parentItem);
|
|
83
|
+
const allInputs = standardInputs.concat(fileInputs);
|
|
84
|
+
return allInputs;
|
|
85
|
+
}
|
|
86
|
+
exports.getFormInputsAsStream = getFormInputsAsStream;
|
|
64
87
|
//# sourceMappingURL=FileUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUtils.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/util/FileUtils.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"FileUtils.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/util/FileUtils.ts"],"names":[],"mappings":";;;AAAA,yCAAmF;AACnF,+CAAqD;AACrD,yCAAgD;AAEhD;;;GAGG;AAGH;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,QAAgB,EAChB,YAAY,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAC/C,UAAU,GAAG,iBAAS;IACjD,IAAI,QAAQ,CAAC,QAAQ,EAAE,EAAE;QACrB,OAAO,UAAU,CAAC;KACrB;IACD,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEnC,MAAM,uBAAuB,GAAG,GAAG,CAAC,EAAE,CAAC,kBAAM,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IACzG,MAAM,aAAa,GAAG,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,YAAY,yB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IAC5F,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,UAAiB,CAAC,CAAA;IAC1D,OAAO,SAAS,CAAC;AACrB,CAAC;AAXD,sDAWC"}
|
|
@@ -18,7 +18,6 @@ exports.XhrFormData = void 0;
|
|
|
18
18
|
*/
|
|
19
19
|
const mona_dish_1 = require("mona-dish");
|
|
20
20
|
const Const_1 = require("../core/Const");
|
|
21
|
-
const ExtDomQuery_1 = require("../util/ExtDomQuery");
|
|
22
21
|
const FileUtils_1 = require("../util/FileUtils");
|
|
23
22
|
const defaultParamsMapper = (key, item) => [key, item];
|
|
24
23
|
/**
|
|
@@ -29,9 +28,6 @@ const defaultParamsMapper = (key, item) => [key, item];
|
|
|
29
28
|
* due to api constraints on the HTML Form object in IE11
|
|
30
29
|
* and due to the url encoding constraint given by the faces.js spec
|
|
31
30
|
*
|
|
32
|
-
* probably only one needed and one overlay!
|
|
33
|
-
* the entire file input storing probably is redundant now
|
|
34
|
-
* that dom query has been fixed
|
|
35
31
|
*
|
|
36
32
|
* internal storage format
|
|
37
33
|
* every value is stored as an array
|
|
@@ -70,40 +66,15 @@ class XhrFormData extends mona_dish_1.Config {
|
|
|
70
66
|
this.encodeSubmittableFields(this.dataSource, this.partialIds);
|
|
71
67
|
this.applyViewState(this.dataSource);
|
|
72
68
|
}
|
|
73
|
-
/**
|
|
74
|
-
* generic post init code, for now, this performs some post assign data post-processing
|
|
75
|
-
* @param executes the executable dom nodes which need to be processed into the form data, which we can send
|
|
76
|
-
* in our ajax request
|
|
77
|
-
*/
|
|
78
|
-
resolveRequestType(rootElement, executes) {
|
|
79
|
-
if (!executes || executes.indexOf(Const_1.IDENT_NONE) != -1) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
this.isMultipartRequest = rootElement.isMultipartCandidate(true);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* special case view state handling
|
|
86
|
-
*
|
|
87
|
-
* @param form the form holding the view state value
|
|
88
|
-
*/
|
|
89
|
-
applyViewState(form) {
|
|
90
|
-
if (this.getIf((0, Const_1.$nsp)(Const_1.P_VIEWSTATE)).isPresent()) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
let viewStateElement = form.querySelectorAllDeep(`[name*='${(0, Const_1.$nsp)(Const_1.P_VIEWSTATE)}'`);
|
|
94
|
-
let viewState = viewStateElement.inputValue;
|
|
95
|
-
this.appendIf(viewState.isPresent(), this.remapKeyForNamingContainer(viewStateElement.name.value)).value = viewState.value;
|
|
96
|
-
}
|
|
97
69
|
/**
|
|
98
70
|
* @returns a Form data representation, this is needed for file submits
|
|
99
71
|
*/
|
|
100
72
|
toFormData() {
|
|
101
|
-
let ret = new FormData();
|
|
102
73
|
/*
|
|
103
74
|
* expands key: [item1, item2]
|
|
104
75
|
* to: [{key: item1}, {key, item2}]
|
|
105
76
|
*/
|
|
106
|
-
let
|
|
77
|
+
let expandAssocArray = ([key, item]) => mona_dish_1.Stream.of(...item).map(item => {
|
|
107
78
|
return { key, item };
|
|
108
79
|
});
|
|
109
80
|
/*
|
|
@@ -117,11 +88,12 @@ class XhrFormData extends mona_dish_1.Config {
|
|
|
117
88
|
/*
|
|
118
89
|
* collects everything into a FormData object
|
|
119
90
|
*/
|
|
91
|
+
let ret = new FormData();
|
|
120
92
|
let collectFormData = ({ key, item }) => {
|
|
121
93
|
ret.append(key, item);
|
|
122
94
|
};
|
|
123
95
|
mona_dish_1.Stream.ofAssoc(this.value)
|
|
124
|
-
.flatMap(
|
|
96
|
+
.flatMap(expandAssocArray)
|
|
125
97
|
.map(remapForNamingContainer)
|
|
126
98
|
.each(collectFormData);
|
|
127
99
|
return ret;
|
|
@@ -134,6 +106,30 @@ class XhrFormData extends mona_dish_1.Config {
|
|
|
134
106
|
toString(defaultStr = Const_1.EMPTY_STR) {
|
|
135
107
|
return (0, FileUtils_1.encodeFormData)(this, this.paramsMapper, defaultStr);
|
|
136
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* generic post init code, for now, this performs some post assign data post-processing
|
|
111
|
+
* @param executes the executable dom nodes which need to be processed into the form data, which we can send
|
|
112
|
+
* in our ajax request
|
|
113
|
+
*/
|
|
114
|
+
resolveRequestType(rootElement, executes) {
|
|
115
|
+
if (!executes || executes.indexOf(Const_1.IDENT_NONE) != -1) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
this.isMultipartRequest = rootElement.isMultipartCandidate(true);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* special case view state handling
|
|
122
|
+
*
|
|
123
|
+
* @param form the form holding the view state value
|
|
124
|
+
*/
|
|
125
|
+
applyViewState(form) {
|
|
126
|
+
if (this.getIf((0, Const_1.$nsp)(Const_1.P_VIEWSTATE)).isPresent()) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
let viewStateElement = form.querySelectorAllDeep(`[name*='${(0, Const_1.$nsp)(Const_1.P_VIEWSTATE)}'`);
|
|
130
|
+
let viewState = viewStateElement.inputValue;
|
|
131
|
+
this.appendIf(viewState.isPresent(), this.remapKeyForNamingContainer(viewStateElement.name.value)).value = viewState.value;
|
|
132
|
+
}
|
|
137
133
|
/**
|
|
138
134
|
* determines fields to submit
|
|
139
135
|
* @param {Object} targetBuf - the target form buffer receiving the data
|
|
@@ -141,22 +137,11 @@ class XhrFormData extends mona_dish_1.Config {
|
|
|
141
137
|
* @param {Array} partialIds - ids fo PPS
|
|
142
138
|
*/
|
|
143
139
|
encodeSubmittableFields(parentItem, partialIds) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
// we now need to decode it and then merge it into the target buf
|
|
147
|
-
// which hosts already our overrides (aka do not override what is already there(
|
|
148
|
-
// after that we need to deal with form elements on a separate level
|
|
149
|
-
const keyValueEntries = (0, FileUtils_1.decodeEncodedValues)(viewStateStr);
|
|
150
|
-
const fileEntries = (0, FileUtils_1.resolveFiles)(parentItem);
|
|
151
|
-
const concatted = keyValueEntries.concat(fileEntries);
|
|
152
|
-
const formData = new ExtDomQuery_1.ExtConfig({});
|
|
153
|
-
concatted
|
|
140
|
+
const formInputs = (0, FileUtils_1.getFormInputsAsStream)(parentItem);
|
|
141
|
+
formInputs
|
|
154
142
|
.map(FileUtils_1.fixKeyWithoutVal)
|
|
155
|
-
.map(
|
|
156
|
-
.each((
|
|
157
|
-
formData.append(entry[0]).value = entry[1];
|
|
158
|
-
});
|
|
159
|
-
this.shallowMerge(formData, true, true);
|
|
143
|
+
.map(([key, value]) => this.paramsMapper(key, value))
|
|
144
|
+
.each(([key, value]) => this.append(key).value = value);
|
|
160
145
|
}
|
|
161
146
|
remapKeyForNamingContainer(key) {
|
|
162
147
|
return this.paramsMapper(key, "")[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XhrFormData.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/XhrFormData.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCAA6D;AAC7D,yCAAsG;
|
|
1
|
+
{"version":3,"file":"XhrFormData.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/XhrFormData.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCAA6D;AAC7D,yCAAsG;AAEtG,iDAK2B;AAI3B,MAAM,mBAAmB,GAA8B,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAIlF;;;;;;;;;;;;GAYG;AACH,MAAa,WAAY,SAAQ,kBAAM;IAUnC;;;;;;;OAOG;IACH,YAAoB,UAAc,EAAU,eAA0C,mBAAmB,EAAE,QAAmB,EAAU,UAAqB;QACzJ,KAAK,CAAC,EAAE,CAAC,CAAC;QADM,eAAU,GAAV,UAAU,CAAI;QAAU,iBAAY,GAAZ,YAAY,CAAiD;QAA+B,eAAU,GAAV,UAAU,CAAW;QAjB7J;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,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;IAChE,CAAC;IAEO,0BAA0B,CAAC,GAAW;QAC1C,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;CACJ;AA1HD,kCA0HC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XhrRequest.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/XhrRequest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,yCAAkD;AAClD,0CAA2C;AAE3C,+CAA0C;AAC1C,2CAAsC;AACtC,2CAAsC;AACtC,uCAAqC;AACrC,yCAoBuB;AACvB,+
|
|
1
|
+
{"version":3,"file":"XhrRequest.js","sourceRoot":"","sources":["../../../src/main/typescript/impl/xhrCore/XhrRequest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,yCAAkD;AAClD,0CAA2C;AAE3C,+CAA0C;AAC1C,2CAAsC;AACtC,2CAAsC;AACtC,uCAAqC;AACrC,yCAoBuB;AACvB,+DAI+B;AAC/B,IAAO,eAAe,GAAG,cAAO,CAAC,eAAe,CAAC;AAGjD;;;;;;;;;GASG;AAEH,MAAa,UAAU;IAYnB;;;;;;;;;;;;;;;OAeG;IACH,YACY,MAAU,EACV,UAAc,EACd,cAAyB,EACzB,eAAuB,EACvB,kBAAkB,EAAE,EACpB,UAAU,kBAAU,EACpB,WAAW,qBAAa,EACxB,cAAc,mBAAW,EACzB,YAAY,IAAI,cAAc,EAAE;QARhC,WAAM,GAAN,MAAM,CAAI;QACV,eAAU,GAAV,UAAU,CAAI;QACd,mBAAc,GAAd,cAAc,CAAW;QACzB,oBAAe,GAAf,eAAe,CAAQ;QACvB,oBAAe,GAAf,eAAe,CAAK;QACpB,YAAO,GAAP,OAAO,CAAa;QACpB,aAAQ,G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