From cf103abe393f6b0d90c085699bae5535e5785d20 Mon Sep 17 00:00:00 2001 From: Elena Shorohova Date: Mon, 29 May 2023 15:02:32 +0300 Subject: [PATCH 1/5] Fixed non-working images in API descriptions --- src/services/markdownService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/markdownService.ts b/src/services/markdownService.ts index fee63fde0..96b9bb7bb 100644 --- a/src/services/markdownService.ts +++ b/src/services/markdownService.ts @@ -29,7 +29,7 @@ export class MarkdownService { }) .use(rehypeStringify) .process(markdown, (err: any, html: any) => { - processedHtml = truncate(html.value, length, {truncateLastWord: false}); + processedHtml = truncate(html.value, length, { truncateLastWord: false, keepImageTag: true }); }); return processedHtml; From 2bde43d1f88ecdc1107acc31382842497d09b09d Mon Sep 17 00:00:00 2001 From: Elena Shorohova Date: Thu, 8 Jun 2023 15:42:40 +0300 Subject: [PATCH 2/5] Removed duplicated styles --- src/themes/designer/styles/arrows.scss | 4 +--- src/themes/designer/styles/balloons.scss | 6 +----- src/themes/designer/styles/buttons.scss | 5 +---- src/themes/designer/styles/draggables.scss | 4 +--- src/themes/designer/styles/dropbucket.scss | 7 +------ src/themes/designer/styles/dropdowns.scss | 4 +--- src/themes/designer/styles/dropzones.scss | 5 +---- src/themes/designer/styles/forms.scss | 6 +----- src/themes/designer/styles/layouts.scss | 3 --- src/themes/designer/styles/lightbox.scss | 2 -- src/themes/designer/styles/lists.scss | 6 +----- src/themes/designer/styles/mixins.scss | 3 +-- src/themes/designer/styles/scaffolding.scss | 1 - src/themes/designer/styles/slider.scss | 2 -- src/themes/designer/styles/styles.scss | 6 +++--- src/themes/designer/styles/toasts.scss | 6 +----- src/themes/designer/styles/toolbox.paragraph.scss | 6 +----- src/themes/designer/styles/toolboxes.scss | 8 +------- src/themes/designer/styles/utils.scss | 2 -- 19 files changed, 16 insertions(+), 70 deletions(-) diff --git a/src/themes/designer/styles/arrows.scss b/src/themes/designer/styles/arrows.scss index 6c6b72285..09b5c3017 100644 --- a/src/themes/designer/styles/arrows.scss +++ b/src/themes/designer/styles/arrows.scss @@ -1,6 +1,4 @@ -@import "animation.scss"; -@import "variables.scss"; -@media (min-width: $breakpoint-lg) { +@media (min-width: $breakpoint-lg) { .arrow-self { background-image: data-uri("../svgs/arrow.svg"); background-size: auto 80%; diff --git a/src/themes/designer/styles/balloons.scss b/src/themes/designer/styles/balloons.scss index bc39e5953..5c55cf2e2 100644 --- a/src/themes/designer/styles/balloons.scss +++ b/src/themes/designer/styles/balloons.scss @@ -1,8 +1,4 @@ -@import "animation.scss"; -@import "variables.scss"; -@import "mixins.scss"; - -$tip-width: 10px; +$tip-width: 10px; .balloon { @include surface(); diff --git a/src/themes/designer/styles/buttons.scss b/src/themes/designer/styles/buttons.scss index 3ef803885..567b338a3 100644 --- a/src/themes/designer/styles/buttons.scss +++ b/src/themes/designer/styles/buttons.scss @@ -1,7 +1,4 @@ -@import "variables.scss"; -@import "mixins.scss"; - -.btn { +.btn { border: none; background: none; color: $color-base; diff --git a/src/themes/designer/styles/draggables.scss b/src/themes/designer/styles/draggables.scss index 1e8db0a96..e1a46cf8e 100644 --- a/src/themes/designer/styles/draggables.scss +++ b/src/themes/designer/styles/draggables.scss @@ -1,6 +1,4 @@ -@import "variables.scss"; - -.dragtarget { +.dragtarget { width: 100px; height: 100px; border: 1px dashed #ccc; diff --git a/src/themes/designer/styles/dropbucket.scss b/src/themes/designer/styles/dropbucket.scss index e6f17a67c..6d8f6b7a5 100644 --- a/src/themes/designer/styles/dropbucket.scss +++ b/src/themes/designer/styles/dropbucket.scss @@ -1,9 +1,4 @@ -@import "variables.scss"; -@import "toolboxes.scss"; -@import "animation.scss"; -@import "buttons.scss"; - -dropbucket { +dropbucket { right: 20px; bottom: 20px; position: fixed; diff --git a/src/themes/designer/styles/dropdowns.scss b/src/themes/designer/styles/dropdowns.scss index 8743fe050..2075f8003 100644 --- a/src/themes/designer/styles/dropdowns.scss +++ b/src/themes/designer/styles/dropdowns.scss @@ -1,6 +1,4 @@ -@import "variables.scss"; - -.toolbox-dropdown { +.toolbox-dropdown { display: inline-block; box-sizing: border-box; border: none; diff --git a/src/themes/designer/styles/dropzones.scss b/src/themes/designer/styles/dropzones.scss index 401f5fb46..c4e190fca 100644 --- a/src/themes/designer/styles/dropzones.scss +++ b/src/themes/designer/styles/dropzones.scss @@ -1,7 +1,4 @@ -@import "variables.scss"; -@import "mixins.scss"; - -[alignment] { +[alignment] { position: absolute; top: initial; left: initial; diff --git a/src/themes/designer/styles/forms.scss b/src/themes/designer/styles/forms.scss index 57131ac05..1e8a2e623 100644 --- a/src/themes/designer/styles/forms.scss +++ b/src/themes/designer/styles/forms.scss @@ -1,8 +1,4 @@ -@import "variables.scss"; -@import "mixins.scss"; -@import "icons-toolboxes.scss"; - -.form { +.form { margin: 0; padding: 0; border: none; diff --git a/src/themes/designer/styles/layouts.scss b/src/themes/designer/styles/layouts.scss index 91c889f2c..7690e5b5b 100644 --- a/src/themes/designer/styles/layouts.scss +++ b/src/themes/designer/styles/layouts.scss @@ -1,7 +1,4 @@ @use "sass:math"; -@import "mixins.scss"; -@import "variables.scss"; - paperbits-code, paperbits-googlemaps, diff --git a/src/themes/designer/styles/lightbox.scss b/src/themes/designer/styles/lightbox.scss index 69dfc4dc4..2ac192430 100644 --- a/src/themes/designer/styles/lightbox.scss +++ b/src/themes/designer/styles/lightbox.scss @@ -1,5 +1,3 @@ -@import "variables.scss"; - // Vars ---------------------------------------------------------------- // $basicLightbox__background: rgba(0, 0, 0, .8) !default; $basicLightbox__zIndex: 100000 !default; diff --git a/src/themes/designer/styles/lists.scss b/src/themes/designer/styles/lists.scss index d44afc786..6a792dad6 100644 --- a/src/themes/designer/styles/lists.scss +++ b/src/themes/designer/styles/lists.scss @@ -1,8 +1,4 @@ -@import "variables.scss"; -@import "mixins.scss"; -@import "icons-toolboxes.scss"; - -.list-item-group { +.list-item-group { width: 100%; .list-item { diff --git a/src/themes/designer/styles/mixins.scss b/src/themes/designer/styles/mixins.scss index af3efe227..9af03c28c 100644 --- a/src/themes/designer/styles/mixins.scss +++ b/src/themes/designer/styles/mixins.scss @@ -1,5 +1,4 @@ -@import "variables.scss"; -@mixin hide-text() { +@mixin hide-text() { text-indent: -9999px; white-space: nowrap; } diff --git a/src/themes/designer/styles/scaffolding.scss b/src/themes/designer/styles/scaffolding.scss index 048fa484f..e1c4649d5 100644 --- a/src/themes/designer/styles/scaffolding.scss +++ b/src/themes/designer/styles/scaffolding.scss @@ -1,4 +1,3 @@ -@import "mixins.scss"; html, body { width: 100%; diff --git a/src/themes/designer/styles/slider.scss b/src/themes/designer/styles/slider.scss index cfd25e695..b94085777 100644 --- a/src/themes/designer/styles/slider.scss +++ b/src/themes/designer/styles/slider.scss @@ -1,5 +1,3 @@ -@import "variables.scss"; - .slider-display { width: 100%; height: 25px; diff --git a/src/themes/designer/styles/styles.scss b/src/themes/designer/styles/styles.scss index 2b3064136..cf0e4480b 100644 --- a/src/themes/designer/styles/styles.scss +++ b/src/themes/designer/styles/styles.scss @@ -1,5 +1,8 @@ @import "variables.scss"; +@import "animation.scss"; +@import "mixins.scss"; @import "typography.scss"; +@import "layouts.scss"; @import "flex.scss"; @import "balloons.scss"; @import "buttons.scss"; @@ -7,15 +10,12 @@ @import "icons-toolboxes.scss"; @import "icons-widgets.scss"; @import "lists.scss"; -@import "mixins.scss"; @import "scaffolding.scss"; @import "toolbox.paragraph.scss"; @import "toolboxes.scss"; @import "workshops.scss"; @import "dropbucket.scss"; @import "toasts.scss"; -@import "layouts.scss"; -@import "animation.scss"; @import "draggables.scss"; @import "forms.scss"; @import "tabs.scss"; diff --git a/src/themes/designer/styles/toasts.scss b/src/themes/designer/styles/toasts.scss index ecfa97b7e..afbf81659 100644 --- a/src/themes/designer/styles/toasts.scss +++ b/src/themes/designer/styles/toasts.scss @@ -1,8 +1,4 @@ -@import "variables.scss"; -@import "mixins.scss"; -@import "animation.scss"; - -.toasts { +.toasts { position: fixed; right: 40px; bottom: 50px; diff --git a/src/themes/designer/styles/toolbox.paragraph.scss b/src/themes/designer/styles/toolbox.paragraph.scss index 4f1054aaa..3610146b8 100644 --- a/src/themes/designer/styles/toolbox.paragraph.scss +++ b/src/themes/designer/styles/toolbox.paragraph.scss @@ -1,8 +1,4 @@ -@import "variables.scss"; -@import "buttons.scss"; - - -.tools-paragraph-style { +.tools-paragraph-style { @include tabable(); display: block; padding: 5px 10px; diff --git a/src/themes/designer/styles/toolboxes.scss b/src/themes/designer/styles/toolboxes.scss index 14c0591c9..507b5969f 100644 --- a/src/themes/designer/styles/toolboxes.scss +++ b/src/themes/designer/styles/toolboxes.scss @@ -1,10 +1,4 @@ -@import "variables.scss"; -@import "mixins.scss"; -@import "icons-toolboxes.scss"; -@import "animation.scss"; -@import "layouts.scss"; - -h1, +h1, h2 { font-family: $font-family-base; color: $color-base; diff --git a/src/themes/designer/styles/utils.scss b/src/themes/designer/styles/utils.scss index 420382784..2fac46e29 100644 --- a/src/themes/designer/styles/utils.scss +++ b/src/themes/designer/styles/utils.scss @@ -1,5 +1,3 @@ -@import "variables.scss"; - .text-center { text-align: center; } From 862d19c1ee8cf5f9ecfcf2afe9ba668394a9d9a4 Mon Sep 17 00:00:00 2001 From: Elena Shorohova Date: Tue, 19 Sep 2023 19:24:36 +0300 Subject: [PATCH 3/5] Fixed Format and Readonly properties displaying --- src/models/typeDefinition.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/models/typeDefinition.ts b/src/models/typeDefinition.ts index e81db4b43..820ec3f4b 100644 --- a/src/models/typeDefinition.ts +++ b/src/models/typeDefinition.ts @@ -116,10 +116,15 @@ export abstract class TypeDefinitionProperty { constructor(name: string, contract: SchemaObjectContract, isRequired: boolean) { this.name = contract.title || name; this.description = contract.description; - this.type = new TypeDefinitionPropertyTypePrimitive(contract.format || contract.type || "object"); this.readOnly = contract.readOnly ?? false; this.required = isRequired; + const typeAndFormat = + contract.type + ? contract.format ? contract.type + ' (' + contract.format + ')' : contract.type + : 'object'; + this.type = new TypeDefinitionPropertyTypePrimitive(typeAndFormat); + if (contract.rawSchemaFormat) { this.rawSchema = contract.rawSchema; this.rawSchemaFormat = contract.rawSchemaFormat; @@ -365,7 +370,7 @@ export class TypeDefinitionObjectProperty extends TypeDefinitionProperty { const propertySchemaObject = item.properties[propertyName]; const propertyNameToDisplay = (prefix ? prefix + "." : "") + propertyName; - hasReadOnly = propertySchemaObject.readOnly ?? false; + if (!hasReadOnly) hasReadOnly = propertySchemaObject.readOnly ?? false; if (!propertySchemaObject) { return; From 95946c498fb4ea0166093b7b44016fbcdec691d5 Mon Sep 17 00:00:00 2001 From: Elena Shorohova Date: Wed, 20 Sep 2023 14:46:16 +0300 Subject: [PATCH 4/5] Double quotes ES lint fix --- src/models/typeDefinition.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/typeDefinition.ts b/src/models/typeDefinition.ts index 820ec3f4b..a7e107ab8 100644 --- a/src/models/typeDefinition.ts +++ b/src/models/typeDefinition.ts @@ -121,8 +121,8 @@ export abstract class TypeDefinitionProperty { const typeAndFormat = contract.type - ? contract.format ? contract.type + ' (' + contract.format + ')' : contract.type - : 'object'; + ? contract.format ? contract.type + " (" + contract.format + ")" : contract.type + : "object"; this.type = new TypeDefinitionPropertyTypePrimitive(typeAndFormat); if (contract.rawSchemaFormat) { From eb04045e5bc383ee939a88d792a3474f4f7cea30 Mon Sep 17 00:00:00 2001 From: Elena Shorohova Date: Tue, 17 Oct 2023 18:09:58 +0300 Subject: [PATCH 5/5] Fixed nested definitions listing --- .../operation-details/ko/runtime/operation-details.ts | 2 ++ .../operation-details/ko/runtime/type-definition-object.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/operations/operation-details/ko/runtime/operation-details.ts b/src/components/operations/operation-details/ko/runtime/operation-details.ts index 26c2ab9d2..ebec31dea 100644 --- a/src/components/operations/operation-details/ko/runtime/operation-details.ts +++ b/src/components/operations/operation-details/ko/runtime/operation-details.ts @@ -345,6 +345,8 @@ export class OperationDetails { } if (definition.type instanceof TypeDefinitionPropertyTypeCombination) { + result.push(definition.name); + if (definition.type.combination) { definition.type.combination.forEach(combinationProperty => { result.push(combinationProperty["name"]); diff --git a/src/components/operations/operation-details/ko/runtime/type-definition-object.html b/src/components/operations/operation-details/ko/runtime/type-definition-object.html index 2cdd50f2f..b3c2e4844 100644 --- a/src/components/operations/operation-details/ko/runtime/type-definition-object.html +++ b/src/components/operations/operation-details/ko/runtime/type-definition-object.html @@ -59,7 +59,7 @@ - +