{"_id":"@axa-fr/everything-to-everywhere","_rev":"6-6b5b715dccc8ad4f7f8b54c4d7e1f8f1","name":"@axa-fr/everything-to-everywhere","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@axa-fr/everything-to-everywhere","version":"0.1.0","author":{"name":"Johnathan MEUNIER"},"license":"MIT","_id":"@axa-fr/everything-to-everywhere@0.1.0","maintainers":[{"name":"johnathan.meunier","email":"johnathan2693@gmail.com"},{"name":"martinweb","email":"stievenart.m@gmail.com"},{"name":"fcornaire","email":"darkshad66@gmail.com"},{"name":"guillaume.chervet.axa","email":"guillaume.chervet@axa.fr"},{"name":"samuel-gomez","email":"samuel.gomez@axa.fr"},{"name":"antoine.blancke","email":"antoine.blancke@axa.fr"},{"name":"arnaudforaison","email":"arnaud.foraison@gmail.com"}],"contributors":[{"url":"https://johnathan.fr","name":"Johnathan MEUNIER","email":"jonathan.meunier@axa.fr"},{"name":"Samuel HUSSEIN","email":"samuel.hussein@axa.fr"}],"dist":{"shasum":"b12286cb0abd8d283c1855a5b398de804a37f3fe","tarball":"https://registry.npmjs.org/@axa-fr/everything-to-everywhere/-/everything-to-everywhere-0.1.0.tgz","fileCount":7,"integrity":"sha512-4a79OzbxD533dR09nthFpv+ANs1EpiOOhKQlbq6PPSaIKmBq7IcgjrTuT+Bz54aptQ1bSqpH+fp0N3nRGeap+A==","signatures":[{"sig":"MEQCICv6TEDG9fmwP/QCapuJEtZ3qg/ZAqP2k1vNgwU2genIAiA4BUkGs0JPhTyHOxdfaxu3L6hyhLauaxgbeyn2XYST1g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15234},"main":"dist/main.js","type":"module","volta":{"node":"22.8.0"},"gitHead":"6e7d862463aa6390feb10645981cc11abca9171e","scripts":{"build":"tsc","prebuild":"rimraf dist"},"_npmUser":{"name":"johnathan.meunier","email":"johnathan2693@gmail.com"},"_npmVersion":"10.9.0","description":"## Besoin","directories":{},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","typescript":"^5.6.2","@types/node":"^22.5.5","@types/react":"^18.3.6","@types/react-dom":"^18.3.0"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/everything-to-everywhere_0.1.0_1732263799529_0.3225287060456299","host":"s3://npm-registry-packages"}},"0.1.0-ci.10":{"name":"@axa-fr/everything-to-everywhere","version":"0.1.0-ci.10","author":{"name":"Johnathan MEUNIER"},"license":"MIT","_id":"@axa-fr/everything-to-everywhere@0.1.0-ci.10","maintainers":[{"name":"guillaume.chervet.axa","email":"guillaume.chervet@axa.fr"},{"name":"samuel-gomez","email":"samuel.gomez@axa.fr"},{"name":"antoine.blancke","email":"antoine.blancke@axa.fr"},{"name":"arnaudforaison","email":"arnaud.foraison@gmail.com"},{"name":"fcornaire","email":"darkshad66@gmail.com"},{"name":"johnathan.meunier","email":"johnathan2693@gmail.com"},{"name":"martinweb","email":"stievenart.m@gmail.com"}],"contributors":[{"url":"https://johnathan.fr","name":"Johnathan MEUNIER","email":"jonathan.meunier@axa.fr"},{"name":"Samuel HUSSEIN","email":"samuel.hussein@axa.fr"}],"dist":{"shasum":"312089bed1a5b3744676e30bffb57ad801a02a57","tarball":"https://registry.npmjs.org/@axa-fr/everything-to-everywhere/-/everything-to-everywhere-0.1.0-ci.10.tgz","fileCount":7,"integrity":"sha512-TF2T3XIXiP8jfywIMTkvjPx8S9Mm62vRIhjz3zdl/TeSAsI0fVcmDRK+QoE8QVhNCwxk6PwQUep6r0DpBMHHvg==","signatures":[{"sig":"MEQCIFe6/VQQG5vko5/q7vPG60Hq4SAg0IuKszw6S91DOL8TAiBSEtNhaTxaM0NWFv3dcPQ4VsiCLdIoMA21+CDS4/+Aow==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14712},"main":"dist/main.js","type":"module","volta":{"node":"22.8.0"},"gitHead":"4b320a7a4f4b965257d6b66c6fc4db2c6ae5aa7c","scripts":{"build":"tsc","prebuild":"rimraf dist"},"_npmUser":{"name":"johnathan.meunier","email":"johnathan2693@gmail.com"},"_npmVersion":"10.9.3","description":"This package allows you to use React components in any environment, regardless of the framework or stack used, thanks to the technology of custom elements.","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","typescript":"^5.6.2","@types/node":"^22.5.5","@types/react":"^18.3.6","@types/react-dom":"^18.3.0"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/everything-to-everywhere_0.1.0-ci.10_1756112039325_0.7499936931353974","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-ci.12":{"name":"@axa-fr/everything-to-everywhere","version":"0.1.0-ci.12","author":{"name":"Johnathan MEUNIER"},"license":"MIT","_id":"@axa-fr/everything-to-everywhere@0.1.0-ci.12","maintainers":[{"name":"guillaume.chervet.axa","email":"guillaume.chervet@axa.fr"},{"name":"samuel-gomez","email":"samuel.gomez@axa.fr"},{"name":"antoine.blancke","email":"antoine.blancke@axa.fr"},{"name":"arnaudforaison","email":"arnaud.foraison@gmail.com"},{"name":"fcornaire","email":"darkshad66@gmail.com"},{"name":"johnathan.meunier","email":"johnathan2693@gmail.com"},{"name":"martinweb","email":"stievenart.m@gmail.com"}],"contributors":[{"url":"https://johnathan.fr","name":"Johnathan MEUNIER","email":"jonathan.meunier@axa.fr"},{"name":"Samuel HUSSEIN","email":"samuel.hussein@axa.fr"}],"dist":{"shasum":"d9525b53fe5bf1e7523050cf64c6fb025f75b1a3","tarball":"https://registry.npmjs.org/@axa-fr/everything-to-everywhere/-/everything-to-everywhere-0.1.0-ci.12.tgz","fileCount":7,"integrity":"sha512-vb8gT1Qd4dmLGnASd5wdU7zicoZ29nvm9h1TswZ9vdqKDaDdXsqXAZQ7uKmKtl89qAxhVwGZnUUOsN6R5UNISA==","signatures":[{"sig":"MEUCIQCmMB5Afjhh1764hu593WibjCkETrnKwHtJ+eViUtyWPQIgUAaiDwvabVEICQcLCmwenTDI1CJfimfXk4P0hWO6/gM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13256},"main":"dist/main.js","type":"module","volta":{"node":"22.8.0"},"gitHead":"a26b28e1daa18fef3534c72ef3ead4ebbceca6ab","scripts":{"build":"tsc","prebuild":"rimraf dist"},"_npmUser":{"name":"johnathan.meunier","email":"johnathan2693@gmail.com"},"_npmVersion":"10.9.3","description":"This package allows you to use React components in any environment, regardless of the framework or stack used, thanks to the technology of custom elements.","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","typescript":"^5.6.2","@types/node":"^22.5.5","@types/react":"^18.3.6","@types/react-dom":"^18.3.0"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/everything-to-everywhere_0.1.0-ci.12_1756901051606_0.976989391420253","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-ci.15":{"name":"@axa-fr/everything-to-everywhere","version":"0.1.0-ci.15","author":{"name":"Johnathan MEUNIER"},"license":"MIT","_id":"@axa-fr/everything-to-everywhere@0.1.0-ci.15","maintainers":[{"name":"guillaume.chervet.axa","email":"guillaume.chervet@axa.fr"},{"name":"samuel-gomez","email":"samuel.gomez@axa.fr"},{"name":"antoine.blancke","email":"antoine.blancke@axa.fr"},{"name":"arnaudforaison","email":"arnaud.foraison@gmail.com"},{"name":"fcornaire","email":"darkshad66@gmail.com"},{"name":"johnathan.meunier","email":"johnathan2693@gmail.com"},{"name":"martinweb","email":"stievenart.m@gmail.com"}],"contributors":[{"url":"https://johnathan.fr","name":"Johnathan MEUNIER","email":"jonathan.meunier@axa.fr"},{"name":"Samuel HUSSEIN","email":"samuel.hussein@axa.fr"}],"dist":{"shasum":"85079f32e94d3f71c19427c3874de0e4d4d1eb49","tarball":"https://registry.npmjs.org/@axa-fr/everything-to-everywhere/-/everything-to-everywhere-0.1.0-ci.15.tgz","fileCount":9,"integrity":"sha512-AHUsTinbN1m9PlDL1NoKf257OZt0MT3dZcyB+liQzqtrfQ4e55G+jq7KMMm2FBXryCH49sLLKBub3LWNSshlnQ==","signatures":[{"sig":"MEUCIBeY9FcdmRuHobEeknhT480x+4NSp8LkHtPVenL/RcSBAiEA3++gofhren+B8Jiz3HT/8P9RnuvN7tuHqV9TZy0CUOc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21424},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","volta":{"node":"22.8.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ab5519493435cd99e4b32fb2eb46fef494fbf658","scripts":{"build":"rslib build"},"_npmUser":{"name":"johnathan.meunier","email":"johnathan2693@gmail.com"},"_npmVersion":"10.9.3","description":"This package allows you to use React components in any environment, regardless of the framework or stack used, thanks to the technology of custom elements.","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.2","@rslib/core":"^0.12.4","@types/node":"^22.5.5","@types/react":"^18.3.6","@types/react-dom":"^18.3.0","@rsbuild/plugin-react":"^1.4.0"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/everything-to-everywhere_0.1.0-ci.15_1757062076990_0.4921038278136505","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@axa-fr/everything-to-everywhere","version":"0.2.0","author":{"name":"Johnathan MEUNIER"},"license":"MIT","_id":"@axa-fr/everything-to-everywhere@0.2.0","maintainers":[{"name":"guillaume.chervet.axa","email":"guillaume.chervet@axa.fr"},{"name":"samuel-gomez","email":"samuel.gomez@axa.fr"},{"name":"antoine.blancke","email":"antoine.blancke@axa.fr"},{"name":"arnaudforaison","email":"arnaud.foraison@gmail.com"},{"name":"fcornaire","email":"darkshad66@gmail.com"},{"name":"johnathan.meunier","email":"johnathan2693@gmail.com"},{"name":"martinweb","email":"stievenart.m@gmail.com"}],"contributors":[{"url":"https://johnathan.fr","name":"Johnathan MEUNIER","email":"jonathan.meunier@axa.fr"},{"name":"Samuel HUSSEIN","email":"samuel.hussein@axa.fr"}],"dist":{"shasum":"015fd5d1976d1ac2614d97b13e2f349766728620","tarball":"https://registry.npmjs.org/@axa-fr/everything-to-everywhere/-/everything-to-everywhere-0.2.0.tgz","fileCount":9,"integrity":"sha512-xtEsD0gFBpTpdH/a5iMyY/dZyVmxDYcop9RVaoFl6Pa9Qnyjl5e/jwCBkO9BXiyhKZiB7pST4gEKsY5tCRuQNA==","signatures":[{"sig":"MEYCIQCnIi7yTxWgmKv6ShtcPCM8i6Dqug5Rc6p8AgRIiaohuAIhAJH24fHEh+Fiy6nv/q0mL7yd7H1kePTnddimvW9JB16v","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21418},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","volta":{"node":"22.8.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"e3eeab7cdf71cc01e0c0b3287bcccc2901464789","scripts":{"build":"rslib build"},"_npmUser":{"name":"johnathan.meunier","email":"johnathan2693@gmail.com"},"_npmVersion":"10.9.3","description":"This package allows you to use React components in any environment, regardless of the framework or stack used, thanks to the technology of custom elements.","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.6.2","@rslib/core":"^0.12.4","@types/node":"^22.5.5","@types/react":"^18.3.6","@types/react-dom":"^18.3.0","@rsbuild/plugin-react":"^1.4.0"},"peerDependencies":{"react":"^18.3.1","react-dom":"^18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/everything-to-everywhere_0.2.0_1757064385932_0.9951755080244271","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2024-11-22T08:23:19.402Z","modified":"2025-12-08T13:49:14.132Z","0.1.0":"2024-11-22T08:23:19.708Z","0.1.0-ci.10":"2025-08-25T08:53:59.514Z","0.1.0-ci.12":"2025-09-03T12:04:11.805Z","0.1.0-ci.15":"2025-09-05T08:47:57.187Z","0.2.0":"2025-09-05T09:26:26.104Z"},"author":{"name":"Johnathan MEUNIER"},"license":"MIT","description":"This package allows you to use React components in any environment, regardless of the framework or stack used, thanks to the technology of custom elements.","contributors":[{"url":"https://johnathan.fr","name":"Johnathan MEUNIER","email":"jonathan.meunier@axa.fr"},{"name":"Samuel HUSSEIN","email":"samuel.hussein@axa.fr"}],"maintainers":[{"email":"guillaume.chervet@axa.fr","name":"guillaume.chervet.axa"},{"email":"samuel.gomez@axa.fr","name":"samuel-gomez"},{"email":"arnaud.foraison@gmail.com","name":"arnaudforaison"},{"email":"johnathan2693@gmail.com","name":"johnathan.meunier"},{"email":"stievenart.m@gmail.com","name":"martinweb"}],"readme":"# EverythingToEverywhere\n\n## Need\n\nThis package allows you to use React components in any environment, regardless of the framework or stack used, thanks to the technology of custom elements.\n\nIn the future, it will also allow the use of components developed with other libraries or frameworks.\n\n## Usage\n\n### Example for React Component that you can use\n\nCurrently, this method only works with arrow function components.\n\nHere is a very simple component example that supports props of different types as input (with possible default values).\n\n```jsx\nimport React from \"react\";\n\nconst AnyReactComponent = ({ type = \"default value\", mode, children, array = [], object, number, onUpdate }) => <>\n  <h2>AnyReactComponent</h2>\n  <p><strong>type : </strong> {type}</p>\n  <p><strong>mode : </strong> {mode}</p>\n  <p><strong>children : </strong> {children}</p>\n  <p><strong>array : </strong></p>\n  <ul>{array.map(item => (    \n    <li key={item}>{item}</li>\n  ))}</ul>\n  <p><strong>object : </strong>{object?.sub?.sub1}</p>\n  <p><strong>number : </strong>{number}</p>\n  <input type=\"text\" onChange={onUpdate} />\n</>\n\nAnyReactComponent.displayName = \"AnyReactComponent\";\n\nexport default AnyReactComponent;\n```\n\n### Making the React Component usable everywhere\nTo make the previously created React component usable anywhere as a custom element, you need to define this custom element.\n\nThe method `defineCustomElementReact` allows you to specify several essential elements: \n#### namespace\ntype: *string*\n\nIt's highly recommended to prefix the custom element by a namespace to avoid conflicts with existing tags or directives.\n\n#### component\ntype: *React.FC*\n\nIt's necessary to provide an arrow function component in this property.\n\n#### name\ntype: *string* optional\n\nThe name of the custom element can be inferred from the name of the component passed in the `component` property or its `displayName`. You can, of course, customize it using this property.\n\n#### props\ntype: *string[]* optional (required if the React component is not an arrow function)\n\nThis property indicates the list of props that you want to listen. Whenever one of the values changes, the custom element will re-render.\n\n```js\nimport { defineCustomElementReact } from '@axa-fr/everything-to-everywhere';\nimport AnyReactComponent from './AnyReactComponent';\n\ndefineCustomElementReact({\n  namespace: 'owc',\n  component: AnyReactComponent,\n  name: \"a-component\",\n  props: [\"prop\", \"you\", \"want\", \"to\", \"listen\"]\n})\n```\n\nHowever, in a very simple case, you can omit the component name and the list of properties. This only works if: \n- you want to map all the props \n- your component destructures all of them explicitly. For example `({prop1, prop2, prop3})` would work but not `({prop1, ...props})` or `(props)`\n- your component is in the form of an arrow function component\n- the target of the bundle is > ES6\n- there is no modification on the destructuring of props in the bundle\n\nYou can, in all cases, set default values.\n\n```js\nimport { defineCustomElementReact } from '@axa-fr/everything-to-everywhere';\nimport AnyReactComponent from './AnyReactComponent';\n\ndefineCustomElementReact({\n  namespace: 'owc',\n  component: AnyReactComponent\n})\n```\n\n### Using the new custom element\n\nIn our previous example, the React component was called `AnyReactComponent` (in Pascal case). \nThe custom element must comply with HTML standards and best practices, so it should have a namespace and be in kebab case.\n\nOur component will be usable with the name `owc-any-react-component`.\n\n#### Passing Data\n\nYou will also need to pass all its required attributes: \n\n```html\n<owc-any-react-component\n  mode=\"{{$ctrl.config.legacyContractBanner.bannerContent2}}\"\n  children=\"{{$ctrl.replacementCompareUrl}}\"\n  array=\"{{$ctrl.arrayForCE}}\"\n  object=\"{{$ctrl.objectForCE}}\"\n  number=\"12\">\n</owc-any-react-component>\n```\n\nHere, `type` is not provided because it had a default value in its previous declaration.\n\nThis custom element is available wherever you can write HTML, whether in an AngularJS directive, JSX, etc.\n\n#### Handling Events\n\nEvents are managed with callbacks that can be add after defining the custom element.\n\nLet’s take our previous example and simplify it a little bit.\n\n```js\nconst AnyReactComponent = ({ type = \"default value\", mode, children, array = [], object, number, onUpdate }) => <>\n  ...\n  <input type=\"text\" onChange={onUpdate} />\n</>\n```\n\nAs a reminder, in our case, our component will be used with the tag `owc-any-react-component`. \n\nWe will add our events by this way: \n\n```js\nconst $OwcAnyReactComponent = document.querySelector(\"owc-any-react-component\");\n$OwcAnyReactComponent.onUpdate = event => {\n    console.log(\"### onUpdate\", event.target.value);\n};\n```\n\nEvent management occurs in several steps: \n1. Pass our `onUpdate` event as a prop of the React component\n2. Call this method at the appropriate time (for example, as a callback for our `onChange` event of our input) in the React component\n3. Retrieve our custom element where we want to manage the event\n4. Attach a new attribute to our recently retrieved custom element (with the same name as the prop passed in the React component, the parameters can be retrieved)\n\nOff course, you can also manage event by the way you want, for example by dispatching custom event, that works very well too.","readmeFilename":"README.md"}