openstack-uicore-foundation 5.0.48-beta.0 → 5.0.49-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/.github/workflows/build_test.yml +1 -1
  2. package/.github/workflows/jest.yml +1 -1
  3. package/lib/components/clock-context.js.map +1 -1
  4. package/lib/components/clock.js.map +1 -1
  5. package/lib/components/extra-questions-mui.js.map +1 -1
  6. package/lib/components/extra-questions.js.map +1 -1
  7. package/lib/components/free-text-search.js.map +1 -1
  8. package/lib/components/index.js +1 -1
  9. package/lib/components/index.js.map +1 -1
  10. package/lib/components/inputs/access-levels-input.js.map +1 -1
  11. package/lib/components/inputs/attendee-input.js.map +1 -1
  12. package/lib/components/inputs/company-input-v2.js.map +1 -1
  13. package/lib/components/inputs/company-input.js.map +1 -1
  14. package/lib/components/inputs/country-dropdown.js.map +1 -1
  15. package/lib/components/inputs/country-input.js.map +1 -1
  16. package/lib/components/inputs/editor-input-v2.js.map +1 -1
  17. package/lib/components/inputs/event-input.js.map +1 -1
  18. package/lib/components/inputs/group-input.js.map +1 -1
  19. package/lib/components/inputs/language-input.js.map +1 -1
  20. package/lib/components/inputs/member-input.js.map +1 -1
  21. package/lib/components/inputs/organization-input.js.map +1 -1
  22. package/lib/components/inputs/promocode-input.js.map +1 -1
  23. package/lib/components/inputs/registration-company-input.js.map +1 -1
  24. package/lib/components/inputs/speaker-input.js.map +1 -1
  25. package/lib/components/inputs/sponsor-input.js +1 -1
  26. package/lib/components/inputs/sponsor-input.js.map +1 -1
  27. package/lib/components/inputs/summit-input.js.map +1 -1
  28. package/lib/components/inputs/tag-input.js.map +1 -1
  29. package/lib/components/inputs/textarea-input.js +1 -1
  30. package/lib/components/inputs/textarea-input.js.map +1 -1
  31. package/lib/components/inputs/ticket-types-input.js.map +1 -1
  32. package/lib/components/inputs/upload-input-v2.js +1 -1
  33. package/lib/components/inputs/upload-input-v2.js.map +1 -1
  34. package/lib/components/inputs/upload-input-v3.js +1 -1
  35. package/lib/components/inputs/upload-input-v3.js.map +1 -1
  36. package/lib/components/mui/auth-button.js +1 -1
  37. package/lib/components/mui/auth-button.js.map +1 -1
  38. package/lib/components/mui/bulk-edit-table.js +1 -1
  39. package/lib/components/mui/bulk-edit-table.js.map +1 -1
  40. package/lib/components/mui/editable-table.js +1 -1
  41. package/lib/components/mui/editable-table.js.map +1 -1
  42. package/lib/components/mui/form-item-table.js +1 -1
  43. package/lib/components/mui/form-item-table.js.map +1 -1
  44. package/lib/components/mui/formik-inputs/company-input.js.map +1 -1
  45. package/lib/components/mui/formik-inputs/sponsor-input.js.map +1 -1
  46. package/lib/components/mui/formik-inputs/sponsorship-input.js.map +1 -1
  47. package/lib/components/mui/formik-inputs/sponsorship-summit-select.js.map +1 -1
  48. package/lib/components/mui/formik-inputs/summit-addon-select.js +2 -0
  49. package/lib/components/mui/formik-inputs/summit-addon-select.js.map +1 -0
  50. package/lib/components/mui/formik-inputs/upload.js +1 -1
  51. package/lib/components/mui/formik-inputs/upload.js.map +1 -1
  52. package/lib/components/mui/grid-filter.js.map +1 -1
  53. package/lib/components/mui/nav-bar.js +1 -1
  54. package/lib/components/mui/nav-bar.js.map +1 -1
  55. package/lib/components/mui/order-summary.js.map +1 -1
  56. package/lib/components/mui/sortable-table.js +1 -1
  57. package/lib/components/mui/sortable-table.js.map +1 -1
  58. package/lib/components/mui/sponsor-addon-select.js.map +1 -1
  59. package/lib/components/mui/sponsor-order-grid.js +1 -1
  60. package/lib/components/mui/sponsor-order-grid.js.map +1 -1
  61. package/lib/components/mui/stripe-payment.js.map +1 -1
  62. package/lib/components/mui/{addon-type-select.js → summit-addon-select.js} +2 -2
  63. package/lib/components/mui/summit-addon-select.js.map +1 -0
  64. package/lib/components/mui/summits-dropdown.js.map +1 -1
  65. package/lib/components/mui/table/custom-table-pagination.js.map +1 -1
  66. package/lib/components/mui/table/extra-rows.js.map +1 -1
  67. package/lib/components/mui/table.js +1 -1
  68. package/lib/components/mui/table.js.map +1 -1
  69. package/lib/components/mui/upload-dialog.js +1 -1
  70. package/lib/components/mui/upload-dialog.js.map +1 -1
  71. package/lib/components/order-invoice-pdf.js +2 -0
  72. package/lib/components/order-invoice-pdf.js.map +1 -0
  73. package/lib/components/schedule-builder-view.js +1 -1
  74. package/lib/components/schedule-builder-view.js.map +1 -1
  75. package/lib/components/sponsored-project-input.js.map +1 -1
  76. package/lib/components/summit-dropdown.js +1 -1
  77. package/lib/components/summit-dropdown.js.map +1 -1
  78. package/lib/components/table-editable.js +1 -1
  79. package/lib/components/table-editable.js.map +1 -1
  80. package/lib/components/table-selectable.js +1 -1
  81. package/lib/components/table-selectable.js.map +1 -1
  82. package/lib/components/table-sortable.js +1 -1
  83. package/lib/components/table-sortable.js.map +1 -1
  84. package/lib/css/components/extra-questions.css +1 -1
  85. package/lib/css/components/extra-questions.css.map +1 -1
  86. package/lib/css/components/free-text-search.css +1 -1
  87. package/lib/css/components/free-text-search.css.map +1 -1
  88. package/lib/css/components/index.css +2 -3
  89. package/lib/css/components/index.css.map +1 -1
  90. package/lib/css/components/mui/editable-table.css +1 -1
  91. package/lib/css/components/mui/editable-table.css.map +1 -1
  92. package/lib/css/components/mui/sortable-table.css +1 -1
  93. package/lib/css/components/mui/sortable-table.css.map +1 -1
  94. package/lib/css/components/mui/table.css +1 -1
  95. package/lib/css/components/mui/table.css.map +1 -1
  96. package/lib/i18n.js +1 -1
  97. package/lib/i18n.js.map +1 -1
  98. package/lib/security/actions.js +1 -1
  99. package/lib/security/actions.js.map +1 -1
  100. package/lib/utils/actions.js +1 -1
  101. package/lib/utils/actions.js.map +1 -1
  102. package/lib/utils/money.js +1 -1
  103. package/lib/utils/money.js.map +1 -1
  104. package/lib/utils/query-actions.js +1 -1
  105. package/lib/utils/query-actions.js.map +1 -1
  106. package/lib/utils/questions-set.js.map +1 -1
  107. package/lib/utils/theme.js +1 -1
  108. package/lib/utils/theme.js.map +1 -1
  109. package/package.json +11 -12
  110. package/lib/components/mui/addon-type-select.js.map +0 -1
  111. package/lib/components/mui/formik-inputs/addon-type-select.js +0 -2
  112. package/lib/components/mui/formik-inputs/addon-type-select.js.map +0 -1
@@ -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={9299:(e,t,n)=>{var r=n(2015),o=n.n(r),a=n(9825),i=n.n(a),l=n(8619),c=n(8177),s=n.n(c),u=n(1519),m=n.n(u);const p=require("@mui/icons-material/Info");var d=n.n(p);const g=require("@mui/icons-material/Warning");var f=n.n(g);const h={warning:o().createElement(f(),{color:"warning"}),success:o().createElement(s(),{color:"success"}),error:o().createElement(m(),{color:"error"}),info:o().createElement(d(),{color:"info"})},y=({open:e,title:t,text:n,iconType:r="",onConfirm:a,onCancel:i,confirmButtonText:c="Confirm",confirmButtonColor:s="primary",cancelButtonText:u="Cancel",cancelButtonColor:m="primary"})=>o().createElement(l.Dialog,{open:e,onClose:i},o().createElement(l.DialogTitle,{sx:{p:2},component:"div"},o().createElement(l.Typography,{variant:"h5"},t)),o().createElement(l.Divider,null),o().createElement(l.DialogContent,{sx:{p:2}},o().createElement("div",{style:{display:"flex",alignItems:"center"}},h[r]&&o().createElement("div",{style:{marginRight:10}},h[r]),o().createElement(l.Typography,{variant:"body1"},n))),o().createElement(l.Divider,{sx:{margin:"10px 0px 10px 0px"}}),o().createElement(l.DialogActions,null,o().createElement(l.Button,{fullWidth:!0,onClick:i,color:m,variant:"outlined",sx:{whiteSpace:"nowrap",minWidth:100}},u),o().createElement(l.Button,{fullWidth:!0,onClick:a,color:s,variant:"contained",sx:{whiteSpace:"nowrap",minWidth:100}},c)));y.propTypes={open:i().bool,title:i().string.isRequired,text:i().string.isRequired,iconType:i().string,onConfirm:i().func.isRequired,onCancel:i().func.isRequired,confirmButtonText:i().string,confirmButtonColor:i().string,cancelButtonText:i().string,cancelButtonColor:i().string},y.defaultProps={open:!1,iconType:"warning",confirmButtonText:"Confirm",confirmButtonColor:"primary",cancelButtonText:"Cancel",cancelButtonColor:"default"}},6130:(e,t,n)=>{n.d(t,{default:()=>a});n(1116),n(2015),n(9299);const r="__oif_confirm_dialog_bridge__",o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},a=({title:e,text:t,iconType:n="",confirmButtonText:a="Confirm",cancelButtonText:i="Cancel",confirmButtonColor:l="primary",cancelButtonColor:c="primary"})=>{if(!o[r])throw new Error("[openstack-uicore-foundation] showConfirmDialog: <GlobalConfirmDialog /> is not mounted. Add <GlobalConfirmDialog /> to the root of your app.");return o[r]({title:e,text:t,iconType:n,confirmButtonText:a,cancelButtonText:i,confirmButtonColor:l,cancelButtonColor:c})}},5420:(e,t,n)=>{n.d(t,{default:()=>g});var r=n(2015),o=n(6842),a=n.n(o);const i=require("@mui/material/TablePagination");var l=n.n(i),c=n(9825),s=n.n(c),u=n(3209);const m={".MuiTablePagination-toolbar":{alignItems:"baseline",marginTop:"1.6rem"},".MuiTablePagination-selectLabel":{color:"rgba(0, 0, 0, 0.6)",fontSize:"12px",fontWeight:"normal"},".MuiTablePagination-select":{color:"rgba(0, 0, 0, 0.6)",fontSize:"12px",fontWeight:"normal"},".MuiTablePagination-spacer":{display:"none"},".MuiTablePagination-displayedRows":{marginLeft:"auto"}},p=[u.WU,u.k6,u.Lr],d=({totalRows:e,perPage:t,currentPage:n,onPageChange:o,onPerPageChange:i})=>{const c=r.useMemo((()=>i?p.includes(t)?p:[...p,t].sort(((e,t)=>e-t)):[t]),[t,i]);return r.createElement(l(),{component:"div",count:e??0,rowsPerPageOptions:c,rowsPerPage:t,page:n-1,onPageChange:(e,t)=>{o(t+1)},onRowsPerPageChange:i?e=>{i(parseInt(e.target.value,10))}:void 0,labelRowsPerPage:a().translate("mui_table.rows_per_page"),sx:m})};d.propTypes={totalRows:s().number,perPage:s().number.isRequired,currentPage:s().number.isRequired,onPageChange:s().func.isRequired,onPerPageChange:s().func};const g=d},9207:(e,t,n)=>{n.d(t,{A:()=>p});var r=n(2015),o=n(1570),a=n.n(o),i=n(1897),l=n.n(i),c=n(4325),s=n.n(c),u=n(5387);const m={fontWeight:"normal",overflowWrap:"break-word"},p=({row:e,col:t})=>r.createElement("span",{style:m},a()(e[t.columnKey])?e[t.columnKey]?r.createElement(l(),{fontSize:"large"}):r.createElement(s(),{fontSize:"large"}):t.render?t.render(e):t.truncateText?r.createElement(u.A,{charLimit:t.truncateText},e[t.columnKey]):e[t.columnKey])},5387:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(2015),o=n(9825),a=n.n(o),i=n(4603),l=n.n(i);const c=({children:e,charLimit:t})=>{const n=r.useRef(null),[o,a]=r.useState(!1),i="number"==typeof t,c=i&&e.length>t,s=c?e.slice(0,t)+"...":e,u=c||o?e:"";return r.createElement(l(),{title:u,placement:"top",componentsProps:{tooltip:{sx:{fontSize:"1.2rem"}}}},r.createElement("span",{ref:n,onMouseEnter:()=>{n.current&&!i&&a(n.current.scrollWidth>n.current.offsetWidth)},style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},r.createElement("span",{style:{fontWeight:"normal"}},s)))};c.propTypes={children:a().string,charLimit:a().oneOfType([a().bool,a().number])};const s=c},3209:(e,t,n)=>{n.d(t,{Lr:()=>a,WU:()=>r,k6:()=>o});const r=10,o=20,a=50},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},1897:e=>{e.exports=require("@mui/icons-material/Check")},8177:e=>{e.exports=require("@mui/icons-material/CheckCircle")},4325:e=>{e.exports=require("@mui/icons-material/Close")},6084:e=>{e.exports=require("@mui/icons-material/Delete")},9247:e=>{e.exports=require("@mui/icons-material/Edit")},1519:e=>{e.exports=require("@mui/icons-material/Error")},8619:e=>{e.exports=require("@mui/material")},6989:e=>{e.exports=require("@mui/material/Box")},6368:e=>{e.exports=require("@mui/material/Button")},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")},38:e=>{e.exports=require("@mui/material/TableSortLabel")},4603:e=>{e.exports=require("@mui/material/Tooltip")},6831:e=>{e.exports=require("@mui/utils")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},1570:e=>{e.exports=require("lodash/isBoolean")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};n.r(r),n.d(r,{default:()=>F});var o=n(1116),a=n.n(o),i=n(2015),l=n(9825),c=n.n(l),s=n(6842),u=n.n(s),m=n(6989),p=n.n(m),d=n(6368),g=n.n(d),f=n(9292),h=n.n(f),y=n(9008),x=n.n(y),b=n(5684),E=n.n(b),v=n(5783),w=n.n(v),C=n(8202),P=n.n(C),T=n(38),B=n.n(T),q=n(464),O=n.n(q),S=n(270),W=n.n(S),k=n(8619),_=n(9247),D=n.n(_),j=n(6084),K=n.n(j),R=n(6831);const M="Z35249KJgMpoE1f5td0j";var z=n(6130),A=n(9207),I=n(5420);function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const V={backgroundColor:"background.light",color:"text.disabled"},$=({value:e,isEditing:t,onBlur:n,validation:r})=>{const[o,a]=i.useState(e),[l,c]=i.useState(!1),[s,u]=i.useState(null);i.useEffect((()=>{a(e),u(null)}),[e]);const m=e=>{const{isValid:t,message:o}=((e,t)=>{if(!t)return{isValid:!0};if(t.schema&&"function"==typeof t.schema.validateSync)try{return t.schema.validateSync(e),{isValid:!0,message:null}}catch(e){return{isValid:!1,message:e.message}}return{isValid:!0}})(e,r);t?(u(null),n(e,!0)):u(o)},d=e=>{"Enter"===e.key&&(e.preventDefault(),m(o))};return t?i.createElement(k.TextField,{autoFocus:!0,value:o,onChange:e=>{a(e.target.value),s&&u(null)},onBlur:()=>{m(o)},onKeyDown:d,size:"small",fullWidth:!0,variant:"standard",error:!!s,helperText:s}):i.createElement(p(),{sx:{display:"flex",alignItems:"center",position:"relative",width:"100%",height:"100%"},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1)},i.createElement("span",{style:{flex:1,fontWeight:"normal"}},e),l&&i.createElement(D(),{fontSize:"small",sx:{opacity:.5,position:"absolute",right:0,"&:hover":{opacity:1}}}))},H=({columns:e=[],data:t=[],totalRows:n,perPage:r,currentPage:o,onPageChange:a,onPerPageChange:l,onSort:c,options:s={sortCol:"",sortDir:1,disableProp:null},getName:m=e=>e.name,onEdit:d,onArchive:f,onDelete:y,onCellChange:b,deleteDialogBody:v,tableSx:C={}})=>{const[T,q]=i.useState(null),{sortCol:S,sortDir:_}=s,j=(e,t={})=>N(N({},t),(e=>s.disableProp&&e[s.disableProp]?V:null)(e)||{}),L=(e,t)=>"function"==typeof e.editable?e.editable(t):!!e.editable;return i.createElement(p(),{sx:{width:"100%"}},i.createElement(W(),{elevation:0,sx:{width:"100%",mb:2}},i.createElement(w(),{component:W(),sx:{borderRadius:0,boxShadow:"none"}},i.createElement(h(),{sx:C},i.createElement(P(),{sx:{backgroundColor:"#EAEAEA"}},i.createElement(O(),null,e.map((e=>i.createElement(E(),{key:e.columnKey,sx:{width:e.width,minWidth:e.width,maxWidth:e.width,fontWeight:"normal"},align:e.align??"left"},e.sortable?i.createElement(B(),{active:S===e.columnKey,direction:S===e.columnKey&&-1===_?"desc":"asc",onClick:()=>c(e.columnKey,-1*_),sx:{fontWeight:"normal"}},e.header,S===e.columnKey?i.createElement(p(),{component:"span",sx:R.visuallyHidden},-1===_?u().translate("mui_table.sorted_desc"):u().translate("mui_table.sorted_asc")):null):i.createElement("span",{style:{fontWeight:"normal"}},e.header)))),d&&i.createElement(E(),{sx:{width:40,fontWeight:"normal"}}),f&&i.createElement(E(),{sx:{width:80,fontWeight:"normal"}}),y&&i.createElement(E(),{sx:{width:40,fontWeight:"normal"}}))),i.createElement(x(),null,t.map((t=>i.createElement(O(),{key:t.id},e.map((n=>i.createElement(E(),{key:`${t.id}-${n.columnKey}`,onClick:()=>((t,n)=>{const r=e.find((e=>e.columnKey===n));r&&L(r,t)&&q({rowId:t.id,columnKey:n})})(t,n.columnKey),sx:j(t,{cursor:L(n,t)?"pointer":"default",padding:L(n,t)?"8px 16px":void 0})},L(n,t)?i.createElement($,{value:t[n.columnKey],isEditing:T&&T.rowId===t.id&&T.columnKey===n.columnKey,onBlur:(e,r)=>((e,t,n,r)=>{b&&r&&b(e,t,n),q(null)})(t.id,n.columnKey,e,r),validation:n.validation}):i.createElement(A.A,{row:t,col:n})))),d&&i.createElement(E(),{sx:j(t),className:M},i.createElement(k.IconButton,{onClick:()=>d(t),size:"small","aria-label":u().translate("general.edit")},i.createElement(D(),null))),f&&i.createElement(E(),{align:"center",sx:N({},j(t,{width:80,fontWeight:"normal"})),className:M},i.createElement(g(),{variant:"text",color:"inherit",size:"small",onClick:()=>f(t),sx:{fontSize:"1.3rem",fontWeight:"normal",lineHeight:"2.2rem",padding:"4px 5px",color:"rgba(0,0,0,0.56)"}},t.is_archived?u().translate("general.unarchive"):u().translate("general.archive"))),y&&i.createElement(E(),{sx:j(t),className:M},i.createElement(k.IconButton,{onClick:()=>(async e=>{await(0,z.default)({title:u().translate("general.are_you_sure"),text:v?v(m(e)):`${u().translate("general.row_remove_warning")} ${m(e)}`,type:"warning",showCancelButton:!0,confirmButtonColor:"warning",confirmButtonText:u().translate("general.yes_delete")})&&y(e.id)})(t),size:"small","aria-label":u().translate("general.delete")},i.createElement(K(),null))))))))),r&&o&&a&&i.createElement(I.default,{totalRows:n??t.length,perPage:r,currentPage:o,onPageChange:a,onPerPageChange:l})))};H.propTypes={columns:c().arrayOf(c().shape({columnKey:c().string.isRequired,header:c().node,width:c().oneOfType([c().string,c().number]),align:c().string,sortable:c().bool,editable:c().oneOfType([c().bool,c().func]),validation:c().shape({schema:c().object}),render:c().func})),data:c().arrayOf(c().object),totalRows:c().number,perPage:c().number,currentPage:c().number,onPageChange:c().func,onPerPageChange:c().func,onSort:c().func,options:c().shape({sortCol:c().string,sortDir:c().oneOf([1,-1]),disableProp:c().string}),getName:c().func,onEdit:c().func,onArchive:c().func,onDelete:c().func,onCellChange:c().func,deleteDialogBody:c().func};const F=H;return r})()));
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={9299:(e,t,n)=>{var r=n(2015),o=n.n(r),a=n(9825),i=n.n(a),l=n(8619),c=n(8177),s=n.n(c),u=n(1519),m=n.n(u);const d=require("@mui/icons-material/Info");var p=n.n(d);const g=require("@mui/icons-material/Warning");var f=n.n(g);const h={warning:o().createElement(f(),{color:"warning"}),success:o().createElement(s(),{color:"success"}),error:o().createElement(m(),{color:"error"}),info:o().createElement(p(),{color:"info"})},b=({open:e,title:t,text:n,iconType:r="",onConfirm:a,onCancel:i,confirmButtonText:c="Confirm",confirmButtonColor:s="primary",cancelButtonText:u="Cancel",cancelButtonColor:m="primary"})=>o().createElement(l.Dialog,{open:e,onClose:i},o().createElement(l.DialogTitle,{sx:{p:2},component:"div"},o().createElement(l.Typography,{variant:"h5"},t)),o().createElement(l.Divider,null),o().createElement(l.DialogContent,{sx:{p:2}},o().createElement("div",{style:{display:"flex",alignItems:"center"}},h[r]&&o().createElement("div",{style:{marginRight:10}},h[r]),o().createElement(l.Typography,{variant:"body1"},n))),o().createElement(l.Divider,{sx:{margin:"10px 0px 10px 0px"}}),o().createElement(l.DialogActions,null,o().createElement(l.Button,{fullWidth:!0,onClick:i,color:m,variant:"outlined",sx:{whiteSpace:"nowrap",minWidth:100}},u),o().createElement(l.Button,{fullWidth:!0,onClick:a,color:s,variant:"contained",sx:{whiteSpace:"nowrap",minWidth:100}},c)));b.propTypes={open:i().bool,title:i().string.isRequired,text:i().string.isRequired,iconType:i().string,onConfirm:i().func.isRequired,onCancel:i().func.isRequired,confirmButtonText:i().string,confirmButtonColor:i().string,cancelButtonText:i().string,cancelButtonColor:i().string},b.defaultProps={open:!1,iconType:"warning",confirmButtonText:"Confirm",confirmButtonColor:"primary",cancelButtonText:"Cancel",cancelButtonColor:"default"}},6130:(e,t,n)=>{n.d(t,{default:()=>a});n(1116),n(2015),n(9299);const r="__oif_confirm_dialog_bridge__",o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},a=({title:e,text:t,iconType:n="",confirmButtonText:a="Confirm",cancelButtonText:i="Cancel",confirmButtonColor:l="primary",cancelButtonColor:c="primary"})=>{if(!o[r])throw new Error("[openstack-uicore-foundation] showConfirmDialog: <GlobalConfirmDialog /> is not mounted. Add <GlobalConfirmDialog /> to the root of your app.");return o[r]({title:e,text:t,iconType:n,confirmButtonText:a,cancelButtonText:i,confirmButtonColor:l,cancelButtonColor:c})}},5369:(e,t,n)=>{n.d(t,{default:()=>g});var r=n(2015),o=n(6842),a=n.n(o);const i=require("@mui/material/TablePagination");var l=n.n(i),c=n(9825),s=n.n(c),u=n(3209);const m={".MuiTablePagination-toolbar":{alignItems:"baseline",marginTop:"1.6rem"},".MuiTablePagination-selectLabel":{color:"rgba(0, 0, 0, 0.6)",fontSize:"12px",fontWeight:"normal"},".MuiTablePagination-select":{color:"rgba(0, 0, 0, 0.6)",fontSize:"12px",fontWeight:"normal"},".MuiTablePagination-spacer":{display:"none"},".MuiTablePagination-displayedRows":{marginLeft:"auto"}},d=[u.WU,u.k6,u.Lr],p=({totalRows:e,perPage:t,currentPage:n,onPageChange:o,onPerPageChange:i})=>{const c=r.useMemo((()=>i?d.includes(t)?d:[...d,t].sort(((e,t)=>e-t)):[t]),[t,i]);return r.createElement(l(),{component:"div",count:e??0,rowsPerPageOptions:c,rowsPerPage:t,page:n-1,onPageChange:(e,t)=>{o(t+1)},onRowsPerPageChange:i?e=>{i(parseInt(e.target.value,10))}:void 0,labelRowsPerPage:a().translate("mui_table.rows_per_page"),sx:m})};p.propTypes={totalRows:s().number,perPage:s().number.isRequired,currentPage:s().number.isRequired,onPageChange:s().func.isRequired,onPerPageChange:s().func};const g=p},2509:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(6842),o=n.n(r),a=n(6130);const i=({onDelete:e,getName:t=e=>e.name,deleteDialogTitle:n,deleteDialogBody:r,deleteDialogConfirmText:i,confirmButtonColor:l})=>async c=>{await(0,a.default)({title:n||o().translate("general.are_you_sure"),text:"function"==typeof r?r(t(c)):r||`${o().translate("general.row_remove_warning")} ${t(c)}`,type:"warning",showCancelButton:!0,confirmButtonColor:l,confirmButtonText:i||o().translate("general.yes_delete")})&&e(c.id)}},2407:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(2015),o=n(6989),a=n.n(o),i=n(9825),l=n.n(i),c=n(6182);const s=({side:e,visible:t})=>r.createElement(a(),{sx:n=>{const r=(0,c.alpha)(n.palette.background.paper,.85);return{position:"absolute",top:0,bottom:0,[e]:0,width:64,pointerEvents:"none",opacity:t?1:0,transition:"opacity 0.2s ease",background:`linear-gradient(to ${"left"===e?"right":"left"}, ${r}, transparent)`}}});s.propTypes={side:l().oneOf(["left","right"]).isRequired,visible:l().bool};const u=s},4122:(e,t,n)=>{n.d(t,{A:()=>g});var r=n(2015),o=n(6842),a=n.n(o),i=n(6989),l=n.n(i),c=n(38),s=n.n(c),u=n(9825),m=n.n(u),d=n(6831);const p=({col:e,sortCol:t,sortDir:n,onSort:o,sx:i})=>e.sortable?r.createElement(s(),{active:t===e.columnKey,direction:t===e.columnKey&&-1===n?"desc":"asc",onClick:()=>o(e.columnKey,-1*n),sx:i},e.header,t===e.columnKey?r.createElement(l(),{component:"span",sx:d.visuallyHidden},-1===n?a().translate("mui_table.sorted_desc"):a().translate("mui_table.sorted_asc")):null):i?r.createElement("span",{style:i},e.header):e.header;p.propTypes={col:m().object.isRequired,sortCol:m().string,sortDir:m().oneOf([1,-1]),onSort:m().func,sx:m().object};const g=p},9033:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(2015),o=n(1570),a=n.n(o),i=n(1897),l=n.n(i),c=n(4325),s=n.n(c),u=n(5387);const m={fontWeight:"normal",overflowWrap:"break-word"},d=({row:e,col:t})=>r.createElement("span",{style:m},t.render?t.render(e):a()(e[t.columnKey])?e[t.columnKey]?r.createElement(l(),{fontSize:"large"}):r.createElement(s(),{fontSize:"large"}):t.truncateText?r.createElement(u.A,{charLimit:t.truncateText},e[t.columnKey]):e[t.columnKey])},8423:(e,t,n)=>{n.d(t,{A:()=>h});var r=n(2015),o=n(6989),a=n.n(o),i=n(270),l=n.n(i),c=n(5783),s=n.n(c),u=n(9825),m=n.n(u),d=n(5369),p=n(248),g=n(2407);const f=({children:e,totalRows:t,perPage:n,currentPage:o,onPageChange:i,onPerPageChange:c})=>{const{containerRef:u,showLeftFade:m,showRightFade:f}=(0,p.A)();return r.createElement(a(),{sx:{width:"100%"}},r.createElement(l(),{elevation:0,sx:{width:"100%",mb:2}},r.createElement(a(),{sx:{position:"relative"}},r.createElement(s(),{ref:u,component:l(),sx:{borderRadius:0,boxShadow:"none"}},e),r.createElement(g.A,{side:"left",visible:m}),r.createElement(g.A,{side:"right",visible:f})),n&&o&&i&&r.createElement(d.default,{totalRows:t,perPage:n,currentPage:o,onPageChange:i,onPerPageChange:c})))};f.propTypes={children:m().node,totalRows:m().number,perPage:m().number,currentPage:m().number,onPageChange:m().func,onPerPageChange:m().func};const h=f},5983:(e,t,n)=>{n.d(t,{Cr:()=>d,GY:()=>s,SV:()=>c,ei:()=>m,mW:()=>u});var r=n(1116),o=n.n(r);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l={backgroundColor:"background.light",color:"text.disabled"},c={p:0,textAlign:"center",verticalAlign:"middle",width:40,minWidth:40,maxWidth:40},s=e=>({tableLayout:"auto",minWidth:e<=3?690:910}),u=e=>i({minWidth:e.width??40},e.width&&{width:e.width,maxWidth:e.width}),m=(e,t)=>t&&e[t]?l:{},d=(e,t,n)=>i(i(i({},c),n&&{width:n,minWidth:n,maxWidth:n}),m(e,t))},248:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(2015);const o=()=>{const e=r.useRef(null),[t,n]=r.useState(!1),[o,a]=r.useState(!1),i=r.useCallback((()=>{const t=e.current;t&&(n(t.scrollLeft>0),a(Math.ceil(t.scrollLeft+t.clientWidth)<t.scrollWidth))}),[]);return r.useEffect((()=>{const t=e.current;if(t)return i(),t.addEventListener("scroll",i),()=>t.removeEventListener("scroll",i)}),[i]),{containerRef:e,showLeftFade:t,showRightFade:o}}},5387:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(2015),o=n(9825),a=n.n(o),i=n(4603),l=n.n(i);const c=({children:e,charLimit:t})=>{const n=r.useRef(null),[o,a]=r.useState(!1),i="number"==typeof t,c=i&&e.length>t,s=c?e.slice(0,t)+"...":e,u=c||o?e:"";return r.createElement(l(),{title:u,placement:"top",componentsProps:{tooltip:{sx:{fontSize:"1.2rem"}}}},r.createElement("span",{ref:n,onMouseEnter:()=>{n.current&&!i&&a(n.current.scrollWidth>n.current.offsetWidth)},style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},r.createElement("span",{style:{fontWeight:"normal"}},s)))};c.propTypes={children:a().string,charLimit:a().oneOfType([a().bool,a().number])};const s=c},3209:(e,t,n)=>{n.d(t,{Lr:()=>a,WU:()=>r,k6:()=>o});const r=10,o=20,a=50},7538:(e,t,n)=>{n.d(t,{A:()=>r});const r={dottedBorderLeft:"KNETxMZ1aGPbDi44wmnH"}},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},1897:e=>{e.exports=require("@mui/icons-material/Check")},8177:e=>{e.exports=require("@mui/icons-material/CheckCircle")},4325:e=>{e.exports=require("@mui/icons-material/Close")},6084:e=>{e.exports=require("@mui/icons-material/Delete")},9247:e=>{e.exports=require("@mui/icons-material/Edit")},1519:e=>{e.exports=require("@mui/icons-material/Error")},8619:e=>{e.exports=require("@mui/material")},6989:e=>{e.exports=require("@mui/material/Box")},6368:e=>{e.exports=require("@mui/material/Button")},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")},38:e=>{e.exports=require("@mui/material/TableSortLabel")},4603:e=>{e.exports=require("@mui/material/Tooltip")},6182:e=>{e.exports=require("@mui/material/styles")},6831:e=>{e.exports=require("@mui/utils")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},1570:e=>{e.exports=require("lodash/isBoolean")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};n.r(r),n.d(r,{default:()=>z});var o=n(1116),a=n.n(o),i=n(2015),l=n(9825),c=n.n(l),s=n(6842),u=n.n(s),m=n(6989),d=n.n(m),p=n(6368),g=n.n(p),f=n(9292),h=n.n(f),b=n(9008),y=n.n(b),x=n(5684),P=n.n(x),E=n(8202),v=n.n(E),C=n(464),w=n.n(C),T=n(8619),O=n(9247),B=n.n(O),S=n(6084),W=n.n(S),q=n(7538),D=n(9033),j=n(8423),R=n(2509),k=n(4122),A=n(5983);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const L=({value:e,isEditing:t,onBlur:n,validation:r})=>{const[o,a]=i.useState(e),[l,c]=i.useState(!1),[s,u]=i.useState(null);i.useEffect((()=>{a(e),u(null)}),[e]);const m=e=>{const{isValid:t,message:o}=((e,t)=>{if(!t)return{isValid:!0};if(t.schema&&"function"==typeof t.schema.validateSync)try{return t.schema.validateSync(e),{isValid:!0,message:null}}catch(e){return{isValid:!1,message:e.message}}return{isValid:!0}})(e,r);t?(u(null),n(e,!0)):u(o)},p=e=>{"Enter"===e.key&&(e.preventDefault(),m(o))};return t?i.createElement(T.TextField,{autoFocus:!0,value:o,onChange:e=>{a(e.target.value),s&&u(null)},onBlur:()=>{m(o)},onKeyDown:p,size:"small",fullWidth:!0,variant:"standard",error:!!s,helperText:s}):i.createElement(d(),{sx:{display:"flex",alignItems:"center",position:"relative",width:"100%",height:"100%"},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1)},i.createElement("span",{style:{flex:1,fontWeight:"normal"}},e),l&&i.createElement(B(),{fontSize:"small",sx:{opacity:.5,position:"absolute",right:0,"&:hover":{opacity:1}}}))},M=({columns:e=[],data:t=[],totalRows:n,perPage:r,currentPage:o,onPageChange:a,onPerPageChange:l,onSort:c,options:s={sortCol:"",sortDir:1,disableProp:null},getName:m=e=>e.name,onEdit:d,onArchive:p,onDelete:f,onCellChange:b,deleteDialogBody:x,tableSx:E={}})=>{const[C,O]=i.useState(null),{sortCol:S,sortDir:_}=s,M=(e,t={})=>K(K({},t),(0,A.ei)(e,s.disableProp)),z=(0,R.A)({onDelete:f,getName:m,deleteDialogBody:x,confirmButtonColor:"warning"}),I=(e,t)=>"function"==typeof e.editable?e.editable(t):!!e.editable;return i.createElement(j.A,{totalRows:n??t.length,perPage:r,currentPage:o,onPageChange:a,onPerPageChange:l},i.createElement(h(),{sx:K(K({},(0,A.GY)(e.length)),E)},i.createElement(v(),{sx:{backgroundColor:"#EAEAEA"}},i.createElement(w(),null,e.map((e=>i.createElement(P(),{key:e.columnKey,sx:K(K({},(0,A.mW)(e)),{},{fontWeight:"normal"},e.headSx||{}),align:e.align??"left"},i.createElement(k.A,{col:e,sortCol:S,sortDir:_,onSort:c,sx:{fontWeight:"normal"}})))),d&&i.createElement(P(),{sx:K(K({},A.SV),{},{fontWeight:"normal"})}),p&&i.createElement(P(),{sx:K(K({},A.SV),{},{width:80,minWidth:80,maxWidth:80,fontWeight:"normal"})}),f&&i.createElement(P(),{sx:K(K({},A.SV),{},{fontWeight:"normal"})}))),i.createElement(y(),null,t.map((t=>i.createElement(w(),{key:t.id},e.map((n=>i.createElement(P(),{key:`${t.id}-${n.columnKey}`,onClick:()=>((t,n)=>{const r=e.find((e=>e.columnKey===n));r&&I(r,t)&&O({rowId:t.id,columnKey:n})})(t,n.columnKey),sx:K(K({},(0,A.mW)(n)),M(t,K({cursor:I(n,t)?"pointer":"default",padding:I(n,t)?"8px 16px":void 0},n.cellSx||{})))},I(n,t)?i.createElement(L,{value:t[n.columnKey],isEditing:C&&C.rowId===t.id&&C.columnKey===n.columnKey,onBlur:(e,r)=>((e,t,n,r)=>{b&&r&&b(e,t,n),O(null)})(t.id,n.columnKey,e,r),validation:n.validation}):i.createElement(D.A,{row:t,col:n})))),d&&i.createElement(P(),{sx:K(K({},(0,A.Cr)(t,s.disableProp)),{},{fontWeight:"normal"}),className:q.A.dottedBorderLeft},i.createElement(T.IconButton,{onClick:()=>d(t),size:"small","aria-label":u().translate("general.edit")},i.createElement(B(),null))),p&&i.createElement(P(),{align:"center",sx:K(K({},(0,A.Cr)(t,s.disableProp,80)),{},{fontWeight:"normal"}),className:q.A.dottedBorderLeft},i.createElement(g(),{variant:"text",color:"inherit",size:"small",onClick:()=>p(t),sx:{fontSize:"1.3rem",fontWeight:"normal",lineHeight:"2.2rem",padding:"4px 5px",color:"rgba(0,0,0,0.56)"}},t.is_archived?u().translate("general.unarchive"):u().translate("general.archive"))),f&&i.createElement(P(),{sx:K(K({},(0,A.Cr)(t,s.disableProp)),{},{fontWeight:"normal"}),className:q.A.dottedBorderLeft},i.createElement(T.IconButton,{onClick:()=>z(t),size:"small","aria-label":u().translate("general.delete")},i.createElement(W(),null)))))))))};M.propTypes={columns:c().arrayOf(c().shape({columnKey:c().string.isRequired,header:c().node,width:c().oneOfType([c().string,c().number]),align:c().string,sortable:c().bool,editable:c().oneOfType([c().bool,c().func]),validation:c().shape({schema:c().object}),render:c().func})),data:c().arrayOf(c().object),totalRows:c().number,perPage:c().number,currentPage:c().number,onPageChange:c().func,onPerPageChange:c().func,onSort:c().func,options:c().shape({sortCol:c().string,sortDir:c().oneOf([1,-1]),disableProp:c().string}),getName:c().func,onEdit:c().func,onArchive:c().func,onDelete:c().func,onCellChange:c().func,deleteDialogBody:c().func};const z=M;return r})()));
2
2
  //# sourceMappingURL=editable-table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/mui/editable-table.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,mICTT,MAAM,EAA+BC,QAAQ,4B,aCA7C,MAAM,EAA+BA,QAAQ,+B,aC6B7C,MAAMC,EAAU,CACdC,QAASC,IAAAA,cAACC,IAAO,CAACC,MAAM,YACxBC,QAASH,IAAAA,cAACI,IAAW,CAACF,MAAM,YAC5BG,MAAOL,IAAAA,cAACM,IAAK,CAACJ,MAAM,UACpBK,KAAMP,IAAAA,c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axJ,GAC5BgF,KAAK,QACL,aAAYpF,IAAAA,UAAY,mBAExBrF,EAAAA,cAACkP,IAAU,cAS1BrL,GAAWC,GAAeC,GACzB/D,EAAAA,cAAC2D,EAAAA,QAAqB,CACpBC,UAAWA,GAAa0H,EAAK7E,OAC7B5C,QAASA,EACTC,YAAaA,EACbC,aAAcA,EACdC,gBAAiBA,KAInB,EAIVoH,EAAiB3I,UAAY,CAC3B4I,QAAS3I,IAAAA,QACPA,IAAAA,MAAgB,CACdkD,UAAWlD,IAAAA,OAAiBC,WAC5BmL,OAAQpL,IAAAA,KACRmI,MAAOnI,IAAAA,UAAoB,CAACA,IAAAA,OAAkBA,IAAAA,SAC9C+K,MAAO/K,IAAAA,OACPgL,SAAUhL,IAAAA,KACVkK,SAAUlK,IAAAA,UAAoB,CAACA,IAAAA,KAAgBA,IAAAA,OAC/C0G,WAAY1G,IAAAA,MAAgB,CAAEqH,OAAQrH,IAAAA,SACtCqD,OAAQrD,IAAAA,QAGZ4I,KAAM5I,IAAAA,QAAkBA,IAAAA,QACxBkB,UAAWlB,IAAAA,OAEXmB,QAASnB,IAAAA,OACToB,YAAapB,IAAAA,OACbqB,aAAcrB,IAAAA,KACdsB,gBAAiBtB,IAAAA,KACjB6I,OAAQ7I,IAAAA,KACR8I,QAAS9I,IAAAA,MAAgB,CACvB+I,QAAS/I,IAAAA,OACTgJ,QAAShJ,IAAAA,MAAgB,CAAC,GAAI,IAC9BiJ,YAAajJ,IAAAA,SAEfkJ,QAASlJ,IAAAA,KACTqJ,OAAQrJ,IAAAA,KACRsJ,UAAWtJ,IAAAA,KACXuJ,SAAUvJ,IAAAA,KACVwJ,aAAcxJ,IAAAA,KACdyJ,iBAAkBzJ,IAAAA,MAGpB,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Info\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Warning\"","webpack://openstack-uicore-foundation/./src/components/mui/confirm-dialog.js","webpack://openstack-uicore-foundation/./src/components/mui/showConfirmDialog.js","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TablePagination\"","webpack://openstack-uicore-foundation/./src/components/mui/table/CustomTablePagination.js","webpack://openstack-uicore-foundation/./src/components/mui/table/table-cell-content.js","webpack://openstack-uicore-foundation/./src/components/mui/truncate-text.js","webpack://openstack-uicore-foundation/./src/utils/constants.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Check\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/CheckCircle\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Close\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Delete\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Edit\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Error\"","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/Button\"","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/TableSortLabel\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Tooltip\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/utils\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"lodash/isBoolean\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","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/./src/components/mui/editable-table/mui-table-editable.module.less?19a7","webpack://openstack-uicore-foundation/./src/components/mui/editable-table/mui-table-editable.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 ","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Info\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Warning\");","/**\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 PropTypes from \"prop-types\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n Typography\n} from \"@mui/material\";\nimport CheckCircle from \"@mui/icons-material/CheckCircle\";\nimport Error from \"@mui/icons-material/Error\";\nimport Info from \"@mui/icons-material/Info\";\nimport Warning from \"@mui/icons-material/Warning\";\n\nconst iconMap = {\n warning: <Warning color=\"warning\" />,\n success: <CheckCircle color=\"success\" />,\n error: <Error color=\"error\" />,\n info: <Info color=\"info\" />\n};\n\nconst ConfirmDialog = ({\n open,\n title,\n text,\n iconType = \"\",\n onConfirm,\n onCancel,\n confirmButtonText = \"Confirm\",\n confirmButtonColor = \"primary\",\n cancelButtonText = \"Cancel\",\n cancelButtonColor = \"primary\"\n}) => (\n <Dialog open={open} onClose={onCancel}>\n <DialogTitle sx={{ p: 2 }} component=\"div\">\n <Typography variant=\"h5\">{title}</Typography>\n </DialogTitle>\n <Divider />\n <DialogContent sx={{ p: 2 }}>\n <div style={{ display: \"flex\", alignItems: \"center\" }}>\n {iconMap[iconType] && (\n <div style={{ marginRight: 10 }}>{iconMap[iconType]}</div>\n )}\n <Typography variant=\"body1\">{text}</Typography>\n </div>\n </DialogContent>\n <Divider sx={{ margin: \"10px 0px 10px 0px\" }} />\n <DialogActions>\n <Button\n fullWidth\n onClick={onCancel}\n color={cancelButtonColor}\n variant=\"outlined\"\n sx={{ whiteSpace: \"nowrap\", minWidth: 100 }}\n >\n {cancelButtonText}\n </Button>\n <Button\n fullWidth\n onClick={onConfirm}\n color={confirmButtonColor}\n variant=\"contained\"\n sx={{ whiteSpace: \"nowrap\", minWidth: 100 }}\n >\n {confirmButtonText}\n </Button>\n </DialogActions>\n </Dialog>\n);\n\nConfirmDialog.propTypes = {\n open: PropTypes.bool,\n title: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n iconType: PropTypes.string,\n onConfirm: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n confirmButtonText: PropTypes.string,\n confirmButtonColor: PropTypes.string,\n cancelButtonText: PropTypes.string,\n cancelButtonColor: PropTypes.string\n};\n\nConfirmDialog.defaultProps = {\n open: false,\n iconType: \"warning\",\n confirmButtonText: \"Confirm\",\n confirmButtonColor: \"primary\",\n cancelButtonText: \"Cancel\",\n cancelButtonColor: \"default\"\n};\n\nexport default ConfirmDialog;\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, { useState, useEffect } from \"react\";\nimport ConfirmDialog from \"./confirm-dialog\";\n\n/**\n * Imperative confirm dialog API.\n *\n * SETUP (required):\n * Place <GlobalConfirmDialog /> at the root of your app:\n *\n * import { GlobalConfirmDialog } from\n * 'openstack-uicore-foundation/lib/components/mui/show-confirm-dialog';\n *\n * function App() {\n * return (\n * <>\n * <YourApp />\n * <GlobalConfirmDialog />\n * </>\n * );\n * }\n *\n * USAGE (works from any file — the bridge is shared via globalThis):\n * import showConfirmDialog from\n * 'openstack-uicore-foundation/lib/components/mui/show-confirm-dialog';\n *\n * const confirmed = await showConfirmDialog({\n * title: 'Delete Item?',\n * text: 'This cannot be undone'\n * });\n */\n\n// Shared bridge reference stored on globalThis so that all webpack bundles\n// (table, sortable-table, show-confirm-dialog, index, etc.) read/write the\n// same callback. A module-level variable would be duplicated per bundle.\nconst BRIDGE_KEY = \"__oif_confirm_dialog_bridge__\";\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : {};\n\n/**\n * @param param0\n * @param param0.title\n * @param param0.text\n * @param param0.iconType\n * @param param0.confirmButtonText\n * @param param0.cancelButtonText\n * @param param0.confirmButtonColor\n * @param param0.cancelButtonColor\n * @returns {Promise<boolean>}\n */\nconst showConfirmDialog = ({\n title,\n text,\n iconType = \"\",\n confirmButtonText = \"Confirm\",\n cancelButtonText = \"Cancel\",\n confirmButtonColor = \"primary\",\n cancelButtonColor = \"primary\"\n}) => {\n if (!_global[BRIDGE_KEY]) {\n throw new Error(\n \"[openstack-uicore-foundation] showConfirmDialog: <GlobalConfirmDialog /> is not mounted. \" +\n \"Add <GlobalConfirmDialog /> to the root of your app.\"\n );\n }\n\n return _global[BRIDGE_KEY]({\n title,\n text,\n iconType,\n confirmButtonText,\n cancelButtonText,\n confirmButtonColor,\n cancelButtonColor\n });\n};\n\n/**\n * Global confirm dialog component. Place at the root of your app:\n *\n * <App>\n * ...\n * <GlobalConfirmDialog />\n * </App>\n *\n * Then call showConfirmDialog() anywhere.\n */\nexport const GlobalConfirmDialog = () => {\n const [dialogState, setDialogState] = useState(null);\n\n useEffect(() => {\n _global[BRIDGE_KEY] = (options) => {\n return new Promise((resolve) => {\n setDialogState({ ...options, open: true, onResolve: resolve });\n });\n };\n return () => { _global[BRIDGE_KEY] = null; };\n }, []);\n\n const handleConfirm = () => {\n if (dialogState?.onResolve) dialogState.onResolve(true);\n setDialogState(null);\n };\n\n const handleCancel = () => {\n if (dialogState?.onResolve) dialogState.onResolve(false);\n setDialogState(null);\n };\n\n if (!dialogState) return null;\n\n return (\n <ConfirmDialog\n open={dialogState.open}\n title={dialogState.title}\n text={dialogState.text}\n iconType={dialogState.iconType}\n confirmButtonText={dialogState.confirmButtonText}\n cancelButtonText={dialogState.cancelButtonText}\n confirmButtonColor={dialogState.confirmButtonColor}\n cancelButtonColor={dialogState.cancelButtonColor}\n onConfirm={handleConfirm}\n onCancel={handleCancel}\n />\n );\n};\n\nexport default showConfirmDialog;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TablePagination\");","/**\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 * as React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport TablePagination from \"@mui/material/TablePagination\";\nimport PropTypes from \"prop-types\";\nimport { DEFAULT_PER_PAGE, FIFTY_PER_PAGE, TWENTY_PER_PAGE } from \"../../../utils/constants\";\n\nconst PAGINATION_SX = {\n \".MuiTablePagination-toolbar\": {\n alignItems: \"baseline\",\n marginTop: \"1.6rem\"\n },\n \".MuiTablePagination-selectLabel\": {\n color: \"rgba(0, 0, 0, 0.6)\",\n fontSize: \"12px\",\n fontWeight: \"normal\"\n },\n \".MuiTablePagination-select\": {\n color: \"rgba(0, 0, 0, 0.6)\",\n fontSize: \"12px\",\n fontWeight: \"normal\"\n },\n \".MuiTablePagination-spacer\": {\n display: \"none\"\n },\n \".MuiTablePagination-displayedRows\": {\n marginLeft: \"auto\"\n }\n};\n\nconst BASE_PER_PAGE_OPTIONS = [DEFAULT_PER_PAGE, TWENTY_PER_PAGE, FIFTY_PER_PAGE];\n\nconst CustomTablePagination = ({ totalRows, perPage, currentPage, onPageChange, onPerPageChange }) => {\n const perPageOptions = React.useMemo(() => {\n if (!onPerPageChange) return [perPage];\n return BASE_PER_PAGE_OPTIONS.includes(perPage)\n ? BASE_PER_PAGE_OPTIONS\n : [...BASE_PER_PAGE_OPTIONS, perPage].sort((a, b) => a - b);\n }, [perPage, onPerPageChange]);\n\n const handlePageChange = (_, newPage) => {\n onPageChange(newPage + 1);\n };\n\n const handleRowsPerPageChange = (ev) => {\n onPerPageChange(parseInt(ev.target.value, 10));\n };\n\n return (\n <TablePagination\n component=\"div\"\n count={totalRows ?? 0}\n rowsPerPageOptions={perPageOptions}\n rowsPerPage={perPage}\n page={currentPage - 1}\n onPageChange={handlePageChange}\n onRowsPerPageChange={onPerPageChange ? handleRowsPerPageChange : undefined}\n labelRowsPerPage={T.translate(\"mui_table.rows_per_page\")}\n sx={PAGINATION_SX}\n />\n );\n};\n\nCustomTablePagination.propTypes = {\n totalRows: PropTypes.number,\n perPage: PropTypes.number.isRequired,\n currentPage: PropTypes.number.isRequired,\n onPageChange: PropTypes.func.isRequired,\n onPerPageChange: PropTypes.func\n};\n\nexport default CustomTablePagination;\n","import * as React from \"react\";\nimport isBoolean from \"lodash/isBoolean\";\nimport CheckIcon from \"@mui/icons-material/Check\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport TruncateText from \"../truncate-text\";\n\nconst contentStyle = {\n fontWeight: \"normal\",\n overflowWrap: \"break-word\",\n};\n\nconst TableCellContent = ({ row, col }) => {\n return (\n <span style={contentStyle}>\n {isBoolean(row[col.columnKey]) ? (\n row[col.columnKey] ? (\n <CheckIcon fontSize=\"large\" />\n ) : (\n <CloseIcon fontSize=\"large\" />\n )\n ) : col.render ? (\n col.render(row)\n ) : col.truncateText ? (\n <TruncateText charLimit={col.truncateText}>\n {row[col.columnKey]}\n </TruncateText>\n ) : (\n row[col.columnKey]\n )}\n </span>\n );\n};\n\nexport default TableCellContent;","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nconst TruncateText = ({ children, charLimit }) => {\n const ref = React.useRef(null);\n const [isOverflowing, setIsOverflowing] = React.useState(false);\n\n const shouldCharTruncate = typeof charLimit === \"number\";\n const isTruncated = shouldCharTruncate && children.length > charLimit;\n\n const displayContent = isTruncated ? children.slice(0, charLimit) + \"...\" : children;\n const tooltipTitle = isTruncated ? children : isOverflowing ? children : \"\";\n\n return (\n <Tooltip title={tooltipTitle} placement=\"top\" componentsProps={{ tooltip: { sx: { fontSize: \"1.2rem\" } } }}>\n <span\n ref={ref}\n onMouseEnter={() => {\n if (ref.current && !shouldCharTruncate)\n setIsOverflowing(ref.current.scrollWidth > ref.current.offsetWidth);\n }}\n style={{ display: \"block\", overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" }}\n >\n <span style={{ fontWeight: \"normal\" }}>{displayContent}</span>\n </span>\n </Tooltip>\n );\n};\n\nTruncateText.propTypes = {\n children: PropTypes.string,\n charLimit: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),\n};\n\nexport default TruncateText;\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 ASYNC_SELECT_SAFETY_TIMEOUT = 15000;\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\nexport const SPONSOR_ORDER_GRID_ITEM_TYPES = {\n CHARGE: \"Charge\",\n PAYMENT: \"Payment\",\n REFUND: \"Refund\",\n DISCOUNT: \"Discount\",\n CANCELLED: \"Cancelled\"\n};","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@mui/icons-material/Check\");","module.exports = require(\"@mui/icons-material/CheckCircle\");","module.exports = require(\"@mui/icons-material/Close\");","module.exports = require(\"@mui/icons-material/Delete\");","module.exports = require(\"@mui/icons-material/Edit\");","module.exports = require(\"@mui/icons-material/Error\");","module.exports = require(\"@mui/material\");","module.exports = require(\"@mui/material/Box\");","module.exports = require(\"@mui/material/Button\");","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/TableSortLabel\");","module.exports = require(\"@mui/material/Tooltip\");","module.exports = require(\"@mui/utils\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"lodash/isBoolean\");","module.exports = require(\"prop-types\");","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};","// extracted by mini-css-extract-plugin\nexport default {\"dottedBorderLeft\":\"Z35249KJgMpoE1f5td0j\"};","/**\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 * as React from \"react\";\nimport PropTypes from \"prop-types\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableHead from \"@mui/material/TableHead\";\nimport TableSortLabel from \"@mui/material/TableSortLabel\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Paper from \"@mui/material/Paper\";\nimport { IconButton, TextField } from \"@mui/material\";\nimport EditIcon from \"@mui/icons-material/Edit\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport { visuallyHidden } from \"@mui/utils\";\nimport styles from \"./mui-table-editable.module.less\";\n\nimport showConfirmDialog from \"../showConfirmDialog\";\nimport TableCellContent from \"../table/table-cell-content\";\nimport CustomTablePagination from \"../table/CustomTablePagination\";\n\nconst ARCHIVED_CELL_SX = {\n backgroundColor: \"background.light\",\n color: \"text.disabled\"\n};\n\nconst validateValue = (value, validation) => {\n if (!validation) return { isValid: true };\n\n // validate with yup schema\n if (\n validation.schema &&\n typeof validation.schema.validateSync === \"function\"\n ) {\n try {\n validation.schema.validateSync(value);\n return { isValid: true, message: null };\n } catch (err) {\n return { isValid: false, message: err.message };\n }\n }\n\n return { isValid: true };\n};\n\n// Updated component to handle editable cells with hover edit icon\nconst EditableCell = ({ value, isEditing, onBlur, validation }) => {\n const [inputValue, setInputValue] = React.useState(value);\n const [isHovering, setIsHovering] = React.useState(false);\n const [error, setError] = React.useState(null);\n\n React.useEffect(() => {\n setInputValue(value);\n setError(null);\n }, [value]);\n\n const handleValidationAndSave = (newValue) => {\n const { isValid, message } = validateValue(newValue, validation);\n\n if (isValid) {\n setError(null);\n onBlur(newValue, true);\n } else {\n setError(message);\n }\n };\n\n const handleKeyDown = (e) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n handleValidationAndSave(inputValue);\n }\n };\n\n if (isEditing) {\n return (\n <TextField\n autoFocus\n value={inputValue}\n onChange={(e) => {\n setInputValue(e.target.value);\n if (error) setError(null);\n }}\n onBlur={() => {\n handleValidationAndSave(inputValue);\n }}\n onKeyDown={handleKeyDown}\n size=\"small\"\n fullWidth\n variant=\"standard\"\n error={!!error}\n helperText={error}\n />\n );\n }\n\n return (\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n position: \"relative\",\n width: \"100%\",\n height: \"100%\"\n }}\n onMouseEnter={() => setIsHovering(true)}\n onMouseLeave={() => setIsHovering(false)}\n >\n <span style={{ flex: 1, fontWeight: \"normal\" }}>{value}</span>\n {isHovering && (\n <EditIcon\n fontSize=\"small\"\n sx={{\n opacity: 0.5,\n position: \"absolute\",\n right: 0,\n \"&:hover\": {\n opacity: 1\n }\n }}\n />\n )}\n </Box>\n );\n};\n\nconst MuiTableEditable = ({\n columns = [],\n data = [],\n totalRows,\n perPage,\n currentPage,\n onPageChange,\n onPerPageChange,\n onSort,\n options = { sortCol: \"\", sortDir: 1, disableProp: null },\n getName = (item) => item.name,\n onEdit,\n onArchive,\n onDelete,\n onCellChange, // New prop for handling cell value changes\n deleteDialogBody,\n tableSx = {}\n}) => {\n // State to track which cell is currently being edited\n const [editingCell, setEditingCell] = React.useState(null);\n\n const { sortCol, sortDir } = options;\n\n const getArchivedCellSx = (row) =>\n options.disableProp && row[options.disableProp] ? ARCHIVED_CELL_SX : null;\n\n const getCellSx = (row, baseSx = {}) => ({\n ...baseSx,\n ...(getArchivedCellSx(row) || {})\n });\n\n const handleDelete = async (item) => {\n const isConfirmed = await showConfirmDialog({\n title: T.translate(\"general.are_you_sure\"),\n text: deleteDialogBody\n ? deleteDialogBody(getName(item))\n : `${T.translate(\"general.row_remove_warning\")} ${getName(item)}`,\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"warning\",\n confirmButtonText: T.translate(\"general.yes_delete\")\n });\n\n if (isConfirmed) {\n onDelete(item.id);\n }\n };\n\n const isEditable = (col, row) =>\n typeof col.editable === \"function\" ? col.editable(row) : !!col.editable;\n\n // Handler for starting edit mode on a cell\n const handleCellClick = (row, columnKey) => {\n // Check if the column is editable\n const column = columns.find((col) => col.columnKey === columnKey);\n if (column && isEditable(column, row)) {\n setEditingCell({ rowId: row.id, columnKey });\n }\n };\n\n // Handler for saving changes when editing is complete\n const handleCellBlur = (rowId, columnKey, newValue, isValid) => {\n if (onCellChange && isValid) {\n onCellChange(rowId, columnKey, newValue);\n }\n setEditingCell(null);\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 sx={tableSx}>\n {/* TABLE HEADER */}\n <TableHead sx={{ backgroundColor: \"#EAEAEA\" }}>\n <TableRow>\n {columns.map((col) => (\n <TableCell\n key={col.columnKey}\n sx={{\n width: col.width,\n minWidth: col.width,\n maxWidth: col.width,\n fontWeight: \"normal\"\n }}\n align={col.align ?? \"left\"}\n >\n {col.sortable ? (\n <TableSortLabel\n active={sortCol === col.columnKey}\n direction={\n sortCol === col.columnKey && sortDir === -1\n ? \"desc\"\n : \"asc\"\n }\n onClick={() => onSort(col.columnKey, sortDir * -1)}\n sx={{ fontWeight: \"normal\" }}\n >\n {col.header}\n {sortCol === col.columnKey ? (\n <Box component=\"span\" sx={visuallyHidden}>\n {sortDir === -1\n ? T.translate(\"mui_table.sorted_desc\")\n : T.translate(\"mui_table.sorted_asc\")}\n </Box>\n ) : null}\n </TableSortLabel>\n ) : (\n <span style={{ fontWeight: \"normal\" }}>{col.header}</span>\n )}\n </TableCell>\n ))}\n {onEdit && (\n <TableCell sx={{ width: 40, fontWeight: \"normal\" }} />\n )}\n {onArchive && (\n <TableCell sx={{ width: 80, fontWeight: \"normal\" }} />\n )}\n {onDelete && (\n <TableCell sx={{ width: 40, fontWeight: \"normal\" }} />\n )}\n </TableRow>\n </TableHead>\n {/* TABLE BODY */}\n <TableBody>\n {data.map((row) => (\n <TableRow key={row.id}>\n {columns.map((col) => (\n <TableCell\n key={`${row.id}-${col.columnKey}`}\n onClick={() => handleCellClick(row, col.columnKey)}\n sx={getCellSx(row, {\n cursor: isEditable(col, row) ? \"pointer\" : \"default\",\n padding: isEditable(col, row) ? \"8px 16px\" : undefined\n })}\n >\n {isEditable(col, row) ? (\n <EditableCell\n value={row[col.columnKey]}\n isEditing={\n editingCell &&\n editingCell.rowId === row.id &&\n editingCell.columnKey === col.columnKey\n }\n onBlur={(newValue, isValid) =>\n handleCellBlur(\n row.id,\n col.columnKey,\n newValue,\n isValid\n )\n }\n validation={col.validation}\n />\n ) : (\n <TableCellContent row={row} col={col} />\n )}\n </TableCell>\n ))}\n {onEdit && (\n <TableCell\n sx={getCellSx(row)}\n className={styles.dottedBorderLeft}\n >\n <IconButton\n onClick={() => onEdit(row)}\n size=\"small\"\n aria-label={T.translate(\"general.edit\")}\n >\n <EditIcon />\n </IconButton>\n </TableCell>\n )}\n {onArchive && (\n <TableCell\n align=\"center\"\n sx={{\n ...getCellSx(row, { width: 80, fontWeight: \"normal\" })\n }}\n className={styles.dottedBorderLeft}\n >\n <Button\n variant=\"text\"\n color=\"inherit\"\n size=\"small\"\n onClick={() => onArchive(row)}\n sx={{\n fontSize: \"1.3rem\",\n fontWeight: \"normal\",\n lineHeight: \"2.2rem\",\n padding: \"4px 5px\",\n color: \"rgba(0,0,0,0.56)\"\n }}\n >\n {row.is_archived\n ? T.translate(\"general.unarchive\")\n : T.translate(\"general.archive\")}\n </Button>\n </TableCell>\n )}\n {onDelete && (\n <TableCell\n sx={getCellSx(row)}\n className={styles.dottedBorderLeft}\n >\n <IconButton\n onClick={() => handleDelete(row)}\n size=\"small\"\n aria-label={T.translate(\"general.delete\")}\n >\n <DeleteIcon />\n </IconButton>\n </TableCell>\n )}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n {perPage && currentPage && onPageChange && (\n <CustomTablePagination\n totalRows={totalRows ?? data.length}\n perPage={perPage}\n currentPage={currentPage}\n onPageChange={onPageChange}\n onPerPageChange={onPerPageChange}\n />\n )}\n </Paper>\n </Box>\n );\n};\n\nMuiTableEditable.propTypes = {\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n columnKey: PropTypes.string.isRequired,\n header: PropTypes.node,\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n align: PropTypes.string,\n sortable: PropTypes.bool,\n editable: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n validation: PropTypes.shape({ schema: PropTypes.object }),\n render: PropTypes.func\n })\n ),\n data: PropTypes.arrayOf(PropTypes.object),\n totalRows: PropTypes.number,\n // Pagination only renders when all three are provided — see line 366.\n perPage: PropTypes.number,\n currentPage: PropTypes.number,\n onPageChange: PropTypes.func,\n onPerPageChange: PropTypes.func,\n onSort: PropTypes.func,\n options: PropTypes.shape({\n sortCol: PropTypes.string,\n sortDir: PropTypes.oneOf([1, -1]),\n disableProp: PropTypes.string\n }),\n getName: PropTypes.func,\n onEdit: PropTypes.func,\n onArchive: PropTypes.func,\n onDelete: PropTypes.func,\n onCellChange: PropTypes.func,\n deleteDialogBody: PropTypes.func\n};\n\nexport default MuiTableEditable;\n"],"names":["root","factory","exports","module","define","amd","this","require","iconMap","warning","React","Warning","color","success","CheckCircle","error","Error","info","Info","ConfirmDialog","open","title","text","iconType","onConfirm","onCancel","confirmButtonText","confirmButtonColor","cancelButtonText","cancelButtonColor","Dialog","onClose","DialogTitle","sx","p","component","Typography","variant","Divider","DialogContent","style","display","alignItems","marginRight","margin","DialogActions","Button","fullWidth","onClick","whiteSpace","minWidth","propTypes","PropTypes","isRequired","defaultProps","BRIDGE_KEY","_global","globalThis","window","showConfirmDialog","PAGINATION_SX","marginTop","fontSize","fontWeight","marginLeft","BASE_PER_PAGE_OPTIONS","DEFAULT_PER_PAGE","TWENTY_PER_PAGE","FIFTY_PER_PAGE","CustomTablePagination","totalRows","perPage","currentPage","onPageChange","onPerPageChange","perPageOptions","includes","sort","a","b","TablePagination","count","rowsPerPageOptions","rowsPerPage","page","handlePageChange","_","newPage","onRowsPerPageChange","ev","parseInt","target","value","undefined","labelRowsPerPage","T","contentStyle","overflowWrap","TableCellContent","row","col","isBoolean","columnKey","CheckIcon","CloseIcon","render","truncateText","TruncateText","charLimit","children","ref","isOverflowing","setIsOverflowing","shouldCharTruncate","isTruncated","length","displayContent","slice","tooltipTitle","Tooltip","placement","componentsProps","tooltip","onMouseEnter","current","scrollWidth","offsetWidth","overflow","textOverflow","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","ARCHIVED_CELL_SX","backgroundColor","EditableCell","isEditing","onBlur","validation","inputValue","setInputValue","isHovering","setIsHovering","setError","handleValidationAndSave","newValue","isValid","message","validateValue","schema","validateSync","err","handleKeyDown","e","preventDefault","TextField","autoFocus","onChange","onKeyDown","size","helperText","Box","position","width","height","onMouseLeave","flex","EditIcon","opacity","right","MuiTableEditable","columns","data","onSort","options","sortCol","sortDir","disableProp","getName","item","name","onEdit","onArchive","onDelete","onCellChange","deleteDialogBody","tableSx","editingCell","setEditingCell","getCellSx","baseSx","_objectSpread","getArchivedCellSx","isEditable","editable","Paper","elevation","mb","TableContainer","borderRadius","boxShadow","Table","TableHead","TableRow","map","TableCell","maxWidth","align","sortable","TableSortLabel","active","direction","header","visuallyHidden","TableBody","id","handleCellClick","column","find","rowId","cursor","padding","handleCellBlur","className","styles","IconButton","lineHeight","is_archived","async","type","showCancelButton","handleDelete","Dele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Q,IAAS,CACRrP,GAAE0I,EAAAA,EAAA,IACGG,EAAAA,EAAAA,IAAgBlC,EAAK0H,EAAQzF,cAAY,IAC5C9G,WAAY,WAEdmO,UAAWC,EAAAA,EAAOC,kBAElB1R,EAAAA,cAAC2R,EAAAA,WAAU,CACTrP,QAASA,IAAM+N,EAAanI,GAC5BgH,KAAK,QACL,aAAY7J,IAAAA,UAAY,mBAExBrF,EAAAA,cAAC8R,IAAU,aAQd,EAIjBrC,EAAiBhN,UAAY,CAC3BiN,QAAShN,IAAAA,QACPA,IAAAA,MAAgB,CACdiF,UAAWjF,IAAAA,OAAiBC,WAC5BkF,OAAQnF,IAAAA,KACRqE,MAAOrE,IAAAA,UAAoB,CAACA,IAAAA,OAAkBA,IAAAA,SAC9CoO,MAAOpO,IAAAA,OACP8E,SAAU9E,IAAAA,KACV6N,SAAU7N,IAAAA,UAAoB,CAACA,IAAAA,KAAgBA,IAAAA,OAC/CmL,WAAYnL,IAAAA,MAAgB,CAAE8L,OAAQ9L,IAAAA,SACtCyF,OAAQzF,IAAAA,QAGZiN,KAAMjN,IAAAA,QAAkBA,IAAAA,QACxBkB,UAAWlB,IAAAA,OAEXmB,QAASnB,IAAAA,OACToB,YAAapB,IAAAA,OACbqB,aAAcrB,IAAAA,KACdsB,gBAAiBtB,IAAAA,KACjB6E,OAAQ7E,IAAAA,KACRkN,QAASlN,IAAAA,MAAgB,CACvB2E,QAAS3E,IAAAA,OACT4E,QAAS5E,IAAAA,MAAgB,CAAC,GAAI,IAC9ByH,YAAazH,IAAAA,SAEf8C,QAAS9C,IAAAA,KACTmN,OAAQnN,IAAAA,KACRoN,UAAWpN,IAAAA,KACX6C,SAAU7C,IAAAA,KACVqN,aAAcrN,IAAAA,KACdkD,iBAAkBlD,IAAAA,MAGpB,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Info\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Warning\"","webpack://openstack-uicore-foundation/./src/components/mui/confirm-dialog.js","webpack://openstack-uicore-foundation/./src/components/mui/showConfirmDialog.js","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TablePagination\"","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/CustomTablePagination.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/create-delete-handler.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/scroll-fade-overlay.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/sortable-header-content.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/table-cell-content.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/table-shell.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/table-styles.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/use-scroll-fade.js","webpack://openstack-uicore-foundation/./src/components/mui/truncate-text.js","webpack://openstack-uicore-foundation/./src/utils/constants.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/styles.module.less?7b04","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Check\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/CheckCircle\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Close\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Delete\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Edit\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Error\"","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/Button\"","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/TableSortLabel\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Tooltip\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/styles\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/utils\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"lodash/isBoolean\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","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/./src/components/mui/tables/editable-table/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 ","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Info\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Warning\");","/**\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 PropTypes from \"prop-types\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n Typography\n} from \"@mui/material\";\nimport CheckCircle from \"@mui/icons-material/CheckCircle\";\nimport Error from \"@mui/icons-material/Error\";\nimport Info from \"@mui/icons-material/Info\";\nimport Warning from \"@mui/icons-material/Warning\";\n\nconst iconMap = {\n warning: <Warning color=\"warning\" />,\n success: <CheckCircle color=\"success\" />,\n error: <Error color=\"error\" />,\n info: <Info color=\"info\" />\n};\n\nconst ConfirmDialog = ({\n open,\n title,\n text,\n iconType = \"\",\n onConfirm,\n onCancel,\n confirmButtonText = \"Confirm\",\n confirmButtonColor = \"primary\",\n cancelButtonText = \"Cancel\",\n cancelButtonColor = \"primary\"\n}) => (\n <Dialog open={open} onClose={onCancel}>\n <DialogTitle sx={{ p: 2 }} component=\"div\">\n <Typography variant=\"h5\">{title}</Typography>\n </DialogTitle>\n <Divider />\n <DialogContent sx={{ p: 2 }}>\n <div style={{ display: \"flex\", alignItems: \"center\" }}>\n {iconMap[iconType] && (\n <div style={{ marginRight: 10 }}>{iconMap[iconType]}</div>\n )}\n <Typography variant=\"body1\">{text}</Typography>\n </div>\n </DialogContent>\n <Divider sx={{ margin: \"10px 0px 10px 0px\" }} />\n <DialogActions>\n <Button\n fullWidth\n onClick={onCancel}\n color={cancelButtonColor}\n variant=\"outlined\"\n sx={{ whiteSpace: \"nowrap\", minWidth: 100 }}\n >\n {cancelButtonText}\n </Button>\n <Button\n fullWidth\n onClick={onConfirm}\n color={confirmButtonColor}\n variant=\"contained\"\n sx={{ whiteSpace: \"nowrap\", minWidth: 100 }}\n >\n {confirmButtonText}\n </Button>\n </DialogActions>\n </Dialog>\n);\n\nConfirmDialog.propTypes = {\n open: PropTypes.bool,\n title: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n iconType: PropTypes.string,\n onConfirm: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n confirmButtonText: PropTypes.string,\n confirmButtonColor: PropTypes.string,\n cancelButtonText: PropTypes.string,\n cancelButtonColor: PropTypes.string\n};\n\nConfirmDialog.defaultProps = {\n open: false,\n iconType: \"warning\",\n confirmButtonText: \"Confirm\",\n confirmButtonColor: \"primary\",\n cancelButtonText: \"Cancel\",\n cancelButtonColor: \"default\"\n};\n\nexport default ConfirmDialog;\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, { useState, useEffect } from \"react\";\nimport ConfirmDialog from \"./confirm-dialog\";\n\n/**\n * Imperative confirm dialog API.\n *\n * SETUP (required):\n * Place <GlobalConfirmDialog /> at the root of your app:\n *\n * import { GlobalConfirmDialog } from\n * 'openstack-uicore-foundation/lib/components/mui/show-confirm-dialog';\n *\n * function App() {\n * return (\n * <>\n * <YourApp />\n * <GlobalConfirmDialog />\n * </>\n * );\n * }\n *\n * USAGE (works from any file — the bridge is shared via globalThis):\n * import showConfirmDialog from\n * 'openstack-uicore-foundation/lib/components/mui/show-confirm-dialog';\n *\n * const confirmed = await showConfirmDialog({\n * title: 'Delete Item?',\n * text: 'This cannot be undone'\n * });\n */\n\n// Shared bridge reference stored on globalThis so that all webpack bundles\n// (table, sortable-table, show-confirm-dialog, index, etc.) read/write the\n// same callback. A module-level variable would be duplicated per bundle.\nconst BRIDGE_KEY = \"__oif_confirm_dialog_bridge__\";\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : {};\n\n/**\n * @param param0\n * @param param0.title\n * @param param0.text\n * @param param0.iconType\n * @param param0.confirmButtonText\n * @param param0.cancelButtonText\n * @param param0.confirmButtonColor\n * @param param0.cancelButtonColor\n * @returns {Promise<boolean>}\n */\nconst showConfirmDialog = ({\n title,\n text,\n iconType = \"\",\n confirmButtonText = \"Confirm\",\n cancelButtonText = \"Cancel\",\n confirmButtonColor = \"primary\",\n cancelButtonColor = \"primary\"\n}) => {\n if (!_global[BRIDGE_KEY]) {\n throw new Error(\n \"[openstack-uicore-foundation] showConfirmDialog: <GlobalConfirmDialog /> is not mounted. \" +\n \"Add <GlobalConfirmDialog /> to the root of your app.\"\n );\n }\n\n return _global[BRIDGE_KEY]({\n title,\n text,\n iconType,\n confirmButtonText,\n cancelButtonText,\n confirmButtonColor,\n cancelButtonColor\n });\n};\n\n/**\n * Global confirm dialog component. Place at the root of your app:\n *\n * <App>\n * ...\n * <GlobalConfirmDialog />\n * </App>\n *\n * Then call showConfirmDialog() anywhere.\n */\nexport const GlobalConfirmDialog = () => {\n const [dialogState, setDialogState] = useState(null);\n\n useEffect(() => {\n _global[BRIDGE_KEY] = (options) => {\n return new Promise((resolve) => {\n setDialogState({ ...options, open: true, onResolve: resolve });\n });\n };\n return () => { _global[BRIDGE_KEY] = null; };\n }, []);\n\n const handleConfirm = () => {\n if (dialogState?.onResolve) dialogState.onResolve(true);\n setDialogState(null);\n };\n\n const handleCancel = () => {\n if (dialogState?.onResolve) dialogState.onResolve(false);\n setDialogState(null);\n };\n\n if (!dialogState) return null;\n\n return (\n <ConfirmDialog\n open={dialogState.open}\n title={dialogState.title}\n text={dialogState.text}\n iconType={dialogState.iconType}\n confirmButtonText={dialogState.confirmButtonText}\n cancelButtonText={dialogState.cancelButtonText}\n confirmButtonColor={dialogState.confirmButtonColor}\n cancelButtonColor={dialogState.cancelButtonColor}\n onConfirm={handleConfirm}\n onCancel={handleCancel}\n />\n );\n};\n\nexport default showConfirmDialog;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TablePagination\");","/**\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 * as React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport TablePagination from \"@mui/material/TablePagination\";\nimport PropTypes from \"prop-types\";\nimport { DEFAULT_PER_PAGE, FIFTY_PER_PAGE, TWENTY_PER_PAGE } from \"../../../../utils/constants\";\n\nconst PAGINATION_SX = {\n \".MuiTablePagination-toolbar\": {\n alignItems: \"baseline\",\n marginTop: \"1.6rem\"\n },\n \".MuiTablePagination-selectLabel\": {\n color: \"rgba(0, 0, 0, 0.6)\",\n fontSize: \"12px\",\n fontWeight: \"normal\"\n },\n \".MuiTablePagination-select\": {\n color: \"rgba(0, 0, 0, 0.6)\",\n fontSize: \"12px\",\n fontWeight: \"normal\"\n },\n \".MuiTablePagination-spacer\": {\n display: \"none\"\n },\n \".MuiTablePagination-displayedRows\": {\n marginLeft: \"auto\"\n }\n};\n\nconst BASE_PER_PAGE_OPTIONS = [DEFAULT_PER_PAGE, TWENTY_PER_PAGE, FIFTY_PER_PAGE];\n\nconst CustomTablePagination = ({ totalRows, perPage, currentPage, onPageChange, onPerPageChange }) => {\n const perPageOptions = React.useMemo(() => {\n if (!onPerPageChange) return [perPage];\n return BASE_PER_PAGE_OPTIONS.includes(perPage)\n ? BASE_PER_PAGE_OPTIONS\n : [...BASE_PER_PAGE_OPTIONS, perPage].sort((a, b) => a - b);\n }, [perPage, onPerPageChange]);\n\n const handlePageChange = (_, newPage) => {\n onPageChange(newPage + 1);\n };\n\n const handleRowsPerPageChange = (ev) => {\n onPerPageChange(parseInt(ev.target.value, 10));\n };\n\n return (\n <TablePagination\n component=\"div\"\n count={totalRows ?? 0}\n rowsPerPageOptions={perPageOptions}\n rowsPerPage={perPage}\n page={currentPage - 1}\n onPageChange={handlePageChange}\n onRowsPerPageChange={onPerPageChange ? handleRowsPerPageChange : undefined}\n labelRowsPerPage={T.translate(\"mui_table.rows_per_page\")}\n sx={PAGINATION_SX}\n />\n );\n};\n\nCustomTablePagination.propTypes = {\n totalRows: PropTypes.number,\n perPage: PropTypes.number.isRequired,\n currentPage: PropTypes.number.isRequired,\n onPageChange: PropTypes.func.isRequired,\n onPerPageChange: PropTypes.func\n};\n\nexport default CustomTablePagination;\n","import T from \"i18n-react/dist/i18n-react\";\nimport showConfirmDialog from \"../../showConfirmDialog\";\n\nconst createDeleteHandler = ({\n onDelete,\n getName = (item) => item.name,\n deleteDialogTitle,\n deleteDialogBody,\n deleteDialogConfirmText,\n confirmButtonColor\n}) => async (item) => {\n const isConfirmed = await showConfirmDialog({\n title: deleteDialogTitle || T.translate(\"general.are_you_sure\"),\n text:\n typeof deleteDialogBody === \"function\"\n ? deleteDialogBody(getName(item))\n : deleteDialogBody ||\n `${T.translate(\"general.row_remove_warning\")} ${getName(item)}`,\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor,\n confirmButtonText:\n deleteDialogConfirmText || T.translate(\"general.yes_delete\")\n });\n\n if (isConfirmed) {\n onDelete(item.id);\n }\n};\n\nexport default createDeleteHandler;\n","import * as React from \"react\";\nimport Box from \"@mui/material/Box\";\nimport PropTypes from \"prop-types\";\nimport { alpha } from \"@mui/material/styles\";\n\nconst FADE_WIDTH = 64;\nconst FADE_OPACITY = 0.85;\n\nconst ScrollFadeOverlay = ({ side, visible }) => (\n <Box\n sx={(theme) => {\n const tint = alpha(theme.palette.background.paper, FADE_OPACITY);\n return {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n [side]: 0,\n width: FADE_WIDTH,\n pointerEvents: \"none\",\n opacity: visible ? 1 : 0,\n transition: \"opacity 0.2s ease\",\n background: `linear-gradient(to ${side === \"left\" ? \"right\" : \"left\"}, ${tint}, transparent)`\n };\n }}\n />\n);\n\nScrollFadeOverlay.propTypes = {\n side: PropTypes.oneOf([\"left\", \"right\"]).isRequired,\n visible: PropTypes.bool\n};\n\nexport default ScrollFadeOverlay;\n","import * as React from \"react\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport Box from \"@mui/material/Box\";\nimport TableSortLabel from \"@mui/material/TableSortLabel\";\nimport PropTypes from \"prop-types\";\nimport { visuallyHidden } from \"@mui/utils\";\n\nconst SortableHeaderContent = ({ col, sortCol, sortDir, onSort, sx }) => {\n if (!col.sortable) {\n return sx ? <span style={sx}>{col.header}</span> : col.header;\n }\n\n return (\n <TableSortLabel\n active={sortCol === col.columnKey}\n direction={sortCol === col.columnKey && sortDir === -1 ? \"desc\" : \"asc\"}\n onClick={() => onSort(col.columnKey, sortDir * -1)}\n sx={sx}\n >\n {col.header}\n {sortCol === col.columnKey ? (\n <Box component=\"span\" sx={visuallyHidden}>\n {sortDir === -1\n ? T.translate(\"mui_table.sorted_desc\")\n : T.translate(\"mui_table.sorted_asc\")}\n </Box>\n ) : null}\n </TableSortLabel>\n );\n};\n\nSortableHeaderContent.propTypes = {\n col: PropTypes.object.isRequired,\n sortCol: PropTypes.string,\n sortDir: PropTypes.oneOf([1, -1]),\n onSort: PropTypes.func,\n sx: PropTypes.object\n};\n\nexport default SortableHeaderContent;\n","import * as React from \"react\";\nimport isBoolean from \"lodash/isBoolean\";\nimport CheckIcon from \"@mui/icons-material/Check\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport TruncateText from \"../../truncate-text\";\n\nconst contentStyle = {\n fontWeight: \"normal\",\n overflowWrap: \"break-word\",\n};\n\nconst TableCellContent = ({ row, col }) => {\n return (\n <span style={contentStyle}>\n {col.render ? (\n col.render(row)\n ) : isBoolean(row[col.columnKey]) ? (\n row[col.columnKey] ? (\n <CheckIcon fontSize=\"large\" />\n ) : (\n <CloseIcon fontSize=\"large\" />\n )\n ) : col.truncateText ? (\n <TruncateText charLimit={col.truncateText}>\n {row[col.columnKey]}\n </TruncateText>\n ) : (\n row[col.columnKey]\n )}\n </span>\n );\n};\n\nexport default TableCellContent;","import * as React from \"react\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport PropTypes from \"prop-types\";\nimport CustomTablePagination from \"./CustomTablePagination\";\nimport useScrollFade from \"./use-scroll-fade\";\nimport ScrollFadeOverlay from \"./scroll-fade-overlay\";\n\nconst TableShell = ({\n children,\n totalRows,\n perPage,\n currentPage,\n onPageChange,\n onPerPageChange\n}) => {\n const { containerRef, showLeftFade, showRightFade } = useScrollFade();\n\n return (\n <Box sx={{ width: \"100%\" }}>\n <Paper elevation={0} sx={{ width: \"100%\", mb: 2 }}>\n <Box sx={{ position: \"relative\" }}>\n <TableContainer\n ref={containerRef}\n component={Paper}\n sx={{ borderRadius: 0, boxShadow: \"none\" }}\n >\n {children}\n </TableContainer>\n <ScrollFadeOverlay side=\"left\" visible={showLeftFade} />\n <ScrollFadeOverlay side=\"right\" visible={showRightFade} />\n </Box>\n\n {perPage && currentPage && onPageChange && (\n <CustomTablePagination\n totalRows={totalRows}\n perPage={perPage}\n currentPage={currentPage}\n onPageChange={onPageChange}\n onPerPageChange={onPerPageChange}\n />\n )}\n </Paper>\n </Box>\n );\n};\n\nTableShell.propTypes = {\n children: PropTypes.node,\n totalRows: PropTypes.number,\n perPage: PropTypes.number,\n currentPage: PropTypes.number,\n onPageChange: PropTypes.func,\n onPerPageChange: PropTypes.func\n};\n\nexport default TableShell;\n","export const MIN_WIDTH_SMALL = 690; // sm breakpoint content width\nexport const MIN_WIDTH_WIDE = 910; // md breakpoint content width\nexport const SMALL_TABLE_MAX_COLUMNS = 3; // fewer than 4 data columns = small\nexport const DEFAULT_COLUMN_MIN_WIDTH = 40; // floor for columns with no explicit width\n\nexport const ARCHIVED_CELL_SX = {\n backgroundColor: \"background.light\",\n color: \"text.disabled\"\n};\n\nexport const ACTION_CELL_SX = {\n p: 0,\n textAlign: \"center\",\n verticalAlign: \"middle\",\n width: 40,\n minWidth: 40,\n maxWidth: 40\n};\n\nexport const getResponsiveTableSx = (dataColumnCount) => ({\n tableLayout: \"auto\",\n minWidth:\n dataColumnCount <= SMALL_TABLE_MAX_COLUMNS ? MIN_WIDTH_SMALL : MIN_WIDTH_WIDE\n});\n\n// same bucket used for minWidth: fewer columns can stay uncollapsed longer\nexport const getActionsMenuBreakpoint = (dataColumnCount) =>\n dataColumnCount <= SMALL_TABLE_MAX_COLUMNS ? \"md\" : \"lg\";\n\nexport const getColumnWidthSx = (col) => ({\n minWidth: col.width ?? DEFAULT_COLUMN_MIN_WIDTH,\n ...(col.width && {\n width: col.width,\n maxWidth: col.width\n })\n});\n\nexport const getArchivedRowSx = (row, disableProp) =>\n disableProp && row[disableProp] ? ARCHIVED_CELL_SX : {};\n\nexport const getActionCellSx = (row, disableProp, widthOverride) => ({\n ...ACTION_CELL_SX,\n ...(widthOverride && {\n width: widthOverride,\n minWidth: widthOverride,\n maxWidth: widthOverride\n }),\n ...getArchivedRowSx(row, disableProp)\n});\n","import * as React from \"react\";\n\nconst useScrollFade = () => {\n const containerRef = React.useRef(null);\n const [showLeftFade, setShowLeftFade] = React.useState(false);\n const [showRightFade, setShowRightFade] = React.useState(false);\n\n const updateFades = React.useCallback(() => {\n const el = containerRef.current;\n if (!el) return;\n setShowLeftFade(el.scrollLeft > 0);\n setShowRightFade(Math.ceil(el.scrollLeft + el.clientWidth) < el.scrollWidth);\n }, []);\n\n React.useEffect(() => {\n const el = containerRef.current;\n if (!el) return undefined;\n\n updateFades();\n el.addEventListener(\"scroll\", updateFades);\n\n return () => el.removeEventListener(\"scroll\", updateFades);\n }, [updateFades]);\n\n return { containerRef, showLeftFade, showRightFade };\n};\n\nexport default useScrollFade;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nconst TruncateText = ({ children, charLimit }) => {\n const ref = React.useRef(null);\n const [isOverflowing, setIsOverflowing] = React.useState(false);\n\n const shouldCharTruncate = typeof charLimit === \"number\";\n const isTruncated = shouldCharTruncate && children.length > charLimit;\n\n const displayContent = isTruncated ? children.slice(0, charLimit) + \"...\" : children;\n const tooltipTitle = isTruncated ? children : isOverflowing ? children : \"\";\n\n return (\n <Tooltip title={tooltipTitle} placement=\"top\" componentsProps={{ tooltip: { sx: { fontSize: \"1.2rem\" } } }}>\n <span\n ref={ref}\n onMouseEnter={() => {\n if (ref.current && !shouldCharTruncate)\n setIsOverflowing(ref.current.scrollWidth > ref.current.offsetWidth);\n }}\n style={{ display: \"block\", overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" }}\n >\n <span style={{ fontWeight: \"normal\" }}>{displayContent}</span>\n </span>\n </Tooltip>\n );\n};\n\nTruncateText.propTypes = {\n children: PropTypes.string,\n charLimit: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),\n};\n\nexport default TruncateText;\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 ASYNC_SELECT_SAFETY_TIMEOUT = 15000;\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\nexport const SPONSOR_ORDER_GRID_ITEM_TYPES = {\n CHARGE: \"Charge\",\n PAYMENT: \"Payment\",\n REFUND: \"Refund\",\n DISCOUNT: \"Discount\",\n CANCELLED: \"Cancelled\"\n};","// extracted by mini-css-extract-plugin\nexport default {\"dottedBorderLeft\":\"KNETxMZ1aGPbDi44wmnH\"};","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@mui/icons-material/Check\");","module.exports = require(\"@mui/icons-material/CheckCircle\");","module.exports = require(\"@mui/icons-material/Close\");","module.exports = require(\"@mui/icons-material/Delete\");","module.exports = require(\"@mui/icons-material/Edit\");","module.exports = require(\"@mui/icons-material/Error\");","module.exports = require(\"@mui/material\");","module.exports = require(\"@mui/material/Box\");","module.exports = require(\"@mui/material/Button\");","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/TableSortLabel\");","module.exports = require(\"@mui/material/Tooltip\");","module.exports = require(\"@mui/material/styles\");","module.exports = require(\"@mui/utils\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"lodash/isBoolean\");","module.exports = require(\"prop-types\");","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};","/**\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 * as React from \"react\";\nimport PropTypes from \"prop-types\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableHead from \"@mui/material/TableHead\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { IconButton, TextField } from \"@mui/material\";\nimport EditIcon from \"@mui/icons-material/Edit\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport styles from \"../components/styles.module.less\";\n\nimport TableCellContent from \"../components/table-cell-content\";\nimport TableShell from \"../components/table-shell\";\nimport createDeleteHandler from \"../components/create-delete-handler\";\nimport SortableHeaderContent from \"../components/sortable-header-content\";\nimport {\n getResponsiveTableSx,\n getColumnWidthSx,\n getArchivedRowSx,\n getActionCellSx,\n ACTION_CELL_SX\n} from \"../components/table-styles\";\n\nconst validateValue = (value, validation) => {\n if (!validation) return { isValid: true };\n\n // validate with yup schema\n if (\n validation.schema &&\n typeof validation.schema.validateSync === \"function\"\n ) {\n try {\n validation.schema.validateSync(value);\n return { isValid: true, message: null };\n } catch (err) {\n return { isValid: false, message: err.message };\n }\n }\n\n return { isValid: true };\n};\n\n// Updated component to handle editable cells with hover edit icon\nconst EditableCell = ({ value, isEditing, onBlur, validation }) => {\n const [inputValue, setInputValue] = React.useState(value);\n const [isHovering, setIsHovering] = React.useState(false);\n const [error, setError] = React.useState(null);\n\n React.useEffect(() => {\n setInputValue(value);\n setError(null);\n }, [value]);\n\n const handleValidationAndSave = (newValue) => {\n const { isValid, message } = validateValue(newValue, validation);\n\n if (isValid) {\n setError(null);\n onBlur(newValue, true);\n } else {\n setError(message);\n }\n };\n\n const handleKeyDown = (e) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n handleValidationAndSave(inputValue);\n }\n };\n\n if (isEditing) {\n return (\n <TextField\n autoFocus\n value={inputValue}\n onChange={(e) => {\n setInputValue(e.target.value);\n if (error) setError(null);\n }}\n onBlur={() => {\n handleValidationAndSave(inputValue);\n }}\n onKeyDown={handleKeyDown}\n size=\"small\"\n fullWidth\n variant=\"standard\"\n error={!!error}\n helperText={error}\n />\n );\n }\n\n return (\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n position: \"relative\",\n width: \"100%\",\n height: \"100%\"\n }}\n onMouseEnter={() => setIsHovering(true)}\n onMouseLeave={() => setIsHovering(false)}\n >\n <span style={{ flex: 1, fontWeight: \"normal\" }}>{value}</span>\n {isHovering && (\n <EditIcon\n fontSize=\"small\"\n sx={{\n opacity: 0.5,\n position: \"absolute\",\n right: 0,\n \"&:hover\": {\n opacity: 1\n }\n }}\n />\n )}\n </Box>\n );\n};\n\nconst MuiTableEditable = ({\n columns = [],\n data = [],\n totalRows,\n perPage,\n currentPage,\n onPageChange,\n onPerPageChange,\n onSort,\n options = { sortCol: \"\", sortDir: 1, disableProp: null },\n getName = (item) => item.name,\n onEdit,\n onArchive,\n onDelete,\n onCellChange, // New prop for handling cell value changes\n deleteDialogBody,\n tableSx = {}\n}) => {\n // State to track which cell is currently being edited\n const [editingCell, setEditingCell] = React.useState(null);\n\n const { sortCol, sortDir } = options;\n\n const getCellSx = (row, baseSx = {}) => ({\n ...baseSx,\n ...getArchivedRowSx(row, options.disableProp)\n });\n\n const handleDelete = createDeleteHandler({\n onDelete,\n getName,\n deleteDialogBody,\n confirmButtonColor: \"warning\"\n });\n\n const isEditable = (col, row) =>\n typeof col.editable === \"function\" ? col.editable(row) : !!col.editable;\n\n // Handler for starting edit mode on a cell\n const handleCellClick = (row, columnKey) => {\n // Check if the column is editable\n const column = columns.find((col) => col.columnKey === columnKey);\n if (column && isEditable(column, row)) {\n setEditingCell({ rowId: row.id, columnKey });\n }\n };\n\n // Handler for saving changes when editing is complete\n const handleCellBlur = (rowId, columnKey, newValue, isValid) => {\n if (onCellChange && isValid) {\n onCellChange(rowId, columnKey, newValue);\n }\n setEditingCell(null);\n };\n\n return (\n <TableShell\n totalRows={totalRows ?? data.length}\n perPage={perPage}\n currentPage={currentPage}\n onPageChange={onPageChange}\n onPerPageChange={onPerPageChange}\n >\n <Table sx={{ ...getResponsiveTableSx(columns.length), ...tableSx }}>\n {/* TABLE HEADER */}\n <TableHead sx={{ backgroundColor: \"#EAEAEA\" }}>\n <TableRow>\n {columns.map((col) => (\n <TableCell\n key={col.columnKey}\n sx={{\n ...getColumnWidthSx(col),\n fontWeight: \"normal\",\n ...(col.headSx || {})\n }}\n align={col.align ?? \"left\"}\n >\n <SortableHeaderContent\n col={col}\n sortCol={sortCol}\n sortDir={sortDir}\n onSort={onSort}\n sx={{ fontWeight: \"normal\" }}\n />\n </TableCell>\n ))}\n {onEdit && (\n <TableCell sx={{ ...ACTION_CELL_SX, fontWeight: \"normal\" }} />\n )}\n {onArchive && (\n <TableCell\n sx={{\n ...ACTION_CELL_SX,\n width: 80,\n minWidth: 80,\n maxWidth: 80,\n fontWeight: \"normal\"\n }}\n />\n )}\n {onDelete && (\n <TableCell sx={{ ...ACTION_CELL_SX, fontWeight: \"normal\" }} />\n )}\n </TableRow>\n </TableHead>\n {/* TABLE BODY */}\n <TableBody>\n {data.map((row) => (\n <TableRow key={row.id}>\n {columns.map((col) => (\n <TableCell\n key={`${row.id}-${col.columnKey}`}\n onClick={() => handleCellClick(row, col.columnKey)}\n sx={{\n ...getColumnWidthSx(col),\n ...getCellSx(row, {\n cursor: isEditable(col, row) ? \"pointer\" : \"default\",\n padding: isEditable(col, row) ? \"8px 16px\" : undefined,\n ...(col.cellSx || {})\n })\n }}\n >\n {isEditable(col, row) ? (\n <EditableCell\n value={row[col.columnKey]}\n isEditing={\n editingCell &&\n editingCell.rowId === row.id &&\n editingCell.columnKey === col.columnKey\n }\n onBlur={(newValue, isValid) =>\n handleCellBlur(\n row.id,\n col.columnKey,\n newValue,\n isValid\n )\n }\n validation={col.validation}\n />\n ) : (\n <TableCellContent row={row} col={col} />\n )}\n </TableCell>\n ))}\n {onEdit && (\n <TableCell\n sx={{\n ...getActionCellSx(row, options.disableProp),\n fontWeight: \"normal\"\n }}\n className={styles.dottedBorderLeft}\n >\n <IconButton\n onClick={() => onEdit(row)}\n size=\"small\"\n aria-label={T.translate(\"general.edit\")}\n >\n <EditIcon />\n </IconButton>\n </TableCell>\n )}\n {onArchive && (\n <TableCell\n align=\"center\"\n sx={{\n ...getActionCellSx(row, options.disableProp, 80),\n fontWeight: \"normal\"\n }}\n className={styles.dottedBorderLeft}\n >\n <Button\n variant=\"text\"\n color=\"inherit\"\n size=\"small\"\n onClick={() => onArchive(row)}\n sx={{\n fontSize: \"1.3rem\",\n fontWeight: \"normal\",\n lineHeight: \"2.2rem\",\n padding: \"4px 5px\",\n color: \"rgba(0,0,0,0.56)\"\n }}\n >\n {row.is_archived\n ? T.translate(\"general.unarchive\")\n : T.translate(\"general.archive\")}\n </Button>\n </TableCell>\n )}\n {onDelete && (\n <TableCell\n sx={{\n ...getActionCellSx(row, options.disableProp),\n fontWeight: \"normal\"\n }}\n className={styles.dottedBorderLeft}\n >\n <IconButton\n onClick={() => handleDelete(row)}\n size=\"small\"\n aria-label={T.translate(\"general.delete\")}\n >\n <DeleteIcon />\n </IconButton>\n </TableCell>\n )}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </TableShell>\n );\n};\n\nMuiTableEditable.propTypes = {\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n columnKey: PropTypes.string.isRequired,\n header: PropTypes.node,\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n align: PropTypes.string,\n sortable: PropTypes.bool,\n editable: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n validation: PropTypes.shape({ schema: PropTypes.object }),\n render: PropTypes.func\n })\n ),\n data: PropTypes.arrayOf(PropTypes.object),\n totalRows: PropTypes.number,\n // Pagination only renders when all three are provided — see line 366.\n perPage: PropTypes.number,\n currentPage: PropTypes.number,\n onPageChange: PropTypes.func,\n onPerPageChange: PropTypes.func,\n onSort: PropTypes.func,\n options: PropTypes.shape({\n sortCol: PropTypes.string,\n sortDir: PropTypes.oneOf([1, -1]),\n disableProp: PropTypes.string\n }),\n getName: PropTypes.func,\n onEdit: PropTypes.func,\n onArchive: PropTypes.func,\n onDelete: PropTypes.func,\n onCellChange: PropTypes.func,\n deleteDialogBody: PropTypes.func\n};\n\nexport default MuiTableEditable;\n"],"names":["root","factory","exports","module","define","amd","this","require","iconMap","warning","React","Warning","color","success","CheckCircle","error","Error","info","Info","ConfirmDialog","open","title","text","iconType","onConfirm","onCancel","confirmButtonText","confirmButtonColor","cancelButtonText","cancelButtonColor","Dialog","onClose","DialogTitle","sx","p","component","Typography","variant","Divider","DialogContent","style","display","alignItems","marginRight","margin","DialogActions","Button","fullWidth","onClick","whiteSpace","minWidth","propTypes","PropTypes","isRequired","defaultProps","BRIDGE_KEY","_global","globalThis","window","showConfirmDialog","PAGINATION_SX","marginTop","fontSize","fontWeight","marginLeft","BASE_PER_PAGE_OPTIONS","DEFAULT_PER_PAGE","TWENTY_PER_PAGE","FIFTY_PER_PAGE","CustomTablePagination","totalRows","perPage","currentPage","onPageChange","onPerPageChange","perPageOptions","includes","sort","a","b","TablePagination","count","rowsPerPageOptions","rowsPerPage","page","handlePageChange","_","newPage","onRowsPerPageChange","ev","parseInt","target","value","undefined","labelRowsPerPage","T","createDeleteHandler","onDelete","getName","item","name","deleteDialogTitle","deleteDialogBody","deleteDialogConfirmText","async","type","showCancelButton","id","ScrollFadeOverlay","side","visible","Box","theme","tint","alpha","palette","background","paper","position","top","bottom","width","pointerEvents","opacity","transition","SortableHeaderContent","col","sortCol","sortDir","onSort","sortable","TableSortLabel","active","columnKey","direction","header","visuallyHidden","contentStyle","overflowWrap","TableCellContent","row","render","isBoolean","CheckIcon","CloseIcon","truncateText","TruncateText","charLimit","TableShell","children","containerRef","showLeftFade","showRightFade","useScrollFade","Paper","elevation","mb","TableContainer","ref","borderRadius","boxShadow","ARCHIVED_CELL_SX","backgroundColor","ACTION_CELL_SX","textAlign","verticalAlign","maxWidth","getResponsiveTableSx","dataColumnCount","tableLayout","getColumnWidthSx","_objectSpread","getArchivedRowSx","disableProp","getActionCellSx","widthOverride","setShowLeftFade","setShowRightFade","updateFades","el","current","scrollLeft","Math","ceil","clientWidth","scrollWidth","addEventListener","removeEventListener","isOverflowing","setIsOverflowing","shouldCharTruncate","isTruncated","length","displayContent","slice","tooltipTitle","Tooltip","placement","componentsProps","tooltip","onMouseEnter","offsetWidth","overflow","textOverflow","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","EditableCell","isEditing","onBlur","validation","inputValue","setInputValue","isHovering","setIsHovering","setError","handleValidationAndSave","newValue","isValid","message","validateValue","schema","validateSync","err","handleKeyDown","e","preventDefault","TextField","autoFocus","onChange","onKeyDown","size","helperText","height","onMouseLeave","flex","EditIcon","right","MuiTableEditable","columns","data","options","onEdit","onArchive","onCellChange","tableSx","editingCell","setEditingCell","getCellSx","baseSx","handleDelete","isEditable","editable","Table","TableHead","TableRow","map","TableCell","headSx","align","TableBody","handleCellClick","column","find","rowId","cursor","padding","cellSx","handleCellBlur","className","styles","dottedBorderLeft","IconButton","lineHeight","is_archived","DeleteIcon"],"sourceRoot":""}
@@ -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={6611:(e,t,r)=>{r.d(t,{A:()=>g});var n=r(1116),l=r.n(n),a=r(6031),o=r.n(a),i=r(2015),s=r.n(i),u=r(7994),c=r(2522),m=r(8672),d=r(6915),p=r(5480),b=r(9314),f=r(9736);function y(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 v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){l()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const g=({rowId:e,field:t,timeZone:r,label:n="",disabled:l=!1})=>{const a=`i-${e}-c-${t.class_field}-f-${t.type_id}`,i=t.is_required??!1,y={name:a,label:n,disabled:l,required:i,slotProps:{inputLabel:{shrink:!0}},margin:"none"};switch(t.type){case"CheckBox":return s().createElement(u.default,o()({},y,{size:"small"}));case"CheckBoxList":return s().createElement(c.default,o()({},y,{size:"small",options:t.values.map((e=>({value:String(e.id),label:e.value})))}));case"RadioButtonList":return s().createElement(m.default,o()({},y,{size:"small",options:t.values.map((e=>({value:String(e.id),label:e.value})))}));case"DateTime":return s().createElement(d.default,{name:a,label:n,required:i,disabled:l,slotProps:{textField:{InputLabelProps:{shrink:!0}}}});case"Time":return s().createElement(p.default,{name:a,label:n,required:i,disabled:l,timeZone:r,slotProps:{textField:{InputLabelProps:{shrink:!0}}}});case"Quantity":return s().createElement(b.default,o()({},y,{fullWidth:!0,size:"small",type:"number",slotProps:{inputLabel:{shrink:!0},htmlInput:v({min:t.minimum_quantity},t.maximum_quantity>0?{max:t.maximum_quantity}:{})}}));case"ComboBox":return s().createElement(f.default,o()({},y,{size:"small",options:t.values.map((e=>({value:String(e.id),label:e.value})))}));case"Text":return s().createElement(b.default,o()({},y,{fullWidth:!0,size:"small"}));case"TextArea":return s().createElement(b.default,o()({},y,{fullWidth:!0,size:"small",multiline:!0,rows:3}))}}},7994:(e,t,r)=>{r.d(t,{default:()=>f});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(9825),c=r.n(u),m=r(8619),d=r(3294);const p=["name","label","margin"],b=e=>{let{name:t,label:r,margin:n="normal"}=e,a=o()(e,p);const[i,u]=(0,d.useField)({name:t,type:"checkbox"});return s().createElement(m.FormControl,{fullWidth:!0,margin:n,error:u.touched&&Boolean(u.error)},s().createElement(m.FormControlLabel,{control:s().createElement(m.Checkbox,l()({name:t},i,{checked:i.value},a)),label:r}),u.touched&&u.error&&s().createElement(m.FormHelperText,null,u.error))};b.propTypes={name:c().string.isRequired,label:c().string.isRequired};const f=b},6915:(e,t,r)=>{r.d(t,{default:()=>O});var n=r(6031),l=r.n(n),a=r(1116),o=r.n(a),i=r(2462),s=r.n(i),u=r(2015),c=r.n(u),m=r(9825),d=r.n(m);const p=require("@mui/x-date-pickers/DatePicker");var b=r(4),f=r(5643),y=r(3294);const v=["name","label","required","disabled","slotProps"];function g(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 h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const E=e=>{let{name:t,label:r,required:n,disabled:a=!1,slotProps:o}=e,i=s()(e,v);const[u,m,d]=(0,y.useField)(t),g=n?`${r} *`:r;return c().createElement(b.LocalizationProvider,{dateAdapter:f.AdapterMoment},c().createElement(p.DatePicker,l()({value:u.value,onChange:d.setValue,slotProps:h(h({day:{sx:{fontSize:"1.2rem",fontWeight:600}},layout:{sx:{"& .MuiDayCalendar-weekDayLabel":{fontSize:"1rem"}}}},o),{},{textField:h({name:t,label:g,error:m.touched&&Boolean(m.error),helperText:m.touched&&m.error,fullWidth:!0,disabled:a,size:"small"},(null==o?void 0:o.textField)||{})}),margin:"normal"},i)))};E.propTypes={name:d().string.isRequired,label:d().string,required:d().bool,disabled:d().bool};const O=E},5654:(e,t,r)=>{r.d(t,{default:()=>_});var n=r(6031),l=r.n(n),a=r(1116),o=r.n(a),i=r(2462),s=r.n(i),u=r(2015),c=r.n(u),m=r(9825),d=r.n(m),p=r(8619),b=r(3294),f=r(9314),y=r(3209);const v=["name","label","discountType","inCents","disabled"];function g(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 h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const E=["e","E","+","-"],O=e=>{let{name:t,label:r,discountType:n,inCents:a=!1,disabled:o=!1}=e,i=s()(e,v);const[m,d,g]=(0,b.useField)(t),[O,_]=(0,u.useState)(!1),x=null===d.initialValue?null:0,T=n===y.eM.RATE?{endAdornment:c().createElement(p.InputAdornment,{position:"end"},"%")}:{startAdornment:c().createElement(p.InputAdornment,{position:"start"},"$")},P=n===y.eM.RATE?{max:100,inputMode:"numeric",step:1}:{inputMode:"decimal",step:1};return c().createElement(f.default,l()({name:t,label:r,value:(()=>O?"":null==m.value||0===m.value?0===m.value?0:"":a?m.value/y.At:m.value)(),onChange:e=>{const t=e.target.value;if(""===t)return _(!0),void g.setValue(x);_(!1);const r=Number(t),n=a?r*y.At:r;g.setValue(n)},type:"number",disabled:o,slotProps:{input:h({},T),htmlInput:h({min:0},P)},onKeyDown:e=>{E.includes(e.key)&&(e.preventDefault(),e.stopPropagation())}},i))};O.propTypes={name:d().string.isRequired,label:d().string};const _=O},2522:(e,t,r)=>{r.d(t,{default:()=>b});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(8619),c=r(3294),m=r(6842),d=r.n(m);const p=["name","label","placeholder","options"],b=e=>{let{name:t,label:r,placeholder:n,options:a}=e,i=o()(e,p);const[m,b,f]=(0,c.useField)(t),y=n||d().translate("placeholders.select"),v=a.every((({value:e})=>{var t;return null===(t=m.value)||void 0===t?void 0:t.includes(e)}));return s().createElement(u.FormControl,{fullWidth:!0,error:b.touched&&Boolean(b.error)},r&&s().createElement(u.InputLabel,{shrink:!0,id:`${t}-label`},r),s().createElement(u.Select,l()({variant:"outlined",name:t,label:r,labelId:`${t}-label`,multiple:!0,value:m.value||[],onChange:e=>{const{value:t}=e.target;t.includes("all")?v?f.setValue([]):f.setValue(a.map((e=>e.value))):f.setValue(t)},onBlur:m.onBlur,displayEmpty:!0},i,{renderValue:e=>{if(null==e||!e.length)return s().createElement("em",null,y);if(v)return d().translate("general.all");const t=a.filter((({value:t})=>null==e?void 0:e.includes(t))).map((({label:e})=>e));return t.join(", ")}}),s().createElement(u.MenuItem,{key:"all",value:"all"},s().createElement(u.Checkbox,{checked:v}),s().createElement(u.ListItemText,{primary:d().translate("general.all")})),s().createElement(u.Divider,{sx:{m:0}}),a.map((({label:e,value:t})=>{var r;return s().createElement(u.MenuItem,{key:`ckbx-ddl-${t}`,value:t},s().createElement(u.Checkbox,{checked:null===(r=m.value)||void 0===r?void 0:r.includes(t)}),s().createElement(u.ListItemText,{primary:e}))}))))}},8672:(e,t,r)=>{r.d(t,{default:()=>b});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(8619),c=r(3294),m=r(6842),d=r.n(m);const p=["name","label","options","placeholder"],b=e=>{let{name:t,label:r,options:n,placeholder:a}=e,i=o()(e,p);const m=a||d().translate("placeholders.select"),[b,f,y]=(0,c.useField)(t);return s().createElement(u.FormControl,{fullWidth:!0,error:f.touched&&Boolean(f.error)},r&&s().createElement(u.InputLabel,{shrink:!0,id:`${t}-label`},r),s().createElement(u.Select,l()({variant:"outlined",name:t,label:r,labelId:`${t}-label`,value:b.value||"",onChange:e=>{y.setValue(e.target.value)},displayEmpty:!0},i,{renderValue:e=>{if(!e)return s().createElement("em",null,m);const t=n.find((({value:t})=>t===e));return t?t.label:""}}),n.map((({label:e,value:t})=>s().createElement(u.MenuItem,{key:`radio-ddl-${t}`,value:t},s().createElement(u.Radio,{checked:b.value===t}),s().createElement(u.ListItemText,{primary:e}))))))}},3300:(e,t,r)=>{r.d(t,{default:()=>_});var n=r(6031),l=r.n(n),a=r(1116),o=r.n(a),i=r(2462),s=r.n(i),u=r(2015),c=r.n(u),m=r(9825),d=r.n(m),p=r(8619),b=r(3294),f=r(9314),y=r(3209);const v=["name","label","inCents","inputProps"];function g(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 h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const E=["e","E","+","-"],O=e=>{let{name:t,label:r,inCents:n=!1,inputProps:a={step:.01}}=e,o=s()(e,v);const[i,m,d]=(0,b.useField)(t),[g,O]=(0,u.useState)(!1),[_,x]=(0,u.useState)(!1),[T,P]=(0,u.useState)(""),j=()=>{if(g||null==i.value)return"";if(0===i.value)return"0";const e=n?i.value/y.At:i.value;return String(Number(e.toFixed(y.tv)))};return c().createElement(f.default,l()({name:t,label:r,type:"number",value:(()=>{if(_)return T;if(g)return"";if(null==i.value||0===i.value)return 0===i.value?0:"";const e=j(),t=e.indexOf(".");return-1===t?`${e}.00`:e.length-t-1==1?`${e}0`:e})(),onChange:e=>{const t=e.target.value;if(P(t),""===t)return O(!0),void d.setValue(0);O(!1);const r=Number(t),l=n?Math.round(r*y.At):r;d.setValue(l)},onFocus:()=>{x(!0),P(j())},onBlur:e=>{x(!1),o.onBlur&&o.onBlur(e)},slotProps:{input:{startAdornment:c().createElement(p.InputAdornment,{position:"start"},"$")}},inputProps:h({min:0,inputMode:"decimal"},a),onKeyDown:e=>{E.includes(e.key)&&(e.preventDefault(),e.stopPropagation())}},o))};O.propTypes={name:d().string.isRequired,label:d().string};const _=O},9736:(e,t,r)=>{r.d(t,{default:()=>v});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(9825),c=r.n(u),m=r(6842),d=r.n(m),p=r(8619),b=r(3294);const f=["name","label","placeholder","options","required"],y=e=>{let{name:t,label:r,placeholder:n,options:a,required:i}=e,u=o()(e,f);const[c,m]=(0,b.useField)(t),y=n||d().translate("placeholders.select");return s().createElement(p.FormControl,{fullWidth:!0,error:m.touched&&Boolean(m.error),required:i},r&&s().createElement(p.InputLabel,{shrink:!0,id:`${t}-label`},r),s().createElement(p.Select,l()({name:t,label:r,labelId:`${t}-label`,displayEmpty:!0},c,u,{renderValue:e=>{if(null==e||""===e)return s().createElement("em",null,y);const t=a.find((({value:t})=>t===e));return t?t.label:""}}),a.map((e=>s().createElement(p.MenuItem,{key:`selectop-${e.value}`,value:e.value},e.label)))),m.touched&&m.error&&s().createElement(p.FormHelperText,null,m.error))};y.propTypes={name:c().string.isRequired,options:c().array.isRequired};const v=y},4768:(e,t,r)=>{r.d(t,{default:()=>v});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(9825),c=r.n(u),m=r(8619);const d=require("@mui/icons-material/Clear");var p=r.n(d),b=r(3294);const f=["name","label","placeholder","children","isClearable"],y=e=>{let{name:t,label:r,placeholder:n,children:a,isClearable:i}=e,u=o()(e,f);const[c,d,y]=(0,b.useField)(t),v=(null==c?void 0:c.value)&&""!==c.value||Boolean(n);return s().createElement(m.FormControl,{fullWidth:!0,error:d.touched&&Boolean(d.error)},r&&s().createElement(m.InputLabel,{htmlFor:t,id:`${t}-label`,shrink:v},r),s().createElement(m.Select,l()({name:t,id:t},c,{labelId:`${t}-label`,label:r,notched:v,displayEmpty:!0,renderValue:e=>e&&""!==e?e:s().createElement("span",{style:{color:"#aaa"}},n),endAdornment:i&&c.value?s().createElement(m.InputAdornment,{position:"end",sx:{mr:2}},s().createElement(m.IconButton,{size:"small",onClick:e=>{e.stopPropagation(),y.setValue("")}},s().createElement(p(),{fontSize:"small"}))):null},u),a),d.touched&&d.error&&s().createElement(m.FormHelperText,null,d.error))};y.propTypes={name:c().string.isRequired,children:c().node.isRequired,placeholder:c().string,isClearable:c().bool};const v=y},9314:(e,t,r)=>{r.d(t,{default:()=>f});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(9825),c=r.n(u),m=r(8619),d=r(3294);const p=["name","label","maxLength","required"],b=e=>{var t;let{name:r,label:n,maxLength:a,required:i=!1}=e,u=o()(e,p);const[c,b]=(0,d.useField)(r),f=(null===(t=c.value)||void 0===t?void 0:t.length)||0;let y="";return n&&(y=i?`${n} *`:n),s().createElement(m.Box,null,s().createElement(m.TextField,l()({name:r,label:y},c,{onBlur:c.onBlur,margin:"normal",error:b.touched&&Boolean(b.error),helperText:b.touched&&b.error,slotProps:{htmlInput:{maxLength:a}}},u)),a&&s().createElement(m.Typography,{sx:{fontSize:"1.2rem",color:"#00000099",pl:2}},a-f+" characters left"))};b.propTypes={name:c().string.isRequired,label:c().string,maxLength:c().number,required:c().bool};const f=b},5480:(e,t,r)=>{r.d(t,{default:()=>O});var n=r(6031),l=r.n(n),a=r(1116),o=r.n(a),i=r(2462),s=r.n(i),u=r(2015),c=r.n(u),m=r(9825),d=r.n(m),p=r(4),b=r(5643);const f=require("@mui/x-date-pickers/TimePicker");var y=r(3294);const v=["name","label","required","minTime","maxTime","timeZone","disabled","slotProps"];function g(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 h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const E=e=>{let{name:t,label:r,required:n,minTime:a,maxTime:o,timeZone:i,disabled:u=!1,slotProps:m}=e,d=s()(e,v);const[g,E,O]=(0,y.useField)(t),_=n?`${r} *`:r;return c().createElement(p.LocalizationProvider,{dateAdapter:b.AdapterMoment},c().createElement(f.TimePicker,l()({value:g.value,onChange:O.setValue,minTime:a,maxTime:o,timezone:i,views:["hours","minutes"],slotProps:h(h({},m),{},{textField:h({name:t,label:_,error:E.touched&&Boolean(E.error),helperText:E.touched&&E.error,size:"small",fullWidth:!0,disabled:u,sx:{"& .MuiPickersSectionList-root":{width:"100%"},"& .MuiFormHelperText-root":{marginLeft:"4px",marginRight:"4px"}}},(null==m?void 0:m.textField)||{})})},d)))};E.propTypes={name:d().string.isRequired};const O=E},3209:(e,t,r)=>{r.d(t,{At:()=>o,OP:()=>l,eM:()=>s,fJ:()=>a,gI:()=>c,iC:()=>i,q9:()=>n,tv:()=>u});const n=100n,l=2,a=0,o=100,i=1e3,s={AMOUNT:"Amount",RATE:"Rate"},u=2,c={FORM:"Form",ITEM:"Item"}},9558:(e,t,r)=>{r.d(t,{epochToMomentTimeZone:()=>a});var n=r(5812),l=r.n(n);r(8041);const a=(e,t)=>e?(e*=1e3,l()(e).tz(t)):e},8400:(e,t,r)=>{r.d(t,{currencyAmountFromCents:()=>a});var n=r(3209);const l={USD:"$",EUR:"€",GBP:"£",CAD:"C$",AUD:"A$",NZD:"NZ$",CHF:"CHF",ARS:"AR$",BRL:"R$",MXN:"MX$"};function a(e,t="USD"){let r="!ERROR";if("number"!=typeof e||!Number.isInteger(e))return console.error("ERROR - currencyAmountFromCents: cents must be an integer number"),r;try{const a=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,l=t%n.q9;return`${r.toString()}.${l.toString().padStart(n.OP,"0")}`}(e);r=`${l[t]??"$"}${a}`}catch(e){console.error(`ERROR - currencyAmountFromCents: ${e}`)}return r}},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},1519:e=>{e.exports=require("@mui/icons-material/Error")},1101:e=>{e.exports=require("@mui/icons-material/InfoOutlined")},8587:e=>{e.exports=require("@mui/icons-material/KeyboardArrowDown")},8619:e=>{e.exports=require("@mui/material")},5643:e=>{e.exports=require("@mui/x-date-pickers/AdapterMoment")},4:e=>{e.exports=require("@mui/x-date-pickers/LocalizationProvider")},3294:e=>{e.exports=require("formik")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},5812:e=>{e.exports=require("moment-timezone")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},8041:e=>{e.exports=require("urijs")}},t={};function r(n){var l=t[n];if(void 0!==l)return l.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.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,{ExpandedRowContent:()=>F,GlobalQuantityField:()=>w,ItemTableField:()=>S.A,UnderlyingAlertNote:()=>R,default:()=>W,getCurrentApplicableRate:()=>_,isItemAvailable:()=>x});var l=r(1116),a=r.n(l),o=r(2015),i=r.n(o),s=r(8619),u=r(8587),c=r.n(u);const m=require("@mui/icons-material/KeyboardArrowUp");var d=r.n(m),p=r(1101),b=r.n(p),f=r(6842),y=r.n(f),v=r(8400),g=r(3209),h=r(3294),E=r(9314),O=r(9558);const _=(e,t)=>{var r,n,l;const a=(0,O.epochToMomentTimeZone)(Math.floor(new Date/g.iC),e),o=null===(r=(0,O.epochToMomentTimeZone)(t.early_bird_end_date,e))||void 0===r?void 0:r.endOf("day"),i=null===(n=(0,O.epochToMomentTimeZone)(t.onsite_price_start_date,e))||void 0===n?void 0:n.startOf("day"),s=null===(l=(0,O.epochToMomentTimeZone)(t.onsite_price_end_date,e))||void 0===l?void 0:l.endOf("day");return o&&a.isSameOrBefore(o)?"early_bird":i&&a.isSameOrBefore(i)?"standard":!s||a.isSameOrBefore(s)?"onsite":"expired"},x=(e,t)=>{var r;return null!=(null===(r=e.rates)||void 0===r?void 0:r[t])},T=e=>e.some((e=>"Quantity"===e.type));function P(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 j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const w=({row:e,extraColumns:t,value:r,disabled:n=!1})=>{const l=`i-${e.form_item_id}-c-global-f-quantity`,[a,s,u]=(0,h.useField)(l),c=T(t);(0,o.useEffect)((()=>{u.setValue(r)}),[r]);return i().createElement(E.default,{name:l,fullWidth:!0,size:"small",type:"number",disabled:n,onChange:t=>{const r=parseInt(t.target.value,10);if(isNaN(r))return t.target.value=0,void u.setValue(0);const n=e.quantity_limit_per_sponsor,l=n?Math.min(Math.max(r,0),n):Math.max(r,0);t.target.value=l,u.setValue(l)},slotProps:{htmlInput:j({readOnly:c,min:0},e.quantity_limit_per_sponsor?{max:e.quantity_limit_per_sponsor}:{})},sx:c?{"& .MuiInputBase-root":{backgroundColor:"action.disabledBackground",color:"text.disabled",pointerEvents:"none"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"action.disabled"}}:{}})};var C=r(4768),k=r(3300),$=r(5654),q=r(6031),A=r.n(q),S=r(6611);const I=({rowId:e,disabled:t})=>{const r=`i-${e}-c-global-f-notes`,[n]=(0,h.useField)(r);return i().createElement(s.TextField,A()({},n,{value:n.value??"",label:y().translate("sponsor_edit_form.notes"),fullWidth:!0,size:"small",multiline:!0,rows:3,disabled:t,slotProps:{inputLabel:{shrink:!0}},margin:"none"}))},F=({row:e,extraColumns:t,timeZone:r,disabled:n})=>{const l=(e.meta_fields??[]).filter((e=>e.class_field===g.gI.ITEM));return i().createElement(s.Box,{sx:{p:2,backgroundColor:"grey.50"}},i().createElement(s.Grid2,{container:!0,spacing:3},t.map((t=>i().createElement(s.Grid2,{key:`col-${t.type_id}`,size:3},i().createElement(S.A,{field:t,rowId:e.form_item_id,timeZone:r,disabled:n,label:t.name})))),l.map((t=>i().createElement(s.Grid2,{key:`item-${t.type_id}`,size:3},i().createElement(S.A,{field:t,rowId:e.form_item_id,timeZone:r,disabled:n,label:t.name})))),i().createElement(s.Grid2,{size:3},i().createElement(I,{rowId:e.form_item_id,disabled:n}))))};var D=r(1519),M=r.n(D);const R=({showAdditionalItems:e})=>e?i().createElement(s.Typography,{variant:"body2",component:"p",sx:{color:"error.warning",fontSize:"0.8rem"}},i().createElement(M(),{color:"error",sx:{fontSize:"1rem",top:"0.2rem",position:"relative"}})," ",y().translate("sponsor_edit_form.additional_info")):null;function B(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 z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const W=({data:e,currentApplicableRate:t,timeZone:r,values:n,touched:l,errors:a})=>{const u=JSON.stringify(n),m=(0,o.useMemo)((()=>{var t,r;return(null===(t=e[0])||void 0===t||null===(r=t.meta_fields)||void 0===r?void 0:r.filter((e=>e.class_field===g.gI.FORM)))||[]}),[e]),[p,f]=(0,o.useState)((()=>e.reduce(((e,t)=>(T(m)&&(e[t.form_item_id]=!0),e)),{}))),h=(0,o.useRef)(new Set);(0,o.useEffect)((()=>{if(!a||0===Object.keys(a).length)return void(h.current=new Set);const t=new Set,r={};e.forEach((e=>{const n=(e.meta_fields??[]).filter((e=>e.class_field===g.gI.ITEM)),o=new Set([...m.map((t=>`i-${e.form_item_id}-c-${t.class_field}-f-${t.type_id}`)),...n.map((t=>`i-${e.form_item_id}-c-${t.class_field}-f-${t.type_id}`)),`i-${e.form_item_id}-c-global-f-notes`]);Object.keys(a).some((e=>o.has(e)&&Boolean(null==l?void 0:l[e])))&&(t.add(e.form_item_id),h.current.has(e.form_item_id)||(r[e.form_item_id]=!0))})),h.current=t,Object.keys(r).length>0&&f((e=>z(z({},e),r)))}),[e,m,a,l]);const E=e=>{f((t=>z(z({},t),{},{[e]:!t[e]})))},O=e=>{if((e.meta_fields??[]).filter((e=>e.is_required)).some((t=>{const r=n[`i-${e.form_item_id}-c-${t.class_field}-f-${t.type_id}`];return"CheckBoxList"===t.type?!Array.isArray(r)||0===r.length:"CheckBox"===t.type?!0!==r:null==r||""===r})))return"error";const t=`i-${e.form_item_id}-`;return Object.keys(l??{}).some((e=>e.startsWith(t)&&l[e]))?"success":"warning"},_=(0,o.useCallback)((e=>{const t=m.filter((e=>"Quantity"===e.type)),r=n[`i-${e.form_item_id}-c-global-f-quantity`],l=t.reduce(((t,r)=>(t>0?t:1)*((null==n?void 0:n[`i-${e.form_item_id}-c-${r.class_field}-f-${r.type_id}`])||0)),0);return t.length>0?l:r}),[u,m]),P=e=>{const r=n[`i-${e.form_item_id}-c-global-f-quantity`]||_(e);if("expired"===t)return 0;const l=n[`i-${e.form_item_id}-c-global-f-custom_rate`]||e.rates[t];return null==l||null==r?0:r*l},j=e=>null==e?y().translate("general.n_a"):(0,v.currencyAmountFromCents)(e),q=(0,o.useMemo)((()=>{const t=e.reduce(((e,t)=>e+P(t)),0),r=n.discount_type===g.eM.AMOUNT?n.discount_amount:t*(n.discount_amount/g.At/g.At);return t-Math.round(r)}),[e,u,t]);return i().createElement(s.TableContainer,{component:s.Paper},i().createElement(s.Table,null,i().createElement(s.TableHead,null,i().createElement(s.TableRow,{sx:{backgroundColor:"#EAEDF4"}},i().createElement(s.TableCell,{sx:{width:40}}),i().createElement(s.TableCell,{sx:{minWidth:40}},y().translate("sponsor_edit_form.code")),i().createElement(s.TableCell,{sx:{minWidth:120}},y().translate("sponsor_edit_form.description")),i().createElement(s.TableCell,{sx:{minWidth:120}},y().translate("sponsor_edit_form.custom_rate")),i().createElement(s.TableCell,{sx:{minWidth:40}},y().translate("sponsor_edit_form.early_bird_rate")),i().createElement(s.TableCell,{sx:{minWidth:40}},y().translate("sponsor_edit_form.standard_rate")),i().createElement(s.TableCell,{sx:{minWidth:40}},y().translate("sponsor_edit_form.onsite_rate")),i().createElement(s.TableCell,{sx:{minWidth:120}},y().translate("sponsor_edit_form.qty")),i().createElement(s.TableCell,{sx:{minWidth:120}},y().translate("sponsor_edit_form.total")),i().createElement(s.TableCell,{sx:{minWidth:40},align:"center"},y().translate("sponsor_edit_form.details")))),i().createElement(s.TableBody,null,e.map((e=>{const n=!x(e,t),l=!!p[e.form_item_id];return i().createElement(i().Fragment,{key:`fragment-${e.form_item_id}`},i().createElement(s.TableRow,null,i().createElement(s.TableCell,null,i().createElement(s.IconButton,{size:"small","aria-label":"Toggle row details",onClick:()=>E(e.form_item_id)},l?i().createElement(d(),null):i().createElement(c(),null))),i().createElement(s.TableCell,null,e.code),i().createElement(s.TableCell,null,e.name),i().createElement(s.TableCell,null,i().createElement(k.default,{name:`i-${e.form_item_id}-c-global-f-custom_rate`,fullWidth:!0,label:"",size:"small",inCents:!0,inputProps:{step:.01}})),i().createElement(s.TableCell,{sx:{opacity:"early_bird"===t?1:"38%"}},j(e.rates.early_bird)),i().createElement(s.TableCell,{sx:{opacity:"standard"===t?1:"38%"}},j(e.rates.standard)),i().createElement(s.TableCell,{sx:{opacity:"onsite"===t?1:"38%"}},j(e.rates.onsite)),i().createElement(s.TableCell,null,i().createElement(w,{row:e,extraColumns:m,value:_(e)})),i().createElement(s.TableCell,null,(0,v.currencyAmountFromCents)(P(e))),i().createElement(s.TableCell,{align:"center",sx:{verticalAlign:"middle"}},i().createElement(s.IconButton,{size:"small","aria-label":"Toggle row details",onClick:()=>E(e.form_item_id)},i().createElement(b(),{color:O(e)})))),i().createElement(s.TableRow,null,i().createElement(s.TableCell,{colSpan:10,sx:{padding:0}},i().createElement(s.Collapse,{in:l,timeout:"auto"},i().createElement(F,{row:e,extraColumns:m,timeZone:r,disabled:n})))))})),i().createElement(s.TableRow,null,i().createElement(s.TableCell,{sx:{fontWeight:500}},y().translate("sponsor_edit_form.discount")),new Array(6).fill(0).map(((e,t)=>i().createElement(s.TableCell,{key:`${t}-discountcell`}))),i().createElement(s.TableCell,null,i().createElement(C.default,{name:"discount_type",label:"",size:"small",sx:{width:110}},Object.values(g.eM).map((e=>i().createElement(s.MenuItem,{key:`ddopt-${e}`,value:e},e))))),i().createElement(s.TableCell,null,i().createElement($.default,{name:"discount_amount",discountType:n.discount_type,label:"",size:"small",margin:"none",inCents:!0,sx:{width:110}})),i().createElement(s.TableCell,null)),i().createElement(s.TableRow,null,i().createElement(s.TableCell,{sx:{fontWeight:500}},y().translate("sponsor_edit_form.total_on_caps")),new Array(7).fill(0).map(((e,t)=>i().createElement(s.TableCell,{key:`${t}-totalcell`}))),i().createElement(s.TableCell,{sx:{fontWeight:500}},(0,v.currencyAmountFromCents)(q)),i().createElement(s.TableCell,null)))))};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={6611:(e,t,r)=>{r.d(t,{A:()=>g});var n=r(1116),l=r.n(n),a=r(6031),o=r.n(a),i=r(2015),s=r.n(i),u=r(7994),c=r(2522),m=r(8672),d=r(6915),p=r(5480),b=r(9314),f=r(9736);function y(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 v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){l()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const g=({rowId:e,field:t,timeZone:r,label:n="",disabled:l=!1})=>{const a=`i-${e}-c-${t.class_field}-f-${t.type_id}`,i=t.is_required??!1,y={name:a,label:n,disabled:l,required:i,slotProps:{inputLabel:{shrink:!0}},margin:"none"};switch(t.type){case"CheckBox":return s().createElement(u.default,o()({},y,{size:"small"}));case"CheckBoxList":return s().createElement(c.default,o()({},y,{size:"small",options:t.values.map((e=>({value:String(e.id),label:e.value})))}));case"RadioButtonList":return s().createElement(m.default,o()({},y,{size:"small",options:t.values.map((e=>({value:String(e.id),label:e.value})))}));case"DateTime":return s().createElement(d.default,{name:a,label:n,required:i,disabled:l,slotProps:{textField:{InputLabelProps:{shrink:!0}}}});case"Time":return s().createElement(p.default,{name:a,label:n,required:i,disabled:l,timeZone:r,slotProps:{textField:{InputLabelProps:{shrink:!0}}}});case"Quantity":return s().createElement(b.default,o()({},y,{fullWidth:!0,size:"small",type:"number",slotProps:{inputLabel:{shrink:!0},htmlInput:v({min:t.minimum_quantity},t.maximum_quantity>0?{max:t.maximum_quantity}:{})}}));case"ComboBox":return s().createElement(f.default,o()({},y,{size:"small",options:t.values.map((e=>({value:String(e.id),label:e.value})))}));case"Text":return s().createElement(b.default,o()({},y,{fullWidth:!0,size:"small"}));case"TextArea":return s().createElement(b.default,o()({},y,{fullWidth:!0,size:"small",multiline:!0,rows:3}))}}},7994:(e,t,r)=>{r.d(t,{default:()=>f});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(9825),c=r.n(u),m=r(8619),d=r(3294);const p=["name","label","margin"],b=e=>{let{name:t,label:r,margin:n="normal"}=e,a=o()(e,p);const[i,u]=(0,d.useField)({name:t,type:"checkbox"});return s().createElement(m.FormControl,{fullWidth:!0,margin:n,error:u.touched&&Boolean(u.error)},s().createElement(m.FormControlLabel,{control:s().createElement(m.Checkbox,l()({name:t},i,{checked:i.value},a)),label:r}),u.touched&&u.error&&s().createElement(m.FormHelperText,null,u.error))};b.propTypes={name:c().string.isRequired,label:c().string.isRequired};const f=b},6915:(e,t,r)=>{r.d(t,{default:()=>O});var n=r(6031),l=r.n(n),a=r(1116),o=r.n(a),i=r(2462),s=r.n(i),u=r(2015),c=r.n(u),m=r(9825),d=r.n(m);const p=require("@mui/x-date-pickers/DatePicker");var b=r(4),f=r(5643),y=r(3294);const v=["name","label","required","disabled","slotProps"];function g(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 h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const E=e=>{let{name:t,label:r,required:n,disabled:a=!1,slotProps:o}=e,i=s()(e,v);const[u,m,d]=(0,y.useField)(t),g=n?`${r} *`:r;return c().createElement(b.LocalizationProvider,{dateAdapter:f.AdapterMoment},c().createElement(p.DatePicker,l()({value:u.value,onChange:d.setValue,slotProps:h(h({day:{sx:{fontSize:"1.2rem",fontWeight:600}},layout:{sx:{"& .MuiDayCalendar-weekDayLabel":{fontSize:"1rem"}}}},o),{},{textField:h({name:t,label:g,error:m.touched&&Boolean(m.error),helperText:m.touched&&m.error,fullWidth:!0,disabled:a,size:"small"},(null==o?void 0:o.textField)||{})}),margin:"normal"},i)))};E.propTypes={name:d().string.isRequired,label:d().string,required:d().bool,disabled:d().bool};const O=E},5654:(e,t,r)=>{r.d(t,{default:()=>_});var n=r(6031),l=r.n(n),a=r(1116),o=r.n(a),i=r(2462),s=r.n(i),u=r(2015),c=r.n(u),m=r(9825),d=r.n(m),p=r(8619),b=r(3294),f=r(9314),y=r(3209);const v=["name","label","discountType","inCents","disabled"];function g(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 h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const E=["e","E","+","-"],O=e=>{let{name:t,label:r,discountType:n,inCents:a=!1,disabled:o=!1}=e,i=s()(e,v);const[m,d,g]=(0,b.useField)(t),[O,_]=(0,u.useState)(!1),x=null===d.initialValue?null:0,T=n===y.eM.RATE?{endAdornment:c().createElement(p.InputAdornment,{position:"end"},"%")}:{startAdornment:c().createElement(p.InputAdornment,{position:"start"},"$")},P=n===y.eM.RATE?{max:100,inputMode:"numeric",step:1}:{inputMode:"decimal",step:1};return c().createElement(f.default,l()({name:t,label:r,value:(()=>O?"":null==m.value||0===m.value?0===m.value?0:"":a?m.value/y.At:m.value)(),onChange:e=>{const t=e.target.value;if(""===t)return _(!0),void g.setValue(x);_(!1);const r=Number(t),n=a?r*y.At:r;g.setValue(n)},type:"number",disabled:o,slotProps:{input:h({},T),htmlInput:h({min:0},P)},onKeyDown:e=>{E.includes(e.key)&&(e.preventDefault(),e.stopPropagation())}},i))};O.propTypes={name:d().string.isRequired,label:d().string};const _=O},2522:(e,t,r)=>{r.d(t,{default:()=>b});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(8619),c=r(3294),m=r(6842),d=r.n(m);const p=["name","label","placeholder","options"],b=e=>{let{name:t,label:r,placeholder:n,options:a}=e,i=o()(e,p);const[m,b,f]=(0,c.useField)(t),y=n||d().translate("placeholders.select"),v=a.every((({value:e})=>{var t;return null===(t=m.value)||void 0===t?void 0:t.includes(e)}));return s().createElement(u.FormControl,{fullWidth:!0,error:b.touched&&Boolean(b.error)},r&&s().createElement(u.InputLabel,{shrink:!0,id:`${t}-label`},r),s().createElement(u.Select,l()({variant:"outlined",name:t,label:r,labelId:`${t}-label`,multiple:!0,value:m.value||[],onChange:e=>{const{value:t}=e.target;t.includes("all")?v?f.setValue([]):f.setValue(a.map((e=>e.value))):f.setValue(t)},onBlur:m.onBlur,displayEmpty:!0},i,{renderValue:e=>{if(null==e||!e.length)return s().createElement("em",null,y);if(v)return d().translate("general.all");const t=a.filter((({value:t})=>null==e?void 0:e.includes(t))).map((({label:e})=>e));return t.join(", ")}}),s().createElement(u.MenuItem,{key:"all",value:"all"},s().createElement(u.Checkbox,{checked:v}),s().createElement(u.ListItemText,{primary:d().translate("general.all")})),s().createElement(u.Divider,{sx:{m:0}}),a.map((({label:e,value:t})=>{var r;return s().createElement(u.MenuItem,{key:`ckbx-ddl-${t}`,value:t},s().createElement(u.Checkbox,{checked:null===(r=m.value)||void 0===r?void 0:r.includes(t)}),s().createElement(u.ListItemText,{primary:e}))}))))}},8672:(e,t,r)=>{r.d(t,{default:()=>b});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(8619),c=r(3294),m=r(6842),d=r.n(m);const p=["name","label","options","placeholder"],b=e=>{let{name:t,label:r,options:n,placeholder:a}=e,i=o()(e,p);const m=a||d().translate("placeholders.select"),[b,f,y]=(0,c.useField)(t);return s().createElement(u.FormControl,{fullWidth:!0,error:f.touched&&Boolean(f.error)},r&&s().createElement(u.InputLabel,{shrink:!0,id:`${t}-label`},r),s().createElement(u.Select,l()({variant:"outlined",name:t,label:r,labelId:`${t}-label`,value:b.value||"",onChange:e=>{y.setValue(e.target.value)},displayEmpty:!0},i,{renderValue:e=>{if(!e)return s().createElement("em",null,m);const t=n.find((({value:t})=>t===e));return t?t.label:""}}),n.map((({label:e,value:t})=>s().createElement(u.MenuItem,{key:`radio-ddl-${t}`,value:t},s().createElement(u.Radio,{checked:b.value===t}),s().createElement(u.ListItemText,{primary:e}))))))}},3300:(e,t,r)=>{r.d(t,{default:()=>_});var n=r(6031),l=r.n(n),a=r(1116),o=r.n(a),i=r(2462),s=r.n(i),u=r(2015),c=r.n(u),m=r(9825),d=r.n(m),p=r(8619),b=r(3294),f=r(9314),y=r(3209);const v=["name","label","inCents","inputProps"];function g(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 h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const E=["e","E","+","-"],O=e=>{let{name:t,label:r,inCents:n=!1,inputProps:a={step:.01}}=e,o=s()(e,v);const[i,m,d]=(0,b.useField)(t),[g,O]=(0,u.useState)(!1),[_,x]=(0,u.useState)(!1),[T,P]=(0,u.useState)(""),j=()=>{if(g||null==i.value)return"";if(0===i.value)return"0";const e=n?i.value/y.At:i.value;return String(Number(e.toFixed(y.tv)))};return c().createElement(f.default,l()({name:t,label:r,type:"number",value:(()=>{if(_)return T;if(g)return"";if(null==i.value||0===i.value)return 0===i.value?0:"";const e=j(),t=e.indexOf(".");return-1===t?`${e}.00`:e.length-t-1==1?`${e}0`:e})(),onChange:e=>{const t=e.target.value;if(P(t),""===t)return O(!0),void d.setValue(0);O(!1);const r=Number(t),l=n?Math.round(r*y.At):r;d.setValue(l)},onFocus:()=>{x(!0),P(j())},onBlur:e=>{x(!1),o.onBlur&&o.onBlur(e)},slotProps:{input:{startAdornment:c().createElement(p.InputAdornment,{position:"start"},"$")}},inputProps:h({min:0,inputMode:"decimal"},a),onKeyDown:e=>{E.includes(e.key)&&(e.preventDefault(),e.stopPropagation())}},o))};O.propTypes={name:d().string.isRequired,label:d().string};const _=O},9736:(e,t,r)=>{r.d(t,{default:()=>v});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(9825),c=r.n(u),m=r(6842),d=r.n(m),p=r(8619),b=r(3294);const f=["name","label","placeholder","options","required"],y=e=>{let{name:t,label:r,placeholder:n,options:a,required:i}=e,u=o()(e,f);const[c,m]=(0,b.useField)(t),y=n||d().translate("placeholders.select");return s().createElement(p.FormControl,{fullWidth:!0,error:m.touched&&Boolean(m.error),required:i},r&&s().createElement(p.InputLabel,{shrink:!0,id:`${t}-label`},r),s().createElement(p.Select,l()({name:t,label:r,labelId:`${t}-label`,displayEmpty:!0},c,u,{renderValue:e=>{if(null==e||""===e)return s().createElement("em",null,y);const t=a.find((({value:t})=>t===e));return t?t.label:""}}),a.map((e=>s().createElement(p.MenuItem,{key:`selectop-${e.value}`,value:e.value},e.label)))),m.touched&&m.error&&s().createElement(p.FormHelperText,null,m.error))};y.propTypes={name:c().string.isRequired,options:c().array.isRequired};const v=y},4768:(e,t,r)=>{r.d(t,{default:()=>v});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(9825),c=r.n(u),m=r(8619);const d=require("@mui/icons-material/Clear");var p=r.n(d),b=r(3294);const f=["name","label","placeholder","children","isClearable"],y=e=>{let{name:t,label:r,placeholder:n,children:a,isClearable:i}=e,u=o()(e,f);const[c,d,y]=(0,b.useField)(t),v=(null==c?void 0:c.value)&&""!==c.value||Boolean(n);return s().createElement(m.FormControl,{fullWidth:!0,error:d.touched&&Boolean(d.error)},r&&s().createElement(m.InputLabel,{htmlFor:t,id:`${t}-label`,shrink:v},r),s().createElement(m.Select,l()({name:t,id:t},c,{labelId:`${t}-label`,label:r,notched:v,displayEmpty:!0,renderValue:e=>e&&""!==e?e:s().createElement("span",{style:{color:"#aaa"}},n),endAdornment:i&&c.value?s().createElement(m.InputAdornment,{position:"end",sx:{mr:2}},s().createElement(m.IconButton,{size:"small",onClick:e=>{e.stopPropagation(),y.setValue("")}},s().createElement(p(),{fontSize:"small"}))):null},u),a),d.touched&&d.error&&s().createElement(m.FormHelperText,null,d.error))};y.propTypes={name:c().string.isRequired,children:c().node.isRequired,placeholder:c().string,isClearable:c().bool};const v=y},9314:(e,t,r)=>{r.d(t,{default:()=>f});var n=r(6031),l=r.n(n),a=r(2462),o=r.n(a),i=r(2015),s=r.n(i),u=r(9825),c=r.n(u),m=r(8619),d=r(3294);const p=["name","label","maxLength","required"],b=e=>{var t;let{name:r,label:n,maxLength:a,required:i=!1}=e,u=o()(e,p);const[c,b]=(0,d.useField)(r),f=(null===(t=c.value)||void 0===t?void 0:t.length)||0;let y="";return n&&(y=i?`${n} *`:n),s().createElement(m.Box,null,s().createElement(m.TextField,l()({name:r,label:y},c,{onBlur:c.onBlur,margin:"normal",error:b.touched&&Boolean(b.error),helperText:b.touched&&b.error,slotProps:{htmlInput:{maxLength:a}}},u)),a&&s().createElement(m.Typography,{sx:{fontSize:"1.2rem",color:"#00000099",pl:2}},a-f+" characters left"))};b.propTypes={name:c().string.isRequired,label:c().string,maxLength:c().number,required:c().bool};const f=b},5480:(e,t,r)=>{r.d(t,{default:()=>O});var n=r(6031),l=r.n(n),a=r(1116),o=r.n(a),i=r(2462),s=r.n(i),u=r(2015),c=r.n(u),m=r(9825),d=r.n(m),p=r(4),b=r(5643);const f=require("@mui/x-date-pickers/TimePicker");var y=r(3294);const v=["name","label","required","minTime","maxTime","timeZone","disabled","slotProps"];function g(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 h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const E=e=>{let{name:t,label:r,required:n,minTime:a,maxTime:o,timeZone:i,disabled:u=!1,slotProps:m}=e,d=s()(e,v);const[g,E,O]=(0,y.useField)(t),_=n?`${r} *`:r;return c().createElement(p.LocalizationProvider,{dateAdapter:b.AdapterMoment},c().createElement(f.TimePicker,l()({value:g.value,onChange:O.setValue,minTime:a,maxTime:o,timezone:i,views:["hours","minutes"],slotProps:h(h({},m),{},{textField:h({name:t,label:_,error:E.touched&&Boolean(E.error),helperText:E.touched&&E.error,size:"small",fullWidth:!0,disabled:u,sx:{"& .MuiPickersSectionList-root":{width:"100%"},"& .MuiFormHelperText-root":{marginLeft:"4px",marginRight:"4px"}}},(null==m?void 0:m.textField)||{})})},d)))};E.propTypes={name:d().string.isRequired};const O=E},3209:(e,t,r)=>{r.d(t,{At:()=>o,OP:()=>l,eM:()=>s,fJ:()=>a,gI:()=>c,iC:()=>i,q9:()=>n,tv:()=>u});const n=100n,l=2,a=0,o=100,i=1e3,s={AMOUNT:"Amount",RATE:"Rate"},u=2,c={FORM:"Form",ITEM:"Item"}},9558:(e,t,r)=>{r.d(t,{epochToMomentTimeZone:()=>a});var n=r(5812),l=r.n(n);r(8041);const a=(e,t)=>e?(e*=1e3,l()(e).tz(t)):e},8400:(e,t,r)=>{r.d(t,{currencyAmountFromCents:()=>a});var n=r(3209);const l={USD:"$",EUR:"€",GBP:"£",CAD:"C$",AUD:"A$",NZD:"NZ$",CHF:"CHF",ARS:"AR$",BRL:"R$",MXN:"MX$"};function a(e,t="USD"){let r="!ERROR";if("number"!=typeof e||!Number.isInteger(e))return console.error("ERROR - currencyAmountFromCents: cents must be an integer number"),r;try{const a=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,l=t%n.q9;return`${r.toString()}.${l.toString().padStart(n.OP,"0")}`}(e);r=`${l[t]??"$"}${a}`}catch(e){console.error(`ERROR - currencyAmountFromCents: ${e}`)}return r}},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},1519:e=>{e.exports=require("@mui/icons-material/Error")},1101:e=>{e.exports=require("@mui/icons-material/InfoOutlined")},8587:e=>{e.exports=require("@mui/icons-material/KeyboardArrowDown")},8619:e=>{e.exports=require("@mui/material")},5643:e=>{e.exports=require("@mui/x-date-pickers/AdapterMoment")},4:e=>{e.exports=require("@mui/x-date-pickers/LocalizationProvider")},3294:e=>{e.exports=require("formik")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},5812:e=>{e.exports=require("moment-timezone")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},8041:e=>{e.exports=require("urijs")}},t={};function r(n){var l=t[n];if(void 0!==l)return l.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.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,{ExpandedRowContent:()=>F,GlobalQuantityField:()=>w,ItemTableField:()=>S.A,UnderlyingAlertNote:()=>R,default:()=>W,getCurrentApplicableRate:()=>_,isItemAvailable:()=>x});var l=r(1116),a=r.n(l),o=r(2015),i=r.n(o),s=r(8619),u=r(8587),c=r.n(u);const m=require("@mui/icons-material/KeyboardArrowUp");var d=r.n(m),p=r(1101),b=r.n(p),f=r(6842),y=r.n(f),v=r(8400),g=r(3209),h=r(3294),E=r(9314),O=r(9558);const _=(e,t)=>{var r,n,l;const a=(0,O.epochToMomentTimeZone)(Math.floor(new Date/g.iC),e),o=null===(r=(0,O.epochToMomentTimeZone)(t.early_bird_end_date,e))||void 0===r?void 0:r.endOf("day"),i=null===(n=(0,O.epochToMomentTimeZone)(t.onsite_price_start_date,e))||void 0===n?void 0:n.startOf("day"),s=null===(l=(0,O.epochToMomentTimeZone)(t.onsite_price_end_date,e))||void 0===l?void 0:l.endOf("day");return o&&a.isSameOrBefore(o)?"early_bird":i&&a.isSameOrBefore(i)?"standard":!s||a.isSameOrBefore(s)?"onsite":"expired"},x=(e,t)=>{var r;return null!=(null===(r=e.rates)||void 0===r?void 0:r[t])},T=e=>e.some((e=>"Quantity"===e.type));function P(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 j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const w=({row:e,extraColumns:t,value:r,disabled:n=!1})=>{const l=`i-${e.form_item_id}-c-global-f-quantity`,[a,s,u]=(0,h.useField)(l),c=T(t);(0,o.useEffect)((()=>{u.setValue(r)}),[r]);return i().createElement(E.default,{name:l,fullWidth:!0,size:"small",type:"number",disabled:n,onChange:t=>{const r=parseInt(t.target.value,10);if(isNaN(r))return t.target.value=0,void u.setValue(0);const n=e.quantity_limit_per_sponsor,l=n?Math.min(Math.max(r,0),n):Math.max(r,0);t.target.value=l,u.setValue(l)},slotProps:{htmlInput:j({readOnly:c,min:0},e.quantity_limit_per_sponsor?{max:e.quantity_limit_per_sponsor}:{})},sx:c?{"& .MuiInputBase-root":{backgroundColor:"action.disabledBackground",color:"text.disabled",pointerEvents:"none"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"action.disabled"}}:{}})};var C=r(4768),k=r(3300),$=r(5654),q=r(6031),A=r.n(q),S=r(6611);const I=({rowId:e,disabled:t})=>{const r=`i-${e}-c-global-f-notes`,[n]=(0,h.useField)(r);return i().createElement(s.TextField,A()({},n,{value:n.value??"",label:y().translate("sponsor_edit_form.notes"),fullWidth:!0,size:"small",multiline:!0,rows:3,disabled:t,slotProps:{inputLabel:{shrink:!0}},margin:"none"}))},F=({row:e,extraColumns:t,timeZone:r,disabled:n})=>{const l=(e.meta_fields??[]).filter((e=>e.class_field===g.gI.ITEM));return i().createElement(s.Box,{sx:{p:2,backgroundColor:"grey.50"}},i().createElement(s.Grid2,{container:!0,spacing:3},t.map((t=>i().createElement(s.Grid2,{key:`col-${t.type_id}`,size:3},i().createElement(S.A,{field:t,rowId:e.form_item_id,timeZone:r,disabled:n,label:t.name})))),l.map((t=>i().createElement(s.Grid2,{key:`item-${t.type_id}`,size:3},i().createElement(S.A,{field:t,rowId:e.form_item_id,timeZone:r,disabled:n,label:t.name})))),i().createElement(s.Grid2,{size:3},i().createElement(I,{rowId:e.form_item_id,disabled:n}))))};var D=r(1519),M=r.n(D);const R=({showAdditionalItems:e})=>e?i().createElement(s.Typography,{variant:"body2",component:"p",sx:{color:"error.warning",fontSize:"0.8rem"}},i().createElement(M(),{color:"error",sx:{fontSize:"1rem",top:"0.2rem",position:"relative"}})," ",y().translate("sponsor_edit_form.additional_info")):null;function B(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 z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?B(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const W=({data:e,currentApplicableRate:t,timeZone:r,values:n,touched:l,errors:a})=>{const u=JSON.stringify(n),m=(0,o.useMemo)((()=>{var t;return(null===(t=e[0])||void 0===t||null===(t=t.meta_fields)||void 0===t?void 0:t.filter((e=>e.class_field===g.gI.FORM)))||[]}),[e]),[p,f]=(0,o.useState)((()=>e.reduce(((e,t)=>(T(m)&&(e[t.form_item_id]=!0),e)),{}))),h=(0,o.useRef)(new Set);(0,o.useEffect)((()=>{if(!a||0===Object.keys(a).length)return void(h.current=new Set);const t=new Set,r={};e.forEach((e=>{const n=(e.meta_fields??[]).filter((e=>e.class_field===g.gI.ITEM)),o=new Set([...m.map((t=>`i-${e.form_item_id}-c-${t.class_field}-f-${t.type_id}`)),...n.map((t=>`i-${e.form_item_id}-c-${t.class_field}-f-${t.type_id}`)),`i-${e.form_item_id}-c-global-f-notes`]);Object.keys(a).some((e=>o.has(e)&&Boolean(null==l?void 0:l[e])))&&(t.add(e.form_item_id),h.current.has(e.form_item_id)||(r[e.form_item_id]=!0))})),h.current=t,Object.keys(r).length>0&&f((e=>z(z({},e),r)))}),[e,m,a,l]);const E=e=>{f((t=>z(z({},t),{},{[e]:!t[e]})))},O=e=>{if((e.meta_fields??[]).filter((e=>e.is_required)).some((t=>{const r=n[`i-${e.form_item_id}-c-${t.class_field}-f-${t.type_id}`];return"CheckBoxList"===t.type?!Array.isArray(r)||0===r.length:"CheckBox"===t.type?!0!==r:null==r||""===r})))return"error";const t=`i-${e.form_item_id}-`;return Object.keys(l??{}).some((e=>e.startsWith(t)&&l[e]))?"success":"warning"},_=(0,o.useCallback)((e=>{const t=m.filter((e=>"Quantity"===e.type)),r=n[`i-${e.form_item_id}-c-global-f-quantity`],l=t.reduce(((t,r)=>(t>0?t:1)*((null==n?void 0:n[`i-${e.form_item_id}-c-${r.class_field}-f-${r.type_id}`])||0)),0);return t.length>0?l:r}),[u,m]),P=e=>{const r=n[`i-${e.form_item_id}-c-global-f-quantity`]||_(e);if("expired"===t)return 0;const l=n[`i-${e.form_item_id}-c-global-f-custom_rate`]||e.rates[t];return null==l||null==r?0:r*l},j=e=>null==e?y().translate("general.n_a"):(0,v.currencyAmountFromCents)(e),q=(0,o.useMemo)((()=>{const t=e.reduce(((e,t)=>e+P(t)),0),r=n.discount_type===g.eM.AMOUNT?n.discount_amount:t*(n.discount_amount/g.At/g.At);return t-Math.round(r)}),[e,u,t]);return i().createElement(s.TableContainer,{component:s.Paper},i().createElement(s.Table,null,i().createElement(s.TableHead,null,i().createElement(s.TableRow,{sx:{backgroundColor:"#EAEDF4"}},i().createElement(s.TableCell,{sx:{width:40}}),i().createElement(s.TableCell,{sx:{minWidth:40}},y().translate("sponsor_edit_form.code")),i().createElement(s.TableCell,{sx:{minWidth:120}},y().translate("sponsor_edit_form.description")),i().createElement(s.TableCell,{sx:{minWidth:120}},y().translate("sponsor_edit_form.custom_rate")),i().createElement(s.TableCell,{sx:{minWidth:40}},y().translate("sponsor_edit_form.early_bird_rate")),i().createElement(s.TableCell,{sx:{minWidth:40}},y().translate("sponsor_edit_form.standard_rate")),i().createElement(s.TableCell,{sx:{minWidth:40}},y().translate("sponsor_edit_form.onsite_rate")),i().createElement(s.TableCell,{sx:{minWidth:120}},y().translate("sponsor_edit_form.qty")),i().createElement(s.TableCell,{sx:{minWidth:120}},y().translate("sponsor_edit_form.total")),i().createElement(s.TableCell,{sx:{minWidth:40},align:"center"},y().translate("sponsor_edit_form.details")))),i().createElement(s.TableBody,null,e.map((e=>{const n=!x(e,t),l=!!p[e.form_item_id];return i().createElement(i().Fragment,{key:`fragment-${e.form_item_id}`},i().createElement(s.TableRow,null,i().createElement(s.TableCell,null,i().createElement(s.IconButton,{size:"small","aria-label":"Toggle row details",onClick:()=>E(e.form_item_id)},l?i().createElement(d(),null):i().createElement(c(),null))),i().createElement(s.TableCell,null,e.code),i().createElement(s.TableCell,null,e.name),i().createElement(s.TableCell,null,i().createElement(k.default,{name:`i-${e.form_item_id}-c-global-f-custom_rate`,fullWidth:!0,label:"",size:"small",inCents:!0,inputProps:{step:.01}})),i().createElement(s.TableCell,{sx:{opacity:"early_bird"===t?1:"38%"}},j(e.rates.early_bird)),i().createElement(s.TableCell,{sx:{opacity:"standard"===t?1:"38%"}},j(e.rates.standard)),i().createElement(s.TableCell,{sx:{opacity:"onsite"===t?1:"38%"}},j(e.rates.onsite)),i().createElement(s.TableCell,null,i().createElement(w,{row:e,extraColumns:m,value:_(e)})),i().createElement(s.TableCell,null,(0,v.currencyAmountFromCents)(P(e))),i().createElement(s.TableCell,{align:"center",sx:{verticalAlign:"middle"}},i().createElement(s.IconButton,{size:"small","aria-label":"Toggle row details",onClick:()=>E(e.form_item_id)},i().createElement(b(),{color:O(e)})))),i().createElement(s.TableRow,null,i().createElement(s.TableCell,{colSpan:10,sx:{padding:0}},i().createElement(s.Collapse,{in:l,timeout:"auto"},i().createElement(F,{row:e,extraColumns:m,timeZone:r,disabled:n})))))})),i().createElement(s.TableRow,null,i().createElement(s.TableCell,{sx:{fontWeight:500}},y().translate("sponsor_edit_form.discount")),new Array(6).fill(0).map(((e,t)=>i().createElement(s.TableCell,{key:`${t}-discountcell`}))),i().createElement(s.TableCell,null,i().createElement(C.default,{name:"discount_type",label:"",size:"small",sx:{width:110}},Object.values(g.eM).map((e=>i().createElement(s.MenuItem,{key:`ddopt-${e}`,value:e},e))))),i().createElement(s.TableCell,null,i().createElement($.default,{name:"discount_amount",discountType:n.discount_type,label:"",size:"small",margin:"none",inCents:!0,sx:{width:110}})),i().createElement(s.TableCell,null)),i().createElement(s.TableRow,null,i().createElement(s.TableCell,{sx:{fontWeight:500}},y().translate("sponsor_edit_form.total_on_caps")),new Array(7).fill(0).map(((e,t)=>i().createElement(s.TableCell,{key:`${t}-totalcell`}))),i().createElement(s.TableCell,{sx:{fontWeight:500}},(0,v.currencyAmountFromCents)(q)),i().createElement(s.TableCell,null)))))};return n})()));
2
2
  //# sourceMappingURL=form-item-table.js.map