openstack-uicore-foundation 5.0.20-beta.3 → 5.0.20-beta.4
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,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={6337:(e,t,r)=>{r.d(t,{DiscountRow:()=>C,FeeRow:()=>x,NotesRow:()=>g,PaymentRow:()=>_,RefundRow:()=>k,TotalRow:()=>u});var n=r(2015),a=r.n(n),o=r(5684),l=r.n(o),i=r(464),c=r.n(i),m=r(6842),s=r.n(m);const u=({columns:e,targetCol:t,total:r,trailing:n=0,label:o=null,rowSx:i={}})=>{const m=o||s().translate("mui_table.total");return a().createElement(c(),{sx:i},e.map(((e,n)=>0===n?a().createElement(l(),{key:e.columnKey,sx:{fontWeight:800,textTransform:"uppercase"}},m):e.columnKey===t?a().createElement(l(),{key:e.columnKey,sx:{fontWeight:800}},r):a().createElement(l(),{key:e.columnKey}))),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`extra-row-total-${t}`,sx:{width:40}}))))};var d=r(8619),p=r(9870),y=r.n(p);const g=({colCount:e,note:t,showCode:r=!1})=>{const a=r?e-1:e;return n.createElement(c(),null,r&&n.createElement(l(),null,y().translate("mui_table.note")),n.createElement(l(),{sx:{fontWeight:800},colSpan:a},n.createElement(d.Typography,{variant:"body2",sx:{color:"text.secondary"}},t)))};var f=r(785),E=r.n(f),b=r(8400);const x=({fee:e,colGap:t=3,trailing:r=0})=>e?a().createElement(c(),null,a().createElement(l(),null,s().translate("mui_table.payfee")),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{fontWeight:500}},e.title)),[...Array(t)].map(((e,t)=>a().createElement(l(),{key:`fee-col-gap-${t}`}))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"success.main",fontWeight:500}},(0,b.currencyAmountFromCents)(e.amount))),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`fee-trailing-col-${t}`,sx:{width:40}})))):null;var h=r(5812),w=r.n(h),v=r(3209);const _=({payment:e,colGap:t=1,trailing:r=0})=>e?a().createElement(c(),{sx:{backgroundColor:"#2E7D3214"}},a().createElement(l(),null,s().translate("mui_table.pay")),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"success.main",fontWeight:500}},s().translate("mui_table.payment"))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"text.secondary"}},s().translate("mui_table.paid_via")," ",e.method)),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"text.secondary"}},w()(e.created*v.iC).format(v.QM))),[...Array(t)].map(((e,t)=>a().createElement(l(),{key:`pay-col-gap-${t}`}))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"success.main",fontWeight:500}},"-",(0,b.currencyAmountFromCents)(e.amount))),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`pay-trailing-col-${t}`,sx:{width:40}})))):null,k=({refund:e,colGap:t=1,trailing:r=0})=>e?a().createElement(c(),{sx:{backgroundColor:"#EF6C0014"}},a().createElement(l(),null,s().translate("mui_table.ref")),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"warning.main",fontWeight:500}},s().translate("mui_table.refund"))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"text.secondary"}},e.reason)),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"text.secondary"}},e.status)),[...Array(t)].map(((e,t)=>a().createElement(l(),{key:`ref-col-gap-${t}`}))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"warning.main",fontWeight:500}},"-",(0,b.currencyAmountFromCents)(e.amount))),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`ref-trailing-col-${t}`,sx:{width:40}})))):null,C=({discount:e,discountTotal:t,colGap:r=2,trailing:n=0})=>0===t?null:a().createElement(c(),{sx:{backgroundColor:"#2E7D3214"}},a().createElement(l(),null,s().translate("mui_table.dis")),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"success.main",fontWeight:500}},s().translate("mui_table.discount"))),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`pay-col-gap-${t}`}))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"text.secondary"}},e)),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"success.main",fontWeight:500}},"-",(0,b.currencyAmountFromCents)(t))),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`pay-trailing-col-${t}`,sx:{width:40}}))))},3209:(e,t,r)=>{r.d(t,{OP:()=>a,QM:()=>i,fJ:()=>o,gI:()=>c,iC:()=>l,q9:()=>n});const n=100n,a=2,o=0,l=1e3,i="MM/DD/YYYY hh:mm a",c={FORM:"Form",ITEM:"Item"}},8400:(e,t,r)=>{r.d(t,{currencyAmountFromCents:()=>o});var n=r(3209);const a={USD:"$",EUR:"€",GBP:"£",CAD:"C$",AUD:"A$",NZD:"NZ$",CHF:"CHF",ARS:"AR$",BRL:"R$",MXN:"MX$"};function o(e,t="USD"){if("number"!=typeof e||!Number.isInteger(e))throw new Error("cents must be an integer number");const r=function(e){let t;if("bigint"==typeof e)t=e;else if("number"==typeof e){if(!Number.isSafeInteger(e))throw new Error("cents must be a safe integer Number (or pass BigInt/string).");t=BigInt(e)}else{if("string"!=typeof e)throw new Error("cents must be a bigint, number, or numeric string.");{const r=e.trim();if(!/^\d+$/.test(r))throw new Error("cents string must contain digits only (e.g., '1234').");t=BigInt(r)}}if(t<n.fJ)throw new Error("cents must be non-negative.");const r=t/n.q9,a=t%n.q9;return`${r.toString()}.${a.toString().padStart(n.OP,"0")}`}(e);return`${a[t]??"$"}${r}`}},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6084:e=>{e.exports=require("@mui/icons-material/Delete")},8619:e=>{e.exports=require("@mui/material")},6989:e=>{e.exports=require("@mui/material/Box")},909:e=>{e.exports=require("@mui/material/IconButton")},270:e=>{e.exports=require("@mui/material/Paper")},9292:e=>{e.exports=require("@mui/material/Table")},9008:e=>{e.exports=require("@mui/material/TableBody")},5684:e=>{e.exports=require("@mui/material/TableCell")},5783:e=>{e.exports=require("@mui/material/TableContainer")},8202:e=>{e.exports=require("@mui/material/TableHead")},464:e=>{e.exports=require("@mui/material/TableRow")},785:e=>{e.exports=require("@mui/material/Typography")},9870:e=>{e.exports=require("i18n-react")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},5812:e=>{e.exports=require("moment-timezone")},2015:e=>{e.exports=require("react")}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};r.r(n),r.d(n,{default:()=>K});var a=r(1116),o=r.n(a),l=r(2015),i=r.n(l),c=r(6842),m=r.n(c),s=r(6337),u=r(909),d=r.n(u),p=r(6084),y=r.n(p);const g=require("@mui/icons-material/ArrowBack");var f=r.n(g),E=r(6989),b=r.n(E),x=r(270),h=r.n(x),w=r(5783),v=r.n(w),_=r(464),k=r.n(_),C=r(9008),$=r.n(C),O=r(5684),A=r.n(O),q=r(9292),R=r.n(q),S=r(8202),F=r.n(S),D=r(8400),P=r(3209);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const K=({lines:e,notes:t,payments:r,refunds:n,fees:a,total:o,amountDue:l,withDescription:c=!1,onCancelForm:u,onUndoCancelForm:p})=>{const g=(e=>e?e.map((e=>T(T({},e),{},{items:e.items.filter((e=>e.quantity)).map((t=>{var r;const n=t.meta_fields.filter((e=>e.class_field===P.gI.FORM)),a=[null===(r=t.type)||void 0===r?void 0:r.name];a.push(...n.map((e=>{var r,n;const a=(null===(r=e.values)||void 0===r?void 0:r.length)>0?null===(n=e.values.find((t=>t.id===e.current_value)))||void 0===n?void 0:n.name:e.current_value;return i().createElement("div",{key:`mf-list-${t.id}-${e.id}`},e.name,": ",a)}))),a.push(i().createElement("br",{key:`mf-list-${t.id}-spacer`})),a.push(i().createElement("div",{key:`mf-list-${t.id}-total`},m().translate("sponsor_order_grid.total"),": ",t.quantity));const o=(0,D.currencyAmountFromCents)(t.amount||0),l=t.line_id,c=!!t.canceled_by_id,s=(0,D.currencyAmountFromCents)(t.current_rate||0);return{id:l,code:e.code,name:e.name,rate:s,addon_name:e.addon_name,item_name:a,amount:o,cancelled:c}}))}))):[])(e),E=u&&p,x=E?1:0,w=[{columnKey:"code",header:m().translate("sponsor_order_grid.code")},{columnKey:"name",header:m().translate("sponsor_order_grid.contents")},{columnKey:"addon_name",header:m().translate("sponsor_order_grid.addon")},{columnKey:"item_name",header:m().translate("sponsor_order_grid.details")},{columnKey:"rate",header:m().translate("sponsor_order_grid.rate")},{columnKey:"amount",header:m().translate("sponsor_order_grid.amount")}];return E&&w.push({columnKey:"actions",header:m().translate("sponsor_order_grid.action"),align:"center",render:e=>e.cancelled?i().createElement(d(),{size:"large",onClick:()=>p(e)},i().createElement(f(),{fontSize:"large",sx:{mr:2}})," ",m().translate("general.undo").toUpperCase()):i().createElement(d(),{size:"large",onClick:()=>u(e)},i().createElement(y(),{fontSize:"large"}))}),i().createElement(b(),{sx:{width:"100%"}},i().createElement(h(),{elevation:0,sx:{width:"100%",mb:2}},i().createElement(v(),{component:h(),sx:{borderRadius:0,boxShadow:"none"}},i().createElement(R(),null,i().createElement(F(),{sx:{backgroundColor:"#EAEAEA"}},i().createElement(k(),null,w.map((e=>i().createElement(A(),{key:e.columnKey,align:e.align??"left"},e.header))))),i().createElement($(),null,g.map((e=>{const t=e.items.map((e=>i().createElement(k(),{key:e.id,sx:T({},e.cancelled&&{color:"text.secondary",textDecoration:"line-through"})},w.map((t=>i().createElement(A(),{key:t.columnKey,align:t.align??"left",sx:{fontWeight:"normal"}},t.render?t.render(e):i().createElement("span",{style:{fontWeight:"normal"}},e[t.columnKey])))))));return t.push(i().createElement(s.DiscountRow,{key:`discount-row-${e.id}`,discount:e.discount,discountTotal:e.discount_total,trailing:x})),t})),a&&a.map((e=>i().createElement(s.FeeRow,{fee:e,key:`fee-row-${e.id}`,trailing:1}))),n&&n.map((e=>i().createElement(s.RefundRow,{refund:e,key:`refund-row-${e.id}`,trailing:x}))),r&&r.map((e=>i().createElement(s.PaymentRow,{payment:e,key:`payment-row-${e.id}`,trailing:x}))),t&&t.map((e=>i().createElement(s.NotesRow,{note:e.content,colCount:w.length,key:`note-row-${e.id}`,showCode:!0}))),i().createElement(s.TotalRow,{columns:w,total:o||l,label:l?m().translate("sponsor_order_grid.amount_due"):null,targetCol:"amount",rowSx:{backgroundColor:"#F1F3F5"}}),0===g.length&&i().createElement(k(),null,i().createElement(A(),{colSpan:w.length,align:"center"},m().translate("mui_table.no_items"))))))))};return n})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={6337:(e,t,r)=>{r.d(t,{DiscountRow:()=>C,FeeRow:()=>x,NotesRow:()=>g,PaymentRow:()=>_,RefundRow:()=>k,TotalRow:()=>u});var n=r(2015),a=r.n(n),o=r(5684),l=r.n(o),i=r(464),c=r.n(i),m=r(6842),s=r.n(m);const u=({columns:e,targetCol:t,total:r,trailing:n=0,label:o=null,rowSx:i={}})=>{const m=o||s().translate("mui_table.total");return a().createElement(c(),{sx:i},e.map(((e,n)=>0===n?a().createElement(l(),{key:e.columnKey,sx:{fontWeight:800,textTransform:"uppercase"}},m):e.columnKey===t?a().createElement(l(),{key:e.columnKey,sx:{fontWeight:800}},r):a().createElement(l(),{key:e.columnKey}))),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`extra-row-total-${t}`,sx:{width:40}}))))};var d=r(8619),p=r(9870),y=r.n(p);const g=({colCount:e,note:t,showCode:r=!1})=>{const a=r?e-1:e;return n.createElement(c(),null,r&&n.createElement(l(),null,y().translate("mui_table.note")),n.createElement(l(),{sx:{fontWeight:800},colSpan:a},n.createElement(d.Typography,{variant:"body2",sx:{color:"text.secondary"}},t)))};var f=r(785),E=r.n(f),b=r(8400);const x=({fee:e,colGap:t=3,trailing:r=0})=>e?a().createElement(c(),null,a().createElement(l(),null,s().translate("mui_table.payfee")),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{fontWeight:500}},e.title)),[...Array(t)].map(((e,t)=>a().createElement(l(),{key:`fee-col-gap-${t}`}))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"success.main",fontWeight:500}},(0,b.currencyAmountFromCents)(e.amount))),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`fee-trailing-col-${t}`,sx:{width:40}})))):null;var h=r(5812),w=r.n(h),v=r(3209);const _=({payment:e,colGap:t=1,trailing:r=0})=>e?a().createElement(c(),{sx:{backgroundColor:"#2E7D3214"}},a().createElement(l(),null,s().translate("mui_table.pay")),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"success.main",fontWeight:500}},s().translate("mui_table.payment"))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"text.secondary"}},s().translate("mui_table.paid_via")," ",e.method)),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"text.secondary"}},w()(e.created*v.iC).format(v.QM))),[...Array(t)].map(((e,t)=>a().createElement(l(),{key:`pay-col-gap-${t}`}))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"success.main",fontWeight:500}},"-",(0,b.currencyAmountFromCents)(e.amount))),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`pay-trailing-col-${t}`,sx:{width:40}})))):null,k=({refund:e,colGap:t=1,trailing:r=0})=>e?a().createElement(c(),{sx:{backgroundColor:"#EF6C0014"}},a().createElement(l(),null,s().translate("mui_table.ref")),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"warning.main",fontWeight:500}},s().translate("mui_table.refund"))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"text.secondary"}},e.reason)),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"text.secondary"}},e.status)),[...Array(t)].map(((e,t)=>a().createElement(l(),{key:`ref-col-gap-${t}`}))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"warning.main",fontWeight:500}},"-",(0,b.currencyAmountFromCents)(e.amount))),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`ref-trailing-col-${t}`,sx:{width:40}})))):null,C=({discount:e,discountTotal:t,colGap:r=2,trailing:n=0})=>0===t?null:a().createElement(c(),{sx:{backgroundColor:"#2E7D3214"}},a().createElement(l(),null,s().translate("mui_table.dis")),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"success.main",fontWeight:500}},s().translate("mui_table.discount"))),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`pay-col-gap-${t}`}))),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"text.secondary"}},e)),a().createElement(l(),null,a().createElement(E(),{variant:"body2",sx:{color:"success.main",fontWeight:500}},"-",(0,b.currencyAmountFromCents)(t))),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`pay-trailing-col-${t}`,sx:{width:40}}))))},3209:(e,t,r)=>{r.d(t,{OP:()=>a,QM:()=>i,fJ:()=>o,gI:()=>c,iC:()=>l,q9:()=>n});const n=100n,a=2,o=0,l=1e3,i="MM/DD/YYYY hh:mm a",c={FORM:"Form",ITEM:"Item"}},8400:(e,t,r)=>{r.d(t,{currencyAmountFromCents:()=>o});var n=r(3209);const a={USD:"$",EUR:"€",GBP:"£",CAD:"C$",AUD:"A$",NZD:"NZ$",CHF:"CHF",ARS:"AR$",BRL:"R$",MXN:"MX$"};function o(e,t="USD"){if("number"!=typeof e||!Number.isInteger(e))throw new Error("cents must be an integer number");const r=function(e){let t;if("bigint"==typeof e)t=e;else if("number"==typeof e){if(!Number.isSafeInteger(e))throw new Error("cents must be a safe integer Number (or pass BigInt/string).");t=BigInt(e)}else{if("string"!=typeof e)throw new Error("cents must be a bigint, number, or numeric string.");{const r=e.trim();if(!/^\d+$/.test(r))throw new Error("cents string must contain digits only (e.g., '1234').");t=BigInt(r)}}if(t<n.fJ)throw new Error("cents must be non-negative.");const r=t/n.q9,a=t%n.q9;return`${r.toString()}.${a.toString().padStart(n.OP,"0")}`}(e);return`${a[t]??"$"}${r}`}},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6084:e=>{e.exports=require("@mui/icons-material/Delete")},8619:e=>{e.exports=require("@mui/material")},6989:e=>{e.exports=require("@mui/material/Box")},909:e=>{e.exports=require("@mui/material/IconButton")},270:e=>{e.exports=require("@mui/material/Paper")},9292:e=>{e.exports=require("@mui/material/Table")},9008:e=>{e.exports=require("@mui/material/TableBody")},5684:e=>{e.exports=require("@mui/material/TableCell")},5783:e=>{e.exports=require("@mui/material/TableContainer")},8202:e=>{e.exports=require("@mui/material/TableHead")},464:e=>{e.exports=require("@mui/material/TableRow")},785:e=>{e.exports=require("@mui/material/Typography")},9870:e=>{e.exports=require("i18n-react")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},5812:e=>{e.exports=require("moment-timezone")},2015:e=>{e.exports=require("react")}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};r.r(n),r.d(n,{default:()=>K});var a=r(1116),o=r.n(a),l=r(2015),i=r.n(l),c=r(6842),m=r.n(c),s=r(6337),u=r(909),d=r.n(u),p=r(6084),y=r.n(p);const g=require("@mui/icons-material/ArrowBack");var f=r.n(g),E=r(6989),b=r.n(E),x=r(270),h=r.n(x),w=r(5783),v=r.n(w),_=r(464),k=r.n(_),C=r(9008),$=r.n(C),O=r(5684),A=r.n(O),q=r(9292),R=r.n(q),S=r(8202),F=r.n(S),D=r(8400),P=r(3209);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const K=({lines:e,notes:t,payments:r,refunds:n,fees:a,total:o,amountDue:l,withDescription:c=!1,onCancelForm:u,onUndoCancelForm:p})=>{const g=((e,t)=>e?e.map((e=>T(T({},e),{},{items:e.items.filter((e=>e.quantity)).map((r=>{var n;const a=r.meta_fields.filter((e=>e.class_field===P.gI.FORM)),o=[null===(n=r.type)||void 0===n?void 0:n.name];t&&(o.push(...a.map((e=>{var t,n;const a=(null===(t=e.values)||void 0===t?void 0:t.length)>0?null===(n=e.values.find((t=>t.id===e.current_value)))||void 0===n?void 0:n.name:e.current_value;return i().createElement("div",{key:`mf-list-${r.id}-${e.id}`},e.name,": ",a)}))),o.push(i().createElement("br",{key:`mf-list-${r.id}-spacer`})),o.push(i().createElement("div",{key:`mf-list-${r.id}-total`},m().translate("sponsor_order_grid.total"),": ",r.quantity)));const l=(0,D.currencyAmountFromCents)(r.amount||0),c=r.line_id,s=!!r.canceled_by_id,u=(0,D.currencyAmountFromCents)(r.current_rate||0);return{id:c,code:e.code,name:e.name,rate:u,addon_name:e.addon_name,item_name:o,amount:l,cancelled:s}}))}))):[])(e,c),E=u&&p,x=E?1:0,w=[{columnKey:"code",header:m().translate("sponsor_order_grid.code")},{columnKey:"name",header:m().translate("sponsor_order_grid.contents")},{columnKey:"addon_name",header:m().translate("sponsor_order_grid.addon")},{columnKey:"item_name",header:m().translate("sponsor_order_grid.details")},{columnKey:"rate",header:m().translate("sponsor_order_grid.rate")},{columnKey:"amount",header:m().translate("sponsor_order_grid.amount")}];return E&&w.push({columnKey:"actions",header:m().translate("sponsor_order_grid.action"),align:"center",render:e=>e.cancelled?i().createElement(d(),{size:"large",onClick:()=>p(e)},i().createElement(f(),{fontSize:"large",sx:{mr:2}})," ",m().translate("general.undo").toUpperCase()):i().createElement(d(),{size:"large",onClick:()=>u(e)},i().createElement(y(),{fontSize:"large"}))}),i().createElement(b(),{sx:{width:"100%"}},i().createElement(h(),{elevation:0,sx:{width:"100%",mb:2}},i().createElement(v(),{component:h(),sx:{borderRadius:0,boxShadow:"none"}},i().createElement(R(),null,i().createElement(F(),{sx:{backgroundColor:"#EAEAEA"}},i().createElement(k(),null,w.map((e=>i().createElement(A(),{key:e.columnKey,align:e.align??"left"},e.header))))),i().createElement($(),null,g.map((e=>{const t=e.items.map((e=>i().createElement(k(),{key:e.id,sx:T({},e.cancelled&&{color:"text.secondary",textDecoration:"line-through"})},w.map((t=>i().createElement(A(),{key:t.columnKey,align:t.align??"left",sx:{fontWeight:"normal"}},t.render?t.render(e):i().createElement("span",{style:{fontWeight:"normal"}},e[t.columnKey])))))));return t.push(i().createElement(s.DiscountRow,{key:`discount-row-${e.id}`,discount:e.discount,discountTotal:e.discount_total,trailing:x})),t})),a&&a.map((e=>i().createElement(s.FeeRow,{fee:e,key:`fee-row-${e.id}`,trailing:1}))),n&&n.map((e=>i().createElement(s.RefundRow,{refund:e,key:`refund-row-${e.id}`,trailing:x}))),r&&r.map((e=>i().createElement(s.PaymentRow,{payment:e,key:`payment-row-${e.id}`,trailing:x}))),t&&t.map((e=>i().createElement(s.NotesRow,{note:e.content,colCount:w.length,key:`note-row-${e.id}`,showCode:!0}))),i().createElement(s.TotalRow,{columns:w,total:o||l,label:l?m().translate("sponsor_order_grid.amount_due"):null,targetCol:"amount",rowSx:{backgroundColor:"#F1F3F5"}}),0===g.length&&i().createElement(k(),null,i().createElement(A(),{colSpan:w.length,align:"center"},m().translate("mui_table.no_items"))))))))};return n})()));
|
|
2
2
|
//# sourceMappingURL=sponsor-order-grid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/mui/sponsor-order-grid.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,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ACHrJ,EAAIqJ,OAAOC,GAEX1J,IAAAA,cAAA,QAAMgL,MAAO,CAAEvK,WAAY,WACxBiJ,EAAItJ,EAAII,kBAiBrB,OATAsK,EAAK7C,KACHjI,IAAAA,cAACyC,EAAAA,YAAW,CACVlC,IAAK,gBAAgB4G,EAAKsB,KAC1B/F,SAAUyE,EAAKzE,SACfC,cAAewE,EAAK8D,eACpBtL,SAAU2J,KAIPwB,CAAI,IAEZlE,GACCA,EAAKzG,KAAKoB,GACRvB,IAAAA,cAACsB,EAAAA,OAAM,CAACC,IAAKA,EAAKhB,IAAK,WAAWgB,EAAIkH,KAAM9I,SAAU,MAEzDgH,GACCA,EAAQxG,KAAKmC,GACXtC,IAAAA,cAACqC,EAAAA,UAAS,CACRC,OAAQA,EACR/B,IAAK,cAAc+B,EAAOmG,KAC1B9I,SAAU2J,MAGf5C,GACCA,EAASvG,KAAK0B,GACZ7B,IAAAA,cAAC4B,EAAAA,WAAU,CACTC,QAASA,EACTtB,IAAK,eAAesB,EAAQ4G,KAC5B9I,SAAU2J,MAGf7C,GACCA,EAAMtG,KAAKa,GACThB,IAAAA,cAACc,EAAAA,SAAQ,CACPE,KAAMA,EAAKkK,QACXnK,SAAUvB,EAAQ8I,OAClB/H,IAAK,YAAYS,EAAKyH,KACtBxH,UAAQ,MAGdjB,IAAAA,cAACT,EAAAA,SAAQ,CACPC,QAASA,EACTE,MAAOA,GAASmH,EAChBjH,MACEiH,EACI9G,IAAAA,UAAY,iCACZ,KAENN,UAAU,SACVI,MAAO,CAAEiC,gBAAiB,aAGX,IAAhBmF,EAAKqB,QACJtI,IAAAA,cAACC,IAAQ,KACPD,IAAAA,cAACM,IAAS,CAACY,QAAS1B,EAAQ8I,OAAQkB,MAAM,UACvCzJ,IAAAA,UAAY,4BAQvB,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/TotalRow.jsx","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/NotesRow.jsx","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/FeeRow.jsx","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/PaymentRow.jsx","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/RefundRow.jsx","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/DiscountRow.jsx","webpack://openstack-uicore-foundation/./src/utils/constants.js","webpack://openstack-uicore-foundation/./src/utils/money.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Delete\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Box\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/IconButton\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Paper\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Table\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableBody\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableCell\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableContainer\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableHead\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableRow\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Typography\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/ArrowBack\"","webpack://openstack-uicore-foundation/./src/components/mui/SponsorOrderGrid/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport T from \"i18n-react/dist/i18n-react\";\n\nconst TotalRow = ({ columns, targetCol, total, trailing = 0, label = null, rowSx = {} }) => {\n\n const totalLabel = label || T.translate(\"mui_table.total\");\n\n return (\n <TableRow sx={rowSx}>\n {columns.map((col, i) => {\n if (i === 0)\n return (\n <TableCell key={col.columnKey} sx={{ fontWeight: 800, textTransform: \"uppercase\" }}>\n {totalLabel}\n </TableCell>\n );\n if (col.columnKey === targetCol)\n return (\n <TableCell key={col.columnKey} sx={{ fontWeight: 800 }}>\n {total}\n </TableCell>\n );\n return <TableCell key={col.columnKey} />;\n })}\n {[...Array(trailing)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`extra-row-total-${i}`} sx={{ width: 40 }} />\n ))}\n </TableRow>\n );\n};\n\nexport default TotalRow;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport * as React from \"react\";\nimport { Typography } from \"@mui/material\";\nimport T from \"i18n-react\";\n\nconst NotesRow = ({ colCount, note, showCode = false }) => {\n const colSpan = showCode ? colCount - 1 : colCount;\n return (\n <TableRow>\n {showCode && (\n <TableCell>{T.translate(\"mui_table.note\")}</TableCell>\n )}\n <TableCell sx={{fontWeight: 800}} colSpan={colSpan}>\n <Typography variant=\"body2\" sx={{color: \"text.secondary\"}}>\n {note}\n </Typography>\n </TableCell>\n </TableRow>\n );\n}\n\nexport default NotesRow;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Typography from \"@mui/material/Typography\";\nimport { currencyAmountFromCents } from \"../../../../utils/money\";\n\nconst FeeRow = ({ fee, colGap = 3, trailing = 0 }) => {\n if (!fee) return null;\n\n return (\n <TableRow>\n <TableCell>{T.translate(\"mui_table.payfee\")}</TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ fontWeight: 500 }}>\n {fee.title}\n </Typography>\n </TableCell>\n {[...Array(colGap)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`fee-col-gap-${i}`} />\n ))}\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"success.main\", fontWeight: 500 }}\n >\n {currencyAmountFromCents(fee.amount)}\n </Typography>\n </TableCell>\n {[...Array(trailing)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`fee-trailing-col-${i}`} sx={{ width: 40 }} />\n ))}\n </TableRow>\n );\n};\n\nexport default FeeRow;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport moment from \"moment-timezone\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Typography from \"@mui/material/Typography\";\nimport { currencyAmountFromCents } from \"../../../../utils/money\";\nimport { DATETIME_FORMAT, MILLISECONDS_IN_SECOND } from \"../../../../utils/constants\";\n\nconst PaymentRow = ({ payment, colGap = 1, trailing = 0 }) => {\n\n if (!payment) return null;\n\n return (\n <TableRow sx={{backgroundColor: \"#2E7D3214\"}}>\n <TableCell>{T.translate(\"mui_table.pay\")}</TableCell>\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"success.main\", fontWeight: 500 }}\n >\n {T.translate(\"mui_table.payment\")}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ color: \"text.secondary\" }}>\n {T.translate(\"mui_table.paid_via\")} {payment.method}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ color: \"text.secondary\" }}>\n {moment(payment.created * MILLISECONDS_IN_SECOND).format(DATETIME_FORMAT)}\n </Typography>\n </TableCell>\n {[...Array(colGap)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`pay-col-gap-${i}`} />\n ))}\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"success.main\", fontWeight: 500 }}\n >\n -{currencyAmountFromCents(payment.amount)}\n </Typography>\n </TableCell>\n {[...Array(trailing)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`pay-trailing-col-${i}`} sx={{ width: 40 }} />\n ))}\n </TableRow>\n );\n};\n\nexport default PaymentRow;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Typography from \"@mui/material/Typography\";\nimport { currencyAmountFromCents } from \"../../../../utils/money\";\n\nconst RefundRow = ({ refund, colGap = 1, trailing = 0 }) => {\n\n if (!refund) return null;\n\n return (\n <TableRow sx={{ backgroundColor: \"#EF6C0014\" }}>\n <TableCell>{T.translate(\"mui_table.ref\")}</TableCell>\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"warning.main\", fontWeight: 500 }}\n >\n {T.translate(\"mui_table.refund\")}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ color: \"text.secondary\" }}>\n {refund.reason}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ color: \"text.secondary\" }}>\n {refund.status}\n </Typography>\n </TableCell>\n {[...Array(colGap)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`ref-col-gap-${i}`} />\n ))}\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"warning.main\", fontWeight: 500 }}\n >\n -{currencyAmountFromCents(refund.amount)}\n </Typography>\n </TableCell>\n {[...Array(trailing)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`ref-trailing-col-${i}`} sx={{ width: 40 }} />\n ))}\n </TableRow>\n );\n};\n\nexport default RefundRow;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Typography from \"@mui/material/Typography\";\nimport { currencyAmountFromCents } from \"../../../../utils/money\";\n\n\nconst DiscountRow = ({ discount, discountTotal, colGap = 2, trailing = 0 }) => {\n\n if (discountTotal === 0) return null;\n\n return (\n <TableRow sx={{backgroundColor: \"#2E7D3214\"}}>\n <TableCell>{T.translate(\"mui_table.dis\")}</TableCell>\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"success.main\", fontWeight: 500 }}\n >\n {T.translate(\"mui_table.discount\")}\n </Typography>\n </TableCell>\n {[...Array(colGap)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`pay-col-gap-${i}`} />\n ))}\n <TableCell>\n <Typography variant=\"body2\" sx={{ color: \"text.secondary\" }}>\n {discount}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"success.main\", fontWeight: 500 }}\n >\n -{currencyAmountFromCents(discountTotal)}\n </Typography>\n </TableCell>\n {[...Array(trailing)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`pay-trailing-col-${i}`} sx={{ width: 40 }} />\n ))}\n </TableRow>\n );\n};\n\nexport default DiscountRow;\n","export const CENTS_FACTOR = 100n;\nexport const TWO_DECIMAL_PLACES = 2;\nexport const THREE_DECIMAL_PLACES = 3;\nexport const ONE_CENT = 1n;\nexport const ZERO_INT = 0;\nexport const BPS = 100;\n\nexport const CODE_200 = 200;\n\nexport const DEBOUNCE_WAIT_250 = 250;\nexport const DEBOUNCE_WAIT = 500;\n\nexport const NOTIFICATION_TIMEOUT = 2000;\nexport const DEFAULT_PER_PAGE = 10;\nexport const TWENTY_PER_PAGE = 20;\nexport const FIFTY_PER_PAGE = 50;\nexport const MAX_PER_PAGE = 100;\n\nexport const INT_BASE = 10;\n\nexport const ONE_HUNDRED = 100;\nexport const MILLISECONDS_IN_SECOND = 1000;\n\nexport const MILLISECONDS_TO_SECONDS = 1000;\n\nexport const BYTES_PER_MB = 1_048_576; // 1024 * 1024\n\nexport const MAX_INVENTORY_IMAGE_UPLOAD_SIZE = 512000;\nexport const MAX_INVENTORY_IMAGES_UPLOAD_QTY = 5;\nexport const ALLOWED_INVENTORY_IMAGE_FORMATS = [\"jpg\", \"jpeg\", \"png\"];\n\nexport const METAFIELD_TYPES_WITH_OPTIONS = [\n \"CheckBoxList\",\n \"ComboBox\",\n \"RadioButtonList\"\n];\n\nexport const METAFIELD_TYPES = [\n \"CheckBox\",\n ...METAFIELD_TYPES_WITH_OPTIONS,\n \"Text\",\n \"TextArea\",\n \"Quantity\",\n \"DateTime\",\n \"Time\"\n];\n\nexport const DISCOUNT_TYPES = {\n AMOUNT: \"Amount\",\n RATE: \"Rate\"\n};\n\nexport const RATE_FIELDS = {\n EARLY_BIRD: \"early_bird_rate\",\n STANDARD: \"standard_rate\",\n ONSITE: \"onsite_rate\"\n};\n\nexport const DECIMAL_DIGITS = 2;\n\nexport const FILE_UPLOAD_STATUS = {\n PENDING: \"PENDING\",\n DEADLINE_ALERT: \"DEADLINE ALERT\",\n DEADLINE_MISSED: \"DEADLINE MISSED\",\n COMPLETE: \"COMPLETE\"\n};\n\nexport const FILE_UPLOAD_STATUS_COLOR = {\n [FILE_UPLOAD_STATUS.COMPLETE]: \"success.light\",\n [FILE_UPLOAD_STATUS.DEADLINE_MISSED]: \"error\",\n [FILE_UPLOAD_STATUS.DEADLINE_ALERT]: \"warning.light\",\n [FILE_UPLOAD_STATUS.PENDING]: \"default\"\n};\n\nexport const FILE_UPLOAD_STATUS_BKGR_COLOR = {\n [FILE_UPLOAD_STATUS.COMPLETE]: \"white\",\n [FILE_UPLOAD_STATUS.DEADLINE_MISSED]: \"#D32F2F0A\",\n [FILE_UPLOAD_STATUS.DEADLINE_ALERT]: \"#EF6C000A\",\n [FILE_UPLOAD_STATUS.PENDING]: \"white\"\n};\n\nexport const DATE_FORMAT = \"MM/DD/YYYY\";\nexport const DATETIME_FORMAT = \"MM/DD/YYYY hh:mm a\";\n\nexport const SPONSOR_FORMS_METAFIELD_CLASS = {\n FORM: \"Form\",\n ITEM: \"Item\"\n};","/**\n * Copyright 2025 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport {\n BPS,\n CENTS_FACTOR,\n DISCOUNT_TYPES,\n ONE_CENT,\n THREE_DECIMAL_PLACES,\n TWO_DECIMAL_PLACES,\n ZERO_INT\n} from \"./constants\";\n\nconst CURRENCY_SYMBOL = {\n USD: \"$\",\n EUR: \"€\",\n GBP: \"£\",\n CAD: \"C$\",\n AUD: \"A$\",\n NZD: \"NZ$\",\n CHF: \"CHF\",\n ARS: \"AR$\",\n BRL: \"R$\",\n MXN: \"MX$\",\n};\n\n/**\n * Convert a decimal money amount to integer cents safely (no floating point math).\n *\n * Why this exists:\n * - `Math.round(parseFloat(x) * 100)` can be wrong due to IEEE-754 floating point errors\n * (e.g. 1.005 * 100 may become 100.499999..., rounding down unexpectedly).\n *\n * Input:\n * - number or string (recommended: string from API/UI)\n * - Examples: \"12.34\", \"1,234.56\", \"1234,56\", 12.34\n *\n * Output:\n * - Number cents (exact), e.g. \"12.34\" -> 1234\n *\n * Rounding:\n * - Half-up to 2 decimals (>= 0.005 USD rounds up by 1 cent).\n *\n * Notes:\n * - Amounts are assumed to be NON-negative (per your requirement).\n * - Throws on invalid formats (does not silently return 0).\n */\nexport function amountToCents(amount) {\n if (amount == null) throw new Error(\"amount is required\");\n\n let s = String(amount).trim();\n\n // Normalize common separators:\n // - \"1,234.56\" => \"1234.56\" (remove thousands separators)\n // - \"1234,56\" => \"1234.56\" (convert decimal comma to dot)\n if (s.includes(\",\") && s.includes(\".\")) {\n s = s.replace(/,/g, \"\");\n } else if (s.includes(\",\") && !s.includes(\".\")) {\n s = s.replace(\",\", \".\");\n }\n\n // Validate: digits optionally followed by '.' and more digits\n if (!/^\\d+(\\.\\d+)?$/.test(s)) {\n throw new Error(`Invalid money format: \"${amount}\"`);\n }\n\n const [intPart, fracRaw = \"\"] = s.split(\".\");\n\n // Pad at least 3 fractional digits so we can:\n // - take 2 digits for cents\n // - take the 3rd digit to decide rounding\n const fracPadded = (`${fracRaw}000`);\n\n const tenths = fracPadded[0] ?? \"0\"; // 1st decimal digit\n const hundredths = fracPadded[1] ?? \"0\"; // 2nd decimal digit (cents)\n const thousandths = fracPadded[2] ?? \"0\"; // 3rd decimal digit (rounding decision)\n\n // If there are more than 3 decimals, we track if any non-zero exists after the 3rd.\n // This can matter for policies like bankers rounding; here it's mainly informational.\n const trailing =\n fracRaw.length > THREE_DECIMAL_PLACES\n ? fracRaw.slice(THREE_DECIMAL_PLACES)\n : \"\";\n const hasTrailingNonZero = /[1-9]/.test(trailing);\n\n // Build cents as integer: (dollars * 100) + (first two decimal digits)\n let cents = BigInt(intPart) * CENTS_FACTOR + BigInt(tenths + hundredths);\n\n // Half-up rounding:\n // - If the 3rd digit is >= 5, round up by 1 cent.\n // - If there are more digits beyond the 3rd, \"5xxx\" should also round up.\n const roundUp = thousandths > \"5\" || thousandths === \"5\" || (thousandths === \"5\" && hasTrailingNonZero);\n\n if (roundUp) cents += ONE_CENT;\n\n return Number(cents);\n}\n\n/**\n * Convert an amount in cents to a decimal string (e.g. 1234 -> \"12.34\") safely.\n *\n * Why:\n * - Avoids floating point math (cents / 100) which can lose precision for large integers\n * or if cents is already imprecise as a JS Number.\n *\n * Input:\n * - Accepts: bigint | number | string (digits)\n * - Assumes NON-negative cents (per your requirement).\n *\n * Output:\n * - Always returns a string with exactly 2 decimal places.\n */\nexport function amountFromCents(cents) {\n let c;\n\n // Normalize input to BigInt safely\n if (typeof cents === \"bigint\") {\n c = cents;\n } else if (typeof cents === \"number\") {\n // Ensure it's a safe integer before converting to BigInt\n if (!Number.isSafeInteger(cents)) {\n throw new Error(\"cents must be a safe integer Number (or pass BigInt/string).\");\n }\n c = BigInt(cents);\n } else if (typeof cents === \"string\") {\n const s = cents.trim();\n if (!/^\\d+$/.test(s)) {\n throw new Error(\"cents string must contain digits only (e.g., '1234').\");\n }\n c = BigInt(s);\n } else {\n throw new Error(\"cents must be a bigint, number, or numeric string.\");\n }\n\n if (c < ZERO_INT) {\n throw new Error(\"cents must be non-negative.\");\n }\n\n const amount = c / CENTS_FACTOR;\n const remainder = c % CENTS_FACTOR;\n\n // Always pad remainder to 2 digits\n return `${amount.toString()}.${remainder.toString().padStart(TWO_DECIMAL_PLACES, \"0\")}`;\n}\n\n/**\n * @param cents\n * @param currency\n * @returns {string}\n */\nexport function currencyAmountFromCents(cents, currency = \"USD\") {\n if (typeof cents !== \"number\" || !Number.isInteger(cents)) {\n throw new Error(\"cents must be an integer number\");\n }\n\n const amount = amountFromCents(cents); // \"12.34\"\n const symbol = CURRENCY_SYMBOL[currency] ?? \"$\";\n return `${symbol}${amount}`;\n}\n\n/**\n * Converts a price string into cents.\n * @param {string} priceString - The price (e.g., $0.30).\n * @returns {number} - The amount converted to cents (e.g., 30).\n */\nexport const parsePrice = (priceString) => {\n if (priceString == null) throw new Error(\"priceString is required\");\n\n let s = String(priceString).trim();\n\n // Reject negatives explicitly (per your requirement).\n if (s.includes(\"-\")) throw new Error(\"Negative amounts are not allowed\");\n\n // Keep only digits and separators. Remove currency symbols/letters/spaces.\n s = s.replace(/[^\\d.,]/g, \"\");\n if (!s) throw new Error(`Invalid price: \"${priceString}\"`);\n\n // Delegate exact cents conversion (no floats)\n return amountToCents(s); // <- your safe BigInt cents converter\n};\n\n/**\n * Formats a discount value in BPS or CENTS to string.\n * @param {number} amount - The discount in BPS or CENTS(e.g., 300 = 3%).\n * @param {string} type - The discount type: \"Amount\" or \"Rate\".\n * @returns {string} - The discount converted to string (e.g., $5).\n */\nexport const formatDiscount = (amount, type) => {\n if (type === DISCOUNT_TYPES.AMOUNT) return currencyAmountFromCents(amount);\n if (type === DISCOUNT_TYPES.RATE) return `${amount / BPS}%`; // transform from bps to percentage\n return \"\";\n};","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@mui/icons-material/Delete\");","module.exports = require(\"@mui/material\");","module.exports = require(\"@mui/material/Box\");","module.exports = require(\"@mui/material/IconButton\");","module.exports = require(\"@mui/material/Paper\");","module.exports = require(\"@mui/material/Table\");","module.exports = require(\"@mui/material/TableBody\");","module.exports = require(\"@mui/material/TableCell\");","module.exports = require(\"@mui/material/TableContainer\");","module.exports = require(\"@mui/material/TableHead\");","module.exports = require(\"@mui/material/TableRow\");","module.exports = require(\"@mui/material/Typography\");","module.exports = require(\"i18n-react\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"react\");","// 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](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/ArrowBack\");","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport {\n FeeRow,\n NotesRow,\n PaymentRow,\n RefundRow,\n DiscountRow,\n TotalRow\n} from \"../table/extra-rows\";\nimport IconButton from \"@mui/material/IconButton\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport ArrowBackIcon from \"@mui/icons-material/ArrowBack\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Table from \"@mui/material/Table\";\nimport TableHead from \"@mui/material/TableHead\";\nimport { currencyAmountFromCents } from \"../../../utils/money\";\nimport { SPONSOR_FORMS_METAFIELD_CLASS } from \"../../../utils/constants\";\n\nconst mapOrderData = (forms) => {\n if (!forms) return [];\n\n return forms.map((form) => ({\n ...form,\n items: form.items\n .filter((it) => it.quantity)\n .map((it) => {\n const formMetaFields = it.meta_fields.filter(\n (mf) => mf.class_field === SPONSOR_FORMS_METAFIELD_CLASS.FORM\n );\n\n const itemDetails = [it.type?.name];\n\n // item details\n itemDetails.push(\n ...formMetaFields.map((mf) => {\n const val =\n mf.values?.length > 0\n ? mf.values.find((v) => v.id === mf.current_value)?.name\n : mf.current_value;\n return (\n <div key={`mf-list-${it.id}-${mf.id}`}>\n {mf.name}: {val}\n </div>\n );\n })\n );\n\n itemDetails.push(<br key={`mf-list-${it.id}-spacer`} />); // spacer\n itemDetails.push(\n <div key={`mf-list-${it.id}-total`}>\n {T.translate(\"sponsor_order_grid.total\")}: {it.quantity}\n </div>\n );\n\n const amount = currencyAmountFromCents(it.amount || 0);\n const lineId = it.line_id;\n const cancelled = !!it.canceled_by_id;\n const rate = currencyAmountFromCents(it.current_rate || 0);\n\n return {\n id: lineId,\n code: form.code,\n name: form.name,\n rate,\n addon_name: form.addon_name,\n item_name: itemDetails,\n amount,\n cancelled\n };\n })\n }));\n};\n\nconst SponsorOrderGrid = ({\n lines,\n notes,\n payments,\n refunds,\n fees,\n total,\n amountDue,\n withDescription = false,\n onCancelForm,\n onUndoCancelForm\n}) => {\n const data = mapOrderData(lines, withDescription);\n const showActionCol = onCancelForm && onUndoCancelForm;\n const trailingCols = showActionCol ? 1 : 0;\n\n const columns = [\n {\n columnKey: \"code\",\n header: T.translate(\"sponsor_order_grid.code\")\n },\n {\n columnKey: \"name\",\n header: T.translate(\"sponsor_order_grid.contents\")\n },\n {\n columnKey: \"addon_name\",\n header: T.translate(\"sponsor_order_grid.addon\")\n },\n {\n columnKey: \"item_name\",\n header: T.translate(\"sponsor_order_grid.details\")\n },\n {\n columnKey: \"rate\",\n header: T.translate(\"sponsor_order_grid.rate\")\n },\n {\n columnKey: \"amount\",\n header: T.translate(\"sponsor_order_grid.amount\")\n }\n ];\n\n if (showActionCol) {\n columns.push({\n columnKey: \"actions\",\n header: T.translate(\"sponsor_order_grid.action\"),\n align: \"center\",\n render: (row) => {\n if (row.cancelled) {\n return (\n <IconButton size=\"large\" onClick={() => onUndoCancelForm(row)}>\n <ArrowBackIcon fontSize=\"large\" sx={{ mr: 2 }} />{\" \"}\n {T.translate(\"general.undo\").toUpperCase()}\n </IconButton>\n );\n }\n\n return (\n <IconButton size=\"large\" onClick={() => onCancelForm(row)}>\n <DeleteIcon fontSize=\"large\" />\n </IconButton>\n );\n }\n });\n }\n\n return (\n <Box sx={{ width: \"100%\" }}>\n <Paper elevation={0} sx={{ width: \"100%\", mb: 2 }}>\n <TableContainer\n component={Paper}\n sx={{ borderRadius: 0, boxShadow: \"none\" }}\n >\n <Table>\n {/* TABLE HEADER */}\n <TableHead sx={{ backgroundColor: \"#EAEAEA\" }}>\n <TableRow>\n {columns.map((col) => (\n <TableCell key={col.columnKey} align={col.align ?? \"left\"}>\n {col.header}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {data.map((form) => {\n const rows = form.items.map((row) => (\n <TableRow\n key={row.id}\n sx={{\n ...(row.cancelled && {\n color: \"text.secondary\",\n textDecoration: \"line-through\"\n })\n }}\n >\n {columns.map((col) => (\n <TableCell\n key={col.columnKey}\n align={col.align ?? \"left\"}\n sx={{ fontWeight: \"normal\" }}\n >\n {col.render ? (\n col.render(row)\n ) : (\n <span style={{ fontWeight: \"normal\" }}>\n {row[col.columnKey]}\n </span>\n )}\n </TableCell>\n ))}\n </TableRow>\n ));\n\n rows.push(\n <DiscountRow\n key={`discount-row-${form.id}`}\n discount={form.discount}\n discountTotal={form.discount_total}\n trailing={trailingCols}\n />\n );\n\n return rows;\n })}\n {fees &&\n fees.map((fee) => (\n <FeeRow fee={fee} key={`fee-row-${fee.id}`} trailing={1} />\n ))}\n {refunds &&\n refunds.map((refund) => (\n <RefundRow\n refund={refund}\n key={`refund-row-${refund.id}`}\n trailing={trailingCols}\n />\n ))}\n {payments &&\n payments.map((payment) => (\n <PaymentRow\n payment={payment}\n key={`payment-row-${payment.id}`}\n trailing={trailingCols}\n />\n ))}\n {notes &&\n notes.map((note) => (\n <NotesRow\n note={note.content}\n colCount={columns.length}\n key={`note-row-${note.id}`}\n showCode\n />\n ))}\n <TotalRow\n columns={columns}\n total={total || amountDue}\n label={\n amountDue\n ? T.translate(\"sponsor_order_grid.amount_due\")\n : null\n }\n targetCol=\"amount\"\n rowSx={{ backgroundColor: \"#F1F3F5\" }}\n />\n\n {data.length === 0 && (\n <TableRow>\n <TableCell colSpan={columns.length} align=\"center\">\n {T.translate(\"mui_table.no_items\")}\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n </Table>\n </TableContainer>\n </Paper>\n </Box>\n );\n};\n\nexport default SponsorOrderGrid;\n"],"names":["root","factory","exports","module","define","amd","this","TotalRow","columns","targetCol","total","trailing","label","rowSx","totalLabel","T","React","TableRow","sx","map","col","i","TableCell","key","columnKey","fontWeight","textTransform","Array","_","width","NotesRow","colCount","note","showCode","colSpan","Typography","variant","color","FeeRow","fee","colGap","title","currencyAmountFromCents","amount","PaymentRow","payment","backgroundColor","method","moment","created","MILLISECONDS_IN_SECOND","format","DATETIME_FORMAT","RefundRow","refund","reason","status","DiscountRow","discount","discountTotal","CENTS_FACTOR","TWO_DECIMAL_PLACES","ZERO_INT","SPONSOR_FORMS_METAFIELD_CLASS","FORM","ITEM","CURRENCY_SYMBOL","USD","EUR","GBP","CAD","AUD","NZD","CHF","ARS","BRL","MXN","cents","currency","Number","isInteger","Error","c","isSafeInteger","BigInt","s","trim","test","remainder","toString","padStart","amountFromCents","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","SponsorOrderGrid","lines","notes","payments","refunds","fees","amountDue","withDescription","onCancelForm","onUndoCancelForm","data","forms","form","_objectSpread","items","filter","it","quantity","_it$type","formMetaFields","meta_fields","mf","class_field","itemDetails","type","name","push","_mf$values","_mf$values$find","val","values","length","find","v","id","current_value","lineId","line_id","cancelled","canceled_by_id","rate","current_rate","code","addon_name","item_name","mapOrderData","showActionCol","trailingCols","header","align","render","row","IconButton","size","onClick","ArrowBackIcon","fontSize","mr","toUpperCase","DeleteIcon","Box","Paper","elevation","mb","TableContainer","component","borderRadius","boxShadow","Table","TableHead","TableBody","rows","textDecoration","style","discount_total","content"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/mui/sponsor-order-grid.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,+NCST,MA6BA,EA7BiBC,EAAGC,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BkJ,EAAIvJ,EAAII,kBAiBrB,OATAuK,EAAK5C,KACHnI,IAAAA,cAACyC,EAAAA,YAAW,CACVlC,IAAK,gBAAgB8G,EAAKsB,KAC1BjG,SAAU2E,EAAK3E,SACfC,cAAe0E,EAAK6D,eACpBvL,SAAU4J,KAIPwB,CAAI,IAEZnE,GACCA,EAAKzG,KAAKoB,GACRvB,IAAAA,cAACsB,EAAAA,OAAM,CAACC,IAAKA,EAAKhB,IAAK,WAAWgB,EAAIoH,KAAMhJ,SAAU,MAEzDgH,GACCA,EAAQxG,KAAKmC,GACXtC,IAAAA,cAACqC,EAAAA,UAAS,CACRC,OAAQA,EACR/B,IAAK,cAAc+B,EAAOqG,KAC1BhJ,SAAU4J,MAGf7C,GACCA,EAASvG,KAAK0B,GACZ7B,IAAAA,cAAC4B,EAAAA,WAAU,CACTC,QAASA,EACTtB,IAAK,eAAesB,EAAQ8G,KAC5BhJ,SAAU4J,MAGf9C,GACCA,EAAMtG,KAAKa,GACThB,IAAAA,cAACc,EAAAA,SAAQ,CACPE,KAAMA,EAAKmK,QACXpK,SAAUvB,EAAQgJ,OAClBjI,IAAK,YAAYS,EAAK2H,KACtB1H,UAAQ,MAGdjB,IAAAA,cAACT,EAAAA,SAAQ,CACPC,QAASA,EACTE,MAAOA,GAASmH,EAChBjH,MACEiH,EACI9G,IAAAA,UAAY,iCACZ,KAENN,UAAU,SACVI,MAAO,CAACiC,gBAAiB,aAGV,IAAhBmF,EAAKuB,QACJxI,IAAAA,cAACC,IAAQ,KACPD,IAAAA,cAACM,IAAS,CAACY,QAAS1B,EAAQgJ,OAAQiB,MAAM,UACvC1J,IAAAA,UAAY,4BAQvB,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/TotalRow.jsx","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/NotesRow.jsx","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/FeeRow.jsx","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/PaymentRow.jsx","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/RefundRow.jsx","webpack://openstack-uicore-foundation/./src/components/mui/table/extra-rows/DiscountRow.jsx","webpack://openstack-uicore-foundation/./src/utils/constants.js","webpack://openstack-uicore-foundation/./src/utils/money.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Delete\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Box\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/IconButton\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Paper\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Table\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableBody\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableCell\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableContainer\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableHead\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableRow\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Typography\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/ArrowBack\"","webpack://openstack-uicore-foundation/./src/components/mui/SponsorOrderGrid/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport T from \"i18n-react/dist/i18n-react\";\n\nconst TotalRow = ({ columns, targetCol, total, trailing = 0, label = null, rowSx = {} }) => {\n\n const totalLabel = label || T.translate(\"mui_table.total\");\n\n return (\n <TableRow sx={rowSx}>\n {columns.map((col, i) => {\n if (i === 0)\n return (\n <TableCell key={col.columnKey} sx={{ fontWeight: 800, textTransform: \"uppercase\" }}>\n {totalLabel}\n </TableCell>\n );\n if (col.columnKey === targetCol)\n return (\n <TableCell key={col.columnKey} sx={{ fontWeight: 800 }}>\n {total}\n </TableCell>\n );\n return <TableCell key={col.columnKey} />;\n })}\n {[...Array(trailing)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`extra-row-total-${i}`} sx={{ width: 40 }} />\n ))}\n </TableRow>\n );\n};\n\nexport default TotalRow;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport * as React from \"react\";\nimport { Typography } from \"@mui/material\";\nimport T from \"i18n-react\";\n\nconst NotesRow = ({ colCount, note, showCode = false }) => {\n const colSpan = showCode ? colCount - 1 : colCount;\n return (\n <TableRow>\n {showCode && (\n <TableCell>{T.translate(\"mui_table.note\")}</TableCell>\n )}\n <TableCell sx={{fontWeight: 800}} colSpan={colSpan}>\n <Typography variant=\"body2\" sx={{color: \"text.secondary\"}}>\n {note}\n </Typography>\n </TableCell>\n </TableRow>\n );\n}\n\nexport default NotesRow;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Typography from \"@mui/material/Typography\";\nimport { currencyAmountFromCents } from \"../../../../utils/money\";\n\nconst FeeRow = ({ fee, colGap = 3, trailing = 0 }) => {\n if (!fee) return null;\n\n return (\n <TableRow>\n <TableCell>{T.translate(\"mui_table.payfee\")}</TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ fontWeight: 500 }}>\n {fee.title}\n </Typography>\n </TableCell>\n {[...Array(colGap)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`fee-col-gap-${i}`} />\n ))}\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"success.main\", fontWeight: 500 }}\n >\n {currencyAmountFromCents(fee.amount)}\n </Typography>\n </TableCell>\n {[...Array(trailing)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`fee-trailing-col-${i}`} sx={{ width: 40 }} />\n ))}\n </TableRow>\n );\n};\n\nexport default FeeRow;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport moment from \"moment-timezone\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Typography from \"@mui/material/Typography\";\nimport { currencyAmountFromCents } from \"../../../../utils/money\";\nimport { DATETIME_FORMAT, MILLISECONDS_IN_SECOND } from \"../../../../utils/constants\";\n\nconst PaymentRow = ({ payment, colGap = 1, trailing = 0 }) => {\n\n if (!payment) return null;\n\n return (\n <TableRow sx={{backgroundColor: \"#2E7D3214\"}}>\n <TableCell>{T.translate(\"mui_table.pay\")}</TableCell>\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"success.main\", fontWeight: 500 }}\n >\n {T.translate(\"mui_table.payment\")}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ color: \"text.secondary\" }}>\n {T.translate(\"mui_table.paid_via\")} {payment.method}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ color: \"text.secondary\" }}>\n {moment(payment.created * MILLISECONDS_IN_SECOND).format(DATETIME_FORMAT)}\n </Typography>\n </TableCell>\n {[...Array(colGap)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`pay-col-gap-${i}`} />\n ))}\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"success.main\", fontWeight: 500 }}\n >\n -{currencyAmountFromCents(payment.amount)}\n </Typography>\n </TableCell>\n {[...Array(trailing)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`pay-trailing-col-${i}`} sx={{ width: 40 }} />\n ))}\n </TableRow>\n );\n};\n\nexport default PaymentRow;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Typography from \"@mui/material/Typography\";\nimport { currencyAmountFromCents } from \"../../../../utils/money\";\n\nconst RefundRow = ({ refund, colGap = 1, trailing = 0 }) => {\n\n if (!refund) return null;\n\n return (\n <TableRow sx={{ backgroundColor: \"#EF6C0014\" }}>\n <TableCell>{T.translate(\"mui_table.ref\")}</TableCell>\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"warning.main\", fontWeight: 500 }}\n >\n {T.translate(\"mui_table.refund\")}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ color: \"text.secondary\" }}>\n {refund.reason}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography variant=\"body2\" sx={{ color: \"text.secondary\" }}>\n {refund.status}\n </Typography>\n </TableCell>\n {[...Array(colGap)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`ref-col-gap-${i}`} />\n ))}\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"warning.main\", fontWeight: 500 }}\n >\n -{currencyAmountFromCents(refund.amount)}\n </Typography>\n </TableCell>\n {[...Array(trailing)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`ref-trailing-col-${i}`} sx={{ width: 40 }} />\n ))}\n </TableRow>\n );\n};\n\nexport default RefundRow;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Typography from \"@mui/material/Typography\";\nimport { currencyAmountFromCents } from \"../../../../utils/money\";\n\n\nconst DiscountRow = ({ discount, discountTotal, colGap = 2, trailing = 0 }) => {\n\n if (discountTotal === 0) return null;\n\n return (\n <TableRow sx={{backgroundColor: \"#2E7D3214\"}}>\n <TableCell>{T.translate(\"mui_table.dis\")}</TableCell>\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"success.main\", fontWeight: 500 }}\n >\n {T.translate(\"mui_table.discount\")}\n </Typography>\n </TableCell>\n {[...Array(colGap)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`pay-col-gap-${i}`} />\n ))}\n <TableCell>\n <Typography variant=\"body2\" sx={{ color: \"text.secondary\" }}>\n {discount}\n </Typography>\n </TableCell>\n <TableCell>\n <Typography\n variant=\"body2\"\n sx={{ color: \"success.main\", fontWeight: 500 }}\n >\n -{currencyAmountFromCents(discountTotal)}\n </Typography>\n </TableCell>\n {[...Array(trailing)].map((_, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <TableCell key={`pay-trailing-col-${i}`} sx={{ width: 40 }} />\n ))}\n </TableRow>\n );\n};\n\nexport default DiscountRow;\n","export const CENTS_FACTOR = 100n;\nexport const TWO_DECIMAL_PLACES = 2;\nexport const THREE_DECIMAL_PLACES = 3;\nexport const ONE_CENT = 1n;\nexport const ZERO_INT = 0;\nexport const BPS = 100;\n\nexport const CODE_200 = 200;\n\nexport const DEBOUNCE_WAIT_250 = 250;\nexport const DEBOUNCE_WAIT = 500;\n\nexport const NOTIFICATION_TIMEOUT = 2000;\nexport const DEFAULT_PER_PAGE = 10;\nexport const TWENTY_PER_PAGE = 20;\nexport const FIFTY_PER_PAGE = 50;\nexport const MAX_PER_PAGE = 100;\n\nexport const INT_BASE = 10;\n\nexport const ONE_HUNDRED = 100;\nexport const MILLISECONDS_IN_SECOND = 1000;\n\nexport const MILLISECONDS_TO_SECONDS = 1000;\n\nexport const BYTES_PER_MB = 1_048_576; // 1024 * 1024\n\nexport const MAX_INVENTORY_IMAGE_UPLOAD_SIZE = 512000;\nexport const MAX_INVENTORY_IMAGES_UPLOAD_QTY = 5;\nexport const ALLOWED_INVENTORY_IMAGE_FORMATS = [\"jpg\", \"jpeg\", \"png\"];\n\nexport const METAFIELD_TYPES_WITH_OPTIONS = [\n \"CheckBoxList\",\n \"ComboBox\",\n \"RadioButtonList\"\n];\n\nexport const METAFIELD_TYPES = [\n \"CheckBox\",\n ...METAFIELD_TYPES_WITH_OPTIONS,\n \"Text\",\n \"TextArea\",\n \"Quantity\",\n \"DateTime\",\n \"Time\"\n];\n\nexport const DISCOUNT_TYPES = {\n AMOUNT: \"Amount\",\n RATE: \"Rate\"\n};\n\nexport const RATE_FIELDS = {\n EARLY_BIRD: \"early_bird_rate\",\n STANDARD: \"standard_rate\",\n ONSITE: \"onsite_rate\"\n};\n\nexport const DECIMAL_DIGITS = 2;\n\nexport const FILE_UPLOAD_STATUS = {\n PENDING: \"PENDING\",\n DEADLINE_ALERT: \"DEADLINE ALERT\",\n DEADLINE_MISSED: \"DEADLINE MISSED\",\n COMPLETE: \"COMPLETE\"\n};\n\nexport const FILE_UPLOAD_STATUS_COLOR = {\n [FILE_UPLOAD_STATUS.COMPLETE]: \"success.light\",\n [FILE_UPLOAD_STATUS.DEADLINE_MISSED]: \"error\",\n [FILE_UPLOAD_STATUS.DEADLINE_ALERT]: \"warning.light\",\n [FILE_UPLOAD_STATUS.PENDING]: \"default\"\n};\n\nexport const FILE_UPLOAD_STATUS_BKGR_COLOR = {\n [FILE_UPLOAD_STATUS.COMPLETE]: \"white\",\n [FILE_UPLOAD_STATUS.DEADLINE_MISSED]: \"#D32F2F0A\",\n [FILE_UPLOAD_STATUS.DEADLINE_ALERT]: \"#EF6C000A\",\n [FILE_UPLOAD_STATUS.PENDING]: \"white\"\n};\n\nexport const DATE_FORMAT = \"MM/DD/YYYY\";\nexport const DATETIME_FORMAT = \"MM/DD/YYYY hh:mm a\";\n\nexport const SPONSOR_FORMS_METAFIELD_CLASS = {\n FORM: \"Form\",\n ITEM: \"Item\"\n};","/**\n * Copyright 2025 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport {\n BPS,\n CENTS_FACTOR,\n DISCOUNT_TYPES,\n ONE_CENT,\n THREE_DECIMAL_PLACES,\n TWO_DECIMAL_PLACES,\n ZERO_INT\n} from \"./constants\";\n\nconst CURRENCY_SYMBOL = {\n USD: \"$\",\n EUR: \"€\",\n GBP: \"£\",\n CAD: \"C$\",\n AUD: \"A$\",\n NZD: \"NZ$\",\n CHF: \"CHF\",\n ARS: \"AR$\",\n BRL: \"R$\",\n MXN: \"MX$\",\n};\n\n/**\n * Convert a decimal money amount to integer cents safely (no floating point math).\n *\n * Why this exists:\n * - `Math.round(parseFloat(x) * 100)` can be wrong due to IEEE-754 floating point errors\n * (e.g. 1.005 * 100 may become 100.499999..., rounding down unexpectedly).\n *\n * Input:\n * - number or string (recommended: string from API/UI)\n * - Examples: \"12.34\", \"1,234.56\", \"1234,56\", 12.34\n *\n * Output:\n * - Number cents (exact), e.g. \"12.34\" -> 1234\n *\n * Rounding:\n * - Half-up to 2 decimals (>= 0.005 USD rounds up by 1 cent).\n *\n * Notes:\n * - Amounts are assumed to be NON-negative (per your requirement).\n * - Throws on invalid formats (does not silently return 0).\n */\nexport function amountToCents(amount) {\n if (amount == null) throw new Error(\"amount is required\");\n\n let s = String(amount).trim();\n\n // Normalize common separators:\n // - \"1,234.56\" => \"1234.56\" (remove thousands separators)\n // - \"1234,56\" => \"1234.56\" (convert decimal comma to dot)\n if (s.includes(\",\") && s.includes(\".\")) {\n s = s.replace(/,/g, \"\");\n } else if (s.includes(\",\") && !s.includes(\".\")) {\n s = s.replace(\",\", \".\");\n }\n\n // Validate: digits optionally followed by '.' and more digits\n if (!/^\\d+(\\.\\d+)?$/.test(s)) {\n throw new Error(`Invalid money format: \"${amount}\"`);\n }\n\n const [intPart, fracRaw = \"\"] = s.split(\".\");\n\n // Pad at least 3 fractional digits so we can:\n // - take 2 digits for cents\n // - take the 3rd digit to decide rounding\n const fracPadded = (`${fracRaw}000`);\n\n const tenths = fracPadded[0] ?? \"0\"; // 1st decimal digit\n const hundredths = fracPadded[1] ?? \"0\"; // 2nd decimal digit (cents)\n const thousandths = fracPadded[2] ?? \"0\"; // 3rd decimal digit (rounding decision)\n\n // If there are more than 3 decimals, we track if any non-zero exists after the 3rd.\n // This can matter for policies like bankers rounding; here it's mainly informational.\n const trailing =\n fracRaw.length > THREE_DECIMAL_PLACES\n ? fracRaw.slice(THREE_DECIMAL_PLACES)\n : \"\";\n const hasTrailingNonZero = /[1-9]/.test(trailing);\n\n // Build cents as integer: (dollars * 100) + (first two decimal digits)\n let cents = BigInt(intPart) * CENTS_FACTOR + BigInt(tenths + hundredths);\n\n // Half-up rounding:\n // - If the 3rd digit is >= 5, round up by 1 cent.\n // - If there are more digits beyond the 3rd, \"5xxx\" should also round up.\n const roundUp = thousandths > \"5\" || thousandths === \"5\" || (thousandths === \"5\" && hasTrailingNonZero);\n\n if (roundUp) cents += ONE_CENT;\n\n return Number(cents);\n}\n\n/**\n * Convert an amount in cents to a decimal string (e.g. 1234 -> \"12.34\") safely.\n *\n * Why:\n * - Avoids floating point math (cents / 100) which can lose precision for large integers\n * or if cents is already imprecise as a JS Number.\n *\n * Input:\n * - Accepts: bigint | number | string (digits)\n * - Assumes NON-negative cents (per your requirement).\n *\n * Output:\n * - Always returns a string with exactly 2 decimal places.\n */\nexport function amountFromCents(cents) {\n let c;\n\n // Normalize input to BigInt safely\n if (typeof cents === \"bigint\") {\n c = cents;\n } else if (typeof cents === \"number\") {\n // Ensure it's a safe integer before converting to BigInt\n if (!Number.isSafeInteger(cents)) {\n throw new Error(\"cents must be a safe integer Number (or pass BigInt/string).\");\n }\n c = BigInt(cents);\n } else if (typeof cents === \"string\") {\n const s = cents.trim();\n if (!/^\\d+$/.test(s)) {\n throw new Error(\"cents string must contain digits only (e.g., '1234').\");\n }\n c = BigInt(s);\n } else {\n throw new Error(\"cents must be a bigint, number, or numeric string.\");\n }\n\n if (c < ZERO_INT) {\n throw new Error(\"cents must be non-negative.\");\n }\n\n const amount = c / CENTS_FACTOR;\n const remainder = c % CENTS_FACTOR;\n\n // Always pad remainder to 2 digits\n return `${amount.toString()}.${remainder.toString().padStart(TWO_DECIMAL_PLACES, \"0\")}`;\n}\n\n/**\n * @param cents\n * @param currency\n * @returns {string}\n */\nexport function currencyAmountFromCents(cents, currency = \"USD\") {\n if (typeof cents !== \"number\" || !Number.isInteger(cents)) {\n throw new Error(\"cents must be an integer number\");\n }\n\n const amount = amountFromCents(cents); // \"12.34\"\n const symbol = CURRENCY_SYMBOL[currency] ?? \"$\";\n return `${symbol}${amount}`;\n}\n\n/**\n * Converts a price string into cents.\n * @param {string} priceString - The price (e.g., $0.30).\n * @returns {number} - The amount converted to cents (e.g., 30).\n */\nexport const parsePrice = (priceString) => {\n if (priceString == null) throw new Error(\"priceString is required\");\n\n let s = String(priceString).trim();\n\n // Reject negatives explicitly (per your requirement).\n if (s.includes(\"-\")) throw new Error(\"Negative amounts are not allowed\");\n\n // Keep only digits and separators. Remove currency symbols/letters/spaces.\n s = s.replace(/[^\\d.,]/g, \"\");\n if (!s) throw new Error(`Invalid price: \"${priceString}\"`);\n\n // Delegate exact cents conversion (no floats)\n return amountToCents(s); // <- your safe BigInt cents converter\n};\n\n/**\n * Formats a discount value in BPS or CENTS to string.\n * @param {number} amount - The discount in BPS or CENTS(e.g., 300 = 3%).\n * @param {string} type - The discount type: \"Amount\" or \"Rate\".\n * @returns {string} - The discount converted to string (e.g., $5).\n */\nexport const formatDiscount = (amount, type) => {\n if (type === DISCOUNT_TYPES.AMOUNT) return currencyAmountFromCents(amount);\n if (type === DISCOUNT_TYPES.RATE) return `${amount / BPS}%`; // transform from bps to percentage\n return \"\";\n};","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@mui/icons-material/Delete\");","module.exports = require(\"@mui/material\");","module.exports = require(\"@mui/material/Box\");","module.exports = require(\"@mui/material/IconButton\");","module.exports = require(\"@mui/material/Paper\");","module.exports = require(\"@mui/material/Table\");","module.exports = require(\"@mui/material/TableBody\");","module.exports = require(\"@mui/material/TableCell\");","module.exports = require(\"@mui/material/TableContainer\");","module.exports = require(\"@mui/material/TableHead\");","module.exports = require(\"@mui/material/TableRow\");","module.exports = require(\"@mui/material/Typography\");","module.exports = require(\"i18n-react\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"react\");","// 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](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/ArrowBack\");","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport {DiscountRow, FeeRow, NotesRow, PaymentRow, RefundRow, TotalRow} from \"../table/extra-rows\";\nimport IconButton from \"@mui/material/IconButton\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport ArrowBackIcon from \"@mui/icons-material/ArrowBack\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Table from \"@mui/material/Table\";\nimport TableHead from \"@mui/material/TableHead\";\nimport {currencyAmountFromCents} from \"../../../utils/money\";\nimport {SPONSOR_FORMS_METAFIELD_CLASS} from \"../../../utils/constants\";\n\nconst mapOrderData = (forms, showItemDescription) => {\n if (!forms) return [];\n\n return forms.map((form) => ({\n ...form,\n items: form.items\n .filter((it) => it.quantity)\n .map((it) => {\n const formMetaFields = it.meta_fields.filter(\n (mf) => mf.class_field === SPONSOR_FORMS_METAFIELD_CLASS.FORM\n );\n\n const itemDetails = [it.type?.name];\n\n // item details\n if (showItemDescription) {\n itemDetails.push(\n ...formMetaFields.map((mf) => {\n const val =\n mf.values?.length > 0\n ? mf.values.find((v) => v.id === mf.current_value)?.name\n : mf.current_value;\n return (\n <div key={`mf-list-${it.id}-${mf.id}`}>\n {mf.name}: {val}\n </div>\n );\n })\n );\n\n itemDetails.push(<br key={`mf-list-${it.id}-spacer`}/>); // spacer\n itemDetails.push(\n <div key={`mf-list-${it.id}-total`}>\n {T.translate(\"sponsor_order_grid.total\")}: {it.quantity}\n </div>\n );\n }\n\n const amount = currencyAmountFromCents(it.amount || 0);\n const lineId = it.line_id;\n const cancelled = !!it.canceled_by_id;\n const rate = currencyAmountFromCents(it.current_rate || 0);\n\n return {\n id: lineId,\n code: form.code,\n name: form.name,\n rate,\n addon_name: form.addon_name,\n item_name: itemDetails,\n amount,\n cancelled\n };\n })\n }));\n};\n\nconst SponsorOrderGrid = ({\n lines,\n notes,\n payments,\n refunds,\n fees,\n total,\n amountDue,\n withDescription = false,\n onCancelForm,\n onUndoCancelForm\n }) => {\n const data = mapOrderData(lines, withDescription);\n const showActionCol = onCancelForm && onUndoCancelForm;\n const trailingCols = showActionCol ? 1 : 0;\n\n const columns = [\n {\n columnKey: \"code\",\n header: T.translate(\"sponsor_order_grid.code\")\n },\n {\n columnKey: \"name\",\n header: T.translate(\"sponsor_order_grid.contents\")\n },\n {\n columnKey: \"addon_name\",\n header: T.translate(\"sponsor_order_grid.addon\")\n },\n {\n columnKey: \"item_name\",\n header: T.translate(\"sponsor_order_grid.details\")\n },\n {\n columnKey: \"rate\",\n header: T.translate(\"sponsor_order_grid.rate\")\n },\n {\n columnKey: \"amount\",\n header: T.translate(\"sponsor_order_grid.amount\")\n }\n ];\n\n if (showActionCol) {\n columns.push({\n columnKey: \"actions\",\n header: T.translate(\"sponsor_order_grid.action\"),\n align: \"center\",\n render: (row) => {\n if (row.cancelled) {\n return (\n <IconButton size=\"large\" onClick={() => onUndoCancelForm(row)}>\n <ArrowBackIcon fontSize=\"large\" sx={{mr: 2}}/>{\" \"}\n {T.translate(\"general.undo\").toUpperCase()}\n </IconButton>\n );\n }\n\n return (\n <IconButton size=\"large\" onClick={() => onCancelForm(row)}>\n <DeleteIcon fontSize=\"large\"/>\n </IconButton>\n );\n }\n });\n }\n\n return (\n <Box sx={{width: \"100%\"}}>\n <Paper elevation={0} sx={{width: \"100%\", mb: 2}}>\n <TableContainer\n component={Paper}\n sx={{borderRadius: 0, boxShadow: \"none\"}}\n >\n <Table>\n {/* TABLE HEADER */}\n <TableHead sx={{backgroundColor: \"#EAEAEA\"}}>\n <TableRow>\n {columns.map((col) => (\n <TableCell key={col.columnKey} align={col.align ?? \"left\"}>\n {col.header}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {data.map((form) => {\n const rows = form.items.map((row) => (\n <TableRow\n key={row.id}\n sx={{\n ...(row.cancelled && {\n color: \"text.secondary\",\n textDecoration: \"line-through\"\n })\n }}\n >\n {columns.map((col) => (\n <TableCell\n key={col.columnKey}\n align={col.align ?? \"left\"}\n sx={{fontWeight: \"normal\"}}\n >\n {col.render ? (\n col.render(row)\n ) : (\n <span style={{fontWeight: \"normal\"}}>\n {row[col.columnKey]}\n </span>\n )}\n </TableCell>\n ))}\n </TableRow>\n ));\n\n rows.push(\n <DiscountRow\n key={`discount-row-${form.id}`}\n discount={form.discount}\n discountTotal={form.discount_total}\n trailing={trailingCols}\n />\n );\n\n return rows;\n })}\n {fees &&\n fees.map((fee) => (\n <FeeRow fee={fee} key={`fee-row-${fee.id}`} trailing={1}/>\n ))}\n {refunds &&\n refunds.map((refund) => (\n <RefundRow\n refund={refund}\n key={`refund-row-${refund.id}`}\n trailing={trailingCols}\n />\n ))}\n {payments &&\n payments.map((payment) => (\n <PaymentRow\n payment={payment}\n key={`payment-row-${payment.id}`}\n trailing={trailingCols}\n />\n ))}\n {notes &&\n notes.map((note) => (\n <NotesRow\n note={note.content}\n colCount={columns.length}\n key={`note-row-${note.id}`}\n showCode\n />\n ))}\n <TotalRow\n columns={columns}\n total={total || amountDue}\n label={\n amountDue\n ? T.translate(\"sponsor_order_grid.amount_due\")\n : null\n }\n targetCol=\"amount\"\n rowSx={{backgroundColor: \"#F1F3F5\"}}\n />\n\n {data.length === 0 && (\n <TableRow>\n <TableCell colSpan={columns.length} align=\"center\">\n {T.translate(\"mui_table.no_items\")}\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n </Table>\n </TableContainer>\n </Paper>\n </Box>\n );\n};\n\nexport default SponsorOrderGrid;\n"],"names":["root","factory","exports","module","define","amd","this","TotalRow","columns","targetCol","total","trailing","label","rowSx","totalLabel","T","React","TableRow","sx","map","col","i","TableCell","key","columnKey","fontWeight","textTransform","Array","_","width","NotesRow","colCount","note","showCode","colSpan","Typography","variant","color","FeeRow","fee","colGap","title","currencyAmountFromCents","amount","PaymentRow","payment","backgroundColor","method","moment","created","MILLISECONDS_IN_SECOND","format","DATETIME_FORMAT","RefundRow","refund","reason","status","DiscountRow","discount","discountTotal","CENTS_FACTOR","TWO_DECIMAL_PLACES","ZERO_INT","SPONSOR_FORMS_METAFIELD_CLASS","FORM","ITEM","CURRENCY_SYMBOL","USD","EUR","GBP","CAD","AUD","NZD","CHF","ARS","BRL","MXN","cents","currency","Number","isInteger","Error","c","isSafeInteger","BigInt","s","trim","test","remainder","toString","padStart","amountFromCents","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","SponsorOrderGrid","lines","notes","payments","refunds","fees","amountDue","withDescription","onCancelForm","onUndoCancelForm","data","mapOrderData","forms","showItemDescription","form","_objectSpread","items","filter","it","quantity","_it$type","formMetaFields","meta_fields","mf","class_field","itemDetails","type","name","push","_mf$values","_mf$values$find","val","values","length","find","v","id","current_value","lineId","line_id","cancelled","canceled_by_id","rate","current_rate","code","addon_name","item_name","showActionCol","trailingCols","header","align","render","row","IconButton","size","onClick","ArrowBackIcon","fontSize","mr","toUpperCase","DeleteIcon","Box","Paper","elevation","mb","TableContainer","component","borderRadius","boxShadow","Table","TableHead","TableBody","rows","textDecoration","style","discount_total","content"],"sourceRoot":""}
|