merge new tools (#244)

Co-authored-by: Adam Bem <adam.bem@zoho.eu>
Co-authored-by: Adam Bem <bema@noreply.example.com>
Reviewed-on: #244
This commit is contained in:
2023-09-05 11:15:20 +02:00
parent 57a08c3246
commit 971cc5f36a
167 changed files with 23310 additions and 24128 deletions

28
Frontend/.dockerignore Normal file
View File

@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

15
Frontend/.eslintrc.cjs Normal file
View File

@@ -0,0 +1,15 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}

28
Frontend/.gitignore vendored Normal file
View File

@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}

View File

@@ -1,20 +1,30 @@
FROM nginx:stable-alpine
FROM node:latest as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY ./ .
RUN npm run build
FROM nginx:stable-alpine as production-stage
RUN mkdir /app
RUN apk add --no-cache tzdata
ENV TZ Europe/Warsaw
COPY ./tools/ /usr/share/nginx/html/tools/
COPY ./lawful/ /usr/share/nginx/html/lawful/
COPY ./assets/ /usr/share/nginx/html/assets/
COPY ./index.html /usr/share/nginx/html
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
RUN mkdir -p /scripts
COPY insert_version.sh /scripts/
WORKDIR /scripts
RUN chmod +x insert_version.sh
RUN ./insert_version.sh
EXPOSE 80
EXPOSE 443
FROM node:latest as dev
WORKDIR /app
COPY package*.json ./
RUN npm install
ENV HOST=0.0.0.0
COPY . .
EXPOSE 8080
CMD ["npm", "run", "dev"]

46
Frontend/README.md Normal file
View File

@@ -0,0 +1,46 @@
# new-frontend
This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
## Type Support for `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
1. Disable the built-in TypeScript Extension
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
## Customize configuration
See [Vite Configuration Reference](https://vitejs.dev/config/).
## Project Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
```sh
npm run dev
```
### Type-Check, Compile and Minify for Production
```sh
npm run build
```
### Lint with [ESLint](https://eslint.org/)
```sh
npm run lint
```

View File

@@ -1,6 +0,0 @@
@import url('https://necolas.github.io/normalize.css/8.0.1/normalize.css');
@import url('r11addons.css');
@import url('r11tables.css');
@import url('r11tool.css');
@import url('r11tooltip.css');
@import url('r11modal.css');

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2021 by original authors @ fontello.com</metadata>
<defs>
<font id="fontello" horiz-adv-x="1000" >
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="plus" unicode="&#xe801;" d="M786 439v-107q0-22-16-38t-38-15h-232v-233q0-22-16-37t-38-16h-107q-22 0-38 16t-15 37v233h-232q-23 0-38 15t-16 38v107q0 23 16 38t38 16h232v232q0 22 15 38t38 16h107q23 0 38-16t16-38v-232h232q23 0 38-16t16-38z" horiz-adv-x="785.7" />
<glyph glyph-name="cancel" unicode="&#xe802;" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,59 +0,0 @@
@font-face {
font-family: 'fontello';
src: url('font/fontello.eot?49304387');
src: url('font/fontello.eot?49304387#iefix') format('embedded-opentype'),
url('font/fontello.woff2?49304387') format('woff2'),
url('font/fontello.woff?49304387') format('woff'),
url('font/fontello.ttf?49304387') format('truetype'),
url('font/fontello.svg?49304387#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?49304387#fontello') format('svg');
}
}
*/
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "fontello";
font-style: normal;
font-weight: normal;
speak: never;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Font smoothing. That was taken from TWBS */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.icon-plus:before { content: '\e801'; } /* '' */
.icon-cancel:before { content: '\e802'; } /* '' */

View File

@@ -1,150 +0,0 @@
@font-face {
font-family: "Nunito";
src: url('../fonts/Nunito-VariableFont_wght.ttf') format('truetype');
}
html {
background-image: url("../images/background.jpg");
}
body {
font-family: 'Nunito', sans-serif;
font-weight: 200;
color: #2e3133;
margin: 0px;
}
* {
margin: 0;
padding: 0;
}
html,
body {
height: 100%;
min-height: 100%;
}
div#header {
background-color: #FFFFFF;
width: 100%;
height: 80px;
display: flex;
align-items: center;
justify-content: space-between;
}
#logo {
padding: 20px 20px 20px;
width: 250px;
grid-column: 1;
}
iframe#iframe {
flex-grow: 1;
background-color: #FFFFFF;
}
div#content {
width: 100%;
height: calc(100% - 80px);
display: flex;
backdrop-filter: blur(10px);
}
div#leftBar {
float: left;
width: 200px;
background-color: transparent;
height: 100%;
}
li {
font-size: 20px;
font-weight: 300;
}
div#copyright{
color:rgb(192, 192, 192);
position: fixed;
bottom: 10px;
width: 200px;
text-align: center;
}
div#copyright a, a:visited, a:active {
color: rgb(192, 192, 192);
}
#toolList {
list-style-type: none;
margin: 0;
padding: 10px 0 0 0;
overflow: hidden;
display: block;
float: left;
background-color: transparent;
width: 100%;
height: calc(100% - 80px);
backdrop-filter: blur(10px);
}
.toolListRow a {
display: block;
color: white;
text-align: center;
padding: 20px 50px 25px;
text-decoration: none;
}
.toolListRow a:hover {
background-color: #2A93B0;
color: white;
transform: scale(1.25, 1.25);
transition-duration: .3s;
}
#leftElements {
display: flex;
align-items: center;
}
#titlebar {
/* padding: 10px 0; */
color: black;
height: fit-content;
margin: 0px 20px;
font-size: 36px;
text-align: center;
}
#menu {
display: flex;
height: fit-content;
}
#menu a {
display: block;
margin: 0px 10px;
padding: 0px 10px;
font-size: 28px;
text-decoration: none;
color: black;
}
#menu a.active {
border-bottom: 3px solid #2A93B0;
}
#menu a:hover {
transform: scale(1.25, 1.25);
transition-duration: .3s;
}
.separator{
width: 100%;
padding:6px;
}

View File

@@ -1,69 +0,0 @@
.json-block {
height: 600px;
width: 97%;
}
.json-border {
border: 2px solid rgba(93, 99, 96, 0.705);
border-radius: 5px;
}
.json-border:focus {
box-shadow: 0 0 5px rgb(81, 203, 238);
border: 2px solid rgba(93, 99, 96, 0.705);
border-radius: 5px;
}
/*! Theme: Default Description: Original highlight.js style Author: (c) Ivan Sagalaev <maniac@softwaremaniacs.org> Maintainer: @highlightjs/core-team Website: https://highlightjs.org/ License: see project LICENSE Touched: 2021 */
pre code.hljs{
display:block;
overflow-x:auto;
padding:1em
}
code.hljs{
padding:3px 5px
}
.hljs{
background:#FFFFFF;
color:#444
}
.hljs-comment{
color:#697070
}
.hljs-punctuation,.hljs-tag{
color:#444a
}
.hljs-tag .hljs-attr,.hljs-tag .hljs-name{
color:#444
}
.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{
font-weight:700
}
.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{
color:#800
}
.hljs-section,.hljs-title{
color:#800;
font-weight:700
}
.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{
color:#ab5656
}
.hljs-literal{
color:#695
}
.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{
color:#397300
}
.hljs-meta{
color:#1f7199
}
.hljs-meta .hljs-string{
color:#38a
}
.hljs-emphasis{
font-style:italic
}
.hljs-strong{
font-weight:700
}

View File

@@ -1,42 +0,0 @@
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@200&display=swap');
body {
font-family: "Nunito", sans-serif;
background-color: #FFFFFF;
margin: 0px;
}
h1, h2 {
text-align: center;
}
h2::before {
background: url('/assets/images/sygnet_color.svg') no-repeat;
display: inline-block;
}
#header {
height: 80px;
width: 100%;
display: flex;
align-items: center;
background-color: #FFFFFF;
position: fixed;
top: 0;
left: 0;
}
#logo {
width: 250px;
margin: 0px 20px;
}
#content {
width: 1024px;
margin: auto;
text-align: justify;
background-color: #FFFFFF;
padding: 20px 20px;
border-radius: 15px;
margin-top: 100px;
}

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2021 by original authors @ fontello.com</metadata>
<defs>
<font id="fontello" horiz-adv-x="1000" >
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="plus" unicode="&#xe801;" d="M786 439v-107q0-22-16-38t-38-15h-232v-233q0-22-16-37t-38-16h-107q-22 0-38 16t-15 37v233h-232q-23 0-38 15t-16 38v107q0 23 16 38t38 16h232v232q0 22 15 38t38 16h107q23 0 38-16t16-38v-232h232q23 0 38-16t16-38z" horiz-adv-x="785.7" />
<glyph glyph-name="cancel" unicode="&#xe802;" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,59 +0,0 @@
@font-face {
font-family: 'fontello';
src: url('font/fontello.eot?49304387');
src: url('font/fontello.eot?49304387#iefix') format('embedded-opentype'),
url('font/fontello.woff2?49304387') format('woff2'),
url('font/fontello.woff?49304387') format('woff'),
url('font/fontello.ttf?49304387') format('truetype'),
url('font/fontello.svg?49304387#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?49304387#fontello') format('svg');
}
}
*/
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "fontello";
font-style: normal;
font-weight: normal;
speak: never;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Font smoothing. That was taken from TWBS */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.icon-plus:before { content: '\e801'; } /* '' */
.icon-cancel:before { content: '\e802'; } /* '' */

View File

@@ -1,34 +0,0 @@
@import url('https://necolas.github.io/normalize.css/8.0.1/normalize.css');
/* @import url('https://fonts.googleapis.com/icon?family=Material+Icons'); */
@import url('r11addons.css');
@import url('r11tables.css');
@import url('r11tool.css');
@import url('r11tooltip.css');
@import url('r11modal.css');
@import url('r11flexbox.css');
@import url('r11popup.css');
@import url('../../highlight.css');
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialicons/v140/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-moz-font-feature-settings: 'liga';
-moz-osx-font-smoothing: grayscale;
}

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2021 by original authors @ fontello.com</metadata>
<defs>
<font id="fontello" horiz-adv-x="1000" >
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="plus" unicode="&#xe801;" d="M786 439v-107q0-22-16-38t-38-15h-232v-233q0-22-16-37t-38-16h-107q-22 0-38 16t-15 37v233h-232q-23 0-38 15t-16 38v107q0 23 16 38t38 16h232v232q0 22 15 38t38 16h107q23 0 38-16t16-38v-232h232q23 0 38-16t16-38z" horiz-adv-x="785.7" />
<glyph glyph-name="cancel" unicode="&#xe802;" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,59 +0,0 @@
@font-face {
font-family: 'fontello';
src: url('font/fontello.eot?49304387');
src: url('font/fontello.eot?49304387#iefix') format('embedded-opentype'),
url('font/fontello.woff2?49304387') format('woff2'),
url('font/fontello.woff?49304387') format('woff'),
url('font/fontello.ttf?49304387') format('truetype'),
url('font/fontello.svg?49304387#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?49304387#fontello') format('svg');
}
}
*/
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "fontello";
font-style: normal;
font-weight: normal;
speak: never;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Font smoothing. That was taken from TWBS */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.icon-plus:before { content: '\e801'; } /* '' */
.icon-cancel:before { content: '\e802'; } /* '' */

View File

@@ -1,4 +0,0 @@
.overflowedTableContent {
max-height: 750px;
overflow: scroll;
}

View File

@@ -1,95 +0,0 @@
.modification-button.btn-tile:hover {
color: #ca1111;
}
.modification-button.btn-tile {
width: 10%;
margin: 20% 0 0 0;
font-size: 14px;
color: #00000020
}
.modification-button.btn-addtile {
font-size: 38px;
color: #00000030;
}
.modification-button.btn-copy {
width: 24px;
height: 24px;
align-content: center;
display: grid;
justify-content: center;
}
.modification-button.btn-copy img {
width: 100%;
height: 100%;
}
.modification-button.btn-addtile:hover {
color: #58ac43;
}
.tile {
width: 100%;
padding-top: 40%;
border-radius: 5px;
position: relative;
background: #D5D7E6;
margin-bottom: 10px;
cursor: default;
border-bottom: 1px solid darkgray;
}
.tile:hover {
filter: brightness(110%);
}
.tile.active {
background: #2A93B0;
color: white;
filter: none;
}
.tile.active .btn-tile {
opacity: 0;
}
.tile .content {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
padding: 0 2% 0 7%;
display: flex;
}
.content p {
margin: 0;
padding: 0;
}
.refresh-button{
float: right;
border: none;
background-color: unset;
font-size: xx-large;
}
.refresh-button:hover{
animation-name: rotation;
animation-duration: 0.8s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes rotation{
from{
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

View File

@@ -1,57 +0,0 @@
#editable-block {
flex-grow: 0;
flex-shrink: 0;
}
#uuid-edit {
display: flex;
align-items: center;
margin-bottom: 15px;
}
#uuid-edit-field {
display: flex;
width: fit-content;
align-items: center;
width: 70%;
margin-right: 10px;
}
#uuid-edit-field .uuid-inputField-icon{
background: none;
color: black;
border: 0;
}
#uuid-edit-field .uuid-inputField-icon:hover{
color: #2A93B0;
}
#uuid-input {
border: none;
width: 100%
}
#uuid-input:focus {
outline: none;
}
#uuid-validation-strategy input {
margin-left: 10px;
}
.disabled {
background-color: #CCD1CF;
}
.disabled #uuid-input {
background-color: #CCD1CF;
}
.uuid-inputField-icon-span {
font-size: x-large;
}

View File

@@ -1,104 +0,0 @@
#overlay {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
opacity: 0;
background: rgba(0, 0 , 0, 0.5);
pointer-events: none;
}
#overlay.active {
pointer-events: all;
opacity: 1;
}
.modal {
display: none;
width: 390px;
min-height: 71px;
max-height: 700px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: white;
padding: 5px;
border: 1px solid #f0f0f0;
}
.modal.active {
display: block;
}
.modal div.header {
width: 384px;
height: 24px;
background: #2e3133;
color: white;
font-size: 24px;
font-weight: 700;
padding: 3px;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal div.header button {
font-size: 100%;
font-family: inherit;
border: 0;
padding: 0;
background: 0;
color: inherit;
cursor: pointer;
}
.modal div.header button:hover {
color: white;
font-weight: 700;
}
.modal div.body {
width: 370px;
padding: 10px;
background: #f0f0f0;
color: #2e3133;
min-height: 16px;
text-align: justify;
font-size: 16px;
}
.modal div.function {
width: 385px;
min-height: 30px;
padding-top: 5px;
display: flex;
justify-content: space-evenly;
background: inherit;
}
.modal div.function button {
min-height: 22px;
min-width: 34px;
max-width: 74px;
padding: 3px 20px;
outline: none;
border: 1px solid #f0f0f0;
background: rgba(205,205,205,1);
font-size: 16px;
text-align: center;
cursor: pointer;
}
.modal div.function button:hover {
filter: brightness(110%);
}
.r-exclamation:before {
content: '!';
color: #3bc4f1;
font-style: normal;
}

View File

@@ -1,83 +0,0 @@
.popup-flex:not(.hiddable-container){
animation: blur 0.5s ease-in-out ;
animation-fill-mode: forwards;
}
.popup-flex{
display: flex;
align-items: center;
width: 100%;
height: 100%;
z-index: 50;
flex-direction: column;
gap: 2%;
position: fixed;
justify-content: center;
}
.popup-body{
min-width: 33%;
max-width: 60%;
max-height: 70%;
background-color: white;
box-shadow: 10px 10px 5px lightblue;
min-height: 45%;
border-radius: 1em;
text-align: center;
padding: 10px 15px 15px 15px;
color: black;
border: 1px #2A93B0 solid;
display: flex;
flex-direction: column;
position: fixed;
}
.popup-button-close-container{
text-align: right;
margin-right: 2%;
margin-top: 1%;
font-size: xx-large;
font-weight: bold;
position: sticky;
top:0
}
.hiddable-popup-option{
flex-grow: 1;
overflow: auto;
padding: 1.5%;
}
.popup-button-close{
background: padding-box;
border: 0;
}
.popup-button-close:hover{
color: #2A93B0;
}
.hiddable-container{
display:none;
}
.hidden-popup-type{
display: none;
}
#history-request-body{
text-align: justify;
}
@keyframes blur {
0% {
backdrop-filter: blur(0px);
}
50% {
backdrop-filter: blur(5px);
}
100% {
backdrop-filter: blur(10px);
}
}

View File

@@ -1,96 +0,0 @@
.table-map {
width: 60%;
}
.table-map input{
font-size: 16px;
padding: 7px;
border: 1px solid rgba(145, 146, 146, 0.849);
border-radius: 5px;
}
.table-map input.key {
background: #f0f0f0;
}
.modification-button.btn-add {
font-size: 16px;
color: #00000030;
margin: auto 0 auto 0;
}
.modification-button.btn-add:hover {
color:#58ac43;
}
.modification-button.btn-hashmap {
font-size: 16px;
color: #00000030;
margin: auto 0 auto 0;
}
.modification-button.btn-hashmap:hover {
color: #ca1111;
}
.table-default {
width: 80%;
border-collapse: collapse;
border-spacing: 0;
}
.table-default tr {
background: #f0f0f02d;
}
.table-default tr.bottom-border {
border-bottom: 1px solid black;
}
.table-default th {
background: #ffffff;
}
.table-default tr.even {
background: #f0f0f0;
}
.table-doc td, .table-doc th{
border-spacing: 0px;
padding: 0px 10px;
}
.table-doc td {
background-color: rgba(155, 165, 160, 0.342);
}
.table-doc th {
background-color: #3bc4f1;
text-align: left;
color: white;
}
.table-default td{
text-align: center;
}
#header-table tr td {
border: 1px black solid;
padding: 1.5%;
}
#header-table{
border-collapse: collapse;
width: 100%;
height: 100%;
}
.history-header-name{
min-width: 10vw;
}
#historyTable, td{
padding: 1%;
overflow-x: scroll;
}

View File

@@ -1,322 +0,0 @@
@font-face {
font-family: "Nunito";
src: url('font/Nunito-VariableFont_wght.ttf') format('truetype');
}
input {
box-sizing: border-box;
}
.hyperlink, .hyperlink:visited, .hyperlink:active {
color: rgb(47, 125, 146);
cursor: pointer;
}
.hyperlink:hover {
filter: brightness(120%);
}
.bordered-field {
background-color: #FFFFFF;
border: 2px solid rgba(93, 99, 96, 0.705);
border-radius: 5px;
padding: 8px;
display: block;
}
.bordered-field:focus {
outline: none;
box-shadow: 0 0 5px rgba(81, 203, 238);
border: 2px solid #00000070;
}
.bordered-field:disabled {
background: #eeeeeed2;
}
.vertically-resizeable {
resize: vertical;
}
body {
font-family: 'Nunito', sans-serif;
}
.container {
display: flex;
justify-content: left;
width: 100%;
}
.tool {
width: 55%;
display: flex;
justify-content: space-evenly;
}
.tool.extended {
width: 65%;
}
.tool .tool-context {
width: 90%;
}
.tool.extended .tool-extention {
width: 20%;
padding-top: 2%;
display: block;
}
.tool .tool-extention {
display: none;
}
.tool-extention {
opacity: 0;
pointer-events: none;
}
.tool-extention.active {
opacity: 100%;
pointer-events: all;
}
.clickable-text {
padding: 0;
outline: none;
background: none;
border: none;
font-weight: 300;
cursor: pointer;
}
.clickable-text.highlight:hover {
color: #3bc4f1;
}
.clickable-text.switch {
font-size: 18px;
font-weight: 300;
}
.clickable-text.switch span.toggleIndicator:before {
content: '>';
}
.clickable-text.switch span.toggleIndicator.active:before {
content: 'v';
}
.modification-button {
padding: 0;
outline: none;
background: none;
border: none;
font-weight: 300;
}
.text-aligned-to-right {
text-align: right;
}
.centered-vertically {
margin-top: auto;
margin-bottom: auto;
}
.display-space-between {
width: 100%;
display: flex;
justify-content: space-between;
}
.display-space-evenly {
display: flex;
justify-content: space-evenly;
}
.float-left {
display: flex;
justify-content: left;
width: 100%;
}
.version-span {
font-size: 13px;
font-weight: 400;
color: rgba(85,85,85,0.555);
}
.block-display {
display: block;
}
.block-label {
display: block;
margin: 0 0 0 5px;
}
.tabmenu {
display: flex;
flex-direction: row;
text-align: center;
border-bottom: 1px solid rgba(185, 185, 185, 0.5);
}
.tabitem {
flex-grow: 1;
cursor: pointer;
padding: 5px 0;
}
.tabitem:hover {
font-weight: 700;
}
.tabitem.active {
background: rgba(33, 34, 34, 0.705);
color: white;
font-weight: 700;
cursor:default;
flex-grow: 1;
}
.big-font {
font-size: 20px;
}
.action-button.active {
background: #2A93B0;
border: 1px solid #7ed0eb;
cursor: pointer;
}
.action-button.active:hover {
filter: brightness(110%);
}
.action-button {
background: #CCD1CF;
border:1px solid rgba(186, 197, 191, 0.507);
border-radius: 5px;
color: white;
padding: 10px 20px;
font-weight: 700;
margin: 3px 0;
}
.quater-width {
width: 25%;
}
.half-width {
width: 50%;
}
.tree-fourth-width {
width: 75%;
}
.half-width.with-padding {
width: 45%;
}
.max-width {
width: 100%;
}
.max-width.with-padding {
width: 94%;
}
.max-height {
height: 100%;
}
.height-300 {
height: 300px;
}
.max-height.with-padding {
height: 90%;
}
.small-margins {
margin: 3%;
}
.small-vertical-margin {
margin-top: 10px;
margin-bottom: 10px;
}
.medium-vertical-margin {
margin-top: 30px;
margin-bottom: 30px;
}
.large-vertical-margin {
margin-top: 50px;
margin-bottom: 50px;
}
.textarea-300 {
height: 300px;
}
.centered-content {
display: flex;
justify-content: center;
}
.tabcontent {
display: none;
}
.tabcontent.active {
display: flex;
justify-content: center;
}
.hiddable {
display: none;
}
.hiddable.active {
display: inherit;
}
/* In case of collision with classes that use 'active' */
.hidden {
display: none;
}
h1 {
font-weight: 400;
}
h2 {
font-weight: 400;
}
h3 {
font-weight: 400;
}
/* TODO: Add proper class */
/* textarea {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
} */
/* TODO: Add proper class */
/* code{
line-height: 150%;
} */

View File

@@ -1,76 +0,0 @@
.tooltip-window {
position: fixed;
right: 0;
background: #FFFFFF;
padding: 15px 30px;
font-family: 'Nunito', sans-serif;
width: 40%;
height: 100%;
overflow: scroll;
}
.tooltip-window.lite {
width: 30%;
}
.tip {
display: none;
}
.tip.active {
display: block;
}
/* TODO: Remove !important. It's bad practice and it can cause errors in future */
.section-button {
width: 100%;
padding: 15px 0;
font-size: 18px;
background: #b4b4b4c5;
cursor: pointer;
border-bottom: darkgray 2px solid !important;
}
.section-button:hover {
backdrop-filter: brightness(110%);
}
.section-button .active {
background: #00000030;
}
.List .collapsibleContent {
border-left: #bdc5c9 2px solid;
overflow: hidden;
background: #ffffff50;
}
/* TODO: .section class is to generic. It should be renamed */
.section{
padding: 10px 0px 20px 0px ;
}
/* TODO: content subclass already in use. Creating content class overrides the subclass.
Make .content a subclass of .content */
/* .content {
padding: 0px 15px 0px 15px ;
text-align: justify;
overflow: hidden;
transition: max-height .2s ease-out;
max-height: 0px;
border-left: #c0c2c3 2px solid;
} */
.collapsibleMini::before{
content: "►";
}
.collapsibleMini.active::before{
content: "▼";
}
/* TODO: Add proper class */
/* button:hover{
filter: brightness(110%);
} */

View File

@@ -1,520 +0,0 @@
@import url('https://necolas.github.io/normalize.css/8.0.1/normalize.css');
@import url('fontello.css');
@font-face {
font-family: "Nunito";
src: url('../../fonts/Nunito-VariableFont_wght.ttf') format('truetype');
}
body {
font-weight: 300;
}
.hyperlink, .hyperlink:visited, .hyperlink:active {
color: rgb(47, 125, 146);
cursor: pointer;
}
.hyperlink:hover {
filter: brightness(120%);
}
.tooltip-window {
position: fixed;
right: 0;
/* filter: drop-shadow(-2px 0px 2px black); */
background: #FFFFFF;
padding: 15px 30px;
font-family: 'Nunito', sans-serif;
width: 30%;
height: calc(100% - 25px);
overflow: scroll;
}
.tooltip-window.lite {
width: 30%;
}
/* .hyperlink.collapseTrigger::before{
content: "▼";
} */
.bordered-field {
border: 2px solid rgba(93, 99, 96, 0.705);
border-radius: 5px;
padding: 8px;
}
.bordered-field:focus {
outline: none;
box-shadow: 0 0 5px rgba(81, 203, 238);
border: 2px solid #00000070;
}
.bordered-field:disabled {
background: #eeeeeed2;
}
.vertically-resizeable {
resize: vertical;
}
.container {
font-family: 'Nunito', sans-serif;
display: flex;
justify-content: left;
width: 100%;
}
.tool {
width: 65%;
display: flex;
justify-content: space-evenly;
}
.tool.extended {
width: 65%;
}
.tool .tool-context {
width: 90%;
}
.tool.extended .tool-context {
width: 75%;
}
.tool.extended .tool-extention {
width: 20%;
padding-top: 2%;
display: block;
}
.tool .tool-extention {
display: none;
}
.tool-extention {
opacity: 0;
pointer-events: none;
}
.tool-extention.active {
opacity: 100%;
pointer-events: all;
}
.clickable-text {
padding: 0;
outline: none;
background: none;
border: none;
font-weight: 300;
cursor: pointer;
}
.clickable-text.highlight:hover {
color: #3bc4f1;
}
.modification-button {
padding: 0;
outline: none;
background: none;
border: none;
font-weight: 300;
}
.modification-button.btn-add {
font-size: 16px;
color: #00000030;
margin: auto 0 auto 0;
}
.modification-button.btn-add:hover {
color:#58ac43;
}
.modification-button.btn-tile:hover {
color: #ca1111;
}
.modification-button.btn-hashmap {
font-size: 16px;
color: #00000030;
margin: auto 0 auto 0;
}
.modification-button.btn-hashmap:hover {
color: #ca1111;
}
.modification-button.btn-tile {
width: 10%;
margin: 20% 0 0 0;
font-size: 14px;
color: #00000020
}
.tile {
width: 90%;
padding-top: 40%;
border: 1px solid gray;
border-radius: 3px;
position: relative;
background: #f0f0f095;
margin-bottom: 10px;
cursor: default;
}
.tile:hover {
filter: brightness(110%);
}
.tile.active {
background: #00000070;
color: white;
filter: none;
}
.tile .content {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
padding: 0 2% 0 7%;
display: flex;
}
.text-aligned-to-right {
text-align: right;
}
.centered-vertically {
margin-top: auto;
margin-bottom: auto;
}
.display-space-between {
width: 100%;
display: flex;
justify-content: space-between;
}
.content p {
margin: 0;
padding: 0;
}
.float-left {
display: flex;
justify-content: left;
width: 100%;
}
.version-span {
font-size: 13px;
font-weight: 400;
color: rgba(85,85,85,0.555);
}
.block-display {
display: block;
}
.block-label {
display: block;
margin: 0 0 0 5px;
}
.tabmenu {
display: flex;
flex-direction: row;
text-align: center;
border-bottom: 1px solid rgba(185, 185, 185, 0.5);
}
.tabitem {
flex-grow: 1;
cursor: pointer;
padding: 5px 0;
}
.tabitem:hover {
font-weight: 700;
}
.tabitem.active {
background: rgba(33, 34, 34, 0.705);
color: white;
font-weight: 700;
cursor:default;
flex-grow: 1;
}
.big-font {
font-size: 20px;
}
.action-button.active {
background: #2A93B0;
border: 1px solid #7ed0eb;
cursor: pointer;
border-radius: 5px;
}
.action-button.active:hover {
filter: brightness(110%);
transition-duration: 0.3s;
}
.action-button {
background: rgba(155, 165, 160, 0.507);
border:1px solid rgba(186, 197, 191, 0.507);
color: white;
padding: 10px 20px;
font-weight: 700;
margin: 3px 0;
}
.quater-width {
width: 25%;
}
.half-width {
width: 50%;
}
.half-width.with-padding {
width: 45%;
}
.max-width {
width: 100%;
}
.half-width {
width: 50%;
}
.max-width.with-padding {
width: 94%;
}
.max-height {
height: 100%;
}
.height-300 {
height: 300px;
}
.max-height.with-padding {
height: 90%;
}
.small-margins {
margin: 3%;
}
.small-vertical-margin {
margin-top: 10px;
margin-bottom: 10px;
}
.medium-vertical-margin {
margin-top: 30px;
margin-bottom: 30px;
}
.large-vertical-margin {
margin-top: 50px;
margin-bottom: 50px;
}
.textarea-300 {
height: 300px;
}
.textarea-700 {
height: 700px;
}
.centered-content {
display: flex;
justify-content: center;
}
.table-map {
width: 60%;
}
.table-map input{
font-size: 16px;
padding: 7px;
border: 1px solid rgba(145, 146, 146, 0.849);
border-radius: 5px;
}
.table-map input.key {
background: #f0f0f0;
}
.table-default {
width: 80%;
border-collapse: collapse;
border-spacing: 0;
}
.table-default tr {
background: #f0f0f02d;
}
.table-default tr.bottom-border {
border-bottom: 1px solid black;
}
.table-default th {
background: #ffffff;
}
.table-default tr.even {
background: #f0f0f0;
}
.tip {
display: none;
}
.tip.active {
display: block;
}
.tabcontent {
display: none;
}
.tabcontent.active {
display: flex;
justify-content: center;
}
.section-button {
width: 100%;
padding: 15px 0;
margin: 5px 0px;
font-size: 18px;
background: #D5D7E6;
cursor: pointer;
border-bottom: darkgray 2px solid !important;
border-radius: 5px;
}
.section-button:hover {
/* border-bottom: #3bc4f1 2px solid; */
backdrop-filter: brightness(100%);
transition-duration: 0.3s;
}
.section-button .active {
background: #00000030;
}
.List .collapsibleContent {
/* display: none; */
border-left: #bdc5c9 2px solid;
/* max-height: 0px; */
/* border-left: #ededed solid 1px; */
overflow: hidden;
background: #ffffff50;
}
.section{
padding: 10px 0px 20px 0px ;
}
.content {
padding: 0px 15px 0px 15px ;
text-align: left;
overflow: hidden;
transition: max-height .2s ease-out;
max-height: 0px;
border-left: #c0c2c3 2px solid;
}
.collapsibleMini::before{
content: "►";
}
.collapsibleMini.active::before{
content: "▼";
}
.hiddable {
display: none;
}
.hiddable.active {
display: inherit;
}
/* In case of collision with classes that use 'active' */
.hidden {
display: none;
}
button:hover{
filter: brightness(110%);
}
.table-doc td, .table-doc th{
border-spacing: 0px;
padding: 0px 10px;
}
.table-doc td {
background-color: rgba(155, 165, 160, 0.342);
}
.table-doc th {
background-color: #3bc4f1;
text-align: left;
color: white;
}
textarea {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
code {
line-height: 150%;
}
h1 {
font-weight: 400;
}
h2 {
font-weight: 300;
}
pre {
margin: 0px;
}
@media only screen and (max-width: 1024px) {
.rwd-hideable {
display: none;
}
.rwd-expandable {
width: 100%;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 KiB

View File

@@ -1,14 +0,0 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:b="http://www.release11.com/book" xmlns:p="http://www.release11.com/person"
xmlns:l="http://www.release11.com/library">
<xsl:template match="/">
<Library>
<ReaderCount>
<xsl:value-of select="count(//p:person)" />
</ReaderCount>
<BookCount>
<xsl:value-of select="count(/l:library/l:bookList/b:book)" />
</BookCount>
</Library>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<library>
<libraryName>City library</libraryName>
<libraryID>345123</libraryID>
<readerList>
<person>
<readerID>7321</readerID>
<name>Adam</name>
<surname>Choke</surname>
</person>
<person>
<readerID>5123</readerID>
<name>Lauren</name>
<surname>Wong</surname>
</person>
</readerList>
<bookList>
<book>
<bookID>6422</bookID>
<title>Harry Potter</title>
<readerID>7542</readerID>
</book>
<book>
<bookID>1234</bookID>
<title>Macbeth</title>
<readerID>5123</readerID>
</book>
<book>
<bookID>9556</bookID>
<title>Romeo and Juliet</title>
</book>
</bookList>
</library>

View File

@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="">
<xsd:element name="library">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element minOccurs="0" name="libraryName" type="xsd:string" />
<xsd:element minOccurs="0" name="libraryID" type="xsd:int" />
<xsd:element minOccurs="0" name="readerList">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="person">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element minOccurs="0" name="readerID" type="xsd:int" />
<xsd:element minOccurs="0" name="name" type="xsd:normalizedString" />
<xsd:element minOccurs="0" name="surname" type="xsd:normalizedString" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element minOccurs="0" name="bookList">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="book">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element minOccurs="0" name="bookID" type="xsd:int" />
<xsd:element minOccurs="0" name="title" type="xsd:string" />
<xsd:element minOccurs="0" name="readerID" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

View File

@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<l:library xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.release11.com" xmlns:l="http://www.release11.com/library" xmlns:p="http://www.release11.com/person" xmlns:b="http://www.release11.com/book">
<l:libraryName>City library</l:libraryName>
<l:libraryID>345123</l:libraryID>
<l:readerList>
<p:person>
<p:readerID>7321</p:readerID>
<p:name>Adam</p:name>
<p:surname>Choke</p:surname>
</p:person>
<p:person>
<p:readerID>5123</p:readerID>
<p:name>Lauren</p:name>
<p:surname>Wong</p:surname>
</p:person>
</l:readerList>
<l:bookList>
<b:book>
<b:bookID>6422</b:bookID>
<b:title>Harry Potter</b:title>
<p:readerID>7542</p:readerID>
</b:book>
<b:book>
<b:bookID>1234</b:bookID>
<b:title>Macbeth</b:title>
<p:readerID>5123</p:readerID>
</b:book>
<b:book>
<b:bookID>9556</b:bookID>
<b:title>Romeo and Juliet</b:title>
</b:book>
</l:bookList>
</l:library>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,123 +0,0 @@
const tools = new Map();
/**
* Get address of Mock Services
*
* @function
* @name getMockHost
* @kind function
* @returns {string}
*/
function getMockHost() {
return window.location.protocol + "//" + window.location.hostname + ":8097";
}
/**
* Function called after page is loaded
*
* @function
* @name init
* @kind function
* @returns {void}
*/
function init() {
tools.set("xpath", "tools/xpath.html");
tools.set("xsd", "tools/xsd.html");
tools.set("xslt", "tools/xslt.html");
tools.set("xmlform", "tools/xmlFormatter.html");
tools.set("jsonform", "tools/jsonFormatter.html");
tools.set("mock", "tools/mock.html");
changeActiveTools('XML');
var toolUrl = window.location.search.substring(1);
if (tools.has(toolUrl))
changeTool(toolUrl, false);
else
loadLastPage();
}
/**
* Function that updates list of tools depending on chosen category
*
* @function
* @name changeActiveTools
* @kind function
* @param {any} activeClass class of elements that have to be shown
* @param {any} activeCategoryButton class of category button that has to be active
*/
function changeActiveTools(activeCategoryButton) {
let toolList = document.getElementById("toolList").children;
let categoryToClass = new Map([["XML", "xmlTool"],
["JSON", "jsonTool"],
["REST", "restTool"]]);
let activeClass = categoryToClass.get(activeCategoryButton.toUpperCase());
if(activeClass == null) return;
for (i = 0; i < toolList.length; i++) {
if (toolList[i].classList.contains(activeClass))
toolList[i].style.display = "block";
else
toolList[i].style.display = "none";
}
let categoryList = document.getElementById("menu").children;
for (i = 0; i < categoryList.length; i++) {
if (categoryList[i].innerText == activeCategoryButton)
categoryList[i].classList.add("active");
else
categoryList[i].classList.remove("active");
}
}
/**
* This function changes active tool.
* Optional updateURL can be set to false to stop changing URL.
* This helps avoiding endless reload loop when loading page.
*
* @function
* @name changeTool
* @kind function
* @param {any} tool
* @param {boolean} updateURL?
* @returns {void}
*/
function changeTool(tool, updateURL = true) {
if (! tools.has(tool)) return;
const url = tools.get(tool);
if (updateURL) document.location.search = tool;
switch (tool) { // XML category is default.
case "jsonform":
changeActiveTools('JSON');
break;
case "mock":
changeActiveTools('REST');
break;
}
localStorage.setItem("lastPage", tool);
document.getElementById("iframe").src = url;
}
/**
* Function that loads last used tool and sets active category accordingly
*
* @function
* @name loadLastPage
* @kind function
* @returns {void}
*/
function loadLastPage() {
var lastPage = localStorage.getItem("lastPage");
if (lastPage == null) {
lastPage = "xpath";
}
changeTool(lastPage);
}

View File

@@ -1,64 +0,0 @@
/**
* This file contains scripts needed for syntax highlight to work.
*/
/**
* This functions highlight element with provided ID.
*
* @function
* @name highlightSyntax
* @kind function
* @param {any} elementId
* @returns {void}
*/
function highlightSyntax(elementId) {
const element = document.getElementById(elementId);
element.innerHTML = hljs.highlightAuto(element.innerText).value
}
/**
* Converts pasted data to plain text
*
* @function
* @name configurePastingInElement
* @kind function
* @param {any} elementId
* @returns {void}
*/
function configurePastingInElement(elementId) {
const editorEle = document.getElementById(elementId);
// Handle the `paste` event
editorEle.addEventListener('paste', function (e) {
// Prevent the default action
e.preventDefault();
// Get the copied text from the clipboard
const text = e.clipboardData
? (e.originalEvent || e).clipboardData.getData('text/plain')
: // For IE
window.clipboardData
? window.clipboardData.getData('Text')
: '';
if (document.queryCommandSupported('insertText')) {
document.execCommand('insertText', false, text);
} else {
// Insert text at the current position of caret
const range = document.getSelection().getRangeAt(0);
range.deleteContents();
const textNode = document.createTextNode(text);
range.insertNode(textNode);
range.selectNodeContents(textNode);
range.collapse(false);
const selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
}
highlightSyntax(editorEle.id);
});
}

View File

@@ -1,250 +0,0 @@
const mergeHTMLPlugin = (function () {
'use strict';
var originalStream;
/**
* @param {string} value
* @returns {string}
*/
function escapeHTML(value) {
return value
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#x27;');
}
/* plugin itself */
/** @type {HLJSPlugin} */
const mergeHTMLPlugin = {
// preserve the original HTML token stream
"before:highlightElement": ({ el }) => {
originalStream = nodeStream(el);
},
// merge it afterwards with the highlighted token stream
"after:highlightElement": ({ el, result, text }) => {
if (!originalStream.length) {
return;
}
const resultNode = document.createElement('div');
resultNode.innerHTML = result.value;
result.value = mergeStreams(originalStream, nodeStream(resultNode), text);
el.innerHTML = result.value;
}
};
/**
* @param {Node} node
*/
function tag(node) {
return node.nodeName.toLowerCase();
}
/**
* @param {Node} node
*/
function nodeStream(node) {
/** @type Event[] */
const result = [];
(function _nodeStream(node, offset) {
for (let child = node.firstChild; child; child = child.nextSibling) {
if (child.nodeType === 3) {
offset += child.nodeValue.length;
} else if (child.nodeType === 1) {
result.push({
event: 'start',
offset: offset,
node: child
});
offset = _nodeStream(child, offset);
if (!tag(child).match(/br|hr|img|input/)) {
result.push({
event: 'stop',
offset: offset,
node: child
});
}
}
}
return offset;
})(node, 0);
return result;
}
/**
* @param {any} original - the original stream
* @param {any} highlighted - stream of the highlighted source
* @param {string} value - the original source itself
*/
function mergeStreams(original, highlighted, value) {
let processed = 0;
let result = '';
const nodeStack = [];
function selectStream() {
if (!original.length || !highlighted.length) {
return original.length ? original : highlighted;
}
if (original[0].offset !== highlighted[0].offset) {
return (original[0].offset < highlighted[0].offset) ? original : highlighted;
}
return highlighted[0].event === 'start' ? original : highlighted;
}
/**
* @param {Node} node
*/
function open(node) {
/** @param {Attr} attr */
function attributeString(attr) {
return ' ' + attr.nodeName + '="' + escapeHTML(attr.value) + '"';
}
// @ts-ignore
result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('')
+ '>';
}
/**
* @param {Node} node
*/
function close(node) {
result += '</' + tag(node) + '>';
}
/**
* @param {Event} event
*/
function render(event) {
(event.event === 'start' ? open : close)(event.node);
}
while (original.length || highlighted.length) {
let stream = selectStream();
result += escapeHTML(value.substring(processed, stream[0].offset));
processed = stream[0].offset;
if (stream === original) {
/*
On any opening or closing tag of the original markup we first close
the entire highlighted node stack, then render the original tag along
with all the following original tags at the same offset and then
reopen all the tags on the highlighted stack.
*/
nodeStack.reverse().forEach(close);
do {
render(stream.splice(0, 1)[0]);
stream = selectStream();
} while (stream === original && stream.length && stream[0].offset === processed);
nodeStack.reverse().forEach(open);
} else {
if (stream[0].event === 'start') {
nodeStack.push(stream[0].node);
} else {
nodeStack.pop();
}
render(stream.splice(0, 1)[0]);
}
}
return result + escapeHTML(value.substr(processed));
}
return mergeHTMLPlugin;
}());
function formatAndValidateJson(errorElement) {
const input = document.querySelector('#jsonBlock');
const processInfo = document.getElementById(errorElement);
const address = window.location.protocol + "//" + window.location.hostname + ":" + 8081 + "/json/formatting"
fetch(address, {
method: 'POST',
body: input.textContent
})
.then(async (response) => {
const promise = response.json();
if (!response.ok) {
throw Error(await promise);
}
return promise;
})
.then((data) => {
input.innerText = data.data;
processInfo.innerText = "";
hljs.highlightElement(input);
processInfo.innerHTML = "<b style='color: green'>Computed in </b> <span style='color: green'>" + data.time + "ms</span>";
})
.catch((error) => {
processInfo.innerHTML = "<b style='color: red'>" + error.data + "</b>";
console.error('Error:', error);
});
}
function minimizeJson(errorElement) {
const input = document.querySelector('#jsonBlock');
const processInfo = document.getElementById(errorElement);
const address = window.location.protocol + "//" + window.location.hostname + ":" + 8081 + "/json/minimize"
fetch(address, {
method: 'POST',
body: input.textContent
})
.then(async (response) => {
const promise = response.json();
if (!response.ok) {
throw Error(await promise);
}
return promise;
})
.then((data) => {
input.innerText = data.data;
processInfo.innerText = "";
hljs.highlightElement(input);
processInfo.innerHTML = "<b style='color: green'>Computed in </b> <span style='color: green'>" + data.time + "ms</span>";
})
.catch((error) => {
processInfo.innerHTML = "<b style='color: red'>" + error.data + "</b>";
console.error('Error:', error);
});
}
function clearJsonData() {
const input = document.querySelector('#jsonBlock');
input.textContent = "";
}
function insertDefaultJson() {
const input = document.querySelector('#jsonBlock');
input.textContent = "{\"enter\": \"your\", \"json\": \"here\"}";
hljs.highlightElement(input);
}
/**
* This function is executed after the page is loaded.
*
* @function
* @name init
* @kind function
*/
function init() {
// Make sure that only plain text is pasted
configurePastingInElement("jsonBlock");
hljs.addPlugin(mergeHTMLPlugin);
}

View File

@@ -1,254 +0,0 @@
var clientUUID = '';
var advancedDisplayed = false;
var json = {};
var jsonIndex = 0;
var host = window.location.protocol + "//" + window.location.hostname + "/mock";
const C_UUID = 'mock-uuid';
const C_ADV = 'advanced-mode';
const color_red = "#ff8f8f";
const color_grey = "#6b6b6b";
const setModified = function(){
setDataModified();
}
const getUpdate = function(){
updateData();
}
const dataRefresh = function(){
getData();
}
/*
Listeners segment
*/
$(document).on('change', '.data-field', setModified);
$('#btn-save').click(
() => {
disableSaveButton();
}
);
$('#btn-newRow').click(
()=> {
newRowInput();
setDataModified();
}
);
/*
Functions segment
*/
function disableSaveButton(){
$('#btn-save').removeClass('active');
$('#btn-save').off();
}
function createLink(uuid){
var link = host + '/api/mock/r/'+uuid;
return link;
}
function onLoad(){
loadCookies();
getData();
}
function getData(){
$.getJSON(host + '/api/mock/'+clientUUID, function(data) {
json = data;
loadFetchedMessage();
initializeUUID();
});
}
function loadCookies(){
clientUUID = getCookie(C_UUID);
advancedDisplayed = getCookie(C_ADV) == 'true';
}
function setCookie(){
document.cookie = C_UUID + '=' +clientUUID;
document.cookie = C_ADV + '=' + advancedVisibility;
}
function initializeUUID(){
if(clientUUID == null || clientUUID == undefined || clientUUID == ''){
clientUUID = json.clientUUID;
setCookie();
}
}
function httpStatusInvalid(){
value = $('#httpStatus').val();
return value == '';
}
function setDataModified(){
if(httpStatusInvalid()){
$('#btn-save').removeClass('active');
$('#btn-save').off();
document.getElementById("httpStatus").style.backgroundColor = color_red;
return;
}
$('#btn-save').addClass('active');
$('#btn-save').click(getUpdate);
document.getElementById("httpStatus").style.backgroundColor = null;
}
function getCookie(cname) {
var name = cname + '=';
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return '';
}
function updateData(){
var updatedJson = createRequestBody();
const dataSaved = function () {
loadFetchedMessage();
savedModalDisplay();
}
$.ajax({
url: host + '/api/mock',
type: 'PUT',
data: JSON.stringify(updatedJson, null, 2),
contentType: "application/json",
}).done(dataSaved);
disableSaveButton();
}
function loadFetchedMessage(){
fillStaticFields(
json.clientUUID,
json.contentType,
json.messageBody,
json.httpStatus);
fillHeaderTable(json.httpHeaders);
getHistoryData();
refreshHeaderTable(document.innerHTML);
}
function fillStaticFields(uuid, contentType, body, httpStatus){
let link = createLink(uuid);
let linkHtml = '<a class="hyperlink" target="_blank" href="'+link+'">'+link+'</a>';
$('#messageLink').html(linkHtml);
$('#httpStatus').val(httpStatus);
$('#typeSelector').val(contentType);
$('#bodyEditor').val(body);
}
function fillHeaderTable(headers){
var innerHTML = buildHeaderMapHtml(headers);
refreshHeaderTable(innerHTML);
}
function refreshHeaderTable(html){
$('#headerMapTable').html(html);
$('.btn-hashmap').click(function(){
setDataModified();
$(this).closest('tr').remove();
})
}
function buildHeaderMapHtml(headers){
var innerHTML = '';
for(var key in headers){
innerHTML += buildRowHtml(key, headers[key]);
}
return innerHTML;
}
function addRow(key, value){
var headerMap = $('#headerMapTable');
var headersMapHtml = headerMap.html();
headersMapHtml += buildRowHtml(key, value);
refreshHeaderTable(headersMapHtml);
}
function newRowInput(){
const hName = $('#headerKeyInput');
const hValue = $('#headerValueInput');
if(checkIfInputValid(hName.val()) && checkIfInputValid(hValue.val())){
addRow(hName.val(), hValue.val());
hName.val(null);
hValue.val(null);
}
}
function checkIfInputValid(input){
return !(input == '' || input == null || input == undefined);
}
function checkIfHeaderEssential(key){
if( key == "Connection" || key == "Keep-Alive" || key == "Date" ){
return true;
}
return false;
}
function buildRowHtml(key, value){
if(checkIfHeaderEssential(key)){
return '' +
'<tr>' +
'<td><input class="key data-field" value="' + key + '" readonly></td>' +
'<td><input class="data-field" value="' + value + '"></td>' +
'</tr>';
}
return '' +
'<tr>' +
'<td><input class="key data-field" value="' + key + '"></td>' +
'<td><input class="data-field" value="' + value + '"></td>' +
'<td><button class="modification-button btn-hashmap"><i class="icon-cancel"></i></button></td>' +
'</tr>';
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function createRequestBody(){
var newJson =
{
clientUUID: json.clientUUID,
contentType: $('#typeSelector').val(),
messageBody: $('#bodyEditor').val(),
httpStatus: $('#httpStatus').val(),
httpHeaders: {},
};
newJson['httpHeaders'] = convertTableToJson();
json = newJson;
return newJson;
}
function convertTableToJson(){
const rows = $('#headerMapTable').children();
var obj = {};
var key;
for(let i=0; i<rows.length; i++){
key = rows.eq(i).children().eq(0).children().eq(0).val();
obj[key] = rows.eq(i).children().eq(1).children().eq(0).val();
}
return obj;
}

View File

@@ -1,5 +0,0 @@
const deleteParent = function(){
$(this).closest('div.tile').remove();
}
$('#test1').click(deleteParent);

View File

@@ -1,49 +0,0 @@
var historyJson = {};
const maxIterations = 200;
function getHistoryData(){
$.getJSON(host + '/api/event/' + clientUUID, function(data){
historyJson = data;
displayHistory();
});
}
function historyToHtml(){
var innerHTML = '';
var iterations = historyJson.length <= maxIterations ? historyJson.length : maxIterations;
for(let i=0; i<iterations; i++){
let style = i%2==0 ? ' class="even"' : '';
innerHTML += '<tr' + style + '>' +
'<td>' + parseTimeStamp(historyJson[i].dateTimeStamp) + '</td>' +
'<td>' + historyJson[i].httpMethod + '</td>' +
'<td>' + parseRequestBody(historyJson[i].requestBody, i) + '</td>' +
'<td> <button id="'+i+'" class="showHeaderButton" onClick="showHeadersHistory(this);"> Show headers </button> </td>' +
'</tr>';
}
return innerHTML;
}
function parseRequestBody(requestBody,i){
return requestBody.length == 0 ?
"No request body" :
'<button id="'+i+'" class="showRequestBodyButton" onClick="showRequestBody(this);"> Show request body </button>'
}
function parseTimeStamp(timeStamp){
return timeStamp.substring(0,19).replace('T',' ');
}
function parseHeaders(pos){
parsedJson = new Map();
headers = historyJson[pos].headers
Object.keys( headers ).forEach(
(jsonKey) => {
parsedJson.set( jsonKey , headers[jsonKey] );
}
)
return parsedJson;
}
function displayHistory(){
$('#historyTable tbody').html(historyToHtml());
}

View File

@@ -1,53 +0,0 @@
var modalDisplayed = false;
var methodToCall = {
name: null,
id: null
};
const overlay = $('#overlay');
const savedModal = $('#modal-confirm');
const dataLossModal = $('#modal-query');
const dataLossModalYes = dataLossModal.children().eq(2).children().eq(0);
const dataLossModalNo = dataLossModal.children().eq(2).children().eq(1);
const allModals = $('.modal');
const btnModalClose = $('.modal button');
const closeModals = function() {
hideModal(allModals);
}
const savedModalDisplay = function() {
showModal(savedModal);
setTimeout(closeModals, 2000);
}
const dataLossModalDisplay = function(){
showModal(dataLossModal);
}
btnModalClose.click(closeModals);
overlay.click(closeModals);
dataLossModalNo.click(closeModals);
dataLossModalYes.click(dropChangesAndClose);
function setMethodToCall(name, id){
methodToCall.name = name;
methodToCall.id = id;
}
const dropChangesAndClose = function(){
callMethodByName(methodToCall)
hideModal(dataLossModal);
}
function showModal(jmodal){
if(modalDisplayed) return;
overlay.addClass('active');
jmodal.addClass('active');
modalDisplayed = true;
}
function hideModal(jmodal){
if(!modalDisplayed) return;
overlay.removeClass('active');
jmodal.removeClass('active');
modalDisplayed = false;
}

View File

@@ -1,34 +0,0 @@
function switchPopups (neededPopupOption) {
$('.hiddable-popup-option').addClass('hidden-popup-type');
$('#'+neededPopupOption).removeClass('hidden-popup-type');
}
function showPopup(){
$('.popup-flex').removeClass('hiddable-container');
}
function hidePopup(){
$('.popup-flex').addClass('hiddable-container');
$('.hiddable-popup-option').addClass('hidden-popup-type');
}
/*
* Event listener that's close the popup when user clicks out of a popup.
*/
window.addEventListener(
'click' ,
(clickedElement) => {
if(!document.getElementById('popup-body').contains(clickedElement.target) && clickedElement.target.className == 'popup-flex' ) {
hidePopup();
}
}
);
$('.popup-button-close').click(
() => {
hidePopup();
$('.hiddable-popup-option').addClass('hidden-popup-type')
}
);

View File

@@ -1,165 +0,0 @@
var advancedVisibility = false;
var focusedField = false;
/*
Listeners
*/
$("#optional").click(changeAdvancedVisibility);
$('#historyTab').click(showHistory);
$('.tooltipped').on("mouseenter" , (event) => {showTip(event.currentTarget.id+'Tip')})
.on( "mouseleave", (event) => {hideTip(event.currentTarget.id+'Tip')});
/*
Functions
*/
function changeAdvancedVisibility(){
if(advancedVisibility){
$("#advanced").removeClass('active');
advancedVisibility = false;
}
else {
$('#advanced').addClass('active');
advancedVisibility = true;
}
setCookie();
}
const tabitem = $('.tabitem');
function showHistory(){
$('#headersTab').click(showHeaders);
tabitem.removeClass('active');
$('.tabcontent').removeClass('active');
$('#history').addClass('active');
$('#historyTab').addClass('active');
$('#historyTab').off('click');
getHistoryData();
}
function showHeaders(){
$('#historyTab').click(showHistory);
tabitem.removeClass('active');
$('.tabcontent').removeClass('active');
$('#headers').addClass('active');
$('#headersTab').addClass('active');
$('#headersTab').off('click');
}
function showHeadersHistory(record){
historyTable = '';
headers = parseHeaders(record.id)
headers.forEach(
(value,key) => {
historyTable +=
'<tr>' +
'<td class="history-header-name">'+ key + '</td>' +
'<td class="history-header-value">'+ value + '</td>' +
'</tr>'
}
);
document.getElementById('header-history-table-body').innerHTML = historyTable;
switchPopups('history-headers-table');
showPopup();
}
async function formatJSON(json) {
const backend = "java";
const address = window.location.protocol + "//" + window.location.hostname + "/" + backend + "/json/formatting";
var init = {
body: json,
method: "POST"
};
var request = new Request(address, init);
var result = await fetch(request).then(response => {
return response.text().then(function (text) {
var json = JSON.parse(text);
json.status = response.status;
return json;
});
});
return result;
}
async function formatXML(xml) {
const backend = "libxml";
const address = window.location.protocol + "//" + window.location.hostname + "/" + backend + "/prettify";
var data = {
data: xml,
process: "",
processor: "libxml",
version: "1.0"
}
var init = {
body: JSON.stringify(data),
method: "POST"
};
var request = new Request(address, init);
var result = await fetch(request).then(response => {
return response.text().then(function (text) {
return JSON.parse(text);
});
});
return result;
}
function showRequestBody(element){
var historyRequestBody = historyJson[element.id].requestBody;
const popupContent = document.getElementById('code-highlight-content')
document.getElementById('code-highlight-content').innerText = "Loading...";
switch(historyJson[element.id].headers["content-type"]){
case "application/json":{
formatJSON(historyRequestBody).then(function(result) {
if (result.status == "200") {
popupContent.innerText = result.data;
highlightSyntax('code-highlight-content');
}
else {
popupContent.innerText = historyRequestBody;
}
});
break;
}
case "application/xml": {
formatXML(historyRequestBody).then(function(result) {
if (result.status == "OK") {
popupContent.innerText = result.result;
highlightSyntax('code-highlight-content');
}
else {
popupContent.innerText = historyRequestBody;
}
});
break;
}
default:{
popupContent.innerText = historyRequestBody;
highlightSyntax('code-highlight-content');
}
}
switchPopups('history-request-body');
showPopup();
}
function refreshHistoryRecords(){
getHistoryData();
}
function hideTip(element){
$('#'+element).removeClass('active');
}
function showTip(element){
$('.tip').removeClass('active');
$('#'+element).addClass('active');
}

View File

@@ -1,414 +0,0 @@
var defaultStrings = [];
const color_grey = "#6b6b6b";
const color_red = "#ff8f8f";
/**
* It clears default content of the element and sets it's color to black.
*
* @function
* @name clearDefaultContent
* @kind function
* @param {any} element to set
* @param {any} text to set
* @returns {void}
*/
function clearDefaultContent(element, text) {
if (element.innerText == text) {
element.innerText = "";
element.style.color = "#000000";
element.style.backgroundColor = "#ffffff";
}
}
/**
* It returns the value of the element with id "processors".
*
* @function
* @name getProcessor
* @kind function
* @returns {any}
*/
function getProcessor() {
return document.getElementById("processors").value;
}
/**
* It returns the value of the element with id "versions".
*
* @function
* @name getVersion
* @kind function
* @returns {any}
*/
function getVersion() {
return document.getElementById("versions").value;
}
/**
* It clears all data fields.
*
* @function
* @name clearDataField
* @kind function
*/
function clearDataField() {
document.getElementById("xmlArea").innerHTML = "";
document.getElementById("xmlArea").style.color = null;
document.getElementById("xmlArea").style.backgroundColor = null;
document.getElementById("transformArea").innerHTML = "";
document.getElementById("transformArea").style.color = null;
document.getElementById("transformArea").style.backgroundColor = null;
document.getElementById("resultArea").innerHTML = "";
}
/**
* It fills the XML area with a sample XML.
*
* @function
* @name fillDefaultXML
* @kind function
* @param {any} element
* @returns {void}
*/
function fillDefaultXML(element) {
if (element.classList.contains("active")) {
const serverAddress = window.location.protocol + "//" + window.location.hostname;
clearDefaultContent(document.getElementById("xmlArea"), "Insert XML here");
fetch(serverAddress + "/assets/samples/sampleXml.xml")
.then(response => response.text())
.then((exampleData) => {
document.getElementById("xmlArea").innerText = exampleData;
highlightSyntax("xmlArea");
document.getElementById("xmlArea").style.backgroundColor = null;
})
}
}
/**
* It fills the XSD area with a sample XSD and XML area with matching XML.
*
* @function
* @name fillDefaultXSD
* @kind function
* @param {any} element
* @returns {void}
*/
function fillDefaultXSD(){
const serverAddress = window.location.protocol + "//" + window.location.hostname;
fetch(serverAddress + "/assets/samples/sampleXSD.xsd")
.then( response => response.text() )
.then( (XSDSchema) => {
document.getElementById('transformArea').innerText = XSDSchema;
highlightSyntax("transformArea");
} )
fetch(serverAddress + "/assets/samples/sampleXMLForXSD.xml")
.then( response => response.text() )
.then( (XMLSample) => {
document.getElementById('xmlArea').innerText = XMLSample;
highlightSyntax("xmlArea");
} )
}
/**
* The `fillDefaultXSLT()` function fetches a default XSLT template from the server and sets the value of the element with id "transformArea" to the fetched template.
*
* @function
* @name fillDefaultXSLT
* @kind function
* @returns {void}
*/
function fillDefaultXSLT() {
const serverAddress = window.location.protocol + "//" + window.location.hostname;
fetch(serverAddress + "/assets/samples/XSLTTemplate.xslt")
.then( response => response.text() )
.then( (XSTLTemplate) => {
document.getElementById('transformArea').innerText = XSTLTemplate;
highlightSyntax("transformArea");
} )
}
/**
* It sets default content for the element an changes it's color to grey
*
* @function
* @name setDefaultContent
* @kind function
* @param {any} element to set
* @param {any} text to set
*/
function setDefaultContent(element, text) {
if (element.value == "") {
var id = element.getAttribute('id');
if (!defaultStrings.includes(text)) {
defaultStrings.push(text);
}
if (id == "xmlArea") {
element.style.color = color_grey;
element.value = text;
}
if (id == "transformArea") {
element.style.color = color_grey;
element.value = text;
}
if (id == "jsonArea") {
element.style.color = color_grey;
element.value = text;
}
}
}
/**
* It hides list for specified version of XPath
*
* @function
* @name hideList
* @kind function
* @param {any} collList class name of list to hide
* @returns {void}
*/
function hideList(collList) {
for (i = 0; i < collList.length; i++) {
if (collList[i].nextElementSibling !== null) {
collList[i].nextElementSibling.style.maxHeight = null;
collList[i].nextElementSibling.classList.toggle("collapsibleDataExpanded", false);
}
collList[i].style.display = 'none';
collList[i].classList.remove("collapsibleActive");
}
}
/**
* It checks if the text is a default text.
*
* @function
* @name checkDefault
* @kind function
* @param {any} text
* @returns {boolean}
*/
function checkDefault(text) {
return defaultStrings.includes(text);
}
/**
* It show list for specified version of XPath
*
* @function
* @name showList
* @kind function
* @param {any} collList class name of list to hide
* @returns {void}
*/
function showList(collList) {
for (i = 0; i < collList.length; i++) {
collList[i].style.display = 'block';
}
}
/**
* A function that is used to fold/unfold collapsible elements.
*
* @function
* @name smoothFoldElement
* @kind function
* @param {any} element
* @param {any} toogleState
* @param {any} toggleParrent
* @returns {void}
*/
function smoothFoldElement(element, toogleState, toggleParrent) {
if (toogleState) {
if (toggleParrent) {
element.parentElement.style.maxHeight = "0px";
}
element.classList.toggle("active", false);
var subLists = collapsibleData.getElementsByClassName("collapsibleData");
for (j = 0; j < subLists.length; j++) {
subLists[j].style.maxHeight = null;
}
} else {
collapsibleData.parentElement.style.maxHeight = (collapsibleData.parentElement.scrollHeight) + "px";
collapsibleData.classList.toggle("active", true);
if (collapsibleData.parentElement.classList.contains("collapsibleData") && collapsibleData.parentElement.classList.contains("active")) {
collapsibleData.parentElement.style.maxHeight = (collapsibleData.parentElement.scrollHeight + collapsibleData.scrollHeight) + "px";
}
}
}
/**
* Set tooltip info, function is called by onClick handlers
*
* @function
* @name refreshTooltip
* @kind function
* @returns {void}
*/
function refreshTooltip() {
var resizeList = document.getElementsByClassName("collapsibleData");
document.getElementById("processorTooltipInfo").innerText = procInfo;
document.getElementById("xsltelementsheader").innerText = XSLTheader;
}
/**
* A function that performs a request to the server.
*
* @function
* @name performRequest
* @kind function
* @param {any} endpoint of target service
* @param {any} checkXML enable checking for empty XML
* @param {any} checkTransform enable checking for empty transform data
* @returns {false | undefined}
*/
function performRequest(endpoint, checkXML, checkTransform) {
const sourceId = "xmlArea";
const transformId = "transformArea";
var xmlData = document.getElementById(sourceId).innerText.trim();
var transformData = document.getElementById(transformId).innerText.trim();
var backend = "java";
if (getProcessor() == "libxml") {
backend = "libxml";
}
var empty = false;
if (defaultStrings.includes(xmlData) && checkXML) {
document.getElementById(sourceId).style.backgroundColor = color_red;
xmlData = "";
empty = true;
}
if (defaultStrings.includes(transformData) && checkTransform) {
document.getElementById(transformId).style.backgroundColor = color_red;
empty = true;
}
if (!empty) {
restRequest(backend, endpoint, xmlData, transformData).then(function (result) {
document.getElementById("resultArea").innerText = result.result;
highlightSyntax("resultArea");
document.getElementById("procinfo").innerText = ' Computed using ' + result.processor;
if (result.status == "OK") {
document.getElementById("procinfo").innerText += " (" + result.time + "ms)";
if (result.type)
document.getElementById("procinfo").innerText += ". Returned: " + result.type;
else
document.getElementById("procinfo").innerText += ". Engine doesn't support return of data types.";
procinfo.style.color = "#30aa58";
} else {
procinfo.style.color = "#aa3030";
}
});
} else {
document.getElementById("resultArea").innerHTML = "No data provided!";
return false;
}
}
/**
* Function that prepares data to send and handles response
*
* @function
* @name performFormatRequest
* @kind function
* @param {any} endpoint of target service
* @param {any} checkXML enable checking for empty XML
* @param {any} sourceId ID of element to get XML from
* @param {any} targetId ID of element to write formatted XML
* @returns {void}
*/
function performFormatRequest(endpoint, checkXML, sourceId, targetId) {
const sourceElement = document.getElementById(sourceId);
const targetElement = document.getElementById(targetId);
const infoElement = document.getElementById("formatinfo");
const backend = "libxml";
var xmlData = sourceElement.innerText.trim();
var empty = false;
if (defaultStrings.includes(xmlData) && checkXML) {
sourceElement.style.backgroundColor = color_red;
xmlData = "";
empty = true;
}
if (!empty) {
restRequest(backend, endpoint, xmlData, "").then(function (result) {
if (result.status == "OK") {
targetElement.innerText = result.result.trim();
highlightSyntax(targetElement.id);
targetElement.style.backgroundColor = null;
infoElement.innerText = ' Computed'.concat(" in ", result.time, "ms.");
infoElement.style.color = "#30aa58";
}
else {
targetElement.style.backgroundColor = color_red;
infoElement.innerText = result.result;
infoElement.style.color = "#aa3030";
}
});
}
}
/**
* Form REST request, send and return received data
*
* @async
* @function
* @name restRequest
* @kind function
* @param {any} backend target backend
* @param {any} endpoint of target service
* @param {any} xmlData XML that will be sent
* @param {any} transformData data used to transform given XML
* @returns {Promise<any>}
*/
async function restRequest(backend, endpoint, xmlData, transformData) {
const addr = window.location.protocol + "//" + window.location.hostname + "/" + backend + "/" + endpoint;
if (defaultStrings.includes(xmlData)) {
xmlData = "<empty/>";
}
var jsonData = JSON.stringify({
"data": xmlData,
"process": transformData,
"processor": getProcessor(),
"version": getVersion()
});
var init = {
headers: new Headers({
}),
body: jsonData,
// body: data,
method: "POST"
};
var request = new Request(addr, init);
var result = await fetch(request).then(response => {
return response.text().then(function (text) {
return JSON.parse(text);
});
});
return result;
}

View File

@@ -1,34 +0,0 @@
/**
* This function is executed after the page is loaded.
*
* @function
* @name init
* @kind function
*/
function init() {
configurePastingInElement("xmlArea");
}
/**
* Function returns processor that will be used to transform XML.
* This solution allows to use one function for sending request from every tool
*
* @function
* @name getProcessor
* @kind function
*/
function getProcessor() {
return "libxml";
}
/**
* Function returns version of XML processor that will be used to transform XML.
* This solution allows to use one function for sending request from every tool
*
* @function
* @name getVersion
* @kind function
*/
function getVersion() {
return "1.0"
}

View File

@@ -1,174 +0,0 @@
/**
* The `processVersionSelector()` function is responsible for updating the display of the web page
* based on the selected processor and version.
*
* @function
* @name processVersionSelector
* @kind function
* @returns {void}
*/
function processVersionSelector() {
var processor = getProcessor();
var hideableOptions = document.getElementsByClassName("hideable");
for (let i = 0; i < hideableOptions.length; i++) {
hideableOptions[i].style = "display: none;";
}
if (processor == "xalan" || processor == "libxml") {
var xalanOptions = document.getElementsByClassName("xalan");
for (let i = 0; i < xalanOptions.length; i++) {
xalanOptions[i].style = "";
}
document.getElementById("versions").selectedIndex = 0;
}
else {
var saxonOptions = document.getElementsByClassName("saxon");
for (let i = 0; i < saxonOptions.length; i++) {
saxonOptions[i].style = "";
}
document.getElementById("versions").selectedIndex = 3;
}
processTooltip();
}
/**
* The `processTooltip()` function is responsible for updating the display of the tooltip based on the selected version of the processor.
* It shows or hides different sections of the tooltip based on the selected version.
* It also handles the click event on the form and updates the tooltip accordingly.
*
* @function
* @name processTooltip
* @kind function
*/
function processTooltip() {
var filter = "collapse" + getVersion();
var collList;
if (filter == "collapse3.0") {
document.getElementById("tooltipFunctionInfo").innerText = "XPath 3.0 functions";
hideList(document.getElementsByName("collapse10"));
hideList(document.getElementsByName("collapse20"));
showList(document.getElementsByName("collapse30"));
hideList(document.getElementsByName("collapse31"));
} else if (filter == "collapse3.1") {
document.getElementById("tooltipFunctionInfo").innerText = "XPath 3.1 functions";
hideList(document.getElementsByName("collapse10"));
hideList(document.getElementsByName("collapse20"));
hideList(document.getElementsByName("collapse30"));
showList(document.getElementsByName("collapse31"));
} else if (filter == "collapse2.0") {
document.getElementById("tooltipFunctionInfo").innerText = "XPath 2.0 functions";
hideList(document.getElementsByName("collapse10"));
showList(document.getElementsByName("collapse20"));
hideList(document.getElementsByName("collapse30"));
hideList(document.getElementsByName("collapse31"));
} else {
document.getElementById("tooltipFunctionInfo").innerText = "XPath 1.0 functions";
showList(document.getElementsByName("collapse10"));
hideList(document.getElementsByName("collapse20"));
hideList(document.getElementsByName("collapse30"));
hideList(document.getElementsByName("collapse31"));
}
}
/**
* This function is executed after the page is loaded.
*
* @function
* @name init
* @kind function
*/
function init() {
// Make sure that only plain text is pasted
configurePastingInElement("xmlArea");
configurePastingInElement("transformArea");
//Handle clicks in whole form and set info in tooltip
setDefaultContent(document.getElementById("xmlArea"), 'Insert XML here');
setDefaultContent(document.getElementById("transformArea"), 'Insert XPath expression here');
processVersionSelector();
processTooltip();
tool.addEventListener('change', event => {
//Check if script was called from textarea or selector
var targetID = event.target.getAttribute('id');
if (targetID == "processors") {
processVersionSelector();
processTooltip();
}
else if (targetID == "versions") {
processTooltip();
}
})
tool.addEventListener('click', event => {
//Check if script was called from textarea or selector
var targetID = event.target.getAttribute('id');
if (targetID !== "xmlArea" && targetID !== "transformArea") {
return;
}
processTooltip();
})
tool.addEventListener('change', event => {
//Check if script was called from textarea or selector
var targetID = event.target.getAttribute('id');
if (targetID !== "xmlArea" && targetID !== "transformArea") {
return;
}
processTooltip();
})
var triggerList = document.getElementsByClassName("collapseTrigger");
for (i = 0; i < triggerList.length; i++) {
triggerList[i].addEventListener("click", function () {
var collapsible = this.parentElement;
if (this.tagName == "A") {
var collapsibleData = this.nextElementSibling;
} else {
var collapsibleData = this.parentElement.nextElementSibling;
}
if (collapsibleData.style.maxHeight > "0px") {
collapsibleData.style.maxHeight = "0px";
this.classList.toggle("active", false);
if (!this.classList.contains("collapsibleMini")) {
collapsible.classList.toggle("active", false);
}
var subLists1 = collapsibleData.getElementsByClassName("content");
var subLists2 = collapsibleData.getElementsByClassName("active");
for (j = 0; j < subLists1.length; j++) {
subLists1[j].style.maxHeight = "0px";
}
for (j = 0; j < subLists2.length; j++) {
subLists2[j].classList.toggle("active", false);
}
} else {
collapsibleData.style.maxHeight = (collapsibleData.scrollHeight) + "px";
this.classList.toggle("active", true);
if (!this.classList.contains("collapsibleMini")) {
collapsible.classList.toggle("active", true);
} else {
var parentContent = this.closest(".content");
parentContent.style.maxHeight = (parentContent.scrollHeight + collapsibleData.scrollHeight) + "px";
}
}
});
}
}

View File

@@ -1,51 +0,0 @@
/**
* This function is executed after the page is loaded.
*
* @function
* @name init
* @kind function
*/
function init() {
// Make sure that only plain text is pasted
configurePastingInElement("xmlArea");
configurePastingInElement("transformArea");
//Handle clicks in whole form and set info in tooltip
setDefaultContent(document.getElementById("xmlArea"), 'Insert XML here');
setDefaultContent(document.getElementById("transformArea"), 'Insert XSD here');
// refreshTooltip();
processTooltip();
tool.addEventListener('click', event => {
//Check if script was called from textarea or selector
var targetID = event.target.getAttribute('id');
if (targetID !== "processors" && targetID !== "xmlArea" && targetID !== "transformArea" && targetID !== "versions") {
return;
}
processTooltip();
})
}
/**
* The `processTooltip()` function is responsible for updating the display of the tooltip based on the selected version of the processor.
* It shows or hides different sections of the tooltip based on the selected version.
* It also handles the click event on the form and updates the tooltip accordingly.
*
* @function
* @name processTooltip
* @kind function
*/
function processTooltip() {
if (getProcessor() == "xalan") {
document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0 functions";
document.getElementById("processorTooltipInfo").innerText = "Supports XSLT 1.0";
hideList(document.getElementsByName("collapse30"));
} else {
document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0, 2.0 & 3.0 functions";
document.getElementById("processorTooltipInfo").innerText = "Supports XSLT up to 3.0";
showList(document.getElementsByName("collapse30"));
}
}

View File

@@ -1,100 +0,0 @@
/**
* The `processTooltip()` function is responsible for updating the display of the tooltip based on the selected version of the processor.
* It shows or hides different sections of the tooltip based on the selected version.
* It also handles the click event on the form and updates the tooltip accordingly.
*
* @function
* @name processTooltip
* @kind function
*/
function processTooltip() {
if (getProcessor() == "xalan" || getProcessor() == "libxml") {
document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0 functions";
document.getElementById("processorTooltipInfo").innerText = "Supports XSLT 1.0";
hideList(document.getElementsByName("collapse30"));
} else {
document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0, 2.0 & 3.0 functions";
document.getElementById("processorTooltipInfo").innerText = "Supports XSLT up to 3.0";
showList(document.getElementsByName("collapse30"));
}
}
/**
* This function is executed after the page is loaded.
*
* @function
* @name init
* @kind function
*/
function init() {
// Make sure that only plain text is pasted
configurePastingInElement("xmlArea");
configurePastingInElement("transformArea");
//Handle clicks in whole form and set info in tooltip
setDefaultContent(document.getElementById("xmlArea"), 'Insert XML here');
setDefaultContent(document.getElementById("transformArea"), 'Insert XSLT here');
// refreshTooltip();
processTooltip();
tool.addEventListener('click', event => {
//Check if script was called from textarea or selector
var targetID = event.target.getAttribute('id');
if (targetID !== "processors" && targetID !== "xmlArea" && targetID !== "transformArea" && targetID !== "versions") {
return;
}
processTooltip();
})
tool.addEventListener('change', event => {
//Check if script was called from textarea or selector
var targetID = event.target.getAttribute('id');
if (targetID !== "processors") {
return;
}
processTooltip();
})
var triggerList = document.getElementsByClassName("collapseTrigger");
for (i = 0; i < triggerList.length; i++) {
triggerList[i].addEventListener("click", function () {
var collapsible = this.parentElement;
var collapsibleData = this.nextElementSibling;
if (collapsibleData.style.maxHeight > "0px") {
collapsibleData.style.maxHeight = "0px";
this.classList.toggle("active", false);
if (!this.classList.contains("collapsibleMini")) {
collapsible.classList.toggle("active", false);
}
var subLists1 = collapsibleData.getElementsByClassName("content");
var subLists2 = collapsibleData.getElementsByClassName("active");
for (j = 0; j < subLists1.length; j++) {
subLists1[j].style.maxHeight = "0px";
}
for (j = 0; j < subLists2.length; j++) {
subLists2[j].classList.toggle("active", false);
}
} else {
collapsibleData.style.maxHeight = (collapsibleData.scrollHeight) + "px";
this.classList.toggle("active", true);
if (!this.classList.contains("collapsibleMini")) {
collapsible.classList.toggle("active", true);
} else {
var parentContent = this.closest(".content");
parentContent.style.maxHeight = (parentContent.scrollHeight + collapsibleData.scrollHeight) + "px";
}
}
});
}
}

View File

@@ -1,6 +0,0 @@
@import url('https://necolas.github.io/normalize.css/8.0.1/normalize.css');
@import url('Frontend/css/r11addons.css');
@import url('Frontend/css/r11tables.css');
@import url('Frontend/css/r11tool.css');
@import url('Frontend/css/r11tooltip.css');
@import url('Frontend/css/r11modal.css');

1
Frontend/env.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
/// <reference types="vite/client" />

View File

@@ -1,57 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="assets/css/frame.css">
<script src="assets/scripts/common/jquery-3.6.0.slim.min.js"></script>
<script src="assets/scripts/frame.js"></script>
<link rel="shortcut icon" href="assets/images/favicon.ico" type="image/x-icon">
<!-- Meta tags for SEO and SEM -->
<title>Release11 Web Tools</title>
<meta name=”robots” content="index, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description"
content="Unleash the power of Release11's suite of intuitive web tools, including XPath, XSLT, XSD, XML Formatter, JSON Formatter, and REST Mocking services, designed to streamline your development experience and elevate your projects.">
</head>
<body onload="init()">
<div id="header">
<div id="leftElements">
<div id="logo"><a href="http://release11.com/"><img src="assets/images/logo_czarne.svg" alt="Release11"></a></div>
<div id="menu">
<a href="#" onclick="changeActiveTools('XML')" class="active">XML</a>
<a href="#" onclick="changeActiveTools('JSON')">JSON</a>
<a href="#" onclick="changeActiveTools('REST')">REST</a>
</div>
</div>
<div id="titlebar"><p>Internet Tools</p></div>
</div>
<div id="filler"></div>
<div id="content">
<div id="leftBar">
<ul id="toolList">
<li class="toolListRow restTool"><a href="#" onclick="changeTool('mock');">REST Mock</a></li>
<li class="toolListRow xmlTool"><a href="#" onclick="changeTool('xpath');">XPath</a></li>
<li class="toolListRow xmlTool"><a href="#" onclick="changeTool('xslt');">XSLT</a></li>
<li class="toolListRow xmlTool"><a href="#" onclick="changeTool('xsd');">XSD</a></li>
<li class="toolListRow xmlTool"><a href="#" onclick="changeTool('xmlform');">XML Formatter</a></li>
<li class="toolListRow jsonTool"><a href="#" onclick="changeTool('jsonform');">JSON Formatter</a></li>
</ul>
<div id="copyright">
Build: [:VERSION:]<br>
Copyright © 2023<br>
<a href="http://release11.com/">Release11 Sp. z. o. o.</a><br>
<a href="lawful/terms-of-service.html">Terms of use</a><br>
<a href="lawful/privacy-policy.html">Privacy statement</a><bR>
<div class="separator"></div>
<a href="mailto:bugs@release11.com">Found a bug?</a>
</div>
</div>
<iframe id="iframe" name="iframe" frameborder="0"></iframe>
</div>
</body>
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Release11 Tools</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

View File

@@ -1,5 +0,0 @@
#!/bin/sh
input="$(date +'%Y-%m-%d %H:%M')"
sed -i "s/\[\:VERSION\:\]/$input/g" /usr/share/nginx/html/index.html

View File

@@ -1,43 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="/assets/css/lawful.css">
<link rel="shortcut icon" href="assets/images/favicon.ico" type="image/x-icon">
</head>
<body>
<div id="header">
<div id="logo"><a href="http://release11.com/"><img src="/assets/images/logo_czarne.svg" alt="Release11"></a></div>
</div>
<div id="content">
<h1>Lorem ipsum</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nullam ac tortor vitae purus. Felis imperdiet proin fermentum leo. Donec adipiscing tristique risus nec feugiat in fermentum. Etiam dignissim diam quis enim lobortis. Amet dictum sit amet justo donec. Leo integer malesuada nunc vel risus commodo. Scelerisque purus semper eget duis at tellus. In ornare quam viverra orci sagittis. Ultrices tincidunt arcu non sodales neque sodales.</p>
<h2>Congue nisi vitae</h2>
<p>Congue nisi vitae suscipit tellus mauris a diam. Ullamcorper velit sed ullamcorper morbi tincidunt ornare massa eget egestas. Scelerisque eu ultrices vitae auctor eu augue. Sit amet mauris commodo quis imperdiet massa tincidunt nunc pulvinar. Et magnis dis parturient montes nascetur. Imperdiet dui accumsan sit amet nulla facilisi morbi tempus. Quisque non tellus orci ac auctor. Tempor orci eu lobortis elementum nibh tellus molestie nunc. Purus in massa tempor nec feugiat nisl. Ultrices eros in cursus turpis. Feugiat scelerisque varius morbi enim nunc faucibus a pellentesque sit. Diam sit amet nisl suscipit adipiscing bibendum est ultricies. Egestas quis ipsum suspendisse ultrices gravida dictum fusce ut placerat. Et molestie ac feugiat sed. Ut tortor pretium viverra suspendisse potenti. Malesuada bibendum arcu vitae elementum curabitur vitae nunc.</p>
<p>Interdum posuere lorem ipsum dolor sit amet. Amet porttitor eget dolor morbi non. Nulla pellentesque dignissim enim sit amet. Volutpat lacus laoreet non curabitur. Lectus quam id leo in vitae turpis massa. Facilisis sed odio morbi quis commodo odio aenean. Posuere lorem ipsum dolor sit. Tempor commodo ullamcorper a lacus. Metus vulputate eu scelerisque felis imperdiet proin fermentum leo. Aliquam sem fringilla ut morbi tincidunt augue interdum. Tellus mauris a diam maecenas sed enim ut sem. Placerat in egestas erat imperdiet sed euismod nisi porta lorem. Pellentesque id nibh tortor id aliquet lectus proin. A cras semper auctor neque vitae. Non curabitur gravida arcu ac. Netus et malesuada fames ac turpis. Nulla porttitor massa id neque aliquam. Aliquam nulla facilisi cras fermentum odio eu. Cras ornare arcu dui vivamus arcu felis bibendum ut. Non enim praesent elementum facilisis leo.</p>
<p>Lectus arcu bibendum at varius. Vestibulum lectus mauris ultrices eros in cursus turpis massa tincidunt. Libero nunc consequat interdum varius sit amet mattis vulputate enim. Facilisis leo vel fringilla est. Eros in cursus turpis massa tincidunt dui ut ornare. In mollis nunc sed id semper risus. Morbi tincidunt ornare massa eget egestas purus. Libero volutpat sed cras ornare. Sit amet commodo nulla facilisi nullam vehicula ipsum a. Viverra suspendisse potenti nullam ac tortor. Cursus vitae congue mauris rhoncus aenean vel elit scelerisque mauris. Vitae semper quis lectus nulla. Nunc sed blandit libero volutpat sed cras. Morbi tristique senectus et netus et malesuada fames. Pretium quam vulputate dignissim suspendisse in. A iaculis at erat pellentesque adipiscing commodo elit at imperdiet.</p>
<p>Nec sagittis aliquam malesuada bibendum. In ante metus dictum at tempor commodo ullamcorper. Nec sagittis aliquam malesuada bibendum arcu vitae elementum. Diam phasellus vestibulum lorem sed risus. Diam maecenas ultricies mi eget mauris pharetra et ultrices neque. Amet volutpat consequat mauris nunc congue nisi vitae suscipit tellus. Quam nulla porttitor massa id neque. Dictum non consectetur a erat nam. At consectetur lorem donec massa sapien faucibus. Sagittis nisl rhoncus mattis rhoncus urna neque viverra justo nec. Non enim praesent elementum facilisis leo vel. Rhoncus urna neque viverra justo nec ultrices dui sapien eget.</p>
<h2>Amet facilisis</h2>
<p>Amet facilisis magna etiam tempor. Vestibulum rhoncus est pellentesque elit. Fames ac turpis egestas integer eget. Dapibus ultrices in iaculis nunc. Sed turpis tincidunt id aliquet risus feugiat in. Et netus et malesuada fames ac. Amet massa vitae tortor condimentum lacinia. Felis eget nunc lobortis mattis aliquam faucibus purus. Nibh sed pulvinar proin gravida hendrerit lectus. Varius morbi enim nunc faucibus a pellentesque sit. Aliquam sem fringilla ut morbi. Sed nisi lacus sed viverra tellus in hac. Quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Enim blandit volutpat maecenas volutpat blandit aliquam etiam. Fermentum iaculis eu non diam phasellus vestibulum lorem sed risus. Massa id neque aliquam vestibulum morbi. Enim diam vulputate ut pharetra. Orci sagittis eu volutpat odio facilisis.</p>
<p>Sit amet cursus sit amet. Odio ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Amet est placerat in egestas erat imperdiet sed euismod nisi. Mattis vulputate enim nulla aliquet porttitor. At risus viverra adipiscing at in tellus integer. Sed viverra ipsum nunc aliquet. Dignissim cras tincidunt lobortis feugiat vivamus at augue eget arcu. Euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis. Placerat in egestas erat imperdiet sed. Eleifend donec pretium vulputate sapien nec. Ipsum dolor sit amet consectetur adipiscing.</p>
<p>Morbi tristique senectus et netus et malesuada fames ac. Feugiat nibh sed pulvinar proin gravida hendrerit lectus. Amet purus gravida quis blandit turpis cursus in hac. Nulla aliquet enim tortor at auctor. Nulla facilisi etiam dignissim diam. Consequat nisl vel pretium lectus quam id leo. Enim neque volutpat ac tincidunt vitae semper. Tristique nulla aliquet enim tortor at. Eu mi bibendum neque egestas congue quisque egestas diam. Est ante in nibh mauris cursus. Felis bibendum ut tristique et. Tristique nulla aliquet enim tortor at. Non curabitur gravida arcu ac tortor dignissim convallis aenean. Eleifend donec pretium vulputate sapien nec. Massa tempor nec feugiat nisl pretium fusce id. Nulla facilisi morbi tempus iaculis urna id. Ornare suspendisse sed nisi lacus sed viverra tellus in.</p>
<p>Morbi non arcu risus quis varius quam. Rhoncus est pellentesque elit ullamcorper dignissim cras. Gravida rutrum quisque non tellus orci ac auctor augue. Consequat semper viverra nam libero justo laoreet sit amet. Pellentesque habitant morbi tristique senectus et netus et malesuada. Ullamcorper eget nulla facilisi etiam dignissim diam quis enim. Quisque sagittis purus sit amet volutpat consequat mauris nunc congue. Sed tempus urna et pharetra pharetra massa massa ultricies mi. Quis lectus nulla at volutpat diam ut venenatis. Amet porttitor eget dolor morbi non arcu. Massa tincidunt dui ut ornare lectus sit amet est placerat. Odio tempor orci dapibus ultrices in iaculis nunc sed augue. Vitae turpis massa sed elementum tempus egestas sed. Velit egestas dui id ornare arcu odio. Scelerisque felis imperdiet proin fermentum leo vel orci porta non. Arcu bibendum at varius vel pharetra. Sapien eget mi proin sed libero enim. Tempus imperdiet nulla malesuada pellentesque elit eget. Semper auctor neque vitae tempus. Dolor magna eget est lorem ipsum.</p>
<p>Augue neque gravida in fermentum et sollicitudin ac orci phasellus. Est placerat in egestas erat imperdiet sed euismod nisi. Aliquet risus feugiat in ante metus dictum at tempor commodo. Ultricies integer quis auctor elit sed vulputate. Aliquet risus feugiat in ante metus dictum. Accumsan lacus vel facilisis volutpat est velit. Augue mauris augue neque gravida in fermentum et sollicitudin. Vel quam elementum pulvinar etiam. Amet aliquam id diam maecenas ultricies mi. Elit pellentesque habitant morbi tristique senectus et. Habitant morbi tristique senectus et netus et malesuada fames. Nisl nisi scelerisque eu ultrices. Morbi tristique senectus et netus. Et malesuada fames ac turpis egestas. Magna ac placerat vestibulum lectus mauris ultrices eros in cursus. Dis parturient montes nascetur ridiculus.</p>
</div>
</body>
</html>

View File

@@ -1,43 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="/assets/css/lawful.css">
<link rel="shortcut icon" href="assets/images/favicon.ico" type="image/x-icon">
</head>
<body>
<div id="header">
<div id="logo"><a href="http://release11.com/"><img src="/assets/images/logo_czarne.svg" alt="Release11"></a></div>
</div>
<div id="content">
<h1>Lorem ipsum</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nullam ac tortor vitae purus. Felis imperdiet proin fermentum leo. Donec adipiscing tristique risus nec feugiat in fermentum. Etiam dignissim diam quis enim lobortis. Amet dictum sit amet justo donec. Leo integer malesuada nunc vel risus commodo. Scelerisque purus semper eget duis at tellus. In ornare quam viverra orci sagittis. Ultrices tincidunt arcu non sodales neque sodales.</p>
<h2>Congue nisi vitae</h2>
<p>Congue nisi vitae suscipit tellus mauris a diam. Ullamcorper velit sed ullamcorper morbi tincidunt ornare massa eget egestas. Scelerisque eu ultrices vitae auctor eu augue. Sit amet mauris commodo quis imperdiet massa tincidunt nunc pulvinar. Et magnis dis parturient montes nascetur. Imperdiet dui accumsan sit amet nulla facilisi morbi tempus. Quisque non tellus orci ac auctor. Tempor orci eu lobortis elementum nibh tellus molestie nunc. Purus in massa tempor nec feugiat nisl. Ultrices eros in cursus turpis. Feugiat scelerisque varius morbi enim nunc faucibus a pellentesque sit. Diam sit amet nisl suscipit adipiscing bibendum est ultricies. Egestas quis ipsum suspendisse ultrices gravida dictum fusce ut placerat. Et molestie ac feugiat sed. Ut tortor pretium viverra suspendisse potenti. Malesuada bibendum arcu vitae elementum curabitur vitae nunc.</p>
<p>Interdum posuere lorem ipsum dolor sit amet. Amet porttitor eget dolor morbi non. Nulla pellentesque dignissim enim sit amet. Volutpat lacus laoreet non curabitur. Lectus quam id leo in vitae turpis massa. Facilisis sed odio morbi quis commodo odio aenean. Posuere lorem ipsum dolor sit. Tempor commodo ullamcorper a lacus. Metus vulputate eu scelerisque felis imperdiet proin fermentum leo. Aliquam sem fringilla ut morbi tincidunt augue interdum. Tellus mauris a diam maecenas sed enim ut sem. Placerat in egestas erat imperdiet sed euismod nisi porta lorem. Pellentesque id nibh tortor id aliquet lectus proin. A cras semper auctor neque vitae. Non curabitur gravida arcu ac. Netus et malesuada fames ac turpis. Nulla porttitor massa id neque aliquam. Aliquam nulla facilisi cras fermentum odio eu. Cras ornare arcu dui vivamus arcu felis bibendum ut. Non enim praesent elementum facilisis leo.</p>
<p>Lectus arcu bibendum at varius. Vestibulum lectus mauris ultrices eros in cursus turpis massa tincidunt. Libero nunc consequat interdum varius sit amet mattis vulputate enim. Facilisis leo vel fringilla est. Eros in cursus turpis massa tincidunt dui ut ornare. In mollis nunc sed id semper risus. Morbi tincidunt ornare massa eget egestas purus. Libero volutpat sed cras ornare. Sit amet commodo nulla facilisi nullam vehicula ipsum a. Viverra suspendisse potenti nullam ac tortor. Cursus vitae congue mauris rhoncus aenean vel elit scelerisque mauris. Vitae semper quis lectus nulla. Nunc sed blandit libero volutpat sed cras. Morbi tristique senectus et netus et malesuada fames. Pretium quam vulputate dignissim suspendisse in. A iaculis at erat pellentesque adipiscing commodo elit at imperdiet.</p>
<p>Nec sagittis aliquam malesuada bibendum. In ante metus dictum at tempor commodo ullamcorper. Nec sagittis aliquam malesuada bibendum arcu vitae elementum. Diam phasellus vestibulum lorem sed risus. Diam maecenas ultricies mi eget mauris pharetra et ultrices neque. Amet volutpat consequat mauris nunc congue nisi vitae suscipit tellus. Quam nulla porttitor massa id neque. Dictum non consectetur a erat nam. At consectetur lorem donec massa sapien faucibus. Sagittis nisl rhoncus mattis rhoncus urna neque viverra justo nec. Non enim praesent elementum facilisis leo vel. Rhoncus urna neque viverra justo nec ultrices dui sapien eget.</p>
<h2>Amet facilisis</h2>
<p>Amet facilisis magna etiam tempor. Vestibulum rhoncus est pellentesque elit. Fames ac turpis egestas integer eget. Dapibus ultrices in iaculis nunc. Sed turpis tincidunt id aliquet risus feugiat in. Et netus et malesuada fames ac. Amet massa vitae tortor condimentum lacinia. Felis eget nunc lobortis mattis aliquam faucibus purus. Nibh sed pulvinar proin gravida hendrerit lectus. Varius morbi enim nunc faucibus a pellentesque sit. Aliquam sem fringilla ut morbi. Sed nisi lacus sed viverra tellus in hac. Quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Enim blandit volutpat maecenas volutpat blandit aliquam etiam. Fermentum iaculis eu non diam phasellus vestibulum lorem sed risus. Massa id neque aliquam vestibulum morbi. Enim diam vulputate ut pharetra. Orci sagittis eu volutpat odio facilisis.</p>
<p>Sit amet cursus sit amet. Odio ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Amet est placerat in egestas erat imperdiet sed euismod nisi. Mattis vulputate enim nulla aliquet porttitor. At risus viverra adipiscing at in tellus integer. Sed viverra ipsum nunc aliquet. Dignissim cras tincidunt lobortis feugiat vivamus at augue eget arcu. Euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis. Placerat in egestas erat imperdiet sed. Eleifend donec pretium vulputate sapien nec. Ipsum dolor sit amet consectetur adipiscing.</p>
<p>Morbi tristique senectus et netus et malesuada fames ac. Feugiat nibh sed pulvinar proin gravida hendrerit lectus. Amet purus gravida quis blandit turpis cursus in hac. Nulla aliquet enim tortor at auctor. Nulla facilisi etiam dignissim diam. Consequat nisl vel pretium lectus quam id leo. Enim neque volutpat ac tincidunt vitae semper. Tristique nulla aliquet enim tortor at. Eu mi bibendum neque egestas congue quisque egestas diam. Est ante in nibh mauris cursus. Felis bibendum ut tristique et. Tristique nulla aliquet enim tortor at. Non curabitur gravida arcu ac tortor dignissim convallis aenean. Eleifend donec pretium vulputate sapien nec. Massa tempor nec feugiat nisl pretium fusce id. Nulla facilisi morbi tempus iaculis urna id. Ornare suspendisse sed nisi lacus sed viverra tellus in.</p>
<p>Morbi non arcu risus quis varius quam. Rhoncus est pellentesque elit ullamcorper dignissim cras. Gravida rutrum quisque non tellus orci ac auctor augue. Consequat semper viverra nam libero justo laoreet sit amet. Pellentesque habitant morbi tristique senectus et netus et malesuada. Ullamcorper eget nulla facilisi etiam dignissim diam quis enim. Quisque sagittis purus sit amet volutpat consequat mauris nunc congue. Sed tempus urna et pharetra pharetra massa massa ultricies mi. Quis lectus nulla at volutpat diam ut venenatis. Amet porttitor eget dolor morbi non arcu. Massa tincidunt dui ut ornare lectus sit amet est placerat. Odio tempor orci dapibus ultrices in iaculis nunc sed augue. Vitae turpis massa sed elementum tempus egestas sed. Velit egestas dui id ornare arcu odio. Scelerisque felis imperdiet proin fermentum leo vel orci porta non. Arcu bibendum at varius vel pharetra. Sapien eget mi proin sed libero enim. Tempus imperdiet nulla malesuada pellentesque elit eget. Semper auctor neque vitae tempus. Dolor magna eget est lorem ipsum.</p>
<p>Augue neque gravida in fermentum et sollicitudin ac orci phasellus. Est placerat in egestas erat imperdiet sed euismod nisi. Aliquet risus feugiat in ante metus dictum at tempor commodo. Ultricies integer quis auctor elit sed vulputate. Aliquet risus feugiat in ante metus dictum. Accumsan lacus vel facilisis volutpat est velit. Augue mauris augue neque gravida in fermentum et sollicitudin. Vel quam elementum pulvinar etiam. Amet aliquam id diam maecenas ultricies mi. Elit pellentesque habitant morbi tristique senectus et. Habitant morbi tristique senectus et netus et malesuada fames. Nisl nisi scelerisque eu ultrices. Morbi tristique senectus et netus. Et malesuada fames ac turpis egestas. Magna ac placerat vestibulum lectus mauris ultrices eros in cursus. Dis parturient montes nascetur ridiculus.</p>
</div>
</body>
</html>

View File

@@ -8,6 +8,7 @@ server {
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
expires -1;
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
}
@@ -17,6 +18,11 @@ server {
proxy_set_header Host $host;
}
location /api/mock {
proxy_pass http://xmltools-mocked-services:8097/api/mock;
proxy_set_header Host $host;
}
location /libxml/ {
proxy_pass http://xmltools-libxml-backend/;
proxy_set_header Host $host;

8055
Frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

43
Frontend/package.json Normal file
View File

@@ -0,0 +1,43 @@
{
"name": "new-frontend",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite --host",
"build": "run-p type-check build-only",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/"
},
"dependencies": {
"@codemirror/lang-html": "^6.4.5",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/lang-xml": "^6.0.2",
"@codemirror/theme-one-dark": "^6.1.2",
"codemirror": "^6.0.1",
"vue": "^3.3.4",
"vue-codemirror": "^6.1.1",
"vue-router": "^4.2.2"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.2.0",
"@tsconfig/node18": "^2.0.1",
"@types/node": "^18.16.17",
"@vitejs/plugin-vue": "^4.2.3",
"@vue/eslint-config-prettier": "^7.1.0",
"@vue/eslint-config-typescript": "^11.0.3",
"@vue/tsconfig": "^0.4.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.39.0",
"eslint-plugin-vue": "^9.11.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.24",
"prettier": "^2.8.8",
"tailwindcss": "^3.3.2",
"typescript": "~5.0.4",
"vite": "^4.3.9",
"vue-tsc": "^1.6.5"
}
}

View File

@@ -0,0 +1,7 @@
/* eslint-disable no-undef */
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

18
Frontend/src/App.vue Normal file
View File

@@ -0,0 +1,18 @@
<script setup lang="ts">
import { RouterView } from 'vue-router';
import SidebarComponent from '@components/sidebar/SidebarComponent.vue';
</script>
<template>
<div id="layout" class="flex h-screen bg-gradient-to-r from-white to-sky-200 dark:from-slate-800 dark:to-indigo-950">
<SidebarComponent />
<div class="relative p-4 w-full m-4 bg-blue-50 dark:bg-gray-700 rounded-2xl overflow-hidden shadow-lg">
<RouterView></RouterView>
</div>
</div>
</template>
<style scoped></style>

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Example Page</title>
</head>
<body>
<h1>Hello World!</h1>
<p>That's paragraph</p>
<br>
</body>
</html>

View File

@@ -0,0 +1,5 @@
declare default element namespace "http://www.release11.com/schemas/Sample.xsd";
declare namespace u = "http://www.release11.com/schemas/Sample.xsd";
for $x in /u:root/u:UserList[@Id = 'a']/u:User
return string($x/u:Name)

View File

@@ -0,0 +1,62 @@
<?xml version = "1.0" encoding = "UTF-8"?>
<u:root xmlns:u = "http://www.release11.com/schemas/Sample.xsd" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "http://www.tibco.com/schemas/Shemy4tools/Folder/Schema.xsd Schema4tools.xsd">
<u:UserList Id = "a">
<u:User Id = "1">
<u:Name>John</u:Name>
<u:Surname>Wick</u:Surname>
<u:DateOfDeath>2023-10-10</u:DateOfDeath>
</u:User>
<u:User Id = "2">
<u:Name>Martha</u:Name>
<u:Surname>Whane</u:Surname>
<u:DateOfDeath>1970-06-13</u:DateOfDeath>
</u:User>
<u:User Id = "3">
<u:Name>Bruce</u:Name>
<u:Surname>Lee</u:Surname>
<u:DateOfDeath>1985-01-24</u:DateOfDeath>
</u:User>
<u:User Id = "4">
<u:Name>John</u:Name>
<u:Surname>Rambo</u:Surname>
<u:DateOfDeath>2024-06-19</u:DateOfDeath>
</u:User>
<u:NameList>FirstList</u:NameList>
</u:UserList>
<u:UserList Id = "b">
<u:User Id = "1">
<u:Name>Jack</u:Name>
<u:Surname>Wicker</u:Surname>
<u:DateOfDeath>2023-10-10</u:DateOfDeath>
</u:User>
<u:NameList>SecondList</u:NameList>
</u:UserList>
<u:UserList Id = "c">
<u:User Id = "1">
<u:Name>New</u:Name>
<u:Surname>Folder</u:Surname>
<u:DateOfDeath>2023-11-10</u:DateOfDeath>
</u:User>
<u:User Id = "2">
<u:Name>Newer</u:Name>
<u:Surname>Folder</u:Surname>
<u:DateOfDeath>2023-11-11</u:DateOfDeath>
</u:User>
<u:User Id = "3">
<u:Name>Newest</u:Name>
<u:Surname>Folder</u:Surname>
<u:DateOfDeath>2023-11-12</u:DateOfDeath>
</u:User>
<u:User Id = "4">
<u:Name>New</u:Name>
<u:Surname>Folder2</u:Surname>
<u:DateOfDeath>2023-11-13</u:DateOfDeath>
</u:User>
<u:User Id = "5">
<u:Name>New</u:Name>
<u:Surname>Folder-Final</u:Surname>
<u:DateOfDeath>2023-11-14</u:DateOfDeath>
</u:User>
<u:NameList>ThirdList</u:NameList>
</u:UserList>
</u:root>

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:u="http://www.release11.com/schemas/Sample.xsd"
targetNamespace="http://www.release11.com/schemas/Sample.xsd"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element ref="u:UserList" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="UserList">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="u:User" maxOccurs="unbounded"/>
<xs:element ref="u:NameList"/>
</xs:sequence>
<xs:attribute name="Id" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="User">
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:element name="User">
<xs:complexType>
<xs:sequence>
<xs:element ref="u:Name"/>
<xs:element ref="u:Surname"/>
<xs:element ref="u:DateOfDeath"/>
</xs:sequence>
<xs:attribute name="Id" type="xs:int" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="Name" type="xs:string"/>
<xs:element name="Surname" type="xs:string"/>
<xs:element name="DateOfDeath" type="xs:date"/>
<xs:element name="NameList" type="xs:string"/>
</xs:schema>

View File

@@ -0,0 +1,17 @@
<?xml version = "1.0" encoding = "UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:u = "http://www.release11.com/schemas/Sample.xsd"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<UserLists>
<UserListCount>
<xsl:value-of select="count(/u:root/u:UserList)" />
</UserListCount>
<xsl:for-each select="/u:root/u:UserList">
<UserListStats>
<Name><xsl:value-of select="u:NameList" /></Name>
<UserCount><xsl:value-of select="count(u:User)" /></UserCount>
</UserListStats>
</xsl:for-each>
</UserLists>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,537 @@
[
{
"entries": [
{
"arguments": [
{
"type": "object",
"description": "The object to convert to a boolean"
}
],
"description": "The boolean function converts its argument to a boolean",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions",
"examples": [
{
"command": "boolean('Release11')",
"output": "true"
},
{
"command": "boolean('')",
"output": "false"
},
{
"command": "boolean(2334)",
"output": "true"
}
],
"name": "boolean()",
"output": "boolean"
},
{
"arguments": [],
"description": "The true function returns false.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions",
"examples": [
{
"output": "false",
"command": "false()"
}
],
"name": "false()",
"output": "boolean"
},
{
"arguments": [],
"description": "The not function returns true if its argument is false, and false otherwise.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions",
"examples": [
{
"output": "false",
"command": "not('text')"
},
{
"command": "not('')",
"output": "true"
}
],
"name": "not()",
"output": "boolean"
},
{
"arguments": [],
"description": "The true function returns true.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions",
"examples": [
{
"output": "true",
"command": "true()"
}
],
"name": "true()",
"output": "boolean"
}
],
"name": "Boolean"
},
{
"entries": [
{
"arguments": [
{
"type": "node-set",
"description": "Node-set to count nodes in"
}
],
"description": "Returns the number of nodes in the node-set",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions",
"examples": [
{
"output": "10",
"command": "count(/u:root/u:UserList/u:User)"
},
{
"output": "1",
"command": "count(/u:root/u:UserList[@Id = 'b']/u:User)"
}
],
"name": "count()",
"output": "number"
},
{
"arguments": [],
"description": "Returns the element specified by it's unique id, requires DTD",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions",
"examples": [],
"name": "id()",
"output": "node-set"
},
{
"arguments": [
{
"description": "Language that will be looked for in context node",
"type": "string"
}
],
"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.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Boolean-Functions",
"examples": [],
"name": "lang()",
"output": "boolean"
},
{
"arguments": [],
"description": "The position function returns a number equal to the context position from the expression evaluation context.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions",
"examples": [],
"name": "last()",
"output": "number"
},
{
"arguments": [
{
"description": "Extract first node and return its local name",
"type": "node-set"
}
],
"description": "Returns the number of nodes in the node-set",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions",
"examples": [
{
"command": "local-name(/u:root)",
"output": "root"
},
{
"command": "local-name(/u:root/u:UserList)",
"output": "UserList"
}
],
"name": "local-name()",
"output": "string"
},
{
"arguments": [
{
"description": "Extract first node and return QName",
"type": "node-set? (Optional)"
}
],
"description": "Returns the number of nodes in the node-set",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions",
"examples": [
{
"command": "name(/u:root)",
"output": "u:root"
},
{
"command": "name(/u:root/u:UserList)",
"output": "u:UserList"
}
],
"name": "name()",
"output": "string"
},
{
"arguments": [
{
"description": "Extract first node and return the namespace URI",
"type": "node-set"
}
],
"description": "Returns the namespace-uri for the first node in the node-set",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions",
"examples": [
{
"output": "http://www.release11.com/schemas/Sample.xsd",
"command": "namespace-uri(/u:root)"
}
],
"name": "namespace-uri()",
"output": "string"
},
{
"arguments": [],
"description": "Returns the position of the current context node.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Node-Set-Functions",
"examples": [
{
"output": "3",
"command": "position()"
}
],
"name": "position()",
"output": "number"
}
],
"name": "Node-Set"
},
{
"entries": [
{
"arguments": [
{
"type": "number",
"description": "Number to round"
}
],
"description": "The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions",
"examples": [
{
"output": "3",
"command": "floor(3.1)"
},
{
"output": "3",
"command": "floor(3.9)"
},
{
"output": "3",
"command": "floor(3.5)"
}
],
"name": "floor()",
"output": "number"
},
{
"arguments": [
{
"type": "object",
"description": "The object to convert to a number"
}
],
"description": "The number function converts its argument to a number",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions",
"examples": [
{
"output": "10",
"command": "number(10)"
},
{
"output": "NaN",
"command": "number('')"
}
],
"name": "number()",
"output": "number"
},
{
"arguments": [
{
"type": "number",
"description": "Number to 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.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions",
"examples": [
{
"output": "3",
"command": "round(3.1)"
},
{
"output": "4",
"command": "round(3.9)"
},
{
"output": "4",
"command": "round(3.5)"
}
],
"name": "round()",
"output": "number"
},
{
"arguments": [
{
"description": "Node set to sum",
"type": "node-set"
}
],
"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.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions",
"examples": [
{
"output": "78",
"command": "sum(/someNode/value)"
}
],
"name": "sum()",
"output": "number"
}
],
"name": "Number"
},
{
"entries": [
{
"arguments": [
{
"type": "string* (One or More)",
"description": "Strings to concatenate"
}
],
"description": "The concat function returns the concatenation of its arguments.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions",
"examples": [
{
"command": "concat('Release', 11)",
"output": "Release11"
}
],
"name": "concat()",
"output": "string"
},
{
"arguments": [
{
"type": "string",
"description": "String to test"
},
{
"type": "string",
"description": "String that first string has to contain"
}
],
"description": "The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions",
"examples": [
{
"command": "contains('Release11', 'eas')",
"output": "true"
}
],
"name": "contains()",
"output": "boolean"
},
{
"arguments": [
{
"description": "String to normalize",
"type": "string? (Optional)"
}
],
"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.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions",
"examples": [
{
"output": "abc def",
"command": "normalize-space(' abc def ')"
}
],
"name": "normalize-space(()",
"output": "string"
},
{
"arguments": [
{
"type": "string",
"description": "String to test"
},
{
"type": "string",
"description": "String that first string has to start from"
}
],
"description": "Returns true if the first argument string starts with the second argument string, and otherwise returns false.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions",
"examples": [
{
"command": "starts-with('Release11', 'Rel'))",
"output": "true"
},
{
"output": "false",
"command": "starts-with('Release11', 'ease'))"
}
],
"name": "starts-with()",
"output": "boolean"
},
{
"arguments": [
{
"type": "object",
"description": "The object to convert to a string"
}
],
"description": "The string function converts an object to a string",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions",
"examples": [
{
"output": "10",
"command": "string(10)"
},
{
"output": "Release11",
"command": "string('Release11')"
}
],
"name": "string()",
"output": "string"
},
{
"arguments": [
{
"description": "String to test",
"type": "string? (Optional)"
}
],
"description": "The string-length returns the number of characters in the string.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions",
"examples": [
{
"output": "6",
"command": "string-length('abcdef')"
}
],
"name": "string-length()",
"output": "number"
},
{
"arguments": [
{
"type": "string",
"description": "String to split"
},
{
"type": "number",
"description": "Starting index"
},
{
"description": "Length of target substring",
"type": "number? (Optional)"
}
],
"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.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions",
"examples": [
{
"output": "2345",
"command": "substring('12345',2)"
},
{
"output": "234",
"command": "substring('12345',2,3)"
}
],
"name": "substring()",
"output": "string"
},
{
"arguments": [
{
"type": "string",
"description": "String to split"
},
{
"type": "string",
"description": "String that splits first string"
}
],
"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.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions",
"examples": [
{
"output": "ase11",
"command": "substring-after('Release11', 'le')"
}
],
"name": "substring-after()",
"output": "string"
},
{
"arguments": [
{
"type": "string",
"description": "String to split"
},
{
"type": "string",
"description": "String that splits first string"
}
],
"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.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions",
"examples": [
{
"output": "Release",
"command": "substring-before('Release11', '11')"
}
],
"name": "substring-before()",
"output": "string"
},
{
"arguments": [
{
"type": "string",
"description": "String to process"
},
{
"description": "Characters to remove",
"type": "string"
},
{
"type": "string",
"description": "String to insert characters from second argument"
}
],
"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.",
"documentationReferenceURL": "https://www.w3.org/TR/1999/REC-xpath-19991116/#section-String-Functions",
"examples": [
{
"output": "BAr",
"command": "translate('bar','abc','ABC')"
},
{
"output": "AAA",
"command": "translate('--aaa--','abc-','ABC')"
}
],
"name": "translate()",
"output": "string"
}
],
"name": "String"
}
]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,48 @@
{
"universalInfo":
[
{
"category":"What is XPath",
"description":"XPath is a query language used for selecting nodes from XML and processing them. It may perform operations on strings, numbers and boolean values."
},
{
"category":"What's new in XPath?"
}
],
"VersionDiffs":
[
{
"version":"2.0",
"diffs":
[
"Added support for all XML simple types",
"Many new functions (tripled instruction count)",
"All expressions evaluate to sequence",
"Introduces conditional expressions and for-loops"
]
},
{
"version":"3.0",
"diffs":
[
"Dynamic function calls (function may be called without being referenced by name (find function in collection and call)",
"Inline functions",
"Namespace literals - Namespace may be embedded into function name",
"Support for union types - collections containing elements of different types",
"Mapping operator - '!' performs evaluation for each element in sequence and concatenates results",
"Introduced maps"
]
},
{
"version":"3.1",
"diffs":
[
"New operator for function chaining '=>'",
"Introduced maps that store data in pair 'key:value' - 'map{ key : value, key : value }'",
"Introduced arrays - they differ from sequences in that they can be nested 'array{1, 5, 7, (10 to 20)}'"
]
}
]
}

View File

@@ -0,0 +1,845 @@
[
{
"name": "Templates",
"entries": [
{
"name": "<xsl:template>",
"description": "Defines an output producing template. This element must have either the match attribute or the name attribute set.",
"attributes":
[
{
"type":"optional",
"name":"match",
"description":"Specifies a pattern that determines the elements for which this template should be used. It is a required attribute if there is no name attribute."
},
{
"type":"optional",
"name":"name",
"description":"Specifies a name for this template"
},
{
"type":"optional",
"name":"mode",
"description":"Specifies a particular mode for this template, which can be matched by an attribute of the <xsl:apply-templates> element"
},
{
"type":"optional",
"name":"priority",
"description":"Specifies a numeric priority for this template."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/template",
"output": "XML Tree"
},{
"name": "<xsl:apply-templates>",
"description": "Selects a set of nodes in the input tree and instructs the processor to apply the proper templates to them.",
"attributes":
[
{
"type":"optional",
"name":"mode",
"description":"Specifies a particular mode for this template, which can be matched by an attribute of the <xsl:apply-templates> element"
},
{
"type":"optional",
"name":"select",
"description":"XPath expression that specifies the nodes to be processed. If this attribute is not set, all child nodes of the current node are selected."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/apply-templates",
"output": "XML Nodes"
},{
"name": "<xsl:apply-imports/>",
"description": "Import precedence requires that template rules in main stylesheets have higher precedence than template rules in imported stylesheets",
"attributes":
[
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/apply-imports",
"output": "Imported output from another XSLT"
},{
"name": "<xsl:call-template>",
"description": "Invokes a named template",
"attributes":
[
{
"type":"required",
"name":"name",
"description":"Specifies the name of the template you wish to invoke."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/call-template",
"output": "Called template XML"
}
]
},
{
"name":"Loops and conditional processing",
"entries":
[
{
"name": "<xsl:for-each>",
"description": "Selects a set of nodes and processes each of them in the same way",
"attributes":
[
{
"type":"required",
"name":"select",
"description":"XPath expression that specifies the nodes to be processed."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/for-each",
"output": "Processed set of nodes"
},
{
"name": "<xsl:if>",
"description": "Element contains a test attribute and a template. If the test evaluates to true, the template is processed.",
"attributes":
[
{
"type":"required",
"name":"test",
"description":"Contains an XPath expression that can be evaluated to a Boolean value."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/if",
"output": "Depending on test processed template or not."
},
{
"name": "<xsl:choose>",
"description": "Element defines a choice among a number of alternatives. It behaves like a switch statement in procedural languages.",
"attributes":
[
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/choose",
"output": "Choosed XML template"
},
{
"name": "<xsl:when>",
"description": "Element always appears within an <xsl:choose> element, acting like a case statement.",
"attributes":
[
{
"type":"required",
"name":"test",
"description":"Boolean expression to be evaluated. If true, the contents of the element are processed; if false, they are ignored."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/when",
"output": "Processed or not XML Template"
},
{
"name": "<xsl:otherwise>",
"description": "Element is used to define the action that should be taken when none of the <xsl:when> conditions apply.",
"attributes":
[
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/otherwise",
"output": "processed XML Template"
}
]
},
{
"name":"Creating Result Tree",
"entries":
[
{
"name": "<xsl:attribute>",
"description": "Creates an attribute in the output document, using any values that can be accessed from the stylesheet. The element must be defined before any other output document element inside the output document element for which it establishes attribute values",
"attributes":
[
{
"type":"required",
"name":"name",
"description":"Specifies the name of the attribute to be created in the output document."
} ,
{
"type":"optional",
"name":"namespace",
"description":"Defines the namespace URI for this attribute in the output document."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/attribute",
"output": "XML Element with provided attribute"
},{
"name": "<xsl:attribute-set>",
"description": "Creates a named set of attributes, which can then be applied as whole to the output document, in a manner similar to named styles in CSS",
"attributes":
[
{
"type":"required",
"name":"name",
"description":"Specifies the name of the attribute set."
} ,
{
"type":"optional",
"name":"use-attribute-sets",
"description":"Builds an attribute set from other attribute sets. The names of the contributing sets must be separated with whitespace characters"
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/attribute-set",
"output": "Named set of attributes"
},{
"name": "<xsl:copy>",
"description": "Transfers a shallow copy (the node and any associated namespace node) of the current node to the output document.",
"attributes":
[
{
"type":"optional",
"name":"use-attribute-sets",
"description":"Lists attribute sets that should be applied to the output node, if it is an element"
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/copy",
"output": "Copy of XML node"
},{
"name": "<xsl:number>",
"description": "Counts things sequentially. It can also be used to quickly format a number.",
"attributes":
[
{
"type":"optional",
"name":"count",
"description":"Specifies what in the source tree should be numbered sequentially. It uses an XPath expression."
},
{
"type":"optional",
"name":"level",
"description":"Defines how levels of the source tree should be considered in generating sequential numbers. It has three valid values: single, multiple, and any."
},
{
"type":"optional",
"name":"from",
"description":"Specifies where the numbering should start or start over."
},
{
"type":"optional",
"name":"value",
"description":"Applies a given format to a number."
},
{
"type":"optional",
"name":"format",
"description":"Defines the format of the generated number."
},
{
"type":"optional",
"name":"lang",
"description":"Specifies which language's alphabet should be used in letter-based numbering formats."
},
{
"type":"optional",
"name":"letter-value",
"description":"Disambiguates between numbering sequences that use letters. Some languages have more than one numbering system that use letters."
},
{
"type":"optional",
"name":"grouping-separator",
"description":"Specifies what character should be used as the group (e.g. thousands) separator."
},
{
"type":"optional",
"name":"grouping-size",
"description":"Indicates the number of digits that make up a numeric group."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/number",
"output": "Formatted number"
},{
"name": "<xsl:value-of>",
"description": "Evaluates an XPath expression, converts it to a string, and writes that string to the result tree.",
"attributes":
[
{
"type":"required",
"name":"select",
"description":"Specifies the XPath expression to be evaluated and written to the output tree."
},
{
"type":"optional",
"name":"disable-output-escaping",
"description":"Specifies whether special characters are escaped when written to the output."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/value-of",
"output": "Value from XML nodes"
},{
"name": "<xsl:text>",
"description": "Writes literal text to the output tree.",
"attributes":
[
{
"type":"optional",
"name":"disable-output-escaping",
"description":"Specifies whether special characters are escaped when written to the output."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/text",
"output": "XML Node with writed text"
},{
"name": "<xsl:comment>",
"description": "Writes a comment to the output document. It must include only text.",
"attributes":
[
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/comment",
"output": "XML Node with writed comment"
},
{
"name": "<xsl:processing-instruction>",
"description": "Writes a processing instruction to the output document.",
"attributes":
[
{
"type":"required",
"name":"name",
"description":"Specifies the name of this processing instruction."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/processing-instruction",
"output": "XML Node with output of processed instruction"
},
{
"name": "<xsl:key>",
"description": "Declares a named key which can be used elsewhere in the stylesheet with the key( ) function.",
"attributes":
[
{
"type":"required",
"name":"name",
"description":"Specifies a name for this key. Must be a QName."
},
{
"type":"required",
"name":"match",
"description":"Defines the nodes for which this key is applicable."
},
{
"type":"required",
"name":"use",
"description":"Specifies an XPath expression that will be used to determine the value of the key for each of the applicable nodes."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/key",
"output": "key to use in stylesheet"
},
{
"name": "<xsl:decimal-format>",
"description": "Declares a named key which can be used elsewhere in the stylesheet with the key( ) function.",
"attributes":
[
{
"type":"optional",
"name":"name",
"description":"Specifies a name for this format."
},
{
"type":"optional",
"name":"decimal-separator",
"description":"Specifies the decimal point character."
},
{
"type":"optional",
"name":"grouping-separator",
"description":"Specifies the thousands separator character."
},
{
"type":"optional",
"name":"infinity",
"description":"Specifies the string used to represent infinity."
},
{
"type":"optional",
"name":"minus-sign",
"description":"Specifies the minus sign character."
},
{
"type":"optional",
"name":"NaN",
"description":"Specifies the string used when the value is not a number."
},
{
"type":"optional",
"name":"percent",
"description":"Specifies the percentage sign character."
},
{
"type":"optional",
"name":"per-mille",
"description":"Specifies the per thousand character."
},
{
"type":"optional",
"name":"zero-digit",
"description":"Specifies the digit zero character."
},
{
"type":"optional",
"name":"digit",
"description":"Specifies the character used in the format pattern to stand for a digit."
},
{
"type":"optional",
"name":"pattern-separator",
"description":"Specifies the character separating positive and negative subpatterns in a format pattern."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/decimal-format",
"output": "decimal format"
},
{
"name": "<xsl:preserve-space>",
"description": "Defines the elements in the source document for which whitespace should be preserved.",
"attributes":
[
{
"type":"required",
"name":"elements",
"description":"Specifies the elements for which whitespace should be preserved."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/preserve-space",
"output": "preserved space"
},
{
"name": "<xsl:strip-space>",
"description": "Defines the elements in the source document for which whitespace should be removed.",
"attributes":
[
{
"type":"required",
"name":"elements",
"description":"Specifies the elements for which whitespace should be preserved."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/strip-space",
"output": "elements with removed whitespace"
},
{
"name": "<xsl:sort>",
"description": "Defines a sort key for nodes selected by <xsl:apply-templates> or <xsl:for-each> and determines the order in which they are processed.",
"attributes":
[
{
"type":"optional",
"name":"select",
"description":"Uses an XPath expression to specify the nodes to be sorted."
},
{
"type":"optional",
"name":"order",
"description":"Specifies whether the nodes should be processed in \"ascending\" or \"descending\" order."
},
{
"type":"optional",
"name":"case-order",
"description":"Indicates whether upper- or lowercase letters are to be ordered first."
},
{
"type":"optional",
"name":"lang",
"description":"Specifies which language is to be used by the sort."
},
{
"type":"optional",
"name":"data-type",
"description":"Defines whether items are to be ordered alphabetically or numerically."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/sort",
"output": "sorted elements"
},
{
"name": "<xsl:output>",
"description": "Controls the characteristics of the output document.",
"attributes":
[
{
"type":"optional",
"name":"method",
"description":"Specifies output format."
},
{
"type":"optional",
"name":"version",
"description":"Specifies the value of the version attribute of the XML or HTML declaration in the output document."
},
{
"type":"optional",
"name":"encoding",
"description":"Specifies the value of the encoding attribute in the output document."
},
{
"type":"optional",
"name":"omit-xml-declaration",
"description":"Indicates whether or not to include an XML declaration in the output."
},
{
"type":"optional",
"name":"doctype-public",
"description":"Specifies the value of the PUBLIC attribute of the DOCTYPE declaration in the output document."
},
{
"type":"optional",
"name":"doctype-system",
"description":"Specifies the value of the SYSTEM attribute of the DOCTYPE declaration in the output document."
},
{
"type":"optional",
"name":"cdata-section-elements",
"description":"Lists elements whose text contents should be written as CDATA sections."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/output",
"output": "changed document prefix"
}
]
},
{
"name":"Stylesheet structure",
"entries":
[
{
"name": "<xsl:stylesheet>",
"description": "Is the outermost element of a stylesheet.",
"attributes":
[
{
"type":"required",
"name":"version",
"description":"Specifies the version of XSLT required by this stylesheet."
},
{
"type":"optional",
"name":"exclude-result-prefixes",
"description":"Specifies any namespace used in this document that should not be sent to the output document."
},
{
"type":"optional",
"name":"extension-element-prefixes",
"description":"Specifies a space-separated list of any namespace prefixes for extension elements in this document."
},
{
"type":"optional",
"name":"default-collation",
"description":"Specifies the default collation used by all XPath expressions appearing in attributes or text value templates that have the element as an ancestor"
},
{
"type":"optional",
"name":"default-mode",
"description":"Defines the default value for the mode attribute of all <xsl:template> and <xsl:apply-templates> elements within its scope."
},
{
"type":"optional",
"name":"default-validation",
"description":"Defines the default value of the validation attribute of all relevant instructions appearing within its scope."
},
{
"type":"optional",
"name":"expand-text",
"description":"Determines whether descendant text nodes of the element are treated as text value templates."
},
{
"type":"optional",
"name":"id",
"description":"Specifies an id for this stylesheet. This is most often used when the stylesheet is embedded in another XML document."
},
{
"type":"optional",
"name":"input-type-annotations",
"description":"Specifies whether type annotations are stripped from the element so the same results are produced whether the source documents have been validated against a schema or not."
},
{
"type":"optional",
"name":"use-when",
"description":"Determines whether the element and all the nodes that have it as ancestor are excluded from the stylesheet."
},
{
"type":"optional",
"name":"xpath-default-namespace",
"description":"Specifies the namespace that will be used if the element name is unprefixed or an unprefixed type name within an XPath expression."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/stylesheet",
"output": "XSLT Stylesheet"
},
{
"name": "<xsl:tranform>",
"description": "Exactly equivalent to the <xsl:stylesheet> element.",
"attributes":
[
{
"type":"required",
"name":"version",
"description":"Specifies the version of XSLT required by this stylesheet."
},
{
"type":"optional",
"name":"exclude-result-prefixes",
"description":"Specifies any namespace used in this document that should not be sent to the output document."
},
{
"type":"optional",
"name":"extension-element-prefixes",
"description":"Specifies a space-separated list of any namespace prefixes for extension elements in this document."
},
{
"type":"optional",
"name":"default-collation",
"description":"Specifies the default collation used by all XPath expressions appearing in attributes or text value templates that have the element as an ancestor"
},
{
"type":"optional",
"name":"default-mode",
"description":"Defines the default value for the mode attribute of all <xsl:template> and <xsl:apply-templates> elements within its scope."
},
{
"type":"optional",
"name":"default-validation",
"description":"Defines the default value of the validation attribute of all relevant instructions appearing within its scope."
},
{
"type":"optional",
"name":"expand-text",
"description":"Determines whether descendant text nodes of the element are treated as text value templates."
},
{
"type":"optional",
"name":"id",
"description":"Specifies an id for this stylesheet. This is most often used when the stylesheet is embedded in another XML document."
},
{
"type":"optional",
"name":"input-type-annotations",
"description":"Specifies whether type annotations are stripped from the element so the same results are produced whether the source documents have been validated against a schema or not."
},
{
"type":"optional",
"name":"use-when",
"description":"Determines whether the element and all the nodes that have it as ancestor are excluded from the stylesheet."
},
{
"type":"optional",
"name":"xpath-default-namespace",
"description":"Specifies the namespace that will be used if the element name is unprefixed or an unprefixed type name within an XPath expression."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/transform",
"output": "XSLT Stylesheet"
},
{
"name": "<xsl:import>",
"description": "Top-level element that serves to import the contents of one stylesheet into another stylesheet.",
"attributes":
[
{
"type":"required",
"name":"href",
"description":"Specifies the URI of the stylesheet to import."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/import",
"output": "XSLT Stylesheet from another file"
},
{
"name": "<xsl:include>",
"description": "Merges the contents of one stylesheet with another. Unlike the case of <xsl:import>, the contents of an included stylesheet have exactly the same precedence as the contents of the including stylesheet.",
"attributes":
[
{
"type":"required",
"name":"href",
"description":"Specifies the URI of the stylesheet to import."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/include",
"output": "XSLT Stylesheet with XSLT from another file."
},
{
"name": "<xsl:namespace-alias>",
"description": "Maps a namespace in the stylesheet to a different namespace in the output tree. The most common use for this element is in generating a stylesheet from another stylesheet.",
"attributes":
[
{
"type":"required",
"name":"stylesheet-prefix",
"description":"Specifies the temporary namespace."
},
{
"type":"required",
"name":"result-prefix",
"description":"Specifies the desired namespace for the output tree."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/namespace-alias",
"output": "XML Tree with changed namespaces"
},
{
"name": "<xsl:element>",
"description": "Creates an element in the output document.",
"attributes":
[
{
"type":"required",
"name":"name",
"description":"Specifies the desired name of the output element. The name must be a valid QName."
},
{
"type":"optional",
"name":"namespace",
"description":"Specifies the namespace of the output element."
},
{
"type":"optional",
"name":"use-attribute-sets",
"description":"A whitespace-separated list of attribute-set element names to be applied to the element element's output element."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/namespace-alias",
"output": "XML with provided element"
}
]
},
{
"name":"Variables and parameters",
"entries":
[
{
"name": "<xsl:param>",
"description": "Establishes a parameter by name and, optionally, a default value for that parameter. When used as a top-level element, the parameter is global. When used inside an <xsl:template> element, the parameter is local to that template.",
"attributes":
[
{
"type":"required",
"name":"name",
"description":"Names the parameter. This must be a QName."
},
{
"type":"optional",
"name":"select",
"description":"Uses an XPath expression to provide a default value if none is specified."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/param",
"output": "XML parameter"
},
{
"name": "<xsl:variable>",
"description": "Declares a global or local variable in a stylesheet and gives it a value.",
"attributes":
[
{
"type":"required",
"name":"name",
"description":"Gives the variable a name."
},
{
"type":"optional",
"name":"select",
"description":"Defines the value of the variable through an XPath expression. If the element contains a template, this attribute is ignored."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/variable",
"output": "XML Variable"
},
{
"name": "<xsl:with-param>",
"description": "Sets the value of a parameter to be passed into a template.",
"attributes":
[
{
"type":"required",
"name":"name",
"description":"Gives this parameter a name."
},
{
"type":"optional",
"name":"select",
"description":"Defines the value of the parameter through an XPath expression. If the element contains a template, this attribute is ignored."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/with-param",
"output": "XML Parameter"
},
{
"name": "<xsl:copy-of>",
"description": "Makes a deep copy (including descendant nodes) of whatever the select attribute specifies to the output document.",
"attributes":
[
{
"type":"required",
"name":"select",
"description":"Uses an XPath expression that specifies what is to be copied."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/copy-of",
"output": "Copy of Selected node"
}
]
},
{
"name":"Misc",
"entries":
[
{
"name": "<xsl:message>",
"description": "Outputs a message (to the JavaScript Console in NS) and optionally terminates execution of the stylesheet.",
"attributes":
[
{
"type":"optional",
"name":"terminate",
"description":"Set to \"yes\", indicates that execution should be terminated. The default value is \"no\", in which case the message is output and execution continues."
}
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/message",
"output": "Message in console"
},
{
"name": "<xsl:fallback>",
"description": "specifies what template to use if a given extension (or, eventually, newer version) element is not supported.",
"attributes":
[
],
"examples": [],
"documentationReferenceURL": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/fallback",
"output": "Fallbacks"
}
]
}
]

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,52 @@
{
"universalInfo":
[
{
"category":"What is XSLT",
"description":"XSLT (Extensible Stylesheet Language Transformations) is a language for converting and manipulating XML data into various formats. It uses rules defined in stylesheets to transform XML documents into HTML, XML, or other text-based outputs."
},
{
"category":"What's differences between XSLT versions"
}
],
"VersionDiffs":
[
{
"version":"2.0",
"diffs":
[
"Introduced a richer data model with support for various data types and sequences, allowing more flexible handling of data.",
"Added native support for regular expressions, making text processing and pattern matching more powerful.",
"Introduced the concept of higher-order functions, enabling functions to be used as arguments and returned as results, enhancing the language's functional capabilities.",
"Expanded the set of built-in string functions, making string manipulation and formatting more versatile.",
"Introduced the concept of sequences, where nodes could be processed without relying solely on their order in the source document.",
"Provided improved error handling and reporting mechanisms, making it easier to diagnose and fix issues in transformations.",
"Allowed variable and function parameters to have type annotations, enhancing clarity and enabling better optimization.",
"Refined the handling of namespaces and introduced features for dealing with namespaces more effectively.",
"Introduced more advanced grouping capabilities, allowing grouping based on multiple criteria.",
"Expanded sorting options, making it possible to sort data based on multiple keys and in different directions."
]
},
{
"version":"3.0",
"diffs":
[
"Extended the support for higher-order functions by introducing new functions like map and filter, enabling more functional programming patterns.",
"Introduced streaming capabilities, allowing processing of large documents without loading the entire document into memory, which improves performance and memory usage.",
"Introduced functions to parse and serialize JSON data, enabling transformations between XML and JSON formats.",
"Enhanced type annotations, allowing for more precise typing of variables and parameters, aiding both readability and optimization.",
"Introduced new standard functions, expanding the range of operations and calculations that can be performed within transformations.",
"Introduced a new data structure called maps, allowing for efficient key-value pair storage and manipulation.",
"Introduced tunnel parameters, which can pass data through templates without explicitly listing them in the template's parameter list",
"Introduced a try-catch construct for better error handling, allowing you to catch and handle errors more gracefully.",
"Introduced the ability to execute multiple templates concurrently, improving performance in multi-core environments.",
"Integrated new features from XPath 3.1, including support for higher-order functions and enhanced string manipulation functions.",
"Enhanced grouping capabilities, making it more powerful and flexible for complex grouping scenarios.",
"Allowed dynamic function calls using the xsl:evaluate element, enabling more dynamic transformations."
]
}
]
}

View File

@@ -0,0 +1,69 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import { Codemirror } from 'vue-codemirror'
import { oneDark } from '@codemirror/theme-one-dark'
import {xml} from '@codemirror/lang-xml'
import {json} from '@codemirror/lang-json'
import {html} from '@codemirror/lang-html'
const props= defineProps({
code : {
type: String,
required: true
},
config: {
type: Object,
required: true
},
})
const emit = defineEmits(
[
'update:updatedCode'
]
)
function dataUpdated(newData:String, viewUpdate : any){
emit('update:updatedCode',newData)
}
const extensions = computed( ()=> {
return [
oneDark,
parseLanguage(props.config.language),
]
} )
function parseLanguage(name: String){
switch(name.toUpperCase()){
case "JSON": {
return json();
}
case "HTML": {
return html();
}
default: {
return xml();
}
}
}
</script>
<template>
<div class="editor w-full max-w-full h-full overflow-scroll">
<codemirror
style="height: 100%; width: 100%; padding:1rem ; border-radius: 1rem; font-size: large;"
:model-value="code"
@update:model-value="dataUpdated"
:extensions="extensions"
:disabled="config.disabled"
/>
</div>
</template>

View File

@@ -0,0 +1,49 @@
<script setup lang="ts">
import sampleXML from "@/assets/sampleXml.xml?raw"
import sampleXSLT from "@/assets/sampleXslt.xml?raw"
import sampleXSD from "@/assets/sampleXsd.xml?raw"
import sampleXQuery from "@/assets/sampleXQuery.xquery?raw"
import sampleHTML from "@assets/sampleHtml.html?raw"
const props = defineProps(
{
stylizedName: {type: String, required: true}
}
)
const emit = defineEmits(['update:defaultData'])
function setDefault() {
const emitName = "update:defaultData";
switch (props.stylizedName.toLowerCase()) {
case "json":
emit(emitName, "{'message': 'Here we have to add some proper message', 'answer': 'Ya, definitely'}")
break;
case "xpath":
emit(emitName, "/u:root/u:UserList/u:User[../u:NameList = 'FirstList']")
break;
case "xsd":
emit(emitName, sampleXSD)
break;
case "xslt":
emit(emitName, sampleXSLT)
break;
case "xquery":
emit(emitName, sampleXQuery)
break;
case "html":
emit(emitName,sampleHTML);
break;
default:
emit(emitName, sampleXML)
break;
}
}
</script>
<template>
<button class="tool-button" @click="setDefault()">Default {{ stylizedName }}</button>
</template>

View File

@@ -0,0 +1,54 @@
<script setup lang="ts">
const props = defineProps(
{
formatType: {type:String,required:true},
code: {type:String,required:true},
}
)
function chooseType(formatType: String){
if (formatType == "XML Converter"){
return "convert";
}
return formatType.toLowerCase();
}
function getTypeInfo(){
if( props.code.startsWith("<!DOCTYPE") ){
return "html"
}else{
return "xml"
}
}
function createBody(){
return JSON.stringify({
"data": props.code,
"process": getTypeInfo(),
"processor": "libxml",
"version": "1.0"
});
}
const fetchLink = document.location.protocol + "//" + document.location.hostname + "/libxml/html/" + chooseType(props.formatType);
const emit = defineEmits([
'update:result'
])
function processResponse(formattedCode : any){
var result = formattedCode.result;
return result
}
function process(){
fetch(fetchLink, {body:createBody(), method: "POST"})
.then( response => response.json() )
.then( formattedCode => emit('update:result', processResponse(formattedCode) ) )
}
</script>
<template>
<button class="tool-button" @click="process()">{{ formatType }}</button>
</template>

View File

@@ -0,0 +1,54 @@
<script setup lang="ts">
const props = defineProps({
json: {type: String, required: true},
isMinimizer: {type: Boolean}
})
const emit = defineEmits(["update:result"])
function process() {
var request:Request = prepareRequest();
fetchRequest(request).then((data) => {
sendProcessedData(data);
})
}
function prepareRequest():Request {
var request = new Request(prepareURL(), {
body: prepareRequestBody(),
method: "POST"
});
return request;
}
function prepareURL(): string {
var mode = "formatting";
if (props.isMinimizer)
mode = "minimize";
return document.location.protocol + "//" + document.location.hostname + "/java/json/" + mode;
}
function prepareRequestBody():string {
var requestBody = props.json;
return requestBody;
}
async function fetchRequest(request: Request):Promise<JSON> {
var responseBody = await fetch(request)
.then(response => response.json())
.then((body) => body);
console.log(responseBody);
return responseBody;
}
function sendProcessedData(data: JSON) {
emit("update:result", data);
}
</script>
<template>
<button class="tool-button" @click="process()">{{ props.isMinimizer ? "Minimize" : "Format" }}</button>
</template>
<style scoped></style>

View File

@@ -0,0 +1,58 @@
<script setup lang="ts">
const props = defineProps({
xml: {type: String, required: true},
isMinimizer: {type: Boolean}
})
const emit = defineEmits(["update:result"])
function process() {
var request:Request = prepareRequest();
fetchRequest(request).then((data) => {
sendProcessedData(data);
})
}
function prepareRequest():Request {
var request = new Request(prepareURL(), {
body: prepareRequestBody(),
method: "POST"
});
return request
}
function prepareURL(): string {
var mode = "prettify";
if (props.isMinimizer)
mode = "minimize";
return document.location.protocol + "//" + document.location.hostname + "/libxml/" + mode;
}
function prepareRequestBody():string {
var requestBody = JSON.stringify({
"data": props.xml,
"process": "N/A",
"processor": "libxml",
"version": "1.0"
});
return requestBody;
}
async function fetchRequest(request: Request):Promise<JSON> {
var responseBody = await fetch(request)
.then(response => response.json())
.then((body) => body);
return responseBody;
}
function sendProcessedData(data: JSON) {
emit("update:result", data);
}
</script>
<template>
<button class="tool-button" @click="process()">{{ props.isMinimizer ? "Minimize" : "Format" }}</button>
</template>
<style scoped></style>

View File

@@ -0,0 +1,18 @@
<script setup lang="ts">
</script>
<template>
<div class="dark:text-slate-100">
<h1 class="text-3xl mb-4">Welcome to Release11 Tools</h1>
<h2 class="text-xl">Our toolset is split to three main categories:</h2>
<ol class="list-decimal ml-5">
<li><strong>XML</strong> - containing various tools that allow to validate and transform any XML</li>
<li><strong>Formatter</strong> - containing tools for formatting text files in various formats</li>
<li><strong>REST</strong> - consist of Mock that allows to create mocked REST endpoint</li>
</ol>
</div>
</template>
<style scoped></style>

View File

@@ -0,0 +1,18 @@
<script setup lang="ts">
import CodeEditorComponent from '../CodeEditorComponent.vue';
const props = defineProps(
{
data: {required: true, type: String},
contentType: {required:true,type:String},
}
)
</script>
<template>
<CodeEditorComponent :code="props.data" :config='{disabled:true, language:props.contentType.replace("application/","")}' />
</template>

View File

@@ -0,0 +1,74 @@
<script setup lang="ts">
import { ref} from 'vue';
const props = defineProps(
{
headersObject : Object
}
)
const emit = defineEmits([
'update:httpHeaders'
])
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) ? "inactive-button" : "tool-button";
}
function deleteHeader(index : string){
if(!isHeaderEssential(index) && headerData.value != undefined){
delete headerData.value[index]
emit('update:httpHeaders',headerData.value)
}
}
function addNewHeader(name : string, value : string){
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="flex flex-col gap-4">
<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 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 @click="addNewHeader(newHeaderName, newHeaderValue)" :class="setAddButtonStyle()" class="w-56">Add</button>
</div>
</div>
</template>

View File

@@ -0,0 +1,23 @@
<script setup lang="ts">
const props = defineProps(
{
data: {type:String, required:true}
}
)
</script>
<template>
<div class="w-full text-center text-white mt-2 flex flex-col gap-4 ">
<div class="flex flex-row gap-4">
<div class="w-full font-bold">Name</div>
<div class="w-full font-bold">Value</div>
</div >
<div class="flex flex-row gap-4" v-for="(value,name) in JSON.parse(data)" :key="name">
<div class="w-full overflow-hidden">{{ name }}</div>
<div class="w-full overflow-hidden">{{ value }}</div>
</div>
</div>
</template>

View File

@@ -0,0 +1,42 @@
<script setup lang="ts">
import { ref } from 'vue';
import HistoryRecords from './HistoryRecords.vue';
import BodyDetailComponent from './BodyDetailComponent.vue';
import HeadersDetailComponent from './HeadersDetailComponent.vue';
const shownDetail = ref('none');
const currentShownData = ref('');
const currentIndex = ref(-1);
const currentContentType = ref('application/json');
function showBody(body : string, index: number, contentType : string){
if( currentIndex.value == index && shownDetail.value == "body" ){
shownDetail.value = "none";
} else {
currentIndex.value = index;
shownDetail.value = "body";
currentShownData.value = body;
}
currentContentType.value = contentType;
}
function showHeaders(headers: object, index: number){
if(currentIndex.value == index && shownDetail.value == "headers" ){
shownDetail.value = "none";
} else {
currentIndex.value = index;
shownDetail.value = "headers";
currentShownData.value = JSON.stringify(headers);
}
}
</script>
<template>
<div class="w-full xl:w-2/5 flex flex-none flex-col gap-y-4">
<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>
</template>

Some files were not shown because too many files have changed in this diff Show More