{"_id":"@chapeaux/cpx-state","_rev":"5-4c58865bf5166f9a6541d5bbfe2221c6","name":"@chapeaux/cpx-state","dist-tags":{"latest":"0.4.0"},"versions":{"0.3.0":{"name":"@chapeaux/cpx-state","version":"0.3.0","keywords":["web","component","typescript","deno"],"author":{"url":"https://lukedary.com","name":"Luke Dary","email":"ldary@redhat.com"},"license":"SEE LICENSE IN LICENSE","_id":"@chapeaux/cpx-state@0.3.0","maintainers":[{"name":"ldary","email":"ldary@redhat.com"},{"name":"wesruv","email":"wesruv@gmail.com"}],"homepage":"https://github.com/chapeaux/cpx-components/components/cpx-state","bugs":{"url":"https://github.com/chapeaux/cpx-components/issues"},"dist":{"shasum":"998656f6568e67ac090ea5beba57dc257a2cc0f1","tarball":"https://registry.npmjs.org/@chapeaux/cpx-state/-/cpx-state-0.3.0.tgz","fileCount":4,"integrity":"sha512-D6l92sEFI/yVoPd4bzSSdQlqk3UMHYD8XUdjEZwmMLkdazdZihPX4z/NHNMimOAJjFAHPM6rgFn9KQL3lG4TCg==","signatures":[{"sig":"MEQCIA0mCzKg8R5foooiMki/WMMe3Nq/MdG+8IeeUgBtKUGSAiBdK6zoiTbzbc6sFR4gduASIofRfpXndC5lWEDc0ki4xQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38948},"main":"cpx-state.js","type":"module","module":"cpx-state.js","gitHead":"53af1643f11de85045f1d22e55b033571be302c5","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","start":""},"_npmUser":{"name":"ldary","email":"ldary@redhat.com"},"repository":{"url":"git+https://github.com/chapeaux/cpx-components.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.22.3+x64 (linux)","description":"Chapeaux State Management Component","directories":{},"_nodeVersion":"12.22.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cpx-state_0.3.0_1632745945874_0.3020246251493377","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"@chapeaux/cpx-state","version":"0.4.0","keywords":["web","component","typescript","deno"],"author":{"url":"https://lukedary.com","name":"Luke Dary","email":"ldary@redhat.com"},"license":"SEE LICENSE IN LICENSE","_id":"@chapeaux/cpx-state@0.4.0","maintainers":[{"name":"ldary","email":"ldary@redhat.com"},{"name":"wesruv","email":"wesruv@gmail.com"}],"homepage":"https://github.com/chapeaux/cpx-components/components/cpx-state","bugs":{"url":"https://github.com/chapeaux/cpx-components/issues"},"dist":{"shasum":"886e009aebdead489d444dbc3eb0e305f37a8782","tarball":"https://registry.npmjs.org/@chapeaux/cpx-state/-/cpx-state-0.4.0.tgz","fileCount":3,"integrity":"sha512-UpPqjTGON+lkNLbGUuoNegHNv+lN6TobVpNXkIL8sbApULxSoyW4QFBfHoPVxTKf57gwuZf1vyOoa2iRxFrksQ==","signatures":[{"sig":"MEYCIQDd8c3FFHyxyGjE/QlZ44dpAcPZGfdDhomoyQM6P3M/MwIhAJqaLaj/72/Ilu2I8sPv9uQmQE0+Dp4e7AeEB4MBMT0g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzcZxCRA9TVsSAnZWagAAV2EP/Rd6Dwx6eN7QFdJWfvPS\nj9Hhs5XgNdHwRKOfl8HSIdSx0U70RyjWYyRxkiPkljeeazLR+dep00gTmn+i\nvXpis8SV7f4fwZiqNFjGEPL+SNLfTa7JC41jn/x04Wm4qLtG9Cxpj9kP752p\nnj84pq0/Sd1zuQwngci0D7+aCVnWEJOSmEWRS+EoAJ/I58aFaTtUYoTXRn20\n8XIiNW0JiJ0F0z2xpwp9hf+SvAhm6bGmb3UZXTdcGqKerBKuH/rREe4btEJS\nzZUu5qEDkBObWS9D0Y0mytbjKPUlR069pfypfMAPm+3vF5PXZZtdVnpRgw1G\nAbasBeuhKEqXyXApVPcPX6OZE9YqjrGO1TWc2Uj238HHslScMr9Dv+y7Y9hf\nyvApTlUj9QA36ECoS0N9V3bbkaS4ktH6SA0WzO7yt6m+cZI0iqjVSc2ASvEu\n4PzZ6MZefzi8qvroOviF7RmegtA4PWpF0CifeoqH2MYn95RpgJDY+Ycxiere\n02acnR4+Wrka1Q5lP/KlSxo+nECZmGBAGbxd0iCjgkN4I83AQ2Dp+zw8l9CU\nRTN52Y0Yycgt+QKMNm7+hynPJVIAK4yhwEzRjK/u2d5ZXbNkl2OW8GPPvkK+\nmwpIpBW/kf/z+W9nwGBnDFW4SxV4LP79zm6BEkuiVmFCIEL2kXh2VAIO6Jgr\nyZCb\r\n=WcXS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"cpx-state.js","type":"module","module":"cpx-state.js","gitHead":"da1d23d27058c4b6b02190b7e8e580891fe680b2","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","start":""},"_npmUser":{"name":"ldary","email":"ldary@redhat.com"},"repository":{"url":"git+https://github.com/chapeaux/cpx-components.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.22.3+x64 (linux)","description":"Chapeaux State Management Component","directories":{},"_nodeVersion":"12.22.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cpx-state_0.4.0_1633986208498_0.24607735907731465","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-09-27T12:32:25.828Z","modified":"2026-03-19T19:26:19.406Z","0.3.0":"2021-09-27T12:32:26.014Z","0.4.0":"2021-10-11T21:03:29.104Z"},"bugs":{"url":"https://github.com/chapeaux/cpx-components/issues"},"author":{"url":"https://lukedary.com","name":"Luke Dary","email":"ldary@redhat.com"},"license":"SEE LICENSE IN LICENSE","homepage":"https://github.com/chapeaux/cpx-components/components/cpx-state","keywords":["web","component","typescript","deno"],"repository":{"url":"git+https://github.com/chapeaux/cpx-components.git","type":"git"},"description":"Chapeaux State Management Component","maintainers":[{"email":"ldary@redhat.com","name":"ldary"}],"readme":"= Chapeaux User Component\n\n== Events\n\n* `user-ready` - fires when the `.user` object data is populated\n* `user-update` - fires when the `.user` object is updated\n\n== Usage\n\nUser data is always stored on the `.user` property once it is\navailable. \n\n=== Server-side or on-page\n\n.Server-side Data inclusion example\n[source,html]\n----\n<cpx-user>\n    <script type=\"data\">\n    {\n        \"name\": \"Test User\",\n        \"email\": \"test123@test123.com\"\n    }\n    </script>\n</cpx-user>\n----\n\n=== JSON Web Token\n\nRequires that `jwt_decode` library be available globally.\n\nAvailable component properties:\n\n* `jwt-cookie`: sets the cookie to parse for JWT data\n* `jwt-token`: sets the JWT token to parse for data\n\n.JWT Cookie\n[source,html]\n----\n<cpx-user jwt-cookie=\"SOME_JWT_COOKIE_NAME\"></cpx-user>\n----\n\n.JWT Token\n[source,html]\n----\n<cpx-user jwt-token=\"SOMEJWTENCODEDSTRING\"></cpx-user>\n----\n\n=== Keycloak\n\nRequires `keycloak.js` to be available, and the following attributes to \nbe set with the appropriate values:\n\n* `kc-url` - the Keycloak server url\n* `kc-realm` - the Keycloak realm\n* `kc-client-id` - the Keycloak client ID\n\nAvailable component methods:\n\n* `login()`: log in using the Keycloak config\n* `logout()`: log out using the Keycloak config\n* `register()`: send user to registration screen based on Keycloak config\n* `account()`: send user to account management screen based on Keycloak config\n* `token.createLoginUrl()`: creates URL to direct user to login screen\n* `token.createLogoutUrl()`: creates URL to log user out\n\nAvailable component properties:\n\n* `token`: the Keycloak object for authenticated users\n\n.Keycloak\n[source,html]\n----\n<cpx-user kc-url=\"https://test123.com/auth\" kc-realm=\"your-realm\" kc-client-id=\"your-client-id\"></cpx-user>\n----\n\n=== Scripts\n\n\n\n","readmeFilename":"README.adoc"}