Skip to content

Commit

Permalink
Merge pull request #42 from treegex/dev
Browse files Browse the repository at this point in the history
new version 1.0.1
  • Loading branch information
aliazmoodehvaldi authored Aug 27, 2022
2 parents ad2edc0 + 1f6f6bc commit a16b238
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 45 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG/1.x/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,14 @@ Change Log
2022-08-27

* remove publicRoute in arguments
* write openRTP docs for yaml file
* write openRTP docs for yaml file

## Version 1.0.1

2022-08-27

* Fix view bug in show different view
* Fix bug in disable to show empty events table
* Fix bug in default tag
* Refactor code
* Changed css file
8 changes: 6 additions & 2 deletions lib/ui/components/tags/tagSection/boxSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ module.exports.boxSection = (name, arrowId, haveDescription, isCommonAuth) => {
if (haveDescription)
baseDiv = ' <img class="arrow-tag" id="arrow-tag-' + arrowId + '" onclick="arrowTagVisibility(this)" src="' + getIconsUrl() + 'arrow-right.svg"/>\n';

if (isCommonAuth)
if (isCommonAuth && !haveDescription)
return base + baseDiv +
' <img class="common-auth img-auth" id="openCommonAuthDialog" onclick="dialog(this.id)" src="' + getIconsUrl() + 'auth.svg"/>\n </div>\n';

if (isCommonAuth && haveDescription)
return base + baseDiv +
' <img class="common-auth right" id="openCommonAuthDialog" onclick="dialog(this.id)" src="' + getIconsUrl() + 'auth.svg"/>\n </div>\n';

return base+ baseDiv+ '</div>\n';
return base + baseDiv + '</div>\n';
}
2 changes: 1 addition & 1 deletion lib/ui/components/tags/tagSection/detailsForEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let {

module.exports.detailsForEvents = (data) => {

if (!isDefined(data))
if (!isDefined(data)|| data === '')
return '';

return ' <div class="div-span margin-top-2">\n' +
Expand Down
17 changes: 9 additions & 8 deletions lib/ui/components/tags/tagSection/itemInSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ let {

module.exports.itemInSection = (name, isLastItem, id, isUsedAuth, details) => {

let base = '<div class="tag-item div-parent p-parent img-parent">\n';
let base = '';

if (isDefined(details) && !isUsedAuth)
base = '<div class="tag-item div-parent p-parent img-parent" ' +
'id="div-vertical-item-tag-' + id + '" onclick="tagItemVerticalBackgroundVisibility(this)">';
base = '<div class="tag-item div-parent p-parent img-parent" ' +
'id="div-vertical-item-tag-' + id + '" onclick="tagItemVerticalBackgroundVisibility(this)">' +
' <p class="rectangle">ON</p>\n' + ' <p class="horizontal-txt">' + name + '</p>\n';

base += ' <p class="rectangle">ON</p>\n';

if (isUsedAuth && isDefined(details))
base += '<div class="flex-div" ' +
if (isUsedAuth)
base = '<div class="tag-item div-parent p-parent img-parent">\n' + ' <p class="rectangle">ON</p>\n' + '<div class="flex-div margin-top-1" ' +
'id="div-vertical-item-tag-' + id + '" onclick="tagItemVerticalBackgroundVisibility(this)">' +
' <p class="horizontal-txt">' + name + '</p>\n';

Expand All @@ -26,7 +25,9 @@ module.exports.itemInSection = (name, isLastItem, id, isUsedAuth, details) => {
if (isUsedAuth)
base += '</div>\n';

base += ' <img class="resize-img-auth" id="openAuthDialog-' + id + '" onclick="dialog(this.id)" src="' + getIconsUrl() + 'auth.svg"/>\n';

if (isUsedAuth)
base += ' <img class="resize-img-auth" id="openAuthDialog-' + id + '" onclick="dialog(this.id)" src="' + getIconsUrl() + 'auth.svg"/>\n';

base += '</div>\n';

Expand Down
13 changes: 13 additions & 0 deletions lib/ui/public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,15 @@ p .p, .white {
margin-top: 4%;
}

.margin-bottom-4 {
margin-bottom: 4%;
}

.img-auth {
margin-bottom: 3%;
margin-left: 75%;
}

.margin-bottom-3 {
margin-bottom: 3%;
}
Expand Down Expand Up @@ -571,4 +580,8 @@ dialog {
width: 82%;
}

.img-auth {
margin-left: 83%;
}

}
4 changes: 2 additions & 2 deletions lib/util/Utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
return Math.floor(Math.random() * MAX_RANDOM_RANGE);
},

getObjectValidationForEvent(item){
getObjectValidationForEvent(item) {
let newObject = item,
name = newObject?.name,
description = newObject?.description;
Expand All @@ -64,7 +64,7 @@ module.exports = {
return newObject;
},

getObjectValidationForModels(item){
getObjectValidationForModels(item) {
let newObject = item,
name = newObject?.name,
type = newObject?.type,
Expand Down
50 changes: 23 additions & 27 deletions lib/validation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,41 +108,37 @@ function validationPathObject() {
let tags = object?.tags,
isTagUsed = isDefined(tags),
tagValidation = (tag) => {
tagsObjectInRootObject?.forEach(item => {

let isValidTag = item?.name === tag,
description = item?.description,
initObject = () => {
let isInitDataObject = isDefined(groupOfObjectWithTagKey[tag]?.data);
let initObject = (description) => {
let isInitDataObject = isDefined(groupOfObjectWithTagKey[tag]?.data);

if (!isInitDataObject) {
groupOfObjectWithTagKey[tag] = {};
groupOfObjectWithTagKey[tag].data = [];
}
if (!isInitDataObject) {
groupOfObjectWithTagKey[tag] = {};
groupOfObjectWithTagKey[tag].data = [];
}

if (!isDefined(groupOfObjectWithTagKey[tag]?.description) && isDefined(description) && !isInitDataObject)
groupOfObjectWithTagKey[tag].description = description;
if (!isDefined(groupOfObjectWithTagKey[tag]?.description) && isDefined(description) && !isInitDataObject)
groupOfObjectWithTagKey[tag].description = description;

},
isDefaultTag = 'Default' === tag;
},
isDefaultTag = 'Default' === tag;

if (isDefaultTag) {
initObject();
object.route = route;
pushInObject(tag, object);
return;
}

if (isValidTag && !isDefaultTag) {
initObject();
pushInObject(tag, object, description);
return;
}
tagsObjectInRootObject?.forEach(item => {

if (isDefaultTag && isValidTag) {
initObject();
pushInObject(tag, object, description);
return;
}
let isValidTag = item?.name === tag,
description = item?.description;

if (isDefaultTag && !isValidTag) {
initObject();
pushInObject(tag, object);
object.route = route;

if (isValidTag) {
initObject(description);
pushInObject(tag, object, description);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openrtp",
"version": "1.0.0",
"version": "1.0.1",
"description": "Is a text-based software framework supported by an extensive ecosystem of tools that help developers design, build, document, and use programming relationships for socket.io.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/obj/ObjectValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function paths() {


let newParameterArr = [];
object?.parameters?.forEach((itemForParameter, index, arr) => {
object?.parameters?.forEach(itemForParameter => {
let args = itemForParameter?.args;
let isUsedArgs = args !== undefined;

Expand Down

0 comments on commit a16b238

Please sign in to comment.