{"_id":"@brikcss/ds-webalias","_rev":"14-48ebf9fbce30bdbcb2ac724572c512eb","name":"@brikcss/ds-webalias","dist-tags":{"latest":"0.3.1","next":"0.3.1"},"versions":{"0.1.0":{"name":"@brikcss/ds-webalias","version":"0.1.0","description":"A DirectScale, Inc. module which turns any site into a replicated site, using the DirectScale webalias.","dependencies":{"@brikcss/element":"^0.1.3","hyperhtml":"^2.25.4"},"devDependencies":{"@babel/plugin-transform-runtime":"^7.3.4","@babel/polyfill":"^7.4.0","@babel/preset-env":"^7.3.4","@brikcss/git-hooks":"^2.1.2","@brikcss/merge":"^1.0.7","browser-sync":"^2.26.3","codacy-coverage":"^3.4.0","coveralls":"^3.0.3","document-register-element":"^1.13.1","jest":"^24.5.0","rollup":"^1.6.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.2.1","rollup-plugin-node-resolve":"^4.0.1","rollup-plugin-terser":"^4.0.4"},"scripts":{"start":"npm run watch","pretest":"npm run build","test":"npx standard && jest --coverage --passWithNoTests","cov":"cat coverage/lcov.info | coveralls && cat coverage/lcov.info | codacy-coverage","build":"npx rollup --config=.rolluprc.js","watch":"npm run build -- --watch & npm run serve","serve":"npx browser-sync start --config .browsersyncrc.js"},"main":"dist/esm/webalias.js","module":"dist/esm/webalias.js","browser":"dist/umd/webalias.js","keywords":["brikcss"],"author":{"name":"Brikcss","url":"https://github.com/brikcss"},"license":"MIT","publishConfig":{"tag":"dev","access":"public"},"gitHead":"dd1e4e3c8f55a63623eef7975b6878b62b8ecafa","_id":"@brikcss/ds-webalias@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"thezimmee","email":"thezimmee@gmail.com"},"dist":{"integrity":"sha512-MR8vARtmMA83I0lBKDmMvQ9eWGx2bgMAxNOzeiXSpMizVhhMEhxOUDcadBgVRsmePOF/UbCmDwCna6f/fOBOZA==","shasum":"1919a3ff97c427eb7793f8ed6eb5352a7ab0b983","tarball":"https://registry.npmjs.org/@brikcss/ds-webalias/-/ds-webalias-0.1.0.tgz","fileCount":11,"unpackedSize":30667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcroIKCRA9TVsSAnZWagAASNAP/0Kw/4hAc5deWi12hDxh\nfvlAlQtY3JSUvca4eo2RzLDRAzBZq4dwchsz79Pg9qvrgYYq2v2g7QDsPhDB\nCvh7fjfHJ7h8LFAOWXqwjaxGRVdGP/xRoy3EAlE6xIG5PZciMZfg0+X+QmoB\nC4LGgM3p46HCJPYJneRTDR+5f4tt231Uwhg21r3c8Y7qSXhK0L9LjnCGlnSy\n3WoouXDpyOt3BlCRAOZTVSyALzc1IgTdjo87YU9cj1rgJX1elN4rZlrkiwfC\nZ5JJ779BCg65kIASY4S4iIl8kl8wVevdvUFJAmemUegeOP1jrT2Z9ZCh5GRd\nKHhUqIlndc7csqS1o3QAahaFvdqh+jCVmEzSOuSkwqxRXUHW3EI4oz4LawDi\nAFKCwAAEk7FpLoKhr3ac0LJrWZ5ZdKPYRYAm/+57n0V2+XeCnYoq4aekQKfa\nNlNmSZQ8m6jjkXOxVqAjpHCJyogAd5kaWT1jcaR8V4J8bjvAG8gPSKTiGpnR\nwyIV9D2HAKLbqsdvj5b0hyoBt91Gv7xBJ08ijHBx1Dgt96UPyuSbUJHf29v3\nid5X13GoaGgYV3dqbGY8//I0kPg6YL4BXFHnKWEUYRgsVCASjaFXxkhTPx+g\nYJfy0x5tfrt8gFKds4JtGqF2DZdIpA03S4CO4Bzdx3MYAR2v08if7hzisHNT\nqsWf\r\n=LCSG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICO/9kic2SRve8IItPmvO+Z/kRLvsqMWVASuJoj6bC59AiBbLcC8zHMFybSWgV5rtfU7IWMM84N4n+YdU+p6JbJVRA=="}]},"maintainers":[{"name":"thezimmee","email":"thezimmee@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ds-webalias_0.1.0_1554940425541_0.5663326655501784"},"_hasShrinkwrap":false},"0.1.1":{"name":"@brikcss/ds-webalias","version":"0.1.1","description":"A DirectScale, Inc. module which turns any site into a replicated site, using the DirectScale webalias.","dependencies":{"@brikcss/element":"^0.1.4","hyperhtml":"^2.25.4"},"devDependencies":{"@babel/plugin-transform-runtime":"^7.3.4","@babel/polyfill":"^7.4.0","@babel/preset-env":"^7.3.4","@brikcss/git-hooks":"^2.1.2","@brikcss/merge":"^1.0.7","browser-sync":"^2.26.3","codacy-coverage":"^3.4.0","coveralls":"^3.0.3","document-register-element":"^1.13.1","jest":"^24.5.0","rollup":"^1.6.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.2.1","rollup-plugin-node-resolve":"^4.0.1","rollup-plugin-terser":"^4.0.4"},"scripts":{"start":"npm run watch","pretest":"npm run build","test":"npx standard && jest --coverage --passWithNoTests","cov":"cat coverage/lcov.info | coveralls && cat coverage/lcov.info | codacy-coverage","build":"npx rollup --config=.rolluprc.js","watch":"npm run build -- --watch & npm run serve","serve":"npx browser-sync start --config .browsersyncrc.js"},"main":"dist/esm/webalias.js","module":"dist/esm/webalias.js","browser":"dist/umd/webalias.js","keywords":["brikcss"],"author":{"name":"Brikcss","url":"https://github.com/brikcss"},"license":"MIT","publishConfig":{"tag":"next","access":"public"},"gitHead":"bd305da1e31f69902a4043ae1fa0ad6a4447eb05","_id":"@brikcss/ds-webalias@0.1.1","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"thezimmee","email":"thezimmee@gmail.com"},"dist":{"integrity":"sha512-VV0kdMCIQMzHD/l0aNwIHOKNluK4bSVU1ANehhpJOFcyqoEA0TR9budAoKfWPNOs6suaw0EP+xWJSBTRSVnKHw==","shasum":"6653b050a43efd8d3711d0ce0591514d6b3c24b7","tarball":"https://registry.npmjs.org/@brikcss/ds-webalias/-/ds-webalias-0.1.1.tgz","fileCount":11,"unpackedSize":30668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcroL3CRA9TVsSAnZWagAA/8sP/2Mi6pX+zMNfNdU0yyj7\ns7WlxcjpiZ74+M7leFJvovIDVU4unsGdRDcosY9u5GXDCQ1xN9/fUxbhj4uA\nHHuERBBtzW6xqPpjxXKvh7i2qGO0ieQuEqNQXcM8U+f3qvEXAWG+R7HbQ9tn\nsfy7rA26JvcyVrdnp1ct0UY53YkYqpdGj4yQprtQr8tD5ibJOI2ne3+8iiCY\nJSXTNE52UyzlPSHF2NtXFX56qX+oZEopo63ZTtmp8QcFsndejBdArpEUM2Nz\nR1VLEXcbcRcmBnwpQxubRMhvTA2cEh+4C1079/ly6KcjqPNMHABBHD+cp2GT\nrdJgeY+8+fLRmV52vOwBABxjNuWDihauCg6NfcEVDWHKvhwDHhmR2VSKiSJ+\ndgto0A0I+lGbfwveAk7cY/Vtz8CiVV2IRBpLJe/gMBvJCP0FAvKDWJDt32qv\nbgt01b0YBq0GUB9G6e28dhs5TypH1KSlB4vAXFD+sKlSt4aLFhY/zbvO1UWi\nqFZ0mmgYjOVPWDwujOtjKPbGYNBPPI+MzID00TVZKzu0/iyMGt0tWlL/F73J\nyeTT9V8U0hkmBAMpL3DEyXJyGKlNBt5dbd8vG9xDexHmCTOO3DbyncHVEKEn\nglrV5aGv1bI3bb7eQ6uAi7oJzLpiRi+kq5UCgocS0bWw0pnFi3whS+YmkgJT\nsPld\r\n=SOWe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPVYF2SFNOxLjOAuWKyzN+KqI4WkKa/hVvdv2EHkW1wAIgREjpO7+5VaB1SkIwiGd05FS/kGvLQbFA23m8OwKXu1I="}]},"maintainers":[{"name":"thezimmee","email":"thezimmee@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ds-webalias_0.1.1_1554940663045_0.21955182717062915"},"_hasShrinkwrap":false},"0.1.2":{"name":"@brikcss/ds-webalias","version":"0.1.2","description":"A DirectScale, Inc. module which turns any site into a replicated site, using the DirectScale webalias.","dependencies":{"@brikcss/element":"^0.1.4","hyperhtml":"^2.25.4"},"devDependencies":{"@babel/plugin-transform-runtime":"^7.3.4","@babel/polyfill":"^7.4.0","@babel/preset-env":"^7.3.4","@brikcss/git-hooks":"^2.1.2","@brikcss/merge":"^1.0.7","browser-sync":"^2.26.3","codacy-coverage":"^3.4.0","coveralls":"^3.0.3","document-register-element":"^1.13.1","jest":"^24.5.0","rollup":"^1.6.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.2.1","rollup-plugin-node-resolve":"^4.0.1","rollup-plugin-terser":"^4.0.4"},"scripts":{"start":"npm run watch","pretest":"npm run build","test":"npx standard && jest --coverage --passWithNoTests","cov":"cat coverage/lcov.info | coveralls && cat coverage/lcov.info | codacy-coverage","build":"npx rollup --config=.rolluprc.js","watch":"npm run build -- --watch & npm run serve","serve":"npx browser-sync start --config .browsersyncrc.js"},"main":"dist/esm/webalias.js","module":"dist/esm/webalias.js","browser":"dist/umd/webalias.js","keywords":["brikcss","webalias","replicate","replication"],"author":{"name":"Brikcss","url":"https://github.com/brikcss"},"homepage":"https://github.com/brikcss/ds-webalias","bugs":{"url":"https://github.com/brikcss/ds-webalias/issues"},"license":"MIT","publishConfig":{"tag":"next","access":"public"},"gitHead":"22bca2edfcd1a1a254083bba7e635fab0e6aacb2","readme":"# DirectScale WebAlias Replication Plugin\n\n<!-- Shields. -->\n<p>\n    <!-- NPM version. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@brikcss/ds-webalias.svg?style=flat-square\"></a>\n    <!-- NPM tag version. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@brikcss/ds-webalias/next.svg?style=flat-square\"></a>\n    <!-- NPM downloads/month. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM downloads per month\" src=\"https://img.shields.io/npm/dm/@brikcss/ds-webalias.svg?style=flat-square\"></a>\n    <!-- Travis branch. -->\n    <a href=\"https://github.com/brikcss/ds-webalias/tree/master\"><img alt=\"Travis branch\" src=\"https://img.shields.io/travis/rust-lang/rust/master.svg?style=flat-square&label=master\"></a>\n    <!-- Codacy. -->\n    <!-- <a href=\"https://www.codacy.com\"><img alt=\"Codacy code quality\" src=\"https://img.shields.io/codacy/grade//master.svg?style=flat-square\"></a> -->\n    <!-- <a href=\"https://www.codacy.com\"><img alt=\"Codacy code coverage\" src=\"https://img.shields.io/codacy/coverage//master.svg?style=flat-square\"></a> -->\n    <!-- Coveralls -->\n    <!-- <a href='https://coveralls.io/github/brikcss/ds-webalias?branch=master'><img src='https://img.shields.io/coveralls/github/brikcss/ds-webalias/master.svg?style=flat-square' alt='Coverage Status' /></a> -->\n    <!-- JS Standard style. -->\n    <a href=\"https://standardjs.com\"><img alt=\"JavaScript Style Guide\" src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square\"></a>\n    <!-- Prettier code style. -->\n    <a href=\"https://prettier.io/\"><img alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"></a>\n    <!-- Semantic release. -->\n    <!-- <a href=\"https://github.com/semantic-release/semantic-release\"><img alt=\"semantic release\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square\"></a> -->\n    <!-- Commitizen friendly. -->\n    <a href=\"http://commitizen.github.io/cz-cli/\"><img alt=\"Commitizen friendly\" src=\"https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square\"></a>\n    <!-- Greenkeeper. -->\n    <a href=\"https://greenkeeper.io/\"><img src=\"https://badges.greenkeeper.io/brikcss/ds-webalias.svg?style=flat-square\" alt=\"Greenkeeper badge\"></a>\n    <!-- MIT License. -->\n    <a href=\"LICENSE.md\"><img alt=\"License\" src=\"https://img.shields.io/npm/l/express.svg?style=flat-square\"></a>\n</p>\n\n## About\n\n<strong><mark>\\[ IMPORTANT \\]: Brikcss follows semantic versioning. Since this package is currently at major version zero, <a href=\"https://semver.org/#spec-item-4\" target=\"_blank\">\"anything may change at any time\", and it \"should not be considered stable\"</a>.</mark></strong>\n\nThis webalias module connects with the DirectScale, Inc. webalias API to help turn any website into a replicated solution. The plugin can either check the URL to auto-detect the webalias and client/company, or they can be manually configured.\n\nThis solution is built on [Brikcss Element](https://github.com/brikcss/element), a native Web Components library.\n\n## Contributing\n\nWe ❤️❤️❤️ contributions of any kind, whether it's bug reports, questions or feature requests, pull requests, and especially spreading some love about this project to your friends and co-workers!\n\n**[Read our contributing guidelines](./CONTRIBUTING.md) and get involved to support this project.**\n\n## Browser Support\\*\n\n| Chrome | Firefox | Safari | Edge | IE     |\n| ------ | ------- | ------ | ---- | ------ |\n| ✓      | ✓       | ✓      | ✓    | 11\\*\\* |\n\n\\*_With the [proper polyfills](#getting-started)._<br>\n\\*\\*_IE11 can be supported with a transpiled build for legacy browsers._\n\n## Install\n\n**From NPM:**\n\n```bash\nnpm install -D @brikcss/ds-webalias\n```\n\n**From GitHub:**\n\nDownload the [latest release](https://github.com/brikcss/ds-webalias/releases/latest).\n\n_Note: File paths are written for NPM installs. If you use the GitHub release, make sure to remove `node_modules/@brikcss/ds-webalias` from any file paths._\n\n## Quick Start\n\nGet up to speed in less than 5 minutes:\n\n1. [Include Web Components polyfills](https://github.com/brikcss/element/blob/master/docs/web-components-polyfills.md).\n\n2. Include the ESM Browser bundle and define your element:\n\n    ```js\n    // app.js\n    import { WebAlias } from 'node_modules/@brikcss/ds-webalias/dist/esm/webalias.browser.js';\n    WebAlias.define('my-element');\n    // or window.customElements.define('my-element', WebAlias)\n    ```\n\n3. Use your element:\n\n    _in HTML:_\n\n    ```html\n    <!-- index.html -->\n    <my-element prop=\"name\" before=\"Hello, \" after=\"!\"></my-element>\n    ```\n\n    If the webalias user's name is \"John Doe\", the UI will display _\"Hello, John Doe!\"_.\n\n    _in JS:_\n\n    ```js\n    console.log(WebAlias.user.name); // John Doe\n    ```\n\n4. Tada! It should work!\n\n    _Important: While the Browser ESM bundle works great for rapid development and prototyping, there is a limit to its browser support. Once your app is ready for production, it is recommended to replace the Browser ESM with the Vanilla ESM and [include it to your build](https://github.com/brikcss/element/blob/master/docs/including-brikcss-modules.md)._\n\n## API\n\n### `WebAlias.webalias`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nThe webalias passed to the webalias API. This -- along with the `WebAlias.client` and `WebAlias.env` properties -- will return the [webalias user](#webaliasuser).\n\n### `WebAlias.client`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nThe client ID passed to the webalias API.\n\n### `WebAlias.env`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nEnvironment to use. Can be `dev`, `stage`, or `''` (live). This determines which database is checked.\n\n### `WebAlias.sourceUrl`\n\n_Type: `String` Default: `https://${WebAlias.webalias}.${WebAlias.client}.directscale${WebAlias.env}.com`_\n\nPassed in the headers (as the `ApplicationUrl` parameter) to the webalias API.\n\n### `WebAlias.disableUrlCheck`\n\n_Type: `Boolean` Default: `false`_\n\nSet `true` to disable checking the URL for `webalias` and `client`. Use this to manually set the `webalias` and `client`.\n\n### `WebAlias.user`\n\n_Type: `Object` Default: `undefined`_\n\nThe webalias user, returned by DirectScale's replicated site webalias API. Its properties include:\n\n-   `first` _{String}_: First name.\n-   `last` _{String}_: Last name.\n-   `name` _{String}_: First and last name.\n-   `email` _{String}_: Email address.\n-   `phone` _{String}_: Alias for `phone1`.\n-   `phone1` _{String}_: Phone 1.\n-   `phone2` _{String}_: Phone 2.\n-   `city` _{String}_: City.\n-   `state` _{String}_: State.\n-   `country` _{String}_: Country.\n-   `about` _{String}_: About the user.\n-   `company` _{String}_: Company.\n-   `language` _{String}_: Language.\n-   `imageUrl` _{String}_: URL for user's profile image.\n-   `image` _{String}_: User's profile `<img />`.\n-   `imageData` _{String}_: Image data.\n-   `facebook` _{String}_: Facebook handle.\n-   `twitter` _{String}_: Twitter handle.\n-   `pinterest` _{String}_: Pinterest handle.\n-   `youTube` _{String}_: YouTube handle.\n-   `linkedIn` _{String}_: LinkedIn handle.\n-   `enrollmentUrl` _{String}_: URL to user's enrollment site.\n-   `officeUrl` _{String}_: URL to user's back office.\n-   `shoppingUrl` _{String}_: URL to user's shopping site.\n-   `replicatedSiteUrl` _{String}_: URL to user's replicated site.\n-   `webalias` _{String}_: User's webalias.\n-   `customerId` _{String}_: User's customer ID.\n-   `backOfficeId` _{String}_: User's back office ID.\n-   `customerTypeId` _{String}_: User's customer type ID.\n-   `status` _{String}_: User status.\n\n## License\n\n[See License](LICENSE.md).\n","readmeFilename":"README.md","_id":"@brikcss/ds-webalias@0.1.2","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"thezimmee","email":"thezimmee@gmail.com"},"dist":{"integrity":"sha512-aAaX5TPmq8GQVPmRHlBzqr4C+tnGufnf3rGJZrR8N1D6m3k2VEfmzR2R9eco1sjel7SxYV8lM/TwWbOo+0f5Mw==","shasum":"7e265bec5d55d25deb77063fc8412c04c7f750e8","tarball":"https://registry.npmjs.org/@brikcss/ds-webalias/-/ds-webalias-0.1.2.tgz","fileCount":11,"unpackedSize":30837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrsWxCRA9TVsSAnZWagAAFM8P/AtDHbF/l+4v7Ro2B45Y\nDFgs1H7XAHr1NXR0QbVbn15M+jqLwWa+WZg6rsi4l7d9tJN64yQdLuA1N8ez\nZ/1ul5BBSl6bevQ4ZfXA9pvZdIysP+CaJnEgXAQTw6bbV/80sGa2iyiosQxJ\nHo0Tv/VfoyjPmayIozICP8QH7LvEcYbZPxnZ/nEXIbt6em/zi1swvuwJJgEW\nRvJFmKvScxr/doSAYcFqDMDP668gCfz5xQV+EH6tuB/06yeKjS0LG6HotUO9\nlo/ZOupENGDxcon5HdAE4w6HvfwaV5qGhVXBw2LdURsmAumJeDd0sDUkZpmf\nyhnd+qKv1qE9l832sO1pik2/7fFCmmkn1HRIlmpTz18QpwP6sNt73NiTw5qZ\nFpGQnoyPt7GUBjazjHetYVlu1DQajIMgj+bap1XFL+aDVtgDHfrkrK70y5LO\n3RglUfrZqEOwj/hRs3kBBiqbpUavTyx6fXLGhYFiKYJnNUbgCBOka9KEaQtw\nVUNt2p6H9r0ZIjP8tNeDlL9lLUso2bnL7F3qk1pDurViD1yAKHXZV9Qtdxum\nc7PAxn+QSvA6ZYmzs4bUZbRMHBUsVS7FFitbnMCL3M5ULraGhXsgM6gYT3v3\nUmRc0EiwEmUqSzudzZZ6i6jOKEN8Bk+aJ4eLYnMwEUtgktu5hPL3uwKKpQjv\nNYX8\r\n=WtPq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHtgd4lKBwhtLsNax8VXZwJEp68ilah869XsxxnMCTu1AiEAv1HsMmuMft+ENB6A3bcoTU+mqetpiKUIA8BuvO8/hes="}]},"maintainers":[{"name":"thezimmee","email":"thezimmee@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ds-webalias_0.1.2_1554957744458_0.3832833165451648"},"_hasShrinkwrap":false},"0.1.3":{"name":"@brikcss/ds-webalias","version":"0.1.3","description":"A DirectScale, Inc. module which turns any site into a replicated site, using the DirectScale webalias.","dependencies":{"@brikcss/element":"^0.1.4","hyperhtml":"^2.25.4"},"devDependencies":{"@babel/plugin-transform-runtime":"^7.3.4","@babel/polyfill":"^7.4.0","@babel/preset-env":"^7.3.4","@brikcss/git-hooks":"^2.1.2","@brikcss/merge":"^1.0.7","browser-sync":"^2.26.3","codacy-coverage":"^3.4.0","coveralls":"^3.0.3","document-register-element":"^1.13.1","jest":"^24.5.0","rollup":"^1.6.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.2.1","rollup-plugin-node-resolve":"^4.0.1","rollup-plugin-terser":"^4.0.4"},"scripts":{"start":"npm run watch","pretest":"npm run build","test":"npx standard && jest --coverage --passWithNoTests","cov":"cat coverage/lcov.info | coveralls && cat coverage/lcov.info | codacy-coverage","build":"npx rollup --config=.rolluprc.js","watch":"npm run build -- --watch & npm run serve","serve":"npx browser-sync start --config .browsersyncrc.js"},"main":"dist/esm/webalias.js","module":"dist/esm/webalias.js","browser":"dist/umd/webalias.js","keywords":["brikcss","webalias","replicate","replication"],"author":{"name":"Brikcss","url":"https://github.com/brikcss"},"homepage":"https://github.com/brikcss/ds-webalias","bugs":{"url":"https://github.com/brikcss/ds-webalias/issues"},"license":"MIT","publishConfig":{"tag":"next","access":"public"},"gitHead":"7884992ddd7413fdc5ea0f3e8703cdf3816f1998","readme":"# DirectScale WebAlias Replication Plugin\n\n<!-- Shields. -->\n<p>\n    <!-- NPM version. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@brikcss/ds-webalias.svg?style=flat-square\"></a>\n    <!-- NPM tag version. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@brikcss/ds-webalias/next.svg?style=flat-square\"></a>\n    <!-- NPM downloads/month. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM downloads per month\" src=\"https://img.shields.io/npm/dm/@brikcss/ds-webalias.svg?style=flat-square\"></a>\n    <!-- Travis branch. -->\n    <a href=\"https://github.com/brikcss/ds-webalias/tree/master\"><img alt=\"Travis branch\" src=\"https://img.shields.io/travis/rust-lang/rust/master.svg?style=flat-square&label=master\"></a>\n    <!-- Codacy. -->\n    <!-- <a href=\"https://www.codacy.com\"><img alt=\"Codacy code quality\" src=\"https://img.shields.io/codacy/grade//master.svg?style=flat-square\"></a> -->\n    <!-- <a href=\"https://www.codacy.com\"><img alt=\"Codacy code coverage\" src=\"https://img.shields.io/codacy/coverage//master.svg?style=flat-square\"></a> -->\n    <!-- Coveralls -->\n    <!-- <a href='https://coveralls.io/github/brikcss/ds-webalias?branch=master'><img src='https://img.shields.io/coveralls/github/brikcss/ds-webalias/master.svg?style=flat-square' alt='Coverage Status' /></a> -->\n    <!-- JS Standard style. -->\n    <a href=\"https://standardjs.com\"><img alt=\"JavaScript Style Guide\" src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square\"></a>\n    <!-- Prettier code style. -->\n    <a href=\"https://prettier.io/\"><img alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"></a>\n    <!-- Semantic release. -->\n    <!-- <a href=\"https://github.com/semantic-release/semantic-release\"><img alt=\"semantic release\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square\"></a> -->\n    <!-- Commitizen friendly. -->\n    <a href=\"http://commitizen.github.io/cz-cli/\"><img alt=\"Commitizen friendly\" src=\"https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square\"></a>\n    <!-- Greenkeeper. -->\n    <a href=\"https://greenkeeper.io/\"><img src=\"https://badges.greenkeeper.io/brikcss/ds-webalias.svg?style=flat-square\" alt=\"Greenkeeper badge\"></a>\n    <!-- MIT License. -->\n    <a href=\"LICENSE.md\"><img alt=\"License\" src=\"https://img.shields.io/npm/l/express.svg?style=flat-square\"></a>\n</p>\n\n## About\n\n<strong><mark>\\[ IMPORTANT \\]: Brikcss follows semantic versioning. Since this package is currently at major version zero, <a href=\"https://semver.org/#spec-item-4\" target=\"_blank\">\"anything may change at any time\", and it \"should not be considered stable\"</a>.</mark></strong>\n\nThis webalias module connects with the DirectScale, Inc. webalias API to help turn any website into a replicated solution. The plugin can either check the URL to auto-detect the webalias and client/company, or they can be manually configured.\n\nThis solution is built on [Brikcss Element](https://github.com/brikcss/element), a native Web Components library.\n\n## Contributing\n\nWe ❤️❤️❤️ contributions of any kind, whether it's bug reports, questions or feature requests, pull requests, and especially spreading some love about this project to your friends and co-workers!\n\n**[Read our contributing guidelines](./CONTRIBUTING.md) and get involved to support this project.**\n\n## Browser Support\\*\n\n| Chrome | Firefox | Safari | Edge | IE     |\n| ------ | ------- | ------ | ---- | ------ |\n| ✓      | ✓       | ✓      | ✓    | 11\\*\\* |\n\n\\*_With the [proper polyfills](#getting-started)._<br>\n\\*\\*_IE11 can be supported with a transpiled build for legacy browsers._\n\n## Install\n\n**From NPM:**\n\n```bash\nnpm install -D @brikcss/ds-webalias\n```\n\n**From GitHub:**\n\nDownload the [latest release](https://github.com/brikcss/ds-webalias/releases/latest).\n\n_Note: File paths are written for NPM installs. If you use the GitHub release, make sure to remove `node_modules/@brikcss/ds-webalias` from any file paths._\n\n## Quick Start\n\nGet up to speed in less than 5 minutes:\n\n1. [Include Web Components polyfills](https://github.com/brikcss/element/blob/master/docs/web-components-polyfills.md).\n\n2. Include the ESM Browser bundle and define your element:\n\n    ```js\n    // app.js\n    import { WebAlias } from 'node_modules/@brikcss/ds-webalias/dist/esm/webalias.browser.js';\n    WebAlias.define('my-element');\n    // or window.customElements.define('my-element', WebAlias)\n    ```\n\n3. Use your element:\n\n    _in HTML:_\n\n    ```html\n    <!-- index.html -->\n    <my-element prop=\"name\" before=\"Hello, \" after=\"!\"></my-element>\n    ```\n\n    If the webalias user's name is \"John Doe\", the UI will display _\"Hello, John Doe!\"_.\n\n    _in JS:_\n\n    ```js\n    console.log(WebAlias.user.name); // John Doe\n    ```\n\n4. Tada! It should work!\n\n    _Important: While the Browser ESM bundle works great for rapid development and prototyping, there is a limit to its browser support. Once your app is ready for production, it is recommended to replace the Browser ESM with the Vanilla ESM and [include it to your build](https://github.com/brikcss/element/blob/master/docs/including-brikcss-modules.md)._\n\n## API\n\n### `WebAlias.webalias`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nThe webalias passed to the webalias API. This -- along with the `WebAlias.client` and `WebAlias.env` properties -- will return the [webalias user](#webaliasuser).\n\n### `WebAlias.client`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nThe client ID passed to the webalias API.\n\n### `WebAlias.env`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nEnvironment to use. Can be `dev`, `stage`, or `''` (live). This determines which database is checked.\n\n### `WebAlias.sourceUrl`\n\n_Type: `String` Default: `https://${WebAlias.webalias}.${WebAlias.client}.directscale${WebAlias.env}.com`_\n\nPassed in the headers (as the `ApplicationUrl` parameter) to the webalias API.\n\n### `WebAlias.disableUrlCheck`\n\n_Type: `Boolean` Default: `false`_\n\nSet `true` to disable checking the URL for `webalias` and `client`. Use this to manually set the `webalias` and `client`.\n\n### `WebAlias.user`\n\n_Type: `Object` Default: `undefined`_\n\nThe webalias user, returned by DirectScale's replicated site webalias API. Its properties include:\n\n-   `first` _{String}_: First name.\n-   `last` _{String}_: Last name.\n-   `name` _{String}_: First and last name.\n-   `email` _{String}_: Email address.\n-   `phone` _{String}_: Alias for `phone1`.\n-   `phone1` _{String}_: Phone 1.\n-   `phone2` _{String}_: Phone 2.\n-   `city` _{String}_: City.\n-   `state` _{String}_: State.\n-   `country` _{String}_: Country.\n-   `about` _{String}_: About the user.\n-   `company` _{String}_: Company.\n-   `language` _{String}_: Language.\n-   `imageUrl` _{String}_: URL for user's profile image.\n-   `image` _{String}_: User's profile `<img />`.\n-   `imageData` _{String}_: Image data.\n-   `facebook` _{String}_: Facebook handle.\n-   `twitter` _{String}_: Twitter handle.\n-   `pinterest` _{String}_: Pinterest handle.\n-   `youTube` _{String}_: YouTube handle.\n-   `linkedIn` _{String}_: LinkedIn handle.\n-   `enrollmentUrl` _{String}_: URL to user's enrollment site.\n-   `officeUrl` _{String}_: URL to user's back office.\n-   `shoppingUrl` _{String}_: URL to user's shopping site.\n-   `replicatedSiteUrl` _{String}_: URL to user's replicated site.\n-   `webalias` _{String}_: User's webalias.\n-   `customerId` _{String}_: User's customer ID.\n-   `backOfficeId` _{String}_: User's back office ID.\n-   `customerTypeId` _{String}_: User's customer type ID.\n-   `status` _{String}_: User status.\n\n## License\n\n[See License](LICENSE.md).\n","readmeFilename":"README.md","_id":"@brikcss/ds-webalias@0.1.3","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"thezimmee","email":"thezimmee@gmail.com"},"dist":{"integrity":"sha512-vpE3yXbQUBlxjl/w0nJNlXUCUfQnSR7t0c9+pPHz7eVEafsi1O8ZcblUR0D2YO34knBD92+40v5AKy5bgVTmOQ==","shasum":"25862914a3ce619f6f7240eddb77f1e9aac3f758","tarball":"https://registry.npmjs.org/@brikcss/ds-webalias/-/ds-webalias-0.1.3.tgz","fileCount":11,"unpackedSize":30837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrtFJCRA9TVsSAnZWagAAcRoP/1OALBvrc9jJuHB+2mCD\nh5LrZSP+2Vd6SOzCBup4oKht7Gv9QgF+03tk306cdAjEW3MtlXGp0p2RRSap\nVmwsvfPlA0xsLeTp1ofgjUMN1iW8Ha2ApGttvKyabcNjS6AAG2+Kgec3FHDu\np/Cp2jX4ZAgOQzwMV/Lcvf4h2TUi4dxYp9hkYFxDx3yR7ck0OwAafSpHSuDZ\n02KQUHQdmOTNthGWyyilv0Su8r6c4ViiPIrshjo/fk1hpXFeDEBhlSxlCs7f\nZPqGAVqXxwxxDQEKooPrSo9CwszLo1i4vbrXq0fOG3kQvHlXiMKVajmtr2qv\nRlhsJoMb+oPp0D2F5LerZ5DRXM9rwJo7XTwRND4vNz1aO8H60NV41iHVtB9L\nwVFeSJVXx6ewziCe10FWK+H/CRjMFHDWMKI0orFVo4mKk1bRuKQ1Fm3ZsPcJ\nru3grTXAAmYIXhaI6lBTNQdR8PU/6DbWyT5uLpI3q843vfzL22E7KfED6YC5\nEUEVzVQSHGTPxuQvi5Stcb2QVash+Iz37fJ0g2Z/SDJbHWpcd+3dDbU4HHMt\nzBVWI6DyPNAjecWIX+2I1HGfrCEotu3cbRnXiMGGekRO6LoVB1faQIsaB5DG\nBbFJHrxPNSUjnKCsyS8toNFCqOivRq/WJJhLFp+O+D01T9ToYbBr5wMSSQI6\nObVu\r\n=LPZ2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2L3nRIf6MFDYd6uzxOOtNfYF287F37XccbBrXW/1MFQIgKJoBwpj17GjSqbA7VkEiC15dfHX8y5JR9vRoisT/zHI="}]},"maintainers":[{"name":"thezimmee","email":"thezimmee@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ds-webalias_0.1.3_1554960712622_0.1410055690157428"},"_hasShrinkwrap":false},"0.2.0":{"name":"@brikcss/ds-webalias","version":"0.2.0","description":"A DirectScale, Inc. module which turns any site into a replicated site, using the DirectScale webalias.","dependencies":{"@brikcss/element":"^0.1.4","hyperhtml":"^2.25.4"},"devDependencies":{"@babel/plugin-transform-runtime":"^7.3.4","@babel/polyfill":"^7.4.0","@babel/preset-env":"^7.3.4","@brikcss/git-hooks":"^2.1.2","@brikcss/merge":"^1.0.7","browser-sync":"^2.26.5","codacy-coverage":"^3.4.0","coveralls":"^3.0.3","document-register-element":"^1.13.1","jest":"^24.5.0","rimraf":"^2.6.3","rollup":"^1.6.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.2.1","rollup-plugin-node-resolve":"^4.0.1","rollup-plugin-terser":"^4.0.4"},"scripts":{"start":"npm run watch","pretest":"npm run build","test":"standard && jest --coverage --passWithNoTests","cov":"cat coverage/lcov.info | coveralls && cat coverage/lcov.info | codacy-coverage","prebuild":"rimraf esm umd dist","build":"rollup --config=.rolluprc.js","watch":"npm run build -- --watch & npm run serve","serve":"browser-sync start --config .browsersyncrc.js"},"main":"dist/esm/webalias.js","module":"dist/esm/webalias.js","browser":"dist/esm/webalias.browser.js","umd":"dist/umd/webalias.js","keywords":["brikcss","webalias","replicate","replication"],"author":{"name":"Brikcss","url":"https://github.com/brikcss"},"homepage":"https://github.com/brikcss/ds-webalias","bugs":{"url":"https://github.com/brikcss/ds-webalias/issues"},"license":"MIT","publishConfig":{"tag":"next","access":"public"},"gitHead":"38a72229ca70db0c97b7584e51d3407d9ec579f8","_id":"@brikcss/ds-webalias@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"thezimmee","email":"thezimmee@gmail.com"},"dist":{"integrity":"sha512-0fHfXSUEMwgw9T248YvbIWRDUqBlQoB+SQJHqL5F9rea0DUa8OXXbNW2kxyQHH3pr5ABI6T7YFwcbV834ABWeg==","shasum":"8e6b1857ffcc5ce7f6606e299f2c8c4bfc62f71a","tarball":"https://registry.npmjs.org/@brikcss/ds-webalias/-/ds-webalias-0.2.0.tgz","fileCount":17,"unpackedSize":89341,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5HyOCRA9TVsSAnZWagAAh/UP/j3QDP/aAjd2qpieiCB2\np+5SksWCjVk/F60nok+jN7Fm730hy02O+xxiYOjrle8tzuyLt6bTsorL9kCU\ntiAeSuuMZrp9v5qQLuvbWVs740TIbv8HtAU005QvRG/vvGDAe3FhfaiuMEfC\neccK1XlrpfFw0GFHokYUCazOkeGoYlvvrMKuzyddClP6Kr/YvytRY55myuv/\n1MuLD9a8UQXmoTw7Pa2wag2Mv7U6ZP8Ue1MbpNUdpnqpyI13jXAgT48Kdwox\nZ7ZXXcEfjMKY1CBofv8yDdDNbiKGgwtac/6cNBvMkhVtxrp9PgbmMwH4bjM2\nyJe/GLeCnNTl2pLVtBu+AZJwtTNI4vJoZIpqMot8vzCW0QuhEXx6J7UILQHm\nxxxFbqZO/bXhGAlL6lREmNxHfBNXSrrhP4tnlQb7KX3mOPpjbES/QFp6G+hC\nquDnV0ahGIw3Al4evhr6X5NQuJNf+ytgqfI/JnTeIsTz9PrA8f/o+IK7U9bA\nNNI/jdAH4jThRdL1YwxIlzh81dsEqlftV94Tw0JKmGS+Rg5r7719U6wX5PRL\n2cZ183Q5pCrccChBaiBJCUAi3/71PbAFuOBwFsMoRt/BbzADORC9VfU5qIMo\nNQG4fsel44nty4+NA+hEBAoew9ZBunZE3bxMHm3xk1UZ0RLwaVG+9jKagmvZ\n/bJY\r\n=NCph\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBBZX68a4FWGeNJPl5Vteb2rLqnaZkYVHoIbCWtODPeWAiEAsj39GYVkg6Tx/j6Tc1fttIWrPhMEz00YJhBS/GWHxQc="}]},"maintainers":[{"name":"thezimmee","email":"thezimmee@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ds-webalias_0.2.0_1558477965256_0.07934012369463717"},"_hasShrinkwrap":false},"0.2.1":{"name":"@brikcss/ds-webalias","version":"0.2.1","description":"A DirectScale, Inc. module which turns any site into a replicated site, using the DirectScale webalias.","dependencies":{"@brikcss/element":"^0.1.5","hyperhtml":"^2.27.0"},"devDependencies":{"@babel/plugin-transform-runtime":"^7.4.4","@babel/polyfill":"^7.4.4","@babel/preset-env":"^7.4.5","@brikcss/git-hooks":"^2.2.1","@brikcss/merge":"^1.0.7","@brikcss/rollup-config-generator":"0.0.3","browser-sync":"^2.26.5","codacy-coverage":"^3.4.0","coveralls":"^3.0.3","document-register-element":"^1.13.2","jest":"^24.8.0","rimraf":"^2.6.3","rollup":"^1.12.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.0","rollup-plugin-terser":"^5.0.0"},"scripts":{"start":"npm run watch","pretest":"npm run build","test":"standard && jest --coverage --passWithNoTests","cov":"cat coverage/lcov.info | coveralls && cat coverage/lcov.info | codacy-coverage","prebuild":"rimraf esm umd dist","build":"rollup --config=.rolluprc.js","watch":"npm run build -- --watch & npm run serve","serve":"browser-sync start --config .browsersyncrc.js"},"main":"dist/esm/webalias.js","module":"dist/esm/webalias.js","browser":"dist/esm/webalias.browser.js","umd":"dist/umd/webalias.js","keywords":["brikcss","webalias","replicate","replication"],"author":{"name":"Brikcss","url":"https://github.com/brikcss"},"homepage":"https://github.com/brikcss/ds-webalias","bugs":{"url":"https://github.com/brikcss/ds-webalias/issues"},"license":"MIT","publishConfig":{"tag":"next","access":"public"},"gitHead":"0cd48d4d2436d315b90930a8eb4dcb9be924261e","_id":"@brikcss/ds-webalias@0.2.1","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"thezimmee","email":"thezimmee@gmail.com"},"dist":{"integrity":"sha512-9EzdAPnpC8jJ1iOKccMKEjw4YRD8Vk+ctqKXCqUq/qLUj33MVE8eIX+awok4gGH4/Lr8bBResDfw0Us0rARD0A==","shasum":"fc185cd546be36f9038ad808d117d0afe86e0a19","tarball":"https://registry.npmjs.org/@brikcss/ds-webalias/-/ds-webalias-0.2.1.tgz","fileCount":17,"unpackedSize":92572,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5p3qCRA9TVsSAnZWagAAUpMP/i4+arX/GXXehQDnxlM/\nwWXS5UrlhYuwmBsPxsIzL5PuOUhRsoLxHeLJtrprmkv6yUn0eGpCzuWresoH\n+d90ebBw/Ushmku5wCgonQbsnXyaP+LC4OtaiRUnpiT/Kfvj7b9pJY9jUf8N\nrophF7a9EztXnOq7qUomwIoGv7LYUUU6bRAs0vbwMjSQufbPDf/P0drtsBIj\n52TFm5t9kXJWs4hDl2toyeNMHprFWoeW78in/Kray8Q53a0aaTTB4/3uoYa5\nDzU3nmCQkdRPRm6dda9EALdCP2XOaHvh1oCTjRQXFNN9SKJVL6aHlEyMULVW\nwLGR5wgJ1Q0ioszPVNtC6xA/0RC3iviEYHMq0JDgVbG9CczOyZhSvVffuddH\nXp9zI8vxPJRpiZ72vTUOl3UtYtdu7UctQsN9LXQm43guhF0H+WJhjR3P1OHp\nJGOC+WMTroPwl+wARUt63Ys8rJz2gW/8d0UpKwKhPDrgKLAfR92Do+gDsJTA\nmj5TYF9Wr+8iUriswxeYMJs8q2ci7ECnai9rEPcgBtEp+ODJGTB57EsRFpD/\n1T3MCyTO/8Hjz4lpnLj8jSUhmeUXyBtPmISnj/lTtNR+LxoFh1gN0sXiXkRT\nethv9lT4x2zJMfQsYUBAeqpHS2k6gWs3odyZDzz8qgJO/QY/XT61kXMu86I6\n4bua\r\n=9dli\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIER9cWHCXAl2wcby+HG7qxuQzl9Q3AQaTSbXJ2sGlMxZAiAH/2tQ1bTOT0UZL6rJhHqIhlx+AY06hwNtnsTIUKjh9g=="}]},"maintainers":[{"name":"thezimmee","email":"thezimmee@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ds-webalias_0.2.1_1558617578314_0.8926809909288393"},"_hasShrinkwrap":false},"0.3.0":{"name":"@brikcss/ds-webalias","version":"0.3.0","description":"A DirectScale, Inc. module which turns any site into a replicated site, using the DirectScale webalias.","dependencies":{"@brikcss/element":"^0.1.5","lighterhtml":"^0.12.0"},"devDependencies":{"@babel/plugin-transform-runtime":"^7.4.4","@babel/polyfill":"^7.4.4","@babel/preset-env":"^7.4.5","@brikcss/git-hooks":"^2.2.1","@brikcss/merge":"^1.2.1","@brikcss/rollup-config-generator":"0.0.14","browser-sync":"^2.26.5","codacy-coverage":"^3.4.0","coveralls":"^3.0.3","document-register-element":"^1.13.2","jest":"^24.8.0","rimraf":"^2.6.3","rollup":"^1.13.1","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0"},"scripts":{"start":"npm run watch","pretest":"npm run build","test":"standard && jest --coverage --passWithNoTests","cov":"cat coverage/lcov.info | coveralls && cat coverage/lcov.info | codacy-coverage","prebuild":"rimraf esm umd dist","build":"rollup --config=.rolluprc.js","watch":"npm run build -- --watch & npm run serve","serve":"browser-sync start --config .browsersyncrc.js"},"main":"dist/esm/webalias.js","module":"dist/esm/webalias.js","browser":"dist/esm/webalias.browser.js","umd":"dist/umd/webalias.js","keywords":["brikcss","webalias","replicate","replication"],"author":{"name":"Brikcss","url":"https://github.com/brikcss"},"homepage":"https://github.com/brikcss/ds-webalias","bugs":{"url":"https://github.com/brikcss/ds-webalias/issues"},"license":"MIT","publishConfig":{"tag":"next","access":"public"},"gitHead":"f2d902cff5dde1eb4d20b37ed939dd6f90341c7f","_id":"@brikcss/ds-webalias@0.3.0","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"thezimmee","email":"thezimmee@gmail.com"},"dist":{"integrity":"sha512-erg0rWwhJbxxVgQQAsAbHIumStphlA+lced2bldvqhyvFchcMnyuNixoJ/gIlEroTv/hZtSJGlRiCiQW7Bboxw==","shasum":"ccf35ae2a2ad5e3af19c6ce8f9abf762b518edd4","tarball":"https://registry.npmjs.org/@brikcss/ds-webalias/-/ds-webalias-0.3.0.tgz","fileCount":14,"unpackedSize":85597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9TcGCRA9TVsSAnZWagAA8KAP/iZIPeaSgJMATuFuOi/q\nrntofU4eYifSbH79kCij8cPgDXnJ2yTQ/Xfb0EHF2KiWzHnBvwAoiaZjV5tb\niXdcZkhQ9E5WU5AtUoNIWDeCUIr7x1Izhh9FmP3rtkCWKvv1aNn2r6CXHP3s\n4DW48nemU5vLxshGgYfrY+SHGhNTBFz9jGmKQXZ37ktpJyhRX9Mb95zA43D8\nnITNF7tXekSRFjIxjrieRvjPm4lqjtWcKRunRs9lLbed1brDEnOF9GhCcE7H\nL7+hlSzg8H/A3goNPa0mPc1OiaWpqVwonF458ovoz/3ZABZMbNv99vD+eMwN\nXVvFa/ORYabGk86JEmXzVq+8YJqd4C+SW2fOmCWapAd46XoEZsvGrDKsjUEP\npoQwPBpvP1nZk5LjNKbDV3DihYBWYJJhjnqmd/yNVgMjE9yqQWNw79UZkFtE\nUWQQ2aPC4y8DGDpaiIPCYjqD5DXKoPyTZ1rPnxklqFTQXUd+/vkKlAOzPCTA\nOjRFDuiMi2tCxTe3WGZfr4vFgR1IhCfNvQ3aTssBRHmuAJZv95Y9eMzp8yVL\nCM893G+Cqo5QxjKZQC0HVsccB1fpDrM3fPJBEF13oHBXKbjYFzokTwXV4Il6\nArhYB5ewsH+7xS5CcdzWDkAAR63K0JV6xVWhu6+cW8Sk86TbyZajOdw2B49r\n6jhD\r\n=fJZ7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBOEQ9Eq24Hgk70H+zAld/dO8ixXM91H0nKqTrJWJ6OJAiBDh2guHKC363sbdwc8gIZMyx7BO03BDJoisjv8aAHidQ=="}]},"maintainers":[{"name":"thezimmee","email":"thezimmee@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ds-webalias_0.3.0_1559574278016_0.9122921230721233"},"_hasShrinkwrap":false},"0.3.1":{"name":"@brikcss/ds-webalias","version":"0.3.1","description":"A DirectScale, Inc. module which turns any site into a replicated site, using the DirectScale webalias.","dependencies":{"@brikcss/element":"^0.1.5","lighterhtml":"^0.12.0"},"devDependencies":{"@babel/plugin-transform-runtime":"^7.4.4","@babel/polyfill":"^7.4.4","@babel/preset-env":"^7.4.5","@brikcss/git-hooks":"^2.2.1","@brikcss/merge":"^1.2.1","@brikcss/rollup-config-generator":"0.0.14","browser-sync":"^2.26.5","codacy-coverage":"^3.4.0","coveralls":"^3.0.3","document-register-element":"^1.13.2","jest":"^24.8.0","rimraf":"^2.6.3","rollup":"^1.13.1","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0"},"scripts":{"start":"npm run watch","pretest":"npm run build","test":"standard && jest --coverage --passWithNoTests","cov":"cat coverage/lcov.info | coveralls && cat coverage/lcov.info | codacy-coverage","prebuild":"rimraf esm umd dist","build":"rollup --config=.rolluprc.js","watch":"npm run build -- --watch & npm run serve","serve":"browser-sync start --config .browsersyncrc.js"},"main":"dist/esm/webalias.js","module":"dist/esm/webalias.js","browser":"dist/esm/webalias.browser.js","umd":"dist/umd/webalias.js","keywords":["brikcss","webalias","replicate","replication"],"author":{"name":"Brikcss","url":"https://github.com/brikcss"},"homepage":"https://github.com/brikcss/ds-webalias","bugs":{"url":"https://github.com/brikcss/ds-webalias/issues"},"license":"MIT","publishConfig":{"tag":"next","access":"public"},"gitHead":"7daaf9f638192f4c9bda9415c7b912ee4f496beb","readme":"# DirectScale WebAlias Replication Plugin\n\n<!-- Shields. -->\n<p>\n    <!-- NPM version. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@brikcss/ds-webalias.svg?style=flat-square\"></a>\n    <!-- NPM tag version. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@brikcss/ds-webalias/next.svg?style=flat-square\"></a>\n    <!-- NPM downloads/month. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM downloads per month\" src=\"https://img.shields.io/npm/dm/@brikcss/ds-webalias.svg?style=flat-square\"></a>\n    <!-- Travis branch. -->\n    <a href=\"https://github.com/brikcss/ds-webalias/tree/master\"><img alt=\"Travis branch\" src=\"https://img.shields.io/travis/rust-lang/rust/master.svg?style=flat-square&label=master\"></a>\n    <!-- Codacy. -->\n    <!-- <a href=\"https://www.codacy.com\"><img alt=\"Codacy code quality\" src=\"https://img.shields.io/codacy/grade//master.svg?style=flat-square\"></a> -->\n    <!-- <a href=\"https://www.codacy.com\"><img alt=\"Codacy code coverage\" src=\"https://img.shields.io/codacy/coverage//master.svg?style=flat-square\"></a> -->\n    <!-- Coveralls -->\n    <!-- <a href='https://coveralls.io/github/brikcss/ds-webalias?branch=master'><img src='https://img.shields.io/coveralls/github/brikcss/ds-webalias/master.svg?style=flat-square' alt='Coverage Status' /></a> -->\n    <!-- JS Standard style. -->\n    <a href=\"https://standardjs.com\"><img alt=\"JavaScript Style Guide\" src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square\"></a>\n    <!-- Prettier code style. -->\n    <a href=\"https://prettier.io/\"><img alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"></a>\n    <!-- Semantic release. -->\n    <!-- <a href=\"https://github.com/semantic-release/semantic-release\"><img alt=\"semantic release\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square\"></a> -->\n    <!-- Commitizen friendly. -->\n    <a href=\"http://commitizen.github.io/cz-cli/\"><img alt=\"Commitizen friendly\" src=\"https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square\"></a>\n    <!-- Greenkeeper. -->\n    <a href=\"https://greenkeeper.io/\"><img src=\"https://badges.greenkeeper.io/brikcss/ds-webalias.svg?style=flat-square\" alt=\"Greenkeeper badge\"></a>\n    <!-- MIT License. -->\n    <a href=\"LICENSE.md\"><img alt=\"License\" src=\"https://img.shields.io/npm/l/express.svg?style=flat-square\"></a>\n</p>\n\n## About\n\n<strong>\\[ IMPORTANT \\]: Brikcss follows semantic versioning. Since this package is currently at major version zero, <a href=\"https://semver.org/#spec-item-4\" target=\"_blank\">\"anything may change at any time\", and it \"should not be considered stable\"</a>.</strong>\n\nThis webalias module connects with the DirectScale, Inc. webalias API to help turn any website into a replicated solution. The plugin can either check the URL to auto-detect the webalias and client/company, or they can be manually configured.\n\nThis solution is built on [Brikcss Element](https://github.com/brikcss/element), a native Web Components library.\n\n## Contributing\n\nWe ❤️❤️❤️ contributions of any kind, whether it's bug reports, questions or feature requests, pull requests, and especially spreading some love about this project to your friends and co-workers!\n\n**[Read our contributing guidelines](./CONTRIBUTING.md) and get involved to support this project.**\n\n## Browser Support\\*\n\n| Chrome | Firefox | Safari | Edge | IE     |\n| ------ | ------- | ------ | ---- | ------ |\n| ✓      | ✓       | ✓      | ✓    | 11\\*\\* |\n\n\\*_With the [proper polyfills](#getting-started)._<br>\n\\*\\*_IE11 can be supported with a transpiled build for legacy browsers._\n\n## Install\n\n**From NPM:**\n\n```bash\nnpm install -D @brikcss/ds-webalias\n```\n\n**From GitHub:**\n\nDownload the [latest release](https://github.com/brikcss/ds-webalias/releases/latest).\n\n_Note: File paths are written for NPM installs. If you use the GitHub release, make sure to remove `node_modules/@brikcss/ds-webalias` from any file paths._\n\n## Quick Start\n\nBuild your component in less than 5 minutes:\n\n1. [Include Web Components polyfills](https://github.com/brikcss/element/blob/master/docs/web-components-polyfills.md).\n\n2. Include the ESM Browser bundle and define your element:\n\n    ```js\n    // app.js\n    import { WebAlias } from 'node_modules/@brikcss/ds-webalias/dist/esm/webalias.browser.js';\n    WebAlias.define('my-element');\n    // or window.customElements.define('my-element', WebAlias)\n    ```\n\n3. Use your element:\n\n    _in HTML:_\n\n    ```html\n    <!-- index.html -->\n    <my-element prop=\"name\" before=\"Hello, \" after=\"!\"></my-element>\n    ```\n\n    If the webalias user's name is \"John Doe\", the UI will display _\"Hello, John Doe!\"_.\n\n    _in JS:_\n\n    ```js\n    console.log(WebAlias.user.name); // John Doe\n    ```\n\n4. Tada! Check out [the examples](./examples) if you run into issues.\n\n    _Important: While the Browser ESM bundle works great for rapid development and prototyping, or if you only need to support modern browsers. For greater browser support, once your app is ready for production, replace the Browser ESM with [the Vanilla ESM (or UMD bundle)](https://github.com/brikcss/element/blob/master/docs/including-brikcss-modules.md)._\n\n## WebAlias element attributes\n\nThe `web-alias` HTML element can have the following attributes:\n\n### `prop`\n\n_Type: `String` **(required)**_\n\nIndicates the WebAlias property (from `WebAlias.propsMap`) to use.\n\n### `before`\n\n_Type: `String`_\n\nString to insert before the webalias property.\n\n### `after`\n\n_Type: `String`_\n\nString to insert after the webalias property.\n\n## API\n\n### `WebAlias.webalias`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nThe webalias passed to the webalias API. This -- along with the `WebAlias.client` and `WebAlias.env` properties -- will return the [webalias user](#webaliasuser).\n\n### `WebAlias.client`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nThe client ID passed to the webalias API.\n\n### `WebAlias.env`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nEnvironment to use. Can be `dev`, `stage`, or `''` (live). This determines which database is checked.\n\n### `WebAlias.urlCheck`\n\n_Type: `String[]|Boolean` Default: `['webalias']`_\n\nThis value determines if and how WebAlias will automatically pull data from the URL. This is a String Array, with possible values of `webalias`, `client`, and `env`. For each property listed, WebAlias will automatically fetch that data property from the URL. By default, only the `webalias` property is checked for. Setting this value to `true` will check all three properties.\n\n_Note: For each property listed, WebAlias calls `WebAlias[`get\\${propertyName}FromUrl`](host)`. This means, if you want to customize how WebAlias gets each piece of data, simply override the corresponding method. For example, to override how WebAlias gets the `webalias` property from the URL:_\n\n```js\nWebAlias.getWebaliasFromUrl = function (host) {...}\n```\n\n### `WebAlias.user`\n\n_Type: `Object` Default: `undefined`_\n\nThe webalias user data. The `WebAlias.webalias`, `WebAlias.client`, and `WebAlias.env` properties are used to fetch webalias data from DirectScale's replicated site webalias API, and then normalizing it as follows:\n\n-   `first` _{String}_: First name.\n-   `last` _{String}_: Last name.\n-   `name` _{String}_: First and last name.\n-   `email` _{String}_: Email address.\n-   `phone` _{String}_: Alias for `phone1`.\n-   `phone1` _{String}_: Phone 1.\n-   `phone2` _{String}_: Phone 2.\n-   `city` _{String}_: City.\n-   `state` _{String}_: State.\n-   `country` _{String}_: Country.\n-   `about` _{String}_: About the user.\n-   `company` _{String}_: Company.\n-   `language` _{String}_: Language.\n-   `imageUrl` _{String}_: URL for user's profile image.\n-   `image` _{String}_: User's profile `<img />`.\n-   `imageData` _{String}_: Image data.\n-   `facebook` _{String}_: Facebook handle.\n-   `facebookLink` _{String}_: Facebook anchor tag hyperlink.\n-   `twitter` _{String}_: Twitter handle.\n-   `twitterLink` _{String}_: Twitter anchor tag hyperlink.\n-   `pinterest` _{String}_: Pinterest handle.\n-   `pinterestLink` _{String}_: Pinterest anchor tag hyperlink.\n-   `youTube` _{String}_: YouTube handle.\n-   `youTubeLink` _{String}_: YouTube anchor tag hyperlink.\n-   `linkedIn` _{String}_: LinkedIn handle.\n-   `linkedInLink` _{String}_: LinkedIn anchor tag hyperlink.\n-   `enrollmentUrl` _{String}_: URL to user's enrollment site.\n-   `enrollmentLink` _{String}_: Enrollment anchor tag hyperlink.\n-   `officeUrl` _{String}_: URL to user's back office.\n-   `officeLink` _{String}_: Back office anchor tag hyperlink.\n-   `shoppingUrl` _{String}_: URL to user's shopping site.\n-   `shoppingLink` _{String}_: Shopping cart anchor tag hyperlink.\n-   `replicatedSiteUrl` _{String}_: URL to user's replicated site.\n-   `replicatedSiteLink` _{String}_: Replicated/marketing site anchor tag hyperlink.\n-   `webalias` _{String}_: User's webalias.\n-   `customerId` _{String}_: User's customer ID.\n-   `backOfficeId` _{String}_: User's back office ID.\n-   `customerTypeId` _{String}_: User's customer type ID.\n-   `status` _{String}_: User status.\n\n### `WebAlias.propsMap`\n\n_Type: `Object` Default: (see source)_\n\n`WebAlias.propsMap` maps out how `WebAlias.user` values are created. You can create new `WebAlias.user` properties by adding a new property to `WebAlias.propsMap`, and you can modify how any existing `WebAlias.user[prop]` is created by overriding the corresponding property in `WebAlias.propsMap`.\n\nFor example:\n\n```js\n// Modify an existing webalias property.\nWebAlias.propsMap.name = function() {\n    return `${this.user.last}, ${this.user.first}`;\n};\n// Create a custom webalias property.\n// NOTE: Since HTML markup is being created, use the render function provided (`r`) to correctly render your markup template.\nWebAlias.propsMap.avatar = function(r) {\n    return r`<img src=\"${this.user.imageUrl}\" alt=\"User avatar for: ${\n        this.user.first\n    } ${this.user.last}\" />`;\n};\n```\n\nThese are used in the markup as usual:\n\n```html\n<web-alias prop=\"name\"></web-alias> <web-alias prop=\"avatar\"></web-alias>\n```\n\nwhich, for the user \"John Doe\", will display the following in the UI (along with the user's image):\n\n```html\nCustom property for Doe, John!\n```\n\n### `WebAlias.shadowProps`\n\n_Type: `Array` Default: `['facebookLink', 'twitterLink', 'pinterestLink', 'youTubeLink', 'linkedInLink', 'enrollmentLink', 'officeLink', 'shoppingLink', 'replicatedLink']`_\n\nSome default properties in `WebAlias.propsMap` render with `<slot>` elements, which is part of the [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) specification. Shadow DOM encapsulates elements, but also prevents global CSS from being applied _to children_ elements.\n\nBy default, Shadow DOM is not used, which allows global styles to be applied. However, if the `prop` attribute matches a value in `WebAlias.shadowProps`, shadow DOM will be created.\n\n_NOTE: You may always [override properties of `WebAlias.propsMap`](#webaliaspropsmap) to control any of this behavior._\n\n### `WebAlias.sourceUrl`\n\n_Type: `String|Function` Default: `https://${WebAlias.webalias}.${WebAlias.client}.directscale${WebAlias.env}.com`_\n\nPassed in the headers (as the `ApplicationUrl` parameter) to the webalias API.\n\n## License\n\n[See License](LICENSE.md).\n","readmeFilename":"README.md","_id":"@brikcss/ds-webalias@0.3.1","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"thezimmee","email":"thezimmee@gmail.com"},"dist":{"integrity":"sha512-dvtT/iX9b69k/+pfT+WR1igBDFDdJqREz8bMV32dQKGdmJiWwBXVGQzfwAb1YRpFbUjwx8ecXbK4OlV86xqg+w==","shasum":"84e9497b2c842c371fa52770a23de8a396d760ec","tarball":"https://registry.npmjs.org/@brikcss/ds-webalias/-/ds-webalias-0.3.1.tgz","fileCount":14,"unpackedSize":87208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAVg0CRA9TVsSAnZWagAAdvcP/3OYOUO7xEqQ0782Qpcv\nDh6t6arilXrlONjr3R41JHCYVAwisnWDJBmvgoMBb4Ek+nK44mwJ8HVcjA/k\niYre6egLQMtJ0YZqQK+s+hYQjja2b7Sbp55ObWCfl2s2fB+knEs6TVAIcdo6\n171Iv6HvU6byuezjC9cMZXxAJNXLrLv5y0MmbbKH6sK3HptidzPalpTpZJw3\nMwHS5UYr8MP7Qv8qPNIC4M/Gr9k/kg1ZssAu3pY8zvvmpYU6kI0BEge0xmQX\n12IHCVbSjRDG7z23UNyBNWkb+HONFUhRzx6rYMsc0NGN7mLPK4eJALjGXXsu\nUG0EpwLFh9e7gMD4670wEcyMEoR2KK+eWEQpRVKhT4kGac8QxH+tKYZ8E0i0\nUW+NvCXwjujnKHKX600yksZbtUQd26UZfoFROqNWGCpGhNPULgnjcXTr1YvK\nzswNRtyfHvwyjwIOn+fMreQBMe7Kj/PFS9cxrAWTh+hxvnLwtZS7VBxeG07b\nhTpW+ztcrlolET3fiSlb21dwwdTIPlztPCPErHMaNBUJmTk8LVhuAS0xJNx6\n4/98I7ggr+hT+j2kFhnJVMs1ws9DD0bkEPzst1xObwW8OGan1fx++19e6aAv\nnEvq+RgH5SUXm1mkSQJzZvbx+1c3d3lfBvszDg79IQOmPf0JSRJg4gQFy5bu\nt/Fv\r\n=/5i3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuamIv76yrmRrZTO7ghk7vRyoRuhun6VuMreJz3KEaZQIgAKesB/YFv7+BlWqEoMkF7v5ScGdNsIJQVbA5ho8b4+E="}]},"maintainers":[{"name":"thezimmee","email":"thezimmee@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ds-webalias_0.3.1_1560369203590_0.20030417143376034"},"_hasShrinkwrap":false}},"time":{"created":"2019-04-10T23:53:45.402Z","0.1.0":"2019-04-10T23:53:45.856Z","modified":"2022-04-04T20:41:23.004Z","0.1.1":"2019-04-10T23:57:43.171Z","0.1.2":"2019-04-11T04:42:24.591Z","0.1.3":"2019-04-11T05:31:52.848Z","0.2.0":"2019-05-21T22:32:45.391Z","0.2.1":"2019-05-23T13:19:38.458Z","0.3.0":"2019-06-03T15:04:38.174Z","0.3.1":"2019-06-12T19:53:23.739Z"},"maintainers":[{"name":"thezimmee","email":"thezimmee@gmail.com"}],"description":"A DirectScale, Inc. module which turns any site into a replicated site, using the DirectScale webalias.","keywords":["brikcss","webalias","replicate","replication"],"author":{"name":"Brikcss","url":"https://github.com/brikcss"},"license":"MIT","readme":"# DirectScale WebAlias Replication Plugin\n\n<!-- Shields. -->\n<p>\n    <!-- NPM version. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@brikcss/ds-webalias.svg?style=flat-square\"></a>\n    <!-- NPM tag version. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@brikcss/ds-webalias/next.svg?style=flat-square\"></a>\n    <!-- NPM downloads/month. -->\n    <a href=\"https://www.npmjs.com/package/@brikcss/ds-webalias\"><img alt=\"NPM downloads per month\" src=\"https://img.shields.io/npm/dm/@brikcss/ds-webalias.svg?style=flat-square\"></a>\n    <!-- Travis branch. -->\n    <a href=\"https://github.com/brikcss/ds-webalias/tree/master\"><img alt=\"Travis branch\" src=\"https://img.shields.io/travis/rust-lang/rust/master.svg?style=flat-square&label=master\"></a>\n    <!-- Codacy. -->\n    <!-- <a href=\"https://www.codacy.com\"><img alt=\"Codacy code quality\" src=\"https://img.shields.io/codacy/grade//master.svg?style=flat-square\"></a> -->\n    <!-- <a href=\"https://www.codacy.com\"><img alt=\"Codacy code coverage\" src=\"https://img.shields.io/codacy/coverage//master.svg?style=flat-square\"></a> -->\n    <!-- Coveralls -->\n    <!-- <a href='https://coveralls.io/github/brikcss/ds-webalias?branch=master'><img src='https://img.shields.io/coveralls/github/brikcss/ds-webalias/master.svg?style=flat-square' alt='Coverage Status' /></a> -->\n    <!-- JS Standard style. -->\n    <a href=\"https://standardjs.com\"><img alt=\"JavaScript Style Guide\" src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square\"></a>\n    <!-- Prettier code style. -->\n    <a href=\"https://prettier.io/\"><img alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"></a>\n    <!-- Semantic release. -->\n    <!-- <a href=\"https://github.com/semantic-release/semantic-release\"><img alt=\"semantic release\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square\"></a> -->\n    <!-- Commitizen friendly. -->\n    <a href=\"http://commitizen.github.io/cz-cli/\"><img alt=\"Commitizen friendly\" src=\"https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square\"></a>\n    <!-- Greenkeeper. -->\n    <a href=\"https://greenkeeper.io/\"><img src=\"https://badges.greenkeeper.io/brikcss/ds-webalias.svg?style=flat-square\" alt=\"Greenkeeper badge\"></a>\n    <!-- MIT License. -->\n    <a href=\"LICENSE.md\"><img alt=\"License\" src=\"https://img.shields.io/npm/l/express.svg?style=flat-square\"></a>\n</p>\n\n## About\n\n<strong>\\[ IMPORTANT \\]: Brikcss follows semantic versioning. Since this package is currently at major version zero, <a href=\"https://semver.org/#spec-item-4\" target=\"_blank\">\"anything may change at any time\", and it \"should not be considered stable\"</a>.</strong>\n\nThis webalias module connects with the DirectScale, Inc. webalias API to help turn any website into a replicated solution. The plugin can either check the URL to auto-detect the webalias and client/company, or they can be manually configured.\n\nThis solution is built on [Brikcss Element](https://github.com/brikcss/element), a native Web Components library.\n\n## Contributing\n\nWe ❤️❤️❤️ contributions of any kind, whether it's bug reports, questions or feature requests, pull requests, and especially spreading some love about this project to your friends and co-workers!\n\n**[Read our contributing guidelines](./CONTRIBUTING.md) and get involved to support this project.**\n\n## Browser Support\\*\n\n| Chrome | Firefox | Safari | Edge | IE     |\n| ------ | ------- | ------ | ---- | ------ |\n| ✓      | ✓       | ✓      | ✓    | 11\\*\\* |\n\n\\*_With the [proper polyfills](#getting-started)._<br>\n\\*\\*_IE11 can be supported with a transpiled build for legacy browsers._\n\n## Install\n\n**From NPM:**\n\n```bash\nnpm install -D @brikcss/ds-webalias\n```\n\n**From GitHub:**\n\nDownload the [latest release](https://github.com/brikcss/ds-webalias/releases/latest).\n\n_Note: File paths are written for NPM installs. If you use the GitHub release, make sure to remove `node_modules/@brikcss/ds-webalias` from any file paths._\n\n## Quick Start\n\nBuild your component in less than 5 minutes:\n\n1. [Include Web Components polyfills](https://github.com/brikcss/element/blob/master/docs/web-components-polyfills.md).\n\n2. Include the ESM Browser bundle and define your element:\n\n    ```js\n    // app.js\n    import { WebAlias } from 'node_modules/@brikcss/ds-webalias/dist/esm/webalias.browser.js';\n    WebAlias.define('my-element');\n    // or window.customElements.define('my-element', WebAlias)\n    ```\n\n3. Use your element:\n\n    _in HTML:_\n\n    ```html\n    <!-- index.html -->\n    <my-element prop=\"name\" before=\"Hello, \" after=\"!\"></my-element>\n    ```\n\n    If the webalias user's name is \"John Doe\", the UI will display _\"Hello, John Doe!\"_.\n\n    _in JS:_\n\n    ```js\n    console.log(WebAlias.user.name); // John Doe\n    ```\n\n4. Tada! Check out [the examples](./examples) if you run into issues.\n\n    _Important: While the Browser ESM bundle works great for rapid development and prototyping, or if you only need to support modern browsers. For greater browser support, once your app is ready for production, replace the Browser ESM with [the Vanilla ESM (or UMD bundle)](https://github.com/brikcss/element/blob/master/docs/including-brikcss-modules.md)._\n\n## API\n\n### `WebAlias.webalias`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nThe webalias passed to the webalias API. This -- along with the `WebAlias.client` and `WebAlias.env` properties -- will return the [webalias user](#webaliasuser).\n\n### `WebAlias.client`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nThe client ID passed to the webalias API.\n\n### `WebAlias.env`\n\n_Type: `String` Default: `undefined` **(required)**_\n\nEnvironment to use. Can be `dev`, `stage`, or `''` (live). This determines which database is checked.\n\n### `WebAlias.urlCheck`\n\n_Type: `String[]|Boolean` Default: `['webalias']`_\n\nThis value determines if and how WebAlias will automatically pull data from the URL. This is a String Array, with possible values of `webalias`, `client`, and `env`. For each property listed, WebAlias will automatically fetch that data property from the URL. By default, only the `webalias` property is checked for. Setting this value to `true` will check all three properties.\n\n_Note: For each property listed, WebAlias calls `WebAlias[`get\\${propertyName}FromUrl`](host)`. This means, if you want to customize how WebAlias gets each piece of data, simply override the corresponding method. For example, to override how WebAlias gets the `webalias` property from the URL:_\n\n```js\nWebAlias.getWebaliasFromUrl = function (host) {...}\n```\n\n### `WebAlias.user`\n\n_Type: `Object` Default: `undefined`_\n\nThe webalias user data. The `WebAlias.webalias`, `WebAlias.client`, and `WebAlias.env` properties are used to fetch webalias data from DirectScale's replicated site webalias API, and then normalizing it as follows:\n\n-   `first` _{String}_: First name.\n-   `last` _{String}_: Last name.\n-   `name` _{String}_: First and last name.\n-   `email` _{String}_: Email address.\n-   `phone` _{String}_: Alias for `phone1`.\n-   `phone1` _{String}_: Phone 1.\n-   `phone2` _{String}_: Phone 2.\n-   `city` _{String}_: City.\n-   `state` _{String}_: State.\n-   `country` _{String}_: Country.\n-   `about` _{String}_: About the user.\n-   `company` _{String}_: Company.\n-   `language` _{String}_: Language.\n-   `imageUrl` _{String}_: URL for user's profile image.\n-   `image` _{String}_: User's profile `<img />`.\n-   `imageData` _{String}_: Image data.\n-   `facebook` _{String}_: Facebook handle.\n-   `facebookLink` _{String}_: Facebook anchor tag hyperlink.\n-   `twitter` _{String}_: Twitter handle.\n-   `twitterLink` _{String}_: Twitter anchor tag hyperlink.\n-   `pinterest` _{String}_: Pinterest handle.\n-   `pinterestLink` _{String}_: Pinterest anchor tag hyperlink.\n-   `youTube` _{String}_: YouTube handle.\n-   `youTubeLink` _{String}_: YouTube anchor tag hyperlink.\n-   `linkedIn` _{String}_: LinkedIn handle.\n-   `linkedInLink` _{String}_: LinkedIn anchor tag hyperlink.\n-   `enrollmentUrl` _{String}_: URL to user's enrollment site.\n-   `enrollmentLink` _{String}_: Enrollment anchor tag hyperlink.\n-   `officeUrl` _{String}_: URL to user's back office.\n-   `officeLink` _{String}_: Back office anchor tag hyperlink.\n-   `shoppingUrl` _{String}_: URL to user's shopping site.\n-   `shoppingLink` _{String}_: Shopping cart anchor tag hyperlink.\n-   `replicatedSiteUrl` _{String}_: URL to user's replicated site.\n-   `replicatedSiteLink` _{String}_: Replicated/marketing site anchor tag hyperlink.\n-   `webalias` _{String}_: User's webalias.\n-   `customerId` _{String}_: User's customer ID.\n-   `backOfficeId` _{String}_: User's back office ID.\n-   `customerTypeId` _{String}_: User's customer type ID.\n-   `status` _{String}_: User status.\n\n#### Creating or modifying webalias properties\n\nYou can modify any of these webalias properties, or create your own by doing the following:\n\n```js\n// Create a custom webalias property.\nWebAlias.propsMap.customProp = function() {\n    return `Custom property for ${this.user.name()}!`;\n};\n// Modify an existing webalias property.\nWebAlias.propsMap.name = function() {\n    return `${this.user.last}, ${this.user.first}`;\n};\n```\n\nThese are used in the markup as usual:\n\n```html\n<web-alias prop=\"customProp\"></web-alias>\n```\n\nwhich, for the user \"John Doe\", will display the following in the UI:\n\n```html\nCustom property for Doe, John!\n```\n\n### `WebAlias.sourceUrl`\n\n_Type: `String|Function` Default: `https://${WebAlias.webalias}.${WebAlias.client}.directscale${WebAlias.env}.com`_\n\nPassed in the headers (as the `ApplicationUrl` parameter) to the webalias API.\n\n## License\n\n[See License](LICENSE.md).\n","readmeFilename":"README.md","homepage":"https://github.com/brikcss/ds-webalias","bugs":{"url":"https://github.com/brikcss/ds-webalias/issues"}}