Comparing version 0.0.8 to 0.0.9
@@ -1,2 +0,2 @@ | ||
// [DOZ] Build version: 0.0.8 | ||
// [DOZ] Build version: 0.0.9 | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Doz",[],t):"object"==typeof exports?exports.Doz=t():e.Doz=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t,r){"use strict";e.exports={ROOT:"__DOZ_GLOBAL_COMPONENTS__",TAG:{ROOT:"doz-root",EACH:"doz-each-root",VIEW:"doz-view",SUFFIX_ROOT:"-root"},REGEX:{IS_CUSTOM_TAG:/^\w+-[\w-]+$/,IS_CUSTOM_TAG_STRING:/<\w+-[\w-]+/,IS_BIND:/^d-bind$/,IS_REF:/^d-ref$/,IS_ALIAS:/^d:alias$/,IS_STORE:/^d:store$/,IS_COMPONENT_LISTENER:/^d:on-(\w+)$/,IS_LISTENER:/^on/,IS_ID_SELECTOR:/^#[\w-_:.]+$/,IS_PARENT_METHOD:/^parent.(.*)/,GET_LISTENER:/^this.(.*)\((.*)\)/},ATTR:{BIND:"d-bind",REF:"d-ref",ALIAS:"d:alias",STORE:"d:store",LISTENER:"d:on",CLASS:"d:class",STYLE:"d:style",ID:"d:id"}}},function(e,t,r){"use strict";function n(){return window[s]=window[s]||{components:{}},window[s].components}function o(e){var t=n(),r=e.tag.toUpperCase();if(t.hasOwnProperty(r))throw new Error("Component "+r+" already defined");t[r]=e}function i(){window[s]&&(window[s].components={})}function a(e){if("string"!=typeof e)throw new TypeError("tag must be a string");return e=e.toUpperCase(),n()[e]}var u=r(0),s=u.ROOT;e.exports={register:o,get:a,removeAll:i}},function(e,t,r){"use strict";function n(e){if("string"!=typeof e)return e;switch(e){case"undefined":return;case"null":return null;case"NaN":return NaN;case"Infinity":return 1/0;case"true":return!0;case"false":return!1;default:try{return JSON.parse(e)}catch(e){}}var t=parseFloat(e);return!isNaN(t)&&isFinite(e)?0===e.toLowerCase().indexOf("0x")?parseInt(e,16):t:e}e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(var o in t)t.hasOwnProperty(o)&&-1===r.indexOf(o)&&(e.hasOwnProperty(o)&&void 0!==e[o]?"object"===i(e[o])&&n(e[o],t[o]):e[o]=t[o]);return e}function o(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t[0]=Object.assign({},t[0]),n.apply(this,t)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=n,e.exports.copy=o},function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw new TypeError("Tag must be a string");if(!p.IS_CUSTOM_TAG.test(e))throw new TypeError("Tag must contain a dash (-): my-component");var r={};r.tag=e,r.cfg=u.copy(t,{updateChildrenProps:!0,props:{},template:function(){return"<div></div>"}}),c(r)}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=u.copy(e,{isStatic:!1}),e.template="string"==typeof e.template?l.create(e.template):e.template;for(var t=l.getAllNodes(e.template),r={},n=0,a=t.length-1;a>=0;--a){var s=t[a];if(1===s.nodeType&&s.parentNode){var c=e.autoCmp||m.get(s.nodeName)||e.view._components[s.nodeName.toLowerCase()];c&&function(){var t=n++,a=g(s),u=O(a),f=s.innerHTML.trim(),m=i(c,{root:e.root,view:e.view,props:a,dProps:u,parentCmp:e.parentCmp,isStatic:e.isStatic});if(s.parentNode.removeChild(s),m.render(),y.callRender(m),r[u.alias?u.alias:t]=m,f){var v=l.create(f);e.isStatic&&m._rootElement.firstChild?m._rootElement.firstChild.appendChild(v):m._rootElement.appendChild(v)}Array.from(m._rootElement.querySelectorAll("*")).forEach(function(t){if(p.IS_CUSTOM_TAG.test(t.nodeName)&&t.nodeName.toLowerCase()!==d.ROOT){var r=t.outerHTML,n=document.createElement(t.nodeName);t.parentNode.replaceChild(n,t);var i=o({root:n,template:r,view:e.view,parentCmp:m,isStatic:e.isStatic});Object.keys(i).forEach(function(e){var t=e;void 0!==m.children[t]&&"number"==typeof S(t)&&t++,m.children[t]=i[e]})}})}()}}return r}function i(e,t){var r=u.copy(t.props,"function"==typeof e.cfg.props?e.cfg.props():e.cfg.props),n=Object.defineProperties({},{_isCreated:{value:!1,writable:!0},_prevTpl:{value:null,writable:!0},_prev:{value:null,writable:!0},_prevProps:{value:null,writable:!0},_rootElement:{value:null,writable:!0},_boundElements:{value:{},writable:!0},_callback:{value:t.dProps.callback,writable:!0},_cache:{value:new Map},_isStatic:{value:t.isStatic},_publicProps:{value:Object.assign({},t.props)},view:{value:t.view,enumerable:!0},parent:{value:t.parentCmp,enumerable:!0},ref:{value:{},writable:!0,enumerable:!0},children:{value:{},writable:!0,enumerable:!0},tag:{value:e.tag,enumerable:!0},emit:{value:function(e){if(this._callback&&void 0!==this._callback[e]&&void 0!==this.parent[this._callback[e]]&&"function"==typeof this.parent[this._callback[e]]){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.parent[this._callback[e]].apply(this.parent,r)}},enumerable:!0},each:{value:function(e,t){var r=this;if(Array.isArray(e))return e.map(t).map(function(e){e=e.trim();var t=e.match(p.IS_CUSTOM_TAG_STRING);if(t){var n=e,i=r._cache.get(n);if(void 0!==i)e=i;else{var a=void 0;if(0===t.index){var u=l.create(e);e=u.outerHTML,a=o({root:document.createElement(d.ROOT),template:e,view:r.view,parentCmp:r,isStatic:!0})}else{var s={tag:d.EACH,cfg:{props:{},template:function(){return e}}};a=o({root:document.createElement(d.ROOT),template:"<"+d.EACH+"></"+d.EACH+">",view:r.view,parentCmp:r,isStatic:!0,autoCmp:s})}e=a[0]._rootElement.innerHTML,a[0].destroy(),r._cache.set(n,e)}}return e}).join("").trim()},enumerable:!0},getStore:{value:function(e){return this.view.getStore(e)},enumerable:!0},getComponentById:{value:function(e){return this.view.getComponentById(e)},enumerable:!0},action:{value:t.view.action,enumerable:!0},render:{value:function(){var e=this.tag?this.tag+d.SUFFIX_ROOT:d.ROOT,r=this.template().trim(),n=l.create("<"+e+">"+r+"</"+e+">"),o=b(n),i=E(t.root,o,this._prev,0,this);!this._rootElement&&i&&(this._rootElement=i),this._prev=o},enumerable:!0},mount:{value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this._rootElement;return"string"==typeof t.selector&&(r=r.querySelector(t.selector)),this.view.mount(e,r,this)},enumerable:!0},destroy:{value:function(){this._rootElement&&!1!==y.callBeforeDestroy(this)&&(this._rootElement.parentNode.removeChild(this._rootElement),y.callDestroy(this))},enumerable:!0}});return a(n,e.cfg,t.dProps),v.create(n,r),_.create(n),w.create(n),y.callCreate(n),n._isCreated=!0,n}function a(e,t,r){Object.assign(e,t),r.store&&(e.store=r.store),r.id&&(e.id=r.id)}var u=r(3),s=r(1),c=s.register,l=r(5),f=r(0),p=f.REGEX,d=f.TAG,m=r(1),v=r(13),y=r(6),h=r(7),b=h.transform,g=h.serializeProps,E=r(8).updateElement,S=r(2),_=r(18),w=r(19),T=r(20),O=T.extract;e.exports={component:n,getInstances:o}},function(e,t,r){"use strict";var n=/\n/g,o=/\s+/g,i={create:function(e){var t=void 0;e=e.replace(n," "),e=e.replace(o," ");var r=document.createElement("div");if(r.innerHTML=e,t=r.firstChild,!this.isValidNode(t))throw new Error("Element not valid");return t},isValidNode:function(e){return e&&"nodeType"in e},getAllNodes:function(e){function t(e){for(;e;)r.push(e),e.hasChildNodes()&&t(e.firstChild),e=e.nextSibling}var r=[];return t(e),r}};e.exports=i},function(e,t,r){"use strict";function n(e){"function"==typeof e.onCreate&&e.onCreate.call(e)}function o(e){"function"==typeof e.onRender&&e.onRender.call(e)}function i(e){if("function"==typeof e.onBeforeUpdate)return e.onBeforeUpdate.call(e,Object.assign({},e.props))}function a(e){"function"==typeof e.onUpdate&&e.onUpdate.call(e)}function u(e){if("function"==typeof e.onBeforeDestroy)return e.onBeforeDestroy.call(e)}function s(e){"function"==typeof e.onDestroy&&(e.onDestroy.call(e),e=null)}e.exports={callCreate:n,callRender:o,callBeforeUpdate:i,callUpdate:a,callBeforeDestroy:u,callDestroy:s}},function(e,t,r){"use strict";function n(e){for(var t={},r=Array.from(e.attributes),n=r.length-1;n>=0;--n){var o=r[n],a=o.name.match(u.IS_COMPONENT_LISTENER);a?(void 0===t[s.LISTENER]&&(t[s.LISTENER]={}),t[s.LISTENER][a[1]]=o.nodeValue,delete t[o.name]):t[o.name]=""===o.nodeValue||i(o.nodeValue)}return t}function o(e){function t(e,o){for(;e;){var i=void 0;3===e.nodeType?i=e.nodeValue:(i={},i.type=e.nodeName.toLowerCase(),i.children=[],i.props=n(e)),Object.keys(r).length||(r=i),o&&o.children&&o.children.push(i),e.hasChildNodes()&&t(e.firstChild,i),e=e.nextSibling}}var r={};return t(e,r),r}var i=r(2),a=r(0),u=a.REGEX,s=a.ATTR;e.exports={transform:o,serializeProps:n}},function(e,t,r){"use strict";var n=r(15);e.exports={updateElement:n.update}},function(e,t,r){"use strict";e.exports=r(10)},function(e,t,r){"use strict";e.exports=r(11),e.exports.component=r(4).component,e.exports.collection=r(1),e.exports.update=r(8).updateElement,e.exports.transform=r(7).transform,e.exports.html=r(5)},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=r(3),u=r(12),s=r(4),c=r(0),l=c.TAG,f=c.REGEX,p=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e);var i="<"+l.VIEW+"></"+l.VIEW+">";if(f.IS_ID_SELECTOR.test(r.root)&&(r.root=document.getElementById(r.root.substring(1))),f.IS_ID_SELECTOR.test(r.template)&&(r.template=document.getElementById(r.template.substring(1)),r.template=r.template.innerHTML),!(r.root instanceof HTMLElement))throw new TypeError("root must be an HTMLElement or an valid ID selector like #example-root");if(!(r.template instanceof HTMLElement||"string"==typeof r.template||"function"==typeof r.template))throw new TypeError("template must be a string or an HTMLElement or a function or an valid ID selector like #example-template");this.cfg=a(r,{components:[],actions:{}}),Object.defineProperties(this,{_components:{value:{},writable:!0},_usedComponents:{value:{},writable:!0},_stores:{value:{},writable:!0},_ids:{value:{},writable:!0},action:{value:u(this.cfg.actions,this),enumerable:!0},mount:{value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._usedComponents[0];if("string"==typeof t&&(t=document.querySelector(t)),!((t=t||r._rootElement)instanceof HTMLElement))throw new TypeError("root must be an HTMLElement or an valid selector like #example-root");var n={tag:l.ROOT,cfg:{props:{},template:function(){return e}}};return s.getInstances({root:t,template:"<"+l.ROOT+"></"+l.ROOT+">",view:this,parentCmp:r,isStatic:!1,autoCmp:n})[0]},enumerable:!0}}),this.cfg.components.forEach(function(e){"object"===(void 0===e?"undefined":o(e))&&"string"==typeof e.tag&&"object"===o(e.cfg)&&(t._components[e.tag]=e)}),this._components[l.VIEW]={tag:l.VIEW,cfg:{props:r.props||{},template:function(){return"function"==typeof r.template?r.template():r.template}}},this._usedComponents=s.getInstances({root:this.cfg.root,template:i,view:this})||[]}return i(e,[{key:"getComponent",value:function(e){return this._usedComponents[0].children[e]}},{key:"getComponentById",value:function(e){return this._ids[e]}},{key:"getStore",value:function(e){return this._stores[e]}}]),e}();e.exports=p},function(e,t,r){"use strict";function n(e,t){if("object"!==(void 0===e?"undefined":o(e)))throw new TypeError("expected an object");for(var r=Object.assign({},e),i=Object.keys(e),a=i.length-1;a>=0;--a){var u=r[i[a]];"function"==typeof u?r[i[a]]=u.bind(t):"object"===(void 0===u?"undefined":o(u))&&(r[i[a]]=n(u,t))}return r}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=n},function(e,t,r){"use strict";function n(e){return void 0!==window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e)}function o(e,t){if(e.updateChildrenProps){Object.keys(e.children).forEach(function(r){t.forEach(function(t){e.children[r]._publicProps.hasOwnProperty(t.currentPath)&&e.children[r].props.hasOwnProperty(t.currentPath)&&(e.children[r].props[t.currentPath]=t.newValue)})})}}function i(e,t){t.forEach(function(t){e._boundElements.hasOwnProperty(t.property)&&e._boundElements[t.property].forEach(function(e){e.value=t.newValue})})}function a(e,t){e.props=u.create(t,!0,function(t){e.render(),i(e,t),e._isCreated&&n(function(){o(e,t),s.callUpdate(e)})}),u.beforeChange(e.props,function(){if(!1===s.callBeforeUpdate(e))return!1})}var u=r(14),s=r(6);e.exports={create:a}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){var e=[],t=[],r=[],o=[],i=null,a=null,u=function(e,t){return t.split(".").reduce(function(e,t){return e?e[t]:void 0},e||self)},s=function s(c,l,f,p){var d=f||null,m=p||"",v=[],y=function(e,t){return e instanceof Array?""!==m?m:t:""!==m?m+"."+t:t},h=function(e){if(!0!==d.paused)if(!0===l)setTimeout(function(){if(e===v.length){for(var t=0;t<d.observers.length;t++)d.observers[t](v);v=[]}},10);else{for(var t=0;t<d.observers.length;t++)d.observers[t](v);v=[]}},b={get:function(e,n){if("__isProxy"===n)return!0;if("__getTarget"===n)return e;if("__getParent"===n)return function(t){if(void 0===t)var t=1;var r=y(e,"__getParent").split(".");return r.splice(-(t+1),t+1),u(d.proxy,r.join("."))};var a=e[n];if(o.push(d),null===i){i=d;var c=t.indexOf(e),f=r[c],p=f.length;if(p>1)for(;p--;)-1===o.indexOf(f[p].observable)&&f[p].proxy[n];i=null,o=[]}if(a instanceof Object&&null!==a&&e.hasOwnProperty(n)&&void 0===a.__isProxy){var c=t.indexOf(a);if(c>-1)for(var v=r[c],p=v.length;p--;)if(v[p].observable===d)return v[p].proxy;return s(a,l,d,""!==m?m+"."+n:n)}return a},deleteProperty:function(e,n){var o=!0;a===g&&(o=!1,a=null);var i=Object.assign({},e),u=y(e,n);if(v.push({type:"delete",target:e,property:n,newValue:null,previousValue:i[n],currentPath:u,proxy:g}),"function"==typeof d.beforeChange){if(!1===d.beforeChange(v))return!1}if(!0===o){var s=t.indexOf(e);if(s>-1)for(var c=r[s].length;c--;)r[s][c].proxy!==g&&(a=r[s][c].proxy,delete r[s][c].proxy[n]);delete e[n]}return h(v.length),!0},set:function(e,o,i,u){var s=!0;a===g&&(s=!1,a=null);var c=e[o];if(c!==i||!1===s){var l=void 0===c?"undefined":n(c),f=y(e,o),p="update";if("undefined"===l&&(p="add"),v.push({type:p,target:e,property:o,newValue:i,previousValue:u[o],currentPath:f,proxy:g}),"function"==typeof d.beforeChange){if(!1===d.beforeChange(v))return!1}if(!0===s){var m=t.indexOf(e);if(m>-1)for(var b=r[m],E=b.length;E--;)b[E].proxy!==g&&(a=b[E].proxy,b[E].proxy[o]=i);setTimeout(function(){l instanceof Object&&function e(n){for(var o in n){var i=n[o];i instanceof Object&&null!==i&&e(i)}var a=t.indexOf(n);if(a>-1){for(var u=r[a],s=u.length;s--;)if(d===u[s].observable){u.splice(s,1);break}0==u.length&&(r.splice(a,1),t.splice(a,1))}}(c)},1e4),e[o]=i}h(v.length)}return!0}},g=new Proxy(c,b);null===d&&(d={target:c,domDelay:l,proxy:g,observers:[],paused:!1,path:m},e.push(d));var E={target:c,proxy:g,observable:d},S=t.indexOf(c);return S>-1?r[S].push(E):(t.push(c),r.push([E])),g};return{create:function(e,t,r){if(!0===e.__isProxy)var e=e.__getTarget;var n=s(e,t);return"function"==typeof r&&this.observe(n,r),n},observe:function(t,r){for(var n=e.length;n--;)if(e[n].proxy===t){e[n].observers.push(r);break}},pause:function(t){for(var r=e.length,n=!1;r--;)if(e[r].proxy===t){e[r].paused=!0,n=!0;break}if(0==n)throw new Error("ObseravableSlim could not pause observable -- matching proxy not found.")},resume:function(t){for(var r=e.length,n=!1;r--;)if(e[r].proxy===t){e[r].paused=!1,n=!0;break}if(0==n)throw new Error("ObseravableSlim could not resume observable -- matching proxy not found.")},remove:function(n){for(var o=null,i=!1,a=e.length;a--;)if(e[a].proxy===n){o=e[a],i=!0;break}for(var u=r.length;u--;)for(var s=r[u].length;s--;)r[u][s].observable===o&&(r[u].splice(s,1),0==r[u].length&&(r.splice(u,1),t.splice(u,1)));!0===i&&e.splice(a,1)},beforeChange:function(t,r){if("function"!=typeof r)throw new Error("Callback function is required");for(var n=e.length,o=!1;n--;)if(e[n].proxy===t){e[n].beforeChange=r,o=!0;break}if(0==o)throw new Error("ObseravableSlim -- matching proxy not found.")}}}();try{e.exports=o}catch(e){}},function(e,t,r){"use strict";function n(e,t){return(void 0===e?"undefined":u(e))!==(void 0===t?"undefined":u(t))||"string"==typeof e&&e!==t||e.type!==t.type||e.props&&e.props.forceupdate}function o(e,t){if(void 0!==e){if("string"==typeof e)return document.createTextNode(e);var r=document.createElement(e.type);return c(r,e.props,t),e.children.map(function(e){return o(e,t)}).forEach(r.appendChild.bind(r)),r}}function i(e,t,r){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments[4];if(!r){var c=o(t,s);return e.appendChild(c),c}if(t){if(n(t,r)){var p=o(t,s);return e.replaceChild(p,e.childNodes[u]),p}if(t.type){l(e.childNodes[u],t.props,r.props,s);for(var d=t.children.length,m=r.children.length,v=0;v<d||v<m;v++)i(e.childNodes[u],t.children[v],r.children[v],v,s);a()}}else e.childNodes[u]&&f.push(e.childNodes[u])}function a(){for(var e=f.length;e--;)f[e].parentNode.removeChild(f[e]),f.splice(e,1)}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(16),c=s.attach,l=s.updateAttributes,f=[];e.exports={create:o,update:i}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e){return _.IS_LISTENER.test(e)}function i(e){return e===w.BIND}function a(e){return e===w.REF}function u(e){return-1!==["INPUT","TEXTAREA"].indexOf(e.nodeName)}function s(e,t,r,n){if(p(t));else if("className"===t)e.setAttribute("class",r);else if("boolean"==typeof r)d(e,t,r);else if("object"===(void 0===r?"undefined":E(r)))try{e.setAttribute(t,JSON.stringify(r))}catch(e){}else e.setAttribute(t,r)}function c(e,t,r){p(t)||("className"===t?e.removeAttribute("class"):"boolean"==typeof r?m(e,t):e.removeAttribute(t))}function l(e,t,r,n){r?n&&r===n||s(e,t,r):c(e,t,n)}function f(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(arguments[3],Object.assign({},t,r));Object.keys(n).forEach(function(n){l(e,n,t[n],r[n])})}function p(e){return o(e)||i(e)||a(e)||"forceupdate"===e}function d(e,t,r){r?(e.setAttribute(t,r),e[t]=!0):e[t]=!1}function m(e,t){e.removeAttribute(t),e[t]=!1}function v(e){return e.slice(2).toLowerCase()}function y(e,t,r,i){if(o(t)){var a=r.match(_.GET_LISTENER);if(i._isStatic&&(e.dataset[t]=r),a){var u=null,s=a[1],c=a[2];c&&(u=c.split(",").map(function(e){return e=e.trim(),"this"===e?i:T(e)}));var l=s.match(_.IS_PARENT_METHOD);l&&(s=l[1],i=i.parent);var f=O(s,i);void 0!==f&&(r=u?f.bind.apply(f,[i].concat(n(u))):f.bind(i))}"function"==typeof r&&e.addEventListener(v(t),r)}}function h(e,t,r,n){i(t)&&u(e)&&void 0!==n.props[r]&&(["compositionstart","compositionend","input","change"].forEach(function(t){e.addEventListener(t,function(){n.props[r]=this.value})}),n._boundElements.hasOwnProperty(r)?n._boundElements[r].push(e):n._boundElements[r]=[e])}function b(e,t,r,n){a(t)&&(n.ref[r]=e)}function g(e,t,r){Object.keys(t).forEach(function(n){s(e,n,t[n],r),y(e,n,t[n],r),h(e,n,t[n],r),b(e,n,t[n],r)});for(var n in e.dataset)e.dataset.hasOwnProperty(n)&&_.IS_LISTENER.test(n)&&y(e,n,e.dataset[n],r)}var E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S=r(0),_=S.REGEX,w=S.ATTR,T=r(2),O=r(17);e.exports={attach:g,updateAttributes:f}},function(e,t,r){"use strict";function n(e,t){return e.split(".").reduce(function(e,t){return e?e[t]:void 0},t)}function o(e,t){return-1!==e.indexOf(".")&&(e=e.split("."),e.pop(),e=e.join(".")),n(e,t)}e.exports=n,e.exports.getLast=o},function(e,t,r){"use strict";function n(e){if("string"==typeof e.store){if(void 0!==e.view._stores[e.store])throw new Error("Store already defined: "+e.store);e.view._stores[e.store]=e.props}}e.exports={create:n}},function(e,t,r){"use strict";function n(e){if("string"==typeof e.id){if(void 0!==e.view._ids[e.id])throw new Error("ID already defined: "+e.id);e.view._ids[e.id]=e}}e.exports={create:n}},function(e,t,r){"use strict";function n(e){var t={};return void 0!==e[i.ALIAS]&&(t.alias=e[i.ALIAS],delete e[i.ALIAS]),void 0!==e[i.STORE]&&(t.store=e[i.STORE],delete e[i.STORE]),void 0!==e[i.LISTENER]&&(t.callback=e[i.LISTENER],delete e[i.LISTENER]),void 0!==e[i.CLASS]&&(t.class=e[i.CLASS],delete e[i.CLASS]),void 0!==e[i.ID]&&(t.id=e[i.ID],delete e[i.ID]),t}var o=r(0),i=o.ATTR;e.exports={extract:n}}])}); |
{ | ||
"name": "doz", | ||
"version": "0.0.8", | ||
"description": "Build UI, so simple", | ||
"version": "0.0.9", | ||
"description": "A JavaScript framework for building UI, almost like writing in VanillaJS.", | ||
"main": "dist/doz.js", | ||
@@ -18,3 +18,3 @@ "scripts": { | ||
"type": "git", | ||
"url": "git+https://github.com/fabioricali/doz.git" | ||
"url": "git+https://github.com/dozjs/doz.git" | ||
}, | ||
@@ -31,5 +31,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/fabioricali/doz/issues" | ||
"url": "https://github.com/dozjs/doz/issues" | ||
}, | ||
"homepage": "https://github.com/fabioricali/doz#readme", | ||
"homepage": "https://github.com/dozjs/doz#readme", | ||
"dependencies": {}, | ||
@@ -36,0 +36,0 @@ "devDependencies": { |
<div align="center"> | ||
<br/><br/> | ||
<img width="300" src="https://raw.githubusercontent.com/fabioricali/doz/master/extra/doz.png" title="doz"/> | ||
<img width="300" src="https://raw.githubusercontent.com/dozjs/doz/master/extra/doz.png" title="doz"/> | ||
<br/><br/> | ||
@@ -8,3 +8,3 @@ <br/><br/> | ||
<br/><br/> | ||
<a href="https://travis-ci.org/fabioricali/doz" target="_blank"><img src="https://travis-ci.org/fabioricali/doz.svg?branch=master" title="Build Status"/></a> | ||
<a href="https://travis-ci.org/dozjs/doz" target="_blank"><img src="https://travis-ci.org/dozjs/doz.svg?branch=master" title="Build Status"/></a> | ||
<a href="https://opensource.org/licenses/MIT" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" title="License: MIT"/></a> | ||
@@ -25,3 +25,3 @@ <br/><br/> | ||
```javascript | ||
Doz.component('doz-button-counter', { | ||
Doz.component('button-counter', { | ||
props: { | ||
@@ -46,3 +46,3 @@ counter: 0 | ||
template: ` | ||
<doz-button-counter title="Click me!"></doz-button-counter> | ||
<button-counter title="Click me!"></button-counter> | ||
` | ||
@@ -54,2 +54,2 @@ }); | ||
<a href="https://fabioricali.github.io/doz/example/">Try now</a> | ||
<a href="https://dozjs.github.io/doz/example/">Try now</a> |
Sorry, the diff of this file is too big to display