Merge branch 'func/xpath_tooltips'
This commit is contained in:
548
Frontend/src/assets/tooltips/xpath/xpath1.json
Normal file
548
Frontend/src/assets/tooltips/xpath/xpath1.json
Normal file
@@ -0,0 +1,548 @@
|
||||
[
|
||||
{
|
||||
"name": "Node-Set",
|
||||
"entries": [
|
||||
{
|
||||
"name": "position()",
|
||||
"description": "Returns the position of the current context node.",
|
||||
"arguments": [],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "position()",
|
||||
"output": "3"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions"
|
||||
},
|
||||
{
|
||||
"name": "last()",
|
||||
"description": "The position function returns a number equal to the context position from the expression evaluation context.",
|
||||
"arguments": [],
|
||||
"output": "number",
|
||||
"examples": [],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions"
|
||||
},
|
||||
{
|
||||
"name": "count()",
|
||||
"description": "Returns the number of nodes in the node-set",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "node-set",
|
||||
"description": "Node-set to count nodes in"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "count(/u:root/u:UserList/u:User)",
|
||||
"output": "10"
|
||||
},
|
||||
{
|
||||
"command": "count(/u:root/u:UserList[@Id = 'b']/u:User)",
|
||||
"output": "1"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions"
|
||||
},
|
||||
{
|
||||
"name": "id()",
|
||||
"description": "Returns the element specified by it's unique id, requires DTD",
|
||||
"arguments": [],
|
||||
"output": "node-set",
|
||||
"examples": [],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions"
|
||||
},
|
||||
{
|
||||
"name": "local-name()",
|
||||
"description": "Returns the number of nodes in the node-set",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "node-set",
|
||||
"description": "Extract first node and return its local name"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "local-name(/u:root)",
|
||||
"output": "root"
|
||||
},
|
||||
{
|
||||
"command": "local-name(/u:root/u:UserList)",
|
||||
"output": "UserList"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions"
|
||||
},
|
||||
{
|
||||
"name": "namespace-uri()",
|
||||
"description": "Returns the namespace-uri for the first node in the node-set",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "node-set",
|
||||
"description": "Extract first node and return the namespace URI"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "namespace-uri(/u:root)",
|
||||
"output": "http://www.release11.com/schemas/Sample.xsd"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions"
|
||||
},
|
||||
{
|
||||
"name": "name()",
|
||||
"description": "Returns the number of nodes in the node-set",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "node-set? (Optional)",
|
||||
"description": "Extract first node and return QName"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "name(/u:root)",
|
||||
"output": "u:root"
|
||||
},
|
||||
{
|
||||
"command": "name(/u:root/u:UserList)",
|
||||
"output": "u:UserList"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions"
|
||||
},
|
||||
{
|
||||
"name": "lang()",
|
||||
"description": "The lang function returns true or false depending on whether the language of the context node as specified by xml:lang attributes is the same as or is a sublanguage of the language specified by the argument string.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Language that will be looked for in context node"
|
||||
}
|
||||
],
|
||||
"output": "boolean",
|
||||
"examples": [],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Boolean",
|
||||
"entries": [
|
||||
{
|
||||
"name": "boolean()",
|
||||
"description": "The boolean function converts its argument to a boolean",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "object",
|
||||
"description": "The object to convert to a boolean"
|
||||
}
|
||||
],
|
||||
"output": "boolean",
|
||||
"examples": [
|
||||
{
|
||||
"command": "boolean('Release11')",
|
||||
"output": "true"
|
||||
},
|
||||
{
|
||||
"command": "boolean('')",
|
||||
"output": "false"
|
||||
},
|
||||
{
|
||||
"command": "boolean(2334)",
|
||||
"output": "true"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions"
|
||||
},
|
||||
{
|
||||
"name": "not()",
|
||||
"description": "The not function returns true if its argument is false, and false otherwise.",
|
||||
"arguments": [],
|
||||
"output": "boolean",
|
||||
"examples": [
|
||||
{
|
||||
"command": "not('text')",
|
||||
"output": "false"
|
||||
},
|
||||
{
|
||||
"command": "not('')",
|
||||
"output": "true"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions"
|
||||
},
|
||||
{
|
||||
"name": "true()",
|
||||
"description": "The true function returns true.",
|
||||
"arguments": [],
|
||||
"output": "boolean",
|
||||
"examples": [
|
||||
{
|
||||
"command": "true()",
|
||||
"output": "true"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions"
|
||||
},
|
||||
{
|
||||
"name": "false()",
|
||||
"description": "The true function returns false.",
|
||||
"arguments": [],
|
||||
"output": "boolean",
|
||||
"examples": [
|
||||
{
|
||||
"command": "false()",
|
||||
"output": "false"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions"
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "String",
|
||||
"entries": [
|
||||
{
|
||||
"name": "string()",
|
||||
"description": "The string function converts an object to a string",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "object",
|
||||
"description": "The object to convert to a string"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "string(10)",
|
||||
"output": "10"
|
||||
},
|
||||
{
|
||||
"command": "string('Release11')",
|
||||
"output": "Release11"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"name": "concat()",
|
||||
"description": "The concat function returns the concatenation of its arguments.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string* (One or More)",
|
||||
"description": "Strings to concatenate"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "concat('Release', 11)",
|
||||
"output": "Release11"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
}
|
||||
,
|
||||
{
|
||||
"name": "starts-with()",
|
||||
"description": "Returns true if the first argument string starts with the second argument string, and otherwise returns false.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String to test"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String that first string has to start from"
|
||||
}
|
||||
],
|
||||
"output": "boolean",
|
||||
"examples": [
|
||||
{
|
||||
"command": "starts-with('Release11', 'Rel'))",
|
||||
"output": "true"
|
||||
},
|
||||
{
|
||||
"command": "starts-with('Release11', 'ease'))",
|
||||
"output": "false"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
}
|
||||
,
|
||||
{
|
||||
"name": "contains()",
|
||||
"description": "The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String to test"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String that first string has to contain"
|
||||
}
|
||||
],
|
||||
"output": "boolean",
|
||||
"examples": [
|
||||
{
|
||||
"command": "contains('Release11', 'eas')",
|
||||
"output": "true"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"name": "substring-before()",
|
||||
"description": "The substring-before function returns the substring of the first argument string that precedes the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String to split"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String that splits first string"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "substring-before('Release11', '11')",
|
||||
"output": "Release"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"name": "substring-after()",
|
||||
"description": "The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String to split"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String that splits first string"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "substring-after('Release11', 'le')",
|
||||
"output": "ase11"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"name": "substring()",
|
||||
"description": "The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String to split"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Starting index"
|
||||
},
|
||||
{
|
||||
"type": "number? (Optional)",
|
||||
"description": "Length of target substring"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "substring('12345',2)",
|
||||
"output": "2345"
|
||||
},
|
||||
{
|
||||
"command": "substring('12345',2,3)",
|
||||
"output": "234"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"name": "string-length()",
|
||||
"description": "The string-length returns the number of characters in the string.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string? (Optional)",
|
||||
"description": "String to test"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "string-length('abcdef')",
|
||||
"output": "6"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"name": "normalize-space(()",
|
||||
"description": "The normalize-space function returns the argument string with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters by a single space.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string? (Optional)",
|
||||
"description": "String to normalize"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "normalize-space(' abc def ')",
|
||||
"output": "abc def"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
},
|
||||
{
|
||||
"name": "translate()",
|
||||
"description": "The translate function returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string. If there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string), then occurrences of that character in the first argument string are removed.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String to process"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Characters to remove"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "String to insert characters from second argument"
|
||||
}
|
||||
],
|
||||
"output": "string",
|
||||
"examples": [
|
||||
{
|
||||
"command": "translate('bar','abc','ABC')",
|
||||
"output": "BAr"
|
||||
},
|
||||
{
|
||||
"command": "translate('--aaa--','abc-','ABC')",
|
||||
"output": "AAA"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Number",
|
||||
"entries": [
|
||||
{
|
||||
"name": "number()",
|
||||
"description": "The number function converts its argument to a number",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "object",
|
||||
"description": "The object to convert to a number"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "number(10)",
|
||||
"output": "10"
|
||||
},
|
||||
{
|
||||
"command": "number('')",
|
||||
"output": "NaN"
|
||||
}
|
||||
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions"
|
||||
},
|
||||
{
|
||||
"name": "sum()",
|
||||
"description": "The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "node-set",
|
||||
"description": "Node set to sum"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "sum(/someNode/value)",
|
||||
"output": "78"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions"
|
||||
},
|
||||
{
|
||||
"name": "floor()",
|
||||
"description": "The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Number to round"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "floor(3.1)",
|
||||
"output": "3"
|
||||
},
|
||||
{
|
||||
"command": "floor(3.9)",
|
||||
"output": "3"
|
||||
},
|
||||
{
|
||||
"command": "floor(3.5)",
|
||||
"output": "3"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions"
|
||||
},
|
||||
{
|
||||
"name": "round()",
|
||||
"description": "The round function returns the number that is closest to the argument and that is an integer. If there are two such numbers, then the one that is closest to positive infinity is returned. If the argument is NaN, then NaN is returned. If the argument is positive infinity, then positive infinity is returned. If the argument is negative infinity, then negative infinity is returned. If the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned. If the argument is less than zero, but greater than or equal to -0.5, then negative zero is returned.",
|
||||
"arguments": [
|
||||
{
|
||||
"type": "number",
|
||||
"description": "Number to round"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "round(3.1)",
|
||||
"output": "3"
|
||||
},
|
||||
{
|
||||
"command": "round(3.9)",
|
||||
"output": "4"
|
||||
},
|
||||
{
|
||||
"command": "round(3.5)",
|
||||
"output": "4"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1678
Frontend/src/assets/tooltips/xpath/xpath2.json
Normal file
1678
Frontend/src/assets/tooltips/xpath/xpath2.json
Normal file
File diff suppressed because it is too large
Load Diff
40
Frontend/src/assets/tooltips/xpath/xpath3.json
Normal file
40
Frontend/src/assets/tooltips/xpath/xpath3.json
Normal file
@@ -0,0 +1,40 @@
|
||||
[
|
||||
{
|
||||
"name": "Number",
|
||||
"entries": [
|
||||
{
|
||||
"name": "sum",
|
||||
"description": "The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number.",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "$arg",
|
||||
"type": "node-set",
|
||||
"description": "Data to sum"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [],
|
||||
"documentationReferenceURL": "wwww.google.pl"
|
||||
},
|
||||
{
|
||||
"name": "floor",
|
||||
"description": "The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "$arg",
|
||||
"type": "number",
|
||||
"description": "Data to round"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "floor(3.6)",
|
||||
"output": "3"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "wwww.google.pl"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
40
Frontend/src/assets/tooltips/xpath/xpath31.json
Normal file
40
Frontend/src/assets/tooltips/xpath/xpath31.json
Normal file
@@ -0,0 +1,40 @@
|
||||
[
|
||||
{
|
||||
"name": "Number",
|
||||
"entries": [
|
||||
{
|
||||
"name": "sum",
|
||||
"description": "The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number.",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "$arg",
|
||||
"type": "node-set",
|
||||
"description": "Data to sum"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [],
|
||||
"documentationReferenceURL": "wwww.google.pl"
|
||||
},
|
||||
{
|
||||
"name": "floor",
|
||||
"description": "The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "$arg",
|
||||
"type": "number",
|
||||
"description": "Data to round"
|
||||
}
|
||||
],
|
||||
"output": "number",
|
||||
"examples": [
|
||||
{
|
||||
"command": "floor(3.6)",
|
||||
"output": "3"
|
||||
}
|
||||
],
|
||||
"documentationReferenceURL": "wwww.google.pl"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -15,12 +15,20 @@ const headerData = ref(props.headersObject)
|
||||
const newHeaderName = ref('');
|
||||
const newHeaderValue = ref('');
|
||||
|
||||
function setAddButtonStyle() {
|
||||
return isNewHeaderEmpty() ? "inactive-button" : "tool-button";
|
||||
}
|
||||
|
||||
function isNewHeaderEmpty() {
|
||||
return newHeaderName.value.trim().length == 0;
|
||||
}
|
||||
|
||||
function isHeaderEssential(headerName : string){
|
||||
return headerName == "Keep-Alive" || headerName == "Connection" || headerName == "Date"
|
||||
}
|
||||
|
||||
function setEssentialHeaderStyle(headerName : string){
|
||||
return isHeaderEssential(headerName) ? "text-gray-400" : "tool-button text-red-400";
|
||||
return isHeaderEssential(headerName) ? "inactive-button" : "tool-button";
|
||||
}
|
||||
|
||||
function deleteHeader(index : string){
|
||||
@@ -31,32 +39,36 @@ function deleteHeader(index : string){
|
||||
}
|
||||
|
||||
function addNewHeader(name : string, value : string){
|
||||
if (headerData.value != undefined){
|
||||
headerData.value[name] = value;
|
||||
newHeaderName.value = "";
|
||||
newHeaderValue.value = "";
|
||||
emit('update:httpHeaders',headerData.value)
|
||||
}
|
||||
if (headerData.value == undefined)
|
||||
return;
|
||||
|
||||
if (isNewHeaderEmpty()) return;
|
||||
|
||||
headerData.value[name] = value;
|
||||
newHeaderName.value = "";
|
||||
newHeaderValue.value = "";
|
||||
emit('update:httpHeaders',headerData.value);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full gap-4 flex">
|
||||
<div class="w-full">Header name</div>
|
||||
<div class="w-full">Header value</div>
|
||||
<div class="w-1/5"></div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex gap-9 flex-row" v-for="(item, index) in headerData" :key="index">
|
||||
<input type="text" :value="index" class="text-field" />
|
||||
<input type="text" :value="item" class="text-field" />
|
||||
<button @click="deleteHeader(index)" class="tool-button w-1/5" :class="setEssentialHeaderStyle(index)">Remove</button>
|
||||
<div class="flex flex-row gap-4">
|
||||
<div class="w-full">Header name</div>
|
||||
<div class="w-full">Header value</div>
|
||||
<div class="w-52 px-4"></div>
|
||||
</div>
|
||||
<div class="flex flex-row gap-4" v-for="(item, index) in headerData" :key="index">
|
||||
<input type="text" :value="index" class="text-field" disabled/>
|
||||
<input type="text" :value="item" class="text-field" disabled/>
|
||||
<button @click="deleteHeader(index)" class="w-56" :class="setEssentialHeaderStyle(index)">Remove</button>
|
||||
</div>
|
||||
<div class="flex gap-9 flex-row">
|
||||
<input type="text" v-model="newHeaderName" class="text-field" />
|
||||
<div class="flex flex-row gap-4">
|
||||
<input type="text" v-model="newHeaderName" @change="() => setAddButtonStyle()" class="text-field" />
|
||||
<input type="text" v-model="newHeaderValue" class="text-field" />
|
||||
<button class="tool-button w-1/5" @click="addNewHeader(newHeaderName, newHeaderValue)" >Add</button>
|
||||
<button @click="addNewHeader(newHeaderName, newHeaderValue)" :class="setAddButtonStyle()" class="w-56">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -35,7 +35,7 @@ function showHeaders(headers: object, index: number){
|
||||
|
||||
<template>
|
||||
<div class="w-full xl:w-5/12 flex flex-col gap-y-4">
|
||||
<HistoryRecords class="h-1/3 overflow-y-scroll" @click:show-headers="showHeaders" @click:show-body="showBody"></HistoryRecords>
|
||||
<HistoryRecords class="xl:h-1/3 overflow-y-scroll" @click:show-headers="showHeaders" @click:show-body="showBody"></HistoryRecords>
|
||||
<BodyDetailComponent :content-type="currentContentType" :data="currentShownData" v-if="shownDetail == 'body' "></BodyDetailComponent>
|
||||
<HeadersDetailComponent :data="currentShownData" v-if="shownDetail == 'headers' "></HeadersDetailComponent>
|
||||
</div>
|
||||
|
||||
@@ -57,9 +57,9 @@ function refreshHistory(){
|
||||
<tr v-for="(item , index) in historyRecords" :key="index">
|
||||
<td> {{ parseTimeStamp(item.dateTimeStamp) }} </td>
|
||||
<td> {{ item.httpMethod }} </td>
|
||||
<td> <button @click="showHeaders(item.headers, index)">Show Headers</button> </td>
|
||||
<td> <button @click="showHeaders(item.headers, index)" class="underline">Show Headers</button> </td>
|
||||
<td>
|
||||
<button v-if="item.requestBody.length != 0" @click="showBody(item.requestBody, index, item.headers['content-type'])">Show Body</button>
|
||||
<button v-if="item.requestBody.length != 0" @click="showBody(item.requestBody, index, item.headers['content-type'])" class="underline">Show Body</button>
|
||||
<span v-else>Empty Body</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -44,17 +44,18 @@ function showUpdatedCode(newCode : string){
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex overflow-y-scroll flex-col w-full xl:w-3/5 text-center dark:text-white gap-6">
|
||||
<div>
|
||||
<label for="link">Link</label><br/>
|
||||
<div class="flex gap-4">
|
||||
<div class="flex flex-col w-full xl:w-3/5 text-center dark:text-white gap-6 p-1">
|
||||
<div class="flex flex-col md:flex-row gap-4 items-center md:justify-stretch md:items-end">
|
||||
<div class="flex flex-col w-full">
|
||||
<label for="link">Link</label><br/>
|
||||
<div class="p-2 w-full border-slate-400 border-2 rounded-lg">
|
||||
<a class="underline" :href="mockMessageLink">{{ mockMessageLink }}</a>
|
||||
</div>
|
||||
<SaveComponent v-bind:message-data="messageData"></SaveComponent>
|
||||
</div>
|
||||
|
||||
<SaveComponent v-bind:message-data="messageData"></SaveComponent>
|
||||
</div>
|
||||
<div class="flex flex-row w-full gap-64">
|
||||
<div class="flex flex-col md:flex-row w-full gap-4">
|
||||
<div class="w-full">
|
||||
<label for="contentType">Content Type</label><br/>
|
||||
<input class="text-field" id="contentType" type="text" v-model="messageData.contentType"/>
|
||||
|
||||
@@ -38,7 +38,7 @@ function hideToast(){
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button @click="prepareAndSendData()" class="w-2/12 tool-button">Save</button>
|
||||
<button @click="prepareAndSendData()" class="tool-button w-full md:w-32">Save</button>
|
||||
|
||||
<div class="fixed bottom-5 right-12">
|
||||
<MockedMessageToastComponent @closed:toast_closed="hideToast()" v-bind:visible="visible" v-bind:message="message"/>
|
||||
|
||||
@@ -24,7 +24,7 @@ onMounted( () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<aside class="relative flex-shrink-0 top-0 left-0 z-40 w-48 h-screen" >
|
||||
<aside class="hidden md:flex relative flex-shrink-0 top-0 left-0 z-40 w-48 h-screen" >
|
||||
<div class="flex flex-col h-full px-3 pt-2 pb-4 overflow-y-auto">
|
||||
<a href="https://release11.com/">
|
||||
<img :src="logoR11" class="w-72 h-16 p-2 pt-0"/>
|
||||
|
||||
@@ -11,6 +11,8 @@ const props = defineProps(
|
||||
}
|
||||
)
|
||||
|
||||
const emit = defineEmits(["update"]);
|
||||
|
||||
const result = ref('');
|
||||
|
||||
var enginesForCurrentTool = ref(["saxon", "xalan", "libxml"]);
|
||||
@@ -72,6 +74,7 @@ function selectDefaultEngine() {
|
||||
function selectDefaultVersion() {
|
||||
const lastVersion = versionsForCurrentEngine.value.length - 1
|
||||
version.value = versionsForCurrentEngine.value[lastVersion];
|
||||
emitVersionChange();
|
||||
}
|
||||
|
||||
function process() {
|
||||
@@ -119,6 +122,10 @@ function clear() {
|
||||
result.value = "";
|
||||
}
|
||||
|
||||
function emitVersionChange() {
|
||||
emit("update", version.value);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -129,7 +136,7 @@ function clear() {
|
||||
<select v-model="engine" name="engine" @change="changeAvailableVersions()" class="px-3 rounded-full border border-slate-400 bg-white dark:text-slate-100 dark:bg-gray-600">
|
||||
<option v-for="engine in enginesForCurrentTool" :value="engine">{{ engine }}</option>
|
||||
</select>
|
||||
<select v-model="version" name="version" class="px-3 rounded-full border border-slate-400 bg-white dark:text-slate-100 dark:bg-gray-600">
|
||||
<select v-model="version" name="version" @change="emitVersionChange()" class="px-3 rounded-full border border-slate-400 bg-white dark:text-slate-100 dark:bg-gray-600">
|
||||
<option v-for="version in versionsForCurrentEngine" :value="version">{{ version }}</option>
|
||||
</select>
|
||||
<button class="tool-button" @click="clear">Clear</button>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
const isCategoryHidden = ref(true)
|
||||
|
||||
const props = defineProps({
|
||||
name: {type: String, required: true}
|
||||
})
|
||||
|
||||
function toggleTooltips() {
|
||||
isCategoryHidden.value = !isCategoryHidden.value;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex p-2 flex-col rounded-xl shadow-lg bg-gradient-to-r from-zinc-400 to-slate-400 dark:from-slate-600 dark:to-slate-700">
|
||||
<button :class="{ 'mb-2' : !isCategoryHidden }" class="dark:text-slate-100" @click="toggleTooltips()">{{ props.name }}</button>
|
||||
<div id="content" :class="{'hidden' : isCategoryHidden}" class="flex flex-col gap-4 w-full h-fit p-2 rounded-xl dark:text-white bg-indigo-50 dark:bg-slate-800" >
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
51
Frontend/src/components/xml/tooltips/TooltipComponent.vue
Normal file
51
Frontend/src/components/xml/tooltips/TooltipComponent.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import tooltipCategoryComponent from '@components/xml/tooltips/TooltipCategoryComponent.vue';
|
||||
import tooltipEntryComponent from '@components/xml/tooltips/TooltipEntryComponent.vue';
|
||||
|
||||
import xpath1 from '@/assets/tooltips/xpath/xpath1.json';
|
||||
import xpath2 from '@/assets/tooltips/xpath/xpath2.json';
|
||||
import xpath3 from '@/assets/tooltips/xpath/xpath3.json';
|
||||
import xpath31 from '@/assets/tooltips/xpath/xpath31.json';
|
||||
|
||||
const props = defineProps({
|
||||
version: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const areTooltipsHidden = ref(true)
|
||||
|
||||
function selectXPathVersion() {
|
||||
switch(props.version) {
|
||||
case "1.0":
|
||||
return xpath1;
|
||||
case "2.0":
|
||||
return xpath2;
|
||||
case "3.0":
|
||||
return xpath3;
|
||||
case "3.1":
|
||||
default:
|
||||
return xpath31;
|
||||
}
|
||||
}
|
||||
|
||||
function toggleTooltips() {
|
||||
areTooltipsHidden.value = !areTooltipsHidden.value;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :class="{ 'w-4/12' : !areTooltipsHidden }" class="hidden xl:flex shrink-0 items-stretch p-2 flex-row rounded-xl shadow-lg bg-gradient-to-r from-blue-400 to-blue-300 dark:from-sky-600 dark:to-sky-800">
|
||||
<button :class="{'mr-2' : !areTooltipsHidden }" class="text-xl w-6 dark:text-slate-100" @click="toggleTooltips()">
|
||||
T<br/>o<br/>o<br/>l<br/>t<br/>i<br/>p<br/>s
|
||||
</button>
|
||||
<div id="content" :class="{'hidden' : areTooltipsHidden}" class="w-full flex flex-col gap-4 p-2 overflow-scroll rounded-xl dark:text-white bg-indigo-50 dark:bg-slate-800" >
|
||||
<tooltipCategoryComponent v-for="category in selectXPathVersion()" :name="category.name">
|
||||
<tooltipEntryComponent v-for="entry in category.entries" :entry-data="entry"></tooltipEntryComponent>
|
||||
</tooltipCategoryComponent>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,85 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
const isEntryHidden = ref(true)
|
||||
|
||||
const props = defineProps({
|
||||
entryData: {type: Object, required: true}
|
||||
})
|
||||
|
||||
function toggleTooltips() {
|
||||
isEntryHidden.value = !isEntryHidden.value;
|
||||
}
|
||||
|
||||
function entryHasArguments() {
|
||||
return props.entryData.arguments.length > 0;
|
||||
}
|
||||
|
||||
function entryHasExamples() {
|
||||
return props.entryData.examples.length > 0;
|
||||
}
|
||||
|
||||
function interpretXPathIndicators( elementType:string ):string {
|
||||
const lastChar = elementType.charAt(elementType.length - 1);
|
||||
var meaning = "";
|
||||
switch (lastChar) {
|
||||
case "*":
|
||||
meaning = "Zero or more";
|
||||
case "?":
|
||||
meaning = "Zero or one";
|
||||
case "+":
|
||||
meaning = "One or more";
|
||||
|
||||
}
|
||||
if (meaning.length == 0)
|
||||
return elementType;
|
||||
else
|
||||
return elementType + " (" + meaning + ")";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex p-1 flex-col rounded-xl border border-slate-400 dark:border-slate-400">
|
||||
<button :class="{ 'mb-2' : !isEntryHidden }" class="dark:text-slate-100" @click="toggleTooltips()">{{ props.entryData.name }}</button>
|
||||
<div id="content" :class="{'hidden' : isEntryHidden}" class="w-full p-2 rounded-xl dark:text-white bg-indigo-50 dark:bg-slate-800" >
|
||||
<h4 class="text-xl mb-2 font-bold text-justify">Description</h4>
|
||||
<span class="text-justify">
|
||||
<p>
|
||||
{{ props.entryData.description }}
|
||||
</p>
|
||||
</span>
|
||||
|
||||
<h4 class="text-xl mt-4 mb-2 font-bold">Args and Output</h4>
|
||||
<table v-if="entryHasArguments()" class="w-full">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr v-for="arg in props.entryData.arguments">
|
||||
<td class="text-center">{{ interpretXPathIndicators( arg.type ) }}</td>
|
||||
<td class="text-center">{{ arg.description }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="mt-2">
|
||||
<strong>Output: </strong>{{ interpretXPathIndicators(props.entryData.output) }}
|
||||
</div>
|
||||
|
||||
|
||||
<h4 v-if="entryHasExamples()" class="text-xl mt-4 mb-2 font-bold">Example</h4>
|
||||
<table v-if="entryHasExamples()" class="w-full">
|
||||
<tr>
|
||||
<th>Command</th>
|
||||
<th>Output</th>
|
||||
</tr>
|
||||
<tr v-for="ex in props.entryData.examples">
|
||||
<td class="text-center"><code>{{ ex.command }}</code></td>
|
||||
<td class="text-center">{{ ex.output }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="mt-2">
|
||||
<a :href="props.entryData.documentationReferenceURL" class="underline" target="_blank" rel="noreferrer noopener">W3C Documentation Reference</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -2,10 +2,14 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
.inactive-button {
|
||||
@apply py-2 px-4 h-fit text-slate-400 border border-slate-400 rounded-full
|
||||
}
|
||||
|
||||
.tool-button {
|
||||
@apply py-1 px-4 rounded-full bg-gradient-to-r from-blue-300 to-sky-200 dark:text-white dark:from-sky-600 dark:to-sky-800 hover:bg-blue-400
|
||||
@apply hover:brightness-110 py-2 px-4 h-fit rounded-full bg-gradient-to-r from-blue-400 to-sky-300 dark:text-white dark:from-sky-600 dark:to-sky-800 hover:bg-blue-400
|
||||
}
|
||||
|
||||
.text-field {
|
||||
@apply w-full font-mono dark:text-slate-100 dark:bg-gray-600 border border-slate-400 p-2 rounded-lg
|
||||
@apply w-full font-mono dark:text-slate-100 bg-slate-50 dark:bg-gray-600 border border-slate-400 p-2 rounded-lg
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import HistoryComponent from '@components/mock/HistoryComponent.vue'
|
||||
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col xl:flex-row gap-6 w-full overflow-hidden h-full">
|
||||
<div class="flex flex-col xl:flex-row gap-6 w-full overflow-y-scroll overflow-x-hidden h-full">
|
||||
<RestMockMessageComponent></RestMockMessageComponent>
|
||||
<HistoryComponent></HistoryComponent>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import xmlInputFieldComponent from '@/components/xml/XmlInputFieldComponent.vue';
|
||||
import xmlOutputFieldComponent from '@/components/xml/XmlOutputFieldComponent.vue';
|
||||
import tooltipComponent from '@/components/xml/tooltips/TooltipComponent.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
|
||||
const xml = ref('');
|
||||
const query = ref('');
|
||||
const version = ref('');
|
||||
|
||||
function updateVersion(newVersion: string) {
|
||||
version.value = newVersion;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -15,6 +21,7 @@ const query = ref('');
|
||||
<xmlInputFieldComponent stylized-name="XML" :data="xml" @update="(data) => {xml = data}"></xmlInputFieldComponent>
|
||||
<xmlInputFieldComponent stylized-name="XPath" :data="query" @update="(data) => {query = data}"></xmlInputFieldComponent>
|
||||
</div>
|
||||
<xmlOutputFieldComponent tool="xpath" :xml="xml" :query="query"></xmlOutputFieldComponent>
|
||||
<xmlOutputFieldComponent tool="xpath" :xml="xml" :query="query" @update="(version) => updateVersion(version)"></xmlOutputFieldComponent>
|
||||
<tooltipComponent :version="version"></tooltipComponent>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user