ozone-login-form
Version:
generic login form for ozone authentication
145 lines (133 loc) • 5.79 kB
JavaScript
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ozone_login_form_spec_html__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ozone_login_form_spec_html___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__ozone_login_form_spec_html__);
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
const RegisterHtmlTemplate = __webpack_require__(2);
RegisterHtmlTemplate.toBody("<html lang=en><head> <meta charset=utf-8> <meta name=viewport content=\"width=device-width,minimum-scale=1,initial-scale=1,user-scalable=yes\"> <title>ozone-video-player test</title> <script src=../../bower_components/webcomponentsjs/webcomponents-lite.js></script> <script src=../../web-component-tester/browser.js></script> </head> <body> <test-fixture id=BasicTestFixture> <template> <ozone-login-form></ozone-login-form> </template> </test-fixture> <script>describe(\"ozone-login-form\",function(){it(\"should have expected properties\",function(e){assert.equal(!0,!1);var s=fixture(\"BasicTestFixture\");assert.equal(s.username,\"\"),e()}),describe(\"some func\",function(){it(\"should do something \",function(e){assert.equal(!0,!0),e()})})})</script> </body></html>");
/***/ }),
/* 2 */
/***/ (function(module, exports) {
/* eslint-env browser */
class RegisterHtmlTemplate {
/**
* Create a `<template>` element to hold `<dom-module>` content.
* This bit of code will execute in the context of the main document,
* calling `importNode` on the `<template>`, which in turn triggers
* the lifecycle of the `<dom-module>` and allows it to insert its
* content into Polymer's global module map. When a Polymer element
* boots up it will fetch its template from this module map.
* https://github.com/Polymer/polymer/blob/master/lib/mixins/element-mixin.html#L501-L538
* @param {string} val A `<dom-module>` as an HTML string
*/
static register(val) {
let content;
const template = document.createElement('template');
template.innerHTML = val;
if (template.content) {
content = template.content; // eslint-disable-line prefer-destructuring
} else {
content = document.createDocumentFragment();
while (template.firstChild) {
content.appendChild(template.firstChild);
}
}
document.importNode(content, true);
}
/**
* Content that will be injected into the main document. This is primarily
* for things like `<iron-iconset>` and `<custom-style>` which do not have
* templates but rely on HTML Imports ability to apply content to the main
* document.
* @param {string} val An HTML string
*/
static toBody(val) {
const trimmedVal = val.trim();
if (trimmedVal) {
const div = document.createElement('div');
div.innerHTML = trimmedVal;
if (div.firstChild) {
if (document.body) {
document.body.insertBefore(div.firstChild, document.body.firstChild);
} else {
document.addEventListener('DOMContentLoaded', () => {
document.body.insertBefore(div.firstChild, document.body.firstChild);
});
}
}
}
}
}
module.exports = RegisterHtmlTemplate;
/***/ })
/******/ ]);