@lvble/react 3.91.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see react.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@lvble/core"),require("react")):"function"==typeof define&&define.amd?define("MyLib",["@lvble/core","React"],t):"object"==typeof exports?exports.MyLib=t(require("@lvble/core"),require("react")):e.MyLib=t(e["@lvble/core"],e.React)}(self,((e,t)=>(()=>{"use strict";var n={354:(e,t,n)=>{var r=n(639),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,n){var r,i={},a=null,u=null;for(r in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!p.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:a,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=a,t.jsxs=a},527:(e,t,n)=>{e.exports=n(354)},862:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(93),t)},93:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.LvbleWidget=void 0;const o=n(527),i=n(639),l=n(54);t.LvbleWidget=(0,i.memo)((e=>{var{token:t,environment:n,onEvent:c,modal:p,customApiUrl:a,onWidgetClickCallback:u,balance:f,pms:d,signature:s,externalId:v}=e,b=r(e,["token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId"]);const y=(0,i.useMemo)((()=>{if(n&&"function"==typeof c&&t){const e=(0,l.Lvble)({environment:n,onEvent:c,modal:p,customApiUrl:a});return null==e?void 0:e.createWidgetWithToken({token:t})}if(v&&d&&s&&(0===f||f)&&"function"==typeof u){const e=(0,l.Lvble)({environment:n,customApiUrl:a,balance:f,pms:d,signature:s,externalId:v,onEvent:c,onWidgetClickCallback:u});return null==e?void 0:e.createWidget()}}),[n,a,t]),m=(0,i.useCallback)((e=>{if(e&&y){for(;null==e?void 0:e.firstChild;)null==e||e.removeChild(null==e?void 0:e.firstChild);e.appendChild(y)}}),[y]);return y?(0,o.jsx)("div",Object.assign({style:{minHeight:"250px",width:"100%",height:"100%"},ref:m},b)):null}))},887:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=t.openExperience=t.Environment=t.Lvble=void 0;var i=n(54);Object.defineProperty(t,"Lvble",{enumerable:!0,get:function(){return i.Lvble}}),Object.defineProperty(t,"Environment",{enumerable:!0,get:function(){return i.Environment}}),o(n(862),t);var l=n(987);Object.defineProperty(t,"openExperience",{enumerable:!0,get:function(){return l.openExperience}});var c=n(531);Object.defineProperty(t,"openExperienceAndSetToken",{enumerable:!0,get:function(){return c.openExperienceAndSetToken}})},987:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperience=void 0;const r=n(54);t.openExperience=({token:e,environment:t,onEvent:n,modal:o,customApiUrl:i})=>{if(!t||!n)return null;(0,r.Lvble)({environment:t,onEvent:n,modal:o,customApiUrl:i}).open(e)}},531:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=void 0;const r=n(54);t.openExperienceAndSetToken=({token:e})=>{(0,r.Lvble)().openExperienceAndSetToken(e)}},54:t=>{t.exports=e},639:e=>{e.exports=t}},r={};return function e(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return n[t].call(i.exports,i,i.exports,e),i.exports}(887)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@lvble/core"),require("react")):"function"==typeof define&&define.amd?define("MyLib",["@lvble/core","React"],t):"object"==typeof exports?exports.MyLib=t(require("@lvble/core"),require("react")):e.MyLib=t(e["@lvble/core"],e.React)}(self,((e,t)=>(()=>{"use strict";var n={354:(e,t,n)=>{var r=n(639),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function p(e,t,n){var r,i={},p=null,u=null;for(r in void 0!==n&&(p=""+n),void 0!==t.key&&(p=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!a.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:p,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=p,t.jsxs=p},527:(e,t,n)=>{e.exports=n(354)},862:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(93),t)},93:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.LvbleWidget=void 0;const o=n(527),i=n(639),l=n(54);t.LvbleWidget=(0,i.memo)((e=>{var{token:t,environment:n,onEvent:c,modal:a,customApiUrl:p,onWidgetClickCallback:u,balance:d,pms:f,signature:s,externalId:v,productVariant:b}=e,y=r(e,["token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId","productVariant"]);const m=(0,i.useMemo)((()=>{if(n&&"function"==typeof c&&t){const e=(0,l.Lvble)({environment:n,onEvent:c,modal:a,customApiUrl:p,productVariant:b});return null==e?void 0:e.createWidgetWithToken({token:t})}if(v&&f&&s&&(0===d||d)&&"function"==typeof u){const e=(0,l.Lvble)({environment:n,customApiUrl:p,balance:d,pms:f,signature:s,externalId:v,onEvent:c,onWidgetClickCallback:u,productVariant:b});return null==e?void 0:e.createWidget()}}),[n,p,t]),_=(0,i.useCallback)((e=>{if(e&&m){for(;null==e?void 0:e.firstChild;)null==e||e.removeChild(null==e?void 0:e.firstChild);e.appendChild(m)}}),[m]);return m?(0,o.jsx)("div",Object.assign({style:{minHeight:"250px",width:"100%",height:"100%"},ref:_},y)):null}))},887:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=t.openExperience=t.Environment=t.Lvble=void 0;var i=n(54);Object.defineProperty(t,"Lvble",{enumerable:!0,get:function(){return i.Lvble}}),Object.defineProperty(t,"Environment",{enumerable:!0,get:function(){return i.Environment}}),o(n(862),t);var l=n(987);Object.defineProperty(t,"openExperience",{enumerable:!0,get:function(){return l.openExperience}});var c=n(531);Object.defineProperty(t,"openExperienceAndSetToken",{enumerable:!0,get:function(){return c.openExperienceAndSetToken}})},987:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperience=void 0;const r=n(54);t.openExperience=({token:e,environment:t,onEvent:n,modal:o,customApiUrl:i,productVariant:l})=>{if(!t||!n)return null;(0,r.Lvble)({environment:t,onEvent:n,modal:o,customApiUrl:i,productVariant:l}).open(e)}},531:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=void 0;const r=n(54);t.openExperienceAndSetToken=({token:e})=>{(0,r.Lvble)().openExperienceAndSetToken(e)}},54:t=>{t.exports=e},639:e=>{e.exports=t}},r={};return function e(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return n[t].call(i.exports,i,i.exports,e),i.exports}(887)})()));
3
3
  //# sourceMappingURL=react.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAAgBA,QAAQ,UAChC,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,QAAS,CAAC,cAAe,SAAUJ,GAChB,iBAAZC,QACdA,QAAe,MAAID,EAAQG,QAAQ,eAAgBA,QAAQ,UAE3DJ,EAAY,MAAIC,EAAQD,EAAK,eAAgBA,EAAY,MAC1D,CATD,CASGO,MAAM,CAACC,EAAiCC,4CCA9B,IAAIC,EAAE,EAAQ,KAASC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,kBAAkBE,EAAEC,OAAOC,UAAUC,eAAeC,EAAET,EAAEU,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAChP,SAASC,EAAEC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,CAAC,EAAEC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,IAAIG,EAAE,GAAGH,QAAG,IAASD,EAAEN,MAAMU,EAAE,GAAGJ,EAAEN,UAAK,IAASM,EAAEL,MAAMU,EAAEL,EAAEL,KAAcK,EAAEd,EAAEoB,KAAKN,EAAEE,KAAKT,EAAEJ,eAAea,KAAKC,EAAED,GAAGF,EAAEE,IAAI,GAAGH,GAAGA,EAAEQ,aAAa,IAAIL,KAAKF,EAAED,EAAEQ,kBAAe,IAASJ,EAAED,KAAKC,EAAED,GAAGF,EAAEE,IAAI,MAAM,CAACM,SAAS1B,EAAE2B,KAAKV,EAAEL,IAAIU,EAAET,IAAIU,EAAEK,MAAMP,EAAEQ,OAAOrB,EAAEsB,QAA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,OAAM,CAC3BZ,cACAC,UACAC,QACAC,iBAGawB,KAAK5B,EAAM,qGCxB5B,cAEa,EAAA2B,0BAA4B,EAAG3B,aACnB,IAAAa,SAERc,0BAA0B3B,EAAM,UCPjD5C,EAAOD,QAAUM,WCAjBL,EAAOD,QAAUO,ICCbmE,EAA2B,CAAC,SAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa7E,QAGrB,IAAIC,EAASyE,EAAyBE,GAAY,CAGjD5E,QAAS,CAAC,GAOX,OAHA+E,EAAoBH,GAAU3C,KAAKhC,EAAOD,QAASC,EAAQA,EAAOD,QAAS2E,GAGpE1E,EAAOD,OACf,CCnB0B2E,CAAoB","sources":["webpack://MyLib/webpack/universalModuleDefinition","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js","webpack://MyLib/./src/lib/components/index.ts","webpack://MyLib/./src/lib/components/lvble/index.tsx","webpack://MyLib/./src/lib/index.ts","webpack://MyLib/./src/lib/utils/openExperience.ts","webpack://MyLib/./src/lib/utils/openExperienceAndSetToken.ts","webpack://MyLib/external umd {\"commonjs\":\"@lvble/core\",\"commonjs2\":\"@lvble/core\",\"amd\":\"@lvble/core\",\"root\":\"@lvble/core\"}","webpack://MyLib/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"React\",\"root\":\"React\"}","webpack://MyLib/webpack/bootstrap","webpack://MyLib/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"MyLib\", [\"@lvble/core\", \"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MyLib\"] = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse\n\t\troot[\"MyLib\"] = factory(root[\"@lvble/core\"], root[\"React\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__54__, __WEBPACK_EXTERNAL_MODULE__639__) => {\nreturn ","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export * from \"./lvble\";\n","import { memo, useMemo, useCallback } from \"react\";\nimport { LvbleWidgetProps } from \"./index.d\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const LvbleWidget: React.FC<LvbleWidgetProps> = memo(\n ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n onWidgetClickCallback,\n balance,\n pms,\n signature,\n externalId,\n ...props\n }) => {\n const widget = useMemo(() => {\n if (environment && typeof onEvent === \"function\" && token) {\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n });\n\n return livbleInstance?.createWidgetWithToken({ token });\n } else if (\n externalId &&\n pms &&\n signature &&\n (balance === 0 || balance) &&\n typeof onWidgetClickCallback === \"function\"\n ) {\n const livbleInstance = Lvble({\n environment,\n customApiUrl,\n balance,\n pms,\n signature,\n externalId,\n onEvent,\n onWidgetClickCallback,\n });\n\n return livbleInstance?.createWidget();\n }\n }, [environment, customApiUrl, token]);\n\n const setWidgetRef = useCallback(\n (ref: HTMLDivElement | null) => {\n if (ref && widget) {\n while (ref?.firstChild) {\n ref?.removeChild(ref?.firstChild);\n }\n\n ref.appendChild(widget);\n }\n },\n [widget]\n );\n\n if (!widget) return null;\n\n return (\n <div\n style={{ minHeight: \"250px\", width: \"100%\", height: \"100%\" }}\n ref={setWidgetRef}\n {...props}\n />\n );\n }\n);\n","export { Lvble, Environment } from \"@lvble/core\";\nexport * from \"./components\";\nexport { openExperience } from \"./utils/openExperience\";\nexport { openExperienceAndSetToken } from \"./utils/openExperienceAndSetToken\";\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\nimport { type Environment, type ModalOptions, type Lvble } from \"@lvble/core\";\n\nexport const openExperience = ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n}: {\n token: string;\n environment: Environment;\n onEvent: (eventType: string, data: any) => void;\n modal?: ModalOptions;\n customApiUrl?: string | null;\n}) => {\n if (!environment || !onEvent) return null;\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n });\n\n livbleInstance.open(token);\n};\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const openExperienceAndSetToken = ({ token }: { token: string }) => {\n const livbleInstance = Lvble();\n\n livbleInstance.openExperienceAndSetToken(token);\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__54__;","module.exports = __WEBPACK_EXTERNAL_MODULE__639__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(887);\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__54__","__WEBPACK_EXTERNAL_MODULE__639__","f","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","Fragment","jsx","jsxs","LvbleWidget","memo","token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId","widget","useMemo","livbleInstance","Lvble","createWidgetWithToken","createWidget","setWidgetRef","useCallback","firstChild","removeChild","appendChild","style","minHeight","width","height","Environment","openExperience","openExperienceAndSetToken","open","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"react.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAAgBA,QAAQ,UAChC,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,QAAS,CAAC,cAAe,SAAUJ,GAChB,iBAAZC,QACdA,QAAe,MAAID,EAAQG,QAAQ,eAAgBA,QAAQ,UAE3DJ,EAAY,MAAIC,EAAQD,EAAK,eAAgBA,EAAY,MAC1D,CATD,CASGO,MAAM,CAACC,EAAiCC,4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,EAAOD,OACf,CCnB0B4E,CAAoB","sources":["webpack://MyLib/webpack/universalModuleDefinition","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js","webpack://MyLib/./src/lib/components/index.ts","webpack://MyLib/./src/lib/components/lvble/index.tsx","webpack://MyLib/./src/lib/index.ts","webpack://MyLib/./src/lib/utils/openExperience.ts","webpack://MyLib/./src/lib/utils/openExperienceAndSetToken.ts","webpack://MyLib/external umd {\"commonjs\":\"@lvble/core\",\"commonjs2\":\"@lvble/core\",\"amd\":\"@lvble/core\",\"root\":\"@lvble/core\"}","webpack://MyLib/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"React\",\"root\":\"React\"}","webpack://MyLib/webpack/bootstrap","webpack://MyLib/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"MyLib\", [\"@lvble/core\", \"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MyLib\"] = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse\n\t\troot[\"MyLib\"] = factory(root[\"@lvble/core\"], root[\"React\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__54__, __WEBPACK_EXTERNAL_MODULE__639__) => {\nreturn ","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export * from \"./lvble\";\n","import { memo, useMemo, useCallback } from \"react\";\nimport { LvbleWidgetProps } from \"./index.d\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const LvbleWidget: React.FC<LvbleWidgetProps> = memo(\n ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n onWidgetClickCallback,\n balance,\n pms,\n signature,\n externalId,\n productVariant,\n ...props\n }) => {\n const widget = useMemo(() => {\n if (environment && typeof onEvent === \"function\" && token) {\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n productVariant,\n });\n\n return livbleInstance?.createWidgetWithToken({ token });\n } else if (\n externalId &&\n pms &&\n signature &&\n (balance === 0 || balance) &&\n typeof onWidgetClickCallback === \"function\"\n ) {\n const livbleInstance = Lvble({\n environment,\n customApiUrl,\n balance,\n pms,\n signature,\n externalId,\n onEvent,\n onWidgetClickCallback,\n productVariant,\n });\n\n return livbleInstance?.createWidget();\n }\n }, [environment, customApiUrl, token]);\n\n const setWidgetRef = useCallback(\n (ref: HTMLDivElement | null) => {\n if (ref && widget) {\n while (ref?.firstChild) {\n ref?.removeChild(ref?.firstChild);\n }\n\n ref.appendChild(widget);\n }\n },\n [widget]\n );\n\n if (!widget) return null;\n\n return (\n <div\n style={{ minHeight: \"250px\", width: \"100%\", height: \"100%\" }}\n ref={setWidgetRef}\n {...props}\n />\n );\n }\n);\n","export { Lvble, Environment } from \"@lvble/core\";\nexport * from \"./components\";\nexport { openExperience } from \"./utils/openExperience\";\nexport { openExperienceAndSetToken } from \"./utils/openExperienceAndSetToken\";\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\nimport { type Environment, type ModalOptions, type Lvble } from \"@lvble/core\";\n\nexport const openExperience = ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n productVariant,\n}: {\n token: string;\n environment: Environment;\n onEvent: (eventType: string, data: any) => void;\n modal?: ModalOptions;\n customApiUrl?: string | null;\n productVariant?: \"rent\" | \"hoa\";\n}) => {\n if (!environment || !onEvent) return null;\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n productVariant,\n });\n\n livbleInstance.open(token);\n};\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const openExperienceAndSetToken = ({ token }: { token: string }) => {\n const livbleInstance = Lvble();\n\n livbleInstance.openExperienceAndSetToken(token);\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__54__;","module.exports = __WEBPACK_EXTERNAL_MODULE__639__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(887);\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__54__","__WEBPACK_EXTERNAL_MODULE__639__","f","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","Fragment","jsx","jsxs","LvbleWidget","memo","token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId","productVariant","widget","useMemo","livbleInstance","Lvble","createWidgetWithToken","createWidget","setWidgetRef","useCallback","firstChild","removeChild","appendChild","style","minHeight","width","height","Environment","openExperience","openExperienceAndSetToken","open","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see react.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@lvble/core"),require("react")):"function"==typeof define&&define.amd?define("MyLib",["@lvble/core","React"],t):"object"==typeof exports?exports.MyLib=t(require("@lvble/core"),require("react")):e.MyLib=t(e["@lvble/core"],e.React)}(self,((e,t)=>(()=>{"use strict";var n={354:(e,t,n)=>{var r=n(639),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,n){var r,i={},a=null,u=null;for(r in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!p.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:a,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=a,t.jsxs=a},527:(e,t,n)=>{e.exports=n(354)},862:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(93),t)},93:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.LvbleWidget=void 0;const o=n(527),i=n(639),l=n(54);t.LvbleWidget=(0,i.memo)((e=>{var{token:t,environment:n,onEvent:c,modal:p,customApiUrl:a,onWidgetClickCallback:u,balance:f,pms:d,signature:s,externalId:v}=e,b=r(e,["token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId"]);const y=(0,i.useMemo)((()=>{if(n&&"function"==typeof c&&t){const e=(0,l.Lvble)({environment:n,onEvent:c,modal:p,customApiUrl:a});return null==e?void 0:e.createWidgetWithToken({token:t})}if(v&&d&&s&&(0===f||f)&&"function"==typeof u){const e=(0,l.Lvble)({environment:n,customApiUrl:a,balance:f,pms:d,signature:s,externalId:v,onEvent:c,onWidgetClickCallback:u});return null==e?void 0:e.createWidget()}}),[n,a,t]),m=(0,i.useCallback)((e=>{if(e&&y){for(;null==e?void 0:e.firstChild;)null==e||e.removeChild(null==e?void 0:e.firstChild);e.appendChild(y)}}),[y]);return y?(0,o.jsx)("div",Object.assign({style:{minHeight:"250px",width:"100%",height:"100%"},ref:m},b)):null}))},887:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=t.openExperience=t.Environment=t.Lvble=void 0;var i=n(54);Object.defineProperty(t,"Lvble",{enumerable:!0,get:function(){return i.Lvble}}),Object.defineProperty(t,"Environment",{enumerable:!0,get:function(){return i.Environment}}),o(n(862),t);var l=n(987);Object.defineProperty(t,"openExperience",{enumerable:!0,get:function(){return l.openExperience}});var c=n(531);Object.defineProperty(t,"openExperienceAndSetToken",{enumerable:!0,get:function(){return c.openExperienceAndSetToken}})},987:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperience=void 0;const r=n(54);t.openExperience=({token:e,environment:t,onEvent:n,modal:o,customApiUrl:i})=>{if(!t||!n)return null;(0,r.Lvble)({environment:t,onEvent:n,modal:o,customApiUrl:i}).open(e)}},531:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=void 0;const r=n(54);t.openExperienceAndSetToken=({token:e})=>{(0,r.Lvble)().openExperienceAndSetToken(e)}},54:t=>{t.exports=e},639:e=>{e.exports=t}},r={};return function e(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return n[t].call(i.exports,i,i.exports,e),i.exports}(887)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@lvble/core"),require("react")):"function"==typeof define&&define.amd?define("MyLib",["@lvble/core","React"],t):"object"==typeof exports?exports.MyLib=t(require("@lvble/core"),require("react")):e.MyLib=t(e["@lvble/core"],e.React)}(self,((e,t)=>(()=>{"use strict";var n={354:(e,t,n)=>{var r=n(639),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function p(e,t,n){var r,i={},p=null,u=null;for(r in void 0!==n&&(p=""+n),void 0!==t.key&&(p=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!a.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:p,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=p,t.jsxs=p},527:(e,t,n)=>{e.exports=n(354)},862:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(93),t)},93:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.LvbleWidget=void 0;const o=n(527),i=n(639),l=n(54);t.LvbleWidget=(0,i.memo)((e=>{var{token:t,environment:n,onEvent:c,modal:a,customApiUrl:p,onWidgetClickCallback:u,balance:d,pms:f,signature:s,externalId:v,productVariant:b}=e,y=r(e,["token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId","productVariant"]);const m=(0,i.useMemo)((()=>{if(n&&"function"==typeof c&&t){const e=(0,l.Lvble)({environment:n,onEvent:c,modal:a,customApiUrl:p,productVariant:b});return null==e?void 0:e.createWidgetWithToken({token:t})}if(v&&f&&s&&(0===d||d)&&"function"==typeof u){const e=(0,l.Lvble)({environment:n,customApiUrl:p,balance:d,pms:f,signature:s,externalId:v,onEvent:c,onWidgetClickCallback:u,productVariant:b});return null==e?void 0:e.createWidget()}}),[n,p,t]),_=(0,i.useCallback)((e=>{if(e&&m){for(;null==e?void 0:e.firstChild;)null==e||e.removeChild(null==e?void 0:e.firstChild);e.appendChild(m)}}),[m]);return m?(0,o.jsx)("div",Object.assign({style:{minHeight:"250px",width:"100%",height:"100%"},ref:_},y)):null}))},887:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=t.openExperience=t.Environment=t.Lvble=void 0;var i=n(54);Object.defineProperty(t,"Lvble",{enumerable:!0,get:function(){return i.Lvble}}),Object.defineProperty(t,"Environment",{enumerable:!0,get:function(){return i.Environment}}),o(n(862),t);var l=n(987);Object.defineProperty(t,"openExperience",{enumerable:!0,get:function(){return l.openExperience}});var c=n(531);Object.defineProperty(t,"openExperienceAndSetToken",{enumerable:!0,get:function(){return c.openExperienceAndSetToken}})},987:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperience=void 0;const r=n(54);t.openExperience=({token:e,environment:t,onEvent:n,modal:o,customApiUrl:i,productVariant:l})=>{if(!t||!n)return null;(0,r.Lvble)({environment:t,onEvent:n,modal:o,customApiUrl:i,productVariant:l}).open(e)}},531:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=void 0;const r=n(54);t.openExperienceAndSetToken=({token:e})=>{(0,r.Lvble)().openExperienceAndSetToken(e)}},54:t=>{t.exports=e},639:e=>{e.exports=t}},r={};return function e(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return n[t].call(i.exports,i,i.exports,e),i.exports}(887)})()));
3
3
  //# sourceMappingURL=react.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAAgBA,QAAQ,UAChC,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,QAAS,CAAC,cAAe,SAAUJ,GAChB,iBAAZC,QACdA,QAAe,MAAID,EAAQG,QAAQ,eAAgBA,QAAQ,UAE3DJ,EAAY,MAAIC,EAAQD,EAAK,eAAgBA,EAAY,MAC1D,CATD,CASGO,MAAM,CAACC,EAAiCC,4CCA9B,IAAIC,EAAE,EAAQ,KAASC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,kBAAkBE,EAAEC,OAAOC,UAAUC,eAAeC,EAAET,EAAEU,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAChP,SAASC,EAAEC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,CAAC,EAAEC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,IAAIG,EAAE,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,EAAK0C,YAAY1C,aAAG,EAAHA,EAAKyC,YAGxBzC,EAAI2C,YAAYV,MAGpB,CAACA,IAGH,OAAKA,GAGH,8BACEW,MAAO,CAAEC,UAAW,QAASC,MAAO,OAAQC,OAAQ,QACpD/C,IAAKuC,GACDxB,IANY,IAQnB,wkBCvEL,YAAS,uEAAAqB,KAAK,IAAE,6EAAAY,WAAW,IAC3B,YACA,aAAS,gFAAAC,cAAc,IACvB,aAAS,2FAAAC,yBAAyB,4FCDlC,cAGa,EAAAD,eAAiB,EAC5B1B,QACAC,cACAC,UACAC,QACAC,mBAQA,IAAKH,IAAgBC,EAAS,OAAO,MACd,IAAAW,OAAM,CAC3BZ,cACAC,UACAC,QACAC,iBAGawB,KAAK5B,EAAM,qGCxB5B,cAEa,EAAA2B,0BAA4B,EAAG3B,aACnB,IAAAa,SAERc,0BAA0B3B,EAAM,UCPjD5C,EAAOD,QAAUM,WCAjBL,EAAOD,QAAUO,ICCbmE,EAA2B,CAAC,SAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa7E,QAGrB,IAAIC,EAASyE,EAAyBE,GAAY,CAGjD5E,QAAS,CAAC,GAOX,OAHA+E,EAAoBH,GAAU3C,KAAKhC,EAAOD,QAASC,EAAQA,EAAOD,QAAS2E,GAGpE1E,EAAOD,OACf,CCnB0B2E,CAAoB","sources":["webpack://MyLib/webpack/universalModuleDefinition","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js","webpack://MyLib/./src/lib/components/index.ts","webpack://MyLib/./src/lib/components/lvble/index.tsx","webpack://MyLib/./src/lib/index.ts","webpack://MyLib/./src/lib/utils/openExperience.ts","webpack://MyLib/./src/lib/utils/openExperienceAndSetToken.ts","webpack://MyLib/external umd {\"commonjs\":\"@lvble/core\",\"commonjs2\":\"@lvble/core\",\"amd\":\"@lvble/core\",\"root\":\"@lvble/core\"}","webpack://MyLib/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"React\",\"root\":\"React\"}","webpack://MyLib/webpack/bootstrap","webpack://MyLib/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"MyLib\", [\"@lvble/core\", \"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MyLib\"] = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse\n\t\troot[\"MyLib\"] = factory(root[\"@lvble/core\"], root[\"React\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__54__, __WEBPACK_EXTERNAL_MODULE__639__) => {\nreturn ","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export * from \"./lvble\";\n","import { memo, useMemo, useCallback } from \"react\";\nimport { LvbleWidgetProps } from \"./index.d\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const LvbleWidget: React.FC<LvbleWidgetProps> = memo(\n ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n onWidgetClickCallback,\n balance,\n pms,\n signature,\n externalId,\n ...props\n }) => {\n const widget = useMemo(() => {\n if (environment && typeof onEvent === \"function\" && token) {\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n });\n\n return livbleInstance?.createWidgetWithToken({ token });\n } else if (\n externalId &&\n pms &&\n signature &&\n (balance === 0 || balance) &&\n typeof onWidgetClickCallback === \"function\"\n ) {\n const livbleInstance = Lvble({\n environment,\n customApiUrl,\n balance,\n pms,\n signature,\n externalId,\n onEvent,\n onWidgetClickCallback,\n });\n\n return livbleInstance?.createWidget();\n }\n }, [environment, customApiUrl, token]);\n\n const setWidgetRef = useCallback(\n (ref: HTMLDivElement | null) => {\n if (ref && widget) {\n while (ref?.firstChild) {\n ref?.removeChild(ref?.firstChild);\n }\n\n ref.appendChild(widget);\n }\n },\n [widget]\n );\n\n if (!widget) return null;\n\n return (\n <div\n style={{ minHeight: \"250px\", width: \"100%\", height: \"100%\" }}\n ref={setWidgetRef}\n {...props}\n />\n );\n }\n);\n","export { Lvble, Environment } from \"@lvble/core\";\nexport * from \"./components\";\nexport { openExperience } from \"./utils/openExperience\";\nexport { openExperienceAndSetToken } from \"./utils/openExperienceAndSetToken\";\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\nimport { type Environment, type ModalOptions, type Lvble } from \"@lvble/core\";\n\nexport const openExperience = ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n}: {\n token: string;\n environment: Environment;\n onEvent: (eventType: string, data: any) => void;\n modal?: ModalOptions;\n customApiUrl?: string | null;\n}) => {\n if (!environment || !onEvent) return null;\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n });\n\n livbleInstance.open(token);\n};\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const openExperienceAndSetToken = ({ token }: { token: string }) => {\n const livbleInstance = Lvble();\n\n livbleInstance.openExperienceAndSetToken(token);\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__54__;","module.exports = __WEBPACK_EXTERNAL_MODULE__639__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(887);\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__54__","__WEBPACK_EXTERNAL_MODULE__639__","f","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","Fragment","jsx","jsxs","LvbleWidget","memo","token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId","widget","useMemo","livbleInstance","Lvble","createWidgetWithToken","createWidget","setWidgetRef","useCallback","firstChild","removeChild","appendChild","style","minHeight","width","height","Environment","openExperience","openExperienceAndSetToken","open","__webpack_module_cache__","__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AM,mBAGamB,KAAK7B,EAAM,qGC3B5B,cAEa,EAAA4B,0BAA4B,EAAG5B,aACnB,IAAAc,SAERc,0BAA0B5B,EAAM,UCPjD5C,EAAOD,QAAUM,WCAjBL,EAAOD,QAAUO,ICCboE,EAA2B,CAAC,SAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa9E,QAGrB,IAAIC,EAAS0E,EAAyBE,GAAY,CAGjD7E,QAAS,CAAC,GAOX,OAHAgF,EAAoBH,GAAU5C,KAAKhC,EAAOD,QAASC,EAAQA,EAAOD,QAAS4E,GAGpE3E,EAAOD,OACf,CCnB0B4E,CAAoB","sources":["webpack://MyLib/webpack/universalModuleDefinition","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js","webpack://MyLib/./src/lib/components/index.ts","webpack://MyLib/./src/lib/components/lvble/index.tsx","webpack://MyLib/./src/lib/index.ts","webpack://MyLib/./src/lib/utils/openExperience.ts","webpack://MyLib/./src/lib/utils/openExperienceAndSetToken.ts","webpack://MyLib/external umd {\"commonjs\":\"@lvble/core\",\"commonjs2\":\"@lvble/core\",\"amd\":\"@lvble/core\",\"root\":\"@lvble/core\"}","webpack://MyLib/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"React\",\"root\":\"React\"}","webpack://MyLib/webpack/bootstrap","webpack://MyLib/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"MyLib\", [\"@lvble/core\", \"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MyLib\"] = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse\n\t\troot[\"MyLib\"] = factory(root[\"@lvble/core\"], root[\"React\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__54__, __WEBPACK_EXTERNAL_MODULE__639__) => {\nreturn ","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export * from \"./lvble\";\n","import { memo, useMemo, useCallback } from \"react\";\nimport { LvbleWidgetProps } from \"./index.d\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const LvbleWidget: React.FC<LvbleWidgetProps> = memo(\n ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n onWidgetClickCallback,\n balance,\n pms,\n signature,\n externalId,\n productVariant,\n ...props\n }) => {\n const widget = useMemo(() => {\n if (environment && typeof onEvent === \"function\" && token) {\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n productVariant,\n });\n\n return livbleInstance?.createWidgetWithToken({ token });\n } else if (\n externalId &&\n pms &&\n signature &&\n (balance === 0 || balance) &&\n typeof onWidgetClickCallback === \"function\"\n ) {\n const livbleInstance = Lvble({\n environment,\n customApiUrl,\n balance,\n pms,\n signature,\n externalId,\n onEvent,\n onWidgetClickCallback,\n productVariant,\n });\n\n return livbleInstance?.createWidget();\n }\n }, [environment, customApiUrl, token]);\n\n const setWidgetRef = useCallback(\n (ref: HTMLDivElement | null) => {\n if (ref && widget) {\n while (ref?.firstChild) {\n ref?.removeChild(ref?.firstChild);\n }\n\n ref.appendChild(widget);\n }\n },\n [widget]\n );\n\n if (!widget) return null;\n\n return (\n <div\n style={{ minHeight: \"250px\", width: \"100%\", height: \"100%\" }}\n ref={setWidgetRef}\n {...props}\n />\n );\n }\n);\n","export { Lvble, Environment } from \"@lvble/core\";\nexport * from \"./components\";\nexport { openExperience } from \"./utils/openExperience\";\nexport { openExperienceAndSetToken } from \"./utils/openExperienceAndSetToken\";\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\nimport { type Environment, type ModalOptions, type Lvble } from \"@lvble/core\";\n\nexport const openExperience = ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n productVariant,\n}: {\n token: string;\n environment: Environment;\n onEvent: (eventType: string, data: any) => void;\n modal?: ModalOptions;\n customApiUrl?: string | null;\n productVariant?: \"rent\" | \"hoa\";\n}) => {\n if (!environment || !onEvent) return null;\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n productVariant,\n });\n\n livbleInstance.open(token);\n};\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const openExperienceAndSetToken = ({ token }: { token: string }) => {\n const livbleInstance = Lvble();\n\n livbleInstance.openExperienceAndSetToken(token);\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__54__;","module.exports = __WEBPACK_EXTERNAL_MODULE__639__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(887);\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__54__","__WEBPACK_EXTERNAL_MODULE__639__","f","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","Fragment","jsx","jsxs","LvbleWidget","memo","token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId","productVariant","widget","useMemo","livbleInstance","Lvble","createWidgetWithToken","createWidget","setWidgetRef","useCallback","firstChild","removeChild","appendChild","style","minHeight","width","height","Environment","openExperience","openExperienceAndSetToken","open","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAqElD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAwElD,CAAC"}
@@ -16,7 +16,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
16
16
  const react_1 = require("react");
17
17
  const core_1 = require("@lvble/core");
18
18
  exports.LvbleWidget = (0, react_1.memo)((_a) => {
19
- var { token, environment, onEvent, modal, customApiUrl, onWidgetClickCallback, balance, pms, signature, externalId } = _a, props = __rest(_a, ["token", "environment", "onEvent", "modal", "customApiUrl", "onWidgetClickCallback", "balance", "pms", "signature", "externalId"]);
19
+ var { token, environment, onEvent, modal, customApiUrl, onWidgetClickCallback, balance, pms, signature, externalId, productVariant } = _a, props = __rest(_a, ["token", "environment", "onEvent", "modal", "customApiUrl", "onWidgetClickCallback", "balance", "pms", "signature", "externalId", "productVariant"]);
20
20
  const widget = (0, react_1.useMemo)(() => {
21
21
  if (environment && typeof onEvent === "function" && token) {
22
22
  const livbleInstance = (0, core_1.Lvble)({
@@ -24,6 +24,7 @@ exports.LvbleWidget = (0, react_1.memo)((_a) => {
24
24
  onEvent,
25
25
  modal,
26
26
  customApiUrl,
27
+ productVariant,
27
28
  });
28
29
  return livbleInstance === null || livbleInstance === void 0 ? void 0 : livbleInstance.createWidgetWithToken({ token });
29
30
  }
@@ -41,6 +42,7 @@ exports.LvbleWidget = (0, react_1.memo)((_a) => {
41
42
  externalId,
42
43
  onEvent,
43
44
  onWidgetClickCallback,
45
+ productVariant,
44
46
  });
45
47
  return livbleInstance === null || livbleInstance === void 0 ? void 0 : livbleInstance.createWidget();
46
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAmD;AAEnD,sCAAoC;AAEvB,QAAA,WAAW,GAA+B,IAAA,YAAI,EACzD,CAAC,EAYA,EAAE,EAAE;QAZJ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,CAAC,CAAC;SACzB;IACH,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,CACL,8CACE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5D,GAAG,EAAE,YAAY,IACb,KAAK,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAmD;AAEnD,sCAAoC;AAEvB,QAAA,WAAW,GAA+B,IAAA,YAAI,EACzD,CAAC,EAaA,EAAE,EAAE;QAbJ,EACC,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,YAAY,EACZ,qBAAqB,EACrB,OAAO,EACP,GAAG,EACH,SAAS,EACT,UAAU,EACV,cAAc,OAEf,EADI,KAAK,cAZT,oJAaA,CADS;IAER,MAAM,MAAM,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC1B,IAAI,WAAW,IAAI,OAAO,OAAO,KAAK,UAAU,IAAI,KAAK,EAAE;YACzD,MAAM,cAAc,GAAG,IAAA,YAAK,EAAC;gBAC3B,WAAW;gBACX,OAAO;gBACP,KAAK;gBACL,YAAY;gBACZ,cAAc;aACf,CAAC,CAAC;YAEH,OAAO,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,qBAAqB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;SACzD;aAAM,IACL,UAAU;YACV,GAAG;YACH,SAAS;YACT,CAAC,OAAO,KAAK,CAAC,IAAI,OAAO,CAAC;YAC1B,OAAO,qBAAqB,KAAK,UAAU,EAC3C;YACA,MAAM,cAAc,GAAG,IAAA,YAAK,EAAC;gBAC3B,WAAW;gBACX,YAAY;gBACZ,OAAO;gBACP,GAAG;gBACH,SAAS;gBACT,UAAU;gBACV,OAAO;gBACP,qBAAqB;gBACrB,cAAc;aACf,CAAC,CAAC;YAEH,OAAO,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,EAAE,CAAC;SACvC;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;IAEvC,MAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,CAAC,GAA0B,EAAE,EAAE;QAC7B,IAAI,GAAG,IAAI,MAAM,EAAE;YACjB,OAAO,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,EAAE;gBACtB,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,WAAW,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,CAAC,CAAC;aACnC;YAED,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SACzB;IACH,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,CACL,8CACE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5D,GAAG,EAAE,YAAY,IACb,KAAK,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { type Environment, type ModalOptions } from "@lvble/core";
2
- export declare const openExperience: ({ token, environment, onEvent, modal, customApiUrl, }: {
2
+ export declare const openExperience: ({ token, environment, onEvent, modal, customApiUrl, productVariant, }: {
3
3
  token: string;
4
4
  environment: Environment;
5
5
  onEvent: (eventType: string, data: any) => void;
6
6
  modal?: ModalOptions | undefined;
7
7
  customApiUrl?: string | null | undefined;
8
+ productVariant?: "rent" | "hoa" | undefined;
8
9
  }) => null | undefined;
9
10
  //# sourceMappingURL=openExperience.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openExperience.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/openExperience.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAc,MAAM,aAAa,CAAC;AAE9E,eAAO,MAAM,cAAc;WAOlB,MAAM;iBACA,WAAW;yBACH,MAAM,QAAQ,GAAG,KAAK,IAAI;;;sBAahD,CAAC"}
1
+ {"version":3,"file":"openExperience.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/openExperience.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAc,MAAM,aAAa,CAAC;AAE9E,eAAO,MAAM,cAAc;WAQlB,MAAM;iBACA,WAAW;yBACH,MAAM,QAAQ,GAAG,KAAK,IAAI;;;;sBAehD,CAAC"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.openExperience = void 0;
4
4
  const core_1 = require("@lvble/core");
5
- const openExperience = ({ token, environment, onEvent, modal, customApiUrl, }) => {
5
+ const openExperience = ({ token, environment, onEvent, modal, customApiUrl, productVariant, }) => {
6
6
  if (!environment || !onEvent)
7
7
  return null;
8
8
  const livbleInstance = (0, core_1.Lvble)({
@@ -10,6 +10,7 @@ const openExperience = ({ token, environment, onEvent, modal, customApiUrl, }) =
10
10
  onEvent,
11
11
  modal,
12
12
  customApiUrl,
13
+ productVariant,
13
14
  });
14
15
  livbleInstance.open(token);
15
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"openExperience.js","sourceRoot":"","sources":["../../../src/lib/utils/openExperience.ts"],"names":[],"mappings":";;;AAEA,sCAAoC;AAG7B,MAAM,cAAc,GAAG,CAAC,EAC7B,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,YAAY,GAOb,EAAE,EAAE;IACH,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,cAAc,GAAG,IAAA,YAAK,EAAC;QAC3B,WAAW;QACX,OAAO;QACP,KAAK;QACL,YAAY;KACb,CAAC,CAAC;IAEH,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CAAC;AAtBW,QAAA,cAAc,kBAsBzB"}
1
+ {"version":3,"file":"openExperience.js","sourceRoot":"","sources":["../../../src/lib/utils/openExperience.ts"],"names":[],"mappings":";;;AAEA,sCAAoC;AAG7B,MAAM,cAAc,GAAG,CAAC,EAC7B,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,YAAY,EACZ,cAAc,GAQf,EAAE,EAAE;IACH,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,cAAc,GAAG,IAAA,YAAK,EAAC;QAC3B,WAAW;QACX,OAAO;QACP,KAAK;QACL,YAAY;QACZ,cAAc;KACf,CAAC,CAAC;IAEH,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CAAC;AAzBW,QAAA,cAAc,kBAyBzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAqElD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAwElD,CAAC"}
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { memo, useMemo, useCallback } from "react";
14
14
  import { Lvble } from "@lvble/core";
15
15
  export const LvbleWidget = memo((_a) => {
16
- var { token, environment, onEvent, modal, customApiUrl, onWidgetClickCallback, balance, pms, signature, externalId } = _a, props = __rest(_a, ["token", "environment", "onEvent", "modal", "customApiUrl", "onWidgetClickCallback", "balance", "pms", "signature", "externalId"]);
16
+ var { token, environment, onEvent, modal, customApiUrl, onWidgetClickCallback, balance, pms, signature, externalId, productVariant } = _a, props = __rest(_a, ["token", "environment", "onEvent", "modal", "customApiUrl", "onWidgetClickCallback", "balance", "pms", "signature", "externalId", "productVariant"]);
17
17
  const widget = useMemo(() => {
18
18
  if (environment && typeof onEvent === "function" && token) {
19
19
  const livbleInstance = Lvble({
@@ -21,6 +21,7 @@ export const LvbleWidget = memo((_a) => {
21
21
  onEvent,
22
22
  modal,
23
23
  customApiUrl,
24
+ productVariant,
24
25
  });
25
26
  return livbleInstance === null || livbleInstance === void 0 ? void 0 : livbleInstance.createWidgetWithToken({ token });
26
27
  }
@@ -38,6 +39,7 @@ export const LvbleWidget = memo((_a) => {
38
39
  externalId,
39
40
  onEvent,
40
41
  onWidgetClickCallback,
42
+ productVariant,
41
43
  });
42
44
  return livbleInstance === null || livbleInstance === void 0 ? void 0 : livbleInstance.createWidget();
43
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GAA+B,IAAI,CACzD,CAAC,EAYA,EAAE,EAAE;QAZJ,EACC,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,YAAY,EACZ,qBAAqB,EACrB,OAAO,EACP,GAAG,EACH,SAAS,EACT,UAAU,OAEX,EADI,KAAK,cAXT,kIAYA,CADS;IAER,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,IAAI,WAAW,IA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E,YAAY,IACb,KAAK,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GAA+B,IAAI,CACzD,CAAC,EAaA,EAAE,EAAE;QAbJ,EACC,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,YAAY,EACZ,qBAAqB,EACrB,OAAO,EACP,GAAG,EACH,SAAS,EACT,UAAU,EACV,cAAc,OAEf,EADI,KAAK,cAZT,oJAaA,CADS;IAER,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,IAAI,WAAW,IAAI,OAAO,OAAO,KAAK,UAAU,IAAI,KAAK,EAAE;YACzD,MAAM,cAAc,GAAG,KAAK,CAAC;gBAC3B,WAAW;gBACX,OAAO;gBACP,KAAK;gBACL,YAAY;gBACZ,cAAc;aACf,CAAC,CAAC;YAEH,OAAO,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,qBAAqB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;SACzD;aAAM,IACL,UAAU;YACV,GAAG;YACH,SAAS;YACT,CAAC,OAAO,KAAK,CAAC,IAAI,OAAO,CAAC;YAC1B,OAAO,qBAAqB,KAAK,UAAU,EAC3C;YACA,MAAM,cAAc,GAAG,KAAK,CAAC;gBAC3B,WAAW;gBACX,YAAY;gBACZ,OAAO;gBACP,GAAG;gBACH,SAAS;gBACT,UAAU;gBACV,OAAO;gBACP,qBAAqB;gBACrB,cAAc;aACf,CAAC,CAAC;YAEH,OAAO,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,EAAE,CAAC;SACvC;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;IAEvC,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,GAA0B,EAAE,EAAE;QAC7B,IAAI,GAAG,IAAI,MAAM,EAAE;YACjB,OAAO,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,EAAE;gBACtB,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,WAAW,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,CAAC,CAAC;aACnC;YAED,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SACzB;IACH,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,CACL,4BACE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5D,GAAG,EAAE,YAAY,IACb,KAAK,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { type Environment, type ModalOptions } from "@lvble/core";
2
- export declare const openExperience: ({ token, environment, onEvent, modal, customApiUrl, }: {
2
+ export declare const openExperience: ({ token, environment, onEvent, modal, customApiUrl, productVariant, }: {
3
3
  token: string;
4
4
  environment: Environment;
5
5
  onEvent: (eventType: string, data: any) => void;
6
6
  modal?: ModalOptions | undefined;
7
7
  customApiUrl?: string | null | undefined;
8
+ productVariant?: "rent" | "hoa" | undefined;
8
9
  }) => null | undefined;
9
10
  //# sourceMappingURL=openExperience.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"openExperience.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/openExperience.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAc,MAAM,aAAa,CAAC;AAE9E,eAAO,MAAM,cAAc;WAOlB,MAAM;iBACA,WAAW;yBACH,MAAM,QAAQ,GAAG,KAAK,IAAI;;;sBAahD,CAAC"}
1
+ {"version":3,"file":"openExperience.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/openExperience.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAc,MAAM,aAAa,CAAC;AAE9E,eAAO,MAAM,cAAc;WAQlB,MAAM;iBACA,WAAW;yBACH,MAAM,QAAQ,GAAG,KAAK,IAAI;;;;sBAehD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Lvble } from "@lvble/core";
2
- export const openExperience = ({ token, environment, onEvent, modal, customApiUrl, }) => {
2
+ export const openExperience = ({ token, environment, onEvent, modal, customApiUrl, productVariant, }) => {
3
3
  if (!environment || !onEvent)
4
4
  return null;
5
5
  const livbleInstance = Lvble({
@@ -7,6 +7,7 @@ export const openExperience = ({ token, environment, onEvent, modal, customApiUr
7
7
  onEvent,
8
8
  modal,
9
9
  customApiUrl,
10
+ productVariant,
10
11
  });
11
12
  livbleInstance.open(token);
12
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"openExperience.js","sourceRoot":"","sources":["../../../src/lib/utils/openExperience.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,YAAY,GAOb,EAAE,EAAE;IACH,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,cAAc,GAAG,KAAK,CAAC;QAC3B,WAAW;QACX,OAAO;QACP,KAAK;QACL,YAAY;KACb,CAAC,CAAC;IAEH,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CAAC"}
1
+ {"version":3,"file":"openExperience.js","sourceRoot":"","sources":["../../../src/lib/utils/openExperience.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,KAAK,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,YAAY,EACZ,cAAc,GAQf,EAAE,EAAE;IACH,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,cAAc,GAAG,KAAK,CAAC;QAC3B,WAAW;QACX,OAAO;QACP,KAAK;QACL,YAAY;QACZ,cAAc;KACf,CAAC,CAAC;IAEH,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CAAC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@lvble/react",
3
3
  "private": false,
4
4
  "license": "MIT",
5
- "version": "3.91.0",
5
+ "version": "4.1.0",
6
6
  "main": "./dist/_bundles/index.js",
7
7
  "module": "./dist/lib-esm/index.js",
8
8
  "types": "./dist/lib/index.d.ts",
@@ -54,6 +54,6 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "pkg-dir": "^7.0.0",
57
- "@lvble/core": "3.91.0"
57
+ "@lvble/core": "4.1.0"
58
58
  }
59
59
  }