{"_id":"@asemirsk/bv","_rev":"27-dc8c95d220b7fa1300becd0ee7726f48","time":{"created":"2022-04-04T11:45:12.128Z","1.0.0-alpha-3.9.0":"2022-03-15T12:56:46.786Z","modified":"2022-05-25T09:17:57.886Z","1.0.0-alpha-3.1.0":"2022-03-15T13:54:19.331Z","1.0.0-beta.2":"2022-03-15T14:25:17.882Z","1.0.0-beta.3":"2022-03-15T14:37:45.199Z","1.0.0":"2022-03-15T14:40:41.670Z","1.0.1-beta.0":"2022-03-15T14:44:49.665Z","1.0.0-alpha-5.3.0":"2022-03-15T16:03:42.495Z","1.0.0-alpha.0":"2022-04-04T11:45:12.350Z","1.0.0-beta.5":"2022-04-04T13:57:44.873Z","1.0.0-beta.6":"2022-04-08T20:00:56.336Z","1.0.1-beta.6":"2022-04-08T20:05:08.043Z","1.0.1":"2022-04-08T20:09:48.285Z","1.0.2-beta.0":"2022-04-08T20:19:20.839Z","1.0.2":"2022-04-08T20:22:26.483Z","1.0.3":"2022-04-08T20:26:30.471Z","1.1.0":"2022-04-19T15:07:21.394Z","2.0.1-beta.0":"2022-04-29T14:35:23.224Z","2.0.1-beta.1":"2022-04-29T14:41:43.619Z","2.0.3-beta.0":"2022-04-29T14:49:53.811Z","2.0.3-beta.1":"2022-04-29T14:51:52.771Z","2.0.5-beta.0":"2022-04-29T15:06:53.969Z","2.0.6-beta.0":"2022-05-02T10:08:22.175Z","3.0.0":"2022-05-02T10:21:49.334Z","1.0.0-beta.16":"2022-05-06T09:17:20.970Z","1.0.0-canary-24-22.0":"2022-05-25T08:46:27.579Z","1.0.0-canary-24-23.0":"2022-05-25T09:08:01.728Z","1.0.0-canary-24-24.0":"2022-05-25T09:17:57.825Z"},"name":"@asemirsk/bv","dist-tags":{"alpha":"1.0.0-alpha.0","latest":"3.0.0","next":"1.0.0-beta.16","canary-24":"1.0.0-canary-24-24.0"},"versions":{"1.0.0-alpha.0":{"name":"@asemirsk/bv","version":"1.0.0-alpha.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/components":"1.0.0-alpha.0+28ce15a","@asemirsk/core":"1.0.0-alpha.0+28ce15a","@asemirsk/fclasses":"1.0.0-alpha.0+28ce15a","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"28ce15a6b1c49e6f984d59ff1db29bac050fe78d","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.0-alpha.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-Icih/cmqRrSYFF1aUiRmiWJsP1yGkJgEPiuxO5b0exWT4GdMKQr8zr3cZOjrcbpgA+sXXDtAX5329Y7m+zYnQQ==","shasum":"3249d0165e28c478e48be8f0d6cec9cc7b144bc6","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.0-alpha.0.tgz","fileCount":4,"unpackedSize":28379,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDXE+/GPpCIdZwVPCSj+3oWLtjs05T/xPPtyip7Quz06AiBjDhznE2t8V1FoOh4+GNIixf3FclEknMqMOHkRy6/rcg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiStpIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmraow/9HoPXnhizNFg3evXVbl9TEsyY2CiVHNDexrvBfEBZ4lge5jFt\r\nqt3LxzSZ9pIZc3v8cDAzhsnt/v/xp2wZvfu7cqqzbZ+fg3ZCiMPbIfGnBISU\r\ntE/mz3vogM3V8f/FUeM4N65Oh2IJUGysTOfjHxcv2HKZ+SRsNvSTTqI44Vx/\r\nL45LqECgzEWRkCJh6Po/KKx2zWV1R3puWfwQMPM+SDAGOdjH4cpd96P2vw9s\r\nr5INsiWYFX1iaUXIW1pF/hmNx9xhxVgDoHb8walw2qU/51/AeNWEzTw8F5oE\r\ndgs+LGFh3T+Op6w19xYIP18V2jTx0zAvT27dHZo9x29D4gxMIleGa1yZbB9S\r\nCmvbMn+DcdBsuo1aCLNcilHdqKeP+iVT7u0SdA1KlrCInjp+zTP7MsxKFTQ/\r\nnpo04mM9FrBRRjTG0mTmHzGLgzmgnz0qnbF7+Tec8R5ffxF9nNVBo8cxOdt+\r\np+0ssiF1BorDP2Y3AzPy+NBoINXL2wRBRkQf3bTwQCacyRcF1lk12TE4qnby\r\nY2HqbspqIIMwEScF7y0d+77JKvKGB2i4OS4rsvrnN/kJRsbJO/H/aXmZP4+t\r\nPj4pEadWMHjHsWR0IfnJkIpq1VL84/Mnpxs5fiWB8RdflCyAJf9PZexRQoIl\r\n+N2FdXB+lT+zkz0k+cdy82rt6SEy95NsRxc=\r\n=/YUD\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.0-alpha.0_1649072712186_0.038894608628677"},"_hasShrinkwrap":false},"1.0.0-beta.5":{"name":"@asemirsk/bv","version":"1.0.0-beta.5","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/components":"^1.0.0-beta.5","@asemirsk/core":"^1.0.0-beta.5","@asemirsk/fclasses":"^1.0.0-beta.5","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"e6beb3c3e2c8fcff324e0e741ec5746fc55ec312","readme":"# Bazaarvoice Component\n\nThis component provides ability to place [Bazaarvoice](https://www.bazaarvoice.com/) Reviews into a site.\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and both [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n* [Configuration](#configuration)\n* [Conversations Version 1](#bazaarvoice-version-1)\n* [Conversations Version 2](#bazaarvoice-version-2)\n* [HOCs](#bazaarvoice-hoc39s)\n* [BV Loader Provider](#bvloaderprovider)\n\n## Configuration\n\nThis section describes configuration steps required in order to use BV Components.\n\n### Prerequisites\n\nIn order to use BV components, you need to know:\n\n* URL of main Baazarvoice script. Example: `https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js,` or\n* client_name, site_ID, environment and locale of your Baazarvoice account.\n\n### How to configure\n\nIn order to connect your BV components to BV service, you need to set BV_SCRIPT environment variable to main BV main script url:\n\n``` bash\nBV_SCRIPT=\"https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js\"\n```\n\nAltenatively, you can set the following environment variables\n\n``` bash\nBV_CLIENT_NAME='clientid'\nBV_SITE_ID='main_site'\nBV_ENVIRONMENT='staging'\nBV_LOCALE='en_US'\n```\n\nBy default, [Display integration V2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html) is enabled.\n\n### How to enable Display Integration V1\n\nIf you want to enable [Display Intergration V1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\nIf you configure the connection by setting BV_SCRIPT in environment variable, then no additional settings is required, just ensure the script you set ends with bvapi.js.\n\nIf you configure the connection by setting BV_CLIENT_NAME, BV_SITE_ID, BV_ENVIRONMENT, BV_LOCALE, you need to set the following environment variable\n\n``` bash\nBV_API_VERSION=1\n```\n\n# BazaarVoice Version 1\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviewsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviewsV1 />\n```\n\n### BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatingsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVInlineRatingsV1 />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummaryV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummaryV1 />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice Version 2\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviews } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviews />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVReviewsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVReviews = asBVReviewsBlue(BlueBVReviews);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVReviews />\n```\n\n## BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatings } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\nconst redirectUrl = \"http://localhost/testUrl\"; // set it you want to include a hyperlink in an inline rating\nconst seo = false; // set it if you want to enable/disable rendering of schema.org metadata\n<BVInlineRatings redirectUrl={redirectUrl} seo={seo} />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVInlineRatingsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVInlineRatings = asBVInlineRatingsBlue(BVInlineRatings);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVInlineRatings />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummary } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummary />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVRatingsSummaryBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVRatingsSummary = asBVRatingsSummaryBlue(BVRatingsSummary);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVRatingsSummary />\n```\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice HOC's\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with Bodiless data handlers.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBodilessBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asBodilessBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to compose his/her own BV component. asBodilessBV provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asDesignableBVComponent\n\nOne can use this HOC in order to compose his/her own BV component. asDesignableBVComponent provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asDesignableBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asDesignableBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with bodiless data handlers and product edit form.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asEditableBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asEditableBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## withBVLoader\n\nOne can use this HOC in order to enhance his/her custom BV component with loading main BV script.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { withBVLoader } from '@bodiless/bv';\nconst BVComponentWithLoader = withBVLoader(YourCustomBVComponent);\n```\n\nThen you can add your component on a page\n\n``` js\n<BVComponentWithLoader />\n```\n\n# BVLoaderProvider\n\nOne can use this component in order to add main Baazarvoice script to the page himself/herself. It might be helpful to add this component from performance and UX perspective when there are a lot of BV widgets on the same page.\n\n## Usage\n\nFirst, you need to compose your custom BV components.\n\n``` js\nimport { BVRatingsSummaryBase, BVReviewsBase, asBodilessBV } from '@bodiless/bv';\n\nconst CustomBVRatingsSummary = asBodilessBV(BVRatingsSummaryBase);\nconst CustomBVReviews = asBodilessBV(BVReviewsBase);\n```\n\nThen, you should ensure BVLoaderProvider is imported on our page\n\n``` js\nimport { BVLoaderProvider } from '@bodiless/bv';\n```\n\nThen, you can add BVLoaderProvider and our custom components on a page\n\n```js\n<BVLoaderProvider>\n  <CustomBVRatingsSummary />\n  <CustomBVReviews />\n</BVLoaderProvider>\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.0-beta.5","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-kPUfE/gbKDjaX/YmduQLuKoX/7jBrjphNWA7uOVz5c4pA2mI9ik7oE2ihD1DN7IF+jQsKkT5+E5EoK4Kwnevcg==","shasum":"6194213554082fa03d2136ccbcc4284abbc213ee","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.0-beta.5.tgz","fileCount":4,"unpackedSize":28346,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGVz+NmA2/g/YZcvamGH45NY+oBjY1sDl7tpgbDPTtjxAiBAZhU1ahsEqilpE2h+1IDAPoM9iYWwG5DpToAD2awNKw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiSvlYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+mA//Yj/2nNPyG0OHIZcOJ2e8Kkbch5wfLQGal0Lfc+xrOayuN6tT\r\no4jg+1VfdVDWONzx6fD8v90Ry+Mk/8YGEltCVhWnFrtiBIDYCji+LfdsMVRA\r\nR26F605U8rRbUghg43NX1/vo9BVL7l/0v1wxRjRZIKl1ZdxCnT4RAP8jc8pT\r\nyF0Asu6dSfIqQWsNfWV7Qrg+FpTqSksg90til4YVdFF+E5jCFKGbqoRQmvTy\r\nHIk1VslpzkFlu4zReNRA/93Z0lEnT1gABSXGeK2hm69RS1NHm3kidJFZ23Q2\r\n4Xc8Zjs6JOGizaQrLEXxrt1lF21trWDopJqX2e/8ER0TVY7h7R3zS4b7IBQE\r\n/EUgD/DTzFv9+3sZpHr/FvtwzZWolY8NRMBRzDN827GkCYU1v9SX3X+tr5lE\r\nMbe7Z4RKmCuCXndZ7dMsarOYJYrDu8bfu5grCNSsMvv2TgZE7p7Y++c2piTj\r\nEOlD6T0AGPyXEcr2PhTQAbrRyHmcP1H4QNaPb6315ASxQQQPsN1V/wA5hI4q\r\n1lPhZHry3VkZucNFk9JVbrp6UbQUA5D4IQvgZud8jvd40BOL0CwKqbcGc/Fe\r\nw07MHDOj7IPixk4KG4atuEl0+uoGLeDwAooQTzwf9KIdZwaegTADKwC4RmFn\r\nOTM8k+8B9Fv4kKmglbsindT3z954/MXVkNs=\r\n=KKDa\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.0-beta.5_1649080664731_0.7323454465895591"},"_hasShrinkwrap":false},"1.0.0-beta.6":{"name":"@asemirsk/bv","version":"1.0.0-beta.6","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.0-beta.6","@asemirsk/components":"^1.0.0-beta.6","@asemirsk/core":"^1.0.0-beta.6","@asemirsk/fclasses":"^1.0.0-beta.6","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"cbd97725152f2362bb86e6d4bba02043e3c4570e","readme":"# Bazaarvoice Component\n\nThis component provides ability to place [Bazaarvoice](https://www.bazaarvoice.com/) Reviews into a site.\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and both [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n* [Configuration](#configuration)\n* [Conversations Version 1](#bazaarvoice-version-1)\n* [Conversations Version 2](#bazaarvoice-version-2)\n* [HOCs](#bazaarvoice-hoc39s)\n* [BV Loader Provider](#bvloaderprovider)\n\n## Configuration\n\nThis section describes configuration steps required in order to use BV Components.\n\n### Prerequisites\n\nIn order to use BV components, you need to know:\n\n* URL of main Baazarvoice script. Example: `https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js,` or\n* client_name, site_ID, environment and locale of your Baazarvoice account.\n\n### How to configure\n\nIn order to connect your BV components to BV service, you need to set BV_SCRIPT environment variable to main BV main script url:\n\n``` bash\nBV_SCRIPT=\"https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js\"\n```\n\nAltenatively, you can set the following environment variables\n\n``` bash\nBV_CLIENT_NAME='clientid'\nBV_SITE_ID='main_site'\nBV_ENVIRONMENT='staging'\nBV_LOCALE='en_US'\n```\n\nBy default, [Display integration V2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html) is enabled.\n\n### How to enable Display Integration V1\n\nIf you want to enable [Display Intergration V1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\nIf you configure the connection by setting BV_SCRIPT in environment variable, then no additional settings is required, just ensure the script you set ends with bvapi.js.\n\nIf you configure the connection by setting BV_CLIENT_NAME, BV_SITE_ID, BV_ENVIRONMENT, BV_LOCALE, you need to set the following environment variable\n\n``` bash\nBV_API_VERSION=1\n```\n\n# BazaarVoice Version 1\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviewsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviewsV1 />\n```\n\n### BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatingsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVInlineRatingsV1 />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummaryV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummaryV1 />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice Version 2\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviews } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviews />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVReviewsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVReviews = asBVReviewsBlue(BlueBVReviews);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVReviews />\n```\n\n## BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatings } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\nconst redirectUrl = \"http://localhost/testUrl\"; // set it you want to include a hyperlink in an inline rating\nconst seo = false; // set it if you want to enable/disable rendering of schema.org metadata\n<BVInlineRatings redirectUrl={redirectUrl} seo={seo} />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVInlineRatingsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVInlineRatings = asBVInlineRatingsBlue(BVInlineRatings);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVInlineRatings />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummary } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummary />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVRatingsSummaryBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVRatingsSummary = asBVRatingsSummaryBlue(BVRatingsSummary);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVRatingsSummary />\n```\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice HOC's\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with Bodiless data handlers.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBodilessBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asBodilessBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to compose his/her own BV component. asBodilessBV provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asDesignableBVComponent\n\nOne can use this HOC in order to compose his/her own BV component. asDesignableBVComponent provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asDesignableBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asDesignableBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with bodiless data handlers and product edit form.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asEditableBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asEditableBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## withBVLoader\n\nOne can use this HOC in order to enhance his/her custom BV component with loading main BV script.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { withBVLoader } from '@bodiless/bv';\nconst BVComponentWithLoader = withBVLoader(YourCustomBVComponent);\n```\n\nThen you can add your component on a page\n\n``` js\n<BVComponentWithLoader />\n```\n\n# BVLoaderProvider\n\nOne can use this component in order to add main Baazarvoice script to the page himself/herself. It might be helpful to add this component from performance and UX perspective when there are a lot of BV widgets on the same page.\n\n## Usage\n\nFirst, you need to compose your custom BV components.\n\n``` js\nimport { BVRatingsSummaryBase, BVReviewsBase, asBodilessBV } from '@bodiless/bv';\n\nconst CustomBVRatingsSummary = asBodilessBV(BVRatingsSummaryBase);\nconst CustomBVReviews = asBodilessBV(BVReviewsBase);\n```\n\nThen, you should ensure BVLoaderProvider is imported on our page\n\n``` js\nimport { BVLoaderProvider } from '@bodiless/bv';\n```\n\nThen, you can add BVLoaderProvider and our custom components on a page\n\n```js\n<BVLoaderProvider>\n  <CustomBVRatingsSummary />\n  <CustomBVReviews />\n</BVLoaderProvider>\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.0-beta.6","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-qeyFwYtt82RFiKZRI4CSUOqirpRQMBnxPT79Osh3qbXFw3USh91ViLsa76ecU/z9pWH7pNT+MMVSVvnw97JV+w==","shasum":"5f7e3409be5d467f54badce054f48a4c7ebe75b1","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.0-beta.6.tgz","fileCount":4,"unpackedSize":28384,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsTsyCBqMahEy7b1MrByOJ2BSD4ZIU7OR2vjYtp/NZngIhAM0/AXqTHOA9lqXtG4Sml3dA4rXrxfo2pYLJPCP1uYoh"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUJR4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrkiA/+MigqoBbE7t14hc7/mX3cq9Qthl4LaDQ8ZROSC6YLcYRky88z\r\n6XtFzXQ7RiFtZmWg/g9vW/ESSehDNEhZRlplVShDYnFKcV4KlL+4/CuEXxYq\r\nBiphmcpY4/ASDzd4j0RsAeQSjxTbhFbvUBUQlks9KHVN4+VJY3amXwKTOJ1Q\r\nzjkyWy77k6IrF0+e8hNkOfV2GmhZUSmEGzehf5YBvf7HR0oN8ciYkiNPyPay\r\n5i5lOcV+IARVAxSBzjakGcUlWM4A57K0EBHyXykijkT+iu7/V5tSSYNvQgjP\r\ns/tXFp/RWXFdqqJPjwoyS7A3sUcHwv9AUKGVv5a0VtMdlzRa0fqTr3WR6N55\r\nfx5g4RNxWuaZvFDjwS4uUVnZBM2PTm0BroIRSvC7uv0X8aVPxF8aC46rqzQx\r\nR/zvAEAZT10IZjFQ5BJltNISgtFHgfAF5bttC5RVmFrNo7B6vU4TUFh8wmEo\r\ndG5/cdf2u4U8v+T9tTeb4fTmecslnCBPWtcJTcqK6SUlA7bGPKuxc+g/lmWN\r\nIxnXnCM3TOG0Ndk8N708fcqwbqDj05ZpuBbW5pjaCXbXNStR6+Ae8lym4te9\r\nsR1cO1BxB5UJey0/wyDxH77VEdSKIPEwph8gHmSL1Jk8ncUIVZeHcDKKNgPv\r\nvLc+LmFIbYvh/VsMocEkbN+pTkF7fuqAH0E=\r\n=GpBZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.0-beta.6_1649448056115_0.29219353976635976"},"_hasShrinkwrap":false},"1.0.1-beta.6":{"name":"@asemirsk/bv","version":"1.0.1-beta.6","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.1-beta.6","@asemirsk/components":"^1.0.1-beta.6","@asemirsk/core":"^1.0.1-beta.6","@asemirsk/fclasses":"^1.0.1-beta.6","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"dfbcb3dab592c76bd48c138c275c1e27fbd9ca1d","readme":"# Bazaarvoice Component\n\nThis component provides ability to place [Bazaarvoice](https://www.bazaarvoice.com/) Reviews into a site.\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and both [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n* [Configuration](#configuration)\n* [Conversations Version 1](#bazaarvoice-version-1)\n* [Conversations Version 2](#bazaarvoice-version-2)\n* [HOCs](#bazaarvoice-hoc39s)\n* [BV Loader Provider](#bvloaderprovider)\n\n## Configuration\n\nThis section describes configuration steps required in order to use BV Components.\n\n### Prerequisites\n\nIn order to use BV components, you need to know:\n\n* URL of main Baazarvoice script. Example: `https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js,` or\n* client_name, site_ID, environment and locale of your Baazarvoice account.\n\n### How to configure\n\nIn order to connect your BV components to BV service, you need to set BV_SCRIPT environment variable to main BV main script url:\n\n``` bash\nBV_SCRIPT=\"https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js\"\n```\n\nAltenatively, you can set the following environment variables\n\n``` bash\nBV_CLIENT_NAME='clientid'\nBV_SITE_ID='main_site'\nBV_ENVIRONMENT='staging'\nBV_LOCALE='en_US'\n```\n\nBy default, [Display integration V2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html) is enabled.\n\n### How to enable Display Integration V1\n\nIf you want to enable [Display Intergration V1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\nIf you configure the connection by setting BV_SCRIPT in environment variable, then no additional settings is required, just ensure the script you set ends with bvapi.js.\n\nIf you configure the connection by setting BV_CLIENT_NAME, BV_SITE_ID, BV_ENVIRONMENT, BV_LOCALE, you need to set the following environment variable\n\n``` bash\nBV_API_VERSION=1\n```\n\n# BazaarVoice Version 1\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviewsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviewsV1 />\n```\n\n### BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatingsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVInlineRatingsV1 />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummaryV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummaryV1 />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice Version 2\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviews } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviews />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVReviewsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVReviews = asBVReviewsBlue(BlueBVReviews);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVReviews />\n```\n\n## BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatings } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\nconst redirectUrl = \"http://localhost/testUrl\"; // set it you want to include a hyperlink in an inline rating\nconst seo = false; // set it if you want to enable/disable rendering of schema.org metadata\n<BVInlineRatings redirectUrl={redirectUrl} seo={seo} />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVInlineRatingsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVInlineRatings = asBVInlineRatingsBlue(BVInlineRatings);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVInlineRatings />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummary } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummary />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVRatingsSummaryBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVRatingsSummary = asBVRatingsSummaryBlue(BVRatingsSummary);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVRatingsSummary />\n```\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice HOC's\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with Bodiless data handlers.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBodilessBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asBodilessBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to compose his/her own BV component. asBodilessBV provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asDesignableBVComponent\n\nOne can use this HOC in order to compose his/her own BV component. asDesignableBVComponent provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asDesignableBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asDesignableBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with bodiless data handlers and product edit form.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asEditableBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asEditableBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## withBVLoader\n\nOne can use this HOC in order to enhance his/her custom BV component with loading main BV script.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { withBVLoader } from '@bodiless/bv';\nconst BVComponentWithLoader = withBVLoader(YourCustomBVComponent);\n```\n\nThen you can add your component on a page\n\n``` js\n<BVComponentWithLoader />\n```\n\n# BVLoaderProvider\n\nOne can use this component in order to add main Baazarvoice script to the page himself/herself. It might be helpful to add this component from performance and UX perspective when there are a lot of BV widgets on the same page.\n\n## Usage\n\nFirst, you need to compose your custom BV components.\n\n``` js\nimport { BVRatingsSummaryBase, BVReviewsBase, asBodilessBV } from '@bodiless/bv';\n\nconst CustomBVRatingsSummary = asBodilessBV(BVRatingsSummaryBase);\nconst CustomBVReviews = asBodilessBV(BVReviewsBase);\n```\n\nThen, you should ensure BVLoaderProvider is imported on our page\n\n``` js\nimport { BVLoaderProvider } from '@bodiless/bv';\n```\n\nThen, you can add BVLoaderProvider and our custom components on a page\n\n```js\n<BVLoaderProvider>\n  <CustomBVRatingsSummary />\n  <CustomBVReviews />\n</BVLoaderProvider>\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.1-beta.6","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-LpiivTDsHkEAH660OXv24QLg8AM5bWAL/KCQQmT5X0tJOJDR4A0CIn0QRrYO9s+R+XjFHA9jr5WEy8Yi/bi5xg==","shasum":"06d105a0c3858b2cf1d981877e867af6b6e0f093","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.1-beta.6.tgz","fileCount":4,"unpackedSize":28384,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEU8cj8mAhsEHH/SzmgxCMRVvLiaabHeIIkjLfTPJzeYAiEA31Hw2JCBQXXMttqnR4jF7Y8IXddgObiq4dZ8U+7MX1Y="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUJV0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrD2A//bi+qevfXADqTDRFdgEUZZrIGkJPLXshZ9dlLbmHyq4r0CgI0\r\n4VwuTN0igIGn+vsIH5l3N+UCK5Pk7HLw0O8/twwwquryOuuKiDFwlftil/Og\r\nPvXcosxROAkgyA5l382MCJ0qDi3zQKElY3jwD2oZCUTCvlI1/Ly2Evdb/txI\r\nJ2h6zJTg//x81c5I+LUJjhgjXOt2skK4CdnQVZfLGIgmk/FaG/ODs2NI2OR3\r\nK5Y3KYaKz/szMiTAOkc+YlntdMq5EtGdpmYkZ8o0PMVDbnLkbJdfhBlbsNyV\r\nnt8wyPAsmKt/dqgdPaZllm8a4lexLt1L6b3TnwpjdkJfS0k7j2O+AbUUu4SQ\r\ny4XdDPJprW/sSb4BjgkAwiuFp1Jo296MVOAeeEba0AqUh7vBwCTBdM/BpcJi\r\nBIukoPycbKBvZwLufcrZkZWNlQp4DTRGKDs4O9408LJwgQNWXzEy+GyoSYft\r\neW3OrIj3ApejMdoclCGjQkZqjBUPrShYpu7R+dNcMa4tGyYFe+iUg1uVeDea\r\nsZqoWRnvCnhrjsnBVkH4BQiqK1f0yzpNBQ/3AtIm/+Kkh3/aR5WSnVkdVDZR\r\n+Fx9roAYbRViAN5YFEInXxvA9JknSqMP1bxx311OZcg1DOiWO6hGo1v3dcD6\r\nJc0RwV9B16ck+sKT8J69oCLOF7UG9n3jhic=\r\n=qAhH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.1-beta.6_1649448307894_0.19459598147014012"},"_hasShrinkwrap":false},"1.0.1":{"name":"@asemirsk/bv","version":"1.0.1","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.1","@asemirsk/components":"^1.0.1","@asemirsk/core":"^1.0.1","@asemirsk/fclasses":"^1.0.1","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"b943f745d8dc223a872b770f79f3e0db78f43486","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.1","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-67SPq54GAz9606tXvcm13XLgHFehrSxhRoDYGiy8EJrkATaTCLjxkvS81JaErJ7aQocaz33crlhjD2AQqQ0Hqg==","shasum":"fdfbd8b56986ab0c462d02239a8022ed4df26df5","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.1.tgz","fileCount":4,"unpackedSize":28349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLInDdbYH8Yd0YuU5FLeFn8+eqYv6K+EMrJ/uzSFBltgIhAO2VCAq78ZAXV1cMeMd+uHtwi29Br6YqDDxVW049j6D5"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUJaMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+oA/+P64oJGtopw0WcF4decqgF8/8T+NJFc0AqHv36apoysOchMiW\r\nCIJPjPDtAsOBtW4RGiBEutJox2RsZ+Phox4E72D5TfR35RjlwLQOB130L9Mo\r\nBUYkjqpBRlxIV3q9shcOmf+yRH7qyPoKDKbvvqZ/7PBMTiEY6IBRM0oN2tsy\r\nsJLqpbFqUP+BU2A3PBvAAQ7q3+c1WcTCzwoFbXhMbOjOQhZFvSWh/rbhQV8A\r\nPUDHuJxKKGrJs+i2bCqslMYjkDTHGEOugYqZkxf8/9TnAXJ0C67HFsIi521n\r\nIDEbb8DXEkWEhbqS//DAYWbw79A7CI64hEkLt2yKXAl/0xD6sN4Rr0m1UOea\r\nxQpsuXURoze2FSBd8GL279q9odtR1t01ZNhR2UAPFPgRJYczIDt0AduroWQB\r\n3gqs4cAJfYVmJ/WGaAwuyc/f8M/PxTpWSf8mWDtcVRW6bOlyExe/sX28B4Es\r\nMbYnX9zpvHCJnCELGe0FAofjlyoaNAAQHNPFlQtJ/s1+49PrjMAKV459xdzm\r\nCh+BtHe9buRb/HH6Fnqn6m/xmF/epEVTyPBdO5wdkHLHCe3WbOcuhiP3olw/\r\nmxklkqOJVfM15wbj/EWF0lvsSpRWrqv2hsaCdIs1fxOLRW+3N6ipUi3QIXxe\r\neNlTVfkimMSLr3td1o8tVdYiBmBp/UyzR7Q=\r\n=zfGJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.1_1649448588107_0.005220132140205891"},"_hasShrinkwrap":false},"1.0.2-beta.0":{"name":"@asemirsk/bv","version":"1.0.2-beta.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.2-beta.0","@asemirsk/components":"^1.0.2-beta.0","@asemirsk/core":"^1.0.2-beta.0","@asemirsk/fclasses":"^1.0.2-beta.0","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"da62659a8fb42aa89cdc8cae2f148c8dd8db5dcb","readme":"# Bazaarvoice Component\n\nThis component provides ability to place [Bazaarvoice](https://www.bazaarvoice.com/) Reviews into a site.\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and both [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n* [Configuration](#configuration)\n* [Conversations Version 1](#bazaarvoice-version-1)\n* [Conversations Version 2](#bazaarvoice-version-2)\n* [HOCs](#bazaarvoice-hoc39s)\n* [BV Loader Provider](#bvloaderprovider)\n\n## Configuration\n\nThis section describes configuration steps required in order to use BV Components.\n\n### Prerequisites\n\nIn order to use BV components, you need to know:\n\n* URL of main Baazarvoice script. Example: `https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js,` or\n* client_name, site_ID, environment and locale of your Baazarvoice account.\n\n### How to configure\n\nIn order to connect your BV components to BV service, you need to set BV_SCRIPT environment variable to main BV main script url:\n\n``` bash\nBV_SCRIPT=\"https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js\"\n```\n\nAltenatively, you can set the following environment variables\n\n``` bash\nBV_CLIENT_NAME='clientid'\nBV_SITE_ID='main_site'\nBV_ENVIRONMENT='staging'\nBV_LOCALE='en_US'\n```\n\nBy default, [Display integration V2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html) is enabled.\n\n### How to enable Display Integration V1\n\nIf you want to enable [Display Intergration V1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\nIf you configure the connection by setting BV_SCRIPT in environment variable, then no additional settings is required, just ensure the script you set ends with bvapi.js.\n\nIf you configure the connection by setting BV_CLIENT_NAME, BV_SITE_ID, BV_ENVIRONMENT, BV_LOCALE, you need to set the following environment variable\n\n``` bash\nBV_API_VERSION=1\n```\n\n# BazaarVoice Version 1\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviewsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviewsV1 />\n```\n\n### BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatingsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVInlineRatingsV1 />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummaryV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummaryV1 />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice Version 2\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviews } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviews />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVReviewsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVReviews = asBVReviewsBlue(BlueBVReviews);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVReviews />\n```\n\n## BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatings } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\nconst redirectUrl = \"http://localhost/testUrl\"; // set it you want to include a hyperlink in an inline rating\nconst seo = false; // set it if you want to enable/disable rendering of schema.org metadata\n<BVInlineRatings redirectUrl={redirectUrl} seo={seo} />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVInlineRatingsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVInlineRatings = asBVInlineRatingsBlue(BVInlineRatings);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVInlineRatings />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummary } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummary />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVRatingsSummaryBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVRatingsSummary = asBVRatingsSummaryBlue(BVRatingsSummary);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVRatingsSummary />\n```\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice HOC's\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with Bodiless data handlers.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBodilessBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asBodilessBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to compose his/her own BV component. asBodilessBV provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asDesignableBVComponent\n\nOne can use this HOC in order to compose his/her own BV component. asDesignableBVComponent provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asDesignableBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asDesignableBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with bodiless data handlers and product edit form.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asEditableBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asEditableBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## withBVLoader\n\nOne can use this HOC in order to enhance his/her custom BV component with loading main BV script.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { withBVLoader } from '@bodiless/bv';\nconst BVComponentWithLoader = withBVLoader(YourCustomBVComponent);\n```\n\nThen you can add your component on a page\n\n``` js\n<BVComponentWithLoader />\n```\n\n# BVLoaderProvider\n\nOne can use this component in order to add main Baazarvoice script to the page himself/herself. It might be helpful to add this component from performance and UX perspective when there are a lot of BV widgets on the same page.\n\n## Usage\n\nFirst, you need to compose your custom BV components.\n\n``` js\nimport { BVRatingsSummaryBase, BVReviewsBase, asBodilessBV } from '@bodiless/bv';\n\nconst CustomBVRatingsSummary = asBodilessBV(BVRatingsSummaryBase);\nconst CustomBVReviews = asBodilessBV(BVReviewsBase);\n```\n\nThen, you should ensure BVLoaderProvider is imported on our page\n\n``` js\nimport { BVLoaderProvider } from '@bodiless/bv';\n```\n\nThen, you can add BVLoaderProvider and our custom components on a page\n\n```js\n<BVLoaderProvider>\n  <CustomBVRatingsSummary />\n  <CustomBVReviews />\n</BVLoaderProvider>\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.2-beta.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-s/u1Vt8iqG0YcHaW5Pr3dNcG8FOxyrHWN5OQazEPGyjme/7fbUefoilSbQ2uBEFQb78LZKzTAq/ZQyICdgq/Gw==","shasum":"9dc6b1d26bec1f07fa099bc15ce7ecf553e34a91","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.2-beta.0.tgz","fileCount":4,"unpackedSize":28384,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDS++/kLteVdbRFA/mhyD6EP/MoJ96fqsZcn1oHbZuoFgIhAKDN/xYIf/UPuwkjxLdzD0XPIOa2BY/9n/YbMjN4q+Pp"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUJjIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5FQ/9GoxjCpzZb0cKCebv0XszmIshZBGDifLuk8QW6Ylaag0d2OU2\r\nNaLXIjxxyITzmr3yCot9E6I6Eze1TIwIbSi2LrjOCq9+mJ/EXTlZzfZPcfzK\r\nGJ5aPeXednY+yRi6RiqbmQuMf9cWz7AhL1MAf/MypNMBWSjsg8OBXFtbksXz\r\nbCQ0TWcu6VG4jTrLUcdkwpDtVl8eKEIWYVOxDcMU+0YQTd9lRUiddG6Zx+lh\r\nJM0bhL/lXuJvFfUEVTVEV5v7GETrWTgQgU/YRlR8UcL3vO6pXBH1MinrgYb+\r\nUEHwEvuww9YjI7i9bOE9N4oI9DEDokxVyHDxIi8ZLL8xyqXGLvbbEdt0gvIG\r\nbzPonh5G7ObgHZ08MsY8J+HlKepdrRE7OLzZ9OuFXg6bFlrvpsCUxCFcALDs\r\n/2IB0zk1d/xeY1y3GIPySk2vAPmeKs6q/zpxdS7ULRl8AQEAiGR2GJOH5AxW\r\nvlJnIuOA/WJf8paXjhcwIvfzmyZec16Igz23EdYcSZTmDwerywd2JjOU/774\r\n4xEtu8kk7IcfTQVZk9fKlZAzokJTbNQam5xjLblBuVRWpgV0gzywd0X7Rrce\r\nbdY6ZGw3IIV4KquD/3fOqEdNo5F1dSltZT2vVRv0DN72cHJCUO3ikl8kyQtp\r\nS3IVSwmIWDLLM4ChJ7XHKuY0bgsdEgjVUdQ=\r\n=GVd1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.2-beta.0_1649449160577_0.4792398244710694"},"_hasShrinkwrap":false},"1.0.2":{"name":"@asemirsk/bv","version":"1.0.2","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.2","@asemirsk/components":"^1.0.2","@asemirsk/core":"^1.0.2","@asemirsk/fclasses":"^1.0.2","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"19cad7cb078a3029c7b40248078ddfa4d413bdcc","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.2","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-kCqeCYS96lp44SKKfSV3HuZkex1K0riaG5MMverx+3giDkf+60+aSlmIcLFKZFhyDxYy4u8lV3UVWr0p98y+yA==","shasum":"74a266127d2e041a59a087c5bd1dd3114e1f7d29","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.2.tgz","fileCount":4,"unpackedSize":28349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE0MNH75sl+g7rVjake3r5P8yBVyrwv+/UDQzVJXVUOyAiEAgy3akIGOl/1muMQ1hJTujHb9iXPkgW+hb04pis8QPiM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUJmCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqq5hAAit1DorrmcNhZa2ElJYWwjiXW+d2q3sdNcCHj67oAZ1/jcDyv\r\ncnaX6Dt8DUDnQD7qQ3bNZbg5i7OfTKnvyaLksy/O68kKVZlOYzWK7kHsI/lO\r\n5uwAAuYw48fLYKDHocMlNG9KNbdc8p5Wd49Oh4oQUiFII2vgSctngJEbDF5Q\r\n9w7eiD2278PCeHY9Qvu+rYDBrWjgc2Qii3TSy4h1uQGohnaih5MNsEBIcKJb\r\nZCOOhxlUvJ7c20iQ3ywPH6Hz1yOZgAEa2SY51suBcLWnT2fIy2hEM3n9q6pu\r\n8iT9Ddzc76JK1RVwSP+KYmV4xFkA3BZFytSE4eGb2nUsa6znQWOhtZC01BBn\r\nsY98Ht2BC6RA53n5HzTLWgmD+DB7Jbm0DBir3Ez5VcZiph6RvbskM16VICdl\r\nxyvYy6rzGmgiKs5xXPSjssdr6YUArejHLlKGcE+1pesDfJDE/Kd8X7PEoQCq\r\ntHrhsZY4+TglGreQuo+U2IJSgMpNb1Y4Og7IGatfHKyZce78HSm1tJQ3hLb/\r\nlCHbpkBlw1T+yhp7+/8jNia3rhkQbNDyV+56QcgU65k6DRQBgWDBjdl8DV/Z\r\nK19Wdl2kNT0Tm1shgzpRMq5fR4umUJph8t8pN8+MZMek1sKF0rJHS1n1VfJg\r\nyGQYRTAHZkUTuFRi0So8IWLIU7v5E+8QgYw=\r\n=o1xv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.2_1649449346376_0.5148167925632483"},"_hasShrinkwrap":false},"1.0.3":{"name":"@asemirsk/bv","version":"1.0.3","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.2","@asemirsk/components":"^1.0.3","@asemirsk/core":"^1.0.3","@asemirsk/fclasses":"^1.0.3","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"b46d91ae36b8631daaeaf0e17b4197086a98c2f9","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.3","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-iN5M6t8q88Pp74sHPh6Re7qLBlp8iYcqNTe2fjlLczst+cbALnPas+uT/x7z82MNzGUyZDCitEk5gkvWyivf7g==","shasum":"1331159d8b4e345bddca4ef36d101562f0e2ae89","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.3.tgz","fileCount":4,"unpackedSize":28349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD034BYGQWijS0ZwQep3+qFc35wMelCd/uEtASvdZezVAIhAPVMZtTPXz0gyuA3yFZ5X6XcyP+LclsyfbO0u2WfEggx"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUJp2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0jhAAhS7edB+5998c0Tz3h12T2DvMxuqZLB0ciHEFOd9M32RsaJbD\r\nvfLhIGTcSePMZA+b1MyLmvlpm6dvmYyPvAA6HVUhGv1/L5r4SEKOZOcClGfh\r\nDT8m0EvnykkS6pU02K3QLbuis9zIpn9If0ci7pqRI13Ynf6Qr68hiG/M43S/\r\nwJ9r+Mx6oaY1YDzqpGp8RUBe3W0+8Gt6FiB2OlJtQaKXgtNkPWe3p6Edv5PF\r\nnKARIqdylQGLCk8iUxqpCx3TW0Q4uUg3AZBeZRWMGW6Xap8QsmYvw0joXOi9\r\n0vSSRMa3FerlL74mHxBWo5FBmqIbaFxbt5G+pLwROBjEuNNWcjm20PQs3y0c\r\n9pSGEGJW3uu7EiaGlUpcCet5bj3zr6hZCKXBmfiJ7kn+uzVUDRgNgAdtx/Uf\r\nlAXi814V8zWCMXZbPGJypdRHuwQ12fi5LpD+ONl6f8Y0iso1uhE+wVf8m6sM\r\nb6Tlc7a8QSl5B/favRMMmLJeNwylKITZ4WhRZG5lA31fymFg9E8OEIJjpRFy\r\nLmz8R9waDrFkkKFlDcNp0x/AX454mhf/7xVZc3clOJmAkspVWv5xWs0Rj1vl\r\nXXHG0JUAup6Zp1670z7x/bU8svIFb3CS5H6NBoAnc8em/Uhhz4qB8uQXCHog\r\nk/8vxNZDyf1bNxh9jQZpvBxwLlqBEdxKWxM=\r\n=jbZV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.3_1649449590297_0.8798685765348822"},"_hasShrinkwrap":false},"1.1.0":{"name":"@asemirsk/bv","version":"1.1.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.1.0","@asemirsk/components":"^1.1.0","@asemirsk/core":"^1.1.0","@asemirsk/fclasses":"^1.1.0","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"e767bae774cc17eba5d92b638b7628cdc9236086","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.1.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-/O20o0B5LnWoRisNWWyABw/MyTJxGhd+nqChZu3z5Z1GFlSESxxqy6PlVcQBdICtsAvkJajyPCxW516yz1rZbw==","shasum":"6e6a975d558347bbf36893a6322104de324815a8","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.1.0.tgz","fileCount":5,"unpackedSize":29183,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOlG8qg69NkY0kIIOKKUkEK/2Z2l9jREsFdbW91QA2wwIgHlIi8qnTKeb0TLO0X39McK8yeluK25VboNOVTHAdOwY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXtApACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpl+w/+MFXUX0tyL60XVtkWfHEzPfbChMKtf3mHs4DbGpBwJAJUvgqh\r\n7QJbjVt1wj86nWGJ1ACBlJeBscsXb8eXy+wYxbJkgVKTdzbHMT9X0SFIYwix\r\nFHm2EwT5FKlBuGznjVKIGIsfWVjie2Wn8qCzPRTWt2rPQxpvIfPozKWLkIYG\r\nt+9Ct+9HuUGBCxxdLQZaq9rcKN5ebpYOSuAHFnwPyQMNmn1ihi08F50tqwkd\r\nHb30ICyGW3W+VDQkP1nAXTJGmb8HBSqsRxsBgTkWDrZuY7u7cu1nzKtNxPPm\r\nRwE9Y0Y/EZM8jhuyDGJBClqqKAyUImAU/qmw84IRMTWCJmF+0vXjxTPkLYQo\r\nJm4xk8FkaMIIR4CLJW0wQw3KembGTNPp5DP6XYOebPTpZVTydk43b/SzunZj\r\neLC5qPla9bwncfOWNuZIcG/WvWzS69K76efn2IKZWyoiQ0jA6ZATfGSK7Cp0\r\nYbY/zIyeyNPEG7WdL3Vq8gRLbUXBbPU7+6fryErKR4RBLuq+3hrKCsGEuOvM\r\nzzsbhJtVv6NzwbU9MaoENQbamDzB+KBdnsNmgq3ZzBULpTFoQKmZ/4Hi7Rhm\r\n9uQ7gjnhBs7fvP9svOWz9RwCoR1/KS63Fd4NBxpS28fr/RW7zR9nk1Y4zRDr\r\nBHeh6rFqWG46jvuDMR/UitDMfLYOk49MY8w=\r\n=FZhb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.1.0_1650380841253_0.1552910806674499"},"_hasShrinkwrap":false},"2.0.1-beta.0":{"name":"@asemirsk/bv","version":"2.0.1-beta.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.0-beta.6","@asemirsk/components":"^2.0.1-beta.0","@asemirsk/core":"^2.0.1-beta.0","@asemirsk/fclasses":"^2.0.1-beta.0","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"2aebb64eab582696b080b48c5f3475c2759f6408","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@2.0.1-beta.0","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-hYCw32qg4Yr2DjgBeMXpzljzqyuNtHPMrduNbdFvlmHEOuamudLrfa+U5F5OU213139THxmpdMZkyg/n5u3Zgw==","shasum":"af3783facbbcb5850b2d449cb693204a65019e16","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-2.0.1-beta.0.tgz","fileCount":5,"unpackedSize":29218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIESYoue5dAOIf7raQmNgIcw9qwL/2M6Ue9o/HkJdCXRSAiA05ZZfZC9uMll9I3wPED7TN7/MymjdKRkmYxTbGczkeQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJia/erACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGnw/+LGJ4Mg0LuI0ddaTNvHw+3nKZYTGxoxz/V5y5JecmbxRMbZjC\r\nqr7aiX6A76ywoDoxvAQ8vyLJuLAzvFfQeZ2Hn/phas9TPCv0Z89XbGt3z1p/\r\nM1QYKht4PhBh+YvFdJHc4BbejQQ3ZEv9R8n+tJ7BeHNHOlulP18CqFMKggvO\r\nu7OznEy06eNfpD03sL7gYuhuSyG2uis9cHbyhx0TEhnTYLDSOK0FC3sa/2kx\r\nLbRuYDo1G0vIvrPLcFjghZaelxSbS3sZDzeCklxWJjn7TMINM6uyeJzJ0LKs\r\nwgRoIsPngzwwaRJoP7mdYjo5hqkyxb0U7sFcYTZgGQP94TfJL35nTinOJRJK\r\n2/Mm9nFRUcB5p8kEhNG4kcRzLVRPn23hR/7BKX7zxw3nb/pVPqNuz/AhUELc\r\n14Vu1874LhrUNPupftso0Xs1N/cz9LLBMpIB21LDCe2c5BgauAv7Rqz4rBsm\r\nT/CuKWr0BC9D6yd5Yz4vTwLcVhS4bDZkRYqzNKyFpJ0dIRQbO2EP+UKRtEvq\r\nSpsOcBF+d1h1uR6MUc9hz6q1G35rddnuP3+0nsucHo8KAfsQdyQhwEz4e8GK\r\nNBU3qSRT9B4dxVuNeCQE85Qi7JHLxde1yYYx6bQMhaa2VXUuu1o7fMkJ/KPm\r\nGb5zRfNBtTpzugDXldq05P9ckCmaglR/mUk=\r\n=zYOD\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_2.0.1-beta.0_1651242922893_0.13981743723708506"},"_hasShrinkwrap":false},"2.0.1-beta.1":{"name":"@asemirsk/bv","version":"2.0.1-beta.1","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.0-beta.6","@asemirsk/components":"^2.0.1-beta.1","@asemirsk/core":"^2.0.1-beta.1","@asemirsk/fclasses":"^2.0.1-beta.1","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"8651151ffab8ce28ac9424085c9325e3485ba177","readme":"# Bazaarvoice Component\n\nThis component provides ability to place [Bazaarvoice](https://www.bazaarvoice.com/) Reviews into a site.\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and both [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n* [Configuration](#configuration)\n* [Conversations Version 1](#bazaarvoice-version-1)\n* [Conversations Version 2](#bazaarvoice-version-2)\n* [HOCs](#bazaarvoice-hoc39s)\n* [BV Loader Provider](#bvloaderprovider)\n\n## Configuration\n\nThis section describes configuration steps required in order to use BV Components.\n\n### Prerequisites\n\nIn order to use BV components, you need to know:\n\n* URL of main Baazarvoice script. Example: `https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js,` or\n* client_name, site_ID, environment and locale of your Baazarvoice account.\n\n### How to configure\n\nIn order to connect your BV components to BV service, you need to set BV_SCRIPT environment variable to main BV main script url:\n\n``` bash\nBV_SCRIPT=\"https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js\"\n```\n\nAltenatively, you can set the following environment variables\n\n``` bash\nBV_CLIENT_NAME='clientid'\nBV_SITE_ID='main_site'\nBV_ENVIRONMENT='staging'\nBV_LOCALE='en_US'\n```\n\nBy default, [Display integration V2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html) is enabled.\n\n### How to enable Display Integration V1\n\nIf you want to enable [Display Intergration V1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\nIf you configure the connection by setting BV_SCRIPT in environment variable, then no additional settings is required, just ensure the script you set ends with bvapi.js.\n\nIf you configure the connection by setting BV_CLIENT_NAME, BV_SITE_ID, BV_ENVIRONMENT, BV_LOCALE, you need to set the following environment variable\n\n``` bash\nBV_API_VERSION=1\n```\n\n# BazaarVoice Version 1\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviewsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviewsV1 />\n```\n\n### BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatingsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVInlineRatingsV1 />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummaryV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummaryV1 />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice Version 2\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviews } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviews />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVReviewsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVReviews = asBVReviewsBlue(BlueBVReviews);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVReviews />\n```\n\n## BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatings } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\nconst redirectUrl = \"http://localhost/testUrl\"; // set it you want to include a hyperlink in an inline rating\nconst seo = false; // set it if you want to enable/disable rendering of schema.org metadata\n<BVInlineRatings redirectUrl={redirectUrl} seo={seo} />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVInlineRatingsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVInlineRatings = asBVInlineRatingsBlue(BVInlineRatings);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVInlineRatings />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummary } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummary />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVRatingsSummaryBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVRatingsSummary = asBVRatingsSummaryBlue(BVRatingsSummary);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVRatingsSummary />\n```\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice HOC's\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with Bodiless data handlers.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBodilessBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asBodilessBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to compose his/her own BV component. asBodilessBV provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asDesignableBVComponent\n\nOne can use this HOC in order to compose his/her own BV component. asDesignableBVComponent provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asDesignableBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asDesignableBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with bodiless data handlers and product edit form.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asEditableBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asEditableBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## withBVLoader\n\nOne can use this HOC in order to enhance his/her custom BV component with loading main BV script.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { withBVLoader } from '@bodiless/bv';\nconst BVComponentWithLoader = withBVLoader(YourCustomBVComponent);\n```\n\nThen you can add your component on a page\n\n``` js\n<BVComponentWithLoader />\n```\n\n# BVLoaderProvider\n\nOne can use this component in order to add main Baazarvoice script to the page himself/herself. It might be helpful to add this component from performance and UX perspective when there are a lot of BV widgets on the same page.\n\n## Usage\n\nFirst, you need to compose your custom BV components.\n\n``` js\nimport { BVRatingsSummaryBase, BVReviewsBase, asBodilessBV } from '@bodiless/bv';\n\nconst CustomBVRatingsSummary = asBodilessBV(BVRatingsSummaryBase);\nconst CustomBVReviews = asBodilessBV(BVReviewsBase);\n```\n\nThen, you should ensure BVLoaderProvider is imported on our page\n\n``` js\nimport { BVLoaderProvider } from '@bodiless/bv';\n```\n\nThen, you can add BVLoaderProvider and our custom components on a page\n\n```js\n<BVLoaderProvider>\n  <CustomBVRatingsSummary />\n  <CustomBVReviews />\n</BVLoaderProvider>\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@2.0.1-beta.1","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-ch0sdIavFHHgOsTtFBuUR1N+i1kxm7N1NpWPWLdADdr/7L6+A+puSB3WC/WgeBf45WQR+F7aUJf32+h0HOOzEw==","shasum":"147bb93396116b6a97d9423d7bbb3eb27b2f3390","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-2.0.1-beta.1.tgz","fileCount":5,"unpackedSize":29218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHYk2ytRgBGbMwRpMx2vMPmGQAHDPh/syPv/wpASMHlpAiAYkTO9FkYbH3T/yZwjGY4WVjeScHxq5zUmFqKSY6jmAQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJia/knACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp08g//XZRuwmYqRtuhbVTQ7WSAKATFLw04Va85OMttasksAXb70rzv\r\nEMpCw0dgRWSJ6Ap9I9PPe/PNt7gUjeQOia5WULloh73PF+ckOrI2kQjXgak0\r\njDhiImGTd/LvYRE8c0K7wXN17LwrWsNaROoPUkcxA2jdkCLRXS67sLXts+aG\r\npnEOl0N+EsITCDNYOVNboyNlgrJKVc6IPopZYvQ7QjabTAJyQdImrkSqEFC3\r\nsCt7yz+3sxK9J0mZxfZAWvbAHicj5YERMd2nSAXVQvb3ku648WRf+/xFAYT6\r\nzUyJScybQiBerR20PVkQRNasUaOOdWdZneq5PG/zEn8OTTzNRAVcTOfR2OB1\r\nIR+ogn07qgmvYjGGNn7PPRPm/NYSBewru0JP2vqoFukzN2zwmLNAi0RjvbP5\r\nPPomTaIJHfxcWfdjvdCXmtp8rpd+mAjLum2MnU7rYZLKprDgB9tCSRCsFvt5\r\nZ9WheJxxvsAiIkkYRe/MziRwRpR4bsiaUrJA2eMT8SYTTrGd2SLUeoYpsGqQ\r\nRz4Zy0yyD620yFB6FqBhZrRVpCZl9S9kieDOqinuQ4CF7oQ7fWJddPfeec3K\r\nmFYF4Jl+MLxyLGNPOfFeK8b7b1JHQ1g4ln0UpKJp6KaxTpj7+xng4Ru26UWs\r\ne+dxuJnLoS1NCEYUm9+2PU/28uH6m5vyI94=\r\n=Uc9D\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_2.0.1-beta.1_1651243303451_0.4102317652717813"},"_hasShrinkwrap":false},"2.0.3-beta.0":{"name":"@asemirsk/bv","version":"2.0.3-beta.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.0-beta.6","@asemirsk/components":"^2.0.3-beta.0","@asemirsk/core":"^2.0.3-beta.0","@asemirsk/fclasses":"^2.0.3-beta.0","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"95b0d427717d1ca0bfedc22f3f23323acc223e94","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@2.0.3-beta.0","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-2eZoIccXykduXQmabx3eadkG3C3wfpgQk69k3Y5t3ykiROA3oqJTZRtLCHcGS2iCRVgOJUMPwDImWUvkcGD97w==","shasum":"5991170005f3bb84de7d58830c7f1b508171dc65","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-2.0.3-beta.0.tgz","fileCount":5,"unpackedSize":29218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqVuUKQqbz9EGtA/jKMzr5qYGmUy+KA48D1kROLH/xywIhANOVNy3dLTqvvZKMwQpePr43x0VFSZHeOatoov8DEa8l"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJia/sRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrb4RAAg3HU3ztE+XGaq8uGkbkr40SXwu7I/SVIBWjG1yV5si6d1qRv\r\nFCQp0r7Ji7w6u082uysubD7g76gNFIJ8ZI8iquXG5aKHsHUSH5XVJNxRBLS2\r\nCJvAnX5wqhs92TPFWHX6VNZOaEv62P2nxJyR8xzBceGqCQ5PMOYx4xjquKC6\r\nHRVilqO66Klb4nN5jp3Vd17PrfV9UtkM3OZ4lPJALVPVUTuFgpgxWLDahg91\r\n627wgrwLBxSpxTStOp9A8WzNPZ44fRCe+aJ75cQwYf6077dGNv4aFoSn4kMr\r\n4tej9gSXsC3zB4nosXQbVKCUgRt6eDZyLUdtgHFGqaNNC2N1HE8onBe4/Yy5\r\n89DSqdFr49KIZcQbpd/YkYKWaJU9xBpzDw3QgOfRxVJDf7pFrP2MiVaIhT/c\r\n0g8zZus2gqEfksbuZgAv1PVlw2nsM6DwheAXRf8lkVEXSc/+cgnMMjriOuOx\r\nkclO2caS+GMb/NABblFj+gp2+on5v9Hr12CCRlGOuxnhSSsslOekSiMCDGZg\r\nEvQeEg4rZFj373qqJVb2PVv0TiAhLDQC27d7lR8OagEfHuCvjwBht8KDBrfL\r\nNkBURUmv8lF1nWZS4Be1oKw4qoj2AprCaIjUc9hNq0OoWne1eV4WHrNCMGGI\r\n+rNhiaIxTPKT+B4jy+Ub3farO2ck4kUqcxo=\r\n=vj9U\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_2.0.3-beta.0_1651243793650_0.592016548195075"},"_hasShrinkwrap":false},"2.0.3-beta.1":{"name":"@asemirsk/bv","version":"2.0.3-beta.1","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.0-beta.6","@asemirsk/components":"^2.0.3-beta.1","@asemirsk/core":"^2.0.3-beta.1","@asemirsk/fclasses":"^2.0.3-beta.1","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"1be4d3bb997d192b34b946c04f840a2a82b34a5b","readme":"# Bazaarvoice Component\n\nThis component provides ability to place [Bazaarvoice](https://www.bazaarvoice.com/) Reviews into a site.\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and both [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n* [Configuration](#configuration)\n* [Conversations Version 1](#bazaarvoice-version-1)\n* [Conversations Version 2](#bazaarvoice-version-2)\n* [HOCs](#bazaarvoice-hoc39s)\n* [BV Loader Provider](#bvloaderprovider)\n\n## Configuration\n\nThis section describes configuration steps required in order to use BV Components.\n\n### Prerequisites\n\nIn order to use BV components, you need to know:\n\n* URL of main Baazarvoice script. Example: `https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js,` or\n* client_name, site_ID, environment and locale of your Baazarvoice account.\n\n### How to configure\n\nIn order to connect your BV components to BV service, you need to set BV_SCRIPT environment variable to main BV main script url:\n\n``` bash\nBV_SCRIPT=\"https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js\"\n```\n\nAltenatively, you can set the following environment variables\n\n``` bash\nBV_CLIENT_NAME='clientid'\nBV_SITE_ID='main_site'\nBV_ENVIRONMENT='staging'\nBV_LOCALE='en_US'\n```\n\nBy default, [Display integration V2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html) is enabled.\n\n### How to enable Display Integration V1\n\nIf you want to enable [Display Intergration V1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\nIf you configure the connection by setting BV_SCRIPT in environment variable, then no additional settings is required, just ensure the script you set ends with bvapi.js.\n\nIf you configure the connection by setting BV_CLIENT_NAME, BV_SITE_ID, BV_ENVIRONMENT, BV_LOCALE, you need to set the following environment variable\n\n``` bash\nBV_API_VERSION=1\n```\n\n# BazaarVoice Version 1\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviewsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviewsV1 />\n```\n\n### BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatingsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVInlineRatingsV1 />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummaryV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummaryV1 />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice Version 2\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviews } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviews />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVReviewsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVReviews = asBVReviewsBlue(BlueBVReviews);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVReviews />\n```\n\n## BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatings } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\nconst redirectUrl = \"http://localhost/testUrl\"; // set it you want to include a hyperlink in an inline rating\nconst seo = false; // set it if you want to enable/disable rendering of schema.org metadata\n<BVInlineRatings redirectUrl={redirectUrl} seo={seo} />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVInlineRatingsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVInlineRatings = asBVInlineRatingsBlue(BVInlineRatings);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVInlineRatings />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummary } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummary />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVRatingsSummaryBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVRatingsSummary = asBVRatingsSummaryBlue(BVRatingsSummary);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVRatingsSummary />\n```\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice HOC's\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with Bodiless data handlers.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBodilessBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asBodilessBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to compose his/her own BV component. asBodilessBV provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asDesignableBVComponent\n\nOne can use this HOC in order to compose his/her own BV component. asDesignableBVComponent provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asDesignableBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asDesignableBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with bodiless data handlers and product edit form.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asEditableBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asEditableBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## withBVLoader\n\nOne can use this HOC in order to enhance his/her custom BV component with loading main BV script.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { withBVLoader } from '@bodiless/bv';\nconst BVComponentWithLoader = withBVLoader(YourCustomBVComponent);\n```\n\nThen you can add your component on a page\n\n``` js\n<BVComponentWithLoader />\n```\n\n# BVLoaderProvider\n\nOne can use this component in order to add main Baazarvoice script to the page himself/herself. It might be helpful to add this component from performance and UX perspective when there are a lot of BV widgets on the same page.\n\n## Usage\n\nFirst, you need to compose your custom BV components.\n\n``` js\nimport { BVRatingsSummaryBase, BVReviewsBase, asBodilessBV } from '@bodiless/bv';\n\nconst CustomBVRatingsSummary = asBodilessBV(BVRatingsSummaryBase);\nconst CustomBVReviews = asBodilessBV(BVReviewsBase);\n```\n\nThen, you should ensure BVLoaderProvider is imported on our page\n\n``` js\nimport { BVLoaderProvider } from '@bodiless/bv';\n```\n\nThen, you can add BVLoaderProvider and our custom components on a page\n\n```js\n<BVLoaderProvider>\n  <CustomBVRatingsSummary />\n  <CustomBVReviews />\n</BVLoaderProvider>\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@2.0.3-beta.1","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-RqFG+Yv3PJ6HUHJclqbSIdJenXlJc/gC1nLVkz3WQlTgWY//UVYXn2oxpGYPycm/zdjajijaR/m6yUhz19yc4A==","shasum":"490b72cf06d6c6b815130168d70f23083c916e92","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-2.0.3-beta.1.tgz","fileCount":5,"unpackedSize":29218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/h60qFdICIbPyb/h8Z4bmZaIR3FoUQH0z1IVRBDeqWQIgCoalA1xtc662XIwktXWDqYuTr3Mu41pKKW6y+T1wtu8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJia/uIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUvA/+PhP5qAJEonxLrzZoq0a00H7bwerj2qvrFjIZjKRzulmEk/tQ\r\nq9LVZt5cDrpft2fbmD21WCK7CFEBK8YMRWE4H/Qwtij9Yiye0CQitHTvAfj3\r\n+BMgF5o0PL/G3W86Q1UpODlaND/yyKIzgSisxG7maMt82kQjvzLBq4jL9Dsb\r\nj0gSeiINe2k7SYi7WtzDMyy/7cGk/N4Fap2WfnuQzLZ+c9k/JRqkJCrDpeFS\r\nE1ApSGNgNRguXnjVXmhGr2Hj/kl/21a/ixrqfQzk04OlFjhg+NjDYL2HpRwV\r\nd6M7EAwR7HztzgG4cLaerPslSltmW26HbOmkWmMAPOKdRhoYBtMFXUYZp4gQ\r\nkPfhVvo9LwWfi9alZ+3yMPGIEJu8IZJeQDNqxIuS8osdVBTUQx6uwZvTNxqw\r\nMAFMuahegsXGIE83X8VxkNA/vVon1YCPtavzeLf55fkdtarIwrSU9udNf1Ht\r\ncRUTNWElTKR2ksahwSxEq4DSjNJBZRhmcXOGaz/n6EODm/DDuBFX81EUJQWH\r\nDlhmJaJ21PQUKfLXSFzwV0IjUzmjM6dX1DIP4T4C0F7c8lDed/87NkW6LCKA\r\nebBolM9CosM+zJ8HGP07g/7RX5CbktGaEOY4u4y4TGlNhs9gjHjY14eCrY3R\r\n2krKlSVi6H3mJqhrajRkpZC1mESIWgYJnUs=\r\n=jMC1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_2.0.3-beta.1_1651243912649_0.6212460891441178"},"_hasShrinkwrap":false},"2.0.5-beta.0":{"name":"@asemirsk/bv","version":"2.0.5-beta.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.0-beta.6","@asemirsk/components":"^2.0.5-beta.0","@asemirsk/core":"^2.0.5-beta.0","@asemirsk/fclasses":"^2.0.5-beta.0","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"9b047b3a72ac828e21a6e31cb9a8e77e5225f5c9","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@2.0.5-beta.0","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-ZKjDWPeXg/HRGrNvqrzynJ9it325IsUguEbIxQZyKie0Y8OnBAEOMozaxvJ8hbwHtrB9fjoYXsYsIWEEBicKSw==","shasum":"3e8d81af048bdb73fc85302154984fee6e455ba4","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-2.0.5-beta.0.tgz","fileCount":5,"unpackedSize":29218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEPtbgcp98pWPEE0KX2ZLP4lSsWUw843kXRwnlHgii99AiEA2nriazngpUV7K92SNnJqSLHEohV7DqkJAWlleieXj5k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJia/8NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXug/9EzFZbycMyzi9b5pQthTznWuiTLtQRXIGeRRvLzTCz2acmjpC\r\nl1/6dCpkORavB9dLOlRX59TlVUc+sWIJpAQQcl7o2zSRZSpyGDon0oBaPPwN\r\nn9e549J6me9+jW9AKYr3SUq5KtySIfP4psSCUJzW8Qn0Hf3I+oHsR8cx2EnZ\r\n9wKtTHlrz58r3q/Xon74r8ckazogwYAWkb4SIx3FhUbQRaRs/azb7VHysKkT\r\n4+3OU13XLz/QXD98lxNLqALtT0KFucCRR3YGNe6YBLDw8E7YcXVPobL22zp7\r\njBfC2KBQB39KIKexjlj7CspVMRTpfmBEGtD+otF6DtOdt8GitlFpDcGGtOVx\r\nJXr7wfd+eV9DtYVae+zO4atY5O+s4w5NdQ7974HLxvQKRGgbEygknyihPjTh\r\n/BMitsUo+/hpvj5nCo1f/L/QUbTOmiICBqMk7khFuy+Fx6FGoGIf8ZJxjSUX\r\n8ymhNMJib2ek6wUUnc6TmquFCnfT63ydGGngxFpA6aJENoCI2JdfAEFGnTLL\r\nisXiGUxXb7hAFUvG5gx5OgTp1m+fwqe0poTp0L+ujVg5Jlp7J04oyMsSyy0K\r\nEYjhANoI4VQKwtc2m3tHrOXbgcv7a1X7Jdx/TiVj2MKxzvasOc47W955UuTB\r\nZ3GOQp6RdruaQo+DPlq8tVySRAKSW4sKeIc=\r\n=U1JT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_2.0.5-beta.0_1651244813846_0.30231820334979065"},"_hasShrinkwrap":false},"2.0.6-beta.0":{"name":"@asemirsk/bv","version":"2.0.6-beta.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.0-beta.6","@asemirsk/components":"^2.0.6-beta.0","@asemirsk/core":"^2.0.6-beta.0","@asemirsk/fclasses":"^2.0.6-beta.0","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"e98b014aabae41353460b67b25ad4d50f0133fca","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@2.0.6-beta.0","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-nLjUuG6C2bQOk6EbhLTxJ1hWhshlJUlPfmM/7HwVqPTyLt5H1PWH7SfSIMx9h47WIoTYqu7dwnwYkgA2+olDHQ==","shasum":"981d73fa5285f29e9a79dbe093560324d5d21384","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-2.0.6-beta.0.tgz","fileCount":5,"unpackedSize":29218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGZuQzFoftz1+Ga8NeXoOnW8N+M0xVvbsvaP0cL7881cAiEA79q+vbP812W9tycopeWHGVLQnjbCB2RdgCW5TviJ2qE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJib62WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvzA//UFhHH14x+kL5E4uX/ncAP5zgGAY0l1gjzkvdR5qiM42fFFio\r\nxQ6LA+GqCngaFD8Rr/CWmLucMXdxbWwDsHXuAdngsIlq4exMOIE71/eiluRw\r\nrriPD34PkIglAtVakBUJ0YCJg5STzGdpFjFQNuKS+cZQOGHgUPzswHXg8pe7\r\nlT4VnRrsI5VNx+WcaEFKcAi+RMQkNVJeFHhxV9sxiCwlWq27K6e7iuhEOD7P\r\nwe1jTTxr/zViqBJHBMY5nhnNb048RDJIELHgVWFrkwt+pUL7FMGukWY1vo/2\r\nrMWLYZr9M++/xRgZ79RliJDY5HL/uGghy/jusKprVlxpyThfXyg/9P4oGgPQ\r\nU8geHHw0w6GDkDAO+lhdnCgR9KEVtaDlfg7AWL2hxQvmRsPRL4FXu/DIan6E\r\nEB0Srm7uI5h3mhgwqItuqdK7IfCc+Xk9DSvqAITHp6EwCSqKl02xeHJ9nhkS\r\ng97/7ctuebEBwZSD1VLK6skvzWyx+/BTt3o3iYWU8/efEzR98FjmjBZVs6Ft\r\nAPE/uybcAS9GfOtFsTm5neDL0ntzxopzRN/aIt3+dkBcqZ6eaqA1AdAj6/8J\r\nUzc3lHBalyf3pHCa6cTCdj50cN9SnCtqHABubb22PM8Vnp/EhmrzzWCAEOyl\r\n4OL7Dht/XU8k4Ajc8nAWlBTCPFK24CSkqs8=\r\n=24JS\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_2.0.6-beta.0_1651486102084_0.4368619359578929"},"_hasShrinkwrap":false},"3.0.0":{"name":"@asemirsk/bv","version":"3.0.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.0-beta.6","@asemirsk/components":"^3.0.0","@asemirsk/core":"^3.0.0","@asemirsk/fclasses":"^3.0.0","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"6cf8b4df75f61c7e648a17bd5eafcd3965785c77","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@3.0.0","_nodeVersion":"16.9.1","_npmVersion":"lerna/4.0.0/node@v16.9.1+x64 (linux)","dist":{"integrity":"sha512-8B/I4GtlZwF1vWPfEUa/3IwlsigIpUoz0lKv/iXKAPzNQJVS9nTZly55rcGFDNWKWrBtF5KVv+WpcWgU2zIDZQ==","shasum":"f571d3dd96901828a9c7f1b5f6c17eaf8a0d6fa6","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-3.0.0.tgz","fileCount":5,"unpackedSize":29190,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVnbiqA280cSN6FQv1pJgoJpx3R9x3V5/PsyNN8K6tmAiAREcGFpRhOzSxP97PJ1qsjXKNJfjVcUK0Y7uyHzK62Vg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJib7C9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpyeQ/9EXWspcpgFrAo2Rpfflh5ZLXATDMoDwHhqf/65Iz/bupMMKcC\r\nqwvEq151bMc5Nx5/qrTSJiEW2KRqdfsnR8nWJI65KmZJSLyCMo36jj8xnkv6\r\nzesQg3aMkquFKhNxrirvRM0t3uZX4wypQ/ltel+plZGSt4Uc+PIds5gDIjep\r\nWMIDA3Hr/Rd1QlctxTVp54U4lFB7QKyKfGJy8lODG4QPKz6Qn0l/ySVSot0V\r\nImF8OTXlnp8Vlv65SUqdpOpuGYTXO5b+ugZ6q5eKWFDx8dhtc8zCurmcxbXb\r\n9u0xLo01tj5/VdifP5TZm/II0opRvFYgpM63C3ODFW0pzARKAjGERETYj0ap\r\nB9/X1qoCXz91P+ffxF8lMUCgDpkFRcV93IV+0HyJblAECKRmF4DFYpCkXm7e\r\nvLE7R0yKYkdi3CWJ1g0wB2DSWDJ+EJ0XIkKAV6EfYWvUa9pUzgzxvIiYalqT\r\nXhJaaX5RIUe1+vQI25AZwo1z9OmSI9qLJWB7tX/TNIEETlK8o7Jw41P/zTQZ\r\nIfUYI/2yMEjffI9mNKuyeWe1LjZ8kSM5C7XzOcDp0gQ9lmwD02rKfinJYbcJ\r\nvPQy0WOKZqWfypdlVHjomyMle/LZ0gPYD0jdGWB04y3GgHRgU7x+VHyL6L4R\r\neZgHBwUySvgfDVHbCKCDfMDekGQaI2Ru5Ik=\r\n=9kEZ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_3.0.0_1651486909171_0.8443448440908536"},"_hasShrinkwrap":false},"1.0.0-beta.16":{"name":"@asemirsk/bv","version":"1.0.0-beta.16","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p ./tsconfig.json && npm run build:api-doc","build:watch":"npm run build -- --watch","build:api-doc":"typedoc --out doc/api src","lint":"tslint ./src/**/*.ts?x","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/cli":"^1.0.0-beta.15","@asemirsk/components":"^1.0.0-beta.16","@asemirsk/core":"^1.0.0-beta.16","@asemirsk/fclasses":"^1.0.0-beta.16","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"0ff46789373c0ccb710fa463d6cbd035aeb8eb1f","readme":"# Bazaarvoice Component\n\nThis component provides ability to place [Bazaarvoice](https://www.bazaarvoice.com/) Reviews into a site.\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and both [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n* [Configuration](#configuration)\n* [Conversations Version 1](#bazaarvoice-version-1)\n* [Conversations Version 2](#bazaarvoice-version-2)\n* [HOCs](#bazaarvoice-hoc39s)\n* [BV Loader Provider](#bvloaderprovider)\n\n## Configuration\n\nThis section describes configuration steps required in order to use BV Components.\n\n### Prerequisites\n\nIn order to use BV components, you need to know:\n\n* URL of main Baazarvoice script. Example: `https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js,` or\n* client_name, site_ID, environment and locale of your Baazarvoice account.\n\n### How to configure\n\nIn order to connect your BV components to BV service, you need to set BV_SCRIPT environment variable to main BV main script url:\n\n``` bash\nBV_SCRIPT=\"https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js\"\n```\n\nAltenatively, you can set the following environment variables\n\n``` bash\nBV_CLIENT_NAME='clientid'\nBV_SITE_ID='main_site'\nBV_ENVIRONMENT='staging'\nBV_LOCALE='en_US'\n```\n\nBy default, [Display integration V2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html) is enabled.\n\n### How to enable Display Integration V1\n\nIf you want to enable [Display Intergration V1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\nIf you configure the connection by setting BV_SCRIPT in environment variable, then no additional settings is required, just ensure the script you set ends with bvapi.js.\n\nIf you configure the connection by setting BV_CLIENT_NAME, BV_SITE_ID, BV_ENVIRONMENT, BV_LOCALE, you need to set the following environment variable\n\n``` bash\nBV_API_VERSION=1\n```\n\n# BazaarVoice Version 1\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviewsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviewsV1 />\n```\n\n### BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatingsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVInlineRatingsV1 />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummaryV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummaryV1 />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice Version 2\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviews } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviews />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVReviewsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVReviews = asBVReviewsBlue(BlueBVReviews);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVReviews />\n```\n\n## BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatings } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\nconst redirectUrl = \"http://localhost/testUrl\"; // set it you want to include a hyperlink in an inline rating\nconst seo = false; // set it if you want to enable/disable rendering of schema.org metadata\n<BVInlineRatings redirectUrl={redirectUrl} seo={seo} />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVInlineRatingsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVInlineRatings = asBVInlineRatingsBlue(BVInlineRatings);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVInlineRatings />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummary } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummary />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVRatingsSummaryBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVRatingsSummary = asBVRatingsSummaryBlue(BVRatingsSummary);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVRatingsSummary />\n```\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice HOC's\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with Bodiless data handlers.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBodilessBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asBodilessBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to compose his/her own BV component. asBodilessBV provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asDesignableBVComponent\n\nOne can use this HOC in order to compose his/her own BV component. asDesignableBVComponent provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asDesignableBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asDesignableBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with bodiless data handlers and product edit form.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asEditableBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asEditableBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## withBVLoader\n\nOne can use this HOC in order to enhance his/her custom BV component with loading main BV script.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { withBVLoader } from '@bodiless/bv';\nconst BVComponentWithLoader = withBVLoader(YourCustomBVComponent);\n```\n\nThen you can add your component on a page\n\n``` js\n<BVComponentWithLoader />\n```\n\n# BVLoaderProvider\n\nOne can use this component in order to add main Baazarvoice script to the page himself/herself. It might be helpful to add this component from performance and UX perspective when there are a lot of BV widgets on the same page.\n\n## Usage\n\nFirst, you need to compose your custom BV components.\n\n``` js\nimport { BVRatingsSummaryBase, BVReviewsBase, asBodilessBV } from '@bodiless/bv';\n\nconst CustomBVRatingsSummary = asBodilessBV(BVRatingsSummaryBase);\nconst CustomBVReviews = asBodilessBV(BVReviewsBase);\n```\n\nThen, you should ensure BVLoaderProvider is imported on our page\n\n``` js\nimport { BVLoaderProvider } from '@bodiless/bv';\n```\n\nThen, you can add BVLoaderProvider and our custom components on a page\n\n```js\n<BVLoaderProvider>\n  <CustomBVRatingsSummary />\n  <CustomBVReviews />\n</BVLoaderProvider>\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.0-beta.16","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-AKfK0dXw+lZALazlLrTns1xuEgK/zAUx7CIzk1h+20tAROZCslHwaPCi+LLQtveVdNSJn+TQJ7EIxP+mlWwKfQ==","shasum":"dbc8108c277f780aee17afa771b340c67aa97179","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.0-beta.16.tgz","fileCount":5,"unpackedSize":29223,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDwrfmsJIbPyveoLlabpHBY4dnhKQi60Ukbu41tGdyrLAiEAzS5AVtsr1atOkGkDXRP+qYp4RIB7lp65BphxUIrS008="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidOegACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxrQ//VR4XiG1g9uTaD6VlJexqxHCKILHfBuO1MlHXsoIq11Ua8bKX\r\nCyCDAjOnlQ5svNy6tiSmQptCM5nKugiS46tag2MTWbDB2Q4nggTLZOtOm6wJ\r\nVRc64yea0LAjtn5DFO1aN4lSvIPtIOpOCtBc+IFt8B74Y5dSuiJ1OPo32RkQ\r\n7MbYvKXoJUOFAoHWxAKCFti8yfgXk4o/sLMeT3bS8GC25jsz7JJFSEOHcKfK\r\n7KSPBNtUZjM/JeTCWDlNYE3H/o4QasZW9FwX5GuY7DO6GbNG/etZrug5Xr9a\r\nB7VBzsNFD7WH9vTEPAJ4WKR7H7b9H4FWHKFg6TDbXwQjw8M4uNN4u331XZ9I\r\noX5OTOwsl/w63ocMXizCDikxnWPwQ8YTtc+/FP3lrB9aeoqSe5pfZc573Cwu\r\nIB/o30pzQTKVY1EIwfHUfjZaQ0jbMc+VQ/WxDs5LtlyGLlfTf2HmtwvPKgib\r\ndQfSsTfE4ZqB2yqxC2bMYICVuCv8/tYrxmtgU64ZKNYmlu7YV6FTylLFv9Yv\r\n8p2yag96BCGVqkuvT28x2xB8rA3icDKjcQ3mQf45SOgY8DxVvFy491m88Lc7\r\n4rTjoPKGApEE9a+WFw0Kqf3/ACVJcTNsKzs1w9+3nG5bR2d6yt5KCYKHJcSO\r\noCPlTa7eHEps0TALO5SwAflqa4fJhPUeb18=\r\n=8zzF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.0-beta.16_1651828640826_0.15537873689245396"},"_hasShrinkwrap":false},"1.0.0-canary-24-22.0":{"name":"@asemirsk/bv","version":"1.0.0-canary-24-22.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"run-p build:lib","build:lib":"tsc -p ./tsconfig.json","build:watch":"npm run build:lib -- --watch","build:api-doc":"typedoc --options ../../typedoc.js --out doc/api ./src","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/components":"1.0.0-canary-24-22.0+a48e91c","@asemirsk/core":"1.0.0-canary-24-22.0+a48e91c","@asemirsk/fclasses":"1.0.0-canary-24-22.0+a48e91c","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"a48e91c77704024ccd08e24d4f85d1cd6971ccb1","readme":"# Bazaarvoice Component\n\nThis component provides ability to place [Bazaarvoice](https://www.bazaarvoice.com/) Reviews into a site.\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and both [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n* [Configuration](#configuration)\n* [Conversations Version 1](#bazaarvoice-version-1)\n* [Conversations Version 2](#bazaarvoice-version-2)\n* [HOCs](#bazaarvoice-hoc39s)\n* [BV Loader Provider](#bvloaderprovider)\n\n## Configuration\n\nThis section describes configuration steps required in order to use BV Components.\n\n### Prerequisites\n\nIn order to use BV components, you need to know:\n\n* URL of main Baazarvoice script. Example: `https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js,` or\n* client_name, site_ID, environment and locale of your Baazarvoice account.\n\n### How to configure\n\nIn order to connect your BV components to BV service, you need to set BV_SCRIPT environment variable to main BV main script url:\n\n``` bash\nBV_SCRIPT=\"https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js\"\n```\n\nAltenatively, you can set the following environment variables\n\n``` bash\nBV_CLIENT_NAME='clientid'\nBV_SITE_ID='main_site'\nBV_ENVIRONMENT='staging'\nBV_LOCALE='en_US'\n```\n\nBy default, [Display integration V2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html) is enabled.\n\n### How to enable Display Integration V1\n\nIf you want to enable [Display Intergration V1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\nIf you configure the connection by setting BV_SCRIPT in environment variable, then no additional settings is required, just ensure the script you set ends with bvapi.js.\n\nIf you configure the connection by setting BV_CLIENT_NAME, BV_SITE_ID, BV_ENVIRONMENT, BV_LOCALE, you need to set the following environment variable\n\n``` bash\nBV_API_VERSION=1\n```\n\n# BazaarVoice Version 1\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviewsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviewsV1 />\n```\n\n### BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatingsV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVInlineRatingsV1 />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummaryV1 } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummaryV1 />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBaseV1, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice Version 2\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviews } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviews />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVReviewsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVReviews = asBVReviewsBlue(BlueBVReviews);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVReviews />\n```\n\n## BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatings } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\nconst redirectUrl = \"http://localhost/testUrl\"; // set it you want to include a hyperlink in an inline rating\nconst seo = false; // set it if you want to enable/disable rendering of schema.org metadata\n<BVInlineRatings redirectUrl={redirectUrl} seo={seo} />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVInlineRatingsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVInlineRatings = asBVInlineRatingsBlue(BVInlineRatings);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVInlineRatings />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummary } from '@bodiless/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummary />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVRatingsSummaryBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVRatingsSummary = asBVRatingsSummaryBlue(BVRatingsSummary);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVRatingsSummary />\n```\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBase, withBVLoader, asBodilessBV } from '@bodiless/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice HOC's\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with Bodiless data handlers.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBodilessBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asBodilessBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to compose his/her own BV component. asBodilessBV provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asDesignableBVComponent\n\nOne can use this HOC in order to compose his/her own BV component. asDesignableBVComponent provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asDesignableBVComponent } from '@bodiless/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asDesignableBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with bodiless data handlers and product edit form.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asEditableBV, BVRatingsSummaryBase } from '@bodiless/bv';\nconst MyBVComponent = asEditableBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## withBVLoader\n\nOne can use this HOC in order to enhance his/her custom BV component with loading main BV script.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { withBVLoader } from '@bodiless/bv';\nconst BVComponentWithLoader = withBVLoader(YourCustomBVComponent);\n```\n\nThen you can add your component on a page\n\n``` js\n<BVComponentWithLoader />\n```\n\n# BVLoaderProvider\n\nOne can use this component in order to add main Baazarvoice script to the page himself/herself. It might be helpful to add this component from performance and UX perspective when there are a lot of BV widgets on the same page.\n\n## Usage\n\nFirst, you need to compose your custom BV components.\n\n``` js\nimport { BVRatingsSummaryBase, BVReviewsBase, asBodilessBV } from '@bodiless/bv';\n\nconst CustomBVRatingsSummary = asBodilessBV(BVRatingsSummaryBase);\nconst CustomBVReviews = asBodilessBV(BVReviewsBase);\n```\n\nThen, you should ensure BVLoaderProvider is imported on our page\n\n``` js\nimport { BVLoaderProvider } from '@bodiless/bv';\n```\n\nThen, you can add BVLoaderProvider and our custom components on a page\n\n```js\n<BVLoaderProvider>\n  <CustomBVRatingsSummary />\n  <CustomBVReviews />\n</BVLoaderProvider>\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.0-canary-24-22.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-w/aVzW7QA7aeIUjuvMomC3Y75oRgie7JbIiESrrmV4/ARmqH+EttFZ2JiSjgR9hxeqi7PbmtO7P8Ld6qiJvRjw==","shasum":"eda60cb8f6b921bb6ac9377541e0f7646b119595","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.0-canary-24-22.0.tgz","fileCount":5,"unpackedSize":29247,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpWq5xvwqAmsUmp7jGqsgKsA2GyQf84jvEB1dNTrvlYwIhAO3KLD97T3Bps6yCe9/K4du5Tz/IuKZLBMPT94tuk0Zy"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijezjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2Tw/7BG+A03sgtYZxfqPoJ35qwdMJbExATw84Cfkzdjxd6JhjLZDD\r\nujfikG6dnkyiot6X6lkq/OzNoqTPblpRcFXMgDDd2Nr0UOBTZilt0ty6CX6/\r\neyDbtVV7HrlpoApLCXMrx39EIdZ99L4a1xcnhOvJyUbKiT+RzBxmKRQz0umY\r\nbRL5vrWvDkFF/mHv2V4oux4XcWoP18y/v2eA5x1dQSdO7mW//wXzYTseqlhu\r\noSOmXcVkh5XzQQK/o7qLwMG5zKfw9OPfnHn5IrMoOuUysRwLfL7yptO6+VRJ\r\nSUUpdhAiXethoJrySyFIvD37zpbUn8N93OtwNk0AWhQ/Ukeg/nDt2wqReC0K\r\nYRD2ho9jYW/3B3wyV8ua3zjJC1D7yoPMhcFG3vnx3C6ChPsymURHMBRpvjTB\r\nGAhXEriHz7n1pwbyPWN7kD+Rkh6/W8rjQcJhlZmlgGZSnzoUWngQwhZ+/nIb\r\n8gAJqDyy+Bk0p0gr8EZSzHlXb4WSupFaMP37mte3EuwQJC2ViVixu4ygEA5p\r\nkQTASj3J5tk+OMsgz6JNZ4y5rtp+vEbKbh5/aoM/U042xmAyHvjmgM/LoLDx\r\nNDGS5/f4cc8VFnqyuuThHyTS6X6QSNOG+5bxrJ7UKTHm0AIxzr3cRxOUu7g2\r\nFo9PizgVt99r+e8/mDRmn40R09AEvEtGAmU=\r\n=BW7c\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.0-canary-24-22.0_1653468387421_0.7504530588076666"},"_hasShrinkwrap":false},"1.0.0-canary-24-23.0":{"name":"@asemirsk/bv","version":"1.0.0-canary-24-23.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"run-p build:lib","build:lib":"tsc -p ./tsconfig.json","build:watch":"npm run build:lib -- --watch","build:api-doc":"typedoc --options ../../typedoc.js --out doc/api ./src","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/components":"1.0.0-canary-24-23.0+2cab1ea","@asemirsk/core":"1.0.0-canary-24-23.0+2cab1ea","@asemirsk/fclasses":"1.0.0-canary-24-23.0+2cab1ea","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"2cab1eaf4ac4d1a8ef3ef53ba3228ff16f7504eb","readme":"# Bazaarvoice Component\n\nThis component provides ability to place [Bazaarvoice](https://www.bazaarvoice.com/) Reviews into a site.\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and both [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n* [Configuration](#configuration)\n* [Conversations Version 1](#bazaarvoice-version-1)\n* [Conversations Version 2](#bazaarvoice-version-2)\n* [HOCs](#bazaarvoice-hoc39s)\n* [BV Loader Provider](#bvloaderprovider)\n\n## Configuration\n\nThis section describes configuration steps required in order to use BV Components.\n\n### Prerequisites\n\nIn order to use BV components, you need to know:\n\n* URL of main Baazarvoice script. Example: `https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js,` or\n* client_name, site_ID, environment and locale of your Baazarvoice account.\n\n### How to configure\n\nIn order to connect your BV components to BV service, you need to set BV_SCRIPT environment variable to main BV main script url:\n\n``` bash\nBV_SCRIPT=\"https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js\"\n```\n\nAltenatively, you can set the following environment variables\n\n``` bash\nBV_CLIENT_NAME='clientid'\nBV_SITE_ID='main_site'\nBV_ENVIRONMENT='staging'\nBV_LOCALE='en_US'\n```\n\nBy default, [Display integration V2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html) is enabled.\n\n### How to enable Display Integration V1\n\nIf you want to enable [Display Intergration V1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\nIf you configure the connection by setting BV_SCRIPT in environment variable, then no additional settings is required, just ensure the script you set ends with bvapi.js.\n\nIf you configure the connection by setting BV_CLIENT_NAME, BV_SITE_ID, BV_ENVIRONMENT, BV_LOCALE, you need to set the following environment variable\n\n``` bash\nBV_API_VERSION=1\n```\n\n# BazaarVoice Version 1\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviewsV1 } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviewsV1 />\n```\n\n### BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatingsV1 } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVInlineRatingsV1 />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummaryV1 } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummaryV1 />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBaseV1, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBaseV1, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice Version 2\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviews } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviews />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVReviewsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVReviews = asBVReviewsBlue(BlueBVReviews);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVReviews />\n```\n\n## BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatings } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\nconst redirectUrl = \"http://localhost/testUrl\"; // set it you want to include a hyperlink in an inline rating\nconst seo = false; // set it if you want to enable/disable rendering of schema.org metadata\n<BVInlineRatings redirectUrl={redirectUrl} seo={seo} />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVInlineRatingsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVInlineRatings = asBVInlineRatingsBlue(BVInlineRatings);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVInlineRatings />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummary } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummary />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVRatingsSummaryBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVRatingsSummary = asBVRatingsSummaryBlue(BVRatingsSummary);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVRatingsSummary />\n```\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBase, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBase, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBase, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice HOC's\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with Bodiless data handlers.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBodilessBV, BVRatingsSummaryBase } from '@asemirsk/bv';\nconst MyBVComponent = asBodilessBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to compose his/her own BV component. asBodilessBV provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBVComponent } from '@asemirsk/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asDesignableBVComponent\n\nOne can use this HOC in order to compose his/her own BV component. asDesignableBVComponent provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asDesignableBVComponent } from '@asemirsk/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asDesignableBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with bodiless data handlers and product edit form.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asEditableBV, BVRatingsSummaryBase } from '@asemirsk/bv';\nconst MyBVComponent = asEditableBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## withBVLoader\n\nOne can use this HOC in order to enhance his/her custom BV component with loading main BV script.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { withBVLoader } from '@asemirsk/bv';\nconst BVComponentWithLoader = withBVLoader(YourCustomBVComponent);\n```\n\nThen you can add your component on a page\n\n``` js\n<BVComponentWithLoader />\n```\n\n# BVLoaderProvider\n\nOne can use this component in order to add main Baazarvoice script to the page himself/herself. It might be helpful to add this component from performance and UX perspective when there are a lot of BV widgets on the same page.\n\n## Usage\n\nFirst, you need to compose your custom BV components.\n\n``` js\nimport { BVRatingsSummaryBase, BVReviewsBase, asBodilessBV } from '@asemirsk/bv';\n\nconst CustomBVRatingsSummary = asBodilessBV(BVRatingsSummaryBase);\nconst CustomBVReviews = asBodilessBV(BVReviewsBase);\n```\n\nThen, you should ensure BVLoaderProvider is imported on our page\n\n``` js\nimport { BVLoaderProvider } from '@asemirsk/bv';\n```\n\nThen, you can add BVLoaderProvider and our custom components on a page\n\n```js\n<BVLoaderProvider>\n  <CustomBVRatingsSummary />\n  <CustomBVReviews />\n</BVLoaderProvider>\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.0-canary-24-23.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-2xL9Ki9wycoZnEVWZ7Ppz4iPuXwe3DBlTv51qyoFKhbYxCJnixRiSLGBksQygtrjxjcmgiKEdUUAQn6RzVd0dw==","shasum":"9d4a0a646eed53932dae337aa7025c654ca20fac","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.0-canary-24-23.0.tgz","fileCount":81,"unpackedSize":107386,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1ImDume9LZPWmKvGaN/Tl3M+/SLuTa5cuRbc4B+WPjgIhAI+wB4DsCqDLaN84FKcJudUkaCZl58i0JK309LCD/POB"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijfHxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmozuw/+P84Kk/DW1sdV1kV9aHxLycjCjgvKp6F2bFDhcahuVYpipzDr\r\nxrv9Hr/+nncrSTR/Onu11zKsPTHmeyQLjhuqQuJ3HqE7YGLKJkROWzszsO+C\r\nszaX0RA5Y/l4PyoXwhYWvEMKf3/Rw4SmYv8+O3tseuFfKNahm4wwOm7QOvU+\r\n/SoF7stjb+b3jFz8edDq78A0tJGqcx2gGcl8A8MwZK2z2US718I79EbpbpPU\r\nKo1jlWcredZVRDziyAqVtM38RLiiWbT1vEsZ+e1z8f4ObDa/EuCcVFHQ/Mbh\r\nRkZDEei6mUxLA3hqCqx0+EDT40yc6Z+ibooaCSweGHHK10vcg5sxrBdVsW0b\r\nVEPpQWNxncbC4ujnYz7+8mcVAo7L39MZnB9hswdBoDblIsGCFk3NutrldgQY\r\nDt0mUGs7JnhmdRhFoM+OEAwNoza6f501csRZBGFZsmo9QhCFXVuwig6VwBsh\r\n6FZ+lShf/pu/GUkLOmt+9aA60xjWQ9tmkv5hLa3apaWr5BbhJghtHxBTj+Nd\r\nht4bXSSey+kHKbRXjNbCgn9azWt5icuRm2GWvfqRiXLGCLEtUmSeglaSR/Bb\r\n6A1Z+S4V96xEZ1rTeJmVOHlBGHmuRHBMldYpjnlJikz8VltLi5j2S1tSC+4h\r\n1LOsTMfyHQCs7ThiSk2mkXjw1VSQVvof958=\r\n=BGPb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.0-canary-24-23.0_1653469681543_0.6843391326530481"},"_hasShrinkwrap":false},"1.0.0-canary-24-24.0":{"name":"@asemirsk/bv","version":"1.0.0-canary-24-24.0","description":"Provides bazaarvoice components.","author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"license":"Apache-2.0","main":"lib/index.js","sideEffects":false,"typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"publishConfig":{"access":"public"},"scripts":{"build":"run-p build:lib","build:lib":"tsc -p ./tsconfig.json","build:watch":"npm run build:lib -- --watch","build:api-doc":"typedoc --options ../../typedoc.js --out doc/api ./src","clean":"rimraf \"lib/*\" && rimraf tsconfig.tsbuildinfo && rimraf \"doc/api\""},"dependencies":{"@asemirsk/components":"1.0.0-canary-24-24.0+af2c8ac","@asemirsk/core":"1.0.0-canary-24-24.0+af2c8ac","@asemirsk/fclasses":"1.0.0-canary-24-24.0+af2c8ac","lodash":"^4.17.19"},"peerDependencies":{"react":"^17.0.2","react-dom":"^17.0.2"},"gitHead":"af2c8ace172b3dc3a1f237c51eb55be1e21978bb","readme":"# Bazaarvoice Component\n\nThis component provides ability to place [Bazaarvoice](https://www.bazaarvoice.com/) Reviews into a site.\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and both [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n* [Configuration](#configuration)\n* [Conversations Version 1](#bazaarvoice-version-1)\n* [Conversations Version 2](#bazaarvoice-version-2)\n* [HOCs](#bazaarvoice-hoc39s)\n* [BV Loader Provider](#bvloaderprovider)\n\n## Configuration\n\nThis section describes configuration steps required in order to use BV Components.\n\n### Prerequisites\n\nIn order to use BV components, you need to know:\n\n* URL of main Baazarvoice script. Example: `https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js,` or\n* client_name, site_ID, environment and locale of your Baazarvoice account.\n\n### How to configure\n\nIn order to connect your BV components to BV service, you need to set BV_SCRIPT environment variable to main BV main script url:\n\n``` bash\nBV_SCRIPT=\"https://apps.bazaarvoice.com/deployments/<client_name>/<site_ID>/<environment>/<locale>/bv.js\"\n```\n\nAltenatively, you can set the following environment variables\n\n``` bash\nBV_CLIENT_NAME='clientid'\nBV_SITE_ID='main_site'\nBV_ENVIRONMENT='staging'\nBV_LOCALE='en_US'\n```\n\nBy default, [Display integration V2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html) is enabled.\n\n### How to enable Display Integration V1\n\nIf you want to enable [Display Intergration V1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\nIf you configure the connection by setting BV_SCRIPT in environment variable, then no additional settings is required, just ensure the script you set ends with bvapi.js.\n\nIf you configure the connection by setting BV_CLIENT_NAME, BV_SITE_ID, BV_ENVIRONMENT, BV_LOCALE, you need to set the following environment variable\n\n``` bash\nBV_API_VERSION=1\n```\n\n# BazaarVoice Version 1\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v1](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration_v1.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviewsV1 } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviewsV1 />\n```\n\n### BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatingsV1 } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVInlineRatingsV1 />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummaryV1 } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummaryV1 />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBaseV1, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBaseV1, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBaseV1, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBaseV1);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice Version 2\n\nIt supports [Conversations API](https://developer.bazaarvoice.com/conversations-api/home) and [v2](https://knowledge.bazaarvoice.com/wp-content/conversations/en_US/Display/display_integration.html)\n\n## BVReviews\n\nOne can use this component in order to add baazarvoice reviews widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVReviews } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVReviews />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVReviewsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVReviews = asBVReviewsBlue(BlueBVReviews);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVReviews />\n```\n\n## BVInlineRatings\n\nOne can use this component in order to add baazarvoice inline ratings widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVInlineRatings } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\nconst redirectUrl = \"http://localhost/testUrl\"; // set it you want to include a hyperlink in an inline rating\nconst seo = false; // set it if you want to enable/disable rendering of schema.org metadata\n<BVInlineRatings redirectUrl={redirectUrl} seo={seo} />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVInlineRatingsBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVInlineRatings = asBVInlineRatingsBlue(BVInlineRatings);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVInlineRatings />\n```\n\n## BVRatingsSummary\n\nOne can use this component in order to add baazarvoice ratings summary widget to the page. The component encapsulates logic to load main baazarvoice script to the page. The component provides ability for content editors to configure BV product mapping via UI.\n\n### Usage\n\nYou need to import the component\n\n``` js\nimport { BVRatingsSummary } from '@asemirsk/bv';\n```\n\nAnd then you can place the component on a page\n\n``` js\n<BVRatingsSummary />\n```\n\n### Customization\n\nIt is possible to customize the component by using Design API. The component exposes:\n\n* BVProductIsNotMapped - component is displayed when BV External ID is not set\n* BVLoading - component is displayed while BV main script is loading\n* BVPlaceholder - component is displayed on edit mode\n\nFor instance, you can add some styles to the exposed components\n\n``` js\nconst asBVRatingsSummaryBlue = withDesign({\n  BVProductIsNotMapped: addClasses('bg-blue text-white p-2 border border-red'),\n  BVPlaceholder: addClasses('bg-blue text-white p-2 border border-red'),\n  BVLoading: addClasses('bg-blue text-white p-2 border border-red'),\n});\n\nconst BlueBVRatingsSummary = asBVRatingsSummaryBlue(BVRatingsSummary);\n```\n\nAnd then you can add your customized component on a page\n\n``` js\n<BlueBVRatingsSummary />\n```\n\n## BVReviewsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Reviews widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVReviewsBase, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVReviewsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVInlineRatingsBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Inline Ratings widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVInlineRatingsBase, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVInlineRatingsBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n## BVRatingsSummaryBase\n\nOne can use this component as base component in order to compose his/her custom BV component for rendering BV Ratings Summary widget.\n\n### Usage\n\nYou need to import the base component and the list of HOCs to compose your custom BV component\n\n``` js\nimport { BVRatingsSummaryBase, withBVLoader, asBodilessBV } from '@asemirsk/bv';\nimport flowRight from 'lodash/flowRight';\n```\n\nThen you need to compose the custom component\n\n``` js\nconst CustomBVComponent = flowRight(\n  withBVLoader,\n  asBodilessBV\n)(BVRatingsSummaryBase);\n```\n\nThen you can place the custom component on a page\n\n``` js\n<CustomBVComponent />\n```\n\n# BazaarVoice HOC's\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with Bodiless data handlers.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBodilessBV, BVRatingsSummaryBase } from '@asemirsk/bv';\nconst MyBVComponent = asBodilessBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to compose his/her own BV component. asBodilessBV provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asBVComponent } from '@asemirsk/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asDesignableBVComponent\n\nOne can use this HOC in order to compose his/her own BV component. asDesignableBVComponent provides error handling and allows to subscribe to event when main BV script is loaded and $BV object is initialized.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asDesignableBVComponent } from '@asemirsk/bv';\n\nconst MyBVContainer = props => <div id=\"BVContainer\" {...props}></div>;\nconst MyBVComponent = asDesignableBVComponent('BV Ratings Summary', () => $BV.ui('rr', 'show_reviews', {productId: 'product_id'}))(MyBVContainer);\n)\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## asBodilessBV\n\nOne can use this HOC in order to enhance his/her base BV component with bodiless data handlers and product edit form.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { asEditableBV, BVRatingsSummaryBase } from '@asemirsk/bv';\nconst MyBVComponent = asEditableBV(BVRatingsSummaryBase);\n```\n\nThen you can add your component on a page\n\n``` js\n<MyBVComponent />\n```\n\n## withBVLoader\n\nOne can use this HOC in order to enhance his/her custom BV component with loading main BV script.\n\n### Usage\n\nYou need to import the HOC and compose your component\n\n``` js\nimport { withBVLoader } from '@asemirsk/bv';\nconst BVComponentWithLoader = withBVLoader(YourCustomBVComponent);\n```\n\nThen you can add your component on a page\n\n``` js\n<BVComponentWithLoader />\n```\n\n# BVLoaderProvider\n\nOne can use this component in order to add main Baazarvoice script to the page himself/herself. It might be helpful to add this component from performance and UX perspective when there are a lot of BV widgets on the same page.\n\n## Usage\n\nFirst, you need to compose your custom BV components.\n\n``` js\nimport { BVRatingsSummaryBase, BVReviewsBase, asBodilessBV } from '@asemirsk/bv';\n\nconst CustomBVRatingsSummary = asBodilessBV(BVRatingsSummaryBase);\nconst CustomBVReviews = asBodilessBV(BVReviewsBase);\n```\n\nThen, you should ensure BVLoaderProvider is imported on our page\n\n``` js\nimport { BVLoaderProvider } from '@asemirsk/bv';\n```\n\nThen, you can add BVLoaderProvider and our custom components on a page\n\n```js\n<BVLoaderProvider>\n  <CustomBVRatingsSummary />\n  <CustomBVReviews />\n</BVLoaderProvider>\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","_id":"@asemirsk/bv@1.0.0-canary-24-24.0","_nodeVersion":"16.13.2","_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (linux)","dist":{"integrity":"sha512-Fiz0Y7tVhvbbZtY/L5GDw7+i6HgWaM5VPMUzmG/qfldkbW6at8D4NqvTWyIGwyuidUdkVGu5jY+dIkB0eZCviw==","shasum":"f402f3ef2ad833e590ddda1bd1d66d45e4642d7b","tarball":"https://registry.npmjs.org/@asemirsk/bv/-/bv-1.0.0-canary-24-24.0.tgz","fileCount":81,"unpackedSize":107386,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFkV5W+YqfI+mhdgUYV/V2IgNhwlG1q7yzC9Z+3QCGH/AiA6T6qLzZGukmbo1Fp8LS6ga4BI75uxZZicDVNh2DF8rg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijfRFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpiTw//UC0qNbSNbBHAb/k8uoqL3T9xdgIYq7SxhuoLEZ6z/ytqKCSh\r\nobgnhl+FHwrYW1ZmoaEUIvEeIPmVE/LS2fX4Gwm+zoXLWrtAmNbKvSyynBdW\r\nIJ4TyE4hRPEGOsS9ZjOTjXfOe7pGxfuSFupLiDFyci4IPa/vhk1wKa/WKuHa\r\nwIkm5KN6LqFazA/gMNcpCYvNzrDSOIJF31M3D1s1EeQc0/UczvD3eREg/9J7\r\ntOVUhHjJjheGSkxfL6+DsH0NZUZm8rFUReSYMuFUYYOaMVCBeJ6Qngaq2azq\r\nN7VohuA0oCuK6MCc/lsDBeK57sS+3zuz80Rv04/3dvs3fMBxYduVc4SrMTop\r\neCOebLQYZNCz5Xi6rNIh/1I1R2ZvV0MnY4g0ZFthgBzFCpuKyGjKhBCAMwB4\r\nxoMf/RZI3ud7C0RX0aIYsdxSVG0oQlz8JVrvvmVtPv346eFPM7M+QUNAO9H5\r\nHdg6wRIfg/btGcSyVgIYDJpqZtp5Dmmn4O6PLOsdLDtjE7cQj9AcJiBlWGd0\r\n4j307+buV3rr9JUFHRG9wEnZ75aVDvOImJoDEiqLT7ESCD6HNQiuDCowWEIm\r\n/kGPLg3Pc5fv1t6UZydGVsOnTl4o4bhrjdruek8wzw6LD62XvDs12Oy+qWed\r\n4hsR400j7q1zEee1I/1/PR1uG/JGLAyZrAQ=\r\n=wrcV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asemirsk","email":"al.semirski@gmail.com"},"directories":{},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bv_1.0.0-canary-24-24.0_1653470277646_0.8239910029682784"},"_hasShrinkwrap":false}},"maintainers":[{"name":"asemirsk","email":"al.semirski@gmail.com"}],"description":"Provides bazaarvoice components.","homepage":"https://github.com/johnsonandjohnson/bodiless-js#readme","repository":{"type":"git","url":"git+https://github.com/johnsonandjohnson/bodiless-js.git"},"author":{"name":"Andrei Beliayeu","email":"abeliaye@its.jnj.com"},"bugs":{"url":"https://github.com/johnsonandjohnson/bodiless-js/issues"},"license":"Apache-2.0","readme":"","readmeFilename":""}