bonuspluscomponents 0.0.116 → 0.0.117

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.
@@ -30,7 +30,7 @@ Check the top-level render call using <`+pe+">.")}return ie}}function Zt(k,ie){{
30
30
  @font-face {
31
31
  font-family: bonusPlus, Fallback, sans-serif;
32
32
  }
33
- `}}});ji=Te.responsiveFontSizes(ji);const qu=ji,Sm={isLoading:!1,setIsLoading(e){}},Ln=K.createContext(Sm),Rm=()=>{const[e,t]=K.useState(!1);return{isLoading:e,setIsLoading:t}},Mm=({children:e})=>{const t=Rm();return p.jsx(Ln.Provider,{value:t,children:e})},km={openedPage:"info",setOpenedPage:null},Ro=K.createContext(km),$m=()=>{const[e,t]=K.useState("info");return{openedPage:e,setOpenedPage:t}},_m=({children:e})=>{const t=$m();return p.jsx(Ro.Provider,{value:t,children:e})},Im={cabinetType:null,cabinetIsLoading:!0,apiAxios:()=>null,phoneNumber:null,setPhoneNumber:null,cabinetSettings:null,setCabinetSettings:null,cabinetUISettings:null,authToken:null,setAuthToken:null,createAxios:null,theme:null,customer:null,VKUserId:null,setVKUserId:null,additionalData:null,setAdditionalData:null},Ft=K.createContext(Im),Nm=({cabinetType:e})=>{const{setIsLoading:t}=K.useContext(Ln),{setOpenedPage:n}=K.useContext(Ro),[r,o]=K.useState(null),[i,s]=K.useState(null),[l,c]=K.useState(null),[u,d]=K.useState(null),[f,m]=K.useState(null);K.useState(null);const[v,b]=K.useState({}),h=()=>Uu.create({baseURL:f??"",headers:{Authorization:`Bearer ${l}`,"X-CabinetType":e,"X-PhoneNumber":i}}),y=qu,[E,P]=K.useState(null),[x,C]=K.useState(null);return K.useEffect(()=>{(async()=>{if(!l||!i||e===null)return;t(!0);const R=await h().post("/externalCustomerCabinet/cabinetInfo",{});P(R.data),R.data.isReg&&n("registration"),t(!1)})()},[i,l]),K.useEffect(()=>{(async()=>{if(!l||!i||e===null||E!=null&&E.isReg)return;t(!0);const R=await h().post("/externalCustomerCabinet/customer/info",{VKUserId:r});d(R.data.customer),t(!1)})()},[i]),K.useEffect(()=>{(async()=>{if(!l)return;t(!0);const R=await h().post("/externalCustomerCabinet/settings",{});C(R.data.settings),t(!1)})()},[l]),{cabinetType:e,apiAxios:h,cabinetIsLoading:!1,cabinetSettings:E,setCabinetSettings:P,cabinetUISettings:x,phoneNumber:i,setPhoneNumber:s,authToken:l,setAuthToken:c,createAxios:(O,D)=>{c(O),m(D)},theme:y,setVKUserId:o,VKUserId:r,customer:u,additionalData:v,setAdditionalData:b}},jm=({children:e,cabinetType:t})=>{const n=Nm({cabinetType:t});return p.jsx(Te.ThemeProvider,{theme:n.theme,children:p.jsx(Ft.Provider,{value:{...n,cabinetType:t},children:e})})},Gu=({fileValue:e})=>{const{cabinetUISettings:t}=K.useContext(Ft),n=e?`url(data:image/png;base64,${e})`:`url(${t==null?void 0:t.headerImageUrl})`;return p.jsx(Te.Typography,{variant:"h2",component:"div",children:p.jsx("div",{className:"header",style:{backgroundColor:t==null?void 0:t.headerColor},children:p.jsx(Te.Container,{maxWidth:"sm",sx:{paddingBottom:`${t==null?void 0:t.paddingBottom}px`,paddingTop:`${t==null?void 0:t.paddingTop}px`},children:t!=null&&t.headerUrlRedirect?p.jsx("a",{href:t==null?void 0:t.headerUrlRedirect,target:"_blank",children:p.jsx("div",{className:"header__img",style:{backgroundImage:n}})}):p.jsx("div",{className:"header__img",style:{backgroundImage:n}})})})})};class Am extends K.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){console.log({error:t,errorInfo:n})}render(){return this.state.hasError?p.jsx("h1",{children:"Что-то пошло не так"}):this.props.children}}var hs={},Ku={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ku);var St=Ku.exports,mi={};function gn(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function Zn(e){return e!==null&&typeof e=="object"&&e.constructor===Object}function Xu(e){if(!Zn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Xu(e[n])}),t}function Ht(e,t,n={clone:!0}){const r=n.clone?w({},e):e;return Zn(e)&&Zn(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Zn(t[o])&&o in e&&Zn(e[o])?r[o]=Ht(e[o],t[o],n):n.clone?r[o]=Zn(t[o])?Xu(t[o]):t[o]:r[o]=t[o])}),r}var Ai={exports:{}},Yo={exports:{}},Ue={};/** @license React v16.13.1
33
+ `}}});ji=Te.responsiveFontSizes(ji);const qu=ji,Sm={isLoading:!1,setIsLoading(e){}},Ln=K.createContext(Sm),Rm=()=>{const[e,t]=K.useState(!1);return{isLoading:e,setIsLoading:t}},Mm=({children:e})=>{const t=Rm();return p.jsx(Ln.Provider,{value:t,children:e})},km={openedPage:"info",setOpenedPage:null},Ro=K.createContext(km),$m=()=>{const[e,t]=K.useState("info");return{openedPage:e,setOpenedPage:t}},_m=({children:e})=>{const t=$m();return p.jsx(Ro.Provider,{value:t,children:e})},Im={cabinetType:null,cabinetIsLoading:!0,apiAxios:()=>null,phoneNumber:null,setPhoneNumber:null,cabinetSettings:null,setCabinetSettings:null,cabinetUISettings:null,authToken:null,setAuthToken:null,createAxios:null,theme:null,customer:null,VKUserId:null,setVKUserId:null,additionalData:null,setAdditionalData:null},Ft=K.createContext(Im),Nm=({cabinetType:e})=>{const{setIsLoading:t}=K.useContext(Ln),{setOpenedPage:n}=K.useContext(Ro),[r,o]=K.useState(null),[i,s]=K.useState(null),[l,c]=K.useState(null),[u,d]=K.useState(null),[f,m]=K.useState(null);K.useState(null);const[v,b]=K.useState({}),h=()=>Uu.create({baseURL:f??"",headers:{Authorization:`Bearer ${l}`,"X-CabinetType":e,"X-PhoneNumber":i}}),y=qu,[E,P]=K.useState(null),[x,C]=K.useState(null);return K.useEffect(()=>{(async()=>{if(!l||!i||e===null)return;t(!0);const R=await h().post("/externalCustomerCabinet/cabinetInfo",{});P(R.data),R.data.isReg&&n("registration"),t(!1)})()},[i,l]),K.useEffect(()=>{(async()=>{if(!l||!i||e===null||!E||E!=null&&E.isReg)return;t(!0);const R=await h().post("/externalCustomerCabinet/customer/info",{VKUserId:r});d(R.data.customer),t(!1)})()},[i]),K.useEffect(()=>{(async()=>{if(!l)return;t(!0);const R=await h().post("/externalCustomerCabinet/settings",{});C(R.data.settings),t(!1)})()},[l]),{cabinetType:e,apiAxios:h,cabinetIsLoading:!1,cabinetSettings:E,setCabinetSettings:P,cabinetUISettings:x,phoneNumber:i,setPhoneNumber:s,authToken:l,setAuthToken:c,createAxios:(O,D)=>{c(O),m(D)},theme:y,setVKUserId:o,VKUserId:r,customer:u,additionalData:v,setAdditionalData:b}},jm=({children:e,cabinetType:t})=>{const n=Nm({cabinetType:t});return p.jsx(Te.ThemeProvider,{theme:n.theme,children:p.jsx(Ft.Provider,{value:{...n,cabinetType:t},children:e})})},Gu=({fileValue:e})=>{const{cabinetUISettings:t}=K.useContext(Ft),n=e?`url(data:image/png;base64,${e})`:`url(${t==null?void 0:t.headerImageUrl})`;return p.jsx(Te.Typography,{variant:"h2",component:"div",children:p.jsx("div",{className:"header",style:{backgroundColor:t==null?void 0:t.headerColor},children:p.jsx(Te.Container,{maxWidth:"sm",sx:{paddingBottom:`${t==null?void 0:t.paddingBottom}px`,paddingTop:`${t==null?void 0:t.paddingTop}px`},children:t!=null&&t.headerUrlRedirect?p.jsx("a",{href:t==null?void 0:t.headerUrlRedirect,target:"_blank",children:p.jsx("div",{className:"header__img",style:{backgroundImage:n}})}):p.jsx("div",{className:"header__img",style:{backgroundImage:n}})})})})};class Am extends K.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){console.log({error:t,errorInfo:n})}render(){return this.state.hasError?p.jsx("h1",{children:"Что-то пошло не так"}):this.props.children}}var hs={},Ku={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ku);var St=Ku.exports,mi={};function gn(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function Zn(e){return e!==null&&typeof e=="object"&&e.constructor===Object}function Xu(e){if(!Zn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Xu(e[n])}),t}function Ht(e,t,n={clone:!0}){const r=n.clone?w({},e):e;return Zn(e)&&Zn(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Zn(t[o])&&o in e&&Zn(e[o])?r[o]=Ht(e[o],t[o],n):n.clone?r[o]=Zn(t[o])?Xu(t[o]):t[o]:r[o]=t[o])}),r}var Ai={exports:{}},Yo={exports:{}},Ue={};/** @license React v16.13.1
34
34
  * react-is.production.min.js
35
35
  *
36
36
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -780,7 +780,7 @@ const ud = Hi, lh = {
780
780
  })();
781
781
  }, [i, l]), st(() => {
782
782
  (async () => {
783
- if (!l || !i || e === null || E != null && E.isReg)
783
+ if (!l || !i || e === null || !E || E != null && E.isReg)
784
784
  return;
785
785
  t(!0);
786
786
  const R = await h().post("/externalCustomerCabinet/customer/info", {
@@ -30,7 +30,7 @@ Check the top-level render call using <`+pe+">.")}return ie}}function rn(R,ie){{
30
30
  @font-face {
31
31
  font-family: bonusPlus, Fallback, sans-serif;
32
32
  }
33
- `}}});bi=Te.responsiveFontSizes(bi);const Wl=bi,Cm={isLoading:!1,setIsLoading(e){}},$n=q.createContext(Cm),Em=()=>{const[e,t]=q.useState(!1);return{isLoading:e,setIsLoading:t}},Pm=({children:e})=>{const t=Em();return p.jsx($n.Provider,{value:t,children:e})},Om={openedPage:"info",setOpenedPage:null},zr=q.createContext(Om),Dm=()=>{const[e,t]=q.useState("info");return{openedPage:e,setOpenedPage:t}},Sm=({children:e})=>{const t=Dm();return p.jsx(zr.Provider,{value:t,children:e})},Mm={cabinetType:null,cabinetIsLoading:!0,apiAxios:()=>null,phoneNumber:null,setPhoneNumber:null,cabinetSettings:null,setCabinetSettings:null,cabinetUISettings:null,authToken:null,setAuthToken:null,createAxios:null,theme:null,customer:null,VKUserId:null,setVKUserId:null,additionalData:null,setAdditionalData:null},Nt=q.createContext(Mm),km=({cabinetType:e})=>{const{setIsLoading:t}=q.useContext($n),{setOpenedPage:n}=q.useContext(zr),[r,o]=q.useState(null),[i,s]=q.useState(null),[l,c]=q.useState(null),[u,d]=q.useState(null),[f,m]=q.useState(null);q.useState(null);const[v,b]=q.useState({}),h=()=>jl.create({baseURL:f??"",headers:{Authorization:`Bearer ${l}`,"X-CabinetType":e,"X-PhoneNumber":i}}),y=Wl,[E,P]=q.useState(null),[x,C]=q.useState(null);return q.useEffect(()=>{(async()=>{if(!l||!i||e===null)return;t(!0);const M=await h().post("/externalCustomerCabinet/cabinetInfo",{});P(M.data),M.data.isReg&&n("registration"),t(!1)})()},[i,l]),q.useEffect(()=>{(async()=>{if(!l||!i||e===null||E!=null&&E.isReg)return;t(!0);const M=await h().post("/externalCustomerCabinet/customer/info",{VKUserId:r});d(M.data.customer),t(!1)})()},[i]),q.useEffect(()=>{(async()=>{if(!l)return;t(!0);const M=await h().post("/externalCustomerCabinet/settings",{});C(M.data.settings),t(!1)})()},[l]),{cabinetType:e,apiAxios:h,cabinetIsLoading:!1,cabinetSettings:E,setCabinetSettings:P,cabinetUISettings:x,phoneNumber:i,setPhoneNumber:s,authToken:l,setAuthToken:c,createAxios:(O,D)=>{c(O),m(D)},theme:y,setVKUserId:o,VKUserId:r,customer:u,additionalData:v,setAdditionalData:b}},Rm=({children:e,cabinetType:t})=>{const n=km({cabinetType:t});return p.jsx(Te.ThemeProvider,{theme:n.theme,children:p.jsx(Nt.Provider,{value:{...n,cabinetType:t},children:e})})},zl=({fileValue:e})=>{const{cabinetUISettings:t}=q.useContext(Nt),n=e?`url(data:image/png;base64,${e})`:`url(${t==null?void 0:t.headerImageUrl})`;return p.jsx(Te.Typography,{variant:"h2",component:"div",children:p.jsx("div",{className:"header",style:{backgroundColor:t==null?void 0:t.headerColor},children:p.jsx(Te.Container,{maxWidth:"sm",sx:{paddingBottom:`${t==null?void 0:t.paddingBottom}px`,paddingTop:`${t==null?void 0:t.paddingTop}px`},children:t!=null&&t.headerUrlRedirect?p.jsx("a",{href:t==null?void 0:t.headerUrlRedirect,target:"_blank",children:p.jsx("div",{className:"header__img",style:{backgroundImage:n}})}):p.jsx("div",{className:"header__img",style:{backgroundImage:n}})})})})};class $m extends q.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){console.log({error:t,errorInfo:n})}render(){return this.state.hasError?p.jsx("h1",{children:"Что-то пошло не так"}):this.props.children}}var xi={},Ul={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ul);var Ot=Ul.exports,wi={};function on(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function zn(e){return e!==null&&typeof e=="object"&&e.constructor===Object}function Yl(e){if(!zn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Yl(e[n])}),t}function Wt(e,t,n={clone:!0}){const r=n.clone?w({},e):e;return zn(e)&&zn(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(zn(t[o])&&o in e&&zn(e[o])?r[o]=Wt(e[o],t[o],n):n.clone?r[o]=zn(t[o])?Yl(t[o]):t[o]:r[o]=t[o])}),r}var Ti={exports:{}},Yo={exports:{}},Ue={};/** @license React v16.13.1
33
+ `}}});bi=Te.responsiveFontSizes(bi);const Wl=bi,Cm={isLoading:!1,setIsLoading(e){}},$n=q.createContext(Cm),Em=()=>{const[e,t]=q.useState(!1);return{isLoading:e,setIsLoading:t}},Pm=({children:e})=>{const t=Em();return p.jsx($n.Provider,{value:t,children:e})},Om={openedPage:"info",setOpenedPage:null},zr=q.createContext(Om),Dm=()=>{const[e,t]=q.useState("info");return{openedPage:e,setOpenedPage:t}},Sm=({children:e})=>{const t=Dm();return p.jsx(zr.Provider,{value:t,children:e})},Mm={cabinetType:null,cabinetIsLoading:!0,apiAxios:()=>null,phoneNumber:null,setPhoneNumber:null,cabinetSettings:null,setCabinetSettings:null,cabinetUISettings:null,authToken:null,setAuthToken:null,createAxios:null,theme:null,customer:null,VKUserId:null,setVKUserId:null,additionalData:null,setAdditionalData:null},Nt=q.createContext(Mm),km=({cabinetType:e})=>{const{setIsLoading:t}=q.useContext($n),{setOpenedPage:n}=q.useContext(zr),[r,o]=q.useState(null),[i,s]=q.useState(null),[l,c]=q.useState(null),[u,d]=q.useState(null),[f,m]=q.useState(null);q.useState(null);const[v,b]=q.useState({}),h=()=>jl.create({baseURL:f??"",headers:{Authorization:`Bearer ${l}`,"X-CabinetType":e,"X-PhoneNumber":i}}),y=Wl,[E,P]=q.useState(null),[x,C]=q.useState(null);return q.useEffect(()=>{(async()=>{if(!l||!i||e===null)return;t(!0);const M=await h().post("/externalCustomerCabinet/cabinetInfo",{});P(M.data),M.data.isReg&&n("registration"),t(!1)})()},[i,l]),q.useEffect(()=>{(async()=>{if(!l||!i||e===null||!E||E!=null&&E.isReg)return;t(!0);const M=await h().post("/externalCustomerCabinet/customer/info",{VKUserId:r});d(M.data.customer),t(!1)})()},[i]),q.useEffect(()=>{(async()=>{if(!l)return;t(!0);const M=await h().post("/externalCustomerCabinet/settings",{});C(M.data.settings),t(!1)})()},[l]),{cabinetType:e,apiAxios:h,cabinetIsLoading:!1,cabinetSettings:E,setCabinetSettings:P,cabinetUISettings:x,phoneNumber:i,setPhoneNumber:s,authToken:l,setAuthToken:c,createAxios:(O,D)=>{c(O),m(D)},theme:y,setVKUserId:o,VKUserId:r,customer:u,additionalData:v,setAdditionalData:b}},Rm=({children:e,cabinetType:t})=>{const n=km({cabinetType:t});return p.jsx(Te.ThemeProvider,{theme:n.theme,children:p.jsx(Nt.Provider,{value:{...n,cabinetType:t},children:e})})},zl=({fileValue:e})=>{const{cabinetUISettings:t}=q.useContext(Nt),n=e?`url(data:image/png;base64,${e})`:`url(${t==null?void 0:t.headerImageUrl})`;return p.jsx(Te.Typography,{variant:"h2",component:"div",children:p.jsx("div",{className:"header",style:{backgroundColor:t==null?void 0:t.headerColor},children:p.jsx(Te.Container,{maxWidth:"sm",sx:{paddingBottom:`${t==null?void 0:t.paddingBottom}px`,paddingTop:`${t==null?void 0:t.paddingTop}px`},children:t!=null&&t.headerUrlRedirect?p.jsx("a",{href:t==null?void 0:t.headerUrlRedirect,target:"_blank",children:p.jsx("div",{className:"header__img",style:{backgroundImage:n}})}):p.jsx("div",{className:"header__img",style:{backgroundImage:n}})})})})};class $m extends q.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){console.log({error:t,errorInfo:n})}render(){return this.state.hasError?p.jsx("h1",{children:"Что-то пошло не так"}):this.props.children}}var xi={},Ul={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ul);var Ot=Ul.exports,wi={};function on(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function zn(e){return e!==null&&typeof e=="object"&&e.constructor===Object}function Yl(e){if(!zn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Yl(e[n])}),t}function Wt(e,t,n={clone:!0}){const r=n.clone?w({},e):e;return zn(e)&&zn(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(zn(t[o])&&o in e&&zn(e[o])?r[o]=Wt(e[o],t[o],n):n.clone?r[o]=zn(t[o])?Yl(t[o]):t[o]:r[o]=t[o])}),r}var Ti={exports:{}},Yo={exports:{}},Ue={};/** @license React v16.13.1
34
34
  * react-is.production.min.js
35
35
  *
36
36
  * Copyright (c) Facebook, Inc. and its affiliates.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bonuspluscomponents",
3
3
  "private": false,
4
- "version": "0.0.116",
4
+ "version": "0.0.117",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",