bonuspluscomponents 0.0.73 → 0.0.74

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.
@@ -103,4 +103,4 @@ const theme2 = createTheme({ palette: {
103
103
  Copyright (c) 2018 Jed Watson.
104
104
  Licensed under the MIT License (MIT), see
105
105
  http://jedwatson.github.io/classnames
106
- */(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var c=t.apply(null,i);c&&n.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)r.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(So);var xu=So.exports;const Dn=Fn(xu);var Nt={},Su=Ue;Object.defineProperty(Nt,"__esModule",{value:!0});var wo=Nt.default=void 0,wu=Su(We()),Tu=Ve(),Ou=(0,wu.default)((0,Tu.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");wo=Nt.default=Ou;var Dt={},Ru=Ue;Object.defineProperty(Dt,"__esModule",{value:!0});var To=Dt.default=void 0,$u=Ru(We()),Cu=Ve(),Pu=(0,$u.default)((0,Cu.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");To=Dt.default=Pu;const kn=({title:e,text:r})=>g.jsx("div",{className:"desc_element",children:g.jsxs("div",{children:[g.jsx("div",{children:e}),g.jsx("div",{children:r})]})}),ju=({historyElement:e})=>{var s,c,u,l;const[r,t]=oe.useState(!1),{ParseDataToRusLocale:n}=Eu(),o=g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[(s=e==null?void 0:e.items)==null?void 0:s.map((f,m)=>{var d,_,b,p;return g.jsx("div",{className:"purchase_element",children:g.jsxs("div",{children:[g.jsx("div",{className:"purchase_element__title",children:g.jsx("div",{children:f.productName||`Позиция ${m+1}`})}),g.jsx(je.Divider,{}),g.jsxs("div",{className:"purchase_element__body",children:[g.jsxs("div",{className:"purchase_element__body__left",children:[g.jsxs("div",{children:[(f.amount/f.quantity).toFixed(2)," x ",f.quantity," ="]}),g.jsx("div",{children:"Скидка, руб:"}),g.jsx("div",{children:"Списано бонусов:"}),g.jsx("div",{children:g.jsx("u",{children:"Итого, руб:"})}),g.jsx("div",{children:"Начислено бонусов:"})]}),g.jsxs("div",{className:"purchase_element__body__right",children:[g.jsx("div",{children:(d=f.amount)==null?void 0:d.toFixed(2)}),g.jsx("div",{children:(_=f.discount)==null?void 0:_.toFixed(2)}),g.jsx("div",{children:(b=f.bonusDebit)==null?void 0:b.toFixed(2)}),g.jsx("div",{children:g.jsx("u",{children:(f.amount-f.discount-f.bonusDebit).toFixed(2)})}),g.jsx("div",{children:(p=f.bonusCredit)==null?void 0:p.toFixed(2)})]})]})]})},m)}),g.jsx("div",{className:"purchase_element",children:g.jsxs("div",{children:[g.jsx("div",{className:"purchase_element__title",children:g.jsx("div",{children:"Итого"})}),g.jsx(je.Divider,{}),g.jsxs("div",{className:"purchase_element__body",children:[g.jsxs("div",{children:[g.jsx("div",{children:"Скидка. руб:"}),g.jsx("div",{children:"Списано бонусов:"}),g.jsx("div",{children:g.jsx("u",{children:"Итого. руб:"})}),g.jsx("div",{children:"Начислено бонусов:"})]}),g.jsxs("div",{className:"purchase_element__body__right",children:[g.jsx("div",{children:(c=e.discount)==null?void 0:c.toFixed(2)}),g.jsx("div",{children:(u=e.bonusDebit)==null?void 0:u.toFixed(2)}),g.jsx("div",{children:g.jsx("u",{children:(e.purchaseAmount-e.bonusDebit-e.discount).toFixed(2)})}),g.jsx("div",{children:(l=e.bonusCredit)==null?void 0:l.toFixed(2)})]})]})]})})]}),i=()=>{const f=r?g.jsx(To,{}):g.jsx(wo,{});return e.operationType!==xo.Purchases?null:g.jsx("div",{className:"purchase_history_element__show_more",onClick:()=>t(m=>!m),children:f})};return g.jsxs(je.Box,{className:"purchase_history_element",children:[g.jsxs("div",{className:"purchase_history_element__title",children:[n(e.date),"  ",e.type]}),g.jsx(je.Divider,{}),g.jsxs("div",{className:"purchase_history_element__body",children:[e.bonusCredit>0&&g.jsx(kn,{title:"Бонусов начислено",text:g.jsx("div",{className:Dn("purchase_history_element__body__top__amount",{more:!0}),children:e.bonusCredit})}),e.bonusDebit>0&&g.jsx(kn,{title:"Бонусов списано",text:g.jsx("div",{className:Dn("purchase_history_element__body__top__amount",{more:!1}),children:e.bonusDebit})})]}),g.jsx("div",{className:"purchase_history_element__purchases",children:g.jsx(je.Collapse,{in:r,timeout:"auto",unmountOnExit:!0,children:o})}),i()]})},Au=()=>{const{purchaseNotFound:e,purchaseHistory:r,isLoading:t}=bu();return t?g.jsx(_u,{}):g.jsx("div",{children:g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[g.jsx(Eo,{children:g.jsxs("div",{children:[g.jsx("div",{}),g.jsx("div",{children:"Ниже отображена ваша история операций"})]})}),e||(r==null?void 0:r.map((n,o)=>g.jsx(ju,{historyElement:n},o)))]})})};const Iu=()=>{const{cabinetUISettings:e}=oe.useContext(ar);return g.jsx("div",{className:"business_info",children:g.jsx("div",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.businessInfo)??""}})})},Nu=()=>{var i;const[e,r]=oe.useState(""),t=(s,c)=>{r(c)},{cabinetSettings:n}=oe.useContext(ar),o=[{icon:g.jsx(yo,{}),value:"info",label:"Карта",page:g.jsx("div",{children:"Информация по карте"}),active:!0},{icon:g.jsx(ho,{}),value:"receipt",label:"История",page:g.jsx(Au,{}),active:!0},{icon:g.jsx(go,{}),value:"appeals",label:"Обращения",page:g.jsx("div",{children:"Обращения"}),active:n==null?void 0:n.canShowAppeals},{icon:g.jsx(bo,{}),value:"businessInfo",label:"Информация о бизнесе",page:g.jsx(Iu,{}),active:n==null?void 0:n.canShowBusinessInfo},{icon:g.jsx(vo,{}),value:"personInfo",label:"Клиент",page:g.jsx("div",{children:"Редактирование клиента"}),active:n==null?void 0:n.canEditPersonInfo},{icon:g.jsx(_o,{}),value:"registration",label:"Регистрация",page:g.jsx("div",{children:"Регистрация клиента"}),active:n==null?void 0:n.isReg}];return g.jsxs("div",{className:"page_view",children:[g.jsx("div",{className:"page_view__page",children:(i=o.find(s=>s.value===e))==null?void 0:i.page}),g.jsx("div",{className:"page_view__navigation",children:g.jsx("div",{children:g.jsx(je.BottomNavigation,{value:e,onChange:t,children:o.map((s,c)=>g.jsx(je.BottomNavigationAction,{label:s.label,value:s.value,icon:s.icon},c))})})})]})},Du={popups:[]},ku=oe.createContext(Du),Mu=()=>{const[e,r]=oe.useState([]);return{popups:e}},Fu=({children:e})=>{const r=Mu();return g.jsx(ku.Provider,{value:r,children:e})};exports.AppContext=ar;exports.AppProvider=yu;exports.PopupProvider=Fu;exports.Router=Nu;
106
+ */(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var c=t.apply(null,i);c&&n.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)r.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(So);var xu=So.exports;const Dn=Fn(xu);var Nt={},Su=Ue;Object.defineProperty(Nt,"__esModule",{value:!0});var wo=Nt.default=void 0,wu=Su(We()),Tu=Ve(),Ou=(0,wu.default)((0,Tu.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");wo=Nt.default=Ou;var Dt={},Ru=Ue;Object.defineProperty(Dt,"__esModule",{value:!0});var To=Dt.default=void 0,$u=Ru(We()),Cu=Ve(),Pu=(0,$u.default)((0,Cu.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");To=Dt.default=Pu;const kn=({title:e,text:r})=>g.jsx("div",{className:"desc_element",children:g.jsxs("div",{children:[g.jsx("div",{children:e}),g.jsx("div",{children:r})]})}),ju=({historyElement:e})=>{var s,c,u,l;const[r,t]=oe.useState(!1),{ParseDataToRusLocale:n}=Eu(),o=g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[(s=e==null?void 0:e.items)==null?void 0:s.map((f,m)=>{var d,_,b,p;return g.jsx("div",{className:"purchase_element",children:g.jsxs("div",{children:[g.jsx("div",{className:"purchase_element__title",children:g.jsx("div",{children:f.productName||`Позиция ${m+1}`})}),g.jsx(je.Divider,{}),g.jsxs("div",{className:"purchase_element__body",children:[g.jsxs("div",{className:"purchase_element__body__left",children:[g.jsxs("div",{children:[(f.amount/f.quantity).toFixed(2)," x ",f.quantity," ="]}),g.jsx("div",{children:"Скидка, руб:"}),g.jsx("div",{children:"Списано бонусов:"}),g.jsx("div",{children:g.jsx("u",{children:"Итого, руб:"})}),g.jsx("div",{children:"Начислено бонусов:"})]}),g.jsxs("div",{className:"purchase_element__body__right",children:[g.jsx("div",{children:(d=f.amount)==null?void 0:d.toFixed(2)}),g.jsx("div",{children:(_=f.discount)==null?void 0:_.toFixed(2)}),g.jsx("div",{children:(b=f.bonusDebit)==null?void 0:b.toFixed(2)}),g.jsx("div",{children:g.jsx("u",{children:(f.amount-f.discount-f.bonusDebit).toFixed(2)})}),g.jsx("div",{children:(p=f.bonusCredit)==null?void 0:p.toFixed(2)})]})]})]})},m)}),g.jsx("div",{className:"purchase_element",children:g.jsxs("div",{children:[g.jsx("div",{className:"purchase_element__title",children:g.jsx("div",{children:"Итого"})}),g.jsx(je.Divider,{}),g.jsxs("div",{className:"purchase_element__body",children:[g.jsxs("div",{children:[g.jsx("div",{children:"Скидка. руб:"}),g.jsx("div",{children:"Списано бонусов:"}),g.jsx("div",{children:g.jsx("u",{children:"Итого. руб:"})}),g.jsx("div",{children:"Начислено бонусов:"})]}),g.jsxs("div",{className:"purchase_element__body__right",children:[g.jsx("div",{children:(c=e.discount)==null?void 0:c.toFixed(2)}),g.jsx("div",{children:(u=e.bonusDebit)==null?void 0:u.toFixed(2)}),g.jsx("div",{children:g.jsx("u",{children:(e.purchaseAmount-e.bonusDebit-e.discount).toFixed(2)})}),g.jsx("div",{children:(l=e.bonusCredit)==null?void 0:l.toFixed(2)})]})]})]})})]}),i=()=>{const f=r?g.jsx(To,{}):g.jsx(wo,{});return e.operationType!==xo.Purchases?null:g.jsx("div",{className:"purchase_history_element__show_more",onClick:()=>t(m=>!m),children:f})};return g.jsxs(je.Box,{className:"purchase_history_element",children:[g.jsxs("div",{className:"purchase_history_element__title",children:[n(e.date),"  ",e.type]}),g.jsx(je.Divider,{}),g.jsxs("div",{className:"purchase_history_element__body",children:[e.bonusCredit>0&&g.jsx(kn,{title:"Бонусов начислено",text:g.jsx("div",{className:Dn("purchase_history_element__body__top__amount",{more:!0}),children:e.bonusCredit})}),e.bonusDebit>0&&g.jsx(kn,{title:"Бонусов списано",text:g.jsx("div",{className:Dn("purchase_history_element__body__top__amount",{more:!1}),children:e.bonusDebit})})]}),g.jsx("div",{className:"purchase_history_element__purchases",children:g.jsx(je.Collapse,{in:r,timeout:"auto",unmountOnExit:!0,children:o})}),i()]})},Au=()=>{const{purchaseNotFound:e,purchaseHistory:r,isLoading:t}=bu();return t?g.jsx(_u,{}):g.jsx("div",{children:g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[g.jsx(Eo,{children:g.jsxs("div",{children:[g.jsx("div",{}),g.jsx("div",{children:"Ниже отображена ваша история операций"})]})}),e||(r==null?void 0:r.map((n,o)=>g.jsx(ju,{historyElement:n},o)))]})})};const Iu=()=>{const{cabinetUISettings:e}=oe.useContext(ar);return g.jsx("div",{className:"business_info",children:g.jsx("div",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.businessInfo)??""}})})},Nu=()=>{var i;const[e,r]=oe.useState(""),t=(s,c)=>{r(c)},{cabinetSettings:n}=oe.useContext(ar),o=[{icon:g.jsx(yo,{}),value:"info",label:"Карта",page:g.jsx("div",{children:"Информация по карте"}),active:!0},{icon:g.jsx(ho,{}),value:"receipt",label:"История",page:g.jsx(Au,{}),active:!0},{icon:g.jsx(go,{}),value:"appeals",label:"Обращения",page:g.jsx("div",{children:"Обращения"}),active:n==null?void 0:n.canShowAppeals},{icon:g.jsx(bo,{}),value:"businessInfo",label:"Информация о бизнесе",page:g.jsx(Iu,{}),active:n==null?void 0:n.canShowBusinessInfo},{icon:g.jsx(vo,{}),value:"personInfo",label:"Клиент",page:g.jsx("div",{children:"Редактирование клиента"}),active:n==null?void 0:n.canEditPersonInfo},{icon:g.jsx(_o,{}),value:"registration",label:"Регистрация",page:g.jsx("div",{children:"Регистрация клиента"}),active:n==null?void 0:n.isReg}];return g.jsxs("div",{className:"page_view",children:[g.jsx("div",{className:"page_view__page scrollbar",children:(i=o.find(s=>s.value===e))==null?void 0:i.page}),g.jsx("div",{className:"page_view__navigation",children:g.jsx("div",{children:g.jsx(je.BottomNavigation,{value:e,onChange:t,children:o.map((s,c)=>g.jsx(je.BottomNavigationAction,{label:s.label,value:s.value,icon:s.icon},c))})})})]})},Du={popups:[]},ku=oe.createContext(Du),Mu=()=>{const[e,r]=oe.useState([]);return{popups:e}},Fu=({children:e})=>{const r=Mu();return g.jsx(ku.Provider,{value:r,children:e})};exports.AppContext=ar;exports.AppProvider=yu;exports.PopupProvider=Fu;exports.Router=Nu;
@@ -5011,7 +5011,7 @@ const Yu = () => {
5011
5011
  { icon: /* @__PURE__ */ g.jsx(wo, {}), value: "registration", label: "Регистрация", page: /* @__PURE__ */ g.jsx("div", { children: "Регистрация клиента" }), active: n == null ? void 0 : n.isReg }
5012
5012
  ];
5013
5013
  return /* @__PURE__ */ g.jsxs("div", { className: "page_view", children: [
5014
- /* @__PURE__ */ g.jsx("div", { className: "page_view__page", children: (i = o.find((s) => s.value === e)) == null ? void 0 : i.page }),
5014
+ /* @__PURE__ */ g.jsx("div", { className: "page_view__page scrollbar", children: (i = o.find((s) => s.value === e)) == null ? void 0 : i.page }),
5015
5015
  /* @__PURE__ */ g.jsx("div", { className: "page_view__navigation", children: /* @__PURE__ */ g.jsx("div", { children: /* @__PURE__ */ g.jsx(ei, { value: e, onChange: t, children: o.map((s, c) => /* @__PURE__ */ g.jsx(
5016
5016
  ri,
5017
5017
  {
@@ -103,4 +103,4 @@ const theme2 = createTheme({ palette: {
103
103
  Copyright (c) 2018 Jed Watson.
104
104
  Licensed under the MIT License (MIT), see
105
105
  http://jedwatson.github.io/classnames
106
- */(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var c=t.apply(null,i);c&&n.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)r.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(po);var Lc=po.exports;const mo=Ft(Lc),Uu="";var Pt={},Vc=Ye;Object.defineProperty(Pt,"__esModule",{value:!0});var ho=Pt.default=void 0,zc=Vc(Be()),Uc=ke(),Yc=(0,zc.default)((0,Uc.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");ho=Pt.default=Yc;var jt={},Wc=Ye;Object.defineProperty(jt,"__esModule",{value:!0});var vo=jt.default=void 0,Bc=Wc(Be()),qc=ke(),Kc=(0,Bc.default)((0,qc.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");vo=jt.default=Kc;const Yu="",yo=({title:e,text:r})=>g.jsx("div",{className:"desc_element",children:g.jsxs("div",{children:[g.jsx("div",{children:e}),g.jsx("div",{children:r})]})}),Gc=({historyElement:e})=>{var s,c,u,l;const[r,t]=ee.useState(!1),{ParseDataToRusLocale:n}=Fc(),o=g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[(s=e==null?void 0:e.items)==null?void 0:s.map((f,m)=>{var d,_,b,p;return g.jsx("div",{className:"purchase_element",children:g.jsxs("div",{children:[g.jsx("div",{className:"purchase_element__title",children:g.jsx("div",{children:f.productName||`Позиция ${m+1}`})}),g.jsx(Re.Divider,{}),g.jsxs("div",{className:"purchase_element__body",children:[g.jsxs("div",{className:"purchase_element__body__left",children:[g.jsxs("div",{children:[(f.amount/f.quantity).toFixed(2)," x ",f.quantity," ="]}),g.jsx("div",{children:"Скидка, руб:"}),g.jsx("div",{children:"Списано бонусов:"}),g.jsx("div",{children:g.jsx("u",{children:"Итого, руб:"})}),g.jsx("div",{children:"Начислено бонусов:"})]}),g.jsxs("div",{className:"purchase_element__body__right",children:[g.jsx("div",{children:(d=f.amount)==null?void 0:d.toFixed(2)}),g.jsx("div",{children:(_=f.discount)==null?void 0:_.toFixed(2)}),g.jsx("div",{children:(b=f.bonusDebit)==null?void 0:b.toFixed(2)}),g.jsx("div",{children:g.jsx("u",{children:(f.amount-f.discount-f.bonusDebit).toFixed(2)})}),g.jsx("div",{children:(p=f.bonusCredit)==null?void 0:p.toFixed(2)})]})]})]})},m)}),g.jsx("div",{className:"purchase_element",children:g.jsxs("div",{children:[g.jsx("div",{className:"purchase_element__title",children:g.jsx("div",{children:"Итого"})}),g.jsx(Re.Divider,{}),g.jsxs("div",{className:"purchase_element__body",children:[g.jsxs("div",{children:[g.jsx("div",{children:"Скидка. руб:"}),g.jsx("div",{children:"Списано бонусов:"}),g.jsx("div",{children:g.jsx("u",{children:"Итого. руб:"})}),g.jsx("div",{children:"Начислено бонусов:"})]}),g.jsxs("div",{className:"purchase_element__body__right",children:[g.jsx("div",{children:(c=e.discount)==null?void 0:c.toFixed(2)}),g.jsx("div",{children:(u=e.bonusDebit)==null?void 0:u.toFixed(2)}),g.jsx("div",{children:g.jsx("u",{children:(e.purchaseAmount-e.bonusDebit-e.discount).toFixed(2)})}),g.jsx("div",{children:(l=e.bonusCredit)==null?void 0:l.toFixed(2)})]})]})]})})]}),i=()=>{const f=r?g.jsx(vo,{}):g.jsx(ho,{});return e.operationType!==lo.Purchases?null:g.jsx("div",{className:"purchase_history_element__show_more",onClick:()=>t(m=>!m),children:f})};return g.jsxs(Re.Box,{className:"purchase_history_element",children:[g.jsxs("div",{className:"purchase_history_element__title",children:[n(e.date),"  ",e.type]}),g.jsx(Re.Divider,{}),g.jsxs("div",{className:"purchase_history_element__body",children:[e.bonusCredit>0&&g.jsx(yo,{title:"Бонусов начислено",text:g.jsx("div",{className:mo("purchase_history_element__body__top__amount",{more:!0}),children:e.bonusCredit})}),e.bonusDebit>0&&g.jsx(yo,{title:"Бонусов списано",text:g.jsx("div",{className:mo("purchase_history_element__body__top__amount",{more:!1}),children:e.bonusDebit})})]}),g.jsx("div",{className:"purchase_history_element__purchases",children:g.jsx(Re.Collapse,{in:r,timeout:"auto",unmountOnExit:!0,children:o})}),i()]})},Hc=()=>{const{purchaseNotFound:e,purchaseHistory:r,isLoading:t}=kc();return t?g.jsx(Mc,{}):g.jsx("div",{children:g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[g.jsx(fo,{children:g.jsxs("div",{children:[g.jsx("div",{}),g.jsx("div",{children:"Ниже отображена ваша история операций"})]})}),e||(r==null?void 0:r.map((n,o)=>g.jsx(Gc,{historyElement:n},o)))]})})},Wu="",Jc=()=>{const{cabinetUISettings:e}=ee.useContext(sr);return g.jsx("div",{className:"business_info",children:g.jsx("div",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.businessInfo)??""}})})},Xc=()=>{var i;const[e,r]=ee.useState(""),t=(s,c)=>{r(c)},{cabinetSettings:n}=ee.useContext(sr),o=[{icon:g.jsx(so,{}),value:"info",label:"Карта",page:g.jsx("div",{children:"Информация по карте"}),active:!0},{icon:g.jsx(oo,{}),value:"receipt",label:"История",page:g.jsx(Hc,{}),active:!0},{icon:g.jsx(ao,{}),value:"appeals",label:"Обращения",page:g.jsx("div",{children:"Обращения"}),active:n==null?void 0:n.canShowAppeals},{icon:g.jsx(co,{}),value:"businessInfo",label:"Информация о бизнесе",page:g.jsx(Jc,{}),active:n==null?void 0:n.canShowBusinessInfo},{icon:g.jsx(io,{}),value:"personInfo",label:"Клиент",page:g.jsx("div",{children:"Редактирование клиента"}),active:n==null?void 0:n.canEditPersonInfo},{icon:g.jsx(uo,{}),value:"registration",label:"Регистрация",page:g.jsx("div",{children:"Регистрация клиента"}),active:n==null?void 0:n.isReg}];return g.jsxs("div",{className:"page_view",children:[g.jsx("div",{className:"page_view__page",children:(i=o.find(s=>s.value===e))==null?void 0:i.page}),g.jsx("div",{className:"page_view__navigation",children:g.jsx("div",{children:g.jsx(Re.BottomNavigation,{value:e,onChange:t,children:o.map((s,c)=>g.jsx(Re.BottomNavigationAction,{label:s.label,value:s.value,icon:s.icon},c))})})})]})},Zc={popups:[]},Qc=ee.createContext(Zc),eu=()=>{const[e,r]=ee.useState([]);return{popups:e}},ru=({children:e})=>{const r=eu();return g.jsx(Qc.Provider,{value:r,children:e})};Ee.AppContext=sr,Ee.AppProvider=Nc,Ee.PopupProvider=ru,Ee.Router=Xc,Object.defineProperty(Ee,Symbol.toStringTag,{value:"Module"})});
106
+ */(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var c=t.apply(null,i);c&&n.push(c)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)r.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(po);var Lc=po.exports;const mo=Ft(Lc),Uu="";var Pt={},Vc=Ye;Object.defineProperty(Pt,"__esModule",{value:!0});var ho=Pt.default=void 0,zc=Vc(Be()),Uc=ke(),Yc=(0,zc.default)((0,Uc.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");ho=Pt.default=Yc;var jt={},Wc=Ye;Object.defineProperty(jt,"__esModule",{value:!0});var vo=jt.default=void 0,Bc=Wc(Be()),qc=ke(),Kc=(0,Bc.default)((0,qc.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");vo=jt.default=Kc;const Yu="",yo=({title:e,text:r})=>g.jsx("div",{className:"desc_element",children:g.jsxs("div",{children:[g.jsx("div",{children:e}),g.jsx("div",{children:r})]})}),Gc=({historyElement:e})=>{var s,c,u,l;const[r,t]=ee.useState(!1),{ParseDataToRusLocale:n}=Fc(),o=g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[(s=e==null?void 0:e.items)==null?void 0:s.map((f,m)=>{var d,_,b,p;return g.jsx("div",{className:"purchase_element",children:g.jsxs("div",{children:[g.jsx("div",{className:"purchase_element__title",children:g.jsx("div",{children:f.productName||`Позиция ${m+1}`})}),g.jsx(Re.Divider,{}),g.jsxs("div",{className:"purchase_element__body",children:[g.jsxs("div",{className:"purchase_element__body__left",children:[g.jsxs("div",{children:[(f.amount/f.quantity).toFixed(2)," x ",f.quantity," ="]}),g.jsx("div",{children:"Скидка, руб:"}),g.jsx("div",{children:"Списано бонусов:"}),g.jsx("div",{children:g.jsx("u",{children:"Итого, руб:"})}),g.jsx("div",{children:"Начислено бонусов:"})]}),g.jsxs("div",{className:"purchase_element__body__right",children:[g.jsx("div",{children:(d=f.amount)==null?void 0:d.toFixed(2)}),g.jsx("div",{children:(_=f.discount)==null?void 0:_.toFixed(2)}),g.jsx("div",{children:(b=f.bonusDebit)==null?void 0:b.toFixed(2)}),g.jsx("div",{children:g.jsx("u",{children:(f.amount-f.discount-f.bonusDebit).toFixed(2)})}),g.jsx("div",{children:(p=f.bonusCredit)==null?void 0:p.toFixed(2)})]})]})]})},m)}),g.jsx("div",{className:"purchase_element",children:g.jsxs("div",{children:[g.jsx("div",{className:"purchase_element__title",children:g.jsx("div",{children:"Итого"})}),g.jsx(Re.Divider,{}),g.jsxs("div",{className:"purchase_element__body",children:[g.jsxs("div",{children:[g.jsx("div",{children:"Скидка. руб:"}),g.jsx("div",{children:"Списано бонусов:"}),g.jsx("div",{children:g.jsx("u",{children:"Итого. руб:"})}),g.jsx("div",{children:"Начислено бонусов:"})]}),g.jsxs("div",{className:"purchase_element__body__right",children:[g.jsx("div",{children:(c=e.discount)==null?void 0:c.toFixed(2)}),g.jsx("div",{children:(u=e.bonusDebit)==null?void 0:u.toFixed(2)}),g.jsx("div",{children:g.jsx("u",{children:(e.purchaseAmount-e.bonusDebit-e.discount).toFixed(2)})}),g.jsx("div",{children:(l=e.bonusCredit)==null?void 0:l.toFixed(2)})]})]})]})})]}),i=()=>{const f=r?g.jsx(vo,{}):g.jsx(ho,{});return e.operationType!==lo.Purchases?null:g.jsx("div",{className:"purchase_history_element__show_more",onClick:()=>t(m=>!m),children:f})};return g.jsxs(Re.Box,{className:"purchase_history_element",children:[g.jsxs("div",{className:"purchase_history_element__title",children:[n(e.date),"  ",e.type]}),g.jsx(Re.Divider,{}),g.jsxs("div",{className:"purchase_history_element__body",children:[e.bonusCredit>0&&g.jsx(yo,{title:"Бонусов начислено",text:g.jsx("div",{className:mo("purchase_history_element__body__top__amount",{more:!0}),children:e.bonusCredit})}),e.bonusDebit>0&&g.jsx(yo,{title:"Бонусов списано",text:g.jsx("div",{className:mo("purchase_history_element__body__top__amount",{more:!1}),children:e.bonusDebit})})]}),g.jsx("div",{className:"purchase_history_element__purchases",children:g.jsx(Re.Collapse,{in:r,timeout:"auto",unmountOnExit:!0,children:o})}),i()]})},Hc=()=>{const{purchaseNotFound:e,purchaseHistory:r,isLoading:t}=kc();return t?g.jsx(Mc,{}):g.jsx("div",{children:g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:".5em"},children:[g.jsx(fo,{children:g.jsxs("div",{children:[g.jsx("div",{}),g.jsx("div",{children:"Ниже отображена ваша история операций"})]})}),e||(r==null?void 0:r.map((n,o)=>g.jsx(Gc,{historyElement:n},o)))]})})},Wu="",Jc=()=>{const{cabinetUISettings:e}=ee.useContext(sr);return g.jsx("div",{className:"business_info",children:g.jsx("div",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.businessInfo)??""}})})},Xc=()=>{var i;const[e,r]=ee.useState(""),t=(s,c)=>{r(c)},{cabinetSettings:n}=ee.useContext(sr),o=[{icon:g.jsx(so,{}),value:"info",label:"Карта",page:g.jsx("div",{children:"Информация по карте"}),active:!0},{icon:g.jsx(oo,{}),value:"receipt",label:"История",page:g.jsx(Hc,{}),active:!0},{icon:g.jsx(ao,{}),value:"appeals",label:"Обращения",page:g.jsx("div",{children:"Обращения"}),active:n==null?void 0:n.canShowAppeals},{icon:g.jsx(co,{}),value:"businessInfo",label:"Информация о бизнесе",page:g.jsx(Jc,{}),active:n==null?void 0:n.canShowBusinessInfo},{icon:g.jsx(io,{}),value:"personInfo",label:"Клиент",page:g.jsx("div",{children:"Редактирование клиента"}),active:n==null?void 0:n.canEditPersonInfo},{icon:g.jsx(uo,{}),value:"registration",label:"Регистрация",page:g.jsx("div",{children:"Регистрация клиента"}),active:n==null?void 0:n.isReg}];return g.jsxs("div",{className:"page_view",children:[g.jsx("div",{className:"page_view__page scrollbar",children:(i=o.find(s=>s.value===e))==null?void 0:i.page}),g.jsx("div",{className:"page_view__navigation",children:g.jsx("div",{children:g.jsx(Re.BottomNavigation,{value:e,onChange:t,children:o.map((s,c)=>g.jsx(Re.BottomNavigationAction,{label:s.label,value:s.value,icon:s.icon},c))})})})]})},Zc={popups:[]},Qc=ee.createContext(Zc),eu=()=>{const[e,r]=ee.useState([]);return{popups:e}},ru=({children:e})=>{const r=eu();return g.jsx(Qc.Provider,{value:r,children:e})};Ee.AppContext=sr,Ee.AppProvider=Nc,Ee.PopupProvider=ru,Ee.Router=Xc,Object.defineProperty(Ee,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .page_view{height:100vh}.page_view__page{height:92vh;padding:1em}.page_view__navigation{height:8vh}.page_view__navigation>div{position:fixed;bottom:0;width:100%}.cloud{background-color:#cccccc80;padding:.4em;border-radius:15px;text-align:center}.purchase_element{background-color:#cccccc61;border-radius:5px;padding:.5em}.purchase_element__body{display:flex;justify-content:space-between}.purchase_element__body__right{display:flex;flex-direction:column;align-items:flex-end}.purchase_element>div{display:flex;flex-direction:column}.purchase_history_element{padding:.5em;border-radius:5px;background-color:#cccccc1c}.purchase_history_element__title{display:flex;justify-content:space-between}.purchase_history_element__title__info{position:relative}.purchase_history_element__title__info>div{position:absolute;top:-15px;left:-25px}.purchase_history_element__show_more{margin-top:.3em;border-radius:15px;background-color:#cccccc21;display:flex;justify-content:center}.purchase_history_element__show_more:hover{transition:background-color .2s ease;background-color:#cccccc40}.purchase_history_element__body{padding-top:.3em;display:flex;flex-wrap:wrap;gap:1em}.purchase_history_element__body__top{display:flex;justify-content:space-between;align-items:center}.purchase_history_element__body__top__amount{color:#da0d19}.purchase_history_element__body__top__amount.more{color:#49aa19}.purchase_history_element__purchases{margin-top:.7em}.desc_element{padding:.5em;border-radius:5px;background-color:#cccccc4d;display:flex;opacity:.8}.desc_element>div{flex:1}.desc_element>div>div:first-child{border-bottom:solid 1px #ccc}.business_info a{color:#6c97a9}
1
+ .page_view{height:100vh}.page_view__page{height:92vh;overflow:auto}.page_view__page>div{padding:1em}.page_view__navigation{height:8vh}.page_view__navigation>div{position:fixed;bottom:0;width:100%}.scrollbar{overflow-y:auto}.scrollbar::-webkit-scrollbar{width:2px}.scrollbar::-webkit-scrollbar-track{-webkit-box-shadow:5px 5px 5px -5px rgba(34,60,80,.2) inset;background-color:#ccc}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--primary)}.cloud{background-color:#cccccc80;padding:.4em;border-radius:15px;text-align:center}.purchase_element{background-color:#cccccc61;border-radius:5px;padding:.5em}.purchase_element__body{display:flex;justify-content:space-between}.purchase_element__body__right{display:flex;flex-direction:column;align-items:flex-end}.purchase_element>div{display:flex;flex-direction:column}.purchase_history_element{padding:.5em;border-radius:5px;background-color:#cccccc1c}.purchase_history_element__title{display:flex;justify-content:space-between}.purchase_history_element__title__info{position:relative}.purchase_history_element__title__info>div{position:absolute;top:-15px;left:-25px}.purchase_history_element__show_more{margin-top:.3em;border-radius:15px;background-color:#cccccc21;display:flex;justify-content:center}.purchase_history_element__show_more:hover{transition:background-color .2s ease;background-color:#cccccc40}.purchase_history_element__body{padding-top:.3em;display:flex;flex-wrap:wrap;gap:1em}.purchase_history_element__body__top{display:flex;justify-content:space-between;align-items:center}.purchase_history_element__body__top__amount{color:#da0d19}.purchase_history_element__body__top__amount.more{color:#49aa19}.purchase_history_element__purchases{margin-top:.7em}.desc_element{padding:.5em;border-radius:5px;background-color:#cccccc4d;display:flex;opacity:.8}.desc_element>div{flex:1}.desc_element>div>div:first-child{border-bottom:solid 1px #ccc}.business_info a{color:#6c97a9}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bonuspluscomponents",
3
3
  "private": false,
4
- "version": "0.0.73",
4
+ "version": "0.0.74",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",