openstack-uicore-foundation 5.0.55 → 5.0.56
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.
- package/.claude/rules/openstack-uicore-foundation-components.md +67 -0
- package/.claude/rules/openstack-uicore-foundation-project.md +69 -0
- package/.claude/rules/openstack-uicore-foundation-security.md +39 -0
- package/.claude/settings.local.json +7 -0
- package/.codegraph/.gitignore +5 -0
- package/docs/plans/2026-04-09-showconfirmdialog-react16-compat.md +83 -0
- package/docs/plans/2026-04-22-dropzone-pooling-ux.md +129 -0
- package/docs/plans/2026-04-23-uploadv3-duplicate-file-max-reached.md +109 -0
- package/docs/plans/2026-04-23-uploadv3-premature-complete-on-202.md +99 -0
- package/docs/plans/2026-07-06-file-size-field-unit-prop.md +20 -0
- package/docs/plans/2026-07-30-node-22-migration.md +139 -0
- package/docs/plans/clickup-barrel-mui-dragalong.md +43 -0
- package/docs/plans/clickup-order-ledger-extraction.md +44 -0
- package/docs/plans/clickup-uploadv3-progress-bar-large-files.md +42 -0
- package/lib/components/index.js +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/mui/auth-button.js +1 -1
- package/lib/components/mui/auth-button.js.map +1 -1
- package/lib/components/mui/bulk-edit-table.js +1 -1
- package/lib/components/mui/bulk-edit-table.js.map +1 -1
- package/lib/components/mui/editable-table.js +1 -1
- package/lib/components/mui/editable-table.js.map +1 -1
- package/lib/components/mui/nav-bar.js +1 -1
- package/lib/components/mui/nav-bar.js.map +1 -1
- package/lib/components/mui/sortable-table-v2.js +1 -1
- package/lib/components/mui/sortable-table-v2.js.map +1 -1
- package/lib/components/mui/sortable-table.js +1 -1
- package/lib/components/mui/sortable-table.js.map +1 -1
- package/lib/components/mui/sponsor-order-grid.js +1 -1
- package/lib/components/mui/sponsor-order-grid.js.map +1 -1
- package/lib/components/mui/table/custom-table-pagination.js.map +1 -1
- package/lib/components/mui/table/extra-rows.js.map +1 -1
- package/lib/components/mui/table.js +1 -1
- package/lib/components/mui/table.js.map +1 -1
- package/lib/css/components/index.css +1 -1
- package/lib/css/components/index.css.map +1 -1
- package/lib/css/components/mui/editable-table.css +1 -1
- package/lib/css/components/mui/editable-table.css.map +1 -1
- package/lib/css/components/mui/sortable-table-v2.css +1 -1
- package/lib/css/components/mui/sortable-table-v2.css.map +1 -1
- package/lib/css/components/mui/sortable-table.css +1 -1
- package/lib/css/components/mui/sortable-table.css.map +1 -1
- package/lib/css/components/mui/table.css +1 -1
- package/lib/css/components/mui/table.css.map +1 -1
- package/lib/i18n.js +1 -1
- package/lib/i18n.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +17 -0
- package/.claude/RESUME.md +0 -23
- package/package-lock.json +0 -22291
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/mui/sortable-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,cAACQ,IAAI,CAACN,MAAM,UAGdO,EAAgBA,EACpBC,OACAC,QACAC,OACAC,WAAW,GACXC,YACAC,WACAC,oBAAoB,UACpBC,qBAAqB,UACrBC,mBAAmB,SACnBC,oBAAoB,aAEpBnB,IAAAA,cAACoB,EAAAA,OAAM,CAACV,KAAMA,EAAMW,QAASN,GAC3Bf,IAAAA,cAACsB,EAAAA,YAAW,CAACC,GAAI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D,UAAWE,GAEX9N,EAAAA,cAAC+N,EAAAA,WAAU,CACTC,KAAK,QACL1L,QAASA,IAhJpB6L,iBACOlL,EAAAA,EAAAA,SAAkB,CAC1CtC,MAAOgJ,GAAqBtE,IAAAA,UAAY,wBACxCzE,KAC8B,mBAArBgJ,EACHA,EAAiBN,EAAQC,IACzBK,GACA,GAAGvE,IAAAA,UAAY,iCAAiCiE,EAAQC,KAC9D6E,KAAM,UACNC,kBAAkB,EAClBpN,mBAAoB,UACpBD,kBAAmBqE,IAAAA,UAAY,yBAI/BqE,EAASH,EAAK6C,GAChB,EAgI6CkC,CAAa/F,GAC5BhH,GAAI,CAAE0M,QAAS,IAEfjO,EAAAA,cAACuO,IAAU,CAACnL,SAAS,YAK1ByG,GACC7J,EAAAA,cAAC8K,IAAS6B,IAAA,CACR3B,MAAM,SACNzJ,GAAI,CAAE2I,MAAO,IACb0D,UAAWE,GACPZ,EAASsB,iBAEbxO,EAAAA,cAAC+N,EAAAA,WAAU,CAACC,KAAK,SACfhO,EAAAA,cAACyO,IAAc,CAACrL,SAAS,iBAQtCqJ,EAAkBiC,YACF,IAAhBzF,EAAK3B,QACJtH,EAAAA,cAAC4K,IAAQ,KACP5K,EAAAA,cAAC8K,IAAS,CAAC6D,QAAS3F,EAAQ1B,OAAQ0D,MAAM,UACvC3F,IAAAA,UAAY,8BAY9BxB,GAAWC,GAAeC,GACzB/D,EAAAA,cAAC2D,GAAAA,QAAqB,CACpBC,UAAWA,EACXC,QAASA,EACTC,YAAaA,EACbC,aAAcA,EACdC,gBAAiBA,KAInB,E","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/utils/constants.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/CheckCircle\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Error\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","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/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Box\"","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/TableSortLabel\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableRow\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Paper\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/UnfoldMore\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Edit\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Delete\"","webpack://openstack-uicore-foundation/external commonjs \"react-beautiful-dnd\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/utils\"","webpack://openstack-uicore-foundation/./src/components/mui/sortable-table/styles.module.less?adcf","webpack://openstack-uicore-foundation/external commonjs \"lodash/isBoolean\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Check\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Close\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Tooltip\"","webpack://openstack-uicore-foundation/./src/components/mui/truncate-text.js","webpack://openstack-uicore-foundation/./src/components/mui/table/table-cell-content.js","webpack://openstack-uicore-foundation/./src/components/mui/sortable-table/mui-table-sortable.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","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/CheckCircle\");","module.exports = require(\"@mui/icons-material/Error\");","module.exports = require(\"@mui/material\");","module.exports = require(\"i18n-react/dist/i18n-react\");","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};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@babel/runtime/helpers/extends\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Box\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Table\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableBody\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableCell\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableContainer\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableHead\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableSortLabel\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableRow\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Paper\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/UnfoldMore\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Edit\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Delete\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-beautiful-dnd\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/utils\");","// extracted by mini-css-extract-plugin\nexport default {\"dottedBorderLeft\":\"pAjoKOwibtPxYWEmjS7g\"};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"lodash/isBoolean\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Check\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Close\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Tooltip\");","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","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;","/**\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 Box from \"@mui/material/Box\";\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 UnfoldMoreIcon from \"@mui/icons-material/UnfoldMore\";\nimport { IconButton } from \"@mui/material\";\nimport EditIcon from \"@mui/icons-material/Edit\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport { DragDropContext, Draggable, Droppable } from \"react-beautiful-dnd\";\nimport { visuallyHidden } from \"@mui/utils\";\n\nimport styles from \"./styles.module.less\";\n\nimport showConfirmDialog from \"../showConfirmDialog\";\nimport TableCellContent from \"../table/table-cell-content\";\nimport CustomTablePagination from \"../table/CustomTablePagination\";\n\nconst MuiTableSortable = ({\n columns = [],\n data = [],\n totalRows,\n perPage,\n currentPage,\n onPageChange,\n onPerPageChange,\n onSort,\n options = { sortCol: \"\", sortDir: 1 },\n getName = (item) => item.name,\n onEdit,\n onDelete,\n deleteDialogTitle = null,\n deleteDialogBody = null,\n onReorder,\n idKey = \"id\",\n updateOrderKey = \"order\",\n tableSx = {}\n}) => {\n const { sortCol, sortDir } = options;\n\n const handleDragEnd = (result) => {\n if (!result.destination || result.source.index === result.destination.index)\n return;\n\n const reordered = [...data];\n const [movedItem] = reordered.splice(result.source.index, 1);\n reordered.splice(result.destination.index, 0, movedItem);\n\n // change value based on updateOrderKey\n if (updateOrderKey) {\n reordered.forEach((item, idx) => {\n item[updateOrderKey] = idx + 1;\n });\n }\n\n const movedItemId = movedItem.id;\n const newOrder = reordered.find(\n (item) => item[idKey || \"id\"] === movedItemId\n )?.[updateOrderKey];\n\n onReorder?.(reordered, movedItemId, newOrder);\n };\n\n const handleDelete = 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: \"#DD6B55\",\n confirmButtonText: T.translate(\"general.yes_delete\")\n });\n\n if (isConfirmed) {\n onDelete(item.id);\n }\n };\n\n return (\n <Box sx={{ width: \"100%\" }}>\n <Paper elevation={0} sx={{ width: \"100%\", mb: 2 }}>\n <TableContainer\n component={Paper}\n sx={{ borderRadius: 0, boxShadow: \"none\" }}\n >\n <Table 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 }}\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 >\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 col.header\n )}\n </TableCell>\n ))}\n {onEdit && <TableCell sx={{ width: 40 }} />}\n {onDelete && <TableCell sx={{ width: 40 }} />}\n {onReorder && <TableCell sx={{ width: 40 }} />}\n </TableRow>\n </TableHead>\n\n {/* TABLE BODY */}\n <DragDropContext onDragEnd={handleDragEnd}>\n <Droppable droppableId=\"mui-table-droppable\">\n {(droppableProvided) => (\n <TableBody\n ref={droppableProvided.innerRef}\n {...droppableProvided.droppableProps}\n >\n {data.map((row, rowIndex) => (\n <Draggable\n key={row[idKey] || rowIndex}\n draggableId={String(row[idKey] || rowIndex)}\n index={rowIndex}\n >\n {(provided, snapshot) => (\n <TableRow\n ref={provided.innerRef}\n {...provided.draggableProps}\n sx={{\n ...(snapshot.isDragging\n ? {\n display: \"table\",\n width: \"100%\",\n tableLayout: \"fixed\",\n backgroundColor: \"#f0f0f0\",\n transform: \"scale(1.01)\",\n boxShadow: \"0 4px 12px rgba(0, 0, 0, 0.1)\",\n zIndex: 1,\n position: \"relative\",\n transition:\n \"transform 0.2s ease, background-color 0.2s ease\"\n }\n : {\n transition: \"background-color 0.2s ease\"\n })\n }}\n >\n {/* Main content columns */}\n {columns.map((col) => (\n <TableCell\n key={col.columnKey}\n align={col.align ?? \"left\"}\n className={`${\n col.dottedBorder && styles.dottedBorderLeft\n } ${col.className}`}\n >\n <TableCellContent row={row} col={col} />\n </TableCell>\n ))}\n {/* Edit column */}\n {onEdit && (\n <TableCell\n align=\"center\"\n sx={{ width: 40 }}\n className={styles.dottedBorderLeft}\n >\n <IconButton\n size=\"large\"\n onClick={() => onEdit(row)}\n sx={{ padding: 0 }}\n >\n <EditIcon fontSize=\"large\" />\n </IconButton>\n </TableCell>\n )}\n {/* Delete column */}\n {onDelete && (\n <TableCell\n align=\"center\"\n sx={{ width: 40 }}\n className={styles.dottedBorderLeft}\n >\n <IconButton\n size=\"large\"\n onClick={() => handleDelete(row)}\n sx={{ padding: 0 }}\n >\n <DeleteIcon fontSize=\"large\" />\n </IconButton>\n </TableCell>\n )}\n {/* Re order column */}\n {onReorder && (\n <TableCell\n align=\"center\"\n sx={{ width: 40 }}\n className={styles.dottedBorderLeft}\n {...provided.dragHandleProps}\n >\n <IconButton size=\"large\">\n <UnfoldMoreIcon fontSize=\"large\" />\n </IconButton>\n </TableCell>\n )}\n </TableRow>\n )}\n </Draggable>\n ))}\n {droppableProvided.placeholder}\n {data.length === 0 && (\n <TableRow>\n <TableCell colSpan={columns.length} align=\"center\">\n {T.translate(\"mui_table.no_items\")}\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n )}\n </Droppable>\n </DragDropContext>\n </Table>\n </TableContainer>\n\n {/* PAGINATION */}\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\nexport default MuiTableSortable;\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","__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","TruncateText","children","charLimit","ref","isOverflowing","setIsOverflowing","shouldCharTruncate","isTruncated","length","displayContent","slice","tooltipTitle","Tooltip","placement","componentsProps","tooltip","onMouseEnter","current","scrollWidth","offsetWidth","overflow","textOverflow","contentStyle","overflowWrap","TableCellContent","row","col","isBoolean","columnKey","CheckIcon","CloseIcon","render","truncateText","MuiTableSortable","columns","data","onSort","options","sortCol","sortDir","getName","item","name","onEdit","onDelete","deleteDialogTitle","deleteDialogBody","onReorder","idKey","updateOrderKey","tableSx","Box","width","Paper","elevation","mb","TableContainer","borderRadius","boxShadow","Table","TableHead","backgroundColor","TableRow","map","TableCell","maxWidth","align","sortable","TableSortLabel","active","direction","header","visuallyHidden","DragDropContext","onDragEnd","result","_reordered$find","destination","source","index","reordered","movedItem","splice","forEach","idx","movedItemId","id","newOrder","find","Droppable","droppableId","droppableProvided","TableBody","_extends","innerRef","droppableProps","rowIndex","Draggable","draggableId","String","provided","snapshot","draggableProps","_objectSpread","isDragging","tableLayout","transform","zIndex","position","transition","className","dottedBorder","styles","IconButton","size","padding","EditIcon","async","type","showCancelButton","handleDelete","DeleteIcon","dragHandleProps","UnfoldMoreIcon","placeholder","colSpan"],"sourceRoot":""}
|
|
1
|
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EAAKC,IAAKA,OAIpCqF,GACC7N,EAAAA,cAACuO,IAAS,CACRE,MAAM,SACNlN,GAAI8L,GAAgB9E,GACpBmI,UAAWE,GAEX5Q,EAAAA,cAAC8Q,EAAAA,WAAU,CACTC,KAAK,QACLzO,QAASA,IAAMuL,EAAOtF,GACtBhH,GAAI,CAAEyP,QAAS,IAEfhR,EAAAA,cAACiR,IAAQ,CAAC7N,SAAS,YAKxBkI,GACCtL,EAAAA,cAACuO,IAAS,CACRE,MAAM,SACNlN,GAAI8L,GAAgB9E,GACpBmI,UAAWE,GAEX5Q,EAAAA,cAAC8Q,EAAAA,WAAU,CACTC,KAAK,QACLzO,QAASA,IAAM4L,EAAa3F,GAC5BhH,GAAI,CAAEyP,QAAS,IAEfhR,EAAAA,cAACkR,IAAU,CAAC9N,SAAS,YAK1B0K,GACC9N,EAAAA,cAACuO,IAASsB,IAAA,CACRpB,MAAM,SACNlN,GAAI8L,GAAgB9E,GACpBmI,UAAWE,GACPR,EAASe,iBAEbnR,EAAAA,cAAC8Q,EAAAA,WAAU,CAACC,KAAK,SACf/Q,EAAAA,cAACoR,IAAc,CAAChO,SAAS,iBAQtCuM,EAAkB0B,YACF,IAAhB1D,EAAKrG,QACJtH,EAAAA,cAACqO,IAAQ,KACPrO,EAAAA,cAACuO,IAAS,CAAC+C,QAAS5D,EAAQpG,OAAQmH,MAAM,UACvCpJ,IAAAA,UAAY,6BASlB,E","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/utils/constants.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/CheckCircle\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Error\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","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/external commonjs \"@babel/runtime/helpers/extends\"","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/TableHead\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableRow\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/UnfoldMore\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Edit\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Delete\"","webpack://openstack-uicore-foundation/external commonjs \"react-beautiful-dnd\"","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/styles.module.less?7b04","webpack://openstack-uicore-foundation/external commonjs \"lodash/isBoolean\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Check\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Close\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Tooltip\"","webpack://openstack-uicore-foundation/./src/components/mui/truncate-text.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/table-cell-content.js","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Box\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Paper\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableContainer\"","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/use-scroll-fade.js","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/styles\"","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/scroll-fade-overlay.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/table-shell.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/create-delete-handler.js","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableSortLabel\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/utils\"","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/sortable-header-content.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/components/table-styles.js","webpack://openstack-uicore-foundation/./src/components/mui/tables/sortable-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","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/CheckCircle\");","module.exports = require(\"@mui/icons-material/Error\");","module.exports = require(\"@mui/material\");","module.exports = require(\"i18n-react/dist/i18n-react\");","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};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@babel/runtime/helpers/extends\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Table\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableBody\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableCell\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableHead\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableRow\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/UnfoldMore\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Edit\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Delete\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-beautiful-dnd\");","// extracted by mini-css-extract-plugin\nexport default {\"dottedBorderLeft\":\"KNETxMZ1aGPbDi44wmnH\"};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"lodash/isBoolean\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Check\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/icons-material/Close\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Tooltip\");","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","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;","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Box\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Paper\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableContainer\");","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","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","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 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","import T from \"i18n-react/dist/i18n-react\";\nimport showConfirmDialog from \"../../showConfirmDialog\";\n\nconst createDeleteHandler = ({\n onDelete,\n getName = (item) => item.name,\n getId = (item) => item.id,\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 iconType: \"warning\",\n showCancelButton: true,\n confirmButtonColor,\n confirmButtonText:\n deleteDialogConfirmText || T.translate(\"general.yes_delete\")\n });\n\n if (isConfirmed) {\n onDelete(getId(item));\n }\n};\n\nexport default createDeleteHandler;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TableSortLabel\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/utils\");","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","export 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 RESPONSIVE_TABLE_SX = {\n tableLayout: \"auto\"\n};\n\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","/**\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 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 UnfoldMoreIcon from \"@mui/icons-material/UnfoldMore\";\nimport { IconButton } from \"@mui/material\";\nimport EditIcon from \"@mui/icons-material/Edit\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport { DragDropContext, Draggable, Droppable } from \"react-beautiful-dnd\";\n\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 RESPONSIVE_TABLE_SX,\n getColumnWidthSx,\n getActionCellSx,\n ACTION_CELL_SX\n} from \"../components/table-styles\";\n\nconst MuiTableSortable = ({\n columns = [],\n data = [],\n totalRows,\n perPage,\n currentPage,\n onPageChange,\n onPerPageChange,\n onSort,\n options = { sortCol: \"\", sortDir: 1 },\n getName = (item) => item.name,\n onEdit,\n onDelete,\n deleteDialogTitle = null,\n deleteDialogBody = null,\n onReorder,\n idKey = \"id\",\n updateOrderKey = \"order\",\n tableSx = {}\n}) => {\n const { sortCol, sortDir } = options;\n\n const handleDragEnd = (result) => {\n if (!result.destination || result.source.index === result.destination.index)\n return;\n\n const reordered = [...data];\n const [movedItem] = reordered.splice(result.source.index, 1);\n reordered.splice(result.destination.index, 0, movedItem);\n\n // change value based on updateOrderKey\n const withOrder = updateOrderKey\n ? reordered.map((item, idx) => ({ ...item, [updateOrderKey]: idx + 1 }))\n : reordered;\n\n const movedItemId = movedItem[idKey || \"id\"];\n const newOrder = withOrder.find(\n (item) => item[idKey || \"id\"] === movedItemId\n )?.[updateOrderKey];\n\n onReorder?.(withOrder, movedItemId, newOrder);\n };\n\n const handleDelete = createDeleteHandler({\n onDelete,\n getName,\n getId: (item) => item[idKey || \"id\"],\n deleteDialogTitle,\n deleteDialogBody,\n confirmButtonColor: \"#DD6B55\"\n });\n\n return (\n <TableShell\n totalRows={totalRows}\n perPage={perPage}\n currentPage={currentPage}\n onPageChange={onPageChange}\n onPerPageChange={onPerPageChange}\n >\n <Table sx={{ ...RESPONSIVE_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={{ ...getColumnWidthSx(col), ...(col.headSx || {}) }}\n align={col.align ?? \"left\"}\n >\n <SortableHeaderContent\n col={col}\n sortCol={sortCol}\n sortDir={sortDir}\n onSort={onSort}\n />\n </TableCell>\n ))}\n {onEdit && <TableCell sx={ACTION_CELL_SX} />}\n {onDelete && <TableCell sx={ACTION_CELL_SX} />}\n {onReorder && <TableCell sx={ACTION_CELL_SX} />}\n </TableRow>\n </TableHead>\n\n {/* TABLE BODY */}\n <DragDropContext onDragEnd={handleDragEnd}>\n <Droppable droppableId=\"mui-table-droppable\">\n {(droppableProvided) => (\n <TableBody\n ref={droppableProvided.innerRef}\n {...droppableProvided.droppableProps}\n >\n {data.map((row, rowIndex) => (\n <Draggable\n key={row[idKey] || rowIndex}\n draggableId={String(row[idKey] || rowIndex)}\n index={rowIndex}\n >\n {(provided, snapshot) => (\n <TableRow\n ref={provided.innerRef}\n {...provided.draggableProps}\n sx={{\n ...(snapshot.isDragging\n ? {\n display: \"table\",\n width: \"100%\",\n tableLayout: \"fixed\",\n backgroundColor: \"#f0f0f0\",\n transform: \"scale(1.01)\",\n boxShadow: \"0 4px 12px rgba(0, 0, 0, 0.1)\",\n zIndex: 1,\n position: \"relative\",\n transition:\n \"transform 0.2s ease, background-color 0.2s ease\"\n }\n : {\n transition: \"background-color 0.2s ease\"\n })\n }}\n >\n {/* Main content columns */}\n {columns.map((col) => (\n <TableCell\n key={col.columnKey}\n align={col.align ?? \"left\"}\n className={`${\n col.dottedBorder && styles.dottedBorderLeft\n } ${col.className}`}\n sx={{ ...getColumnWidthSx(col), ...(col.cellSx || {}) }}\n >\n <TableCellContent row={row} col={col} />\n </TableCell>\n ))}\n {/* Edit column */}\n {onEdit && (\n <TableCell\n align=\"center\"\n sx={getActionCellSx(row)}\n className={styles.dottedBorderLeft}\n >\n <IconButton\n size=\"large\"\n onClick={() => onEdit(row)}\n sx={{ padding: 0 }}\n >\n <EditIcon fontSize=\"large\" />\n </IconButton>\n </TableCell>\n )}\n {/* Delete column */}\n {onDelete && (\n <TableCell\n align=\"center\"\n sx={getActionCellSx(row)}\n className={styles.dottedBorderLeft}\n >\n <IconButton\n size=\"large\"\n onClick={() => handleDelete(row)}\n sx={{ padding: 0 }}\n >\n <DeleteIcon fontSize=\"large\" />\n </IconButton>\n </TableCell>\n )}\n {/* Re order column */}\n {onReorder && (\n <TableCell\n align=\"center\"\n sx={getActionCellSx(row)}\n className={styles.dottedBorderLeft}\n {...provided.dragHandleProps}\n >\n <IconButton size=\"large\">\n <UnfoldMoreIcon fontSize=\"large\" />\n </IconButton>\n </TableCell>\n )}\n </TableRow>\n )}\n </Draggable>\n ))}\n {droppableProvided.placeholder}\n {data.length === 0 && (\n <TableRow>\n <TableCell colSpan={columns.length} align=\"center\">\n {T.translate(\"mui_table.no_items\")}\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n )}\n </Droppable>\n </DragDropContext>\n </Table>\n </TableShell>\n );\n};\n\nexport default MuiTableSortable;\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","__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","TruncateText","children","charLimit","ref","isOverflowing","setIsOverflowing","shouldCharTruncate","isTruncated","length","displayContent","slice","tooltipTitle","Tooltip","placement","componentsProps","tooltip","onMouseEnter","current","scrollWidth","offsetWidth","overflow","textOverflow","contentStyle","overflowWrap","TableCellContent","row","col","render","isBoolean","columnKey","CheckIcon","CloseIcon","truncateText","useScrollFade","containerRef","showLeftFade","setShowLeftFade","showRightFade","setShowRightFade","updateFades","el","scrollLeft","Math","ceil","clientWidth","addEventListener","removeEventListener","ScrollFadeOverlay","side","visible","Box","theme","tint","alpha","palette","background","paper","position","top","bottom","width","pointerEvents","opacity","transition","TableShell","Paper","elevation","mb","TableContainer","borderRadius","boxShadow","createDeleteHandler","onDelete","getName","item","name","getId","id","deleteDialogTitle","deleteDialogBody","deleteDialogConfirmText","async","showCancelButton","SortableHeaderContent","sortCol","sortDir","onSort","sortable","TableSortLabel","active","direction","header","visuallyHidden","ARCHIVED_CELL_SX","backgroundColor","ACTION_CELL_SX","textAlign","verticalAlign","maxWidth","RESPONSIVE_TABLE_SX","tableLayout","getColumnWidthSx","_objectSpread","getActionCellSx","disableProp","widthOverride","getArchivedRowSx","MuiTableSortable","columns","data","options","onEdit","onReorder","idKey","updateOrderKey","tableSx","handleDelete","Table","TableHead","TableRow","map","TableCell","headSx","align","DragDropContext","onDragEnd","result","_withOrder$find","destination","source","index","reordered","movedItem","splice","withOrder","idx","movedItemId","newOrder","find","Droppable","droppableId","droppableProvided","TableBody","_extends","innerRef","droppableProps","rowIndex","Draggable","draggableId","String","provided","snapshot","draggableProps","isDragging","transform","zIndex","className","dottedBorder","styles","cellSx","IconButton","size","padding","EditIcon","DeleteIcon","dragHandleProps","UnfoldMoreIcon","placeholder","colSpan"],"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={6969:(e,t,r)=>{r.d(t,{default:()=>d});var n=r(2015),a=r.n(n),o=r(9825),l=r.n(o),i=r(8619),c=r(4325),s=r.n(c);const m=({title:e,open:t,onClose:r,maxWidth:o,fullWidth:l,primaryAction:c,secondaryAction:m,children:u})=>{const[d,p]=(0,n.useState)(!1),y=(0,n.useRef)(!0);(0,n.useEffect)((()=>(y.current=!0,()=>{y.current=!1})),[]);const b=e=>{if(d)return;const t=e.onClick();t&&"function"==typeof t.then&&(p(!0),Promise.resolve(t).catch((()=>{})).finally((()=>{y.current&&p(!1)})))},E=()=>{d||r()};return a().createElement(i.Dialog,{open:t,onClose:E,maxWidth:o,fullWidth:l,disableEscapeKeyDown:d},a().createElement(i.DialogTitle,null,e),a().createElement(i.IconButton,{"aria-label":"close",onClick:E,disabled:d,size:"small",sx:e=>({position:"absolute",right:12,top:12,color:e.palette.grey[500]})},a().createElement(s(),{fontSize:"large"})),a().createElement(i.Divider,null),a().createElement(i.DialogContent,null,u),(c||m)&&a().createElement(i.DialogActions,null,m&&a().createElement(i.Button,{variant:"outlined",onClick:()=>b(m),disabled:d||m.disabled},m.label),c&&a().createElement(i.Button,{variant:"contained",onClick:()=>b(c),disabled:d||c.disabled,startIcon:d?a().createElement(i.CircularProgress,{size:16,color:"inherit"}):null},c.label)))},u=l().shape({label:l().node.isRequired,onClick:l().func.isRequired,disabled:l().bool});m.propTypes={title:l().node.isRequired,open:l().bool.isRequired,onClose:l().func.isRequired,maxWidth:l().oneOf(["xs","sm","md","lg","xl",!1]),fullWidth:l().bool,primaryAction:u,secondaryAction:u,children:l().node.isRequired},m.defaultProps={maxWidth:"sm",fullWidth:!0,primaryAction:null,secondaryAction:null};const d=m},314:(e,t,r)=>{r.d(t,{default:()=>u});var n=r(2015),a=r.n(n),o=r(1101),l=r.n(o),i=r(785),c=r.n(i),s=r(6989),m=r.n(s);const u=({message:e,sx:t})=>a().createElement(m(),{display:"flex",alignItems:"flex-start",gap:1,sx:t},a().createElement(l(),{sx:{fontSize:16,color:"text.secondary",mt:"2px"}}),a().createElement(c(),{variant:"body1",color:"text.secondary",sx:{fontSize:"13px"}},e))},8940:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(2015),a=r.n(n),o=r(785),l=r.n(o),i=r(8400);const c=({value:e})=>{const t=e<0,r=t?"primary.dark":"text.disabled",n=`${t?"-":""}${(0,i.currencyAmountFromCents)(Math.abs(e))}`;return a().createElement(l(),{variant:"body1",sx:{color:r}},n)}},6196:(e,t,r)=>{r.d(t,{A:()=>g});var n=r(2015),a=r.n(n),o=r(3983),l=r.n(o),i=r(4118),c=r.n(i);const s=require("@mui/icons-material/Refresh");var m=r.n(s),u=r(6366),d=r.n(u),p=r(3209),y=r(6989),b=r.n(y);const E={[p.PX.CHARGE]:{icon:l(),color:"warning.light"},[p.PX.PAYMENT]:{icon:c(),color:"success.light"},[p.PX.DISCOUNT]:{icon:c(),color:"success.light"},[p.PX.REFUND]:{icon:m(),color:"warning.light"},[p.PX.CANCELLED]:{icon:d(),color:"default"}},g=({type:e,children:t})=>{const r=E[e];if(!r)return null;const n=r.icon;return a().createElement(b(),{sx:{display:"flex",alignItems:"center",gap:1}},a().createElement(n,{sx:{color:r.color}}),t||e)}},3491:(e,t,r)=>{r.d(t,{default:()=>h});var n=r(6031),a=r.n(n),o=r(1116),l=r.n(o),i=r(2462),c=r.n(i),s=r(2015),m=r.n(s),u=r(9825),d=r.n(u),p=r(3294),y=r(9314);const b=["name","min","max"];function E(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){l()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const f=["e","E","+","-"],x=e=>{let{name:t,min:r,max:n}=e,o=c()(e,b);const[,,l]=(0,p.useField)(t);return m().createElement(y.default,a()({name:t,type:"number",onKeyDown:e=>{f.includes(e.key)&&(e.nativeEvent.preventDefault(),e.nativeEvent.stopImmediatePropagation())},onChange:e=>{const t=parseInt(e.target.value,10),a=r??0;if(isNaN(t))return e.target.value=a,void l.setValue(a);const o=n?Math.min(Math.max(t,a),n):Math.max(t,a);e.target.value=o,l.setValue(o)},slotProps:{htmlInput:g({min:r??0},n?{max:n}:{})}},o))};x.propTypes={name:d().string.isRequired,label:d().string};const h=x},9314:(e,t,r)=>{r.d(t,{default:()=>b});var n=r(6031),a=r.n(n),o=r(2462),l=r.n(o),i=r(2015),c=r.n(i),s=r(9825),m=r.n(s),u=r(8619),d=r(3294);const p=["name","label","maxLength","required"],y=e=>{var t;let{name:r,label:n,maxLength:o,required:i=!1}=e,s=l()(e,p);const[m,y]=(0,d.useField)(r),b=(null===(t=m.value)||void 0===t?void 0:t.length)||0;let E="";return n&&(E=i?`${n} *`:n),c().createElement(u.Box,null,c().createElement(u.TextField,a()({name:r,label:E},m,{onBlur:m.onBlur,margin:"normal",error:y.touched&&Boolean(y.error),helperText:y.touched&&y.error,slotProps:{htmlInput:{maxLength:o}}},s)),o&&c().createElement(u.Typography,{sx:{fontSize:"1.2rem",color:"#00000099",pl:2}},o-b+" characters left"))};y.propTypes={name:m().string.isRequired,label:m().string,maxLength:m().number,required:m().bool};const b=y},6337:(e,t,r)=>{r.d(t,{DiscountRow:()=>O,FeeRow:()=>_,NotesRow:()=>f,PaymentRow:()=>q,RefundRow:()=>A,TotalRow:()=>y});var n=r(2015),a=r.n(n),o=r(5684),l=r.n(o),i=r(464),c=r.n(i),s=r(785),m=r.n(s),u=r(6842),d=r.n(u),p=r(8400);const y=({total:e,colGap:t=3,trailing:r=0,label:n=null,rowSx:o={}})=>{const i=n||d().translate("mui_table.total"),s=e??0,u=s<0,y=u?"primary.dark":0===s?"text.primary":"error.main",b=`${u?"-":""}${(0,p.currencyAmountFromCents)(Math.abs(s))}`;return a().createElement(c(),{sx:o},a().createElement(l(),null,a().createElement(m(),{sx:{fontWeight:800,textTransform:"uppercase"}},i)),[...Array(t)].map(((e,t)=>a().createElement(l(),{key:`total-gap-col-${t}`}))),a().createElement(l(),{align:"right"},a().createElement(m(),{sx:{color:y,fontWeight:800,fontSize:"15px"}},b)),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`total-trailing-col-${t}`}))))};var b=r(8619),E=r(9870),g=r.n(E);const f=({colCount:e,note:t,showCode:r=!1})=>{const a=r?e-1:e;return n.createElement(c(),null,r&&n.createElement(l(),null,g().translate("mui_table.note")),n.createElement(l(),{colSpan:a},n.createElement(b.Typography,{variant:"body1",sx:{color:"text.secondary"}},t)))};var x=r(6196),h=r(3209),v=r(8940);const _=({fee:e,balance:t,colGap:r=0,trailing:n=0})=>e?a().createElement(c(),null,a().createElement(l(),null,d().translate("mui_table.payfee")),a().createElement(l(),null,a().createElement(x.A,{type:h.PX.CHARGE})),a().createElement(l(),null,a().createElement(m(),{variant:"body1"},e.title)),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`fee-col-gap-${t}`}))),a().createElement(l(),{align:"right"},a().createElement(m(),{variant:"body1"},(0,p.currencyAmountFromCents)(e.amount))),a().createElement(l(),{align:"right"},a().createElement(v.A,{value:t})),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`fee-trailing-col-${t}`,sx:{width:40}})))):null;var C=r(5812),w=r.n(C);const q=({payment:e,balance:t,colGap:r=0,trailing:n=0})=>e?a().createElement(c(),{sx:{backgroundColor:"#2E7D3214"}},a().createElement(l(),null,d().translate("mui_table.pay")),a().createElement(l(),null,a().createElement(x.A,{type:h.PX.PAYMENT},a().createElement(m(),{variant:"body1",sx:{color:"success.dark"}},d().translate("mui_table.payment")))),a().createElement(l(),null,a().createElement(m(),{variant:"body1"},d().translate("mui_table.paid_via")," ",e.method),a().createElement(m(),{variant:"body1",sx:{color:"text.disabled"}},w()(e.created*h.iC).format(h.QM))),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`pay-col-gap-${t}`}))),a().createElement(l(),{align:"right"},a().createElement(m(),{variant:"body1",sx:{color:"success.dark"}},(0,p.currencyAmountFromCents)(e.amount))),a().createElement(l(),{align:"right"},a().createElement(v.A,{value:t})),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`pay-trailing-col-${t}`,sx:{width:40}})))):null,A=({refund:e,balance:t,colGap:r=0,trailing:n=0})=>e?a().createElement(c(),{sx:{backgroundColor:"#EF6C0014"}},a().createElement(l(),null,d().translate("mui_table.ref")),a().createElement(l(),null,a().createElement(x.A,{type:h.PX.REFUND},a().createElement(m(),{variant:"body1",sx:{color:"warning.dark"}},d().translate("mui_table.refund")))),a().createElement(l(),null,a().createElement(m(),{variant:"body1"},e.reason),a().createElement(m(),{variant:"body1",sx:{color:"text.disabled"}},e.status)),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`ref-col-gap-${t}`}))),a().createElement(l(),{align:"right"},a().createElement(m(),{variant:"body1",sx:{color:"warning.dark"}},(0,p.currencyAmountFromCents)(e.amount))),a().createElement(l(),{align:"right"},a().createElement(v.A,{value:t})),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`ref-trailing-col-${t}`,sx:{width:40}})))):null,O=({discount:e,discountCents:t,balance:r,colGap:n=0,trailing:o=0})=>t?a().createElement(c(),{sx:{backgroundColor:"#2E7D3214"}},a().createElement(l(),null,d().translate("mui_table.dis")),a().createElement(l(),null,a().createElement(x.A,{type:h.PX.DISCOUNT},a().createElement(m(),{variant:"body1",sx:{color:"success.main"}},d().translate("mui_table.discount")))),a().createElement(l(),null,a().createElement(m(),{variant:"body1"},e)),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`pay-col-gap-${t}`}))),a().createElement(l(),{align:"right"},a().createElement(m(),{variant:"body1",sx:{color:"success.main"}},(0,p.currencyAmountFromCents)(t))),a().createElement(l(),{align:"right"},a().createElement(v.A,{value:r})),[...Array(o)].map(((e,t)=>a().createElement(l(),{key:`pay-trailing-col-${t}`,sx:{width:40}})))):null},3209:(e,t,r)=>{r.d(t,{OP:()=>a,PX:()=>c,QM:()=>i,fJ:()=>o,iC:()=>l,q9:()=>n});const n=100n,a=2,o=0,l=1e3,i="MM/DD/YYYY hh:mm a",c={CHARGE:"Charge",PAYMENT:"Payment",REFUND:"Refund",DISCOUNT:"Discount",CANCELLED:"Cancelled"}},9558:(e,t,r)=>{r.d(t,{formatEpoch:()=>o});var n=r(5812),a=r.n(n);r(8041);const o=(e,t="M/D/YYYY h:mm a")=>e?(e=>e?(e*=1e3,a()(e)):e)(e).format(t):e},8400:(e,t,r)=>{r.d(t,{currencyAmountFromCents:()=>o});var n=r(3209);const a={USD:"$",EUR:"€",GBP:"£",CAD:"C$",AUD:"A$",NZD:"NZ$",CHF:"CHF",ARS:"AR$",BRL:"R$",MXN:"MX$"};function o(e,t="USD"){let r="!ERROR";if("number"!=typeof e||!Number.isInteger(e))return console.error("ERROR - currencyAmountFromCents: cents must be an integer number"),r;try{const o=function(e){let t;if("bigint"==typeof e)t=e;else if("number"==typeof e){if(!Number.isSafeInteger(e))throw new Error("cents must be a safe integer Number (or pass BigInt/string).");t=BigInt(e)}else{if("string"!=typeof e)throw new Error("cents must be a bigint, number, or numeric string.");{const r=e.trim();if(!/^\d+$/.test(r))throw new Error("cents string must contain digits only (e.g., '1234').");t=BigInt(r)}}if(t<n.fJ)throw new Error("cents must be non-negative.");const r=t/n.q9,a=t%n.q9;return`${r.toString()}.${a.toString().padStart(n.OP,"0")}`}(e);r=`${a[t]??"$"}${o}`}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")},4118:e=>{e.exports=require("@mui/icons-material/ArrowDownward")},3983:e=>{e.exports=require("@mui/icons-material/ArrowUpward")},4325:e=>{e.exports=require("@mui/icons-material/Close")},6366:e=>{e.exports=require("@mui/icons-material/DoNotDisturb")},1101:e=>{e.exports=require("@mui/icons-material/InfoOutlined")},8619:e=>{e.exports=require("@mui/material")},6989:e=>{e.exports=require("@mui/material/Box")},6368:e=>{e.exports=require("@mui/material/Button")},7413:e=>{e.exports=require("@mui/material/Divider")},909:e=>{e.exports=require("@mui/material/IconButton")},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")},4603:e=>{e.exports=require("@mui/material/Tooltip")},785:e=>{e.exports=require("@mui/material/Typography")},3294:e=>{e.exports=require("formik")},9870:e=>{e.exports=require("i18n-react")},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 a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};r.r(n),r.d(n,{default:()=>oe});var a=r(1116),o=r.n(a),l=r(2015),i=r.n(l),c=r(6842),s=r.n(c),m=r(6989),u=r.n(m),d=r(5783),p=r.n(d),y=r(464),b=r.n(y),E=r(9008),g=r.n(E),f=r(5684),x=r.n(f),h=r(9292),v=r.n(h),_=r(8202),C=r.n(_),w=r(785),q=r.n(w),A=r(7413),O=r.n(A),k=r(909),P=r.n(k),D=r(4603),R=r.n(D);const F=require("@mui/icons-material/Rule");var $=r.n(F),j=r(6337),S=r(3209),T=r(314),N=r(8400),I=r(6196),M=r(9558);const B=({total:e})=>{const t=e??0,r=t<0,n=r?"primary.dark":0===t?"text.primary":"error.main",a=`${r?"-":""}${(0,N.currencyAmountFromCents)(Math.abs(t))}`;return i().createElement(u(),{sx:{bgcolor:"#F1F3F5",display:"flex",justifyContent:"space-between",alignItems:"center",borderTop:"1px solid #EEE",pt:2,mt:2,mx:-2,px:"10%",mb:-3,pb:2}},i().createElement(q(),{sx:{fontWeight:800,textTransform:"uppercase"}},s().translate("sponsor_order_grid.amount_due")),i().createElement(q(),{sx:{color:n,fontWeight:800,fontSize:"15px"}},a))},W=({cancelledTotal:e,refundsTotal:t,retained:r,credited:n})=>{const a=r>0?"error.dark":"success.dark",o=r>0?"retained":n>0?"credited":"balance",l=r>0?r:n>0?n:r;return i().createElement(u(),{sx:{maxWidth:400,mt:2,mb:3}},i().createElement(q(),{variant:"body2",sx:{mb:3}},s().translate("sponsor_order_grid.reconciliation")),i().createElement(u(),{sx:{display:"flex",justifyContent:"space-between"}},i().createElement(q(),{variant:"body1",sx:{color:"text.secondary"}},s().translate("sponsor_order_grid.cancelled")),i().createElement(q(),{variant:"body1"},(0,N.currencyAmountFromCents)(e??0))),i().createElement(u(),{sx:{display:"flex",justifyContent:"space-between"}},i().createElement(q(),{variant:"body1",sx:{color:"text.secondary"}},s().translate("sponsor_order_grid.refunded")),i().createElement(q(),{variant:"body1"},(0,N.currencyAmountFromCents)(t??0))),i().createElement(O(),{sx:{my:1}}),i().createElement(u(),{sx:{display:"flex",justifyContent:"space-between"}},i().createElement(q(),{variant:"body2"},s().translate(`sponsor_order_grid.${o}`)),i().createElement(q(),{variant:"body2",sx:{color:a}},(0,N.currencyAmountFromCents)(l??0))))};var z=r(6366),U=r.n(z);const X=require("@mui/material/Link");var Y=r.n(X);function L(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 G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const K=({cancelledItems:e,sx:t={}})=>0===e.length?null:i().createElement(u(),{sx:G({display:"flex",flexDirection:"row"},t)},i().createElement(U(),{sx:{mr:"3px",top:"2px",position:"relative"}}),i().createElement(q(),{variant:"body2",sx:{mb:2,mr:1}},s().translate("sponsor_order_grid.cancelled_items")),e.map((e=>{const t=e.canceled_quantity===e.quantity?"bold":"normal";return i().createElement(Y(),{key:`cancelled-item-${e.id}`,variant:"body1",href:`#item-${e.id}`,sx:{mr:1,color:"text.disabled",fontWeight:t,textDecorationColor:"rgba(0, 0, 0, 0.38)"}},e.formCode," - ",e.itemCode," (",e.canceled_quantity,"/",e.quantity,")")})));var H=r(8940),V=r(3294),J=r(6368),Q=r.n(J),Z=r(6969),ee=r(3491),te=r(9314);const re=({open:e,onClose:t,item:r,onCancelForm:n,onUndoCancelForm:a})=>{const o=r.quantity,l=o-(r.canceled_quantity??0),c=(0,V.useFormik)({initialValues:{quantity:l,reason:""},onSubmit:({quantity:e,reason:i})=>e<l?n(r,l-e,i).then(t):e===o?a(r).then(t):void t(),enableReinitialize:!0}),m=()=>{c.resetForm(),t()},d=o!==l,p=c.values.quantity!==l,y=c.values.quantity===o,b=!y&&c.values.quantity>l;return i().createElement(Z.default,{title:s().translate("sponsor_order_grid.change_quantity_modal.title"),open:e,onClose:m,primaryAction:{label:s().translate("general.apply"),onClick:c.submitForm,disabled:!p||b},secondaryAction:{label:s().translate("general.cancel"),onClick:m}},i().createElement(V.FormikProvider,{value:c},i().createElement(u(),{sx:{display:"flex",flexDirection:"column",gap:2}},i().createElement(u(),{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:2}},i().createElement(u(),{sx:{flex:1}},i().createElement(ee.default,{name:"quantity",fullWidth:!0,size:"small",margin:"none",disabled:0===l,min:0,max:l,label:s().translate("sponsor_order_grid.change_quantity_modal.quantity"),sx:{flex:1}})),i().createElement(Q(),{variant:"outlined",onClick:()=>{c.setFieldValue("quantity",o),c.setFieldValue("reason","")},disabled:!d,size:"small",sx:{whiteSpace:"nowrap",flexShrink:0}},s().translate("sponsor_order_grid.change_quantity_modal.reset"))),i().createElement(te.default,{name:"reason",fullWidth:!0,multiline:!0,minRows:3,disabled:y,label:s().translate("sponsor_order_grid.change_quantity_modal.reason")}))))};function ne(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 ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const oe=({title:e=s().translate("sponsor_order_grid.title"),order:t,withReconciliation:r=!1,withCancelledItemsHeader:n=!1,onCancelForm:a,onUndoCancelForm:o})=>{const{forms:l=[],fees:c=[],payments:m=[],refunds:d=[],notes:y=[],total:E=0,retained:f=0,credited_to_payment_method:h=0,cancelled_total:_=0,refunds_total:w=0}=t||{},A=(e=>e?e.map((e=>ae(ae({},e),{},{items:e.items.filter((e=>e.quantity)).map(((t,r)=>{var n,a;const o=(0,N.currencyAmountFromCents)(t.amount||0),l=t.line_id??`${e.id}-${r}`,i=t.canceled_quantity??0,c=i>0&&i===t.quantity,s=c?S.PX.CANCELLED:S.PX.CHARGE;return{id:l,formCode:e.code,itemName:null===(n=t.type)||void 0===n?void 0:n.name,itemCode:null===(a=t.type)||void 0===a?void 0:a.code,quantity:t.quantity,canceled_quantity:i,type:s,amount:o,amountValue:t.amount,cancelled:c,cancellations:t.cancellations??[]}}))}))):[])(l),k=A.flatMap((e=>e.items.filter((e=>e.canceled_quantity>0)))),D=a&&o,F=D?1:0,[z,U]=i().useState(null);let X=0;const Y=(e,t=1)=>(X+=e*t,X),L=[{columnKey:"formCode",header:s().translate("sponsor_order_grid.code")},{columnKey:"type",header:s().translate("sponsor_order_grid.type"),render:e=>i().createElement(I.A,{type:e.type})},{columnKey:"details",header:s().translate("sponsor_order_grid.details"),render:e=>i().createElement(i().Fragment,null,i().createElement(q(),{variant:"body1",sx:ae({},e.cancelled&&{textDecoration:"line-through"})},e.itemName," - ",s().translate("sponsor_order_grid.total"),": ",e.quantity-e.canceled_quantity),e.cancellations.map((t=>i().createElement(u(),{key:`cancellation-${e.id}-${t.id}`,sx:{mt:1}},i().createElement(q(),{variant:"body1",sx:{color:"text.disabled"}},s().translate("sponsor_order_grid.cancelled_by",{x:t.quantity,y:e.quantity,money:(0,N.currencyAmountFromCents)(t.amount),user:t.canceled_by_full_name,date:(0,M.formatEpoch)(t.created,"M/D/YY [@] h:mm A")})),t.reason&&i().createElement(q(),{variant:"body1",sx:{color:"text.disabled",pl:2,fontStyle:"italic"}},"↳ ",t.reason)))))},{columnKey:"amount",header:s().translate("sponsor_order_grid.amount"),align:"right"}],G=L.length+1+F,V=[...(null==m?void 0:m.map((e=>ae(ae({},e),{},{type:"payment"}))))||[],...(null==d?void 0:d.map((e=>ae(ae({},e),{},{type:"refund"}))))||[]].sort(((e,t)=>e.created-t.created));return i().createElement(u(),{sx:{mt:1}},i().createElement(u(),{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",mb:2}},e&&i().createElement(q(),{gutterBottom:!0,variant:"h6",sx:{mb:4,mr:2}},e),n&&i().createElement(K,{cancelledItems:k,sx:{pt:"10px"}})),D&&i().createElement(T.default,{sx:{mb:2},message:s().translate("sponsor_order_grid.cancel_info_note")}),i().createElement(p(),{component:u(),sx:{borderRadius:"10px",mb:4,border:"1px solid #E0E0E0"}},i().createElement(v(),null,i().createElement(C(),{sx:{backgroundColor:"#EAEAEA"}},i().createElement(b(),null,L.map((e=>i().createElement(x(),{key:e.columnKey,align:e.align??"left"},e.header))),i().createElement(x(),{key:"balance",align:"right"},s().translate("sponsor_order_grid.balance")),D&&i().createElement(x(),{key:"actions",align:"center"},s().translate("sponsor_order_grid.action")))),i().createElement(g(),{sx:{"& td":{fontWeight:"normal"}}},A.map((e=>{const t=e.items.map((e=>i().createElement(b(),{id:`item-${e.id}`,key:`item-row-${e.id}`,sx:ae({},e.cancelled&&{bgcolor:"#FAFAFA"})},(()=>{const t=L.map((t=>i().createElement(x(),{key:`grid-col-${e.id}-${t.columnKey}`,align:t.align??"left",sx:ae({},e.cancelled&&{color:"text.disabled"})},t.render?t.render(e):e[t.columnKey])));return t.push(i().createElement(x(),{key:`grid-col-${e.id}-balance`,align:"right",sx:ae({},e.cancelled&&{color:"text.disabled"})},i().createElement(H.A,{value:Y(e.amountValue)}))),D&&t.push(i().createElement(x(),{key:"action",align:"right"},i().createElement(R(),{title:s().translate("sponsor_order_grid.change_quantity_tooltip")},i().createElement(P(),{size:"large",onClick:()=>U(e)},i().createElement($(),{fontSize:"large"}))))),t})()))),r=e.discount_in_cents??0;return t.push(i().createElement(j.DiscountRow,{key:`discount-row-${e.id}`,discount:e.discount,discountCents:r,trailing:F,balance:Y(r,-1)})),t})),c&&c.map((e=>i().createElement(j.FeeRow,{key:`fee-row-${e.id}`,balance:Y(e.amount),fee:e,trailing:F}))),V.map((e=>"payment"===e.type?i().createElement(j.PaymentRow,{key:`payment-row-${e.id}`,payment:e,balance:Y(e.amount,-1),trailing:F}):"refund"===e.type?i().createElement(j.RefundRow,{key:`refund-row-${e.id}`,refund:e,balance:Y(e.amount),trailing:F}):void 0)),y&&y.map((e=>i().createElement(j.NotesRow,{key:`note-row-${e.id}`,note:e.content,colCount:G,showCode:!0}))),!r&&i().createElement(j.TotalRow,{total:E,label:s().translate("sponsor_order_grid.amount_due"),trailing:F,rowSx:{bgcolor:"#F1F3F5","& td":{borderBottom:"none"}}}),0===A.length&&i().createElement(b(),null,i().createElement(x(),{colSpan:G,align:"center"},s().translate("mui_table.no_items")))))),r&&i().createElement(u(),{sx:{mt:3}},i().createElement(O(),null),i().createElement(W,{cancelledTotal:_,refundsTotal:w,retained:f,credited:h}),i().createElement(B,{total:E})),z&&i().createElement(re,{open:!!z,onClose:()=>U(null),item:z,onCancelForm:a,onUndoCancelForm:o}))};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={6969:(e,t,r)=>{r.d(t,{default:()=>d});var n=r(2015),a=r.n(n),o=r(9825),l=r.n(o),i=r(8619),c=r(4325),s=r.n(c);const m=({title:e,open:t,onClose:r,maxWidth:o,fullWidth:l,primaryAction:c,secondaryAction:m,children:u})=>{const[d,p]=(0,n.useState)(!1),y=(0,n.useRef)(!0);(0,n.useEffect)((()=>(y.current=!0,()=>{y.current=!1})),[]);const b=e=>{if(d)return;const t=e.onClick();t&&"function"==typeof t.then&&(p(!0),Promise.resolve(t).catch((()=>{})).finally((()=>{y.current&&p(!1)})))},E=()=>{d||r()};return a().createElement(i.Dialog,{open:t,onClose:E,maxWidth:o,fullWidth:l,disableEscapeKeyDown:d},a().createElement(i.DialogTitle,null,e),a().createElement(i.IconButton,{"aria-label":"close",onClick:E,disabled:d,size:"small",sx:e=>({position:"absolute",right:12,top:12,color:e.palette.grey[500]})},a().createElement(s(),{fontSize:"large"})),a().createElement(i.Divider,null),a().createElement(i.DialogContent,null,u),(c||m)&&a().createElement(i.DialogActions,null,m&&a().createElement(i.Button,{variant:"outlined",onClick:()=>b(m),disabled:d||m.disabled},m.label),c&&a().createElement(i.Button,{variant:"contained",onClick:()=>b(c),disabled:d||c.disabled,startIcon:d?a().createElement(i.CircularProgress,{size:16,color:"inherit"}):null},c.label)))},u=l().shape({label:l().node.isRequired,onClick:l().func.isRequired,disabled:l().bool});m.propTypes={title:l().node.isRequired,open:l().bool.isRequired,onClose:l().func.isRequired,maxWidth:l().oneOf(["xs","sm","md","lg","xl",!1]),fullWidth:l().bool,primaryAction:u,secondaryAction:u,children:l().node.isRequired},m.defaultProps={maxWidth:"sm",fullWidth:!0,primaryAction:null,secondaryAction:null};const d=m},314:(e,t,r)=>{r.d(t,{default:()=>u});var n=r(2015),a=r.n(n),o=r(1101),l=r.n(o),i=r(785),c=r.n(i),s=r(6989),m=r.n(s);const u=({message:e,sx:t})=>a().createElement(m(),{display:"flex",alignItems:"flex-start",gap:1,sx:t},a().createElement(l(),{sx:{fontSize:16,color:"text.secondary",mt:"2px"}}),a().createElement(c(),{variant:"body1",color:"text.secondary",sx:{fontSize:"13px"}},e))},8940:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(2015),a=r.n(n),o=r(785),l=r.n(o),i=r(8400);const c=({value:e})=>{const t=e<0,r=t?"primary.dark":"text.disabled",n=`${t?"-":""}${(0,i.currencyAmountFromCents)(Math.abs(e))}`;return a().createElement(l(),{variant:"body1",sx:{color:r}},n)}},6196:(e,t,r)=>{r.d(t,{A:()=>g});var n=r(2015),a=r.n(n),o=r(3983),l=r.n(o),i=r(4118),c=r.n(i);const s=require("@mui/icons-material/Refresh");var m=r.n(s),u=r(6366),d=r.n(u),p=r(3209),y=r(6989),b=r.n(y);const E={[p.PX.CHARGE]:{icon:l(),color:"warning.light"},[p.PX.PAYMENT]:{icon:c(),color:"success.light"},[p.PX.DISCOUNT]:{icon:c(),color:"success.light"},[p.PX.REFUND]:{icon:m(),color:"warning.light"},[p.PX.CANCELLED]:{icon:d(),color:"default"}},g=({type:e,children:t})=>{const r=E[e];if(!r)return null;const n=r.icon;return a().createElement(b(),{sx:{display:"flex",alignItems:"center",gap:1}},a().createElement(n,{sx:{color:r.color}}),t||e)}},3491:(e,t,r)=>{r.d(t,{default:()=>h});var n=r(6031),a=r.n(n),o=r(1116),l=r.n(o),i=r(2462),c=r.n(i),s=r(2015),m=r.n(s),u=r(9825),d=r.n(u),p=r(3294),y=r(9314);const b=["name","min","max"];function E(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){l()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const f=["e","E","+","-"],x=e=>{let{name:t,min:r,max:n}=e,o=c()(e,b);const[,,l]=(0,p.useField)(t);return m().createElement(y.default,a()({name:t,type:"number",onKeyDown:e=>{f.includes(e.key)&&(e.nativeEvent.preventDefault(),e.nativeEvent.stopImmediatePropagation())},onChange:e=>{const t=parseInt(e.target.value,10),a=r??0;if(isNaN(t))return e.target.value=a,void l.setValue(a);const o=n?Math.min(Math.max(t,a),n):Math.max(t,a);e.target.value=o,l.setValue(o)},slotProps:{htmlInput:g({min:r??0},n?{max:n}:{})}},o))};x.propTypes={name:d().string.isRequired,label:d().string};const h=x},9314:(e,t,r)=>{r.d(t,{default:()=>b});var n=r(6031),a=r.n(n),o=r(2462),l=r.n(o),i=r(2015),c=r.n(i),s=r(9825),m=r.n(s),u=r(8619),d=r(3294);const p=["name","label","maxLength","required"],y=e=>{var t;let{name:r,label:n,maxLength:o,required:i=!1}=e,s=l()(e,p);const[m,y]=(0,d.useField)(r),b=(null===(t=m.value)||void 0===t?void 0:t.length)||0;let E="";return n&&(E=i?`${n} *`:n),c().createElement(u.Box,null,c().createElement(u.TextField,a()({name:r,label:E},m,{onBlur:m.onBlur,margin:"normal",error:y.touched&&Boolean(y.error),helperText:y.touched&&y.error,slotProps:{htmlInput:{maxLength:o}}},s)),o&&c().createElement(u.Typography,{sx:{fontSize:"1.2rem",color:"#00000099",pl:2}},o-b+" characters left"))};y.propTypes={name:m().string.isRequired,label:m().string,maxLength:m().number,required:m().bool};const b=y},6412:(e,t,r)=>{r.d(t,{DiscountRow:()=>O,FeeRow:()=>_,NotesRow:()=>f,PaymentRow:()=>q,RefundRow:()=>A,TotalRow:()=>y});var n=r(2015),a=r.n(n),o=r(5684),l=r.n(o),i=r(464),c=r.n(i),s=r(785),m=r.n(s),u=r(6842),d=r.n(u),p=r(8400);const y=({total:e,colGap:t=3,trailing:r=0,label:n=null,rowSx:o={}})=>{const i=n||d().translate("mui_table.total"),s=e??0,u=s<0,y=u?"primary.dark":0===s?"text.primary":"error.main",b=`${u?"-":""}${(0,p.currencyAmountFromCents)(Math.abs(s))}`;return a().createElement(c(),{sx:o},a().createElement(l(),null,a().createElement(m(),{sx:{fontWeight:800,textTransform:"uppercase"}},i)),[...Array(t)].map(((e,t)=>a().createElement(l(),{key:`total-gap-col-${t}`}))),a().createElement(l(),{align:"right"},a().createElement(m(),{sx:{color:y,fontWeight:800,fontSize:"15px"}},b)),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`total-trailing-col-${t}`}))))};var b=r(8619),E=r(9870),g=r.n(E);const f=({colCount:e,note:t,showCode:r=!1})=>{const a=r?e-1:e;return n.createElement(c(),null,r&&n.createElement(l(),null,g().translate("mui_table.note")),n.createElement(l(),{colSpan:a},n.createElement(b.Typography,{variant:"body1",sx:{color:"text.secondary"}},t)))};var x=r(6196),h=r(3209),v=r(8940);const _=({fee:e,balance:t,colGap:r=0,trailing:n=0})=>e?a().createElement(c(),null,a().createElement(l(),null,d().translate("mui_table.payfee")),a().createElement(l(),null,a().createElement(x.A,{type:h.PX.CHARGE})),a().createElement(l(),null,a().createElement(m(),{variant:"body1"},e.title)),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`fee-col-gap-${t}`}))),a().createElement(l(),{align:"right"},a().createElement(m(),{variant:"body1"},(0,p.currencyAmountFromCents)(e.amount))),a().createElement(l(),{align:"right"},a().createElement(v.A,{value:t})),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`fee-trailing-col-${t}`,sx:{width:40}})))):null;var C=r(5812),w=r.n(C);const q=({payment:e,balance:t,colGap:r=0,trailing:n=0})=>e?a().createElement(c(),{sx:{backgroundColor:"#2E7D3214"}},a().createElement(l(),null,d().translate("mui_table.pay")),a().createElement(l(),null,a().createElement(x.A,{type:h.PX.PAYMENT},a().createElement(m(),{variant:"body1",sx:{color:"success.dark"}},d().translate("mui_table.payment")))),a().createElement(l(),null,a().createElement(m(),{variant:"body1"},d().translate("mui_table.paid_via")," ",e.method),a().createElement(m(),{variant:"body1",sx:{color:"text.disabled"}},w()(e.created*h.iC).format(h.QM))),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`pay-col-gap-${t}`}))),a().createElement(l(),{align:"right"},a().createElement(m(),{variant:"body1",sx:{color:"success.dark"}},(0,p.currencyAmountFromCents)(e.amount))),a().createElement(l(),{align:"right"},a().createElement(v.A,{value:t})),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`pay-trailing-col-${t}`,sx:{width:40}})))):null,A=({refund:e,balance:t,colGap:r=0,trailing:n=0})=>e?a().createElement(c(),{sx:{backgroundColor:"#EF6C0014"}},a().createElement(l(),null,d().translate("mui_table.ref")),a().createElement(l(),null,a().createElement(x.A,{type:h.PX.REFUND},a().createElement(m(),{variant:"body1",sx:{color:"warning.dark"}},d().translate("mui_table.refund")))),a().createElement(l(),null,a().createElement(m(),{variant:"body1"},e.reason),a().createElement(m(),{variant:"body1",sx:{color:"text.disabled"}},e.status)),[...Array(r)].map(((e,t)=>a().createElement(l(),{key:`ref-col-gap-${t}`}))),a().createElement(l(),{align:"right"},a().createElement(m(),{variant:"body1",sx:{color:"warning.dark"}},(0,p.currencyAmountFromCents)(e.amount))),a().createElement(l(),{align:"right"},a().createElement(v.A,{value:t})),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`ref-trailing-col-${t}`,sx:{width:40}})))):null,O=({discount:e,discountCents:t,balance:r,colGap:n=0,trailing:o=0})=>t?a().createElement(c(),{sx:{backgroundColor:"#2E7D3214"}},a().createElement(l(),null,d().translate("mui_table.dis")),a().createElement(l(),null,a().createElement(x.A,{type:h.PX.DISCOUNT},a().createElement(m(),{variant:"body1",sx:{color:"success.main"}},d().translate("mui_table.discount")))),a().createElement(l(),null,a().createElement(m(),{variant:"body1"},e)),[...Array(n)].map(((e,t)=>a().createElement(l(),{key:`pay-col-gap-${t}`}))),a().createElement(l(),{align:"right"},a().createElement(m(),{variant:"body1",sx:{color:"success.main"}},(0,p.currencyAmountFromCents)(t))),a().createElement(l(),{align:"right"},a().createElement(v.A,{value:r})),[...Array(o)].map(((e,t)=>a().createElement(l(),{key:`pay-trailing-col-${t}`,sx:{width:40}})))):null},3209:(e,t,r)=>{r.d(t,{OP:()=>a,PX:()=>c,QM:()=>i,fJ:()=>o,iC:()=>l,q9:()=>n});const n=100n,a=2,o=0,l=1e3,i="MM/DD/YYYY hh:mm a",c={CHARGE:"Charge",PAYMENT:"Payment",REFUND:"Refund",DISCOUNT:"Discount",CANCELLED:"Cancelled"}},9558:(e,t,r)=>{r.d(t,{formatEpoch:()=>o});var n=r(5812),a=r.n(n);r(8041);const o=(e,t="M/D/YYYY h:mm a")=>e?(e=>e?(e*=1e3,a()(e)):e)(e).format(t):e},8400:(e,t,r)=>{r.d(t,{currencyAmountFromCents:()=>o});var n=r(3209);const a={USD:"$",EUR:"€",GBP:"£",CAD:"C$",AUD:"A$",NZD:"NZ$",CHF:"CHF",ARS:"AR$",BRL:"R$",MXN:"MX$"};function o(e,t="USD"){let r="!ERROR";if("number"!=typeof e||!Number.isInteger(e))return console.error("ERROR - currencyAmountFromCents: cents must be an integer number"),r;try{const o=function(e){let t;if("bigint"==typeof e)t=e;else if("number"==typeof e){if(!Number.isSafeInteger(e))throw new Error("cents must be a safe integer Number (or pass BigInt/string).");t=BigInt(e)}else{if("string"!=typeof e)throw new Error("cents must be a bigint, number, or numeric string.");{const r=e.trim();if(!/^\d+$/.test(r))throw new Error("cents string must contain digits only (e.g., '1234').");t=BigInt(r)}}if(t<n.fJ)throw new Error("cents must be non-negative.");const r=t/n.q9,a=t%n.q9;return`${r.toString()}.${a.toString().padStart(n.OP,"0")}`}(e);r=`${a[t]??"$"}${o}`}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")},4118:e=>{e.exports=require("@mui/icons-material/ArrowDownward")},3983:e=>{e.exports=require("@mui/icons-material/ArrowUpward")},4325:e=>{e.exports=require("@mui/icons-material/Close")},6366:e=>{e.exports=require("@mui/icons-material/DoNotDisturb")},1101:e=>{e.exports=require("@mui/icons-material/InfoOutlined")},8619:e=>{e.exports=require("@mui/material")},6989:e=>{e.exports=require("@mui/material/Box")},6368:e=>{e.exports=require("@mui/material/Button")},7413:e=>{e.exports=require("@mui/material/Divider")},909:e=>{e.exports=require("@mui/material/IconButton")},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")},4603:e=>{e.exports=require("@mui/material/Tooltip")},785:e=>{e.exports=require("@mui/material/Typography")},3294:e=>{e.exports=require("formik")},9870:e=>{e.exports=require("i18n-react")},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 a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};r.r(n),r.d(n,{default:()=>oe});var a=r(1116),o=r.n(a),l=r(2015),i=r.n(l),c=r(6842),s=r.n(c),m=r(6989),u=r.n(m),d=r(5783),p=r.n(d),y=r(464),b=r.n(y),E=r(9008),g=r.n(E),f=r(5684),x=r.n(f),h=r(9292),v=r.n(h),_=r(8202),C=r.n(_),w=r(785),q=r.n(w),A=r(7413),O=r.n(A),k=r(909),P=r.n(k),D=r(4603),R=r.n(D);const F=require("@mui/icons-material/Rule");var $=r.n(F),j=r(6412),S=r(3209),T=r(314),N=r(8400),I=r(6196),M=r(9558);const B=({total:e})=>{const t=e??0,r=t<0,n=r?"primary.dark":0===t?"text.primary":"error.main",a=`${r?"-":""}${(0,N.currencyAmountFromCents)(Math.abs(t))}`;return i().createElement(u(),{sx:{bgcolor:"#F1F3F5",display:"flex",justifyContent:"space-between",alignItems:"center",borderTop:"1px solid #EEE",pt:2,mt:2,mx:-2,px:"10%",mb:-3,pb:2}},i().createElement(q(),{sx:{fontWeight:800,textTransform:"uppercase"}},s().translate("sponsor_order_grid.amount_due")),i().createElement(q(),{sx:{color:n,fontWeight:800,fontSize:"15px"}},a))},W=({cancelledTotal:e,refundsTotal:t,retained:r,credited:n})=>{const a=r>0?"error.dark":"success.dark",o=r>0?"retained":n>0?"credited":"balance",l=r>0?r:n>0?n:r;return i().createElement(u(),{sx:{maxWidth:400,mt:2,mb:3}},i().createElement(q(),{variant:"body2",sx:{mb:3}},s().translate("sponsor_order_grid.reconciliation")),i().createElement(u(),{sx:{display:"flex",justifyContent:"space-between"}},i().createElement(q(),{variant:"body1",sx:{color:"text.secondary"}},s().translate("sponsor_order_grid.cancelled")),i().createElement(q(),{variant:"body1"},(0,N.currencyAmountFromCents)(e??0))),i().createElement(u(),{sx:{display:"flex",justifyContent:"space-between"}},i().createElement(q(),{variant:"body1",sx:{color:"text.secondary"}},s().translate("sponsor_order_grid.refunded")),i().createElement(q(),{variant:"body1"},(0,N.currencyAmountFromCents)(t??0))),i().createElement(O(),{sx:{my:1}}),i().createElement(u(),{sx:{display:"flex",justifyContent:"space-between"}},i().createElement(q(),{variant:"body2"},s().translate(`sponsor_order_grid.${o}`)),i().createElement(q(),{variant:"body2",sx:{color:a}},(0,N.currencyAmountFromCents)(l??0))))};var z=r(6366),U=r.n(z);const X=require("@mui/material/Link");var Y=r.n(X);function L(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 G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const K=({cancelledItems:e,sx:t={}})=>0===e.length?null:i().createElement(u(),{sx:G({display:"flex",flexDirection:"row"},t)},i().createElement(U(),{sx:{mr:"3px",top:"2px",position:"relative"}}),i().createElement(q(),{variant:"body2",sx:{mb:2,mr:1}},s().translate("sponsor_order_grid.cancelled_items")),e.map((e=>{const t=e.canceled_quantity===e.quantity?"bold":"normal";return i().createElement(Y(),{key:`cancelled-item-${e.id}`,variant:"body1",href:`#item-${e.id}`,sx:{mr:1,color:"text.disabled",fontWeight:t,textDecorationColor:"rgba(0, 0, 0, 0.38)"}},e.formCode," - ",e.itemCode," (",e.canceled_quantity,"/",e.quantity,")")})));var H=r(8940),V=r(3294),J=r(6368),Q=r.n(J),Z=r(6969),ee=r(3491),te=r(9314);const re=({open:e,onClose:t,item:r,onCancelForm:n,onUndoCancelForm:a})=>{const o=r.quantity,l=o-(r.canceled_quantity??0),c=(0,V.useFormik)({initialValues:{quantity:l,reason:""},onSubmit:({quantity:e,reason:i})=>e<l?n(r,l-e,i).then(t):e===o?a(r).then(t):void t(),enableReinitialize:!0}),m=()=>{c.resetForm(),t()},d=o!==l,p=c.values.quantity!==l,y=c.values.quantity===o,b=!y&&c.values.quantity>l;return i().createElement(Z.default,{title:s().translate("sponsor_order_grid.change_quantity_modal.title"),open:e,onClose:m,primaryAction:{label:s().translate("general.apply"),onClick:c.submitForm,disabled:!p||b},secondaryAction:{label:s().translate("general.cancel"),onClick:m}},i().createElement(V.FormikProvider,{value:c},i().createElement(u(),{sx:{display:"flex",flexDirection:"column",gap:2}},i().createElement(u(),{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:2}},i().createElement(u(),{sx:{flex:1}},i().createElement(ee.default,{name:"quantity",fullWidth:!0,size:"small",margin:"none",disabled:0===l,min:0,max:l,label:s().translate("sponsor_order_grid.change_quantity_modal.quantity"),sx:{flex:1}})),i().createElement(Q(),{variant:"outlined",onClick:()=>{c.setFieldValue("quantity",o),c.setFieldValue("reason","")},disabled:!d,size:"small",sx:{whiteSpace:"nowrap",flexShrink:0}},s().translate("sponsor_order_grid.change_quantity_modal.reset"))),i().createElement(te.default,{name:"reason",fullWidth:!0,multiline:!0,minRows:3,disabled:y,label:s().translate("sponsor_order_grid.change_quantity_modal.reason")}))))};function ne(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 ae(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const oe=({title:e=s().translate("sponsor_order_grid.title"),order:t,withReconciliation:r=!1,withCancelledItemsHeader:n=!1,onCancelForm:a,onUndoCancelForm:o})=>{const{forms:l=[],fees:c=[],payments:m=[],refunds:d=[],notes:y=[],total:E=0,retained:f=0,credited_to_payment_method:h=0,cancelled_total:_=0,refunds_total:w=0}=t||{},A=(e=>e?e.map((e=>ae(ae({},e),{},{items:e.items.filter((e=>e.quantity)).map(((t,r)=>{var n,a;const o=(0,N.currencyAmountFromCents)(t.amount||0),l=t.line_id??`${e.id}-${r}`,i=t.canceled_quantity??0,c=i>0&&i===t.quantity,s=c?S.PX.CANCELLED:S.PX.CHARGE;return{id:l,formCode:e.code,itemName:null===(n=t.type)||void 0===n?void 0:n.name,itemCode:null===(a=t.type)||void 0===a?void 0:a.code,quantity:t.quantity,canceled_quantity:i,type:s,amount:o,amountValue:t.amount,cancelled:c,cancellations:t.cancellations??[]}}))}))):[])(l),k=A.flatMap((e=>e.items.filter((e=>e.canceled_quantity>0)))),D=a&&o,F=D?1:0,[z,U]=i().useState(null);let X=0;const Y=(e,t=1)=>(X+=e*t,X),L=[{columnKey:"formCode",header:s().translate("sponsor_order_grid.code")},{columnKey:"type",header:s().translate("sponsor_order_grid.type"),render:e=>i().createElement(I.A,{type:e.type})},{columnKey:"details",header:s().translate("sponsor_order_grid.details"),render:e=>i().createElement(i().Fragment,null,i().createElement(q(),{variant:"body1",sx:ae({},e.cancelled&&{textDecoration:"line-through"})},e.itemName," - ",s().translate("sponsor_order_grid.total"),": ",e.quantity-e.canceled_quantity),e.cancellations.map((t=>i().createElement(u(),{key:`cancellation-${e.id}-${t.id}`,sx:{mt:1}},i().createElement(q(),{variant:"body1",sx:{color:"text.disabled"}},s().translate("sponsor_order_grid.cancelled_by",{x:t.quantity,y:e.quantity,money:(0,N.currencyAmountFromCents)(t.amount),user:t.canceled_by_full_name,date:(0,M.formatEpoch)(t.created,"M/D/YY [@] h:mm A")})),t.reason&&i().createElement(q(),{variant:"body1",sx:{color:"text.disabled",pl:2,fontStyle:"italic"}},"↳ ",t.reason)))))},{columnKey:"amount",header:s().translate("sponsor_order_grid.amount"),align:"right"}],G=L.length+1+F,V=[...(null==m?void 0:m.map((e=>ae(ae({},e),{},{type:"payment"}))))||[],...(null==d?void 0:d.map((e=>ae(ae({},e),{},{type:"refund"}))))||[]].sort(((e,t)=>e.created-t.created));return i().createElement(u(),{sx:{mt:1}},i().createElement(u(),{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",mb:2}},e&&i().createElement(q(),{gutterBottom:!0,variant:"h6",sx:{mb:4,mr:2}},e),n&&i().createElement(K,{cancelledItems:k,sx:{pt:"10px"}})),D&&i().createElement(T.default,{sx:{mb:2},message:s().translate("sponsor_order_grid.cancel_info_note")}),i().createElement(p(),{component:u(),sx:{borderRadius:"10px",mb:4,border:"1px solid #E0E0E0"}},i().createElement(v(),null,i().createElement(C(),{sx:{backgroundColor:"#EAEAEA"}},i().createElement(b(),null,L.map((e=>i().createElement(x(),{key:e.columnKey,align:e.align??"left"},e.header))),i().createElement(x(),{key:"balance",align:"right"},s().translate("sponsor_order_grid.balance")),D&&i().createElement(x(),{key:"actions",align:"center"},s().translate("sponsor_order_grid.action")))),i().createElement(g(),{sx:{"& td":{fontWeight:"normal"}}},A.map((e=>{const t=e.items.map((e=>i().createElement(b(),{id:`item-${e.id}`,key:`item-row-${e.id}`,sx:ae({},e.cancelled&&{bgcolor:"#FAFAFA"})},(()=>{const t=L.map((t=>i().createElement(x(),{key:`grid-col-${e.id}-${t.columnKey}`,align:t.align??"left",sx:ae({},e.cancelled&&{color:"text.disabled"})},t.render?t.render(e):e[t.columnKey])));return t.push(i().createElement(x(),{key:`grid-col-${e.id}-balance`,align:"right",sx:ae({},e.cancelled&&{color:"text.disabled"})},i().createElement(H.A,{value:Y(e.amountValue)}))),D&&t.push(i().createElement(x(),{key:"action",align:"right"},i().createElement(R(),{title:s().translate("sponsor_order_grid.change_quantity_tooltip")},i().createElement(P(),{size:"large",onClick:()=>U(e)},i().createElement($(),{fontSize:"large"}))))),t})()))),r=e.discount_in_cents??0;return t.push(i().createElement(j.DiscountRow,{key:`discount-row-${e.id}`,discount:e.discount,discountCents:r,trailing:F,balance:Y(r,-1)})),t})),c&&c.map((e=>i().createElement(j.FeeRow,{key:`fee-row-${e.id}`,balance:Y(e.amount),fee:e,trailing:F}))),V.map((e=>"payment"===e.type?i().createElement(j.PaymentRow,{key:`payment-row-${e.id}`,payment:e,balance:Y(e.amount,-1),trailing:F}):"refund"===e.type?i().createElement(j.RefundRow,{key:`refund-row-${e.id}`,refund:e,balance:Y(e.amount),trailing:F}):void 0)),y&&y.map((e=>i().createElement(j.NotesRow,{key:`note-row-${e.id}`,note:e.content,colCount:G,showCode:!0}))),!r&&i().createElement(j.TotalRow,{total:E,label:s().translate("sponsor_order_grid.amount_due"),trailing:F,rowSx:{bgcolor:"#F1F3F5","& td":{borderBottom:"none"}}}),0===A.length&&i().createElement(b(),null,i().createElement(x(),{colSpan:G,align:"center"},s().translate("mui_table.no_items")))))),r&&i().createElement(u(),{sx:{mt:3}},i().createElement(O(),null),i().createElement(W,{cancelledTotal:_,refundsTotal:w,retained:f,credited:h}),i().createElement(B,{total:E})),z&&i().createElement(re,{open:!!z,onClose:()=>U(null),item:z,onCancelForm:a,onUndoCancelForm:o}))};return n})()));
|
|
2
2
|
//# sourceMappingURL=sponsor-order-grid.js.map
|