openstack-uicore-foundation 5.0.37-beta.0 → 5.0.37
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 +62 -0
- package/.claude/rules/openstack-uicore-foundation-project.md +64 -0
- package/.claude/rules/openstack-uicore-foundation-security.md +39 -0
- package/.claude/settings.local.json +1 -19
- 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/lib/components/index.js +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/mui/dropdown.js +1 -1
- package/lib/components/mui/dropdown.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/form-item-table.js +1 -1
- package/lib/components/mui/form-item-table.js.map +1 -1
- package/lib/components/mui/formik-inputs/dropdown-checkbox.js +1 -1
- package/lib/components/mui/formik-inputs/dropdown-checkbox.js.map +1 -1
- package/lib/components/mui/formik-inputs/dropdown-radio.js +1 -1
- package/lib/components/mui/formik-inputs/dropdown-radio.js.map +1 -1
- package/lib/components/mui/formik-inputs/select-v2.js +1 -1
- package/lib/components/mui/formik-inputs/select-v2.js.map +1 -1
- package/lib/components/mui/grid-filter.js +1 -1
- package/lib/components/mui/grid-filter.js.map +1 -1
- package/lib/components/mui/item-settings-modal.js +1 -1
- package/lib/components/mui/item-settings-modal.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/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/i18n.js +1 -1
- package/lib/i18n.js.map +1 -1
- package/package.json +1 -1
- package/lib/components/mui/bulk-edit-table.js +0 -2
- package/lib/components/mui/bulk-edit-table.js.map +0 -1
- package/lib/components/mui/table/custom-table-pagination.js +0 -2
- package/lib/components/mui/table/custom-table-pagination.js.map +0 -1
- package/lib/css/components/mui/bulk-edit-table.css +0 -2
- package/lib/css/components/mui/bulk-edit-table.css.map +0 -1
- package/package-lock.json +0 -22291
package/lib/i18n.js
CHANGED
|
@@ -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={9558:(e,t,o)=>{o.d(t,{getCurrentUserLanguage:()=>r});o(5812),o(8041);const r=()=>{let e="en";return"undefined"!=typeof navigator&&(e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage),e}},5812:e=>{e.exports=require("moment-timezone")},8041:e=>{e.exports=require("urijs")}},t={};function o(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};o.r(r),o.d(r,{setAppTexts:()=>c});var a=o(9558);const n=require("i18n-react");var s=o.n(n);const i=require("lodash/merge");var l=o.n(i);const d={en:JSON.parse('{"errors":{"user_not_auth":"Hold on. Your user is not authenticated!.","user_not_authz":"Hold on. Your user is not authorized!.","session_expired":"Hold on. Your session expired!.","server_error":"There was a problem with our server, please contact admin.","maximum_files":"Maximum number of files has been reached"},"general":{"select_summit":"Select a Summit...","add":"Add","clear":"Clear","remove":"Remove","drop_files":"Drop images or click to select files to upload.","search":"Search","save":"Save","done":"Done!","ok":"ok","unarchive":"Unarchive","archive":"Archive","settings":"Settings","profile":"Profile","drag_and_drop":"Drag and Drop to sort items.","other":"Other","type_something":"Type something and press tab or enter.","are_you_sure":"Are you sure?","yes_delete":"Yes, delete.","remove_warning":"Are you sure you want to delete this?","all":"All","row_remove_warning":"Are you sure you want to delete row ","edit":"Edit","delete":"Delete","cancel":"Cancel","n_a":"N/A","not_available":"N/A","notes":"Notes","due":"Due","to":"To","from":"From"},"buttons":{"log_in":"Log in","sign_out":"Sign Out","my_cart":"My Cart","upload_file":"Upload file","download":"Download"},"placeholders":{"notes":"Enter your notes here..."
|
|
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={9558:(e,t,o)=>{o.d(t,{getCurrentUserLanguage:()=>r});o(5812),o(8041);const r=()=>{let e="en";return"undefined"!=typeof navigator&&(e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage),e}},5812:e=>{e.exports=require("moment-timezone")},8041:e=>{e.exports=require("urijs")}},t={};function o(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};o.r(r),o.d(r,{setAppTexts:()=>c});var a=o(9558);const n=require("i18n-react");var s=o.n(n);const i=require("lodash/merge");var l=o.n(i);const d={en:JSON.parse('{"errors":{"user_not_auth":"Hold on. Your user is not authenticated!.","user_not_authz":"Hold on. Your user is not authorized!.","session_expired":"Hold on. Your session expired!.","server_error":"There was a problem with our server, please contact admin.","maximum_files":"Maximum number of files has been reached"},"general":{"select_summit":"Select a Summit...","add":"Add","clear":"Clear","remove":"Remove","drop_files":"Drop images or click to select files to upload.","search":"Search","save":"Save","done":"Done!","ok":"ok","unarchive":"Unarchive","archive":"Archive","settings":"Settings","profile":"Profile","drag_and_drop":"Drag and Drop to sort items.","other":"Other","type_something":"Type something and press tab or enter.","are_you_sure":"Are you sure?","yes_delete":"Yes, delete.","remove_warning":"Are you sure you want to delete this?","select_an_option":"Select an option...","all":"All","row_remove_warning":"Are you sure you want to delete row ","edit":"Edit","delete":"Delete","cancel":"Cancel","n_a":"N/A","not_available":"N/A","notes":"Notes","due":"Due","to":"To","from":"From"},"buttons":{"log_in":"Log in","sign_out":"Sign Out","my_cart":"My Cart","upload_file":"Upload file","download":"Download"},"placeholders":{"notes":"Enter your notes here..."},"alerts":{"confirm_delete_title":"Confirm Deletion","confirm_delete":"Are you sure you want to delete this item? This action cannot be undone."},"mui_table":{"no_items":"No items found.","no_data":"No data found.","rows_per_page":"Rows per page","sorted_desc":"sorted descending","sorted_asc":"sorted ascending","total":"Total","pay":"PAY","payment":"Payment","paid_via":"Paid via","ref":"REF","refund":"Refund","payfee":"PAYFEE","dis":"DIS","discount":"Discount","amount_due":"AMOUNT DUE","note":"NOTE"},"meta_fields":{"delete_value_warning":"Please verify you want to delete the added value","is_default":"Is Default?","add_value":"Add a value","placeholders":{"name":"Name","value":"Value"}},"rates":{"early_bird":"Early bird","standard_rate":"Standard","onsite_rate":"Onsite"},"additional_inputs":{"title":"Field Title","type":"Field Type","required":"Required","delete_warning":"Are you sure you want to delete meta field ","minimum":"Minimum","maximum":"Maximum","placeholders":{"title":"Field Title","type":"Select...","minimum_quantity":"Minimum","maximum_quantity":"Maximum"}},"sponsor_edit_form":{"code":"Code","description":"Description","custom_rate":"Custom Rate","early_bird_rate":"Early Bird Rate","standard_rate":"Standard Rate","onsite_rate":"Onsite Rate","qty":"Quantity","total":"Total","notes":"Notes","notes_placeholder":"Enter your notes here...","additional_info":"Additional Info","discount":"Discount","total_on_caps":"TOTAL"},"upload_input":{"upload_file":"Upload file"},"request_modal":{"no_company_match":"No company matches","create_company_access_request":"Create a new company access request for {companyName}"},"stripe_form":{"processing":"Processing...","button_cta":"PAY {amount}","title":"Select a payment method","payment_confirmation_error":"Payment confirmation failed"},"sponsor_order_grid":{"title":"Order Items Ledger","code":"Code","type":"Type","addon":"Add-on","details":"Details","balance":"Balance","discount":"Discount","amount":"Amount","amount_due":"AMOUNT DUE","total":"Total","rate":"Rate","action":"Action","cancel_info_note":"Active order items can be canceled. Canceled items show an undo action to restore them. Refund and payment rows are display-only.","cancelled_by":"Cancelled {date} by {user}","cancelled_items":"Cancelled items ({count}):","reconciliation":"Reconciliation","cancelled":"Cancelled","refunded":"Refunded","retained":"Retained as cancellation fee","credited":"Credited to Payment Method"},"upload_input_v3":{"no_post_url":"No Post URL","upload_disabled":"Upload has been disabled by administrators.","click_upload":"Click to upload","drag_and_drop":"or drag and drop","see_preview":"See Preview","preview_file":"Preview file","complete":"Complete"},"grid_filter":{"filter_by":"Filter by ","following":" one of the following: ","select_criteria":"Select criteria","select_operator":"Select operator","select_values":"Select values","filters":"Filters","clear_filters":"Clear Filters","cancel":"Cancel","apply_filters":"Apply Filters","open_filters":"Open filters","operators":{"is":"is","is_not":"is not","like":"like","like_start":"like start","has":"has","has_not":"has not","less":"less than","less_or_equal":"less than or equal to","greater":"greater than","greater_or_equal":"greater than or equal to","between":"between","between_strict":"between strict","all":"all","any":"any"}}}'),zh:JSON.parse('{"errors":{"user_not_auth":"坚持,稍等。您的用户没有经过身份验证!","user_not_authz":"坚持,稍等。您的用户未经授权!","session_expired":"坚持,稍等。你的会话已经过期了!","server_error":"我们的服务器出现问题,请联系管理员。"},"general":{"select_summit":"选择峰会...","add":"加","clear":"明确","remove":"去掉","drop_files":"删除图像或单击以选择要上载的文件。","search":"搜索","save":"保存","done":"完成!","drag_and_drop":"拖放以对项目进行排序。","other":"其他","type_something":"输入内容并按Tab键或输入。","are_you_sure":"你确定吗?","yes_delete":"是的,删除。","remove_warning":"你确定要删除这个吗?"}}'),es:JSON.parse('{"errors":{"user_not_auth":"Hold on. Your user is not authenticated!.","user_not_authz":"Hold on. Your user is not authorized!.","session_expired":"Hold on. Your session expired!.","server_error":"There was a problem with our server, please contact admin."},"general":{"select_summit":"Select a Summit...","add":"Add","clear":"Clear","remove":"Remove","drop_files":"Drop images or click to select files to upload.","search":"Search","save":"Save","done":"Done!","drag_and_drop":"Drag and Drop to sort items.","other":"Other","type_something":"Type something and press tab or enter.","are_you_sure":"Are you sure?","yes_delete":"Yes, delete.","remove_warning":"Are you sure you want to delete this?"}}')};let u=(0,a.getCurrentUserLanguage)();u.length>2&&(u=u.split("-")[0],u=u.split("_")[0]);try{s().setTexts(d[u])}catch(e){s().setTexts(d.en)}const c=(e={})=>{const t=d[u]||d.en;s().setTexts(l()({},t,e))};return r})()));
|
|
2
2
|
//# sourceMappingURL=i18n.js.map
|
package/lib/i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.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,+FCO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0BAMXC,EAASiC,OAAS,IAClBjC,EAAWA,EAASkC,MAAM,KAAK,GAC/BlC,EAAWA,EAASkC,MAAM,KAAK,IAGnC,IACIC,IAAAA,SAAWH,EAAUhC,GACzB,CAAE,MAAOoC,GACLD,IAAAA,SAAWH,EAAc,GAC7B,CAUO,MAAMK,EAAcA,CAACC,EAAc,CAAC,KACvC,MAAMC,EAAWP,EAAUhC,IAAagC,EAAc,GACtDG,IAAAA,SAAWK,IAAM,CAAC,EAAGD,EAAUD,GAAa,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"urijs\"","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 \"i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"lodash/merge\"","webpack://openstack-uicore-foundation/./src/i18n/i18n.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2018 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 moment from 'moment-timezone';\nimport URI from \"urijs\";\n\nexport const findElementPos = (obj) => {\n var curtop = -70;\n if (obj.offsetParent) {\n do {\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n return [curtop];\n }\n};\n\nexport const epochToMoment = (atime) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime);\n};\n\nexport const epochToMomentTimeZone = (atime, time_zone) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime).tz(time_zone);\n};\n\nexport const formatEpoch = (atime, format = 'M/D/YYYY h:mm a') => {\n if(!atime) return atime;\n return epochToMoment(atime).format(format);\n};\n\nexport const parseLocationHour = (hour) => {\n let parsedHour = hour.toString();\n if(parsedHour.length < 4) parsedHour = `0${parsedHour}`;\n parsedHour = parsedHour.match(/.{2}/g);\n parsedHour = parsedHour.join(':');\n return parsedHour;\n}\n\nexport const objectToQueryString = (obj) => {\n var str = \"\";\n for (var key in obj) {\n if (str != \"\") {\n str += \"&\";\n }\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n\n return str;\n};\n\nexport const getBackURL = () => {\n let url = URI(window.location.href);\n let query = url.search(true);\n let fragment = url.fragment();\n let backUrl = query.hasOwnProperty('BackUrl') ? query['BackUrl'] : null;\n if(backUrl != null && fragment != null && fragment != ''){\n backUrl += `#${fragment}`;\n }\n return backUrl;\n};\n\nexport const toSlug = (text) =>{\n text = text.toLowerCase();\n return text.replace(/[^a-zA-Z0-9]+/g,'_');\n}\n\nexport const getAuthCallback = () => {\n if(typeof window !== 'undefined') {\n return `${window.location.origin}/auth/callback`;\n }\n return null;\n};\n\nexport const getCurrentLocation = () => {\n let location = '';\n if(typeof window !== 'undefined') {\n location = window.location;\n // check if we are on iframe\n if (window.top)\n location = window.top.location;\n }\n return location;\n};\n\nexport const getOrigin = () => {\n if(typeof window !== 'undefined') {\n return window.location.origin;\n }\n return null;\n};\n\nexport const getCurrentPathName = () => {\n if(typeof window !== 'undefined') {\n return window.location.pathname;\n }\n return null;\n};\n\nexport const getCurrentHref = () => {\n if(typeof window !== 'undefined') {\n return window.location.href;\n }\n return null;\n};\n\nexport const getAllowedUserGroups = () => {\n if(typeof window !== 'undefined') {\n return window.ALLOWED_USER_GROUPS || '';\n }\n return null;\n};\n\nexport const buildAPIBaseUrl = (relativeUrl) => {\n if(typeof window !== 'undefined'){\n return `${window.API_BASE_URL}${relativeUrl}`;\n }\n return null``;\n};\n\nexport const putOnLocalStorage = (key, value) => {\n if(typeof window !== 'undefined') {\n window.localStorage.setItem(key, value);\n }\n};\n\nexport const getFromLocalStorage = (key, removeIt) => {\n if(typeof window !== 'undefined') {\n let val = window.localStorage.getItem(key);\n if(removeIt){\n console.log(`getFromLocalStorage removing key ${key}`);\n removeFromLocalStorage(key);\n }\n return val;\n }\n return null;\n};\n\nexport const removeFromLocalStorage = (key) => {\n if(typeof window !== 'undefined') {\n window.localStorage.removeItem(key);\n }\n}\n\nexport const isClearingSessionState = () => {\n if(typeof window !== 'undefined') {\n return window.clearing_session_state;\n }\n return false;\n};\n\nexport const setSessionClearingState = (val) => {\n if(typeof window !== 'undefined') {\n window.clearing_session_state = val;\n }\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const scrollToError = (errors) => {\n if(Object.keys(errors).length > 0) {\n const firstError = Object.keys(errors)[0];\n const firstNode = document.getElementById(firstError);\n if (firstNode) window.scrollTo(0, findElementPos(firstNode));\n }\n};\n\nexport const hasErrors = (field, errors) => {\n if(field in errors) {\n return errors[field];\n }\n return '';\n};\n\nexport const shallowEqual = (object1, object2) => {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n};\n\nexport const arraysEqual = (a1, a2) =>\n a1.length === a2.length && a1.every((o, idx) => shallowEqual(o, a2[idx]));\n\nexport const isEmpty = (obj) => {\n return Object.keys(obj).length === 0;\n};\n\n\nexport const base64URLEncode = (str) => {\n return str\n .toString('base64')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=/g, '')\n}\n\nexport const retryPromise = async (\n cb,\n maxNumberOfRetries = 3\n) => {\n for (let i = 0; i < maxNumberOfRetries; i++) {\n if (await cb()) {\n return true;\n }\n }\n\n return false;\n}\n\nexport const getTimeServiceUrl = () => {\n if(typeof window !== 'undefined') {\n return window.TIMEINTERVALSINCE1970_API_URL || process.env.TIMEINTERVALSINCE1970_API_URL;\n }\n return null;\n};\n\nexport const getEventLocation = (event, summitVenueCount, summitShowLocDate = null, nowUtc = null) => {\n const shouldShowVenues = (summitShowLocDate && nowUtc) ? summitShowLocDate * 1000 < nowUtc : true;\n const locationName = [];\n const { location } = event;\n\n if (!shouldShowVenues) return 'TBA';\n\n if (!location) return 'TBA';\n\n if (summitVenueCount > 1 && location.venue?.name) locationName.push(location.venue.name);\n if (location.floor?.name) locationName.push(location.floor.name);\n if (location.name) locationName.push(location.name);\n\n return locationName.length > 0 ? locationName.join(' - ') : 'TBA';\n};\n\nexport const getEventHosts = (event) => {\n let hosts = [];\n if (event.speakers?.length > 0) {\n hosts = [...event.speakers];\n }\n if (event.moderator) hosts.push(event.moderator);\n\n return hosts;\n};\n\nconst loadImage = async url => {\n const img = document.createElement('img')\n img.src = url\n img.crossOrigin = 'anonymous'\n\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(img)\n img.onerror = reject\n })\n}\n\nexport const convertSVGtoImg = async (svgUrl) => {\n const img = await loadImage(svgUrl)\n const newWidth = 100\n const newHeight = Math.floor(img.naturalHeight * 100 / img.naturalWidth)\n\n const canvas = document.createElement('canvas')\n canvas.width = newWidth\n canvas.height = newHeight\n canvas.getContext('2d').drawImage(img, 0, 0, newWidth, newHeight)\n\n const url = await canvas.toDataURL(`image/png`, 1.0)\n console.log(url, newWidth, newHeight);\n return {url, width: newWidth, height: newHeight}\n}\n\nexport const isRateEnabled = (value) =>\n value !== null && value !== undefined && value !== \"\";\n\n/**\n * Returns true if value is null, undefined, empty/whitespace string,\n * empty array, or empty object.\n */\nexport const empty = (value) => {\n if (value === null || value === undefined) return true;\n if (typeof value === \"string\") return value.trim().length === 0;\n if (Array.isArray(value)) return value.length === 0;\n if (typeof value === \"object\") return Object.keys(value).length === 0;\n return false;\n};\n\nexport const isSentryInitialized = () => typeof window !== \"undefined\" && !!window.SENTRY_DSN;\n","module.exports = require(\"moment-timezone\");","module.exports = require(\"urijs\");","// 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(\"i18n-react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"lodash/merge\");","import {getCurrentUserLanguage} from \"../utils/methods\";\nimport T from \"i18n-react\";\nimport merge from \"lodash/merge\";\nimport en from './en.json';\nimport zh from './zh.json';\nimport es from './es.json';\n\nconst resources = {\n 'en' : en,\n 'zh' : zh,\n 'es' : es,\n}\n\nlet language = getCurrentUserLanguage();\n\n// language would be something like es-ES or es_ES\n// However we store our files with format es.json or en.json\n// therefore retrieve only the first 2 digits\n\nif (language.length > 2) {\n language = language.split(\"-\")[0];\n language = language.split(\"_\")[0];\n}\n\ntry {\n T.setTexts(resources[language]);\n} catch (e) {\n T.setTexts(resources['en']);\n}\n\n/**\n * Call this instead of T.setTexts() in consumer apps.\n * Deep-merges the lib's base translations with your custom translations,\n * so new keys added to the lib are always available even if your\n * translation file doesn't include them yet. Consumer keys take precedence.\n *\n * @param {object} customTexts - your app's translation object\n */\nexport const setAppTexts = (customTexts = {}) => {\n const libTexts = resources[language] || resources['en'];\n T.setTexts(merge({}, libTexts, customTexts));\n};"],"names":["root","factory","exports","module","define","amd","this","getCurrentUserLanguage","language","navigator","languages","userLanguage","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","resources","length","split","T","e","setAppTexts","customTexts","libTexts","merge"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"i18n.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,i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gB,mBCOvC4B,EAAY,CACd,G,8iJACA,G,wdACA,G,4sBAGJ,IAAIhC,GAAWD,EAAAA,EAAAA,0BAMXC,EAASiC,OAAS,IAClBjC,EAAWA,EAASkC,MAAM,KAAK,GAC/BlC,EAAWA,EAASkC,MAAM,KAAK,IAGnC,IACIC,IAAAA,SAAWH,EAAUhC,GACzB,CAAE,MAAOoC,GACLD,IAAAA,SAAWH,EAAc,GAC7B,CAUO,MAAMK,EAAcA,CAACC,EAAc,CAAC,KACvC,MAAMC,EAAWP,EAAUhC,IAAagC,EAAc,GACtDG,IAAAA,SAAWK,IAAM,CAAC,EAAGD,EAAUD,GAAa,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"urijs\"","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 \"i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"lodash/merge\"","webpack://openstack-uicore-foundation/./src/i18n/i18n.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2018 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 moment from 'moment-timezone';\nimport URI from \"urijs\";\n\nexport const findElementPos = (obj) => {\n var curtop = -70;\n if (obj.offsetParent) {\n do {\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n return [curtop];\n }\n};\n\nexport const epochToMoment = (atime) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime);\n};\n\nexport const epochToMomentTimeZone = (atime, time_zone) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime).tz(time_zone);\n};\n\nexport const formatEpoch = (atime, format = 'M/D/YYYY h:mm a') => {\n if(!atime) return atime;\n return epochToMoment(atime).format(format);\n};\n\nexport const parseLocationHour = (hour) => {\n let parsedHour = hour.toString();\n if(parsedHour.length < 4) parsedHour = `0${parsedHour}`;\n parsedHour = parsedHour.match(/.{2}/g);\n parsedHour = parsedHour.join(':');\n return parsedHour;\n}\n\nexport const objectToQueryString = (obj) => {\n var str = \"\";\n for (var key in obj) {\n if (str != \"\") {\n str += \"&\";\n }\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n\n return str;\n};\n\nexport const getBackURL = () => {\n let url = URI(window.location.href);\n let query = url.search(true);\n let fragment = url.fragment();\n let backUrl = query.hasOwnProperty('BackUrl') ? query['BackUrl'] : null;\n if(backUrl != null && fragment != null && fragment != ''){\n backUrl += `#${fragment}`;\n }\n return backUrl;\n};\n\nexport const toSlug = (text) =>{\n text = text.toLowerCase();\n return text.replace(/[^a-zA-Z0-9]+/g,'_');\n}\n\nexport const getAuthCallback = () => {\n if(typeof window !== 'undefined') {\n return `${window.location.origin}/auth/callback`;\n }\n return null;\n};\n\nexport const getCurrentLocation = () => {\n let location = '';\n if(typeof window !== 'undefined') {\n location = window.location;\n // check if we are on iframe\n if (window.top)\n location = window.top.location;\n }\n return location;\n};\n\nexport const getOrigin = () => {\n if(typeof window !== 'undefined') {\n return window.location.origin;\n }\n return null;\n};\n\nexport const getCurrentPathName = () => {\n if(typeof window !== 'undefined') {\n return window.location.pathname;\n }\n return null;\n};\n\nexport const getCurrentHref = () => {\n if(typeof window !== 'undefined') {\n return window.location.href;\n }\n return null;\n};\n\nexport const getAllowedUserGroups = () => {\n if(typeof window !== 'undefined') {\n return window.ALLOWED_USER_GROUPS || '';\n }\n return null;\n};\n\nexport const buildAPIBaseUrl = (relativeUrl) => {\n if(typeof window !== 'undefined'){\n return `${window.API_BASE_URL}${relativeUrl}`;\n }\n return null``;\n};\n\nexport const putOnLocalStorage = (key, value) => {\n if(typeof window !== 'undefined') {\n window.localStorage.setItem(key, value);\n }\n};\n\nexport const getFromLocalStorage = (key, removeIt) => {\n if(typeof window !== 'undefined') {\n let val = window.localStorage.getItem(key);\n if(removeIt){\n console.log(`getFromLocalStorage removing key ${key}`);\n removeFromLocalStorage(key);\n }\n return val;\n }\n return null;\n};\n\nexport const removeFromLocalStorage = (key) => {\n if(typeof window !== 'undefined') {\n window.localStorage.removeItem(key);\n }\n}\n\nexport const isClearingSessionState = () => {\n if(typeof window !== 'undefined') {\n return window.clearing_session_state;\n }\n return false;\n};\n\nexport const setSessionClearingState = (val) => {\n if(typeof window !== 'undefined') {\n window.clearing_session_state = val;\n }\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const scrollToError = (errors) => {\n if(Object.keys(errors).length > 0) {\n const firstError = Object.keys(errors)[0];\n const firstNode = document.getElementById(firstError);\n if (firstNode) window.scrollTo(0, findElementPos(firstNode));\n }\n};\n\nexport const hasErrors = (field, errors) => {\n if(field in errors) {\n return errors[field];\n }\n return '';\n};\n\nexport const shallowEqual = (object1, object2) => {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n};\n\nexport const arraysEqual = (a1, a2) =>\n a1.length === a2.length && a1.every((o, idx) => shallowEqual(o, a2[idx]));\n\nexport const isEmpty = (obj) => {\n return Object.keys(obj).length === 0;\n};\n\n\nexport const base64URLEncode = (str) => {\n return str\n .toString('base64')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=/g, '')\n}\n\nexport const retryPromise = async (\n cb,\n maxNumberOfRetries = 3\n) => {\n for (let i = 0; i < maxNumberOfRetries; i++) {\n if (await cb()) {\n return true;\n }\n }\n\n return false;\n}\n\nexport const getTimeServiceUrl = () => {\n if(typeof window !== 'undefined') {\n return window.TIMEINTERVALSINCE1970_API_URL || process.env.TIMEINTERVALSINCE1970_API_URL;\n }\n return null;\n};\n\nexport const getEventLocation = (event, summitVenueCount, summitShowLocDate = null, nowUtc = null) => {\n const shouldShowVenues = (summitShowLocDate && nowUtc) ? summitShowLocDate * 1000 < nowUtc : true;\n const locationName = [];\n const { location } = event;\n\n if (!shouldShowVenues) return 'TBA';\n\n if (!location) return 'TBA';\n\n if (summitVenueCount > 1 && location.venue?.name) locationName.push(location.venue.name);\n if (location.floor?.name) locationName.push(location.floor.name);\n if (location.name) locationName.push(location.name);\n\n return locationName.length > 0 ? locationName.join(' - ') : 'TBA';\n};\n\nexport const getEventHosts = (event) => {\n let hosts = [];\n if (event.speakers?.length > 0) {\n hosts = [...event.speakers];\n }\n if (event.moderator) hosts.push(event.moderator);\n\n return hosts;\n};\n\nconst loadImage = async url => {\n const img = document.createElement('img')\n img.src = url\n img.crossOrigin = 'anonymous'\n\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(img)\n img.onerror = reject\n })\n}\n\nexport const convertSVGtoImg = async (svgUrl) => {\n const img = await loadImage(svgUrl)\n const newWidth = 100\n const newHeight = Math.floor(img.naturalHeight * 100 / img.naturalWidth)\n\n const canvas = document.createElement('canvas')\n canvas.width = newWidth\n canvas.height = newHeight\n canvas.getContext('2d').drawImage(img, 0, 0, newWidth, newHeight)\n\n const url = await canvas.toDataURL(`image/png`, 1.0)\n console.log(url, newWidth, newHeight);\n return {url, width: newWidth, height: newHeight}\n}\n\nexport const isRateEnabled = (value) =>\n value !== null && value !== undefined && value !== \"\";\n\n/**\n * Returns true if value is null, undefined, empty/whitespace string,\n * empty array, or empty object.\n */\nexport const empty = (value) => {\n if (value === null || value === undefined) return true;\n if (typeof value === \"string\") return value.trim().length === 0;\n if (Array.isArray(value)) return value.length === 0;\n if (typeof value === \"object\") return Object.keys(value).length === 0;\n return false;\n};\n\nexport const isSentryInitialized = () => typeof window !== \"undefined\" && !!window.SENTRY_DSN;\n","module.exports = require(\"moment-timezone\");","module.exports = require(\"urijs\");","// 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(\"i18n-react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"lodash/merge\");","import {getCurrentUserLanguage} from \"../utils/methods\";\nimport T from \"i18n-react\";\nimport merge from \"lodash/merge\";\nimport en from './en.json';\nimport zh from './zh.json';\nimport es from './es.json';\n\nconst resources = {\n 'en' : en,\n 'zh' : zh,\n 'es' : es,\n}\n\nlet language = getCurrentUserLanguage();\n\n// language would be something like es-ES or es_ES\n// However we store our files with format es.json or en.json\n// therefore retrieve only the first 2 digits\n\nif (language.length > 2) {\n language = language.split(\"-\")[0];\n language = language.split(\"_\")[0];\n}\n\ntry {\n T.setTexts(resources[language]);\n} catch (e) {\n T.setTexts(resources['en']);\n}\n\n/**\n * Call this instead of T.setTexts() in consumer apps.\n * Deep-merges the lib's base translations with your custom translations,\n * so new keys added to the lib are always available even if your\n * translation file doesn't include them yet. Consumer keys take precedence.\n *\n * @param {object} customTexts - your app's translation object\n */\nexport const setAppTexts = (customTexts = {}) => {\n const libTexts = resources[language] || resources['en'];\n T.setTexts(merge({}, libTexts, customTexts));\n};"],"names":["root","factory","exports","module","define","amd","this","getCurrentUserLanguage","language","navigator","languages","userLanguage","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","resources","length","split","T","e","setAppTexts","customTexts","libTexts","merge"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
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={5420:(e,t,n)=>{n.d(t,{default:()=>g});var r=n(2015),o=n(6842),a=n.n(o);const l=require("@mui/material/TablePagination");var i=n.n(l),c=n(9825),s=n.n(c),u=n(3209);const d={".MuiTablePagination-toolbar":{alignItems:"baseline",marginTop:"1.6rem"},".MuiTablePagination-selectLabel":{color:"rgba(0, 0, 0, 0.6)",fontSize:"12px",fontWeight:"normal"},".MuiTablePagination-select":{color:"rgba(0, 0, 0, 0.6)",fontSize:"12px",fontWeight:"normal"},".MuiTablePagination-spacer":{display:"none"},".MuiTablePagination-displayedRows":{marginLeft:"auto"}},m=[u.WU,u.k6,u.Lr],p=({totalRows:e,perPage:t,currentPage:n,onPageChange:o,onPerPageChange:l})=>{const c=r.useMemo((()=>l?m.includes(t)?m:[...m,t].sort(((e,t)=>e-t)):[t]),[t,l]);return r.createElement(i(),{component:"div",count:e??0,rowsPerPageOptions:c,rowsPerPage:t,page:n-1,onPageChange:(e,t)=>{o(t+1)},onRowsPerPageChange:l?e=>{l(parseInt(e.target.value,10))}:void 0,labelRowsPerPage:a().translate("mui_table.rows_per_page"),sx:d})};p.propTypes={totalRows:s().number,perPage:s().number.isRequired,currentPage:s().number.isRequired,onPageChange:s().func.isRequired,onPerPageChange:s().func};const g=p},3209:(e,t,n)=>{n.d(t,{Lr:()=>a,WU:()=>r,k6:()=>o});const r=10,o=20,a=50},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6084:e=>{e.exports=require("@mui/icons-material/Delete")},9247:e=>{e.exports=require("@mui/icons-material/Edit")},6989:e=>{e.exports=require("@mui/material/Box")},6368:e=>{e.exports=require("@mui/material/Button")},909:e=>{e.exports=require("@mui/material/IconButton")},270:e=>{e.exports=require("@mui/material/Paper")},9292:e=>{e.exports=require("@mui/material/Table")},9008:e=>{e.exports=require("@mui/material/TableBody")},5684:e=>{e.exports=require("@mui/material/TableCell")},5783:e=>{e.exports=require("@mui/material/TableContainer")},8202:e=>{e.exports=require("@mui/material/TableHead")},464:e=>{e.exports=require("@mui/material/TableRow")},38:e=>{e.exports=require("@mui/material/TableSortLabel")},7633:e=>{e.exports=require("@mui/material/TextField")},6831:e=>{e.exports=require("@mui/utils")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};n.r(r),n.d(r,{default:()=>de});var o=n(2015),a=n.n(o),l=n(9825),i=n.n(l),c=n(6989),s=n.n(c),u=n(270),d=n.n(u),m=n(9292),p=n.n(m),g=n(9008),b=n.n(g),f=n(5684),y=n.n(f),h=n(5783),E=n.n(h),P=n(8202),w=n.n(P),v=n(464),x=n.n(v);const C=require("@mui/material/Checkbox");var O=n.n(C),R=n(6842),j=n.n(R),S=n(6368),q=n.n(S);const k=({editEnabled:e,hasSelection:t,onEdit:n,onApply:r,onCancel:o})=>a().createElement(s(),{sx:{display:"flex",gap:1,mb:2}},e?a().createElement(a().Fragment,null,a().createElement(q(),{variant:"contained",onClick:r},j().translate("bulk_edit_table.apply_changes")),a().createElement(q(),{variant:"outlined",onClick:o},j().translate("general.cancel"))):a().createElement(q(),{variant:"contained",onClick:n,disabled:!t},j().translate("bulk_edit_table.edit_selected")));k.propTypes={editEnabled:i().bool,hasSelection:i().bool,onEdit:i().func,onApply:i().func,onCancel:i().func};const T=k;var K=n(38),_=n.n(K),D=n(6831);const F=e=>{const{editEnabled:t,sortable:n,sortDir:r,onSort:o,columnIndex:l,columnKey:i,width:c,children:u}=e,d=c?{width:c,minWidth:c,maxWidth:c}:{};return!n||t?a().createElement(y(),{sx:d},u):a().createElement(y(),{sx:d},a().createElement(_(),{active:!!r,direction:-1===r?"desc":"asc",onClick:()=>{o&&n&&!t&&o(l,i,r?-1*r:1)}},u,r?a().createElement(s(),{component:"span",sx:D.visuallyHidden},-1===r?j().translate("bulk_edit_table.sorted_desc"):j().translate("bulk_edit_table.sorted_asc")):null))};F.propTypes={editEnabled:i().bool,onSort:i().func,sortDir:i().number,columnIndex:i().number,columnKey:i().oneOfType([i().string,i().number]),sortable:i().bool,width:i().oneOfType([i().string,i().number]),children:i().node};const M=F;var W=n(1116),A=n.n(W),z=n(909),$=n.n(z),H=n(9247),L=n.n(H),U=n(6084),B=n.n(U),I=n(7633),N=n.n(I);const J=({col:e,row:t,editRow:n,isEditingRow:r,onChange:o})=>{return r&&!0===e.editableField?a().createElement(N(),{id:e.columnKey,placeholder:e.placeholder||"Enter text...",multiline:!0,minRows:2,fullWidth:!0,size:"small",onChange:o,value:n[e.columnKey]??""}):r&&e.editableField?e.editableField({value:(null===(l=n[e.columnKey])||void 0===l?void 0:l.id)??(null===(i=n[e.columnKey])||void 0===i?void 0:i.value)??n[e.columnKey],onChange:t=>o({target:{value:t.target.value,id:e.columnKey}}),row:n,rowData:n[e.columnKey]})??null:e.render?e.render(t[e.columnKey],t)??null:a().createElement("span",{style:{fontWeight:"normal"}},t[e.columnKey]??null);var l,i};J.propTypes={col:i().object.isRequired,row:i().object.isRequired,editRow:i().object.isRequired,isEditingRow:i().bool,onChange:i().func};const G=J,X="Xhu4_LGKTq3e40qfe5Wt",Y="_0CBHbvjBDEYwSThSUofl",Z="UloruHeHpGPH5R7sq1kU",V="MSifStCaXi3PkMXSJE_n",Q="LmYr4a7JbDJJhz4VmZZk",ee="OpMx28gG4w8RWw4ugfTz";function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const re=e=>ne(ne({},e.width?{width:e.width,minWidth:e.width,maxWidth:e.width}:{}),e.customStyle),oe=e=>{const{row:t,columns:n,editEnabled:r,isSelected:o,editRow:l,onToggle:i,onFieldChange:c,actions:u,idKey:d}=e,m=o&&r,p=e=>{const{value:t,id:n}=e.target;c(n,t)};return a().createElement(x(),{role:"row",hover:!0},a().createElement(y(),{align:"center",className:Z,sx:{backgroundColor:"#fff"}},a().createElement(O(),{checked:o,onChange:i,slotProps:{input:{"aria-label":`Select row ${t[d]}`}}})),a().createElement(y(),{sx:{fontWeight:"normal"}},t[d]),n.filter((e=>e.columnKey!==d)).map((e=>a().createElement(y(),{key:`${t[d]}_${e.columnKey}`,className:m&&e.editableField?Q:Y,sx:{fontWeight:"normal"},style:re(e)},a().createElement(G,{col:e,row:t,editRow:l,isEditingRow:m,onChange:p})))),((null==u?void 0:u.edit)||(null==u?void 0:u.delete))&&a().createElement(y(),{align:"center",className:`${V} ${ee}`,sx:{backgroundColor:"#fff"}},a().createElement(s(),{sx:{display:"flex",justifyContent:"center",gap:1}},u.edit&&a().createElement($(),{size:"medium",onClick:()=>u.edit.onClick(t),sx:{padding:0},"aria-label":`Edit event ${t[d]}`},a().createElement(L(),{fontSize:"large"})),u.delete&&a().createElement($(),{size:"medium",onClick:()=>u.delete.onClick(t),sx:{padding:0},"aria-label":`Delete event ${t[d]}`},a().createElement(B(),{fontSize:"large"})))))};oe.propTypes={row:i().object.isRequired,columns:i().array.isRequired,editEnabled:i().bool,isSelected:i().bool,editRow:i().object.isRequired,onToggle:i().func,onFieldChange:i().func,actions:i().object,idKey:i().string},oe.defaultProps={idKey:"id"};const ae=oe;function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){A()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ce=(e="id")=>{const[t,n]=(0,o.useState)([]),[r,a]=(0,o.useState)(!1),l=n=>t.some((t=>t[e]===n)),i=()=>{n([]),a(!1)};return{selectedRows:t,isSelected:l,toggleRow:t=>{n((n=>n.some((n=>n[e]===t[e]))?n.filter((n=>n[e]!==t[e])):[...n,t]))},isAllSelected:t=>t.length>0&&t.every((t=>l(t[e]))),toggleAll:t=>{n((n=>t.length>0&&t.every((t=>n.some((n=>n[e]===t[e]))))?[]:t))},editField:(t,r,o)=>{n((n=>n.map((n=>n[e]===t?ie(ie({},n),{},{[r]:o}):n))))},editEnabled:r,enterEditMode:()=>a(!0),cancel:i,reset:i}};var se=n(5420);const ue=({options:e,columns:t,data:n,onSort:r,onUpdate:l,totalRows:i,perPage:c,currentPage:u,onPageChange:m,onPerPageChange:g,idKey:f})=>{var h,P;const{selectedRows:v,isSelected:C,toggleRow:R,isAllSelected:j,toggleAll:S,editField:q,editEnabled:k,enterEditMode:K,cancel:_,reset:D}=ce(f),F=n.map((e=>e[f])).join(",");(0,o.useEffect)((()=>{D()}),[F]);const W=t=>t===e.sortCol?e.sortDir:null;return a().createElement(s(),{sx:{width:"100%"}},a().createElement(T,{editEnabled:k,hasSelection:v.length>0,onEdit:K,onApply:e=>{e.stopPropagation(),e.preventDefault(),Promise.resolve(l(v)).then((()=>D())).catch((e=>{console.error("Error updating events:",e)}))},onCancel:_}),a().createElement(d(),{elevation:0,sx:{width:"100%",mb:2}},a().createElement(E(),{component:d(),className:X,sx:{borderRadius:0,boxShadow:"none"}},a().createElement(p(),null,a().createElement(w(),{sx:{backgroundColor:"#EAEDF4"}},a().createElement(x(),null,a().createElement(y(),{align:"center",className:Z,sx:{backgroundColor:"#EAEDF4"}},a().createElement(O(),{checked:j(n),onChange:()=>S(n),slotProps:{input:{"aria-label":"select all"}}})),t.map(((e,t)=>{const n=!!e.sortable,o=e.width??"";return a().createElement(M,{editEnabled:k,onSort:r,sortDir:W(e.columnKey),sortable:n,columnIndex:t,columnKey:e.columnKey,width:o,key:`heading_${e.columnKey}`},e.header??e.label??e.value)})),((null===(h=e.actions)||void 0===h?void 0:h.edit)||(null===(P=e.actions)||void 0===P?void 0:P.delete))&&a().createElement(y(),{align:"center",className:V,sx:{backgroundColor:"#EAEDF4"}},e.actionsHeader||" "))),a().createElement(b(),null,t.length>0&&n.map((n=>a().createElement(ae,{key:`row_${n[f]}`,row:n,idKey:f,editEnabled:k,isSelected:C(n[f]),editRow:v.find((e=>e[f]===n[f]))||n,onToggle:()=>R(n),onFieldChange:(e,t)=>q(n[f],e,t),columns:t,actions:e.actions})))))),c&&u&&m&&a().createElement(se.default,{totalRows:i,perPage:c,currentPage:u,onPageChange:m,onPerPageChange:g})))};ue.propTypes={options:i().object.isRequired,columns:i().array.isRequired,data:i().array.isRequired,onSort:i().func.isRequired,onUpdate:i().func.isRequired,idKey:i().string,totalRows:i().number,perPage:i().number,currentPage:i().number,onPageChange:i().func,onPerPageChange:i().func},ue.defaultProps={idKey:"id"};const de=ue;return r})()));
|
|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AAcA,EACdC,gBAAiBA,KAInB,EAIVwJ,GAAc/H,UAAY,CACxBgI,QAAS/H,IAAAA,OAAiBC,WAC1B+E,QAAShF,IAAAA,MAAgBC,WACzB+H,KAAMhI,IAAAA,MAAgBC,WACtB0C,OAAQ3C,IAAAA,KAAeC,WACvBgI,SAAUjI,IAAAA,KAAeC,WACzBoF,MAAOrF,IAAAA,OACP9B,UAAW8B,IAAAA,OACX7B,QAAS6B,IAAAA,OACT5B,YAAa4B,IAAAA,OACb3B,aAAc2B,IAAAA,KACd1B,gBAAiB0B,IAAAA,MAGnB8H,GAAcnB,aAAe,CAC3BtB,MAAO,MAGT,MCnKA,GDmKA,G","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","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/Delete\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/Edit\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Box\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Button\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/IconButton\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Paper\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/Table\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableBody\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableCell\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableContainer\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableHead\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableRow\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TableSortLabel\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material/TextField\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/utils\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"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 \"@mui/material/Checkbox\"","webpack://openstack-uicore-foundation/./src/components/mui/BulkEditTable/components/Toolbar.js","webpack://openstack-uicore-foundation/./src/components/mui/BulkEditTable/components/Heading.js","webpack://openstack-uicore-foundation/./src/components/mui/BulkEditTable/components/Cell.js","webpack://openstack-uicore-foundation/./src/components/mui/BulkEditTable/BulkEditTable.module.less?3db7","webpack://openstack-uicore-foundation/./src/components/mui/BulkEditTable/components/Row.js","webpack://openstack-uicore-foundation/./src/components/mui/BulkEditTable/hooks/useRowSelection.js","webpack://openstack-uicore-foundation/./src/components/mui/BulkEditTable/BulkEditTable.js","webpack://openstack-uicore-foundation/./src/components/mui/BulkEditTable/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/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 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/Delete\");","module.exports = require(\"@mui/icons-material/Edit\");","module.exports = require(\"@mui/material/Box\");","module.exports = require(\"@mui/material/Button\");","module.exports = require(\"@mui/material/IconButton\");","module.exports = require(\"@mui/material/Paper\");","module.exports = require(\"@mui/material/Table\");","module.exports = require(\"@mui/material/TableBody\");","module.exports = require(\"@mui/material/TableCell\");","module.exports = require(\"@mui/material/TableContainer\");","module.exports = require(\"@mui/material/TableHead\");","module.exports = require(\"@mui/material/TableRow\");","module.exports = require(\"@mui/material/TableSortLabel\");","module.exports = require(\"@mui/material/TextField\");","module.exports = require(\"@mui/utils\");","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(\"@mui/material/Checkbox\");","/**\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 T from \"i18n-react/dist/i18n-react\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\n\nconst Toolbar = ({ editEnabled, hasSelection, onEdit, onApply, onCancel }) => (\n <Box sx={{ display: \"flex\", gap: 1, mb: 2 }}>\n {editEnabled ? (\n <>\n <Button variant=\"contained\" onClick={onApply}>\n {T.translate(\"bulk_edit_table.apply_changes\")}\n </Button>\n <Button variant=\"outlined\" onClick={onCancel}>\n {T.translate(\"general.cancel\")}\n </Button>\n </>\n ) : (\n <Button variant=\"contained\" onClick={onEdit} disabled={!hasSelection}>\n {T.translate(\"bulk_edit_table.edit_selected\")}\n </Button>\n )}\n </Box>\n);\n\nToolbar.propTypes = {\n editEnabled: PropTypes.bool,\n hasSelection: PropTypes.bool,\n onEdit: PropTypes.func,\n onApply: PropTypes.func,\n onCancel: PropTypes.func\n};\n\nexport default Toolbar;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport T from \"i18n-react/dist/i18n-react\";\nimport Box from \"@mui/material/Box\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableSortLabel from \"@mui/material/TableSortLabel\";\nimport { visuallyHidden } from \"@mui/utils\";\n\nconst Heading = (props) => {\n const {\n editEnabled,\n sortable,\n sortDir,\n onSort,\n columnIndex,\n columnKey,\n width,\n children\n } = props;\n\n const handleSort = () => {\n if (!onSort || !sortable || editEnabled) return;\n\n onSort(columnIndex, columnKey, sortDir ? sortDir * -1 : 1);\n };\n\n const headerSx = width ? { width, minWidth: width, maxWidth: width } : {};\n\n if (!sortable || editEnabled) {\n return <TableCell sx={headerSx}>{children}</TableCell>;\n }\n\n return (\n <TableCell sx={headerSx}>\n <TableSortLabel\n active={!!sortDir}\n direction={sortDir === -1 ? \"desc\" : \"asc\"}\n onClick={handleSort}\n >\n {children}\n {sortDir ? (\n <Box component=\"span\" sx={visuallyHidden}>\n {sortDir === -1\n ? T.translate(\"bulk_edit_table.sorted_desc\")\n : T.translate(\"bulk_edit_table.sorted_asc\")}\n </Box>\n ) : null}\n </TableSortLabel>\n </TableCell>\n );\n};\n\nHeading.propTypes = {\n editEnabled: PropTypes.bool,\n onSort: PropTypes.func,\n sortDir: PropTypes.number,\n columnIndex: PropTypes.number,\n columnKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n sortable: PropTypes.bool,\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n children: PropTypes.node\n};\n\nexport default Heading;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport TextField from \"@mui/material/TextField\";\n\nconst DEFAULT_PLACEHOLDER = \"Enter text...\";\n\nconst Cell = ({ col, row, editRow, isEditingRow, onChange }) => {\n if (isEditingRow && col.editableField === true) {\n return (\n <TextField\n id={col.columnKey}\n placeholder={col.placeholder || DEFAULT_PLACEHOLDER}\n multiline\n minRows={2}\n fullWidth\n size=\"small\"\n onChange={onChange}\n value={editRow[col.columnKey] ?? \"\"}\n />\n );\n }\n\n if (isEditingRow && col.editableField) {\n // editableField functions may short-circuit (e.g. `cond && <Input />`) and\n // return `undefined` rather than `false`, which React rejects as a component return value.\n return (\n col.editableField({\n value:\n editRow[col.columnKey]?.id ??\n editRow[col.columnKey]?.value ??\n editRow[col.columnKey],\n onChange: (ev) => onChange({ target: { value: ev.target.value, id: col.columnKey } }),\n row: editRow,\n rowData: editRow[col.columnKey]\n }) ?? null\n );\n }\n\n if (col.render) {\n return col.render(row[col.columnKey], row) ?? null;\n }\n\n return (\n <span style={{ fontWeight: \"normal\" }}>{row[col.columnKey] ?? null}</span>\n );\n};\n\nCell.propTypes = {\n col: PropTypes.object.isRequired,\n row: PropTypes.object.isRequired,\n editRow: PropTypes.object.isRequired,\n isEditingRow: PropTypes.bool,\n onChange: PropTypes.func\n};\n\nexport default Cell;\n","// extracted by mini-css-extract-plugin\nexport default {\"tableWrapper\":\"Xhu4_LGKTq3e40qfe5Wt\",\"dataColumn\":\"_0CBHbvjBDEYwSThSUofl\",\"checkColumn\":\"UloruHeHpGPH5R7sq1kU\",\"actionColumn\":\"MSifStCaXi3PkMXSJE_n\",\"bulkEditCol\":\"LmYr4a7JbDJJhz4VmZZk\",\"dottedBorderLeft\":\"OpMx28gG4w8RWw4ugfTz\"};","/**\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 Box from \"@mui/material/Box\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableCell from \"@mui/material/TableCell\";\nimport Checkbox from \"@mui/material/Checkbox\";\nimport IconButton from \"@mui/material/IconButton\";\nimport EditIcon from \"@mui/icons-material/Edit\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport Cell from \"./Cell\";\nimport styles from \"../BulkEditTable.module.less\";\n\n// the 250px min-width while editing comes from the .bulkEditCol class\n// (applied via className below) so it isn't duplicated here\nconst getCellStyle = (col) => ({\n ...(col.width\n ? { width: col.width, minWidth: col.width, maxWidth: col.width }\n : {}),\n ...col.customStyle\n});\n\nconst Row = (props) => {\n const {\n row,\n columns,\n editEnabled,\n isSelected,\n editRow,\n onToggle,\n onFieldChange,\n actions,\n idKey\n } = props;\n\n const isEditingRow = isSelected && editEnabled;\n\n const onRowChange = (ev) => {\n const { value, id } = ev.target;\n onFieldChange(id, value);\n };\n\n return (\n <TableRow role=\"row\" hover>\n <TableCell\n align=\"center\"\n className={styles.checkColumn}\n sx={{ backgroundColor: \"#fff\" }}\n >\n <Checkbox\n checked={isSelected}\n onChange={onToggle}\n slotProps={{ input: { \"aria-label\": `Select row ${row[idKey]}` } }}\n />\n </TableCell>\n <TableCell sx={{ fontWeight: \"normal\" }}>{row[idKey]}</TableCell>\n {columns\n .filter((col) => col.columnKey !== idKey)\n .map((col) => (\n <TableCell\n key={`${row[idKey]}_${col.columnKey}`}\n className={\n isEditingRow && col.editableField\n ? styles.bulkEditCol\n : styles.dataColumn\n }\n sx={{ fontWeight: \"normal\" }}\n style={getCellStyle(col)}\n >\n <Cell\n col={col}\n row={row}\n editRow={editRow}\n isEditingRow={isEditingRow}\n onChange={onRowChange}\n />\n </TableCell>\n ))}\n {(actions?.edit || actions?.delete) && (\n <TableCell\n align=\"center\"\n className={`${styles.actionColumn} ${styles.dottedBorderLeft}`}\n sx={{ backgroundColor: \"#fff\" }}\n >\n <Box sx={{ display: \"flex\", justifyContent: \"center\", gap: 1 }}>\n {actions.edit && (\n <IconButton\n size=\"medium\"\n onClick={() => actions.edit.onClick(row)}\n sx={{ padding: 0 }}\n aria-label={`Edit event ${row[idKey]}`}\n >\n <EditIcon fontSize=\"large\" />\n </IconButton>\n )}\n {actions.delete && (\n <IconButton\n size=\"medium\"\n onClick={() => actions.delete.onClick(row)}\n sx={{ padding: 0 }}\n aria-label={`Delete event ${row[idKey]}`}\n >\n <DeleteIcon fontSize=\"large\" />\n </IconButton>\n )}\n </Box>\n </TableCell>\n )}\n </TableRow>\n );\n};\n\nRow.propTypes = {\n row: PropTypes.object.isRequired,\n columns: PropTypes.array.isRequired,\n editEnabled: PropTypes.bool,\n isSelected: PropTypes.bool,\n editRow: PropTypes.object.isRequired,\n onToggle: PropTypes.func,\n onFieldChange: PropTypes.func,\n actions: PropTypes.object,\n idKey: PropTypes.string\n};\n\nRow.defaultProps = {\n idKey: \"id\"\n};\n\nexport default Row;\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 { useState } from \"react\";\n\nconst useRowSelection = (idKey = \"id\") => {\n const [selectedRows, setSelectedRows] = useState([]);\n const [editEnabled, setEditEnabled] = useState(false);\n\n const isSelected = (rowId) => selectedRows.some((row) => row[idKey] === rowId);\n\n const toggleRow = (row) => {\n setSelectedRows((current) =>\n current.some((r) => r[idKey] === row[idKey])\n ? current.filter((r) => r[idKey] !== row[idKey])\n : [...current, row]\n );\n };\n\n const isAllSelected = (rows) =>\n rows.length > 0 && rows.every((row) => isSelected(row[idKey]));\n\n const toggleAll = (rows) => {\n setSelectedRows((current) =>\n rows.length > 0 && rows.every((row) => current.some((r) => r[idKey] === row[idKey]))\n ? []\n : rows\n );\n };\n\n const editField = (rowId, key, value) => {\n setSelectedRows((current) =>\n current.map((row) => (row[idKey] === rowId ? { ...row, [key]: value } : row))\n );\n };\n\n const reset = () => {\n setSelectedRows([]);\n setEditEnabled(false);\n };\n\n return {\n selectedRows,\n isSelected,\n toggleRow,\n isAllSelected,\n toggleAll,\n editField,\n editEnabled,\n enterEditMode: () => setEditEnabled(true),\n cancel: reset,\n reset\n };\n};\n\nexport default useRowSelection;\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, { useEffect } from \"react\";\nimport PropTypes from \"prop-types\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\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 TableRow from \"@mui/material/TableRow\";\nimport Checkbox from \"@mui/material/Checkbox\";\nimport Toolbar from \"./components/Toolbar\";\nimport Heading from \"./components/Heading\";\nimport Row from \"./components/Row\";\nimport useRowSelection from \"./hooks/useRowSelection\";\nimport styles from \"./BulkEditTable.module.less\";\nimport CustomTablePagination from \"../table/CustomTablePagination\";\n\nconst BulkEditTable = ({ options, columns, data, onSort, onUpdate, totalRows, perPage, currentPage, onPageChange, onPerPageChange, idKey }) => {\n const {\n selectedRows,\n isSelected,\n toggleRow,\n isAllSelected,\n toggleAll,\n editField,\n editEnabled,\n enterEditMode,\n cancel,\n reset\n } = useRowSelection(idKey);\n\n const dataIds = data.map((row) => row[idKey]).join(\",\");\n\n // reset selection/edit state whenever the set of rows shown changes\n // (pagination, filtering, sorting, search, etc.)\n useEffect(() => {\n reset();\n }, [dataIds]);\n\n const getSortDir = (columnKey) =>\n columnKey === options.sortCol ? options.sortDir : null;\n\n const handleUpdateEvents = (evt) => {\n evt.stopPropagation();\n evt.preventDefault();\n Promise.resolve(onUpdate(selectedRows))\n .then(() => reset())\n .catch((error) => {\n console.error(\"Error updating events:\", error);\n });\n };\n\n return (\n <Box sx={{ width: \"100%\" }}>\n <Toolbar\n editEnabled={editEnabled}\n hasSelection={selectedRows.length > 0}\n onEdit={enterEditMode}\n onApply={handleUpdateEvents}\n onCancel={cancel}\n />\n <Paper elevation={0} sx={{ width: \"100%\", mb: 2 }}>\n <TableContainer\n component={Paper}\n className={styles.tableWrapper}\n sx={{ borderRadius: 0, boxShadow: \"none\" }}\n >\n <Table>\n <TableHead sx={{ backgroundColor: \"#EAEDF4\" }}>\n <TableRow>\n <TableCell\n align=\"center\"\n className={styles.checkColumn}\n sx={{ backgroundColor: \"#EAEDF4\" }}\n >\n <Checkbox\n checked={isAllSelected(data)}\n onChange={() => toggleAll(data)}\n slotProps={{ input: { \"aria-label\": \"select all\" } }}\n />\n </TableCell>\n {columns.map((col, i) => {\n const sortable = !!col.sortable;\n const colWidth = col.width ?? \"\";\n\n return (\n <Heading\n editEnabled={editEnabled}\n onSort={onSort}\n sortDir={getSortDir(col.columnKey)}\n sortable={sortable}\n columnIndex={i}\n columnKey={col.columnKey}\n width={colWidth}\n key={`heading_${col.columnKey}`}\n >\n {col.header ?? col.label ?? col.value}\n </Heading>\n );\n })}\n {(options.actions?.edit || options.actions?.delete) && (\n <TableCell\n align=\"center\"\n className={styles.actionColumn}\n sx={{ backgroundColor: \"#EAEDF4\" }}\n >\n {options.actionsHeader || \" \"}\n </TableCell>\n )}\n </TableRow>\n </TableHead>\n <TableBody>\n {columns.length > 0 &&\n data.map((row) => (\n <Row\n key={`row_${row[idKey]}`}\n row={row}\n idKey={idKey}\n editEnabled={editEnabled}\n isSelected={isSelected(row[idKey])}\n editRow={selectedRows.find((r) => r[idKey] === row[idKey]) || row}\n onToggle={() => toggleRow(row)}\n onFieldChange={(key, value) =>\n editField(row[idKey], key, value)\n }\n columns={columns}\n actions={options.actions}\n />\n ))}\n </TableBody>\n </Table>\n </TableContainer>\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\nBulkEditTable.propTypes = {\n options: PropTypes.object.isRequired,\n columns: PropTypes.array.isRequired,\n data: PropTypes.array.isRequired,\n onSort: PropTypes.func.isRequired,\n onUpdate: PropTypes.func.isRequired,\n idKey: PropTypes.string,\n totalRows: PropTypes.number,\n perPage: PropTypes.number,\n currentPage: PropTypes.number,\n onPageChange: PropTypes.func,\n onPerPageChange: PropTypes.func\n};\n\nBulkEditTable.defaultProps = {\n idKey: \"id\"\n};\n\nexport default BulkEditTable;\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 BulkEditTable from \"./BulkEditTable\";\n\nexport default BulkEditTable;\n"],"names":["root","factory","exports","module","define","amd","this","require","PAGINATION_SX","alignItems","marginTop","color","fontSize","fontWeight","display","marginLeft","BASE_PER_PAGE_OPTIONS","DEFAULT_PER_PAGE","TWENTY_PER_PAGE","FIFTY_PER_PAGE","CustomTablePagination","totalRows","perPage","currentPage","onPageChange","onPerPageChange","perPageOptions","React","includes","sort","a","b","TablePagination","component","count","rowsPerPageOptions","rowsPerPage","page","handlePageChange","_","newPage","onRowsPerPageChange","ev","parseInt","target","value","undefined","labelRowsPerPage","T","sx","propTypes","PropTypes","isRequired","__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","Toolbar","editEnabled","hasSelection","onEdit","onApply","onCancel","Box","gap","mb","Button","variant","onClick","disabled","Heading","props","sortable","sortDir","onSort","columnIndex","columnKey","width","children","headerSx","minWidth","maxWidth","TableCell","TableSortLabel","active","direction","handleSort","visuallyHidden","Cell","col","row","editRow","isEditingRow","onChange","editableField","TextField","id","placeholder","multiline","minRows","fullWidth","size","_editRow$col$columnKe","_editRow$col$columnKe2","rowData","render","style","getCellStyle","_objectSpread","customStyle","Row","columns","isSelected","onToggle","onFieldChange","actions","idKey","onRowChange","TableRow","role","hover","align","className","styles","backgroundColor","Checkbox","checked","slotProps","input","filter","map","edit","delete","justifyContent","IconButton","padding","EditIcon","DeleteIcon","defaultProps","useRowSelection","selectedRows","setSelectedRows","useState","setEditEnabled","rowId","some","reset","toggleRow","current","isAllSelected","rows","length","every","toggleAll","editField","enterEditMode","cancel","BulkEditTable","options","data","onUpdate","_options$actions","_options$actions2","dataIds","join","useEffect","getSortDir","sortCol","evt","stopPropagation","preventDefault","Promise","resolve","then","catch","error","console","Paper","elevation","TableContainer","borderRadius","boxShadow","Table","TableHead","i","colWidth","header","label","actionsHeader","TableBody","find"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],o):"object"==typeof exports?exports["openstack-uicore-foundation"]=o():e["openstack-uicore-foundation"]=o()}(this,(()=>(()=>{"use strict";var e={3209:(e,o,r)=>{r.d(o,{Lr:()=>a,WU:()=>t,k6:()=>n});const t=10,n=20,a=50},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},o={};function r(t){var n=o[t];if(void 0!==n)return n.exports;var a=o[t]={exports:{}};return e[t](a,a.exports,r),a.exports}(()=>{r.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return r.d(o,{a:o}),o}})(),(()=>{r.d=(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})}})(),(()=>{r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};r.r(t),r.d(t,{default:()=>P});var n=r(2015),a=r(6842),i=r.n(a);const s=require("@mui/material/TablePagination");var u=r.n(s),p=r(9825),l=r.n(p),g=r(3209);const c={".MuiTablePagination-toolbar":{alignItems:"baseline",marginTop:"1.6rem"},".MuiTablePagination-selectLabel":{color:"rgba(0, 0, 0, 0.6)",fontSize:"12px",fontWeight:"normal"},".MuiTablePagination-select":{color:"rgba(0, 0, 0, 0.6)",fontSize:"12px",fontWeight:"normal"},".MuiTablePagination-spacer":{display:"none"},".MuiTablePagination-displayedRows":{marginLeft:"auto"}},d=[g.WU,g.k6,g.Lr],f=({totalRows:e,perPage:o,currentPage:r,onPageChange:t,onPerPageChange:a})=>{const s=n.useMemo((()=>a?d.includes(o)?d:[...d,o].sort(((e,o)=>e-o)):[o]),[o,a]);return n.createElement(u(),{component:"div",count:e??0,rowsPerPageOptions:s,rowsPerPage:o,page:r-1,onPageChange:(e,o)=>{t(o+1)},onRowsPerPageChange:a?e=>{a(parseInt(e.target.value,10))}:void 0,labelRowsPerPage:i().translate("mui_table.rows_per_page"),sx:c})};f.propTypes={totalRows:l().number,perPage:l().number.isRequired,currentPage:l().number.isRequired,onPageChange:l().func.isRequired,onPerPageChange:l().func};const P=f;return t})()));
|
|
2
|
-
//# sourceMappingURL=custom-table-pagination.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components/mui/table/custom-table-pagination.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,6ECTF,MAaMC,EAAmB,GACnBC,EAAkB,GAClBC,EAAiB,E,WCf9BN,EAAOD,QAAUQ,QAAQ,6B,WCAzBP,EAAOD,QAAUQ,QAAQ,a,WCAzBP,EAAOD,QAAUQ,QAAQ,Q,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaZ,QAGrB,IAAIC,EAASQ,EAAyBE,GAAY,CAGjDX,QAAS,CAAC,GAOX,OAHAc,EAAoBH,GAAUV,EAAQA,EAAOD,QAASU,GAG/CT,EAAOD,OACf,C,MCrBAU,EAAoBK,EAAKd,IACxB,IAAIe,EAASf,GAAUA,EAAOgB,WAC7B,IAAOhB,EAAiB,QACxB,IAAM,EAEP,OADAS,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,C,WCLdN,EAAoBQ,EAAI,CAAClB,EAASoB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEtB,EAASqB,IAC5EE,OAAOC,eAAexB,EAASqB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,C,WCNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC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nB,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/utils/constants.js","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 \"@mui/material/TablePagination\"","webpack://openstack-uicore-foundation/./src/components/mui/table/CustomTablePagination.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 ","export const CENTS_FACTOR = 100n;\nexport const TWO_DECIMAL_PLACES = 2;\nexport const THREE_DECIMAL_PLACES = 3;\nexport const ONE_CENT = 1n;\nexport const ZERO_INT = 0;\nexport const BPS = 100;\n\nexport const CODE_200 = 200;\n\nexport const DEBOUNCE_WAIT_250 = 250;\nexport const DEBOUNCE_WAIT = 500;\n\nexport const NOTIFICATION_TIMEOUT = 2000;\nexport const DEFAULT_PER_PAGE = 10;\nexport const TWENTY_PER_PAGE = 20;\nexport const FIFTY_PER_PAGE = 50;\nexport const MAX_PER_PAGE = 100;\n\nexport const INT_BASE = 10;\n\nexport const ONE_HUNDRED = 100;\nexport const MILLISECONDS_IN_SECOND = 1000;\n\nexport const MILLISECONDS_TO_SECONDS = 1000;\n\nexport const BYTES_PER_MB = 1_048_576; // 1024 * 1024\n\nexport const MAX_INVENTORY_IMAGE_UPLOAD_SIZE = 512000;\nexport const MAX_INVENTORY_IMAGES_UPLOAD_QTY = 5;\nexport const ALLOWED_INVENTORY_IMAGE_FORMATS = [\"jpg\", \"jpeg\", \"png\"];\n\nexport const METAFIELD_TYPES_WITH_OPTIONS = [\n \"CheckBoxList\",\n \"ComboBox\",\n \"RadioButtonList\"\n];\n\nexport const METAFIELD_TYPES = [\n \"CheckBox\",\n ...METAFIELD_TYPES_WITH_OPTIONS,\n \"Text\",\n \"TextArea\",\n \"Quantity\",\n \"DateTime\",\n \"Time\"\n];\n\nexport const DISCOUNT_TYPES = {\n AMOUNT: \"Amount\",\n RATE: \"Rate\"\n};\n\nexport const RATE_FIELDS = {\n EARLY_BIRD: \"early_bird_rate\",\n STANDARD: \"standard_rate\",\n ONSITE: \"onsite_rate\"\n};\n\nexport const DECIMAL_DIGITS = 2;\n\nexport const FILE_UPLOAD_STATUS = {\n PENDING: \"PENDING\",\n DEADLINE_ALERT: \"DEADLINE ALERT\",\n DEADLINE_MISSED: \"DEADLINE MISSED\",\n COMPLETE: \"COMPLETE\"\n};\n\nexport const FILE_UPLOAD_STATUS_COLOR = {\n [FILE_UPLOAD_STATUS.COMPLETE]: \"success.light\",\n [FILE_UPLOAD_STATUS.DEADLINE_MISSED]: \"error\",\n [FILE_UPLOAD_STATUS.DEADLINE_ALERT]: \"warning.light\",\n [FILE_UPLOAD_STATUS.PENDING]: \"default\"\n};\n\nexport const FILE_UPLOAD_STATUS_BKGR_COLOR = {\n [FILE_UPLOAD_STATUS.COMPLETE]: \"white\",\n [FILE_UPLOAD_STATUS.DEADLINE_MISSED]: \"#D32F2F0A\",\n [FILE_UPLOAD_STATUS.DEADLINE_ALERT]: \"#EF6C000A\",\n [FILE_UPLOAD_STATUS.PENDING]: \"white\"\n};\n\nexport const DATE_FORMAT = \"MM/DD/YYYY\";\nexport const DATETIME_FORMAT = \"MM/DD/YYYY hh:mm a\";\n\nexport const SPONSOR_FORMS_METAFIELD_CLASS = {\n FORM: \"Form\",\n ITEM: \"Item\"\n};\n\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(\"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(\"@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"],"names":["root","factory","exports","module","define","amd","this","DEFAULT_PER_PAGE","TWENTY_PER_PAGE","FIFTY_PER_PAGE","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","PAGINATION_SX","alignItems","marginTop","color","fontSize","fontWeight","display","marginLeft","BASE_PER_PAGE_OPTIONS","CustomTablePagination","totalRows","perPage","currentPage","onPageChange","onPerPageChange","perPageOptions","React","includes","sort","b","TablePagination","component","count","rowsPerPageOptions","rowsPerPage","page","handlePageChange","_","newPage","onRowsPerPageChange","ev","parseInt","target","labelRowsPerPage","T","sx","propTypes","PropTypes","isRequired"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.Xhu4_LGKTq3e40qfe5Wt{overflow-x:auto;position:relative;width:100%}.Xhu4_LGKTq3e40qfe5Wt td{max-width:150px;overflow-wrap:break-word;text-overflow:ellipsis;vertical-align:middle}.Xhu4_LGKTq3e40qfe5Wt td._0CBHbvjBDEYwSThSUofl{min-width:150px}.Xhu4_LGKTq3e40qfe5Wt .UloruHeHpGPH5R7sq1kU{left:0;position:sticky;text-align:center;z-index:5}.Xhu4_LGKTq3e40qfe5Wt .MSifStCaXi3PkMXSJE_n{max-width:60px;min-width:60px;position:sticky;right:0;text-align:center;width:60px;z-index:5}.Xhu4_LGKTq3e40qfe5Wt .LmYr4a7JbDJJhz4VmZZk{min-width:250px}.OpMx28gG4w8RWw4ugfTz{border-left:none;position:relative}.OpMx28gG4w8RWw4ugfTz:before{align-self:center;border-left:1px dashed #e0e0e0;bottom:0;content:"";height:60%;left:0;position:absolute;top:0}
|
|
2
|
-
/*# sourceMappingURL=bulk-edit-table.css.map*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css/components/mui/bulk-edit-table.css","mappings":"AAaA,sBAEE,eAAgB,CAChB,iBAAkB,CAFlB,UAEF,CAHA,yBAMI,eAAgB,CAEhB,wBAAyB,CADzB,sBAAuB,CAEvB,qBAAJ,CAEI,+CACE,eAAN,CAZA,4CA0BI,MAAO,CAFP,eAAgB,CADhB,iBAAkB,CAElB,SAPJ,CAlBA,4CAoCI,cAAe,CADf,cAAe,CAJf,eAAgB,CAEhB,OAAQ,CAHR,iBAAkB,CAIlB,UAAW,CAFX,SALJ,CA3BA,4CAwCI,eAVJ,CAcA,sBAEE,gBAAiB,CADjB,iBAXF,CAaE,6BAQE,iBAAkB,CAFlB,8BAA+B,CAF/B,QAAS,CAHT,UAAW,CAMX,UAAW,CAFX,MAAO,CAHP,iBAAkB,CAClB,KANJ","sources":["webpack://openstack-uicore-foundation/./src/components/mui/BulkEditTable/BulkEditTable.module.less"],"sourcesContent":["/**\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\n.tableWrapper {\n width: 100%;\n overflow-x: auto;\n position: relative;\n\n td {\n max-width: 150px;\n text-overflow: ellipsis;\n overflow-wrap: break-word;\n vertical-align: middle;\n\n &.dataColumn {\n min-width: 150px;\n }\n }\n\n // shared by header (th) and body (td) cells so the checkbox/action columns\n // stay pinned and aligned in both rows while the data columns scroll\n // horizontally. Background color is intentionally NOT set here: header\n // cells need the header's grey, body cells need white, set via sx where\n // each is rendered (an explicit color is required, `inherit` resolves to\n // transparent here and lets the scrolling columns show through).\n .checkColumn {\n text-align: center;\n position: sticky;\n z-index: 5;\n left: 0;\n }\n\n .actionColumn {\n text-align: center;\n position: sticky;\n z-index: 5;\n right: 0;\n width: 60px;\n min-width: 60px;\n max-width: 60px;\n }\n\n .bulkEditCol {\n min-width: 250px;\n }\n}\n\n.dottedBorderLeft {\n position: relative;\n border-left: none;\n &::before {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n border-left: 1px dashed #e0e0e0;\n height: 60%;\n align-self: center;\n }\n}\n"],"names":[],"sourceRoot":""}
|