🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@angular2-material/progress-bar

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular2-material/progress-bar - npm Package Compare versions

Comparing version
2.0.0-alpha.4-3
to
2.0.0-alpha.5-2
+2
-2
package.json
{
"name": "@angular2-material/progress-bar",
"version": "2.0.0-alpha.4-3",
"version": "2.0.0-alpha.5-2",
"description": "Angular 2 Material progress-bar",

@@ -26,4 +26,4 @@ "main": "./progress-bar.js",

"peerDependencies": {
"@angular2-material/core": "2.0.0-alpha.4"
"@angular2-material/core": "2.0.0-alpha.5-2"
}
}

@@ -20,1 +20,2 @@ /**

}
export declare const MD_PROGRESS_BAR_DIRECTIVES: typeof MdProgressBar[];
<!-- The background div is named as such because it appears below the other divs and is not sized based on values. -->
<div class="md-progress-bar-background"></div>
<div class="md-progress-bar-buffer" [style.transform]="bufferTransform()"></div>
<div class="md-progress-bar-primary md-progress-bar-fill" [style.transform]="primaryTransform()"></div>
<div class="md-progress-bar-buffer" [ngStyle]="bufferTransform()"></div>
<div class="md-progress-bar-primary md-progress-bar-fill" [ngStyle]="primaryTransform()"></div>
<div class="md-progress-bar-secondary md-progress-bar-fill"></div>

@@ -58,3 +58,3 @@ "use strict";

var scale = this.value / 100;
return "scaleX(" + scale + ")";
return { transform: "scaleX(" + scale + ")" };
};

@@ -69,3 +69,3 @@ /**

var scale = this.bufferValue / 100;
return "scaleX(" + scale + ")";
return { transform: "scaleX(" + scale + ")" };
}

@@ -89,2 +89,3 @@ };

core_1.Component({
moduleId: module.id,
selector: 'md-progress-bar',

@@ -96,4 +97,4 @@ host: {

},
template: "\n <!-- The background div is named as such because it appears below the other divs and is not sized based on values. -->\n <div class=\"md-progress-bar-background\"></div>\n <div class=\"md-progress-bar-buffer\" [style.transform]=\"bufferTransform()\"></div>\n <div class=\"md-progress-bar-primary md-progress-bar-fill\" [style.transform]=\"primaryTransform()\"></div>\n <div class=\"md-progress-bar-secondary md-progress-bar-fill\"></div>\n ",
styles: ["\n /** In buffer mode a repeated SVG object is used as a background. Each of the following defines the SVG object for each\n of the class defined colors.\n\n Each string is a URL encoded version of:\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\" x=\"0px\" y=\"0px\" enable-background=\"new 0 0 5 2\"\n xml:space=\"preserve\" viewBox=\"0 0 5 2\" preserveAspectRatio=\"none slice\">\n <circle cx=\"1\" cy=\"1\" r=\"1\" fill=\"{INJECTED_COLOR}\"/>\n </svg>\n\n */\n :host {\n display: block;\n height: 5px;\n overflow: hidden;\n position: relative;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-transition: opacity 250ms linear;\n transition: opacity 250ms linear;\n width: 100%;\n /**\n * The progress bar buffer is the bar indicator showing the buffer value and is only visible beyond the current value\n * of the primary progress bar.\n */\n /**\n * The secondary progress bar is only used in the indeterminate animation, because of this it is hidden in other uses.\n */\n /**\n * The progress bar fill fills the progress bar with the indicator color.\n */\n /**\n * A pseudo element is created for each progress bar bar that fills with the indicator color.\n */ }\n :host .md-progress-bar-background {\n background: url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20version%3D%271.1%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20xmlns%3Axlink%3D%27http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%27%20x%3D%270px%27%20y%3D%270px%27%20enable-background%3D%27new%200%200%205%202%27%20xml%3Aspace%3D%27preserve%27%20viewBox%3D%270%200%205%202%27%20preserveAspectRatio%3D%27none%20slice%27%3E%3Ccircle%20cx%3D%271%27%20cy%3D%271%27%20r%3D%271%27%20fill%3D%27#b2dfdb%27%2F%3E%3C%2Fsvg%3E\");\n background-repeat: repeat-x;\n background-size: 10px 4px;\n height: 100%;\n position: absolute;\n visibility: hidden;\n width: 100%; }\n :host .md-progress-bar-buffer {\n background-color: #b2dfdb;\n height: 100%;\n position: absolute;\n -webkit-transform-origin: top left;\n transform-origin: top left;\n -webkit-transition: -webkit-transform 250ms ease;\n transition: -webkit-transform 250ms ease;\n transition: transform 250ms ease;\n transition: transform 250ms ease, -webkit-transform 250ms ease;\n width: 100%; }\n :host .md-progress-bar-secondary {\n visibility: hidden; }\n :host .md-progress-bar-fill {\n -webkit-animation: none;\n animation: none;\n height: 100%;\n position: absolute;\n -webkit-transform-origin: top left;\n transform-origin: top left;\n -webkit-transition: -webkit-transform 250ms ease;\n transition: -webkit-transform 250ms ease;\n transition: transform 250ms ease;\n transition: transform 250ms ease, -webkit-transform 250ms ease;\n width: 100%; }\n :host .md-progress-bar-fill::after {\n -webkit-animation: none;\n animation: none;\n background-color: #00897b;\n content: '';\n display: inline-block;\n height: 100%;\n position: absolute;\n width: 100%; }\n :host[color=\"accent\"] .md-progress-bar-background {\n background: url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20version%3D%271.1%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20xmlns%3Axlink%3D%27http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%27%20x%3D%270px%27%20y%3D%270px%27%20enable-background%3D%27new%200%200%205%202%27%20xml%3Aspace%3D%27preserve%27%20viewBox%3D%270%200%205%202%27%20preserveAspectRatio%3D%27none%20slice%27%3E%3Ccircle%20cx%3D%271%27%20cy%3D%271%27%20r%3D%271%27%20fill%3D%27#e1bee7%27%2F%3E%3C%2Fsvg%3E\");\n background-repeat: repeat-x;\n background-size: 10px 4px; }\n :host[color=\"accent\"] .md-progress-bar-buffer {\n background-color: #e1bee7; }\n :host[color=\"accent\"] .md-progress-bar-fill::after {\n background-color: #8e24aa; }\n :host[color=\"warn\"] .md-progress-bar-background {\n background: url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20version%3D%271.1%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20xmlns%3Axlink%3D%27http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%27%20x%3D%270px%27%20y%3D%270px%27%20enable-background%3D%27new%200%200%205%202%27%20xml%3Aspace%3D%27preserve%27%20viewBox%3D%270%200%205%202%27%20preserveAspectRatio%3D%27none%20slice%27%3E%3Ccircle%20cx%3D%271%27%20cy%3D%271%27%20r%3D%271%27%20fill%3D%27#ffcdd2%27%2F%3E%3C%2Fsvg%3E\");\n background-repeat: repeat-x;\n background-size: 10px 4px; }\n :host[color=\"warn\"] .md-progress-bar-buffer {\n background-color: #ffcdd2; }\n :host[color=\"warn\"] .md-progress-bar-fill::after {\n background-color: #e53935; }\n :host[mode=\"query\"] {\n -webkit-transform: rotateZ(180deg);\n transform: rotateZ(180deg); }\n :host[mode=\"indeterminate\"] .md-progress-bar-fill, :host[mode=\"query\"] .md-progress-bar-fill {\n -webkit-transition: none;\n transition: none; }\n :host[mode=\"indeterminate\"] .md-progress-bar-primary, :host[mode=\"query\"] .md-progress-bar-primary {\n -webkit-animation: md-progress-bar-primary-indeterminate-translate 2s infinite linear;\n animation: md-progress-bar-primary-indeterminate-translate 2s infinite linear;\n left: -145.166611%; }\n :host[mode=\"indeterminate\"] .md-progress-bar-primary.md-progress-bar-fill::after, :host[mode=\"query\"] .md-progress-bar-primary.md-progress-bar-fill::after {\n -webkit-animation: md-progress-bar-primary-indeterminate-scale 2s infinite linear;\n animation: md-progress-bar-primary-indeterminate-scale 2s infinite linear; }\n :host[mode=\"indeterminate\"] .md-progress-bar-secondary, :host[mode=\"query\"] .md-progress-bar-secondary {\n -webkit-animation: md-progress-bar-secondary-indeterminate-translate 2s infinite linear;\n animation: md-progress-bar-secondary-indeterminate-translate 2s infinite linear;\n left: -54.888891%;\n visibility: visible; }\n :host[mode=\"indeterminate\"] .md-progress-bar-secondary.md-progress-bar-fill::after, :host[mode=\"query\"] .md-progress-bar-secondary.md-progress-bar-fill::after {\n -webkit-animation: md-progress-bar-secondary-indeterminate-scale 2s infinite linear;\n animation: md-progress-bar-secondary-indeterminate-scale 2s infinite linear; }\n :host[mode=\"buffer\"] .md-progress-bar-background {\n -webkit-animation: md-progress-bar-background-scroll 250ms infinite linear;\n animation: md-progress-bar-background-scroll 250ms infinite linear;\n visibility: visible; }\n\n :host-context([dir=\"rtl\"]) {\n -webkit-transform: rotateY(180deg);\n transform: rotateY(180deg); }\n\n /** The values used for animations in md-progress-bar, both timing and transformation, can be considered magic values.\n They are sourced from the Material Design example spec and duplicate the values of the original designers\n definitions.\n\n\n The indeterminate state is essentially made up of two progress bars, one primary (the one that is shown in both the\n determinate and indeterminate states) and one secondary, which essentially mirrors the primary progress bar in\n appearance but is only shown to assist with the indeterminate animations.\n\n\n KEYFRAME BLOCK\t DESCRIPTION\n primary-indeterminate-translate Translation of the primary progressbar across the screen\n primary-indeterminate-scale Scaling of the primary progressbar as it's being translated across the screen\n secondary-indeterminate-translate Translation of the secondary progressbar across the screen\n secondary-indeterminate-scale Scaling of the secondary progressbar as it's being translated across the screen\n\n Because two different transform animations need to be applied at once, the translation is applied to the outer\n element and the scaling is applied to the inner element, which provides the illusion necessary to make the animation\n work.\n */\n /** Animations for indeterminate and query mode. */\n @-webkit-keyframes md-progress-bar-primary-indeterminate-translate {\n 0% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px); }\n 20% {\n -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);\n animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);\n -webkit-transform: translateX(0px);\n transform: translateX(0px); }\n 59.15% {\n -webkit-animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);\n animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);\n -webkit-transform: translateX(83.67142%);\n transform: translateX(83.67142%); }\n 100% {\n -webkit-transform: translateX(200.61106%);\n transform: translateX(200.61106%); } }\n @keyframes md-progress-bar-primary-indeterminate-translate {\n 0% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px); }\n 20% {\n -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);\n animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);\n -webkit-transform: translateX(0px);\n transform: translateX(0px); }\n 59.15% {\n -webkit-animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);\n animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);\n -webkit-transform: translateX(83.67142%);\n transform: translateX(83.67142%); }\n 100% {\n -webkit-transform: translateX(200.61106%);\n transform: translateX(200.61106%); } }\n\n @-webkit-keyframes md-progress-bar-primary-indeterminate-scale {\n 0% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 36.65% {\n -webkit-animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1);\n animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1);\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 69.15% {\n -webkit-animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);\n animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);\n -webkit-transform: scaleX(0.66148);\n transform: scaleX(0.66148); }\n 100% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); } }\n\n @keyframes md-progress-bar-primary-indeterminate-scale {\n 0% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 36.65% {\n -webkit-animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1);\n animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1);\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 69.15% {\n -webkit-animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);\n animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);\n -webkit-transform: scaleX(0.66148);\n transform: scaleX(0.66148); }\n 100% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); } }\n\n @-webkit-keyframes md-progress-bar-secondary-indeterminate-translate {\n 0% {\n -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n -webkit-transform: translateX(0px);\n transform: translateX(0px); }\n 25% {\n -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n -webkit-transform: translateX(37.65191%);\n transform: translateX(37.65191%); }\n 48.35% {\n -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n -webkit-transform: translateX(84.38617%);\n transform: translateX(84.38617%); }\n 100% {\n -webkit-transform: translateX(160.27778%);\n transform: translateX(160.27778%); } }\n\n @keyframes md-progress-bar-secondary-indeterminate-translate {\n 0% {\n -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n -webkit-transform: translateX(0px);\n transform: translateX(0px); }\n 25% {\n -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n -webkit-transform: translateX(37.65191%);\n transform: translateX(37.65191%); }\n 48.35% {\n -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n -webkit-transform: translateX(84.38617%);\n transform: translateX(84.38617%); }\n 100% {\n -webkit-transform: translateX(160.27778%);\n transform: translateX(160.27778%); } }\n\n @-webkit-keyframes md-progress-bar-secondary-indeterminate-scale {\n 0% {\n -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 19.15% {\n -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n -webkit-transform: scaleX(0.4571);\n transform: scaleX(0.4571); }\n 44.15% {\n -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n -webkit-transform: scaleX(0.72796);\n transform: scaleX(0.72796); }\n 100% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); } }\n\n @keyframes md-progress-bar-secondary-indeterminate-scale {\n 0% {\n -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969);\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); }\n 19.15% {\n -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371);\n -webkit-transform: scaleX(0.4571);\n transform: scaleX(0.4571); }\n 44.15% {\n -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203);\n -webkit-transform: scaleX(0.72796);\n transform: scaleX(0.72796); }\n 100% {\n -webkit-transform: scaleX(0.08);\n transform: scaleX(0.08); } }\n\n /** Animation for buffer mode. */\n @-webkit-keyframes md-progress-bar-background-scroll {\n to {\n -webkit-transform: translateX(-10px);\n transform: translateX(-10px); } }\n @keyframes md-progress-bar-background-scroll {\n to {\n -webkit-transform: translateX(-10px);\n transform: translateX(-10px); } }\n "],
template: "<!-- The background div is named as such because it appears below the other divs and is not sized based on values. --> <div class=\"md-progress-bar-background\"></div> <div class=\"md-progress-bar-buffer\" [ngStyle]=\"bufferTransform()\"></div> <div class=\"md-progress-bar-primary md-progress-bar-fill\" [ngStyle]=\"primaryTransform()\"></div> <div class=\"md-progress-bar-secondary md-progress-bar-fill\"></div> ",
styles: ["/** In buffer mode a repeated SVG object is used as a background. Each of the following defines the SVG object for each of the class defined colors. Each string is a URL encoded version of: <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" x=\"0px\" y=\"0px\" enable-background=\"new 0 0 5 2\" xml:space=\"preserve\" viewBox=\"0 0 5 2\" preserveAspectRatio=\"none slice\"> <circle cx=\"1\" cy=\"1\" r=\"1\" fill=\"{INJECTED_COLOR}\"/> </svg> */ :host { display: block; height: 5px; overflow: hidden; position: relative; -webkit-transform: translateZ(0); transform: translateZ(0); -webkit-transition: opacity 250ms linear; transition: opacity 250ms linear; width: 100%; /** * The progress bar buffer is the bar indicator showing the buffer value and is only visible beyond the current value * of the primary progress bar. */ /** * The secondary progress bar is only used in the indeterminate animation, because of this it is hidden in other uses. */ /** * The progress bar fill fills the progress bar with the indicator color. */ /** * A pseudo element is created for each progress bar bar that fills with the indicator color. */ } :host .md-progress-bar-background { background: url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20version%3D%271.1%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20xmlns%3Axlink%3D%27http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%27%20x%3D%270px%27%20y%3D%270px%27%20enable-background%3D%27new%200%200%205%202%27%20xml%3Aspace%3D%27preserve%27%20viewBox%3D%270%200%205%202%27%20preserveAspectRatio%3D%27none%20slice%27%3E%3Ccircle%20cx%3D%271%27%20cy%3D%271%27%20r%3D%271%27%20fill%3D%27#b2dfdb%27%2F%3E%3C%2Fsvg%3E\"); background-repeat: repeat-x; background-size: 10px 4px; height: 100%; position: absolute; visibility: hidden; width: 100%; } :host .md-progress-bar-buffer { background-color: #b2dfdb; height: 100%; position: absolute; -webkit-transform-origin: top left; transform-origin: top left; -webkit-transition: -webkit-transform 250ms ease; transition: -webkit-transform 250ms ease; transition: transform 250ms ease; transition: transform 250ms ease, -webkit-transform 250ms ease; width: 100%; } :host .md-progress-bar-secondary { visibility: hidden; } :host .md-progress-bar-fill { -webkit-animation: none; animation: none; height: 100%; position: absolute; -webkit-transform-origin: top left; transform-origin: top left; -webkit-transition: -webkit-transform 250ms ease; transition: -webkit-transform 250ms ease; transition: transform 250ms ease; transition: transform 250ms ease, -webkit-transform 250ms ease; width: 100%; } :host .md-progress-bar-fill::after { -webkit-animation: none; animation: none; background-color: #00897b; content: ''; display: inline-block; height: 100%; position: absolute; width: 100%; } :host[color=\"accent\"] .md-progress-bar-background { background: url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20version%3D%271.1%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20xmlns%3Axlink%3D%27http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%27%20x%3D%270px%27%20y%3D%270px%27%20enable-background%3D%27new%200%200%205%202%27%20xml%3Aspace%3D%27preserve%27%20viewBox%3D%270%200%205%202%27%20preserveAspectRatio%3D%27none%20slice%27%3E%3Ccircle%20cx%3D%271%27%20cy%3D%271%27%20r%3D%271%27%20fill%3D%27#e1bee7%27%2F%3E%3C%2Fsvg%3E\"); background-repeat: repeat-x; background-size: 10px 4px; } :host[color=\"accent\"] .md-progress-bar-buffer { background-color: #e1bee7; } :host[color=\"accent\"] .md-progress-bar-fill::after { background-color: #8e24aa; } :host[color=\"warn\"] .md-progress-bar-background { background: url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20version%3D%271.1%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20xmlns%3Axlink%3D%27http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%27%20x%3D%270px%27%20y%3D%270px%27%20enable-background%3D%27new%200%200%205%202%27%20xml%3Aspace%3D%27preserve%27%20viewBox%3D%270%200%205%202%27%20preserveAspectRatio%3D%27none%20slice%27%3E%3Ccircle%20cx%3D%271%27%20cy%3D%271%27%20r%3D%271%27%20fill%3D%27#ffcdd2%27%2F%3E%3C%2Fsvg%3E\"); background-repeat: repeat-x; background-size: 10px 4px; } :host[color=\"warn\"] .md-progress-bar-buffer { background-color: #ffcdd2; } :host[color=\"warn\"] .md-progress-bar-fill::after { background-color: #e53935; } :host[mode=\"query\"] { -webkit-transform: rotateZ(180deg); transform: rotateZ(180deg); } :host[mode=\"indeterminate\"] .md-progress-bar-fill, :host[mode=\"query\"] .md-progress-bar-fill { -webkit-transition: none; transition: none; } :host[mode=\"indeterminate\"] .md-progress-bar-primary, :host[mode=\"query\"] .md-progress-bar-primary { -webkit-animation: md-progress-bar-primary-indeterminate-translate 2s infinite linear; animation: md-progress-bar-primary-indeterminate-translate 2s infinite linear; left: -145.166611%; } :host[mode=\"indeterminate\"] .md-progress-bar-primary.md-progress-bar-fill::after, :host[mode=\"query\"] .md-progress-bar-primary.md-progress-bar-fill::after { -webkit-animation: md-progress-bar-primary-indeterminate-scale 2s infinite linear; animation: md-progress-bar-primary-indeterminate-scale 2s infinite linear; } :host[mode=\"indeterminate\"] .md-progress-bar-secondary, :host[mode=\"query\"] .md-progress-bar-secondary { -webkit-animation: md-progress-bar-secondary-indeterminate-translate 2s infinite linear; animation: md-progress-bar-secondary-indeterminate-translate 2s infinite linear; left: -54.888891%; visibility: visible; } :host[mode=\"indeterminate\"] .md-progress-bar-secondary.md-progress-bar-fill::after, :host[mode=\"query\"] .md-progress-bar-secondary.md-progress-bar-fill::after { -webkit-animation: md-progress-bar-secondary-indeterminate-scale 2s infinite linear; animation: md-progress-bar-secondary-indeterminate-scale 2s infinite linear; } :host[mode=\"buffer\"] .md-progress-bar-background { -webkit-animation: md-progress-bar-background-scroll 250ms infinite linear; animation: md-progress-bar-background-scroll 250ms infinite linear; visibility: visible; } :host-context([dir=\"rtl\"]) { -webkit-transform: rotateY(180deg); transform: rotateY(180deg); } /** The values used for animations in md-progress-bar, both timing and transformation, can be considered magic values. They are sourced from the Material Design example spec and duplicate the values of the original designers definitions. The indeterminate state is essentially made up of two progress bars, one primary (the one that is shown in both the determinate and indeterminate states) and one secondary, which essentially mirrors the primary progress bar in appearance but is only shown to assist with the indeterminate animations. KEYFRAME BLOCK DESCRIPTION primary-indeterminate-translate Translation of the primary progressbar across the screen primary-indeterminate-scale Scaling of the primary progressbar as it's being translated across the screen secondary-indeterminate-translate Translation of the secondary progressbar across the screen secondary-indeterminate-scale Scaling of the secondary progressbar as it's being translated across the screen Because two different transform animations need to be applied at once, the translation is applied to the outer element and the scaling is applied to the inner element, which provides the illusion necessary to make the animation work. */ /** Animations for indeterminate and query mode. */ @-webkit-keyframes md-progress-bar-primary-indeterminate-translate { 0% { -webkit-transform: translateX(0px); transform: translateX(0px); } 20% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582); animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582); -webkit-transform: translateX(0px); transform: translateX(0px); } 59.15% { -webkit-animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635); animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635); -webkit-transform: translateX(83.67142%); transform: translateX(83.67142%); } 100% { -webkit-transform: translateX(200.61106%); transform: translateX(200.61106%); } } @keyframes md-progress-bar-primary-indeterminate-translate { 0% { -webkit-transform: translateX(0px); transform: translateX(0px); } 20% { -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582); animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582); -webkit-transform: translateX(0px); transform: translateX(0px); } 59.15% { -webkit-animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635); animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635); -webkit-transform: translateX(83.67142%); transform: translateX(83.67142%); } 100% { -webkit-transform: translateX(200.61106%); transform: translateX(200.61106%); } } @-webkit-keyframes md-progress-bar-primary-indeterminate-scale { 0% { -webkit-transform: scaleX(0.08); transform: scaleX(0.08); } 36.65% { -webkit-animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1); animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1); -webkit-transform: scaleX(0.08); transform: scaleX(0.08); } 69.15% { -webkit-animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1); animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1); -webkit-transform: scaleX(0.66148); transform: scaleX(0.66148); } 100% { -webkit-transform: scaleX(0.08); transform: scaleX(0.08); } } @keyframes md-progress-bar-primary-indeterminate-scale { 0% { -webkit-transform: scaleX(0.08); transform: scaleX(0.08); } 36.65% { -webkit-animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1); animation-timing-function: cubic-bezier(0.33473, 0.12482, 0.78584, 1); -webkit-transform: scaleX(0.08); transform: scaleX(0.08); } 69.15% { -webkit-animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1); animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1); -webkit-transform: scaleX(0.66148); transform: scaleX(0.66148); } 100% { -webkit-transform: scaleX(0.08); transform: scaleX(0.08); } } @-webkit-keyframes md-progress-bar-secondary-indeterminate-translate { 0% { -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969); animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969); -webkit-transform: translateX(0px); transform: translateX(0px); } 25% { -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371); animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371); -webkit-transform: translateX(37.65191%); transform: translateX(37.65191%); } 48.35% { -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203); animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203); -webkit-transform: translateX(84.38617%); transform: translateX(84.38617%); } 100% { -webkit-transform: translateX(160.27778%); transform: translateX(160.27778%); } } @keyframes md-progress-bar-secondary-indeterminate-translate { 0% { -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969); animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969); -webkit-transform: translateX(0px); transform: translateX(0px); } 25% { -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371); animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371); -webkit-transform: translateX(37.65191%); transform: translateX(37.65191%); } 48.35% { -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203); animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203); -webkit-transform: translateX(84.38617%); transform: translateX(84.38617%); } 100% { -webkit-transform: translateX(160.27778%); transform: translateX(160.27778%); } } @-webkit-keyframes md-progress-bar-secondary-indeterminate-scale { 0% { -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969); animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969); -webkit-transform: scaleX(0.08); transform: scaleX(0.08); } 19.15% { -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371); animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371); -webkit-transform: scaleX(0.4571); transform: scaleX(0.4571); } 44.15% { -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203); animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203); -webkit-transform: scaleX(0.72796); transform: scaleX(0.72796); } 100% { -webkit-transform: scaleX(0.08); transform: scaleX(0.08); } } @keyframes md-progress-bar-secondary-indeterminate-scale { 0% { -webkit-animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969); animation-timing-function: cubic-bezier(0.15, 0, 0.51506, 0.40969); -webkit-transform: scaleX(0.08); transform: scaleX(0.08); } 19.15% { -webkit-animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371); animation-timing-function: cubic-bezier(0.31033, 0.28406, 0.8, 0.73371); -webkit-transform: scaleX(0.4571); transform: scaleX(0.4571); } 44.15% { -webkit-animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203); animation-timing-function: cubic-bezier(0.4, 0.62704, 0.6, 0.90203); -webkit-transform: scaleX(0.72796); transform: scaleX(0.72796); } 100% { -webkit-transform: scaleX(0.08); transform: scaleX(0.08); } } /** Animation for buffer mode. */ @-webkit-keyframes md-progress-bar-background-scroll { to { -webkit-transform: translateX(-10px); transform: translateX(-10px); } } @keyframes md-progress-bar-background-scroll { to { -webkit-transform: translateX(-10px); transform: translateX(-10px); } } "],
changeDetection: core_1.ChangeDetectionStrategy.OnPush,

@@ -112,2 +113,3 @@ }),

}
//# sourceMappingURL=progress-bar.js.map
exports.MD_PROGRESS_BAR_DIRECTIVES = [MdProgressBar];
//# sourceMappingURL=/usr/local/google/home/jelbourn/material2/tmp/broccoli_type_script_compiler-input_base_path-OxHzApZr.tmp/0/components/progress-bar/progress-bar.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"progress-bar.js","sourceRoot":"","sources":["progress-bar.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAKO,eAAe,CAAC,CAAA;AAGvB,yCAAyC;AACzC,kEAAkE;AAGlE;;GAEG;AAYH;IAAA;QACE,6EAA6E;QACrE,WAAM,GAAW,CAAC,CAAC;QAY3B,0DAA0D;QAClD,iBAAY,GAAW,CAAC,CAAC;QAWjC;;;;;;WAMG;QAGH,SAAI,GAAyD,aAAa,CAAC;IAsB7E,CAAC;IAnDC,sBAAI,gCAAK;aAAT;YACE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QACrB,CAAC;aAED,UAAU,CAAS;YACjB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9B,CAAC;;;OAJA;IAUD,sBAAI,sCAAW;aAAf;YACE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC;QAC3B,CAAC;aAED,UAAgB,CAAS;YACvB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,C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O(josephperrott): Benchpress tests.\n// TODO(josephperrott): Add ARIA attributes for progressbar \"for\".\n\n\n/**\n * <md-progress-bar> component.\n */\n@Component({\n selector: 'md-progress-bar',\n host: {\n 'role': 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n },\n templateUrl: './components/progress-bar/progress-bar.html',\n styleUrls: ['./components/progress-bar/progress-bar.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MdProgressBar {\n /** Value of the progressbar. Defaults to zero. Mirrored to aria-valuenow. */\n private _value: number = 0;\n\n @Input()\n @HostBinding('attr.aria-valuenow')\n get value() {\n return this._value;\n }\n\n set value(v: number) {\n this._value = clamp(v || 0);\n }\n\n /** Buffer value of the progress bar. Defaults to zero. */\n private _bufferValue: number = 0;\n\n @Input()\n get bufferValue() {\n return this._bufferValue;\n }\n\n set bufferValue(v: number) {\n this._bufferValue = clamp(v || 0);\n }\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input()\n @HostBinding('attr.mode')\n mode: 'determinate' | 'indeterminate' | 'buffer' | 'query' = 'determinate';\n\n /**\n * Gets the current transform value for the progress bar's primary indicator.\n * @internal\n */\n primaryTransform() {\n let scale = this.value / 100;\n return `scaleX(${scale})`;\n }\n\n /**\n * Gets the current transform value for the progress bar's buffer indicator. Only used if the\n * progress mode is set to buffer, otherwise returns an undefined, causing no transformation.\n * @internal\n */\n bufferTransform() {\n if (this.mode == 'buffer') {\n let scale = this.bufferValue / 100;\n return `scaleX(${scale})`;\n }\n }\n}\n\n/** Clamps a value to be between two numbers, by default 0 and 100. */\nfunction clamp(v: number, min = 0, max = 100) {\n return Math.max(min, Math.min(max, v));\n}\n"]}
{"version":3,"file":"progress-bar.js","sourceRoot":"","sources":["../../src/demo-app/components/progress-bar/progress-bar.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qBAKO,eAAe,CAAC,CAAA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,MAAM,CAAC,EAAE;YACnB,QAAQ,EAAE,iBAAiB;YAC3B,IAAI,EAAE;gBACJ,MAAM,EAAE,aAAa;gBACrB,eAAe,EAAE,GAAG;gBACpB,eAAe,EAAE,KAAK;aACvB;YACD,WAAW,EAAE,mBAAmB;YAChC,SAAS,EAAE,CAAC,kBAAkB,CAAC;YAC/B,eAAe,EAAE,8BAAuB,CAAC,MAAM;SAChD,CAAC;;qBAAA;IA0DF,oBAAC;AAAD,CAAC,AAzDD,IAyDC;AAzDY,qBAAa,gBAyDzB,CAAA;AAED,sEAAsE;AACtE,eAAe,CAAS,EAAE,GAAO,EAAE,GAAS;IAAlB,mBAAO,GAAP,OAAO;IAAE,mBAAS,GAAT,SAAS;IAC1C,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;AAEY,kCAA0B,GAAG,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n HostBinding,\n Input,\n} from '@angular/core';\n\n\n// TODO(josephperrott): Benchpress tests.\n// TODO(josephperrott): Add ARIA attributes for progressbar \"for\".\n\n\n/**\n * <md-progress-bar> component.\n */\n@Component({\n moduleId: module.id,\n selector: 'md-progress-bar',\n host: {\n 'role': 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n },\n templateUrl: 'progress-bar.html',\n styleUrls: ['progress-bar.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MdProgressBar {\n /** Value of the progressbar. Defaults to zero. Mirrored to aria-valuenow. */\n private _value: number = 0;\n\n @Input()\n @HostBinding('attr.aria-valuenow')\n get value() {\n return this._value;\n }\n\n set value(v: number) {\n this._value = clamp(v || 0);\n }\n\n /** Buffer value of the progress bar. Defaults to zero. */\n private _bufferValue: number = 0;\n\n @Input()\n get bufferValue() {\n return this._bufferValue;\n }\n\n set bufferValue(v: number) {\n this._bufferValue = clamp(v || 0);\n }\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input()\n @HostBinding('attr.mode')\n mode: 'determinate' | 'indeterminate' | 'buffer' | 'query' = 'determinate';\n\n /**\n * Gets the current transform value for the progress bar's primary indicator.\n * @internal\n */\n primaryTransform() {\n let scale = this.value / 100;\n return {transform: `scaleX(${scale})`};\n }\n\n /**\n * Gets the current transform value for the progress bar's buffer indicator. Only used if the\n * progress mode is set to buffer, otherwise returns an undefined, causing no transformation.\n * @internal\n */\n bufferTransform() {\n if (this.mode == 'buffer') {\n let scale = this.bufferValue / 100;\n return {transform: `scaleX(${scale})`};\n }\n }\n}\n\n/** Clamps a value to be between two numbers, by default 0 and 100. */\nfunction clamp(v: number, min = 0, max = 100) {\n return Math.max(min, Math.min(max, v));\n}\n\nexport const MD_PROGRESS_BAR_DIRECTIVES = [MdProgressBar];\n"]}

@@ -16,95 +16,92 @@ "use strict";

var progress_bar_1 = require('./progress-bar');
function main() {
testing_1.describe('MdProgressBar', function () {
var builder;
testing_1.beforeEach(testing_1.inject([testing_2.TestComponentBuilder], function (tcb) {
builder = tcb;
}));
testing_1.it('should apply a mode of "determinate" if no mode is provided.', function (done) {
builder
.overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')
.createAsync(TestApp)
.then(function (fixture) {
fixture.detectChanges();
var progressElement = fixture.debugElement.query(platform_browser_1.By.css('md-progress-bar'));
testing_1.expect(progressElement.componentInstance.mode).toBe('determinate');
done();
});
testing_1.describe('MdProgressBar', function () {
var builder;
testing_1.beforeEach(testing_1.inject([testing_2.TestComponentBuilder], function (tcb) {
builder = tcb;
}));
testing_1.it('should apply a mode of "determinate" if no mode is provided.', function (done) {
builder
.overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')
.createAsync(TestApp)
.then(function (fixture) {
fixture.detectChanges();
var progressElement = fixture.debugElement.query(platform_browser_1.By.css('md-progress-bar'));
testing_1.expect(progressElement.componentInstance.mode).toBe('determinate');
done();
});
testing_1.it('should not modify the mode if a valid mode is provided.', function (done) {
builder
.overrideTemplate(TestApp, '<md-progress-bar mode="buffer"></md-progress-bar>')
.createAsync(TestApp)
.then(function (fixture) {
fixture.detectChanges();
var progressElement = fixture.debugElement.query(platform_browser_1.By.css('md-progress-bar'));
testing_1.expect(progressElement.componentInstance.mode).toBe('buffer');
done();
});
});
testing_1.it('should not modify the mode if a valid mode is provided.', function (done) {
builder
.overrideTemplate(TestApp, '<md-progress-bar mode="buffer"></md-progress-bar>')
.createAsync(TestApp)
.then(function (fixture) {
fixture.detectChanges();
var progressElement = fixture.debugElement.query(platform_browser_1.By.css('md-progress-bar'));
testing_1.expect(progressElement.componentInstance.mode).toBe('buffer');
done();
});
testing_1.it('should define default values for value and bufferValue attributes', function (done) {
builder
.overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')
.createAsync(TestApp)
.then(function (fixture) {
fixture.detectChanges();
var progressElement = fixture.debugElement.query(platform_browser_1.By.css('md-progress-bar'));
testing_1.expect(progressElement.componentInstance.value).toBe(0);
testing_1.expect(progressElement.componentInstance.bufferValue).toBe(0);
done();
});
});
testing_1.it('should define default values for value and bufferValue attributes', function (done) {
builder
.overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')
.createAsync(TestApp)
.then(function (fixture) {
fixture.detectChanges();
var progressElement = fixture.debugElement.query(platform_browser_1.By.css('md-progress-bar'));
testing_1.expect(progressElement.componentInstance.value).toBe(0);
testing_1.expect(progressElement.componentInstance.bufferValue).toBe(0);
done();
});
testing_1.it('should clamp value and bufferValue between 0 and 100', function (done) {
builder
.overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')
.createAsync(TestApp)
.then(function (fixture) {
fixture.detectChanges();
var progressElement = fixture.debugElement.query(platform_browser_1.By.css('md-progress-bar'));
var progressComponent = progressElement.componentInstance;
progressComponent.value = 50;
testing_1.expect(progressComponent.value).toBe(50);
progressComponent.value = 999;
testing_1.expect(progressComponent.value).toBe(100);
progressComponent.value = -10;
testing_1.expect(progressComponent.value).toBe(0);
progressComponent.bufferValue = -29;
testing_1.expect(progressComponent.bufferValue).toBe(0);
progressComponent.bufferValue = 9;
testing_1.expect(progressComponent.bufferValue).toBe(9);
progressComponent.bufferValue = 1320;
testing_1.expect(progressComponent.bufferValue).toBe(100);
done();
});
});
testing_1.it('should clamp value and bufferValue between 0 and 100', function (done) {
builder
.overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')
.createAsync(TestApp)
.then(function (fixture) {
fixture.detectChanges();
var progressElement = fixture.debugElement.query(platform_browser_1.By.css('md-progress-bar'));
var progressComponent = progressElement.componentInstance;
progressComponent.value = 50;
testing_1.expect(progressComponent.value).toBe(50);
progressComponent.value = 999;
testing_1.expect(progressComponent.value).toBe(100);
progressComponent.value = -10;
testing_1.expect(progressComponent.value).toBe(0);
progressComponent.bufferValue = -29;
testing_1.expect(progressComponent.bufferValue).toBe(0);
progressComponent.bufferValue = 9;
testing_1.expect(progressComponent.bufferValue).toBe(9);
progressComponent.bufferValue = 1320;
testing_1.expect(progressComponent.bufferValue).toBe(100);
done();
});
testing_1.it('should return the transform attribute for bufferValue and mode', function (done) {
builder
.overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')
.createAsync(TestApp)
.then(function (fixture) {
fixture.detectChanges();
var progressElement = fixture.debugElement.query(platform_browser_1.By.css('md-progress-bar'));
var progressComponent = progressElement.componentInstance;
testing_1.expect(progressComponent.primaryTransform()).toBe('scaleX(0)');
testing_1.expect(progressComponent.bufferTransform()).toBe(undefined);
progressComponent.value = 40;
testing_1.expect(progressComponent.primaryTransform()).toBe('scaleX(0.4)');
testing_1.expect(progressComponent.bufferTransform()).toBe(undefined);
progressComponent.value = 35;
progressComponent.bufferValue = 55;
testing_1.expect(progressComponent.primaryTransform()).toBe('scaleX(0.35)');
testing_1.expect(progressComponent.bufferTransform()).toBe(undefined);
progressComponent.mode = 'buffer';
testing_1.expect(progressComponent.primaryTransform()).toBe('scaleX(0.35)');
testing_1.expect(progressComponent.bufferTransform()).toBe('scaleX(0.55)');
progressComponent.value = 60;
progressComponent.bufferValue = 60;
testing_1.expect(progressComponent.primaryTransform()).toBe('scaleX(0.6)');
testing_1.expect(progressComponent.bufferTransform()).toBe('scaleX(0.6)');
done();
});
});
testing_1.it('should return the transform attribute for bufferValue and mode', function (done) {
builder
.overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')
.createAsync(TestApp)
.then(function (fixture) {
fixture.detectChanges();
var progressElement = fixture.debugElement.query(platform_browser_1.By.css('md-progress-bar'));
var progressComponent = progressElement.componentInstance;
testing_1.expect(progressComponent.primaryTransform()).toEqual({ transform: 'scaleX(0)' });
testing_1.expect(progressComponent.bufferTransform()).toBe(undefined);
progressComponent.value = 40;
testing_1.expect(progressComponent.primaryTransform()).toEqual({ transform: 'scaleX(0.4)' });
testing_1.expect(progressComponent.bufferTransform()).toBe(undefined);
progressComponent.value = 35;
progressComponent.bufferValue = 55;
testing_1.expect(progressComponent.primaryTransform()).toEqual({ transform: 'scaleX(0.35)' });
testing_1.expect(progressComponent.bufferTransform()).toBe(undefined);
progressComponent.mode = 'buffer';
testing_1.expect(progressComponent.primaryTransform()).toEqual({ transform: 'scaleX(0.35)' });
testing_1.expect(progressComponent.bufferTransform()).toEqual({ transform: 'scaleX(0.55)' });
progressComponent.value = 60;
progressComponent.bufferValue = 60;
testing_1.expect(progressComponent.primaryTransform()).toEqual({ transform: 'scaleX(0.6)' });
testing_1.expect(progressComponent.bufferTransform()).toEqual({ transform: 'scaleX(0.6)' });
done();
});
});
}
exports.main = main;
});
/** Test component that contains an MdButton. */

@@ -123,2 +120,2 @@ var TestApp = (function () {

}());
//# sourceMappingURL=progress-bar.spec.js.map
//# sourceMappingURL=/usr/local/google/home/jelbourn/material2/tmp/broccoli_type_script_compiler-input_base_path-OxHzApZr.tmp/0/components/progress-bar/progress-bar.spec.js.map

@@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AC;AA7Ge,YAAI,OA6GnB,CAAA;AAGD,gDAAgD;AAKhD;IAAA;IAAe,CAAC;IAJhB;QAAC,gBAAS,CAAC;YACT,UAAU,EAAE,CAAC,4BAAa,CAAC;YAC3B,QAAQ,EAAE,EAAE;SACb,CAAC;;eAAA;IACa,cAAC;AAAD,CAAC,AAAhB,IAAgB","sourcesContent":["import {beforeEach, describe, expect, inject, it} from '@angular/core/testing';\nimport {TestComponentBuilder} from '@angular/compiler/testing';\nimport {Component} from '@angular/core';\nimport {By} from '@angular/platform-browser';\nimport {MdProgressBar} from './progress-bar';\n\n\nexport function main() {\n describe('MdProgressBar', () => {\n let builder: TestComponentBuilder;\n\n beforeEach(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {\n builder = tcb;\n }));\n\n it('should apply a mode of \"determinate\" if no mode is provided.', (done: () => void) => {\n builder\n .overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')\n .createAsync(TestApp)\n .then((fixture) => {\n fixture.detectChanges();\n let progressElement = fixture.debugElement.query(By.css('md-progress-bar'));\n expect(progressElement.componentInstance.mode).toBe('determinate');\n done();\n });\n });\n\n it('should not modify the mode if a valid mode is provided.', (done: () => void) => {\n builder\n .overrideTemplate(TestApp, '<md-progress-bar mode=\"buffer\"></md-progress-bar>')\n .createAsync(TestApp)\n .then((fixture) => {\n fixture.detectChanges();\n let progressElement = fixture.debugElement.query(By.css('md-progress-bar'));\n expect(progressElement.componentInstance.mode).toBe('buffer');\n done();\n });\n });\n\n it('should define default values for value and bufferValue attributes', (done: () => void) => {\n builder\n .overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')\n .createAsync(TestApp)\n .then((fixture) => {\n fixture.detectChanges();\n let progressElement = fixture.debugElement.query(By.css('md-progress-bar'));\n expect(progressElement.componentInstance.value).toBe(0);\n expect(progressElement.componentInstance.bufferValue).toBe(0);\n done();\n });\n });\n\n it('should clamp value and bufferValue between 0 and 100', (done: () => void) => {\n builder\n .overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')\n .createAsync(TestApp)\n .then((fixture) => {\n fixture.detectChanges();\n let progressElement = fixture.debugElement.query(By.css('md-progress-bar'));\n let progressComponent = progressElement.componentInstance;\n\n progressComponent.value = 50;\n expect(progressComponent.value).toBe(50);\n\n progressComponent.value = 999;\n expect(progressComponent.value).toBe(100);\n\n progressComponent.value = -10;\n expect(progressComponent.value).toBe(0);\n\n progressComponent.bufferValue = -29;\n expect(progressComponent.bufferValue).toBe(0);\n\n progressComponent.bufferValue = 9;\n expect(progressComponent.bufferValue).toBe(9);\n\n progressComponent.bufferValue = 1320;\n expect(progressComponent.bufferValue).toBe(100);\n done();\n });\n });\n\n it('should return the transform attribute for bufferValue and mode', (done: () => void) => {\n builder\n .overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')\n .createAsync(TestApp)\n .then((fixture) => {\n fixture.detectChanges();\n let progressElement = fixture.debugElement.query(By.css('md-progress-bar'));\n let progressComponent = progressElement.componentInstance;\n\n expect(progressComponent.primaryTransform()).toBe('scaleX(0)');\n expect(progressComponent.bufferTransform()).toBe(undefined);\n\n progressComponent.value = 40;\n expect(progressComponent.primaryTransform()).toBe('scaleX(0.4)');\n expect(progressComponent.bufferTransform()).toBe(undefined);\n\n progressComponent.value = 35;\n progressComponent.bufferValue = 55;\n expect(progressComponent.primaryTransform()).toBe('scaleX(0.35)');\n expect(progressComponent.bufferTransform()).toBe(undefined);\n\n progressComponent.mode = 'buffer';\n expect(progressComponent.primaryTransform()).toBe('scaleX(0.35)');\n expect(progressComponent.bufferTransform()).toBe('scaleX(0.55)');\n\n\n progressComponent.value = 60;\n progressComponent.bufferValue = 60;\n expect(progressComponent.primaryTransform()).toBe('scaleX(0.6)');\n expect(progressComponent.bufferTransform()).toBe('scaleX(0.6)');\n done();\n });\n });\n });\n}\n\n\n/** Test component that contains an MdButton. */\n@Component({\n directives: [MdProgressBar],\n template: '',\n})\nclass TestApp {}\n"]}
{"version":3,"file":"progress-bar.spec.js","sourceRo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AAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAGH,gDAAgD;AAKhD;IAAA;IACA,CAAC;IALD;QAAC,gBAAS,CAAC;YACT,UAAU,EAAE,CAAC,4BAAa,CAAC;YAC3B,QAAQ,EAAE,EAAE;SACb,CAAC;;eAAA;IAEF,cAAC;AAAD,CAAC,AADD,IACC","sourcesContent":["import {beforeEach, describe, expect, inject, it} from '@angular/core/testing';\nimport {TestComponentBuilder} from '@angular/compiler/testing';\nimport {Component} from '@angular/core';\nimport {By} from '@angular/platform-browser';\nimport {MdProgressBar} from './progress-bar';\n\n\ndescribe('MdProgressBar', () => {\n let builder: TestComponentBuilder;\n\n beforeEach(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {\n builder = tcb;\n }));\n\n it('should apply a mode of \"determinate\" if no mode is provided.', (done: () => void) => {\n builder\n .overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')\n .createAsync(TestApp)\n .then((fixture) => {\n fixture.detectChanges();\n let progressElement = fixture.debugElement.query(By.css('md-progress-bar'));\n expect(progressElement.componentInstance.mode).toBe('determinate');\n done();\n });\n });\n\n it('should not modify the mode if a valid mode is provided.', (done: () => void) => {\n builder\n .overrideTemplate(TestApp, '<md-progress-bar mode=\"buffer\"></md-progress-bar>')\n .createAsync(TestApp)\n .then((fixture) => {\n fixture.detectChanges();\n let progressElement = fixture.debugElement.query(By.css('md-progress-bar'));\n expect(progressElement.componentInstance.mode).toBe('buffer');\n done();\n });\n });\n\n it('should define default values for value and bufferValue attributes', (done: () => void) => {\n builder\n .overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')\n .createAsync(TestApp)\n .then((fixture) => {\n fixture.detectChanges();\n let progressElement = fixture.debugElement.query(By.css('md-progress-bar'));\n expect(progressElement.componentInstance.value).toBe(0);\n expect(progressElement.componentInstance.bufferValue).toBe(0);\n done();\n });\n });\n\n it('should clamp value and bufferValue between 0 and 100', (done: () => void) => {\n builder\n .overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')\n .createAsync(TestApp)\n .then((fixture) => {\n fixture.detectChanges();\n let progressElement = fixture.debugElement.query(By.css('md-progress-bar'));\n let progressComponent = progressElement.componentInstance;\n\n progressComponent.value = 50;\n expect(progressComponent.value).toBe(50);\n\n progressComponent.value = 999;\n expect(progressComponent.value).toBe(100);\n\n progressComponent.value = -10;\n expect(progressComponent.value).toBe(0);\n\n progressComponent.bufferValue = -29;\n expect(progressComponent.bufferValue).toBe(0);\n\n progressComponent.bufferValue = 9;\n expect(progressComponent.bufferValue).toBe(9);\n\n progressComponent.bufferValue = 1320;\n expect(progressComponent.bufferValue).toBe(100);\n done();\n });\n });\n\n it('should return the transform attribute for bufferValue and mode', (done: () => void) => {\n builder\n .overrideTemplate(TestApp, '<md-progress-bar></md-progress-bar>')\n .createAsync(TestApp)\n .then((fixture) => {\n fixture.detectChanges();\n let progressElement = fixture.debugElement.query(By.css('md-progress-bar'));\n let progressComponent = progressElement.componentInstance;\n\n expect(progressComponent.primaryTransform()).toEqual({ transform: 'scaleX(0)' });\n expect(progressComponent.bufferTransform()).toBe(undefined);\n\n progressComponent.value = 40;\n expect(progressComponent.primaryTransform()).toEqual({ transform: 'scaleX(0.4)' });\n expect(progressComponent.bufferTransform()).toBe(undefined);\n\n progressComponent.value = 35;\n progressComponent.bufferValue = 55;\n expect(progressComponent.primaryTransform()).toEqual({ transform: 'scaleX(0.35)' });\n expect(progressComponent.bufferTransform()).toBe(undefined);\n\n progressComponent.mode = 'buffer';\n expect(progressComponent.primaryTransform()).toEqual({ transform: 'scaleX(0.35)' });\n expect(progressComponent.bufferTransform()).toEqual({ transform: 'scaleX(0.55)' });\n\n\n progressComponent.value = 60;\n progressComponent.bufferValue = 60;\n expect(progressComponent.primaryTransform()).toEqual({ transform: 'scaleX(0.6)' });\n expect(progressComponent.bufferTransform()).toEqual({ transform: 'scaleX(0.6)' });\n done();\n });\n });\n});\n\n\n/** Test component that contains an MdButton. */\n@Component({\n directives: [MdProgressBar],\n template: '',\n})\nclass TestApp {\n}\n"]}