-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.js.map
1 lines (1 loc) · 93 KB
/
app.js.map
1
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../src/app.ts","webpack:///../src/createComponent.tsx","webpack:///../src/vdom-my.ts","webpack:///../src/web-component.ts","webpack:///../src/decorator.ts","webpack:///../src/directive.ts","webpack:///../src/component.ts","webpack:///../src/router.ts","webpack:///../src/apprun.ts","webpack:///../src/vdom.ts","webpack:///(webpack)/buildin/global.js","webpack:///./src/bootstrap.tsx","webpack:///./demo/table-data.ts","webpack:///./demo/table.tsx","webpack:///./demo/chart.tsx","webpack:///./demo/calendar.tsx","webpack:///./demo/map.tsx","webpack:///./demo/Home.tsx","webpack:///./demo/About.tsx","webpack:///./demo/Contact.tsx","webpack:///./demo/main.tsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","App","[object Object]","this","_events","fn","options","push","subscribers","filter","sub","args","console","assert","length","once","forEach","delay","apply","on","_t","clearTimeout","setTimeout","app","root","self","global","_idx","collect","children","ch","Array","isArray","keyCache","updateElement","element","nodes","parent","createComponent","node","idx","map","child","vdom","tag","getPrototypeOf","__isAppRunComponent","props","id","Date","now","__componentCache","component","mount","state","mounted","new_state","Promise","render","el","setState","ref","e","_view","renderState","updateChildren","update","key1","nodeName","key2","toUpperCase","updateProps","parentNode","replaceChild","len","Math","min","childNodes","HTMLElement","insertBefore","textContent","nodeType","createText","old","appendChild","removeChild","lastChild","document","createDocumentFragment","indexOf","div","createElement","insertAdjacentHTML","substring","createTextNode","isSvg","SVGElement","JSON","stringify","createElementNS","cached","oldProps","newProps","keys","style","cssText","startsWith","cname","replace","match","dataset","getAttribute","setAttribute","removeAttribute","window","requestAnimationFrame","customElement","componentClass","super","_component","observedAttributes","isConnected","opts","_shadowRoot","shadow","attachShadow","from","attributes","item","parentElement","run","unload","unmount","customElements","define","Reflect","meta","WeakMap","metadataKey","metadataValue","target","has","set","getStateValue","setStateValue","componentCache","components","REFRESH","Component","view","_history_idx","_history","history","h","event","handler","type","checked","Number","multiple","selected","html","getElementById","tracking_attr","tracking_id","valueOf","toString","MutationObserver","observer","changes","oldValue","body","contains","disconnect","observe","childList","subtree","attributeOldValue","attributeFilter","rendered","then","catch","err","error","_state","enable_history","callback","global_event","prev","_history_prev","next","_history_next","add_actions","_global_events","action","newState","actions","getMetadataKeys","getMetadata","all","act","split","trim","add_action","is_global_event","_app","_actions","off","route","url","rest","_","Error","Fragment","webComponent","start","model","NOOP","addEventListener","onpopstate","location","hash","g","Function","mergeClassName","class","className","Row","Column","Card","header","footer","Alert","role","Menus","menus","menu","href","icon","text","Sidebar","table","$","dataTable","isDataTable","DataTable","columns","title","data","dt","pageLength","color","Chart","helpers","chartColors","newDateString","days","moment","add","format","randomScalingFactor","max","random","labels","datasets","label","backgroundColor","alpha","rgbString","borderColor","fill","scales","xAxes","display","time","canvas","ctx","getContext","chart","destroy","log","yyyymm","toISOString","substr","events","end","fullCalendar","left","center","right","defaultDate","navLinks","editable","eventLimit","features","width","clientWidth","height","projection","d3","geo","naturalEarth","scale","rotate","translate","precision","path","svg","select","attr","append","selectAll","enter","map_card","__","resolve","reject","json","topo","topojson","feature","objects","countries","Dashboard","Widgets","CardList","Alerts","toFixed","querySelectorAll","classList","remove","querySelector","placeholder","Home"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EA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,MAAM,WAAS,eAGzB,wBAAIA,MAAM,YACR,uBAAGA,MAAM,WAAWY,KAAK,UAAQ,UAInC,wBAAIZ,MAAM,YACR,uBAAGA,MAAM,WAAWY,KAAK,YAAU,aAKvC,0BAAMZ,MAAM,4BACV,yBAAKA,MAAM,sCACT,yBAAKA,MAAM,uBACT,uBAAGA,MAAM,mCAEX,2BACErE,KAAK,OACLqE,MAAM,eACN2G,YAAY,SAAQ,aACT,SAAQ,mBACF,6BAM3B,yBAAK3G,MAAM,YAAYjL,GAAG,YAIK,KAOnC,IAAI6R,GAAOxR,MADK,WAEhB,IAAI,GAAQA,MAFI,WAGhB,IAAI,GAAUA,MAHE","file":"app.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","import { EventOptions} from './types'\nexport class App {\n\n private _events: Object;\n\n public start;\n public createElement;\n public render;\n public Fragment;\n public webComponent;\n\n constructor() {\n this._events = {};\n }\n\n on(name: string, fn: (...args) => void, options: EventOptions = {}): void {\n this._events[name] = this._events[name] || [];\n this._events[name].push({ fn, options });\n }\n\n off(name: string, fn: (...args) => void): void {\n const subscribers = this._events[name] || [];\n \n this._events[name] = subscribers.filter((sub) => sub.fn !== fn);\n }\n\n find(name: string): any {\n return this._events[name];\n }\n\n run(name: string, ...args): number {\n let subscribers = this._events[name] || [];\n\n console.assert(subscribers && subscribers.length > 0, 'No subscriber for event: ' + name);\n\n // Update the list of subscribers by pulling out those which will run once.\n // We must do this update prior to running any of the events in case they\n // cause additional events to be turned off or on.\n this._events[name] = subscribers.filter((sub) => {\n return !sub.options.once;\n });\n\n subscribers.forEach((sub) => {\n const { fn, options } = sub;\n if (options.delay) {\n this.delay(name, fn, args, options);\n } else {\n fn.apply(this, args);\n }\n return !sub.options.once;\n });\n\n return subscribers.length;\n }\n\n once(name: string, fn, options: EventOptions = {}): void {\n this.on(name, fn, { ...options, once: true });\n }\n\n private delay(name, fn, args, options): void {\n if (options._t) clearTimeout(options._t);\n options._t = setTimeout(() => {\n clearTimeout(options._t);\n fn.apply(this, args);\n }, options.delay);\n }\n}\n\nconst AppRunVersions = 'AppRun-2';\nlet app: App;\nconst root = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global)\nif (root['app'] && root['_AppRunVersions']) {\n app = root['app'];\n} else {\n app = new App();\n root['app'] = app;\n root['_AppRunVersions'] = AppRunVersions;\n}\nexport default app;\n","import app from './app';\n\nfunction render(node, parent, idx) {\n const { tag, props, children } = node;\n let key = `_${idx}`;\n let id = props && props['id'];\n if (!id) id = `_${idx}${Date.now()}`;\n else key = id;\n if (!parent.__componentCache) parent.__componentCache = {};\n let component = parent.__componentCache[key];\n if (!component) {\n component = parent.__componentCache[key] = new tag({ ...props, children }).mount(id);\n component['__eid'] = id;\n } else {\n id = component['__eid'];\n }\n let state = component.state;\n if (component.mounted) {\n const new_state = component.mounted(props, children, state);\n if (typeof new_state !== 'undefined') state = component.state = new_state;\n }\n if (state instanceof Promise) {\n const render = el => {\n component.element = el;\n component.setState(state);\n }\n return <section {...props} id={id} ref={e => render(e)}></section>;\n }\n else {\n const vdom = component._view(state, props);\n const render = el => {\n component.element = el;\n component.renderState(state, vdom);\n }\n return <section {...props} id={id} ref={e => render(e)}>{vdom}</section>;\n }\n}\n\nlet _idx = 0;\nexport default function createComponent(node, parent, idx = 0) {\n if (idx === 0) _idx = 0;\n if (typeof node === 'string') return node;\n if (Array.isArray(node)) return node.map(child => createComponent(child, parent, _idx));\n let vdom = node;\n if (node && typeof node.tag === 'function' && Object.getPrototypeOf(node.tag).__isAppRunComponent)\n vdom = render(node, parent, _idx++);\n if (vdom && Array.isArray(vdom.children))\n vdom.children = vdom.children.map(child => createComponent(child, parent, _idx));\n return vdom;\n}\n","import createComponent from './createComponent';\nimport { VDOM, VNode } from './types';\nexport type Element = any; //HTMLElement | SVGSVGElement | SVGElement;\n\nconst ATTR_PROPS = '_props';\n\nfunction collect(children) {\n const ch = [];\n const push = (c) => {\n if (c !== null && c !== undefined && c !== '' && c !== false) {\n ch.push((typeof c === 'function' || typeof c === 'object') ? c : `${c}`);\n }\n }\n children && children.forEach(c => {\n if (Array.isArray(c)) {\n c.forEach(i => push(i));\n } else {\n push(c);\n }\n });\n return ch;\n}\n\nexport function createElement(tag: string | Function | [], props?: {}, ...children) {\n const ch = collect(children);\n if (typeof tag === 'string') return { tag, props, children: ch };\n else if (Array.isArray(tag)) return tag; // JSX fragments - babel\n else if (tag === undefined && children) return ch; // JSX fragments - typescript\n else if (Object.getPrototypeOf(tag).__isAppRunComponent) return { tag, props, children: ch } // createComponent(tag, { ...props, children });\n else if (typeof tag === 'function') return tag(props, ch);\n else throw new Error(`Unknown tag in vdom ${tag}`);\n};\n\nconst keyCache = {};\n\nexport const updateElement = render;\n\nexport function render(element: Element, nodes: VDOM, parent = {}) {\n // console.log('render', element, node);\n // tslint:disable-next-line\n if (nodes == null || nodes === false) return;\n\n nodes = createComponent(nodes, parent);\n\n if (!element) return;\n if (Array.isArray(nodes)) {\n updateChildren(element, nodes);\n } else {\n updateChildren(element, [nodes]);\n }\n}\n\nfunction same(el: Element, node: VNode) {\n // if (!el || !node) return false;\n const key1 = el.nodeName;\n const key2 = `${node.tag || ''}`;\n return key1.toUpperCase() === key2.toUpperCase();\n}\n\nfunction update(element: Element, node: VNode) {\n console.assert(!!element);\n //console.log('update', element, node);\n if (!same(element, node)) {\n element.parentNode.replaceChild(create(node), element);\n return;\n }\n updateChildren(element, node.children);\n updateProps(element, node.props);\n}\n\nfunction updateChildren(element, children) {\n const len = Math.min(element.childNodes.length, children.length);\n for (let i = 0; i < len; i++) {\n const child = children[i];\n const el = element.childNodes[i];\n if (child instanceof HTMLElement) {\n element.insertBefore(child, el);\n }\n else if (typeof child === 'string') {\n if (el.textContent !== child) {\n if (el.nodeType === 3) {\n el.textContent = child\n } else {\n element.replaceChild(createText(child), el);\n }\n }\n } else {\n const key = child.props && child.props['key'];\n if (key) {\n if (el.key === key) {\n update(element.childNodes[i], child);\n } else {\n const old = keyCache[key];\n if (old) {\n element.insertBefore(old, el);\n element.appendChild(el);\n update(element.childNodes[i], child);\n } else {\n element.insertBefore(create(child), el);\n }\n }\n } else {\n update(element.childNodes[i], child);\n }\n }\n }\n\n let n = element.childNodes.length;\n while (n > len) {\n element.removeChild(element.lastChild);\n n--;\n }\n\n if (children.length > len) {\n const d = document.createDocumentFragment();\n for (let i = len; i < children.length; i++) {\n d.appendChild(create(children[i]));\n }\n element.appendChild(d);\n }\n}\n\nfunction createText(node) {\n if (node.indexOf('_html:') === 0) { // ?\n const div = document.createElement('div');\n div.insertAdjacentHTML('afterbegin', node.substring(6))\n return div;\n } else {\n return document.createTextNode(node);\n }\n}\n\nfunction create(node: VNode | string | HTMLElement | SVGElement, isSvg = false): Element {\n console.assert(node !== null && node !== undefined);\n // console.log('create', node, typeof node);\n if ((node instanceof HTMLElement) || (node instanceof SVGElement)) return node;\n if (typeof node === \"string\") return createText(node);\n if (!node.tag || (typeof node.tag === 'function')) return createText(JSON.stringify(node));\n isSvg = isSvg || node.tag === \"svg\";\n const element = isSvg\n ? document.createElementNS(\"http://www.w3.org/2000/svg\", node.tag)\n : document.createElement(node.tag);\n\n updateProps(element, node.props);\n\n if (node.children) node.children.forEach(child => element.appendChild(create(child, isSvg)));\n\n return element\n}\n\nfunction mergeProps(oldProps: {}, newProps: {}): {} {\n newProps['class'] = newProps['class'] || newProps['className'];\n delete newProps['className'];\n const props = {};\n if (oldProps) Object.keys(oldProps).forEach(p => props[p] = null);\n if (newProps) Object.keys(newProps).forEach(p => props[p] = newProps[p]);\n return props;\n}\n\nfunction updateProps(element: Element, props: {}) {\n console.assert(!!element);\n // console.log('updateProps', element, props);\n const cached = element[ATTR_PROPS] || {};\n props = mergeProps(cached, props || {});\n element[ATTR_PROPS] = props;\n for (const name in props) {\n const value = props[name];\n // if (cached[name] === value) continue;\n // console.log('updateProps', name, value);\n if (name === 'style') {\n if (element.style.cssText) element.style.cssText = '';\n for (const s in value) {\n if (element.style[s] !== value[s]) element.style[s] = value[s];\n }\n } else if (name.startsWith('data-')) {\n const dname = name.substring(5);\n const cname = dname.replace(/-(\\w)/g, (match) => match[1].toUpperCase());\n if (element.dataset[cname] !== value) {\n if (value || value === \"\") element.dataset[cname] = value;\n else delete element.dataset[cname];\n }\n } else if (name === 'id' || name === 'class' || name.startsWith(\"role\") || name.indexOf(\"-\") > 0 ||\n element instanceof SVGElement) {\n if (element.getAttribute(name) !== value) {\n if (value) element.setAttribute(name, value);\n else element.removeAttribute(name);\n }\n } else if (element[name] !== value) {\n element[name] = value;\n }\n if (name === 'key' && value) keyCache[value] = element;\n }\n if (props && typeof props['ref'] === 'function') {\n window.requestAnimationFrame(()=>props['ref'](element));\n }\n}\n\nexport function Fragment(props, ...children): any[] {\n return collect(children);\n}","declare var customElements;\n\nexport type CustomElementOptions = {\n render?, shadow?, history?, global_event?: boolean;\n observedAttributes?: string[]\n};\n\nexport const customElement = (componentClass, options: CustomElementOptions = {}) => class extends HTMLElement {\n private _shadowRoot;\n private _component;\n public on;\n public run;\n constructor() {\n super();\n }\n get component() { return this._component; }\n get state() { return this._component.state; }\n\n static get observedAttributes() {\n return { ...options }['observedAttributes'];\n }\n\n connectedCallback() {\n if (this.isConnected && !this._component) {\n const opts = options || {};\n this._shadowRoot = opts.shadow ? this.attachShadow({ mode: 'open' }) : this;\n const props = {}\n Array.from(this.attributes).forEach(item => props[item.name] = item.value);\n const children = this.children ? Array.from(this.children) : [];\n children.forEach(el => el.parentElement.removeChild(el));\n this._component = new componentClass({ ...props, children }).mount(this._shadowRoot, opts);\n if (this._component.mounted) {\n const new_state = this._component.mounted(props, children, this._component.state);\n if (typeof new_state !== 'undefined') this._component.state = new_state;\n }\n this.on = this._component.on.bind(this._component);\n this.run = this._component.run.bind(this._component);\n if (!(opts.render===false)) this._component.run('.');\n }\n }\n\n disconnectedCallback() {\n this._component.unload && this._component.unload();\n this._component.unmount();\n this._component = null;\n }\n\n attributeChangedCallback(...args) {\n this._component && this._component.run('attributeChanged', ...args);\n }\n}\n\nexport default (name: string, componentClass, options?: CustomElementOptions) => {\n (typeof customElements !== 'undefined') && customElements.define(name, customElement(componentClass, options))\n}","import webComponent, { CustomElementOptions } from './web-component';\n\n// tslint:disable:no-invalid-this\nexport const Reflect = {\n\n meta: new WeakMap(),\n\n defineMetadata(metadataKey, metadataValue, target) {\n if (!this.meta.has(target)) this.meta.set(target, {});\n this.meta.get(target)[metadataKey] = metadataValue;\n },\n\n getMetadataKeys(target) {\n target = Object.getPrototypeOf(target);\n return this.meta.get(target) ? Object.keys(this.meta.get(target)) : [];\n },\n\n getMetadata(metadataKey, target) {\n target = Object.getPrototypeOf(target);\n return this.meta.get(target) ? this.meta.get(target)[metadataKey] : null;\n }\n}\n\nexport function update<E=string>(events?: E, options: any = {}) {\n return (target: any, key: string, descriptor: any) => {\n const name = events ? events.toString() : key;\n Reflect.defineMetadata(`apprun-update:${name}`,\n { name, key, options }, target);\n return descriptor;\n }\n}\n\nexport function on<E>(events?: E, options: any = {}) {\n return function (target: any, key: string) {\n const name = events ? events.toString() : key;\n Reflect.defineMetadata(`apprun-update:${name}`,\n { name, key, options }, target)\n }\n}\n\nexport function customElement(name: string, options?: CustomElementOptions) {\n return function _customElement<T extends { new(...args: any[]): {} }>(constructor: T) {\n webComponent(name, constructor, options);\n return constructor;\n }\n}\n\n","import app from './app';\n\nconst getStateValue = (component, name) => {\n return (name ? component['state'][name] : component['state']) || '';\n}\n\nconst setStateValue = (component, name, value) => {\n if (name) {\n const state = { ...component['state'] };\n state[name] = value;\n component.setState(state);\n } else {\n component.setState(value);\n }\n}\n\nexport default (key: string, props: [], tag, component) => {\n if (key.startsWith('$on')) {\n const event = props[key];\n key = key.substring(1)\n if (typeof event === 'boolean') {\n props[key] = e => component.run(key, e);\n } else if (typeof event === 'string') {\n props[key] = e => component.run(event, e);\n } else if (typeof event === 'function') {\n props[key] = e => component.setState(event(component.state, e));\n } else if (Array.isArray(event)) {\n const [handler, ...p] = event;\n if (typeof handler === 'string') {\n props[key] = e => component.run(handler, ...p, e);\n } else if (typeof handler === 'function') {\n props[key] = e => component.setState(handler(component.state, ...p, e));\n }\n }\n\n } else if (key === '$bind') {\n const type = props['type'] || 'text';\n const name = typeof props[key] === 'string' ? props[key] : props['name'];\n if (tag === 'input') {\n switch (type) {\n case 'checkbox':\n props['checked'] = getStateValue(component, name);\n props['onclick'] = e => setStateValue(component, name || e.target.name, e.target.checked);\n break;\n case 'radio':\n props['checked'] = getStateValue(component, name) === props['value'];\n props['onclick'] = e => setStateValue(component, name || e.target.name, e.target.value);\n break;\n case 'number':\n case 'range':\n props['value'] = getStateValue(component, name);\n props['oninput'] = e => setStateValue(component, name || e.target.name, Number(e.target.value));\n break;\n default:\n props['value'] = getStateValue(component, name);\n props['oninput'] = e => setStateValue(component, name || e.target.name, e.target.value);\n }\n } else if (tag === 'select') {\n props['value'] = getStateValue(component, name);\n props['onchange'] = e => {\n if (!e.target.multiple) { // multiple selection use $bind on option\n setStateValue(component, name || e.target.name, e.target.value);\n }\n }\n } else if (tag === 'option') {\n props['selected'] = getStateValue(component, name);\n props['onclick'] = e => setStateValue(component, name || e.target.name, e.target.selected);\n }\n } else {\n app.run('$', { key, tag, props, component });\n }\n}","\r\nimport app, { App } from './app';\r\nimport { Reflect } from './decorator'\r\nimport { View, Update, ActionDef, ActionOptions } from './types';\r\nimport directive from './directive';\r\n\r\nconst componentCache = {};\r\napp.on('get-components', o => o.components = componentCache);\r\n\r\nconst REFRESH = state => state;\r\n\r\nexport class Component<T=any, E=any> {\r\n static __isAppRunComponent = true;\r\n private _app = new App();\r\n private _actions = [];\r\n private _global_events = [];\r\n private _state;\r\n private _history = [];\r\n private _history_idx = -1;\r\n private enable_history;\r\n private global_event;\r\n public element;\r\n public rendered;\r\n public mounted;\r\n public unload;\r\n private tracking_id;\r\n private observer;\r\n\r\n render(element: HTMLElement, node) {\r\n app.render(element, node, this);\r\n }\r\n\r\n private _view(state, p = null) {\r\n if (!this.view) return;\r\n const h = app.createElement;\r\n app.createElement = (tag, props, ...children) => {\r\n props && Object.keys(props).forEach(key => {\r\n if (key.startsWith('$')) {\r\n directive(key, props, tag, this);\r\n delete props[key];\r\n }\r\n });\r\n return h(tag, props, ...children);\r\n }\r\n const html = p ? this.view(state, p) : this.view(state);\r\n app.createElement = h;\r\n return html;\r\n }\r\n\r\n private renderState(state: T, vdom = null) {\r\n if (!this.view) return;\r\n const html = vdom || this._view(state);\r\n app['debug'] && app.run('debug', {\r\n component: this,\r\n state,\r\n vdom: html || '[vdom is null - no render]',\r\n });\r\n\r\n if (typeof document !== 'object') return;\r\n\r\n const el = (typeof this.element === 'string') ?\r\n document.getElementById(this.element) : this.element;\r\n\r\n if (el) {\r\n const tracking_attr = '_c';\r\n if (!this.unload) {\r\n el.removeAttribute && el.removeAttribute(tracking_attr);\r\n } else if (el['_component'] !== this || el.getAttribute(tracking_attr) !== this.tracking_id) {\r\n this.tracking_id = new Date().valueOf().toString();\r\n el.setAttribute(tracking_attr, this.tracking_id);\r\n if (typeof MutationObserver !== 'undefined') {\r\n if(!this.observer) this.observer = new MutationObserver(changes => {\r\n if (changes[0].oldValue === this.tracking_id || !document.body.contains(el)) {\r\n this.unload(this.state);\r\n this.observer.disconnect();\r\n this.observer = null;\r\n }\r\n });\r\n this.observer.observe(document.body, {\r\n childList: true, subtree: true,\r\n attributes: true, attributeOldValue: true, attributeFilter: [tracking_attr]\r\n });\r\n }\r\n }\r\n el['_component'] = this;\r\n }\r\n if (!vdom) this.render(el, html);\r\n this.rendered && this.rendered(this.state);\r\n }\r\n\r\n public setState(state: T, options: ActionOptions\r\n = { render: true, history: false}) {\r\n if (state instanceof Promise) {\r\n // Promise will not be saved or rendered\r\n // state will be saved and rendered when promise is resolved\r\n state.then(s => {\r\n this.setState(s, options)\r\n }).catch(err => {\r\n console.error(err);\r\n throw err;\r\n });\r\n this._state = state;\r\n } else {\r\n this._state = state;\r\n if (state == null) return;\r\n this.state = state;\r\n if (options.render !== false) this.renderState(state);\r\n if (options.history !== false && this.enable_history) {\r\n this._history = [...this._history, state];\r\n this._history_idx = this._history.length - 1;\r\n }\r\n if (typeof options.callback === 'function') options.callback(this.state);\r\n }\r\n }\r\n\r\n private _history_prev = () => {\r\n this._history_idx--;\r\n if (this._history_idx >= 0) {\r\n this.setState(this._history[this._history_idx], { render: true, history: false });\r\n }\r\n else {\r\n this._history_idx = 0;\r\n }\r\n };\r\n\r\n private _history_next = () => {\r\n this._history_idx++;\r\n if (this._history_idx < this._history.length) {\r\n this.setState(this._history[this._history_idx], { render: true, history: false });\r\n }\r\n else {\r\n this._history_idx = this._history.length - 1;\r\n }\r\n };\r\n\r\n constructor(\r\n protected state?: T,\r\n protected view?: View<T>,\r\n protected update?: Update<T, E>,\r\n protected options?) {\r\n }\r\n\r\n start = (element = null,\r\n options: { render?: boolean, history?, global_event?: boolean } = { render: true }): Component<T> => {\r\n return this.mount(element, { ...options, render: true });\r\n }\r\n\r\n public mount(element = null, options?: { render?: boolean, history?, global_event?: boolean}) {\r\n\r\n console.assert(!this.element, 'Component already mounted.')\r\n this.options = options = { ...this.options, ...options };\r\n this.element = element;\r\n this.global_event = options.global_event;\r\n this.enable_history = !!options.history;\r\n\r\n if (this.enable_history) {\r\n this.on(options.history.prev || 'history-prev', this._history_prev);\r\n this.on(options.history.next || 'history-next', this._history_next);\r\n }\r\n this.add_actions();\r\n this.state = this.state ?? this['model'] ?? {};\r\n if (options.render) {\r\n this.setState(this.state, { render: true, history: true });\r\n } else {\r\n this.setState(this.state, { render: false, history: true });\r\n }\r\n if (app['debug']) {\r\n const id = typeof element === 'string' ? element : element.id;\r\n componentCache[id] = componentCache[id] || [];\r\n componentCache[id].push(this);\r\n }\r\n return this;\r\n }\r\n\r\n is_global_event(name: string): boolean {\r\n return name && (\r\n this.global_event ||\r\n this._global_events.indexOf(name) >= 0 ||\r\n name.startsWith('#') || name.startsWith('/') || name.startsWith('@'));\r\n }\r\n\r\n add_action(name: string, action, options: ActionOptions = {}) {\r\n if (!action || typeof action !== 'function') return;\r\n if (options.global) this. _global_events.push(name);\r\n this.on(name as any, (...p) => {\r\n const newState = action(this.state, ...p);\r\n\r\n app['debug'] && app.run('debug', {\r\n component: this,\r\n 'event': name,\r\n e: p,\r\n state: this.state,\r\n newState,\r\n options\r\n })\r\n\r\n this.setState(newState, options)\r\n }, options);\r\n }\r\n\r\n add_actions() {\r\n const actions = this.update || {};\r\n Reflect.getMetadataKeys(this).forEach(key => {\r\n if (key.startsWith('apprun-update:')) {\r\n const meta = Reflect.getMetadata(key, this)\r\n actions[meta.name] = [this[meta.key].bind(this), meta.options];\r\n }\r\n })\r\n\r\n const all = {};\r\n if (Array.isArray(actions)) {\r\n actions.forEach(act => {\r\n const [name, action, opts] = act as ActionDef<T, E>;\r\n const names = name.toString();\r\n names.split(',').forEach(n => all[n.trim()] = [action, opts])\r\n })\r\n } else {\r\n Object.keys(actions).forEach(name => {\r\n const action = actions[name];\r\n if (typeof action === 'function' || Array.isArray(action)) {\r\n name.split(',').forEach(n => all[n.trim()] = action)\r\n }\r\n })\r\n }\r\n\r\n if (!all['.']) all['.'] = REFRESH;\r\n Object.keys(all).forEach(name => {\r\n const action = all[name];\r\n if (typeof action === 'function') {\r\n this.add_action(name, action);\r\n } else if (Array.isArray(action)) {\r\n this.add_action(name, action[0], action[1]);\r\n }\r\n });\r\n }\r\n\r\n public run(event: E, ...args) {\r\n const name = event.toString();\r\n return this.is_global_event(name) ?\r\n app.run(name, ...args) :\r\n this._app.run(name, ...args);\r\n }\r\n\r\n public on(event: E, fn: (...args) => void, options?: any) {\r\n const name = event.toString();\r\n this._actions.push({ name, fn });\r\n return this.is_global_event(name) ?\r\n app.on(name, fn, options) :\r\n this._app.on(name, fn, options);\r\n }\r\n\r\n public unmount() {\r\n this.observer?.disconnect();\r\n this._actions.forEach(action => {\r\n const { name, fn } = action;\r\n this.is_global_event(name) ?\r\n app.off(name, fn) :\r\n this._app.off(name, fn);\r\n });\r\n }\r\n}\r\n","import app from './app';\n\nexport type Route = (url: string, ...args: any[]) => any;\n\nexport const ROUTER_EVENT: string = '//';\nexport const ROUTER_404_EVENT: string = '///';\n\nexport const route: Route = (url: string) => {\n if (!url) url = '#';\n if (url.startsWith('#')) {\n const [name, ...rest] = url.split('/');\n app.run(name, ...rest) || app.run(ROUTER_404_EVENT, name, ...rest);\n app.run(ROUTER_EVENT, name, ...rest);\n } else if (url.startsWith('/')) {\n const [_, name, ...rest] = url.split('/');\n app.run('/' + name, ...rest) || app.run(ROUTER_404_EVENT, '/' + name, ...rest);\n app.run(ROUTER_EVENT, '/' + name, ...rest);\n } else {\n app.run(url) || app.run(ROUTER_404_EVENT, url);\n app.run(ROUTER_EVENT, url);\n }\n}\nexport default route;","import app from './app';\nimport { createElement, render, Fragment } from './vdom';\nimport { Component } from './component';\nimport { VNode, View, Action, Update, EventOptions, ActionOptions } from './types';\nimport { on, update, customElement } from './decorator';\nimport webComponent, { CustomElementOptions } from './web-component';\nimport { Route, route, ROUTER_EVENT, ROUTER_404_EVENT } from './router';\n\nexport interface IApp {\n start<T, E=any>(element?: Element | string, model?: T, view?: View<T>, update?: Update<T, E>,\n options?: { history?, rendered?: (state: T) => void}): Component<T, E>;\n on(name: string, fn: (...args: any[]) => void, options?: any): void;\n off(name: string, fn: (...args: any[]) => void): void;\n run(name: string, ...args: any[]): number;\n createElement(tag: string | Function, props, ...children): VNode | VNode[];\n render(element: HTMLElement, node: VNode): void;\n Fragment(props, ...children): any[];\n route?: Route;\n webComponent(name: string, componentClass, options?: CustomElementOptions): void;\n}\n\napp.createElement = createElement;\napp.render = render;\napp.Fragment = Fragment;\napp.webComponent = webComponent;\n\napp.start = <T, E=any>(element?: HTMLElement | string, model?: T, view?: View<T>, update?: Update<T, E>,\n options?: { history?, rendered?: (state: T) => void }) : Component<T, E> => {\n const opts = {...options, render: true, global_event: true };\n const component = new Component<T, E>(model, view, update);\n if (options && options.rendered) component.rendered = options.rendered;\n component.mount(element, opts);\n return component;\n};\n\nconst NOOP = _ => {/* Intentionally empty */ }\napp.on('$', NOOP);\napp.on('debug', _ => NOOP);\napp.on(ROUTER_EVENT, NOOP);\napp.on('#', NOOP);\napp['route'] = route;\napp.on('route', url => app['route'] && app['route'](url));\n\nif (typeof document === 'object') {\n document.addEventListener(\"DOMContentLoaded\", () => {\n if (app['route'] === route) {\n window.onpopstate = () => route(location.hash);\n route(location.hash);\n }\n });\n}\n\nexport type StatelessComponent<T={}> = (args: T) => string | VNode | void;\nexport { app, Component, View, Action, Update, on, update, EventOptions, ActionOptions }\nexport { update as event };\nexport { ROUTER_EVENT, ROUTER_404_EVENT };\nexport { customElement, CustomElementOptions };\nexport default app as IApp;\n\nif (typeof window === 'object') {\n window['Component'] = Component;\n window['React'] = app;\n}\n\n\n","import { createElement, updateElement, Fragment } from './vdom-my';\nexport function render(element, html, parent?) {\n updateElement(element, html, parent);\n}\nexport { createElement, Fragment };\n\n\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import app from 'apprun';\r\n\r\nconst mergeClassName = (name, props): string => {\r\n if (props?.class) {\r\n name = `${name} ${props.class}`;\r\n delete props.class;\r\n } else if (props?.className) {\r\n name = `${name} ${props.className}`;\r\n delete props.className;\r\n }\r\n return name;\r\n};\r\nexport const Row = (props, children) => (\r\n <div class={mergeClassName('row', props)} {...props}>{children || ''}</div>\r\n);\r\n\r\nexport const Column = (props, children) => (\r\n <div class={mergeClassName('col', props)} {...props}>{children || ''}</div>\r\n);\r\n\r\nexport const Card = (props, children) => {\r\n props = props || {};\r\n return (\r\n <div class={mergeClassName('card', props)} {...props}>\r\n {props.header ? <div class=\"card-header\">{props.header}</div> : ''}\r\n {children || ''}\r\n {props.body ? <div class=\"card-body\">{props.body}</div> : ''}\r\n {props.footer ? <div class=\"card-footer\">{props.footer}</div> : ''}\r\n </div>\r\n );\r\n};\r\n\r\nexport const Alert = (props, children) => (\r\n <div class={mergeClassName('alert', props)} role=\"alert\" {...props}>\r\n {children || ''}\r\n </div>\r\n);\r\n\r\nexport const Menus = ({ menus }) => (\r\n <ul class=\"flex-lg-column flex-row navbar-nav w-100 justify-content-between\">\r\n {menus.map(menu =>\r\n menu.menus ? (\r\n <li class=\"nav-item dropdown\">\r\n <a\r\n class=\"nav-link pl-0 pr-0 dropdown-toggle\"\r\n data-toggle=\"dropdown\"\r\n href={menu.href}\r\n role=\"button\"\r\n aria-haspopup=\"true\"\r\n aria-expanded=\"false\">\r\n <i class={`fa fa-${menu.icon} fa-fw`}></i>\r\n <span class=\"d-none d-lg-inline\">{menu.text}</span>\r\n </a>\r\n <div class=\"dropdown-menu border-0\">\r\n <Menus menus={menu.menus} />\r\n </div>\r\n </li>\r\n ) : (\r\n <li class=\"nav-item\">\r\n <a class=\"nav-link pl-0 text-nowrap\" href={menu.href}>\r\n <i class={`fa fa-${menu.icon} fa-fw`}></i>\r\n <span class=\"d-none d-lg-inline\">{menu.text}</span>\r\n </a>\r\n </li>\r\n )\r\n )}\r\n </ul>\r\n);\r\n\r\nexport const Sidebar = props => (\r\n <aside class=\"col-lg-2 p-0\">\r\n <nav class=\"navbar navbar-expand align-items-start navbar-light\">\r\n <div class=\"collapse navbar-collapse\">\r\n {props.menus ? <Menus menus={props.menus} /> : ''}\r\n </div>\r\n </nav>\r\n </aside>\r\n);\r\n","export default [\r\n {\r\n \"name\": \"Airi Satou\",\r\n \"position\": \"Accountant\",\r\n \"office\": \"Tokyo\",\r\n \"age\": \"33\",\r\n \"date\": \"2008/11/28\",\r\n \"salary\": \"$162,700\"\r\n },\r\n {\r\n \"name\": \"Angelica Ramos\",\r\n \"position\": \"Chief Executive Officer (CEO)\",\r\n \"office\": \"London\",\r\n \"age\": \"47\",\r\n \"date\": \"2009/10/09\",\r\n \"salary\": \"$1,200,000\"\r\n },\r\n {\r\n \"name\": \"Ashton Cox\",\r\n \"position\": \"Junior Technical Author\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"66\",\r\n \"date\": \"2009/01/12\",\r\n \"salary\": \"$86,000\"\r\n },\r\n {\r\n \"name\": \"Bradley Greer\",\r\n \"position\": \"Software Engineer\",\r\n \"office\": \"London\",\r\n \"age\": \"41\",\r\n \"date\": \"2012/10/13\",\r\n \"salary\": \"$132,000\"\r\n },\r\n {\r\n \"name\": \"Brenden Wagner\",\r\n \"position\": \"Software Engineer\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"28\",\r\n \"date\": \"2011/06/07\",\r\n \"salary\": \"$206,850\"\r\n },\r\n {\r\n \"name\": \"Brielle Williamson\",\r\n \"position\": \"Integration Specialist\",\r\n \"office\": \"New York\",\r\n \"age\": \"61\",\r\n \"date\": \"2012/12/02\",\r\n \"salary\": \"$372,000\"\r\n },\r\n {\r\n \"name\": \"Bruno Nash\",\r\n \"position\": \"Software Engineer\",\r\n \"office\": \"London\",\r\n \"age\": \"38\",\r\n \"date\": \"2011/05/03\",\r\n \"salary\": \"$163,500\"\r\n },\r\n {\r\n \"name\": \"Caesar Vance\",\r\n \"position\": \"Pre-Sales Support\",\r\n \"office\": \"New York\",\r\n \"age\": \"21\",\r\n \"date\": \"2011/12/12\",\r\n \"salary\": \"$106,450\"\r\n },\r\n {\r\n \"name\": \"Cara Stevens\",\r\n \"position\": \"Sales Assistant\",\r\n \"office\": \"New York\",\r\n \"age\": \"46\",\r\n \"date\": \"2011/12/06\",\r\n \"salary\": \"$145,600\"\r\n },\r\n {\r\n \"name\": \"Cedric Kelly\",\r\n \"position\": \"Senior Javascript Developer\",\r\n \"office\": \"Edinburgh\",\r\n \"age\": \"22\",\r\n \"date\": \"2012/03/29\",\r\n \"salary\": \"$433,060\"\r\n },\r\n {\r\n \"name\": \"Charde Marshall\",\r\n \"position\": \"Regional Director\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"36\",\r\n \"date\": \"2008/10/16\",\r\n \"salary\": \"$470,600\"\r\n },\r\n {\r\n \"name\": \"Colleen Hurst\",\r\n \"position\": \"Javascript Developer\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"39\",\r\n \"date\": \"2009/09/15\",\r\n \"salary\": \"$205,500\"\r\n },\r\n {\r\n \"name\": \"Dai Rios\",\r\n \"position\": \"Personnel Lead\",\r\n \"office\": \"Edinburgh\",\r\n \"age\": \"35\",\r\n \"date\": \"2012/09/26\",\r\n \"salary\": \"$217,500\"\r\n },\r\n {\r\n \"name\": \"Donna Snider\",\r\n \"position\": \"Customer Support\",\r\n \"office\": \"New York\",\r\n \"age\": \"27\",\r\n \"date\": \"2011/01/25\",\r\n \"salary\": \"$112,000\"\r\n },\r\n {\r\n \"name\": \"Doris Wilder\",\r\n \"position\": \"Sales Assistant\",\r\n \"office\": \"Sidney\",\r\n \"age\": \"23\",\r\n \"date\": \"2010/09/20\",\r\n \"salary\": \"$85,600\"\r\n },\r\n {\r\n \"name\": \"Finn Camacho\",\r\n \"position\": \"Support Engineer\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"47\",\r\n \"date\": \"2009/07/07\",\r\n \"salary\": \"$87,500\"\r\n },\r\n {\r\n \"name\": \"Fiona Green\",\r\n \"position\": \"Chief Operating Officer (COO)\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"48\",\r\n \"date\": \"2010/03/11\",\r\n \"salary\": \"$850,000\"\r\n },\r\n {\r\n \"name\": \"Garrett Winters\",\r\n \"position\": \"Accountant\",\r\n \"office\": \"Tokyo\",\r\n \"age\": \"63\",\r\n \"date\": \"2011/07/25\",\r\n \"salary\": \"$170,750\"\r\n },\r\n {\r\n \"name\": \"Gavin Cortez\",\r\n \"position\": \"Team Leader\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"22\",\r\n \"date\": \"2008/10/26\",\r\n \"salary\": \"$235,500\"\r\n },\r\n {\r\n \"name\": \"Gavin Joyce\",\r\n \"position\": \"Developer\",\r\n \"office\": \"Edinburgh\",\r\n \"age\": \"42\",\r\n \"date\": \"2010/12/22\",\r\n \"salary\": \"$92,575\"\r\n },\r\n {\r\n \"name\": \"Gloria Little\",\r\n \"position\": \"Systems Administrator\",\r\n \"office\": \"New York\",\r\n \"age\": \"59\",\r\n \"date\": \"2009/04/10\",\r\n \"salary\": \"$237,500\"\r\n },\r\n {\r\n \"name\": \"Haley Kennedy\",\r\n \"position\": \"Senior Marketing Designer\",\r\n \"office\": \"London\",\r\n \"age\": \"43\",\r\n \"date\": \"2012/12/18\",\r\n \"salary\": \"$313,500\"\r\n },\r\n {\r\n \"name\": \"Hermione Butler\",\r\n \"position\": \"Regional Director\",\r\n \"office\": \"London\",\r\n \"age\": \"47\",\r\n \"date\": \"2011/03/21\",\r\n \"salary\": \"$356,250\"\r\n },\r\n {\r\n \"name\": \"Herrod Chandler\",\r\n \"position\": \"Sales Assistant\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"59\",\r\n \"date\": \"2012/08/06\",\r\n \"salary\": \"$137,500\"\r\n },\r\n {\r\n \"name\": \"Hope Fuentes\",\r\n \"position\": \"Secretary\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"41\",\r\n \"date\": \"2010/02/12\",\r\n \"salary\": \"$109,850\"\r\n },\r\n {\r\n \"name\": \"Howard Hatfield\",\r\n \"position\": \"Office Manager\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"51\",\r\n \"date\": \"2008/12/16\",\r\n \"salary\": \"$164,500\"\r\n },\r\n {\r\n \"name\": \"Jackson Bradshaw\",\r\n \"position\": \"Director\",\r\n \"office\": \"New York\",\r\n \"age\": \"65\",\r\n \"date\": \"2008/09/26\",\r\n \"salary\": \"$645,750\"\r\n },\r\n {\r\n \"name\": \"Jena Gaines\",\r\n \"position\": \"Office Manager\",\r\n \"office\": \"London\",\r\n \"age\": \"30\",\r\n \"date\": \"2008/12/19\",\r\n \"salary\": \"$90,560\"\r\n },\r\n {\r\n \"name\": \"Jenette Caldwell\",\r\n \"position\": \"Development Lead\",\r\n \"office\": \"New York\",\r\n \"age\": \"30\",\r\n \"date\": \"2011/09/03\",\r\n \"salary\": \"$345,000\"\r\n },\r\n {\r\n \"name\": \"Jennifer Acosta\",\r\n \"position\": \"Junior Javascript Developer\",\r\n \"office\": \"Edinburgh\",\r\n \"age\": \"43\",\r\n \"date\": \"2013/02/01\",\r\n \"salary\": \"$75,650\"\r\n },\r\n {\r\n \"name\": \"Jennifer Chang\",\r\n \"position\": \"Regional Director\",\r\n \"office\": \"Singapore\",\r\n \"age\": \"28\",\r\n \"date\": \"2010/11/14\",\r\n \"salary\": \"$357,650\"\r\n },\r\n {\r\n \"name\": \"Jonas Alexander\",\r\n \"position\": \"Developer\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"30\",\r\n \"date\": \"2010/07/14\",\r\n \"salary\": \"$86,500\"\r\n },\r\n {\r\n \"name\": \"Lael Greer\",\r\n \"position\": \"Systems Administrator\",\r\n \"office\": \"London\",\r\n \"age\": \"21\",\r\n \"date\": \"2009/02/27\",\r\n \"salary\": \"$103,500\"\r\n },\r\n {\r\n \"name\": \"Martena Mccray\",\r\n \"position\": \"Post-Sales support\",\r\n \"office\": \"Edinburgh\",\r\n \"age\": \"46\",\r\n \"date\": \"2011/03/09\",\r\n \"salary\": \"$324,050\"\r\n },\r\n {\r\n \"name\": \"Michael Bruce\",\r\n \"position\": \"Javascript Developer\",\r\n \"office\": \"Singapore\",\r\n \"age\": \"29\",\r\n \"date\": \"2011/06/27\",\r\n \"salary\": \"$183,000\"\r\n },\r\n {\r\n \"name\": \"Michael Silva\",\r\n \"position\": \"Marketing Designer\",\r\n \"office\": \"London\",\r\n \"age\": \"66\",\r\n \"date\": \"2012/11/27\",\r\n \"salary\": \"$198,500\"\r\n },\r\n {\r\n \"name\": \"Michelle House\",\r\n \"position\": \"Integration Specialist\",\r\n \"office\": \"Sidney\",\r\n \"age\": \"37\",\r\n \"date\": \"2011/06/02\",\r\n \"salary\": \"$95,400\"\r\n },\r\n {\r\n \"name\": \"Olivia Liang\",\r\n \"position\": \"Support Engineer\",\r\n \"office\": \"Singapore\",\r\n \"age\": \"64\",\r\n \"date\": \"2011/02/03\",\r\n \"salary\": \"$234,500\"\r\n },\r\n {\r\n \"name\": \"Paul Byrd\",\r\n \"position\": \"Chief Financial Officer (CFO)\",\r\n \"office\": \"New York\",\r\n \"age\": \"64\",\r\n \"date\": \"2010/06/09\",\r\n \"salary\": \"$725,000\"\r\n },\r\n {\r\n \"name\": \"Prescott Bartlett\",\r\n \"position\": \"Technical Author\",\r\n \"office\": \"London\",\r\n \"age\": \"27\",\r\n \"date\": \"2011/05/07\",\r\n \"salary\": \"$145,000\"\r\n },\r\n {\r\n \"name\": \"Quinn Flynn\",\r\n \"position\": \"Support Lead\",\r\n \"office\": \"Edinburgh\",\r\n \"age\": \"22\",\r\n \"date\": \"2013/03/03\",\r\n \"salary\": \"$342,000\"\r\n },\r\n {\r\n \"name\": \"Rhona Davidson\",\r\n \"position\": \"Integration Specialist\",\r\n \"office\": \"Tokyo\",\r\n \"age\": \"55\",\r\n \"date\": \"2010/10/14\",\r\n \"salary\": \"$327,900\"\r\n },\r\n {\r\n \"name\": \"Sakura Yamamoto\",\r\n \"position\": \"Support Engineer\",\r\n \"office\": \"Tokyo\",\r\n \"age\": \"37\",\r\n \"date\": \"2009/08/19\",\r\n \"salary\": \"$139,575\"\r\n },\r\n {\r\n \"name\": \"Serge Baldwin\",\r\n \"position\": \"Data Coordinator\",\r\n \"office\": \"Singapore\",\r\n \"age\": \"64\",\r\n \"date\": \"2012/04/09\",\r\n \"salary\": \"$138,575\"\r\n },\r\n {\r\n \"name\": \"Shad Decker\",\r\n \"position\": \"Regional Director\",\r\n \"office\": \"Edinburgh\",\r\n \"age\": \"51\",\r\n \"date\": \"2008/11/13\",\r\n \"salary\": \"$183,000\"\r\n },\r\n {\r\n \"name\": \"Shou Itou\",\r\n \"position\": \"Regional Marketing\",\r\n \"office\": \"Tokyo\",\r\n \"age\": \"20\",\r\n \"date\": \"2011/08/14\",\r\n \"salary\": \"$163,000\"\r\n },\r\n {\r\n \"name\": \"Sonya Frost\",\r\n \"position\": \"Software Engineer\",\r\n \"office\": \"Edinburgh\",\r\n \"age\": \"23\",\r\n \"date\": \"2008/12/13\",\r\n \"salary\": \"$103,600\"\r\n },\r\n {\r\n \"name\": \"Suki Burks\",\r\n \"position\": \"Developer\",\r\n \"office\": \"London\",\r\n \"age\": \"53\",\r\n \"date\": \"2009/10/22\",\r\n \"salary\": \"$114,500\"\r\n },\r\n {\r\n \"name\": \"Tatyana Fitzpatrick\",\r\n \"position\": \"Regional Director\",\r\n \"office\": \"London\",\r\n \"age\": \"19\",\r\n \"date\": \"2010/03/17\",\r\n \"salary\": \"$385,750\"\r\n },\r\n {\r\n \"name\": \"Thor Walton\",\r\n \"position\": \"Developer\",\r\n \"office\": \"New York\",\r\n \"age\": \"61\",\r\n \"date\": \"2013/08/11\",\r\n \"salary\": \"$98,540\"\r\n },\r\n {\r\n \"name\": \"Tiger Nixon\",\r\n \"position\": \"System Architect\",\r\n \"office\": \"Edinburgh\",\r\n \"age\": \"61\",\r\n \"date\": \"2011/04/25\",\r\n \"salary\": \"$320,800\"\r\n },\r\n {\r\n \"name\": \"Timothy Mooney\",\r\n \"position\": \"Office Manager\",\r\n \"office\": \"London\",\r\n \"age\": \"37\",\r\n \"date\": \"2008/12/11\",\r\n \"salary\": \"$136,200\"\r\n },\r\n {\r\n \"name\": \"Unity Butler\",\r\n \"position\": \"Marketing Designer\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"47\",\r\n \"date\": \"2009/12/09\",\r\n \"salary\": \"$85,675\"\r\n },\r\n {\r\n \"name\": \"Vivian Harrell\",\r\n \"position\": \"Financial Controller\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"62\",\r\n \"date\": \"2009/02/14\",\r\n \"salary\": \"$452,500\"\r\n },\r\n {\r\n \"name\": \"Yuri Berry\",\r\n \"position\": \"Chief Marketing Officer (CMO)\",\r\n \"office\": \"New York\",\r\n \"age\": \"40\",\r\n \"date\": \"2009/06/25\",\r\n \"salary\": \"$675,000\"\r\n },\r\n {\r\n \"name\": \"Zenaida Frank\",\r\n \"position\": \"Software Engineer\",\r\n \"office\": \"New York\",\r\n \"age\": \"63\",\r\n \"date\": \"2010/01/04\",\r\n \"salary\": \"$125,250\"\r\n },\r\n {\r\n \"name\": \"Zorita Serrano\",\r\n \"position\": \"Software Engineer\",\r\n \"office\": \"San Francisco\",\r\n \"age\": \"56\",\r\n \"date\": \"2012/06/01\",\r\n \"salary\": \"$115,000\"\r\n }\r\n]","import app, { Component } from 'apprun';\r\nimport data from './table-data';\r\ndeclare let $;\r\n\r\n// checkout available options: https://datatables.net/reference/option/\r\nconst DataTable = options => table =>\r\n !$.fn.dataTable.isDataTable(table) && $(table).DataTable(options);\r\n\r\napp.on('$', ({ key, props }) => {\r\n key === '$data-table' && (props.ref = DataTable(props[key]));\r\n});\r\n\r\nconst columns = [\r\n { title: 'Name', data: 'name' },\r\n { title: 'Position', data: 'position' },\r\n { title: 'Office', data: 'office' },\r\n { title: 'Age', data: 'age' },\r\n { title: 'Start date', data: 'date' },\r\n { title: 'Salary', data: 'salary' }\r\n];\r\n\r\nexport default class extends Component {\r\n state = { data };\r\n\r\n view = state => state.dt || (\r\n <div ref={el => state.dt = el}>\r\n <table\r\n class=\"table w-100 table-striped table-bordered\"\r\n $data-table={{\r\n data: state.data,\r\n columns,\r\n pageLength: 10\r\n }}\r\n />\r\n </div>\r\n );\r\n}\r\n","import app, { Component } from 'apprun';\r\nimport { Card } from '../src/bootstrap';\r\n\r\ndeclare let Chart;\r\ndeclare let moment;\r\n\r\nconst timeFormat = 'MM/DD/YYYY HH:mm';\r\nconst color = Chart.helpers.color;\r\nconst chartColors = {\r\n red: 'rgb(255, 99, 132)',\r\n orange: 'rgb(255, 159, 64)',\r\n yellow: 'rgb(255, 205, 86)',\r\n green: 'rgb(75, 192, 192)',\r\n blue: 'rgb(54, 162, 235)',\r\n purple: 'rgb(153, 102, 255)',\r\n grey: 'rgb(201, 203, 207)'\r\n};\r\n\r\nconst newDateString = days =>\r\n moment()\r\n .add(days, 'd')\r\n .format(timeFormat);\r\nconst randomScalingFactor = (min = -100, max = 100) =>\r\n Math.random() * (max - min) + min;\r\n\r\nexport default class extends Component {\r\n state = {\r\n data: {\r\n type: 'bar',\r\n data: {\r\n labels: [\r\n newDateString(0),\r\n newDateString(1),\r\n newDateString(2),\r\n newDateString(3),\r\n newDateString(4),\r\n newDateString(5),\r\n newDateString(6)\r\n ],\r\n datasets: [\r\n {\r\n type: 'bar',\r\n label: 'Dataset 1',\r\n backgroundColor: color(chartColors.red)\r\n .alpha(0.5)\r\n .rgbString(),\r\n borderColor: chartColors.red,\r\n data: [\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor()\r\n ]\r\n },\r\n {\r\n type: 'bar',\r\n label: 'Dataset 2',\r\n backgroundColor: color(chartColors.blue)\r\n .alpha(0.5)\r\n .rgbString(),\r\n borderColor: chartColors.blue,\r\n data: [\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor()\r\n ]\r\n },\r\n {\r\n type: 'line',\r\n label: 'Dataset 3',\r\n backgroundColor: color(chartColors.green)\r\n .alpha(0.5)\r\n .rgbString(),\r\n borderColor: chartColors.green,\r\n fill: false,\r\n data: [\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor(),\r\n randomScalingFactor()\r\n ]\r\n }\r\n ]\r\n },\r\n options: {\r\n title: {\r\n text: 'Chart.js Combo Time Scale'\r\n },\r\n scales: {\r\n xAxes: [\r\n {\r\n type: 'time',\r\n display: true,\r\n time: {\r\n format: timeFormat\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n };\r\n\r\n view = state => {\r\n const canvas = document.createElement('canvas');\r\n const ctx = canvas.getContext('2d');\r\n state.chart = new Chart(ctx, state.data);\r\n return (\r\n <Card header={<div>Chart JS</div>}>\r\n <div>{canvas}</div>\r\n </Card>\r\n );\r\n };\r\n\r\n unload = state => {\r\n state.chart?.destroy();\r\n console.log('chart destroyed');\r\n };\r\n}\r\n","import app, { Component } from 'apprun';\r\n\r\ndeclare let $;\r\n\r\nconst yyyymm = new Date().toISOString().substr(0, 7);\r\n\r\nexport default class extends Component {\r\n state = {\r\n id:'',\r\n name: '',\r\n events: [\r\n {\r\n title: 'All Day Event',\r\n start: `${yyyymm}-01`\r\n },\r\n {\r\n title: 'Long Event',\r\n start: `${yyyymm}-07`,\r\n end: `${yyyymm}-10`\r\n },\r\n {\r\n id: 999,\r\n title: 'Repeating Event',\r\n start: `${yyyymm}-09 16:00:00`\r\n },\r\n {\r\n id: 999,\r\n title: 'Repeating Event',\r\n start: `${yyyymm}-16 16:00:00`\r\n },\r\n {\r\n title: 'Conference',\r\n start: `${yyyymm}-11`,\r\n end: `${yyyymm}-13`\r\n },\r\n {\r\n title: 'Meeting',\r\n start: `${yyyymm}-12 10:30:00`,\r\n end: `${yyyymm}-12 12:30:00`\r\n },\r\n {\r\n title: 'Lunch',\r\n start: `${yyyymm}-12 12:00:00`\r\n },\r\n {\r\n title: 'Meeting',\r\n start: `${yyyymm}-12 14:30:00`\r\n },\r\n {\r\n title: 'Happy Hour',\r\n start: `${yyyymm}-12 17:30:00`\r\n },\r\n {\r\n title: 'Dinner',\r\n start: `${yyyymm}-12 20:00:00`\r\n },\r\n {\r\n title: 'Birthday Party',\r\n start: `${yyyymm}-13 07:00:00`\r\n },\r\n {\r\n title: 'Click for Google',\r\n url: 'http://google.com/',\r\n start: `${yyyymm}-28`\r\n }\r\n ]\r\n };\r\n\r\n view = (state) => <div style={{ 'font-size': '0.8em' }}>\r\n <h5>{state.name}</h5>\r\n <div id={`calendar-${state.id}`}></div>\r\n </div>;\r\n\r\n mounted = ({ id, name }) => ({ ...this.state, id, name})\r\n\r\n rendered = state => {\r\n $(`#calendar-${state.id}`).fullCalendar({\r\n header: {\r\n left: 'prev,next today',\r\n center: 'title',\r\n right: 'month,basicWeek,basicDay',\r\n title: state.name\r\n },\r\n defaultDate: `${yyyymm}-12`,\r\n navLinks: true, // can click day/week names to navigate views\r\n editable: true,\r\n eventLimit: true, // allow \"more\" link when too many events\r\n events: state.events\r\n })\r\n }\r\n}","import app, { Component } from 'apprun';\r\nimport { Card } from '../src/bootstrap';\r\ndeclare const d3, topojson;\r\n\r\nconst map = (element, features) => {\r\n if (!element || !features || !features.length) return;\r\n\r\n const sphere = { type: 'Sphere' };\r\n const width = element.clientWidth;\r\n const height = width / 2;\r\n\r\n const projection = d3.geo\r\n .naturalEarth()\r\n .scale(width / 6)\r\n .rotate([180, 0])\r\n .translate([width / 2, height / 2])\r\n .precision(0.5);\r\n\r\n const path = d3.geo.path().projection(projection);\r\n\r\n const svg = d3\r\n .select(element)\r\n .attr('width', width)\r\n .attr('height', height);\r\n\r\n svg\r\n .append('path')\r\n .attr('class', 'background')\r\n .attr('d', path(sphere));\r\n\r\n svg\r\n .append('g')\r\n .attr('id', 'states')\r\n .selectAll('path')\r\n .data(features)\r\n .enter()\r\n .append('path')\r\n .attr('d', path)\r\n .attr('id', function(d) {\r\n return d.id;\r\n })\r\n .on('click', function() {\r\n d3.select('#map-text').text('D3 Map - Country Code:' + this.id);\r\n });\r\n};\r\n\r\nexport default class extends Component {\r\n state = {};\r\n\r\n view = state =>\r\n state.map_card || (\r\n <Card header={<div id=\"map-text\">D3 Map</div>} ref={el => (state.map_card = el)}>\r\n <svg ref={el => map(el, state.features)}></svg>\r\n </Card>\r\n );\r\n\r\n mounted = async (_, __, state) => {\r\n if (!state.features) {\r\n state.features = await new Promise((resolve, reject) => {\r\n d3.json('./world-110m.json', (error, topo) => {\r\n if (error) throw reject(error);\r\n const features = topojson.feature(topo, topo.objects.countries)\r\n .features;\r\n resolve(features);\r\n });\r\n });\r\n }\r\n return state;\r\n };\r\n}\r\n","import app, { Component } from 'apprun';\r\nimport { Row, Column, Card, Alert, Sidebar } from '../src/bootstrap';\r\nimport DataTable from './table';\r\nimport Chart from './chart';\r\nimport Calendar from './calendar';\r\nimport Map from './map';\r\n\r\nconst Dashboard = (_, children) => <div class=\"row h-100\">{children}</div>;\r\n\r\nconst Widgets = () => (\r\n <main class=\"col\">\r\n <CardList />\r\n <Alerts />\r\n <Row>\r\n <Column>\r\n <Chart id=\"chart\" />\r\n </Column>\r\n <Column>\r\n <Map id=\"map\" />\r\n </Column>\r\n </Row>\r\n <Row class=\"my-4\" />\r\n <DataTable />\r\n <Row class=\"my-4\" />\r\n <Row class=\"my-4\">\r\n <Column class=\"col-md-6\">\r\n <Calendar id=\"c1\" name=\"My Calendar\" />\r\n </Column>\r\n <Column class=\"col-md-6\">\r\n <Calendar id=\"c2\" name=\"Team Calendar\" />\r\n </Column>\r\n </Row>\r\n <Row class=\"my-4\" />\r\n <Row class=\"my-4\" />\r\n <Row class=\"my-4\" />\r\n <Row class=\"my-4\" />\r\n <Row class=\"my-4\" />\r\n </main>\r\n);\r\n\r\nconst Alerts = () => (\r\n <Row class=\"my-4\">\r\n <Column>\r\n <Alert class=\"alert-primary\">Primary</Alert>\r\n </Column>\r\n <Column>\r\n <Alert class=\"alert-secondary\">Secondary</Alert>\r\n </Column>\r\n <Column>\r\n <Alert class=\"alert-success\">Success</Alert>\r\n </Column>\r\n <Column>\r\n <Alert class=\"alert-danger\">Danger</Alert>\r\n </Column>\r\n <Column>\r\n <Alert class=\"alert-warning\">Warning</Alert>\r\n </Column>\r\n <Column>\r\n <Alert class=\"alert-info\">Info</Alert>\r\n </Column>\r\n </Row>\r\n);\r\n\r\nconst CardList = () => (\r\n <Row class=\"my-4\">\r\n {[1, 2, 3, 4, 5, 6].map(i => (\r\n <div class=\"col-sm-4 col-lg-2\">\r\n <Card>\r\n <div class=\"card-body text-center\">\r\n <div class=\"text-right text-green\">\r\n {(Math.random() * 10).toFixed(1)} %\r\n </div>\r\n <div class=\"h1 m-0\">{(Math.random() * 100).toFixed(0)}</div>\r\n <div class=\"text-muted\">KPI #{i}</div>\r\n </div>\r\n </Card>\r\n </div>\r\n ))}\r\n </Row>\r\n);\r\n\r\nconst menus = [\r\n { icon: 'home', text: 'Home', href: '#' },\r\n { icon: 'star', text: 'Events', href: '#' },\r\n { icon: 'book', text: 'Teams', href: '#' },\r\n { icon: 'heart', text: 'Favorites', href: '#' },\r\n {\r\n icon: 'list',\r\n text: 'More',\r\n href: '#',\r\n menus: [{ icon: 'check', text: 'Admin', href: '#' }]\r\n }\r\n];\r\n\r\nexport default class extends Component {\r\n state = 'Dashboard';\r\n\r\n view = () => (\r\n <Dashboard>\r\n <Sidebar menus={menus} />\r\n <Widgets></Widgets>\r\n </Dashboard>\r\n );\r\n\r\n update = {\r\n '#, #Home': state => state\r\n };\r\n}\r\n","import app, {Component} from 'apprun';\r\n\r\nexport default class AboutComponent extends Component {\r\n state = 'About';\r\n\r\n view = (state) => {\r\n return <div>\r\n <h1>{state}</h1>\r\n </div>\r\n }\r\n\r\n update = {\r\n '#About': state => state,\r\n }\r\n}\r\n\r\n","import app, {Component} from 'apprun';\r\n\r\nexport default class ContactComponent extends Component {\r\n state = 'Contact';\r\n\r\n view = (state) => {\r\n return <div>\r\n <h1>{state}</h1>\r\n </div>\r\n }\r\n\r\n update = {\r\n '#Contact': state => state,\r\n }\r\n}\r\n\r\n","import app from 'apprun';\r\n\r\napp.on('//', route => {\r\n const menus = document.querySelectorAll('.navbar-nav li');\r\n for (let i = 0; i < menus.length; ++i) menus[i].classList.remove('active');\r\n const item = document.querySelector(`[href='${route}']`);\r\n item && item.parentElement.classList.add('active');\r\n});\r\n\r\nconst view = () => (\r\n <div class=\"container\">\r\n <nav class=\"navbar navbar-expand-lg navbar-light bg-light\">\r\n <a class=\"navbar-brand\" href=\"#\">\r\n Admin Dashboard\r\n </a>\r\n <button\r\n class=\"navbar-toggler\"\r\n type=\"button\"\r\n data-toggle=\"collapse\"\r\n data-target=\"#navbarSupportedContent\"\r\n aria-controls=\"navbarSupportedContent\"\r\n aria-expanded=\"false\"\r\n aria-label=\"Toggle navigation\">\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n <div class=\"collapse navbar-collapse\" id=\"navbarSupportedContent\">\r\n <ul class=\"navbar-nav mr-auto\">\r\n <li class=\"nav-item active\">\r\n <a class=\"nav-link\" href=\"#Home\">\r\n Home\r\n <span class=\"sr-only\">(current)</span>\r\n </a>\r\n </li>\r\n <li class=\"nav-item\">\r\n <a class=\"nav-link\" href=\"#About\">\r\n About\r\n </a>\r\n </li>\r\n <li class=\"nav-item\">\r\n <a class=\"nav-link\" href=\"#Contact\">\r\n Contact\r\n </a>\r\n </li>\r\n </ul>\r\n <form class=\"form-inline mt-2 mt-md-0\">\r\n <div class=\"input-group input-group-sm mr-sm-2\">\r\n <div class=\"input-group-prepend\">\r\n <i class=\"input-group-text fa fa-search\"></i>\r\n </div>\r\n <input\r\n type=\"text\"\r\n class=\"form-control\"\r\n placeholder=\"Search\"\r\n aria-label=\"Search\"\r\n aria-describedby=\"inputGroup-sizing-sm\"\r\n />\r\n </div>\r\n </form>\r\n </div>\r\n </nav>\r\n <div class=\"container\" id=\"my-app\"></div>\r\n </div>\r\n);\r\n\r\napp.start(document.body, {}, view, {});\r\n\r\nimport Home from './Home';\r\nimport About from './About';\r\nimport Contact from './Contact';\r\n\r\nconst element = 'my-app';\r\nnew Home().mount(element);\r\nnew About().mount(element);\r\nnew Contact().mount(element);\r\n"],"sourceRoot":""}