Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit 6072bdc

Browse files
committed
[DEV] Add usewindowlocation to use window.location for host and scheme
1 parent ceba49b commit 6072bdc

File tree

356 files changed

+29336
-8627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

356 files changed

+29336
-8627
lines changed

analysis.json

Lines changed: 742 additions & 628 deletions
Large diffs are not rendered by default.

docs/components/app-layout/.bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "app-layout",
3-
"version": "2.0.5",
3+
"version": "2.1.0",
44
"description": "A set of layout elements for your app",
55
"authors": [
66
"The Polymer Authors"
@@ -65,11 +65,11 @@
6565
"resolutions": {
6666
"webcomponentsjs": "^1.0.0"
6767
},
68-
"_release": "2.0.5",
68+
"_release": "2.1.0",
6969
"_resolution": {
7070
"type": "version",
71-
"tag": "v2.0.5",
72-
"commit": "203838ff0f0cba770e5fe87566abd94b47190e18"
71+
"tag": "v2.1.0",
72+
"commit": "934f0d1cd3a635f5d5e2ed07739f217fe9dfc8ec"
7373
},
7474
"_source": "https://github.com/PolymerElements/app-layout.git",
7575
"_target": "1 - 2",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
bower_components*
22
bower-*.json
3+
node_modules

docs/components/app-layout/.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ addons:
1313
before_script:
1414
- npm install -g polymer-cli
1515
- polymer install --variants
16+
- >-
17+
npm run update-types && git diff --exit-code || (echo -e
18+
'\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run
19+
update-types".' && false)
1620
script:
1721
- xvfb-run polymer test
1822
- >-
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/**
2+
* DO NOT EDIT
3+
*
4+
* This file was automatically generated by
5+
* https://github.com/Polymer/gen-typescript-declarations
6+
*
7+
* To modify these typings, edit the source file(s):
8+
* app-box/app-box.html
9+
*/
10+
11+
/// <reference path="../../polymer/types/polymer.d.ts" />
12+
/// <reference path="../../iron-flex-layout/iron-flex-layout.d.ts" />
13+
/// <reference path="../../iron-resizable-behavior/iron-resizable-behavior.d.ts" />
14+
/// <reference path="../app-scroll-effects/app-scroll-effects-behavior.d.ts" />
15+
16+
/**
17+
* app-box is a container element that can have scroll effects - visual effects based on
18+
* scroll position. For example, the parallax effect can be used to move an image at a slower
19+
* rate than the foreground.
20+
*
21+
* ```html
22+
* <app-box style="height: 100px;" effects="parallax-background">
23+
* <img slot="background" src="picture.png" style="width: 100%; height: 600px;">
24+
* </app-box>
25+
* ```
26+
*
27+
* Notice the `background` attribute in the `img` element; this attribute specifies that that
28+
* image is used as the background. By adding the background to the light dom, you can compose
29+
* backgrounds that can change dynamically. Alternatively, the mixin `--app-box-background-front-layer`
30+
* allows to style the background. For example:
31+
*
32+
* ```css
33+
* .parallaxAppBox {
34+
* --app-box-background-front-layer: {
35+
* background-image: url(picture.png);
36+
* };
37+
* }
38+
* ```
39+
*
40+
* Finally, app-box can have content inside. For example:
41+
*
42+
* ```html
43+
* <app-box effects="parallax-background">
44+
* <h2>Sub title</h2>
45+
* </app-box>
46+
* ```
47+
*
48+
* #### Importing the effects
49+
*
50+
* To use the scroll effects, you must explicitly import them in addition to `app-box`:
51+
*
52+
* ```html
53+
* <link rel="import" href="/bower_components/app-layout/app-scroll-effects/app-scroll-effects.html">
54+
* ```
55+
*
56+
* #### List of effects
57+
*
58+
* **parallax-background**
59+
* A simple parallax effect that vertically translates the backgrounds based on a fraction
60+
* of the scroll position. For example:
61+
*
62+
* ```css
63+
* app-header {
64+
* --app-header-background-front-layer: {
65+
* background-image: url(...);
66+
* };
67+
* }
68+
* ```
69+
* ```html
70+
* <app-header style="height: 300px;" effects="parallax-background">
71+
* <app-toolbar>App name</app-toolbar>
72+
* </app-header>
73+
* ```
74+
*
75+
* The fraction determines how far the background moves relative to the scroll position.
76+
* This value can be assigned via the `scalar` config value and it is typically a value
77+
* between 0 and 1 inclusive. If `scalar=0`, the background doesn't move away from the header.
78+
*
79+
* ## Styling
80+
*
81+
* Mixin | Description | Default
82+
* ----------------|-------------|----------
83+
* `--app-box-background-front-layer` | Applies to the front layer of the background | {}
84+
*/
85+
interface AppBoxElement extends Polymer.Element, Polymer.AppScrollEffectsBehavior, Polymer.IronResizableBehavior {
86+
87+
/**
88+
* The current scroll progress.
89+
*/
90+
_progress: number;
91+
_updateScrollState(scrollTop: any): void;
92+
93+
/**
94+
* Returns true if this app-box is on the screen.
95+
* That is, visible in the current viewport.
96+
*/
97+
isOnScreen(): boolean;
98+
_getDOMRef(id: any): any;
99+
attached(): void;
100+
_debounceRaf(fn: any): void;
101+
102+
/**
103+
* Resets the layout. This method is automatically called when the element is attached to the DOM.
104+
*/
105+
resetLayout(): void;
106+
_getElementTop(): any;
107+
_resizeHandler(): void;
108+
109+
/**
110+
* Returns an object containing the progress value of the scroll effects.
111+
*/
112+
getScrollState(): object|null;
113+
}
114+
115+
interface HTMLElementTagNameMap {
116+
"app-box": AppBoxElement;
117+
}
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
/**
2+
* DO NOT EDIT
3+
*
4+
* This file was automatically generated by
5+
* https://github.com/Polymer/gen-typescript-declarations
6+
*
7+
* To modify these typings, edit the source file(s):
8+
* app-drawer-layout/app-drawer-layout.html
9+
*/
10+
11+
/// <reference path="../../polymer/types/polymer.d.ts" />
12+
/// <reference path="../../iron-media-query/iron-media-query.d.ts" />
13+
/// <reference path="../app-layout-behavior/app-layout-behavior.d.ts" />
14+
15+
/**
16+
* app-drawer-layout is a wrapper element that positions an app-drawer and other content. When
17+
* the viewport width is smaller than `responsiveWidth`, this element changes to narrow layout.
18+
* In narrow layout, the drawer will be stacked on top of the main content. The drawer will slide
19+
* in/out to hide/reveal the main content.
20+
*
21+
* By default the drawer is aligned to the start, which is left in LTR layouts:
22+
*
23+
* ```html
24+
* <app-drawer-layout>
25+
* <app-drawer slot="drawer">
26+
* drawer content
27+
* </app-drawer>
28+
* <div>
29+
* main content
30+
* </div>
31+
* </app-drawer-layout>
32+
* ```
33+
*
34+
* Align the drawer at the end:
35+
*
36+
* ```html
37+
* <app-drawer-layout>
38+
* <app-drawer slot="drawer" align="end">
39+
* drawer content
40+
* </app-drawer>
41+
* <div>
42+
* main content
43+
* </div>
44+
* </app-drawer-layout>
45+
* ```
46+
*
47+
* With an app-header-layout:
48+
*
49+
* ```html
50+
* <app-drawer-layout>
51+
* <app-drawer slot="drawer">
52+
* drawer-content
53+
* </app-drawer>
54+
* <app-header-layout>
55+
* <app-header slot="header">
56+
* <app-toolbar>
57+
* <div main-title>App name</div>
58+
* </app-toolbar>
59+
* </app-header>
60+
*
61+
* main content
62+
*
63+
* </app-header-layout>
64+
* </app-drawer-layout>
65+
* ```
66+
*
67+
* Add the `drawer-toggle` attribute to elements inside `app-drawer-layout` that toggle the drawer on click events:
68+
*
69+
* ```html
70+
* <app-drawer-layout>
71+
* <app-drawer slot="drawer">
72+
* drawer-content
73+
* </app-drawer>
74+
* <app-header-layout>
75+
* <app-header slot="header">
76+
* <app-toolbar>
77+
* <paper-icon-button icon="menu" drawer-toggle></paper-icon-button>
78+
* <div main-title>App name</div>
79+
* </app-toolbar>
80+
* </app-header>
81+
*
82+
* main content
83+
*
84+
* </app-header-layout>
85+
* </app-drawer-layout>
86+
* ```
87+
*
88+
* *NOTE:** With app-layout 2.0, the `drawer-toggle` element needs to be manually hidden
89+
* when app-drawer-layout is not in narrow layout. To add this, add the following CSS rule where
90+
* app-drawer-layout is used:
91+
*
92+
* ```css
93+
* app-drawer-layout:not([narrow]) [drawer-toggle] {
94+
* display: none;
95+
* }
96+
* ```
97+
*
98+
* Add the `fullbleed` attribute to app-drawer-layout to make it fit the size of its container:
99+
*
100+
* ```html
101+
* <app-drawer-layout fullbleed>
102+
* <app-drawer slot="drawer">
103+
* drawer content
104+
* </app-drawer>
105+
* <div>
106+
* main content
107+
* </div>
108+
* </app-drawer-layout>
109+
* ```
110+
*
111+
* ### Styling
112+
*
113+
* Custom property | Description | Default
114+
* -----------------------------------------|--------------------------------------|---------
115+
* `--app-drawer-width` | Width of the drawer | 256px
116+
* `--app-drawer-layout-content-transition` | Transition for the content container | none
117+
*
118+
* *NOTE:** If you use <app-drawer> with <app-drawer-layout> and specify a value for
119+
* `--app-drawer-width`, that value must be accessible by both elements. This can be done by
120+
* defining the value on the `:host` that contains <app-drawer-layout> (or `html` if outside
121+
* a shadow root):
122+
*
123+
* ```css
124+
* :host {
125+
* --app-drawer-width: 300px;
126+
* }
127+
* ```
128+
*/
129+
interface AppDrawerLayoutElement extends Polymer.Element, Polymer.AppLayoutBehavior {
130+
131+
/**
132+
* If true, ignore `responsiveWidth` setting and force the narrow layout.
133+
*/
134+
forceNarrow: boolean|null|undefined;
135+
136+
/**
137+
* If the viewport's width is smaller than this value, the panel will change to narrow
138+
* layout. In the mode the drawer will be closed.
139+
*/
140+
responsiveWidth: string|null|undefined;
141+
142+
/**
143+
* Returns true if it is in narrow layout. This is useful if you need to show/hide
144+
* elements based on the layout.
145+
*/
146+
readonly narrow: boolean|null|undefined;
147+
148+
/**
149+
* If true, the drawer will initially be opened when in narrow layout mode.
150+
*/
151+
openedWhenNarrow: boolean|null|undefined;
152+
_drawerPosition: string|null|undefined;
153+
154+
/**
155+
* A reference to the app-drawer element.
156+
*/
157+
readonly drawer: any;
158+
attached(): void;
159+
_updateLayoutStates(): void;
160+
_clickHandler(e: any): void;
161+
_narrowChanged(): void;
162+
_onQueryMatchesChanged(event: any): void;
163+
_computeMediaQuery(forceNarrow: any, responsiveWidth: any): any;
164+
}
165+
166+
interface HTMLElementTagNameMap {
167+
"app-drawer-layout": AppDrawerLayoutElement;
168+
}

0 commit comments

Comments
 (0)