{"_id":"dom-factory","_rev":"22-3456648ba60910a0f1f4b983c0bb4182","name":"dom-factory","description":"Enhance HTML elements using plain JavaScript objects.","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0-alpha.1":{"name":"dom-factory","version":"1.0.0-alpha.1","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"test":"echo \"Error: no test specified\" && exit 1","dev":"webpack --config build/webpack.config.dev.js --progress --watch","build":"NODE_ENV=production webpack --config build/webpack.config.production.js --progress","build-dev":"webpack --config build/webpack.config.dev.js --progress"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"babel-core":"^6.4.0","babel-loader":"^6.2.1","babel-plugin-transform-runtime":"^6.4.3","babel-preset-es2015":"^6.3.13","babel-runtime":"^5.8.34","eslint":"^1.10.3","eslint-loader":"^1.2.0","webpack":"^1.12.11","webpack-config-api":"^0.2.1"},"dependencies":{"watch-object":"^1.1.2"},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/themekit/dom-factory.git"},"bugs":{"url":"https://github.com/themekit/dom-factory/issues"},"homepage":"https://github.com/themekit/dom-factory#readme","gitHead":"00a8272bb8f1be900897cc46a023680f2635de66","_id":"dom-factory@1.0.0-alpha.1","_shasum":"7429b105f2314d72ed3a23166c3103e470fc113a","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"shasum":"7429b105f2314d72ed3a23166c3103e470fc113a","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0-alpha.1.tgz","integrity":"sha512-uRcpxO28ZOuQleIf+GwgHNQ1cdWdJnc5biDtN0cxMt+sdropS51MwallgzdL4Wh9MPBGQ6D7c1SubrcjYoxv+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2nvvjsgw9fIlWT+EHfzg3NZH6K9tyb3sso32CZzFHKgIhAM93dE7e0I6KS0ePfyBYbU9z9rHYLL9+OG1xTProLmXc"}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dom-factory-1.0.0-alpha.1.tgz_1465432349961_0.9835933391004801"},"directories":{}},"1.0.0-alpha.2":{"name":"dom-factory","version":"1.0.0-alpha.2","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"test":"echo \"Error: no test specified\" && exit 1","dev":"webpack --config build/webpack.config.dev.js --progress --watch","build":"NODE_ENV=production webpack --config build/webpack.config.production.js --progress","build-dev":"webpack --config build/webpack.config.dev.js --progress"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"babel-core":"^6.4.0","babel-loader":"^6.2.1","babel-plugin-transform-runtime":"^6.4.3","babel-preset-es2015":"^6.3.13","babel-runtime":"^5.8.34","eslint":"^1.10.3","eslint-loader":"^1.2.0","webpack":"^1.12.11","webpack-config-api":"^0.2.1"},"dependencies":{"watch-object":"^1.1.2"},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/themekit/dom-factory.git"},"bugs":{"url":"https://github.com/themekit/dom-factory/issues"},"homepage":"https://github.com/themekit/dom-factory#readme","gitHead":"3ed700a7c0e3747db2b623b597d9c8166537e099","_id":"dom-factory@1.0.0-alpha.2","_shasum":"2dd11c99f306b6d49132d9c0952d9b79ef803db1","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"shasum":"2dd11c99f306b6d49132d9c0952d9b79ef803db1","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0-alpha.2.tgz","integrity":"sha512-iaPR2zuKAhd4pMq8266xDJJVwkDSDlNgTOJ9i5m+aNFaHfbfzsLkAb4g7xoXVhH1kt+ARXuKa1qy+T0zTWOXxQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDi9xMKHMKBew5hqy/x7fVDmcLeBnDy46QFCSxsBamthAiB2KZ9ODNh7QNOr0KNVu4y8f/COfH6D4Bg5LAyxPZLMDQ=="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dom-factory-1.0.0-alpha.2.tgz_1465583766235_0.363042572978884"},"directories":{}},"1.0.0-alpha.3":{"name":"dom-factory","version":"1.0.0-alpha.3","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"test":"echo \"Error: no test specified\" && exit 1","dev":"webpack --config build/webpack.config.dev.js --progress --watch","build":"NODE_ENV=production webpack --config build/webpack.config.production.js --progress","build-dev":"webpack --config build/webpack.config.dev.js --progress"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"babel-core":"^6.4.0","babel-loader":"^6.2.1","babel-plugin-transform-runtime":"^6.4.3","babel-preset-es2015":"^6.3.13","babel-runtime":"^5.8.34","eslint":"^1.10.3","eslint-loader":"^1.2.0","webpack":"^1.12.11","webpack-config-api":"^0.2.1"},"dependencies":{"watch-object":"^1.1.2"},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/themekit/dom-factory.git"},"bugs":{"url":"https://github.com/themekit/dom-factory/issues"},"homepage":"https://github.com/themekit/dom-factory#readme","gitHead":"5cf2e1148545317307e8ea586c03e0376808e2f3","_id":"dom-factory@1.0.0-alpha.3","_shasum":"2d2a5b358d3a829331eff2f397f296c5d283bf85","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"shasum":"2d2a5b358d3a829331eff2f397f296c5d283bf85","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0-alpha.3.tgz","integrity":"sha512-oj22vkDdBBKesAMq2jPz9oSwUcywvTETaPS8ZHtnNTBEXzTc5G0OEeRzPC0uiLhLweaOWdACNJ8dCwnAn35XQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCHziDvNdE2TcCbun/3lSDnMMkcC9gXtop241GDDOo9cYCIF2lESKWpNPePAPRa03D1j5Ceu0zATKjkEAigk5YHfQ7"}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dom-factory-1.0.0-alpha.3.tgz_1466167590263_0.5398497814312577"},"directories":{}},"1.0.0-alpha.4":{"name":"dom-factory","version":"1.0.0-alpha.4","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"test":"echo \"Error: no test specified\" && exit 1","dev":"webpack --config build/webpack.config.dev.js --progress --watch","build":"NODE_ENV=production webpack --config build/webpack.config.production.js --progress","build-dev":"webpack --config build/webpack.config.dev.js --progress"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"babel-core":"^6.4.0","babel-loader":"^6.2.1","babel-plugin-transform-runtime":"^6.4.3","babel-preset-es2015":"^6.3.13","babel-runtime":"^5.8.34","eslint":"^1.10.3","eslint-loader":"^1.2.0","webpack":"^1.12.11","webpack-config-api":"^0.2.1"},"dependencies":{"watch-object":"^1.1.2"},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/themekit/dom-factory.git"},"bugs":{"url":"https://github.com/themekit/dom-factory/issues"},"homepage":"https://github.com/themekit/dom-factory#readme","gitHead":"5329467e8219e29286734acd0551717a56a9344f","_id":"dom-factory@1.0.0-alpha.4","_shasum":"f22feba8cd1c484df7e66649761d1824ec022548","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"shasum":"f22feba8cd1c484df7e66649761d1824ec022548","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0-alpha.4.tgz","integrity":"sha512-QKwsud1Sj2uFsvEhT+h2Clo3fuxLAYoRcje6nLCzAl0/4bBl85Ij+5EK+JHhFOqTfQsY1wByaqs7AYrKd11ScQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC52vqNppXd5iRzblPAFXaFNGVAQZOWxgN2yaA1lX07IQIgYXEnBSkyKeW0CH21FZwPFjrdigCySJr18mUBNcDFuGQ="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/dom-factory-1.0.0-alpha.4.tgz_1478264858238_0.7265441121999174"},"directories":{}},"1.0.0-alpha.5":{"name":"dom-factory","version":"1.0.0-alpha.5","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"test":"echo \"Error: no test specified\" && exit 1","dev":"webpack --config build/webpack.config.dev.js --progress --watch","build":"NODE_ENV=production webpack --config build/webpack.config.production.js --progress","build-dev":"webpack --config build/webpack.config.dev.js --progress"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"babel-core":"^6.4.0","babel-loader":"^6.2.1","babel-plugin-transform-runtime":"^6.4.3","babel-preset-es2015":"^6.3.13","babel-runtime":"^5.8.34","core-js":"^2.4.1","eslint":"^1.10.3","eslint-loader":"^1.2.0","watch-object":"^1.1.2","webpack":"^1.12.11","webpack-config-api":"^0.2.1"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/themekit/dom-factory.git"},"bugs":{"url":"https://github.com/themekit/dom-factory/issues"},"homepage":"https://github.com/themekit/dom-factory#readme","gitHead":"a4916af4bb8bc625c11739e21b75c7c751f15eeb","_id":"dom-factory@1.0.0-alpha.5","_shasum":"6f4c49f3546727153177c8cb66a99370943e7973","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.6.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"shasum":"6f4c49f3546727153177c8cb66a99370943e7973","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0-alpha.5.tgz","integrity":"sha512-kTRXbepHKEVJ4R5tyaFEgP2YmWLYssvFlwWbfOCzEpVUy27/0Oqq0a7yDt9Kn/7zU+4Q0zgQk/SY8kbx9xKxVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4eXwWpIYjq/R6qRP5s+8SGkQi8RVV5vSoqIzDc36PBgIgYj9GXkDvFg+1d9vtOudPfCK94DOiqwwNFT3IoaXXx9M="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/dom-factory-1.0.0-alpha.5.tgz_1489320092274_0.72853824775666"},"directories":{}},"1.0.0-alpha.6":{"name":"dom-factory","version":"1.0.0-alpha.6","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"core-js":"^2.4.1","cross-env":"^5.0.1","laravel-mix":"^1.0.7","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/themekit/dom-factory.git"},"bugs":{"url":"https://github.com/themekit/dom-factory/issues"},"homepage":"https://github.com/themekit/dom-factory#readme","gitHead":"a6a844e09fdff225c565317baec35c904ce80787","_id":"dom-factory@1.0.0-alpha.6","_npmVersion":"5.0.4","_nodeVersion":"8.0.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"integrity":"sha512-NsoNCs78XbrfzHLDuTkekvd/SdLyw1HxO6IJTMcYxYAZ6JeJTyNprVBSXFGbWKNBumZCfXcLR+LfxkHsLMn9DQ==","shasum":"03ce90377a533721eefbeb7cbb9cb4b6146d080b","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0-alpha.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+hQUW0qw8+njQpcBbuq7gsbGuMZvyFuppbcqwMlKgagIhAOtWGBvwc7yLLCdT5TH7HPtFOv6PISHE+Zj9pmuYlfFy"}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory-1.0.0-alpha.6.tgz_1498914715693_0.07287393161095679"},"directories":{}},"1.0.0-alpha.7":{"name":"dom-factory","version":"1.0.0-alpha.7","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"core-js":"^2.4.1","cross-env":"^5.0.1","laravel-mix":"^1.0.7","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/themekit/dom-factory.git"},"bugs":{"url":"https://github.com/themekit/dom-factory/issues"},"homepage":"https://github.com/themekit/dom-factory#readme","gitHead":"348440cdd6607f87971d6e3b6cd278725743fbfe","_id":"dom-factory@1.0.0-alpha.7","_npmVersion":"5.4.2","_nodeVersion":"8.0.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"integrity":"sha512-m/ecXZ/6jA6hq0cUqDYif5DdOS4d74yBWUr8OIFEv4nkNYHo0KwxsHXFO1uAzKGIQ6VgMa3rPXcSOwsIQ7RqSg==","shasum":"68a4d4bfc1fc9dbe39377f9171bd06ca1633f242","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0-alpha.7.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmltHvBoykeG7KGikthuNJgJ0veGRcmu38w/W1UiDc7wIgB8FUPWsOnlqw+ZtZqht9JtGLimNyX6NVwVDVGUyCHTc="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory-1.0.0-alpha.7.tgz_1508577222823_0.5187722272239625"},"directories":{}},"1.0.0-alpha.8":{"name":"dom-factory","version":"1.0.0-alpha.8","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"core-js":"^2.4.1","cross-env":"^5.0.1","laravel-mix":"^1.0.7","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","gitHead":"9e978c2f65e5a888a271a7dcf4d7d7fc9b8b97e1","_id":"dom-factory@1.0.0-alpha.8","_npmVersion":"5.6.0","_nodeVersion":"8.0.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"integrity":"sha512-fxlcll9pLl3vvsWuG7F96NPKmXAdMn3eKMr/hTj6IVbXwOUmHot2vaG/yVuQce1mQMc74UQ6zMTzXFgnD6Kk/w==","shasum":"25d2deea9e0d8fa12bb496e6caee37503aefa905","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0-alpha.8.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAsnWWQliPZ/ga1VjycwSo+mneMZSfMIBjkvsbqAHXVAAiAkQn/mmtJtzSU2r3tYcqovrZfD4ZxObmVK/LgdUPKO8g=="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory-1.0.0-alpha.8.tgz_1512932449633_0.9781934407074004"},"directories":{}},"1.0.0-alpha.9":{"name":"dom-factory","version":"1.0.0-alpha.9","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"core-js":"^2.4.1","cross-env":"^5.0.1","laravel-mix":"^1.0.7","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","gitHead":"cde844516955d9e8ba8b129c9cf2ed53aba1ff0f","_id":"dom-factory@1.0.0-alpha.9","_npmVersion":"5.6.0","_nodeVersion":"8.0.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"integrity":"sha512-0m+zZnJ+sUJJEwgZmz8Sbkcjr026MHrRMhSGG8jlGFRXFMJcCcEtIS18fP5eeM5SiMe++gs/GvbBNouiw1JPzg==","shasum":"dec9f917a734fd96f6cc4c6715dda3338f956dcc","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0-alpha.9.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGPBi6qzMz6KUfuzH0xSssxqhVMfThb7HvDRJzH/mzx7AiATXeNjNv1ZzPkRaXlo8TkRjwd51ogxD7P/CE7aTw8MzA=="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory-1.0.0-alpha.9.tgz_1515508135517_0.9832826082129031"},"directories":{}},"1.0.0-alpha.10":{"name":"dom-factory","version":"1.0.0-alpha.10","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"core-js":"^2.4.1","cross-env":"^5.0.1","laravel-mix":"^1.0.7","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","gitHead":"2b7016d1fe5a4d8a1468e6ed6ed5b4e5856f355a","_id":"dom-factory@1.0.0-alpha.10","_npmVersion":"5.6.0","_nodeVersion":"8.0.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"integrity":"sha512-BOwT8RTQgARfMaDdtqomMefo1T3AlWvaKaDH177DryLRZtLeKDytjipf+dQqDel+TO889Q7mUFmq0lZUWFI8dQ==","shasum":"3bdd9343d9ac61174a6bfc17c5a46c4075b35f93","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0-alpha.10.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBOiCKIDwuo8ySX7z+m8Z8jbfgG+vR56Za+qrl9IM54JAiEAhBtHbw93g9O/NAWNnofCzjbbKxuicpCKjh3sz5n8rv4="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory-1.0.0-alpha.10.tgz_1515520629447_0.4412713390775025"},"directories":{}},"1.0.0":{"name":"dom-factory","version":"1.0.0","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"core-js":"^2.4.1","cross-env":"^5.0.1","laravel-mix":"^2.0.0","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","gitHead":"915a02e9595946722fb8f9f7fcb0cd2fd24bd393","_id":"dom-factory@1.0.0","_npmVersion":"6.4.0","_nodeVersion":"8.0.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"integrity":"sha512-casgtVd9cHNOWfKc7At8HmvaybGpy6YEt8DQypBeRmlrrCHmaZ2texI8nYDgZPsNON1s6KS90oJwnSLkSTrZdg==","shasum":"4ddfb9b551d6c68149ba53f535ac0fc80a88720b","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.0.tgz","fileCount":17,"unpackedSize":72204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbd+tZCRA9TVsSAnZWagAA6RIP/ipiQTbj51dnHUklcaXh\nkOmka3Iar3w28lNlKS9pw3PEoRX9bkR2zyPYoQN/2dS5bziPprbevii+LcpG\nrmXbc//xbZPK6EwyiV4XNwldd2W/u6IW+bv8bDnaaQDSaWcNbawgsoRnSdTu\nXbcoz2KC4zFPzmEpHsRQSUInviXSsQ7Y3Qj/zcuc4VBpoMVFWVI72qC3J/Yo\nAH6hv5kGJTN6Td4F2MS4xSr3YBRG6CcTdKRqWq1trtFsHIPdHI3RrqdNyYQ2\nEfc1tYPE/xnu0FOOZC43MDAYITIVRBZ+NElNM4R67qcI/VqGZIb3nbNHz/KU\nj7rY+cIIzCB4kzrEKH4CKQiUheMhw0OIVlcNi8K2GUyJD6ijzEc4VSKrHWZj\nNmteV1+AY+rHCMGqqtvXuryHrDKNSnhI4ZascgOHwi7Wwmo+GPYKTQTaaxwo\naxyMmcc438kowoccFQ7px8HPsLTn4HFsIV0yZ274U0hVgr0sJqKveen3cT4L\nS2dSUrUFIt3MiogK50xW9USfPoX1BElGAuwPoJjmOiPEjfkwFPrWOazAFXq8\nqNnyxk0MpdpjVKY2Vv1dwggtHwa0OjTf7IZkq0wzQ2DwPPu4P8pd0ULisyyR\nu+FPrmsgsifHLeue4EOKjk4l6y0XMFQG7HjYPhEk7M6mKLGE5GxbSWZk+j4p\nEXUp\r\n=+Krv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZHPA99NUCXahAM3s5advnWfGoj/J7TuMJETLCNzGDywIgfzqZrWDN0fPHOjaHUZQkczugaQYFE3lGt9Ngfu7SGLA="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory_1.0.0_1534585688601_0.8407260378585306"},"_hasShrinkwrap":false},"1.0.1":{"name":"dom-factory","version":"1.0.1","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"@babel/polyfill":"^7.2.5","core-js":"^2.6.3","cross-env":"^5.2.0","laravel-mix":"^4.0.14","vue-template-compiler":"^2.5.22","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","gitHead":"d24c3de538c8b17bbe85893122e2a5c8ff898902","_id":"dom-factory@1.0.1","_npmVersion":"6.5.0","_nodeVersion":"11.4.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"integrity":"sha512-XWfP7kbCyTFwtCEI1M5/aeHwWyqY/aRQyDj5AzepNF+wB58EBk32lqNNcdIVysAKOhEMTMYLb6YjQGU8s6zr/w==","shasum":"ec7713ce026eb2e3ddd724491fc43ff1e3c52976","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.1.tgz","fileCount":17,"unpackedSize":67904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcS+7kCRA9TVsSAnZWagAA+TwP/RJTF3k519Ie8zZqyHoq\nBEZ1lz9JUa394e+zYa0ocYfyhl8kbmlBsEd5aPFBxfp0FPU7dQhAP92KlW3P\nKeV0uID8xmMGmi+3hN+2zhasvlZnPtrf2PYxg56ncP7TqfLToKnPZPIEzRB0\nJmAy12pyUvSTh6T3Tu/vtIC18NUjYVhQhGtICOrK1C7Ein2SHH5YUHbWQOSg\nlLZBA8pfjy+Agwz8L5RjKtJUOLHiyssqzxaGJSQ8MPvLLwKwPABiJYNYIXmx\nYauUxgTum/cfMDKzZS6eBz6FQ4uVeRI8qazFL0aVsVx9gGl6pYVtddN7BWvv\n/7mPibN5EhSsRsLO6INRLdpnyW+x1WoerGGp3aQ72ScqmkC3SxQ3E3X3Sii/\nGJoUcDCNV0d3BBWUet68B8z5N/t0zYUa5Unv7XaY1ezQ9MDK0hxPSL/S7UHy\nw34CKFajrwoZrbtUhLlUSVECacujhQEfebms6u94e8lRULIGHguoy6hehGBP\nDE/ayi+asf97GVwLZ0KpeSdws4HW/9o75JFxvSEkw0QYYbusPTzi23qv5POw\n3n3Hh9MZOyYgAy6O84BdygZvYh9DNOcuvVh0uf44T0uG1Cw+JX9rLs0AYmNl\nPg3+p73V3/QsKqH9pIyYPg67im9d3SRKksgvb9ypBWDtuCMUpah2IIDCHHEn\ne/Nh\r\n=T9h0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBmwWwzHwwpWnch1Z2o2AAUhPrIIQ3v43RaQBDBS1LxAAiB9df5lZYvZXRL94oNu6IxDOFv5XxAC8CDswHpAb05tvw=="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory_1.0.1_1548480228184_0.08545577714479502"},"_hasShrinkwrap":false},"1.0.2-beta.1":{"name":"dom-factory","version":"1.0.2-beta.1","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"@babel/polyfill":"^7.2.5","core-js":"^2.6.3","cross-env":"^5.2.0","laravel-mix":"^4.0.14","vue-template-compiler":"^2.5.22","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","readme":"# dom-factory\n\n[![npm version](https://badge.fury.io/js/dom-factory.svg)](https://badge.fury.io/js/dom-factory)\n\nThe DOM factory provides a convenient API (inspired by Polymer) to enhance HTML elements with custom behavior, using plain JavaScript objects with advanced features like property change observers, property reflection to attributes on HTML elements and simplify mundane tasks like adding and removing event listeners.\n\n## Compatibility\n\n> Supports the last two versions of every major browser.\n\n- Chrome\n- Safari\n- Firefox\n- IE 11/Edge\n- Opera\n- Mobile Safari\n- Chrome on Android\n\n## Installation\n\n```bash\nnpm install dom-factory\n```\n\n## Usage\n\nThe DOM factory library exports to AMD, CommonJS and global.\n\n### Global\n\n```html\n<script src=\"node_modules/dom-factory/dist/dom-factory.js\"></script>\n<script>\n  var handler = domFactory.handler\n</script>\n```\n\n### CommonJS\n\n```js\nvar handler = require('dom-factory').handler\n```\n\n### ES6\n\n```js\nimport { handler } from 'dom-factory'\n```\n\n### Components\n\nThe following ES6 example, illustrates a component definition for an enhanced button using properties as a public API, property reflection to attributes, property change observers and event listeners.\n\n#### Component definition\n\nA component definition is nothing more than a simple object factory (a function that creates an object) which accepts a `HTMLElement` node as it's argument.\n\n```js\n/**\n * A component definition\n * @return {Object}\n */\nconst buttonComponent = () => ({\n\n  /**\n   * Properties part of the component's public API.\n   * @type {Object}\n   */\n  properties: {\n\n    /**\n     * Maps to [data-a-property=\"value\"] attribute\n     * Also sets a default property value \n     * and updates the attribute on the HTMLElement\n     * @type {Object}\n     */\n    aProperty: {\n      reflectToAttribute: true,\n      value: 'value for aProperty'\n    },\n\n    /**\n     * Maps to [data-b-property] attribute\n     * It removes the attribute when the property value is `false`\n     * @type {Object}\n     */\n    bProperty: {\n      reflectToAttribute: true,\n      type: Boolean\n    },\n\n    /**\n     * Maps to [data-c-property] attribute\n     * It casts the value to a Number\n     * Sets the initial value to 0\n     * @type {Object}\n     */\n    cProperty: {\n      reflectToAttribute: true,\n      type: Number,\n      value: 0\n    }\n  },\n\n  /**\n   * Property change observers.\n   * @type {Array}\n   */\n  observers: [\n    '_onPropertyChanged(aProperty, bProperty)'\n  ],\n\n  /**\n   * Event listeners.\n   * @type {Array}\n   */\n  listeners: [\n    '_onClick(click)'\n  ],\n\n  /**\n   * Property change observer handler\n   * @param  {?}      newValue The new property value\n   * @param  {?}      oldValue The old property value\n   * @param  {String} propName The property name\n   */\n  _onPropertyChanged (newValue, oldValue, propName) {\n    switch (propName) {\n      case 'aProperty':\n        console.log('aProperty has changed', newValue, oldValue)\n        break\n      case 'bProperty':\n        console.log('bProperty has changed', newValue, oldValue)\n        break\n    }\n\n    // access from context, with the new values\n    console.log(this.aProperty, this.bProperty)\n  },\n\n  /**\n   * Click event listener\n   * @param  {MouseEvent} event The Mouse Event\n   */\n  _onClick (event) {\n    event.preventDefault()\n    console.log('The button was clicked!')\n  }\n})\n```\n\n#### Register the component\n\n```js\nhandler.register('my-button', buttonComponent)\n```\n\n#### Initializing\n\nWhen calling the `autoInit()` method, the component handler attempts to self-initialize all registered components which match the component CSS class. The CSS class is computed automatically from the component ID which was provided at registration, prefixed with `js-`.\n\nIn this example, since we registered the `buttonComponent` with a component ID of `my-button`, the handler will try to initialize all the HTML elements which have the `js-my-button` CSS class.\n\n```html\n<button class=\"js-my-button\">Press me</button>\n```\n\n```js\n// Initialize all components on window.DOMContentLoaded and window.load events.\nhandler.autoInit()\n```\n\nYou can also initialize components manually.\n\n```js\n// Initialize all components immediately.\nhandler.upgradeAll()\n\n// Initialize all components on a single element.\nvar myButtonNode = document.querySelector('.js-my-button')\nhandler.upgradeElement(myButtonNode)\n\n// Initialize a single component on a single element.\nhandler.upgradeElement(myButtonNode, 'my-button')\n\n// Upgrade all elements matching a registered component ID.\nhandler.upgrade('my-button')\n```\n\n#### Downgrade\n\nSometimes we need component lifecycle control when integrating with other libraries (Vue.js, Angular, etc).\n\n```js\nvar myButtonNode = document.querySelector('.js-my-button')\nhandler.downgradeElement(myButtonNode)\n```\n\n#### Interact with the component API\n\nWhen the handler initializes a component on a HTML element, a reference to the created component is stored as a property on the HTML element, matching the `camelCase` version of the component ID.\n\n```js\nvar buttonNode = document.querySelector('button')\nvar button = buttonNode.myButton\n```\n\nWe can use this reference to interact with the component's API.\n\n```js\nconsole.log(button.aProperty)\n// => 'value for aProperty'\n```\n\n#### Property reflection to attribute\n\n```js\nbutton.aProperty = 'something else'\nbutton.bProperty = true\nbutton.cProperty = 5\n```\n\nWhen using the `reflectToAttribute: true` property option, the property reflects a string representation of it's value to the corresponding `data-*` attribute on the HTML element using the `dataset` API, which means you can use the HTML element attribute to configure the property value.\n\n#### Casting values\n\nBecause component properties using `reflectToAttribute: true` are using the dataset API, all values are strings by default, but you can cast them to `Boolean` or `Number`.\n\n> Boolean\n\nWhen using a `Boolean` property type and assigning a property value of `true`, the attribute will be created on the HTML element with an empty value and when assigning a property value of `false`, the attribute will be removed from the DOM. \n\nFor example, an attribute with an empty value called `[data-my-boolean-attribute]` will map to `button.myBooleanAttribute`.\n\n```html\n<button data-my-boolean-attribute class=\"js-my-button\">\n  Press me\n</button>\n```\n\n```js\n`console.log(button.myBooleanAttribute) // => true`\n```\n\n> Number\n\nCast the component property value to a `Number` by adding `type: Number` to the property definition. It returns `NaN` when the value is not a valid number.\n\n```js\nbutton.cProperty = '50'\nconsole.log(button.cProperty) // => 50\n\nbutton.cProperty = 'abc'\nconsole.log(button.cProperty) // => NaN\n```\n\n```html\n<button class=\"js-my-button\" \n  data-a-property=\"something else\" \n  data-b-property\n  data-c-property=\"13\">\n  Press me\n</button>\n```\n\n```js\nconsole.log(button.aProperty) // => 'something else'\nconsole.log(button.bProperty) // => true\nconsole.log(button.cProperty) // => 13\n```\n\n#### Destroy\n\nCalling the `destroy` method on the component reference, removes observers and event listeners. Useful before removing the HTML element from the DOM, for example when using libraries like Vue.js or Angular2 where you need to hook into the application lifecycle.\n\n```js\nbutton.destroy()\n```","readmeFilename":"README.md","gitHead":"d24c3de538c8b17bbe85893122e2a5c8ff898902","_id":"dom-factory@1.0.2-beta.1","_npmVersion":"6.5.0","_nodeVersion":"11.4.0","_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"dist":{"integrity":"sha512-hDFf4pGtVO0D8OJ5GzJFrIaD+ulx0w5YkXPEXUiwNLG11o9DuUCoEdPGoc4FTRf/tWty/DtjThP74oE/foHZhA==","shasum":"413b895774c04cd2e13967748e29c3751e6dafb7","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.2-beta.1.tgz","fileCount":17,"unpackedSize":68221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUpsQCRA9TVsSAnZWagAASWAP/R0IlGGbfocD4uOuZ7cm\nQphoi1pPVSdW+cViZpB+/q4lm7SEJLEsxtgnMTKbpFmwI0uVOzu6F29lrglg\n+fjaOU8Cv2XTIVQWSi2CgKXDjy5C45bF1DvwuLMLEaXyBUInSjgFapTspMlS\nabyDulnfWShJnze9ngS0qlBGIVuJnTQeSz/KAijLjFA8krz97cr75Vo+PITD\nJfUJDFm5B6IN4FR6qHtDfrJCZk8sJvjs8g5eGnUWli67aroxZcJNL2oqdoZL\nBYSIX3M2aqlUjR1RIhC+i+pDi5nbAy8XiBOI7zqeHkSP0LazNF9ZenrQyT4n\n+lN4q2y//aljs4289TZaf2aHjcrwDS34mADDYfYe7/ljtdrS1IlT6jp1ges1\n8lP9o2pGpil9IBS59b3D75hfamFPMNb+WP+Thr54HKHCpBAAJSmsGU4xI5vO\n0y5AL2i/gHVKa1Z6Ixsoj8anHpxjQNRDYTQkLNbczQHLGvgYqQsO+JzK4RE2\nOUqGbf/wZ7I+TTsb6SpkQL1rOYXupwo4vKWj4Esrye8HiOf82Xg2t29tdcrI\nsv8ajoj4GgDER26MyC2hEAWKmI0eKSJ9kKORnBFnLB0KP7ai2E41rzH74mKa\njZJbnc1MhosE2W57b5EOg7Vurt84G1tmgMwkNZc68cpz+DzkYGe03C8nPODG\n6KNb\r\n=pSGZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICYj6sp9+uSNjiW2OWz8GrtjGBiNRgqaXEg2aU94T3DjAiEA4Jtufzq+77ygH3p1i5hzp2+W9LkZXx7eun4UdLL7rbw="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory_1.0.2-beta.1_1548917520334_0.4959860498721922"},"_hasShrinkwrap":false},"1.0.2-beta.2":{"name":"dom-factory","version":"1.0.2-beta.2","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"@babel/polyfill":"^7.2.5","core-js":"^2.6.3","cross-env":"^5.2.0","laravel-mix":"^4.0.14","vue-template-compiler":"^2.5.22","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","readme":"# dom-factory\n\n[![npm version](https://badge.fury.io/js/dom-factory.svg)](https://badge.fury.io/js/dom-factory)\n\nThe DOM factory provides a convenient API (inspired by Polymer) to enhance HTML elements with custom behavior, using plain JavaScript objects with advanced features like property change observers, property reflection to attributes on HTML elements and simplify mundane tasks like adding and removing event listeners.\n\n## Compatibility\n\n> Supports the last two versions of every major browser.\n\n- Chrome\n- Safari\n- Firefox\n- IE 11/Edge\n- Opera\n- Mobile Safari\n- Chrome on Android\n\n## Installation\n\n```bash\nnpm install dom-factory\n```\n\n## Usage\n\nThe DOM factory library exports to AMD, CommonJS and global.\n\n### Global\n\n```html\n<script src=\"node_modules/dom-factory/dist/dom-factory.js\"></script>\n<script>\n  var handler = domFactory.handler\n</script>\n```\n\n### CommonJS\n\n```js\nvar handler = require('dom-factory').handler\n```\n\n### ES6\n\n```js\nimport { handler } from 'dom-factory'\n```\n\n### Components\n\nThe following ES6 example, illustrates a component definition for an enhanced button using properties as a public API, property reflection to attributes, property change observers and event listeners.\n\n#### Component definition\n\nA component definition is nothing more than a simple object factory (a function that creates an object) which accepts a `HTMLElement` node as it's argument.\n\n```js\n/**\n * A component definition\n * @return {Object}\n */\nconst buttonComponent = () => ({\n\n  /**\n   * Properties part of the component's public API.\n   * @type {Object}\n   */\n  properties: {\n\n    /**\n     * Maps to [data-a-property=\"value\"] attribute\n     * Also sets a default property value \n     * and updates the attribute on the HTMLElement\n     * @type {Object}\n     */\n    aProperty: {\n      reflectToAttribute: true,\n      value: 'value for aProperty'\n    },\n\n    /**\n     * Maps to [data-b-property] attribute\n     * It removes the attribute when the property value is `false`\n     * @type {Object}\n     */\n    bProperty: {\n      reflectToAttribute: true,\n      type: Boolean\n    },\n\n    /**\n     * Maps to [data-c-property] attribute\n     * It casts the value to a Number\n     * Sets the initial value to 0\n     * @type {Object}\n     */\n    cProperty: {\n      reflectToAttribute: true,\n      type: Number,\n      value: 0\n    }\n  },\n\n  /**\n   * Property change observers.\n   * @type {Array}\n   */\n  observers: [\n    '_onPropertyChanged(aProperty, bProperty)'\n  ],\n\n  /**\n   * Event listeners.\n   * @type {Array}\n   */\n  listeners: [\n    '_onClick(click)'\n  ],\n\n  /**\n   * Property change observer handler\n   * @param  {?}      newValue The new property value\n   * @param  {?}      oldValue The old property value\n   * @param  {String} propName The property name\n   */\n  _onPropertyChanged (newValue, oldValue, propName) {\n    switch (propName) {\n      case 'aProperty':\n        console.log('aProperty has changed', newValue, oldValue)\n        break\n      case 'bProperty':\n        console.log('bProperty has changed', newValue, oldValue)\n        break\n    }\n\n    // access from context, with the new values\n    console.log(this.aProperty, this.bProperty)\n  },\n\n  /**\n   * Click event listener\n   * @param  {MouseEvent} event The Mouse Event\n   */\n  _onClick (event) {\n    event.preventDefault()\n    console.log('The button was clicked!')\n  }\n})\n```\n\n#### Register the component\n\n```js\nhandler.register('my-button', buttonComponent)\n```\n\n#### Initializing\n\nWhen calling the `autoInit()` method, the component handler attempts to self-initialize all registered components which match the component CSS class. The CSS class is computed automatically from the component ID which was provided at registration, prefixed with `js-`.\n\nIn this example, since we registered the `buttonComponent` with a component ID of `my-button`, the handler will try to initialize all the HTML elements which have the `js-my-button` CSS class.\n\n```html\n<button class=\"js-my-button\">Press me</button>\n```\n\n```js\n// Initialize all components on window.DOMContentLoaded and window.load events.\nhandler.autoInit()\n```\n\nYou can also initialize components manually.\n\n```js\n// Initialize all components immediately.\nhandler.upgradeAll()\n\n// Initialize all components on a single element.\nvar myButtonNode = document.querySelector('.js-my-button')\nhandler.upgradeElement(myButtonNode)\n\n// Initialize a single component on a single element.\nhandler.upgradeElement(myButtonNode, 'my-button')\n\n// Upgrade all elements matching a registered component ID.\nhandler.upgrade('my-button')\n```\n\n#### Downgrade\n\nSometimes we need component lifecycle control when integrating with other libraries (Vue.js, Angular, etc).\n\n```js\nvar myButtonNode = document.querySelector('.js-my-button')\nhandler.downgradeElement(myButtonNode)\n```\n\n#### Interact with the component API\n\nWhen the handler initializes a component on a HTML element, a reference to the created component is stored as a property on the HTML element, matching the `camelCase` version of the component ID.\n\n```js\nvar buttonNode = document.querySelector('button')\nvar button = buttonNode.myButton\n```\n\nWe can use this reference to interact with the component's API.\n\n```js\nconsole.log(button.aProperty)\n// => 'value for aProperty'\n```\n\n#### Property reflection to attribute\n\n```js\nbutton.aProperty = 'something else'\nbutton.bProperty = true\nbutton.cProperty = 5\n```\n\nWhen using the `reflectToAttribute: true` property option, the property reflects a string representation of it's value to the corresponding `data-*` attribute on the HTML element using the `dataset` API, which means you can use the HTML element attribute to configure the property value.\n\n#### Casting values\n\nBecause component properties using `reflectToAttribute: true` are using the dataset API, all values are strings by default, but you can cast them to `Boolean` or `Number`.\n\n> Boolean\n\nWhen using a `Boolean` property type and assigning a property value of `true`, the attribute will be created on the HTML element with an empty value and when assigning a property value of `false`, the attribute will be removed from the DOM. \n\nFor example, an attribute with an empty value called `[data-my-boolean-attribute]` will map to `button.myBooleanAttribute`.\n\n```html\n<button data-my-boolean-attribute class=\"js-my-button\">\n  Press me\n</button>\n```\n\n```js\n`console.log(button.myBooleanAttribute) // => true`\n```\n\n> Number\n\nCast the component property value to a `Number` by adding `type: Number` to the property definition. It returns `NaN` when the value is not a valid number.\n\n```js\nbutton.cProperty = '50'\nconsole.log(button.cProperty) // => 50\n\nbutton.cProperty = 'abc'\nconsole.log(button.cProperty) // => NaN\n```\n\n```html\n<button class=\"js-my-button\" \n  data-a-property=\"something else\" \n  data-b-property\n  data-c-property=\"13\">\n  Press me\n</button>\n```\n\n```js\nconsole.log(button.aProperty) // => 'something else'\nconsole.log(button.bProperty) // => true\nconsole.log(button.cProperty) // => 13\n```\n\n#### Destroy\n\nCalling the `destroy` method on the component reference, removes observers and event listeners. Useful before removing the HTML element from the DOM, for example when using libraries like Vue.js or Angular2 where you need to hook into the application lifecycle.\n\n```js\nbutton.destroy()\n```","readmeFilename":"README.md","gitHead":"d24c3de538c8b17bbe85893122e2a5c8ff898902","_id":"dom-factory@1.0.2-beta.2","_nodeVersion":"11.4.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-A64knINOVonSSDFw/ovTXGhZv7CzZDkluSuQR/sqhNFsKkUohrx82wKnmFyGbPULYHwDFkmpOvmK+pgK7wqZgg==","shasum":"fe3d08e1769d3aa218739110790fab0062569968","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.2-beta.2.tgz","fileCount":17,"unpackedSize":68166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXIWECRA9TVsSAnZWagAAXYQP/1RdOuKDSY6VNAk2NqKF\nYNhMFeCR3I6ZcUVwnUlqHpkaijt/twJ1urUuEvUOk6pZgfWqvkTdcnNo/iKF\niBVY/N27gwTpXt6XtT+FEX1Qc3X523vvj152ZxxPVcVvLd0KVVremWHz1OKl\nSX6Os+ff7mBlSiOP+9q7MWr0LafMMmjO1JsjvMk/spXcKvP9fWt9W1d8CRor\nlAkSMY4Lus9J1c5tn7mp/fxhc/5UPwFYbpPB/IoXUAXPlyDjkQp0W79vx81g\n1xAkvB6USqNuo8bAdHm4gNNnRjPR6NOkrCDB+O573uyvRVAUSPLLEWAT/Cd4\n+fuM7TeOilanSm+USZ10wH1ERUaMh14MmLPh6kXM356uNAMw0ktja2NAHysd\ntbzmK2bnI2b2j9f+nUzbME/Fa0f5veo03Py89xxGxINbsdC8PfveTt9cPf57\nGU3n8NLaj/6JJolJpFj5ofT7lD1fnrwe4AXBy5Ya0lwiiOPr2FsfJdgELwnh\n+RxvrSs999do2WuX60nSwxZYTstzTlXymgFGGhgUhxedztGU6ol1gj/YBVIp\nU19KQQ+JnoZULWzDsdS0t4pzYt/P7E6u6HtsZ+EyDZ3bP0wmcy9ORnZF9Trw\nmP0BkrJxcF+awnf40xBCKzDg4djEWD2ktl9ksViK2euTvLmbIqR2gUHY3Xk8\nMWM4\r\n=dtxt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEo8vZOstVYw06CxXmEjCWl6aqIgr/uTD9CPl84PugY6AiEAyv2se+MsHYD4AawV/YtYlWOMdU4PAAhoNVmCiNyyXNk="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory_1.0.2-beta.2_1549567363332_0.7407284307859889"},"_hasShrinkwrap":false},"1.0.2":{"name":"dom-factory","version":"1.0.2","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"@babel/polyfill":"^7.2.5","core-js":"^2.6.3","cross-env":"^5.2.0","laravel-mix":"^4.0.14","vue-template-compiler":"^2.5.22","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","gitHead":"25b10663197e48d0070afb956e49a80628feb4e9","_id":"dom-factory@1.0.2","_nodeVersion":"11.4.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Sdzq0b7gWejDxGY6j6M3ryhcWjS+6+JREQl3ZuVzuqLS+5h32jZgdaYBGG4mYESGDrM3I6BDiEFMe5nLaC3JCA==","shasum":"c2ceedda109c5327b25ffe79fe495ac23232dd06","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.2.tgz","fileCount":17,"unpackedSize":72474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXS87CRA9TVsSAnZWagAAzdAQAKLsR81AEhoeGv8tH7bG\nna/w2NUwFLf7qNqiYQE2ifEAwgks9K0og27khf3QTu/V5XJpbct0d9FYiIx1\nsRfCr3mY9Mg2HXap7e5agJKtkcTNVVNxHBKoS7BUKEpRUggLdrPa9jMQmnOI\n5bAktCpXOytGM1rTprBCtezCCjBt0UqKqt36RSH356YnXC4G2O8jDoGJZBfc\nFaf13FA74LiKa9BE0GthfG9wRr1yjsICSv3FcLSCNsz09+kB+dviMGQSGrhe\nU6mbzXo2TXZ7ILxkGfrF+jHnPSwxYYwgVGQwqVbedc6Q2GAO8QV76ENopzyg\nEUGIItucAncVIgTFwPJGINylllw5Yu3+RTdY8AC5vBKitjsf8xmv1VtEQ99j\nAZkesTOiHH5TrjcPpIWRBTJK87LqghwvRoyQ7v0zwOvKG4J/TO0IRekKGLMn\nI/MzTvyOh+RAxV9IzfcqlDrZRIfbsg9CnAlURnwqD3kQy9EgDWjlbC0e+yLo\nJt7pSMpig0AVD68resKqLA0Pi3L5yhYsUH5AFXEuVmk1a2p6RQM2Ladw4LQ6\ncdjAwQ+vkXc6yIC5fhBWYO5BQczfcyysbvP232npyhK5iqsq2nZjES8UwSLX\nZyMFT85IXOctdQpWnqf7qugFm8n1OlShruzg5TSOaAlA0ySKciQiPkwqzsfx\n6z8R\r\n=8f29\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNB0tAiA2U5QI8tZ/AJcqXXL2g42HmUoBUAJxk8La1mgIgOITXjBLHTps0eRrfG+eXl6vDT1OgRa6kEwrcK2eFlN0="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory_1.0.2_1549610810614_0.38227784791404296"},"_hasShrinkwrap":false},"1.0.3":{"name":"dom-factory","version":"1.0.3","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"development":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","production":"cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js","watch":"cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"},"main":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"@babel/polyfill":"^7.2.5","core-js":"^2.6.3","cross-env":"^5.2.0","laravel-mix":"^4.0.14","vue-template-compiler":"^2.5.22","watch-object":"^1.1.2"},"dependencies":{},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","gitHead":"25b10663197e48d0070afb956e49a80628feb4e9","_id":"dom-factory@1.0.3","_nodeVersion":"11.4.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-8Aa85iDMXlJLzKoZBC0UJZ04gnDc/3D5AgLdiZVAq2NNKxTdEN6qgumyLBOjP6Bx4Yh6Feuj3wh+3MxGvHS7eQ==","shasum":"4e2cd75bee338b08126f8aa241a2c9d992677ab4","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.0.3.tgz","fileCount":17,"unpackedSize":72973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZxeZCRA9TVsSAnZWagAAKkIP+wcM0ZdVOb9Em7DMvkRx\nTeAufJi7HgGp/fLgXdCBZvIn09Wiq7WQSiUi1zaZt+x7IlI6ZbcOHVvh/CPJ\nnxcvUqjcUeflcv6K/2PusAG8rmH43l/BQuvTI1GdQi8VYWYogol5L12rkiBl\nZfmoy7btMI0OA4762IWdYIuEuzy5DZK5dG5GLWBWgitECR31h/d1fwm7ls3W\nM1UXFVAxYooRUOA0b6BdD3ddrscnAHrRXcaIR6PH1y78vTc1X8dCGo7oyYyY\nWTcH/Jo7JGhivp02E68QmlIn7HMeeYc/eCHPbQIdWS2VbBjlLhyWuX0qAiEw\nxiEyKghaXkK/MXQ4Qz9b5Zmo/0+wJGu0g6KaBID16sBE0z7urv6nKH+AvNfI\ngN/FXye+EbT7nVbjcEsD3HBPYly8DkEE9fpGbfYIKqvIURQ+p67mnNRPS/8k\na9i6KKTAi8Pyq2YLWzxST+H11XdmFAppeimoWFlWdAdVDTE7NAUM1gCBoZZL\nLcU8wNe0sN/u8DkDCjZLBuFx2ruVYV2v15Rdt60FBb/80UdfZFa4eGtMPfpN\n1gy14lFn+CxZeGtXFdmACAoS8EFEs6e23TysRJZasG2RO2FJhaNDgP+fX3T3\nlCoakW4r+9LeFRdfuxXvR9mJMFTvedOP26EfzX+bFJ5VCZQWuyOti/QOdkk4\n6sE8\r\n=NhIl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgW0Pw/mC2AdXKM45OctCa9oQfJygYM8d0eyS2Nr9R3QIgLc0+xzBTL6/E/+qrQsB4XMOaf3ygwVKigqzB/sdI8cE="}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory_1.0.3_1550260120542_0.7978346131547258"},"_hasShrinkwrap":false},"1.1.0":{"name":"dom-factory","version":"1.1.0","description":"Enhance HTML elements using plain JavaScript objects.","scripts":{"build":"rollup -c --environment BUILD:production","watch":"rollup -c --watch"},"main":"dist/dom-factory.common.js","module":"dist/dom-factory.esm.js","browser":"dist/dom-factory.js","author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"license":"ISC","devDependencies":{"@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@rollup/plugin-alias":"^3.1.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^15.1.0","@rollup/plugin-node-resolve":"^9.0.0","rollup":"^2.28.2","rollup-plugin-peer-deps-external":"^2.2.0","rollup-plugin-terser":"^7.0.2","watch-object":"^1.1.2"},"dependencies":{"core-js":"^3.6.5"},"keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","gitHead":"50db3861b02f01e81cfacbd0bccd74e999785e50","_id":"dom-factory@1.1.0","_nodeVersion":"12.7.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-rrkHpuaf1U7X0maH78IASDk/PCw5j4WxnjAX3zRkE6iPQCLiDKiRCQVlzVk0tsVqtiRUgkuMf9ebLeSMoMlgLQ==","shasum":"16580480e82479f605be169c7d2d972551ae42cc","tarball":"https://registry.npmjs.org/dom-factory/-/dom-factory-1.1.0.tgz","fileCount":18,"unpackedSize":117515,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfes6NCRA9TVsSAnZWagAAC5UP/j3z65mVaqbR8HqUdPGY\nrJEPo+wmnv7sKIGmX7bEKtOp7W9nXsBXnxZDwrV2+9IVA9BcEs4vs/CdYLpg\nk8YxX3D0mv85/jj3tgkgz6wQNP/EfrotTO+8KNMlFg1slhZAojoHPSNvtU/B\n2jcllS4l07PgEjYhdFxU0W5/87KtH3tftLzvIidpUmNbFvgPsJQ23XaU5RCy\nv1NE1msgYmQ059Zc1TcuuLT/5DLmrNfrcE2dg4aCHh7QsQbKmg9pggJOQNT6\ntxyVMCFfLx4GO0a0ReKp7CVoIfEM5J5TQEB8YZbKfuWZMnhP6oDzwyevPF7l\nUZgFhNW+DL6YKhgCJ7nguCMs7QY6iDdZsMDSJWtEjCikvzxhYcYCU/jQ/ijH\n+fpLp/W/Z1h1/xWVKJyK69o94XicixY8AwKS3EdPM+mncgZy2i2h2pELUcAp\nyu1gDvQn1J60y0h/ML6Wtx/keMBXBarlCNZcPVLMLen1sM6LOFLv2ISQfc0o\nO5m93HMV0C8nMUFxdF1ZrRbuR0Sywp94O70iCZce3yhQHi9RvJ6hF/Lv3jk0\nCKawvTmNMZ0JAW0mfu3oaPgn80UrgoZmyJf0VkNT+/XmUhXuZ9wkWrsvklLp\n9cJl8Dz2INn4IObjzArECY694yOCBfIJiZsovKiIPEKn3EUX71KKoG+MvYGj\n9sch\r\n=9isJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC62e8RtTOm0XMaheSckJkIFfFShLsiC/SmAqaLQGIiWAIhAMuLYSRPaGCXe8J2b88sEgIHi5VAhMoc9kabM6J2vhLV"}]},"maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"_npmUser":{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dom-factory_1.1.0_1601883789295_0.6349881610970975"},"_hasShrinkwrap":false}},"readme":"# dom-factory\n\n[![npm version](https://badge.fury.io/js/dom-factory.svg)](https://badge.fury.io/js/dom-factory)\n\nThe DOM factory provides a convenient API (inspired by Polymer) to enhance HTML elements with custom behavior, using plain JavaScript objects with advanced features like property change observers, property reflection to attributes on HTML elements and simplify mundane tasks like adding and removing event listeners.\n\n## Compatibility\n\n> Supports the last two versions of every major browser.\n\n- Chrome\n- Safari\n- Firefox\n- IE 11/Edge\n- Opera\n- Mobile Safari\n- Chrome on Android\n\n## Installation\n\n```bash\nnpm install dom-factory\n```\n\n## Usage\n\nThe DOM factory library exports to AMD, CommonJS and global.\n\n### Global\n\n```html\n<script src=\"node_modules/dom-factory/dist/dom-factory.js\"></script>\n<script>\n  var handler = domFactory.handler\n</script>\n```\n\n### CommonJS\n\n```js\nvar handler = require('dom-factory').handler\n```\n\n### ES6\n\n```js\nimport { handler } from 'dom-factory'\n```\n\n### Components\n\nThe following ES6 example, illustrates a component definition for an enhanced button using properties as a public API, property reflection to attributes, property change observers and event listeners.\n\n#### Component definition\n\nA component definition is nothing more than a simple object factory (a function that creates an object) which accepts a `HTMLElement` node as it's argument.\n\n```js\n/**\n * A component definition\n * @return {Object}\n */\nconst buttonComponent = () => ({\n\n  /**\n   * Properties part of the component's public API.\n   * @type {Object}\n   */\n  properties: {\n\n    /**\n     * Maps to [data-a-property=\"value\"] attribute\n     * Also sets a default property value \n     * and updates the attribute on the HTMLElement\n     * @type {Object}\n     */\n    aProperty: {\n      reflectToAttribute: true,\n      value: 'value for aProperty'\n    },\n\n    /**\n     * Maps to [data-b-property] attribute\n     * It removes the attribute when the property value is `false`\n     * @type {Object}\n     */\n    bProperty: {\n      reflectToAttribute: true,\n      type: Boolean\n    },\n\n    /**\n     * Maps to [data-c-property] attribute\n     * It casts the value to a Number\n     * Sets the initial value to 0\n     * @type {Object}\n     */\n    cProperty: {\n      reflectToAttribute: true,\n      type: Number,\n      value: 0\n    }\n  },\n\n  /**\n   * Property change observers.\n   * @type {Array}\n   */\n  observers: [\n    '_onPropertyChanged(aProperty, bProperty)'\n  ],\n\n  /**\n   * Event listeners.\n   * @type {Array}\n   */\n  listeners: [\n    '_onClick(click)'\n  ],\n\n  /**\n   * Property change observer handler\n   * @param  {?}      newValue The new property value\n   * @param  {?}      oldValue The old property value\n   * @param  {String} propName The property name\n   */\n  _onPropertyChanged (newValue, oldValue, propName) {\n    switch (propName) {\n      case 'aProperty':\n        console.log('aProperty has changed', newValue, oldValue)\n        break\n      case 'bProperty':\n        console.log('bProperty has changed', newValue, oldValue)\n        break\n    }\n\n    // access from context, with the new values\n    console.log(this.aProperty, this.bProperty)\n  },\n\n  /**\n   * Click event listener\n   * @param  {MouseEvent} event The Mouse Event\n   */\n  _onClick (event) {\n    event.preventDefault()\n    console.log('The button was clicked!')\n  }\n})\n```\n\n#### Register the component\n\n```js\nhandler.register('my-button', buttonComponent)\n```\n\n#### Initializing\n\nWhen calling the `autoInit()` method, the component handler attempts to self-initialize all registered components which match the component CSS class. The CSS class is computed automatically from the component ID which was provided at registration, prefixed with `js-`.\n\nIn this example, since we registered the `buttonComponent` with a component ID of `my-button`, the handler will try to initialize all the HTML elements which have the `js-my-button` CSS class.\n\n```html\n<button class=\"js-my-button\">Press me</button>\n```\n\n```js\n// Initialize all components on window.DOMContentLoaded and window.load events.\nhandler.autoInit()\n```\n\nYou can also initialize components manually.\n\n```js\n// Initialize all components immediately.\nhandler.upgradeAll()\n\n// Initialize all components on a single element.\nvar myButtonNode = document.querySelector('.js-my-button')\nhandler.upgradeElement(myButtonNode)\n\n// Initialize a single component on a single element.\nhandler.upgradeElement(myButtonNode, 'my-button')\n\n// Upgrade all elements matching a registered component ID.\nhandler.upgrade('my-button')\n```\n\n#### Downgrade\n\nSometimes we need component lifecycle control when integrating with other libraries (Vue.js, Angular, etc).\n\n```js\nvar myButtonNode = document.querySelector('.js-my-button')\nhandler.downgradeElement(myButtonNode)\n```\n\n#### Interact with the component API\n\nWhen the handler initializes a component on a HTML element, a reference to the created component is stored as a property on the HTML element, matching the `camelCase` version of the component ID.\n\n```js\nvar buttonNode = document.querySelector('button')\nvar button = buttonNode.myButton\n```\n\nWe can use this reference to interact with the component's API.\n\n```js\nconsole.log(button.aProperty)\n// => 'value for aProperty'\n```\n\n#### Property reflection to attribute\n\n```js\nbutton.aProperty = 'something else'\nbutton.bProperty = true\nbutton.cProperty = 5\n```\n\nWhen using the `reflectToAttribute: true` property option, the property reflects a string representation of it's value to the corresponding `data-*` attribute on the HTML element using the `dataset` API, which means you can use the HTML element attribute to configure the property value.\n\n#### Casting values\n\nBecause component properties using `reflectToAttribute: true` are using the dataset API, all values are strings by default, but you can cast them to `Boolean` or `Number`.\n\n> Boolean\n\nWhen using a `Boolean` property type and assigning a property value of `true`, the attribute will be created on the HTML element with an empty value and when assigning a property value of `false`, the attribute will be removed from the DOM. \n\nFor example, an attribute with an empty value called `[data-my-boolean-attribute]` will map to `button.myBooleanAttribute`.\n\n```html\n<button data-my-boolean-attribute class=\"js-my-button\">\n  Press me\n</button>\n```\n\n```js\n`console.log(button.myBooleanAttribute) // => true`\n```\n\n> Number\n\nCast the component property value to a `Number` by adding `type: Number` to the property definition. It returns `NaN` when the value is not a valid number.\n\n```js\nbutton.cProperty = '50'\nconsole.log(button.cProperty) // => 50\n\nbutton.cProperty = 'abc'\nconsole.log(button.cProperty) // => NaN\n```\n\n```html\n<button class=\"js-my-button\" \n  data-a-property=\"something else\" \n  data-b-property\n  data-c-property=\"13\">\n  Press me\n</button>\n```\n\n```js\nconsole.log(button.aProperty) // => 'something else'\nconsole.log(button.bProperty) // => true\nconsole.log(button.cProperty) // => 13\n```\n\n#### Destroy\n\nCalling the `destroy` method on the component reference, removes observers and event listeners. Useful before removing the HTML element from the DOM, for example when using libraries like Vue.js or Angular2 where you need to hook into the application lifecycle.\n\n```js\nbutton.destroy()\n```","maintainers":[{"name":"lazabogdan","email":"laza.bogdan@macro-net.ro"}],"time":{"modified":"2022-06-15T21:11:21.328Z","created":"2016-06-09T00:32:32.341Z","1.0.0-alpha.1":"2016-06-09T00:32:32.341Z","1.0.0-alpha.2":"2016-06-10T18:36:08.721Z","1.0.0-alpha.3":"2016-06-17T12:46:32.896Z","1.0.0-alpha.4":"2016-11-04T13:07:38.738Z","1.0.0-alpha.5":"2017-03-12T12:01:32.887Z","1.0.0-alpha.6":"2017-07-01T13:11:57.046Z","1.0.0-alpha.7":"2017-10-21T09:13:43.891Z","1.0.0-alpha.8":"2017-12-10T19:00:49.785Z","1.0.0-alpha.9":"2018-01-09T14:28:56.619Z","1.0.0-alpha.10":"2018-01-09T17:57:10.541Z","1.0.0":"2018-08-18T09:48:08.708Z","1.0.1":"2019-01-26T05:23:48.358Z","1.0.2-beta.1":"2019-01-31T06:52:00.471Z","1.0.2-beta.2":"2019-02-07T19:22:43.458Z","1.0.2-beta.3":"2019-02-07T19:51:49.091Z","1.0.2":"2019-02-08T07:26:50.769Z","1.0.3":"2019-02-15T19:48:40.742Z","1.1.0":"2020-10-05T07:43:09.414Z"},"homepage":"https://github.com/FrontendMatter/dom-factory#readme","keywords":["dom","html","factory","javascript","object","htmlelement","component","observer","reflection"],"repository":{"type":"git","url":"git+https://github.com/FrontendMatter/dom-factory.git"},"author":{"name":"Laza Bogdan","email":"laza.bogdan@macro-net.ro"},"bugs":{"url":"https://github.com/FrontendMatter/dom-factory/issues"},"license":"ISC","readmeFilename":"README.md"}