diff --git a/lib/components/Method/method.scss b/lib/components/Method/method.scss
index 8d644a94..0306b61e 100644
--- a/lib/components/Method/method.scss
+++ b/lib/components/Method/method.scss
@@ -6,18 +6,20 @@
display: block;
border-bottom: 1px solid rgba(127, 127, 127, 0.25);
margin-top: 1em;
+ transform: translateZ(0);
+ z-index: 2;
}
-:host:last-of-type {
- border-bottom: 0;
-}
+// :host:last-of-type {
+// border-bottom: 0;
+// }
.method-header {
- margin-bottom: .9em;
+ margin-bottom: calc(1em - 6px);
}
.method-endpoint {
- margin: 0 0 2em 0;
+ //margin: 0 0 2px 0;
padding: 10px 20px;
border-radius: $border-radius*2;
background-color: darken($black, 2%);
@@ -31,8 +33,8 @@
padding-top: 1px;
padding-bottom: 0;
margin: 0;
- font-size: .8em;
- color: $black;
+ font-size: 12/14em;
+ color: $black;
vertical-align: middle;
display: inline-block;
border-radius: $border-radius;
diff --git a/lib/components/Method/method.ts b/lib/components/Method/method.ts
index 80f23ce0..b846684f 100644
--- a/lib/components/Method/method.ts
+++ b/lib/components/Method/method.ts
@@ -1,9 +1,9 @@
'use strict';
-import { Input, Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
+import { Input, Component, OnInit, ChangeDetectionStrategy, ElementRef, ChangeDetectorRef } from '@angular/core';
import JsonPointer from '../../utils/JsonPointer';
import { BaseComponent, SpecManager } from '../base';
import { SchemaHelper } from '../../services/schema-helper.service';
-import { OptionsService } from '../../services/options.service';
+import { OptionsService, AppStateService } from '../../services/';
@Component({
selector: 'method',
@@ -14,10 +14,14 @@ import { OptionsService } from '../../services/options.service';
export class Method extends BaseComponent implements OnInit {
@Input() pointer:string;
@Input() tag:string;
+ @Input() posInfo: any;
+
+ hidden = true;
method:any;
- constructor(specMgr:SpecManager, private optionsService: OptionsService) {
+ constructor(specMgr:SpecManager, private optionsService: OptionsService, private chDetector: ChangeDetectorRef,
+ private appState: AppStateService, private el: ElementRef) {
super(specMgr);
}
@@ -53,6 +57,14 @@ export class Method extends BaseComponent implements OnInit {
return bodyParam;
}
+ show(res) {
+ if (res) {
+ this.el.nativeElement.firstElementChild.removeAttribute('hidden');
+ } else {
+ this.el.nativeElement.firstElementChild.setAttribute('hidden', 'hidden');
+ }
+ }
+
ngOnInit() {
this.preinit();
}
diff --git a/lib/components/MethodsList/methods-list.html b/lib/components/MethodsList/methods-list.html
index 11f4f859..225a1930 100644
--- a/lib/components/MethodsList/methods-list.html
+++ b/lib/components/MethodsList/methods-list.html
@@ -1,10 +1,10 @@
-
diff --git a/lib/components/MethodsList/methods-list.scss b/lib/components/MethodsList/methods-list.scss
index 0cfbfa50..fe57d8c2 100644
--- a/lib/components/MethodsList/methods-list.scss
+++ b/lib/components/MethodsList/methods-list.scss
@@ -4,6 +4,11 @@
display: block;
overflow: hidden;
}
+
+:host [hidden] {
+ display: none;
+}
+
.tag-info {
padding: $section-spacing;
box-sizing: border-box;
diff --git a/lib/components/MethodsList/methods-list.spec.ts b/lib/components/MethodsList/methods-list.spec.ts
index ca59e157..69a7afda 100644
--- a/lib/components/MethodsList/methods-list.spec.ts
+++ b/lib/components/MethodsList/methods-list.spec.ts
@@ -23,7 +23,6 @@ describe('Redoc components', () => {
let fixture;
beforeEach(async(inject([SpecManager], ( specMgr) => {
-
return specMgr.load('/tests/schemas/methods-list-component.json');
})));
beforeEach(() => {
diff --git a/lib/components/ParamsList/params-list.scss b/lib/components/ParamsList/params-list.scss
index 239c8c83..70123065 100644
--- a/lib/components/ParamsList/params-list.scss
+++ b/lib/components/ParamsList/params-list.scss
@@ -2,10 +2,14 @@
$hint-color: #999999;
+:host {
+ display: block;
+}
+
.param-list-header {
border-bottom: 1px solid rgba($text-color, .3);
- padding: 0.2em 0;
- margin: 3.5em 0 .8em 0;
+// padding: 0.2em 0;
+ margin: 3em 0 1em 0;
color: rgba($text-color, .5);
font-weight: normal;
text-transform: uppercase;
diff --git a/lib/components/Redoc/redoc.html b/lib/components/Redoc/redoc.html
index 89bacc5c..b0e66acd 100644
--- a/lib/components/Redoc/redoc.html
+++ b/lib/components/Redoc/redoc.html
@@ -3,6 +3,10 @@
{{error.message}}
+
+
diff --git a/lib/components/SchemaSample/schema-sample.scss b/lib/components/SchemaSample/schema-sample.scss
index 714eac34..51abcc79 100644
--- a/lib/components/SchemaSample/schema-sample.scss
+++ b/lib/components/SchemaSample/schema-sample.scss
@@ -13,46 +13,25 @@ pre {
}
.action-buttons {
- display: block;
opacity: 0;
transition: opacity 0.3s ease;
transform: translateY(100%);
- z-index: 1;
+ z-index: 3;
position: relative;
-
- > span {
- float: right;
-
- &:last-child > a:before {
- display: none;
- }
- }
+ height: 2em;
+ line-height: 2em;
+ padding-right: 10px;
+ text-align: right;
> span > a {
padding: 2px 10px;
color: #ffffff;
cursor: pointer;
- &:before {
- content: '|';
- display: inline-block;
- transform: translateX(-10px);
- }
-
- &:first-child {
- margin-right: 0;
- }
-
&:hover {
- background-color: $black;
+ background-color: lighten($black, 15%);
}
}
-
- &:after {
- display: block;
- content: '';
- clear: both;
- }
}
.snippet:hover .action-buttons {
@@ -135,6 +114,7 @@ pre {
li {
position: relative;
+ display: block;
}
.hoverable {
diff --git a/lib/components/SideMenu/side-menu.html b/lib/components/SideMenu/side-menu.html
index 72f569c8..b6c92220 100644
--- a/lib/components/SideMenu/side-menu.html
+++ b/lib/components/SideMenu/side-menu.html
@@ -10,10 +10,10 @@
`,
styles: [`
+ :host {
+ display: block;
+ }
.tab-wrap {
display: none;
}
diff --git a/lib/shared/components/Zippy/zippy.scss b/lib/shared/components/Zippy/zippy.scss
index a93ab00b..a72b7ef9 100644
--- a/lib/shared/components/Zippy/zippy.scss
+++ b/lib/shared/components/Zippy/zippy.scss
@@ -12,8 +12,8 @@ $zippy-redirect-bg-color: rgba($zippy-redirect-color, .08);
:host {
// performance optimization
- transform: translate3d(0, 0, 0);
- backface-visibility: hidden;
+ // transform: translate3d(0, 0, 0);
+ // backface-visibility: hidden;
overflow: hidden;
display: block;
}
diff --git a/lib/shared/components/index.ts b/lib/shared/components/index.ts
index b273f1a5..5659b6f5 100644
--- a/lib/shared/components/index.ts
+++ b/lib/shared/components/index.ts
@@ -6,9 +6,11 @@ import { Zippy } from './Zippy/zippy';
import { CopyButton } from './CopyButton/copy-button.directive';
import { SelectOnClick } from './SelectOnClick/select-on-click.directive';
import { DynamicNg2Viewer, DynamicNg2Wrapper } from './DynamicNg2Viewer/dynamic-ng2-viewer.component';
+import { LazyFor, LazyTasksService } from './LazyFor/lazy-for';
export const REDOC_COMMON_DIRECTIVES = [
- DropDown, StickySidebar, Tabs, Tab, Zippy, CopyButton, SelectOnClick, DynamicNg2Viewer, DynamicNg2Wrapper
+ DropDown, StickySidebar, Tabs, Tab, Zippy, CopyButton, SelectOnClick, DynamicNg2Viewer, DynamicNg2Wrapper, LazyFor
];
-export { DropDown, StickySidebar, Tabs, Tab, Zippy, CopyButton, SelectOnClick, DynamicNg2Viewer, DynamicNg2Wrapper }
+export { DropDown, StickySidebar, Tabs, Tab, Zippy, CopyButton, SelectOnClick, DynamicNg2Viewer, DynamicNg2Wrapper, LazyFor }
+export { LazyTasksService }
diff --git a/lib/shared/styles/_variables.scss b/lib/shared/styles/_variables.scss
index 95ff58d8..e31b8a65 100644
--- a/lib/shared/styles/_variables.scss
+++ b/lib/shared/styles/_variables.scss
@@ -22,7 +22,7 @@ $base-font: Roboto;
$base-font-family: sans-serif;
$base-font-weight: $light;
$base-font-size: 1em;
-$base-line-height: 1.55em;
+$base-line-height: 1.5em;
$text-color: $black;
// Heading Font
diff --git a/lib/utils/helpers.ts b/lib/utils/helpers.ts
index 46f1ed66..4366388e 100644
--- a/lib/utils/helpers.ts
+++ b/lib/utils/helpers.ts
@@ -74,3 +74,7 @@ export function throttle(fn, threshhold, scope) {
}
};
}
+
+export const isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0
+ || (function (p) { return p.toString() === '[object SafariRemoteNotification]'; })(!window['safari']
+ || safari.pushNotification);
diff --git a/lib/utils/spec-manager.ts b/lib/utils/spec-manager.ts
index 5a464de7..9e79e675 100644
--- a/lib/utils/spec-manager.ts
+++ b/lib/utils/spec-manager.ts
@@ -41,8 +41,8 @@ export class SpecManager {
this._schema = schema;
try {
this.init();
- resolve(this._schema);
this.spec.next(this._schema);
+ resolve(this._schema);
} catch(err) {
reject(err);
}
diff --git a/manual-types/index.d.ts b/manual-types/index.d.ts
index faecbd1c..8d37c8e6 100644
--- a/manual-types/index.d.ts
+++ b/manual-types/index.d.ts
@@ -19,4 +19,11 @@ declare var AOT: any;
interface ErrorStackTraceLimit {
stackTraceLimit: number;
}
+interface History {
+ scrollRestoration: "auto"|"manual";
+}
+interface Window {
+ HTMLElement: any
+}
+declare var safari: any;
interface ErrorConstructor extends ErrorStackTraceLimit {}