Skip to content
Permalink
Browse files

Initial version with "hello-world" level of functionality.

  • Loading branch information...
Jim McBeath
Jim McBeath committed Jan 17, 2018
0 parents commit 6a9c1172a70e2c6d23a362b0655c39f428c13105
@@ -0,0 +1,5 @@
bower_components
build
components/*/*.js
components/*/*.js.map
snaphome
@@ -0,0 +1,35 @@
{
"name": "mimview",
"main": "index.html",
"dependencies": {
"app-layout": "PolymerElements/app-layout#^2.0.2",
"app-route": "PolymerElements/app-route#^2.0.2",
"iron-a11y-keys": "PolymerElements/iron-a11y-keys#^2.0.0",
"iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^2.0.0",
"iron-icons": "PolymerElements/iron-icons#^2.0.1",
"iron-image": "PolymerElements/iron-image#^2.0.1",
"iron-pages": "PolymerElements/iron-pages#^2.0.0",
"iron-selector": "PolymerElements/iron-selector#^2.0.0",
"neon-animation": "PolymerElements/neon-animation#^2.0.1",
"paper-behaviors": "PolymerElements/paper-behaviors#^2.0.0",
"paper-button": "PolymerElements/paper-button#^2.0.0",
"paper-checkbox": "PolymerElements/paper-checkbox#^2.0.1",
"paper-dialog": "PolymerElements/paper-dialog#^2.0.0",
"paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^2.0.1",
"paper-icon-button": "PolymerElements/paper-icon-button#^2.0.1",
"paper-input": "PolymerElements/paper-input#^2.0.2",
"paper-item": "PolymerElements/paper-item#^2.0.0",
"paper-listbox": "PolymerElements/paper-listbox#^2.0.0",
"paper-progress": "PolymerElements/paper-progress#^2.0.1",
"paper-radio-group": "PolymerElements/paper-radio-group#^2.0.0",
"paper-spinner": "PolymerElements/paper-spinner#^2.0.0",
"paper-toast": "PolymerElements/paper-toast#^2.0.0",
"paper-tooltip": "PolymerElements/paper-tooltip#^2.0.0",
"polymer": "Polymer/polymer#^2.0.2",
"polymer-decorators": "Polymer/polymer-decorators#^0.1.2",
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0-rc.9"
},
"devDependencies": {
"web-component-tester": "~6.3.0"
}
}
@@ -0,0 +1,16 @@
<link rel="import" href="../../bower_components/polymer-decorators/polymer-decorators.html">
<link rel="import" href="../../bower_components/polymer/polymer.html">

<dom-module id="mim-image">
<template>
<style>
:host {
}
</style>
<div>
This is where the image goes
</div>
</template>
</dom-module>

<script src="mim-image.js"></script>
@@ -0,0 +1,5 @@
/* Mim-image component */

@Polymer.decorators.customElement('mim-image')
class MimImage extends Polymer.Element {
}
@@ -0,0 +1,20 @@
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
<link rel="import" href="../../bower_components/paper-checkbox/paper-checkbox.html">
<link rel="import" href="../../bower_components/polymer-decorators/polymer-decorators.html">
<link rel="import" href="../../bower_components/polymer/polymer.html">

<dom-module id="mim-nav">
<template>
<style>
:host {
}
</style>
<div>
This is the nav bar
</div>
<paper-button>Button in nav</paper-button>
<paper-checkbox>Checkbox in nav</paper-checkbox>
</template>
</dom-module>

<script src="mim-nav.js"></script>
@@ -0,0 +1,5 @@
/* Nav component */

@Polymer.decorators.customElement('mim-nav')
class MimNav extends Polymer.Element {
}
@@ -0,0 +1,35 @@
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
<link rel="import" href="../../components/mim-image/mim-image.html">
<link rel="import" href="../../components/mim-nav/mim-nav.html">
<link rel="import" href="../../bower_components/polymer-decorators/polymer-decorators.html">
<link rel="import" href="../../bower_components/polymer/polymer.html">

<dom-module id="mimview-app">
<template>
<style>
:host {
height: 100%;
}
#main {
display: -webkit-flex; /* Safari */
display: flex;
flex-direction: row;
-webkit-flex-direction: row; /* Safari */
flex-wrap: nowrap;
-webkit-flex-warp: nowrap; /* Safari */
height: 100%;
}
#image {
flex-grow: 1;
background-color: red;
height: 100%;
}
</style>
<div id="main">
<mim-nav></mim-nav>
<mim-image id="image"></mim-image>
</div>
</template>
</dom-module>

<script src="mimview-app.js"></script>
@@ -0,0 +1,5 @@
/* Mimview app */

@Polymer.decorators.customElement('mimview-app')
class MimviewApp extends Polymer.Element {
}
@@ -0,0 +1,140 @@
/*
* Copyright 2017 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/

/**
* Type definitions for Polymer 2.0
*/

interface CustomElementRegistry {
define(name: string, constructor: Function, options?: ElementDefinitionOptions): void;
get(name: string): any;
whenDefined(name: string): Promise<void>;
}

interface ElementDefinitionOptions {
extends: string;
}

interface PolymerTemplate extends Node {
content: HTMLElement;
assetpath: string;
}

declare module Polymer {

class Element extends HTMLElement {
$: any;
$$: any;
root: HTMLElement;
rootPath: string;
importPath: string;
shadyRoot: HTMLElement;
style: CSSStyleDeclaration;
customStyle: {
[property: string]: string;
};
arrayDelete(path: string, item: string | any): any;
async(callback: Function, waitTime?: number): any;
attachedCallback(): void;
attributeFollows(name: string, toElement: HTMLElement, fromElement: HTMLElement): void;
cancelAsync(handle: number): void;
cancelDebouncer(jobName: string): void;
classFollows(name: string, toElement: HTMLElement, fromElement: HTMLElement): void;
create(tag: string, props?: Object): HTMLElement;
debounce(jobName: string, callback: Function, wait?: number): void;
deserialize(value: string, type: any): any;
distributeContent(): void;
domHost(): void;
elementMatches(selector: string, node: Element): any;
fire(type: string, detail?: Object, options?: FireOptions): any;
flushDebouncer(jobName: string): void;
get(path: string | Array<string | number>): any;
getContentChildNodes(slctr: string): any;
getContentChildren(slctr: string): any;
getNativePrototype(tag: string): any;
getPropertyInfo(property: string): any;
instanceTemplate(template: any): any;
isDebouncerActive(jobName: string): any;
linkPaths(to: string, from: string): void;
listen(node: Element, eventName: string, methodName: string): void;
mixin(target: Object, source: Object): void;
notifyPath(path: string, value: any, fromAbove?: any): void;
notifySplices(path: string, splices: {
index: number;
removed: Array<any>;
addedCount: number;
object: Array<any>;
type: "splice";
}[]): void;
pop(path: string): any;
push(path: string, value: any): any;
reflectPropertyToAttribute(name: string): void;
resolveUrl(url: string, base?: string): any;
scopeSubtree(container: Element, shouldObserve: boolean): void;
serialize(value: string): any;
serializeValueToAttribute(value: any, attribute: string, node: Element): void;
set(path: string | Array<string | number>, value: any, root?: Object): any;
setScrollDirection(direction: string, node: HTMLElement): void;
shift(path: string, value: any): any;
splice(path: string, start: number, deleteCount: number, ...items: any[]): any;
static template: PolymerTemplate;
toggleAttribute(name: string, bool: boolean, node?: HTMLElement): void;
toggleClass(name: string, bool: boolean, node?: HTMLElement): void;
transform(transform: string, node?: HTMLElement): void;
translate3d(x: any, y: any, z: any, node?: HTMLElement): void;
unlinkPaths(path: string): void;
unlisten(node: Element, eventName: string, methodName: string): void;
unshift(path: string, value: any): any;
updateStyles(properties?: Object): void;
shadowRoot: ShadowRoot;
is: string;
properties?: Object;
listeners?: Object;
behaviors?: Object[];
observers?: String[];
factoryImpl?(...args: any[]): void;
ready(): void;
created(): void;
attached(): void;
detached(): void;
connectedCallback(): void;
disconnectedCallback(): void;
attributeChanged?(attrName: string, oldVal: any, newVal: any): void;
prototype?: Object;
}

class DomModule {
static import(element: string, property: string): PolymerTemplate;
}

class dom {
static flush(): null;
}

class ResolveUrl {
static resolveUrl(url: string, base: string): string;
}

function importHref(href: string,
onload?: Function,
onerror?: Function,
optAsync?: boolean): any;

interface FireOptions {
node?: HTMLElement | Polymer.Element;
bubbles?: boolean;
cancelable?: boolean;
}

}
@@ -0,0 +1,22 @@
<!doctype html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MimView</title>
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="components/mimview-app/mimview-app.html">
<style>
html, body {
height: 100%;
margin: 0;
}
</style>
</head>

<body>
<mimview-app></mimview-app>
</body>

</html>
@@ -0,0 +1,8 @@
{
"entrypoint": "index.html",
"fragments": [
"components/mim-image/mim-image.html",
"components/mim-nav/mim-nav.html",
"components/mimview-app/mimview-app.html"
]
}
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"strictNullChecks": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"sourceMap": true,
"typeRoots": [
"types"
]
},
"include": [
"**/*.ts",
"externs/polymer.d.ts"
],
"exclude": [
"bower_components",
],
"files": [
"bower_components/polymer-decorators/global.d.ts"
]
}

0 comments on commit 6a9c117

Please sign in to comment.
You can’t perform that action at this time.