diff --git a/README.md b/README.md index dc89d05..bbc0e51 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ UI Mordern Gridview Library +## 1.0.7 +* 调整: [(event) onBodyScrolled(e: Event, index: number, count: number)](Grid.html#event:onBodyScrolled) - 列滚动时触发的事件,增加显示行起始索引与一屏呈现行数 +* 新增: [`currentItem: GridRowItem | null`](Grid.html#currentItem) - 获取当前选中的行对象 + ## 1.0.6 * 新增: [`col.switch`](GridColumnDefinition.html) - 列复选框样式改为 `ui-switch` diff --git a/lib/app/communications/internal.js b/lib/app/communications/internal.js index ad0122e..505ceee 100644 --- a/lib/app/communications/internal.js +++ b/lib/app/communications/internal.js @@ -1,3 +1,4 @@ +import AddWorkOrder from "../../element/addWorkorder"; import { createElement, setTooltip, createIcon, requestAnimationFrame } from "../../ui"; import { r as lang, nullOrEmpty, escapeHtml, escapeEmoji } from "../../utility"; import { createBox, appendMedia } from "./lib"; @@ -115,10 +116,22 @@ export default class InternalComment { return; } this._var.enter.disabled = flag === true; + this._var.container.querySelector('.button-call-log').style.display = flag === true ? 'none' : ''; this._var.container.querySelector('.button-send-message').style.display = flag === true ? 'none' : ''; this._var.container.querySelector('.button-post-note').style.display = flag === true ? 'none' : ''; } + /** + * @param {boolean} flag + */ + set noCallLog(flag) { + this._var.option.noCallLog = flag; + if (this._var.container == null) { + return; + } + this._var.container.querySelector('.button-call-log').style.display = flag === true ? 'none' : ''; + } + create() { const option = this._var.option; const container = createBox( @@ -214,6 +227,24 @@ export default class InternalComment { ) ), createElement('div', 'prompt-count'), + createElement('button', button => { + button.className = 'roundbtn button-call-log'; + button.style.backgroundImage = 'url(' + AddWorkOrder.IconWorkOrder + ')'; + button.style.backgroundSize = '80% 80%'; + button.style.backgroundPosition = 'center'; + button.style.backgroundRepeat = 'no-repeat'; + button.style.verticalAlign = 'top';//firefox图片需要设置verticalAlign + if (readonly === true || option.noCallLog === true) { + button.style.display = 'none'; + } + setTooltip(button, r('P_WO_CALLLOG', 'Call Log')); + button.addEventListener('click', () => { + if (typeof option.onAddCallLog === 'function') { + this.loading = true; + option.onAddCallLog(); + } + }) + }), createElement('button', button => { button.className = 'roundbtn button-send-message'; button.style.backgroundColor = 'rgb(19, 150, 204)'; @@ -293,7 +324,13 @@ export default class InternalComment { })); const content = createElement('div', 'item-content'); const mmsParts = createElement('div', div => div.style.display = 'none'); - content.appendChild(createElement('span', span => span.innerHTML = escapeHtml(escapeEmoji(comment.Message)), mmsParts)); + content.appendChild(createElement('span', span => { + if (comment.MessageType === 2) { + span.innerHTML = comment.Message; + } else { + span.innerHTML = escapeHtml(escapeEmoji(comment.Message)); + } + }, mmsParts)); if (comment.MMSParts?.length > 0) { mmsParts.style.display = ''; for (let kv of comment.MMSParts) { diff --git a/lib/element.js b/lib/element.js index 38ad117..3342ffc 100644 --- a/lib/element.js +++ b/lib/element.js @@ -1,12 +1,12 @@ import "./element/style.scss"; import ScheduleItem from "./element/schedule"; import AddWorkOrder from "./element/addWorkorder"; -import AssetSelector from "./element/assetSelector"; -import TemplateSelector from "./element/templateSelector"; +import InspectionWizard from "./element/inspectionWizard"; +import Signature from "./element/signature"; export { ScheduleItem, AddWorkOrder, - AssetSelector, - TemplateSelector + InspectionWizard, + Signature } \ No newline at end of file diff --git a/lib/element/addworkorder.js b/lib/element/addworkorder.js index 4938ab9..6ab4294 100644 --- a/lib/element/addworkorder.js +++ b/lib/element/addworkorder.js @@ -1,9 +1,7 @@ -import { createElement, Dropdown, Popup, showAlert, createIcon, DateSelector, showConfirm, Grid } from "../ui"; -import { r as lang, nullOrEmpty } from "../utility"; +import { createElement, Dropdown, Popup, showAlert, createIcon, DateSelector, showConfirm, Grid, OptionBase } from "../ui"; +import { nullOrEmpty } from "../utility"; import AssetSelector from "./assetSelector"; -let r = lang; - const iconWorkOrder = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABJCAYAAAB4mKumAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAABMISURBVHhe1VxpVBRnuubMn3vOTSbJJDHJzUxMxmhM1Dgzd5KZXHPumWgco8YFcAFxxzUGo7ihqCxuKO4at7jvkShqxF1cUBAQwr4rO7KD7Ivge9/nowq6m+qmqmnMzXPOc47prvq66ql3/4pY0W8EtfX11GfaLOo5bjKNcHWjpXv2k1/gfUpIz6DS8grpqOeD34xofkHB1NnWnt742lbw1UHD6YV+A+n9UQ40epknbTzpQ/dj4qimrk46o+PwmxFt/tYd9OrAYfRfw0Y28+3hI+nNoSPola+G0otfDqIeYyfTSFd38vG/RQ2NDdKZlsdvQrTC0ic0YO5CFkdfNEN2+tqG/sDHvMVC9pnuRFeCQ6UVLIsOES2vuISuBodYzFWuhTygLqPG0htDbBXFMiREe7H/YBrrsZoqqqulVSwHi4v2ICGRhrssFRe/8uBh6dP2wfvYSfrPfoNaiWOKL345mLacOi2tYFlYTLSGhkbac+4CvT/Sgf7AsacTW8UbQ2xo86mfpCPMQ3FZuXgICPxK4igRbtpj7CQKiIySVrEsLCJaeVUVOXOg7jTYWlywfPFwpz8OHyXEbBPPiEorKig15zFFP0ylkLgECuZseOTyNbHWW9KaaojE8PWCxVRVUyMtblm0W7SCklKyd1vRKrPJfINFfHeEPZ26cVM6owVPGxooIjlFiLpg+y4audSdvnCaS3+dNJW6jh5Hfxo+ml7nB4EYpbS2EiFup8E2tIzruI5Cu0RDwB/GrvPSv4co3oBM3HhXrqeuh4aJ80rKy2nnmXM0yNmFerIbvTnUll7gkuFltpDXJGuFlUIsLRYGogRBPRcQGS1+qyNgtmgFpaVks8SNXh5gWjCZr3FMQpyZunYDdbefQK+zMPgMAmmxpLYIsT+b8o10lR0Ds0Srrq0lx9XrROxQunBjhDiwOliD0veWIB6Cg8cq6Uo7BmaJ5r7/EL2uIZupJUR9E1mX26TXOS5BYFB2V4jdlrtijfc4g3sdPkZV/HA7AppFq+aCtSe716sDLSOabH2///fXQqwuHPs+cphEvbgx/8uEqdR7/BTqwf/ubj+eY5WdiHsvDxgqRFRaD4TwOGYcW1xmXr505ZaDWZZ25lYA/Zmfpm55YQ4R014ZMIw+m/4tOa7xpo0/+tDFwCBRcuQXl1IllwxPKiop7XEu3YuKoRNXb9CSXXvJevFy0SGg6jfl6ggffZ2cKTLloXTlloHZieCA3yX6k/VoUcQqXbBxjhBWAksdPH+xqMOSM7OosbFRWrltYBR0l7Ojx75DIqlAHGPivcKl0OczZ3NpYznhzBYN2H7atzkOKV2wISEWXPHvk2eISUR7+8LGZ43CChd9v5trulHCcpV+Fy7df858i7lqu0QDvI6cEJ0AxFO6YJkikHPM+m7zdip6UiadbTmgBvx8hpMQTilZvMKl0YQVa0RMbi/aLRrcavmefSyI8fgG10E79cN5P6qrr5fOtDxgSXbLPY1bHAu37uhJ6WjzoUm0p8+eUcXTp5RXU0f1/G8ZjwuLaOA8F8WmGjHvHY59P7E7Pg+g2xjDWVMpu8Pau9mNo6DoWOnoJjzje6nn+0IPHRgTS1tP+lBYQqL0bWsYFa2RNSmuq6e0ymoKLiqjg2k5tCTqIY29H0s2gVG0OPohZVY1NcSh8QnUZeQYjm36Loq+8y0O/EeuXBPHPS9U8HVhH0HpIcLarJcsp4fZ2RSbmkYXg4LJfe9BGrrQVbRfCDWoQYdww28MeqLl19ZRWEkZnc8ppJ0p2eTKwkwIjqNhd6NoRGA02QXF0BgWDRx+L4q8E9LFeXfCI/iHhunFErn+8txvmZmaVjzKzqH/4VIGYypd0cC3OVR8OmWmKFvQ8+IYWKEcl4VFjh5L4YnJ0mr6sKppaKSzWQXkHptKcyOSaXJoPNncixaijAyMIfv7LUIZchQLmVZVS1WcBe05lug27hDsK+dFVFndMeMZNfC9fZfesbETIsjXBYpJCHuBsTIF3yMuenLnowSrA6k5wopsmRBJ15raIo7/PiVLLPTTzduEUY4oP4Y3XVRwbLz47tfEVK8NZnUvL7Eb2y5xU3zoVuND4tialEVpizgP7ltc/1RkxSFcrL42yFpY3GwuLTAvM0Ql94PRaZl0ITSCDvnfpR0Xb9D3fjfowPU7dPZ+OIUmp9KTyirp6PYjMT2TOlvbidiqJI4x4qH/ZeJUCktMklZqgZW5gskczZZ5LD1XLHb2dgC9xk+1M7vEnQj9UXM5P7H91wJo0ua91G/pWvrwm8XU2dGZOa+Jk52p24xF9L8uq8lh/S7afO4KPS55Ip1tPlASfbN+s6ZxucyXuR8+zR5kCCtkQyUx1BIuOj8ymUrZ2nCB/5o1h0Yt92BrqZR+gujig0ghVM9vXanrtEX00TdLqBf/+2OnpXrEZz1mLaGu0xeKY/osXEl7Lt+iWs7i7UFgdAy9qnGM9TYTmzleh49Lq7TAypEDv5IYaglLtWdru55bLBaMfZRKD7gEkZHL1jJ0xWZ6l63pYwWhTBECdpu+iCZu+oHS8gqkFbUju6CQvuQ2ClNhJYGMEdY5adW6VnsNVrPDk8yOaTKtOdt6xadTNWdiQzzlzw7fvEefLVghLEjJwtoizhuyYhOlPDa/d5y3bafYhVcSxxgR1/rPXUDFZfptn5UrF6x2QcpiaCFiW0J5i0vqopEr7oz8IvLyuUD/mOdB3We6sPstVhRIib2ZXac1CZdTXCKtqg3bfvIVMzslcYwRJQlG9DmFhdIqTbDawAUqblhJCC1EbNuenCU6CVPIKCgit+O+IuC/z0LABZWEUiKEm73nqGJWbguYASJBqZ3IyESHgEmKLqwOpD2mkRYQDRwXHMt9qboRc0x6Fq06dV5y20XUS0EkQ8K1wTOBD6RV1OMWdy2YCKO1UxLHkLAybP78rs8XlJLZVIvKsLrGARwxSUkErRzF4h+Xyg81QJOcmP2YPE6cpd6zl6mKd0gMYzfsphKNtdx9LrR7T5iiOG3GZ/LWYachNiLT/t1xBs1Yt5H2nfcTG0m6sEosr6KhAVGKImglXBSJxRwExqfQ54tWtemuiG/vTZ1P9+K0/U5QTBx9PN6xlWgoLXo4TKR+s+fRwu930yn/W5SZny+EajASBqyyq2tp+oMETe2TMUK0BVyzmYOswmIasWa7SBJKYukShfGyo9pebvF/EE4fjpmo14dCwF7jHOnWL5HSUepgVcZFqWfsI77h9rkoRB/Fot0pKJWW1ga0V1O3HxDBXkkoXaJI7ue6lho07CvAgv5ozb2xTpOOnrTvd/Mot7ipxlQLMRo6xMkA4x8lMdQQFuYYmkCBRe1re1wO+TQVwQpC6VJOCKUa4trmkz70gsHrWpitDVu4VDpCPYRoN/KKRdlhTpFrw0nEJSqFkjk2Alp2lQyx8exl0X8qCaVLCNZ79lKKz8yRzjQNlChOG7fS7/sP1hMNu1jTvNZLR6mHEC21spqcOIAj+ykJY4wQbFNiphh/I2hu8L1MTruP0PWIWLNqKZ+7IfTX75YL91MSSybKExxzKiBYOtM0UGdh0wU1lywYBo5IAjvOnJOOUo/mya1nXKqYqSmJY0g7kAU+kpZLdZJlJefkcfZbKaYVf+Mbn7xlL4Ukp2qKO7ejE+iz+Z6qC95PnN3p211HKCHzMelsWbTCpaBgeqm/fjeA2NbZxt7odNYUmkX7OadQCNKWi+L7iSHx5J+vHzyLyitokPtGkf168k1/OHMx00VYXlBCiuhBjaGkoor8QiPJetUWca6SQEqEuGjHejAXczyMSsukOq79dIFNE2wb/scXA/S2GZFFP+VazBw0i1ZUV89ixLXZhyL2ffdLEtUr9EtjvHfSBwYxCcUoXM553wmuxZL1Yh5mbL5BYTR+0x7RFWhpqQyJ3/lkrrsoRcJS0qRfaEJIXDzN9N5E71jbNe8ZYIKx5ugJ6QhtaBYN2JCY0WZcg6VBuHPZ+k0ssN73Et+4fjxCMYrA3WXqAvqUm3Wn3ccoNiObroRHk8OGXeI73LDuOeYSca4LF76Ywy088CM9zG2ZilRxexeemCSsDhsrsLTEjAzpW23QEy2urFJVXEOJAWuTt/BkQIymckD5pj6C20rTjV5Ork2uzMcbHtde4ne6c3j42xw3cjt2hlLzCqheJzHFp2XQjbBfRBtnDvREq3raQB6xqTSCRVESS5fInDtSsuipjptiBOS4ZV+zMMbYJKzlxTJkTybCBRLG2tN+YkhgCeiJBtzMLxGVvZqaDRk0oFC/AwhJeiis6HmIopbCbactoH8tXkOeJ85RWn7r0KIFrUR7wm3VsphHYltPSShdIrZhXJ6h46awtjU+F0QMUzPueZ6EB8Dy+ixcQat9fqac4lK8ia8ZrUQD/LlDQBZVY22Ib0tZ5JK6lvhQ8KScHLfuFWNqpYv/tQnL+2CGC/1znidt/fkqpXCNidJELRRFw4subjGpqjsEHLc1OVNvjyCVXcDOe0e7M6Nc/XeE1aImxPS4/7J13M1coszCIunqTUNRNCC+rEr1GBwWiSnJUe4QdIGdKBS3cAkUu1puHMciu2I4iekuPsN/d0SsxLV9wGv3XeJFm89dZU8x/f6cUdFgrJh+qIltoD278wjOqGezC/RamnrOyEdvBtJAtw3CXWF5uHHUb4YXj89gVTiuOwv9ldt6OnAjQLylfe5+OI302s7W0VTXKZ3fHuIhoVTBA8b+xZ4rtyi7SHlkZFQ0oKC2jhZEpajvSVk4ZFQ/bskMG4a0/CKx8YsddtRPGAHBNRBbcKH497tT5onyYOq2/XT4egDlFenvPFXU1NBJbtLHrN8phG1PB2GKeHC4nsEeG2nnRX/hMbowKRoQUlxG44PRXqlzVXnE5JvFFietoQvM9lEEX4+IoR/4aXpzLEEnse/aHfKPiqPk7BxKLCqlPezqHnFpdDwjV0xRdFFcXik2V3BTEB1Z0VJuC8EQBuCywuL531+xl/iypctoUzQAmyVq3RTEFATHw72rNY6ISp42knNkioiRWAMPAS/pbEnKpATuWKr4exmwvOO3A2mI5ybxGgMEVBJCLTFg+O+5bjRgubcIDWKPVvIEPBRsegOqRGvgIOWVkE62GnatYG246c18s8U65YgpVHD8W8HWhTLGcC0U3Ph8NX+PVyAKalre7ygur6B9V++Q9aqtYoiJ2KQkiiliWmK7ZhtdCosUE2H0qrdjEkQ4QRgAP3H2oMjUDHWiAYW19WJCqza+gU1ZNUa8UYnXUE0BD2Z/KicefjA4T2k9EL8/mtd0jkihg2zJWVUt22t5HHsO+9+jL7mE6DbdRdyomowNl+zr6qXX4MvILy0j29XbxFpwV/cTZ9WLBmCkPSs8UbiO0g0pURZuErvYLW7RUAMq4TxnXRyn5hUJkan5WNSHEzneeidkiBKpTlobloKkA/HgcohLSmLJ7MZiIFsaw/ng8OZyp6/rWm2iAeElZTSFWye1NZzM0XyjOGcbF8HplfrTEbwI7cDHQAylc01R7IIxIfhy7kxCOXHJjyW/9Altv3CdBrpzucPZUOn9EdSB70yeS6HJj6SzWgOlB9pCecylWTQghG9ycoh24UDbe1H0LVurb3Y+VdQ3UEpFNc0Iw76r8vFaiBg67n4cPeQ1dYEGfdclf/piyRphVaj1mkVj/pkFwVuYxhCc9Kh5w+ef8z3NEw3AE50SmiAuVOkGTBFBHVzAcWlWmPYNHVO05XV9MvOkq2xBIxeOiE9bf75GfRatEiWFPMJCvHLg2q/GyB+GzPnhmDgGx0/bfsB80YCI0nJhNVqyqkzEOliqJSxMl3DTS7mme8h8bpPWnfYTPSdGRrIgy4+dbpp8SLER+x6bzl8RLolkgdLjclhU+0QD4F7IjlqyakfSmt3fMGYaA3bQsNcqv/aFYD985RYWz5c8T54ju3U7hKBwZ2TORQdPUXVdfftFA4q5HFmfmNFcjCrdzPMgrHYmx0e8/6sW2GLEOBxdCdo7JIy3J84RfI/bOmRfWKHLoVNi1wywiGgA6qwzWfmiBPi1rA6uuSkpo3kvVivgmhiLo8hFR4A2bdauI3QzOl4MV2VYTDQZkaUV4m+oYHWmitSO4NC7UWLKYglU1dYZ3au1uGgARuY/ZuSRA7sLMiN6UaWbtCTlxIKs3tHoENFkICCvjk/jwjVOtEeWzpS6hGBzIpL09is6Ch0qGoBYF8xPH404rAFbf0o33V5i3ZX8G/gDuY5Gh4smAzdzv+hJ8y4++lf80Yal4h5E2/tI3atX7cVzE01GLWe2R5XVtOdRluhhccNIGqJZNxBCLSE83iy/nqftjUZz8dxF0wXmZ7cLSmhdQrr4W1PcODKgGP9oiH+IZ9h/bWv8ZCn8qqLJQAWUW1MrXj9F1oWIc8KThHjir5rZ9UQWltzZ0KVhqUu5K3mmOGC3PP5fiGYIvFOSW1MnWrQgFvJkeh5tS86iFbGp5MwWOeNBgngtDOMkiIaRUE51x/x/hVqD6P8AXY8jcrVVNpAAAAAASUVORK5CYII='; /** @@ -51,58 +49,18 @@ function getOdometerUnit(uom) { } } -export default class AddWorkOrder { +export default class AddWorkOrder extends OptionBase { _var = { - option: { - allowCustomer: false, - assetFullcontrol: false, - /** - * @private - * @type {(assetId: number) => Promise<{Id: number, VIN: string, DisplayName: string, OnRoad: boolean, Hide: boolean, EngineHours?: number, Odometer?: number, OdometerUOM?: string}>} - */ - requestAssetInfo: null, - /** - * @private - * @type {() => Promise<{Statuses: any[], Jobsites: any[], Codes: any[], Advisors: any[], Locations: any[], Departments: any[], OrderTypes: any[], AssetId: null}>} - */ - requestWorkOrderParams: null, - /** - * @private - * @type {(hidden: boolean, search?: string, groups?: string[], jobsites?: number[], codes?: string[]) => Promise} - */ - requestAssets: null, - /** - * @private - * @type {() => Promise} - */ - requestAddAsset: null, - /** - * @private - * @type {() => Promise<{Customer: any, Contacts: any[], Followers: any[]}>} - */ - requestCustomers: null, - /** - * @private - * @type {(assetId: number, locationId: number, departmentId: number) => Promise} - */ - requestAssignedTo: null, - /** - * @private - * @type {(assetId: number) => Promise} - */ - requestHideAsset: null, - /** - * @private - * @type {(assetId: number) => Promise} - */ - requestOpenedWorkorder: null, - zIndex: 999 - }, /** * @private * @type {HTMLElement} */ container: null, + /** + * @private + * @type {Popup} + */ + assetSelectorPopup: null, /** * @private * @property {number} Id @@ -196,19 +154,58 @@ export default class AddWorkOrder { onAssetSelected; onSave; - constructor(opt) { - opt ??= {}; - this._var.option = opt; - const getText = opt.getText; - if (typeof getText === 'function') { - r = getText; - } else if (typeof GetTextByKey === 'function') { - r = GetTextByKey; - } + static IconWorkOrder = iconWorkOrder; + + constructor(opt = { + allowCustomer: false, + assetFullcontrol: false, + /** + * @private + * @type {(assetId: number) => Promise<{Id: number, VIN: string, DisplayName: string, OnRoad: boolean, Hide: boolean, EngineHours?: number, Odometer?: number, OdometerUOM?: string}>} + */ + requestAssetInfo: null, + /** + * @private + * @type {() => Promise<{Statuses: any[], Jobsites: any[], Codes: any[], Advisors: any[], Locations: any[], Departments: any[], OrderTypes: any[], AssetId: null}>} + */ + requestWorkOrderParams: null, + /** + * @private + * @type {(hidden: boolean, search?: string, groups?: string[], jobsites?: number[], codes?: string[]) => Promise} + */ + requestAssets: null, + /** + * @private + * @type {() => Promise} + */ + requestAddAsset: null, + /** + * @private + * @type {() => Promise<{Customer: any, Contacts: any[], Followers: any[]}>} + */ + requestCustomers: null, + /** + * @private + * @type {(assetId: number, locationId: number, departmentId: number) => Promise} + */ + requestAssignedTo: null, + /** + * @private + * @type {(assetId: number) => Promise} + */ + requestHideAsset: null, + /** + * @private + * @type {(assetId: number) => Promise} + */ + requestOpenedWorkorder: null, + zIndex: 999 + }) { + super(opt); } async getItem() { - const title = r('P_WO_OPENWORKORDER', 'Open Work Order'); + const title = this.r('P_WO_OPENWORKORDER', 'Open Work Order'); const el = this._var.el; let status = el.dropStatus.selected; if (status != null) { @@ -226,7 +223,7 @@ export default class AddWorkOrder { } let machine = this._var.asset; if (machine == null) { - showAlert(title, r('P_WO_ASSETNOTEMPTY', 'Asset cannot be empty.')).then(() => this._var.container.querySelector('.wo-asset>svg')?.focus()); + showAlert(title, this.r('P_WO_ASSETNOTEMPTY', 'Asset cannot be empty.')).then(() => this._var.container.querySelector('.wo-asset>svg')?.focus()); return null; } const item = { @@ -259,24 +256,24 @@ export default class AddWorkOrder { item.Contacts = this._var.contacts ?? []; item.Followers = this._var.followers ?? []; if (nullOrEmpty(el.textComplaint?.value)) { - showAlert(title, r('P_WO_COMPLAINTREQUIRED', 'Complaint is required.')).then(() => el.textComplaint.focus()); + showAlert(title, this.r('P_WO_COMPLAINTREQUIRED', 'Complaint is required.')).then(() => el.textComplaint.focus()); return null; } if (el.dropStatus.selected?.Completed) { if (!el.dateCompleted.element.validity.valid) { - showAlert(title, r('P_WO_COMPLETEDDATECANNOTBEEMPTY', 'Completed Date cannot be empty.')).then(() => el.dateCompleted.element.focus()); + showAlert(title, this.r('P_WO_COMPLETEDDATECANNOTBEEMPTY', 'Completed Date cannot be empty.')).then(() => el.dateCompleted.element.focus()); return null; } if (machine.OnRoad) { item.MeterType = 'Odometer'; if (nullOrEmpty(item.Odometer) || isNaN(item.Odometer) || item.Odometer < 0) { - showAlert(title, r('P_WO_ODOMETERFORMATERROR', 'Odometer format error.')).then(() => el.inputOdometer.focus()); + showAlert(title, this.r('P_WO_ODOMETERFORMATERROR', 'Odometer format error.')).then(() => el.inputOdometer.focus()); return null; } } else { item.MeterType = 'HourMeter'; if (nullOrEmpty(item.HourMeter) || isNaN(item.HourMeter) || item.HourMeter < 0) { - showAlert(title, r('P_WO_HOURMETERFORMATERROR', 'Hour Meter format error.')).then(() => el.inputHours.focus()); + showAlert(title, this.r('P_WO_HOURMETERFORMATERROR', 'Hour Meter format error.')).then(() => el.inputHours.focus()); return null; } } @@ -285,14 +282,14 @@ export default class AddWorkOrder { } async show() { - const option = this._var.option; + const option = this._option; const allowCustomer = option.allowCustomer === true; - const title = r('P_WO_OPENWORKORDER', 'Open Work Order'); + const title = this.r('P_WO_OPENWORKORDER', 'Open Work Order'); const tabIndex = Math.max.apply(null, [...document.querySelectorAll('[tabindex]')].map(e => e.tabIndex ?? 0)) + 3; const textComplaint = createElement('textarea', textarea => { textarea.tabIndex = tabIndex + 2; textarea.className = 'ui-text wo-complaint'; - textarea.placeholder = r('P_WO_ENTERCOMPLAINT', 'Enter Complaint'); + textarea.placeholder = this.r('P_WO_ENTERCOMPLAINT', 'Enter Complaint'); }); const baseOption = { search: true, @@ -388,47 +385,72 @@ export default class AddWorkOrder { createElement('div', 'wo-combined wo-asset', createElement('span', span => { span.className = 'wo-title wo-title-required'; - span.innerText = r('P_WO_ASSET_COLON', 'Asset:'); + span.innerText = this.r('P_WO_ASSET_COLON', 'Asset:'); }), createIcon('fa-light', 'search', svg => { svg.tabIndex = tabIndex + 1; - svg.addEventListener('click', () => { - const selector = new AssetSelector({ - assetFullcontrol: option.assetFullcontrol, - requestAssets: option.requestAssets, - requestAddAsset: option.requestAddAsset, - dataSource: this._var.params - }); - selector.onSelected = async it => { - const el = this._var.el; - if (typeof option.requestAssetInfo === 'function') { - const a = await option.requestAssetInfo(it.Id); - if (a != null) { - it = a; - if (it.OnRoad) { - el.inputHours.value = ''; - el.inputOdometer.value = it.Odometer; - el.dropOdometerUnit.select(getOdometerUnit(it.OdometerUOM)); - } else { - el.inputHours.value = it.EngineHours; - el.inputOdometer.value = ''; - el.dropOdometerUnit.select('Mile'); + svg.addEventListener('click', async () => { + let popup = this._var.assetSelectorPopup; + if (popup == null) { + const selector = new AssetSelector({ + assetFullcontrol: option.assetFullcontrol, + loading: flag => this._var.assetSelectorPopup.loading = flag, + close: () => this._var.assetSelectorPopup.close(), + requestAssets: option.requestAssets, + requestAddAsset: option.requestAddAsset, + dataSource: this._var.params + }); + selector.onSelected = async it => { + const el = this._var.el; + if (typeof option.requestAssetInfo === 'function') { + const a = await option.requestAssetInfo(it.Id); + if (a != null) { + it = a; + if (it.OnRoad) { + el.inputHours.value = ''; + el.inputOdometer.value = it.Odometer; + el.dropOdometerUnit.select(getOdometerUnit(it.OdometerUOM)); + } else { + el.inputHours.value = it.EngineHours; + el.inputOdometer.value = ''; + el.dropOdometerUnit.select('Mile'); + } } } - } - this._var.asset = it; - if (typeof this.onAssetSelected === 'function') { - this.onAssetSelected(it); - } - this._var.container.querySelector('.wo-asset-name').innerText = it.DisplayName; - // get assigned to - if (typeof option.requestAssignedTo === 'function') { - const data = await option.requestAssignedTo(it.Id, el.dropLocation.selected?.ID ?? -1, el.dropDepartment.selected?.Id ?? -1) - el.dropAssignedTo.source = [{ IID: '', DisplayName: '' }, ...data]; - el.dropStatus.onSelected(el.dropStatus.selected); - } - }; - selector.show().then(mask => mask.style.zIndex = option.zIndex ?? 999); + this._var.asset = it; + if (typeof this.onAssetSelected === 'function') { + this.onAssetSelected(it); + } + this._var.container.querySelector('.wo-asset-name').innerText = it.DisplayName; + // get assigned to + if (typeof option.requestAssignedTo === 'function') { + const data = await option.requestAssignedTo(it.Id, el.dropLocation.selected?.ID ?? -1, el.dropDepartment.selected?.Id ?? -1) + el.dropAssignedTo.source = [{ IID: '', DisplayName: '' }, ...data]; + el.dropStatus.onSelected(el.dropStatus.selected); + } + }; + popup = new Popup({ + title: this.r('P_MA_SELECTASSET', 'Select Asset'), + content: selector.create(), + persistent: true, + buttons: [ + { + key: 'ok', + text: this.r('P_GRID_OK', 'OK'), + trigger: () => selector.select() + }, + { text: this.r('P_WO_CANCEL', 'Cancel') } + ] + }); + this._var.assetSelectorPopup = popup; + popup.create(); + popup.rect = { width: 1220 }; + const mask = await popup.show(); + mask.style.zIndex = option.zIndex ?? 999; + await selector.init(); + } else { + await popup.show(); + } }); }) ), @@ -436,7 +458,7 @@ export default class AddWorkOrder { createElement('div', 'wo-line wo-combined', createElement('span', span => { span.className = 'wo-title wo-title-required'; - span.innerText = r('P_WO_COMPLAINTCOLON', 'Complaint:'); + span.innerText = this.r('P_WO_COMPLAINTCOLON', 'Complaint:'); }) ), createElement('div', div => { @@ -448,7 +470,7 @@ export default class AddWorkOrder { ), createElement('span', span => { span.className = 'wo-title'; - span.innerText = r('P_WO_WORKORDERTYPE_COLON', 'Work Order Type:'); + span.innerText = this.r('P_WO_WORKORDERTYPE_COLON', 'Work Order Type:'); }), dropWorkOrderType.create(), createElement('div', div => { @@ -459,7 +481,7 @@ export default class AddWorkOrder { }, createElement('span', span => { span.className = 'wo-title'; - span.innerText = r('P_WO_COMPANYNAME_COLON', 'Company Name:'); + span.innerText = this.r('P_WO_COMPANYNAME_COLON', 'Company Name:'); }), createIcon('fa-light', 'search', svg => { svg.tabIndex = tabIndex + 4; @@ -485,18 +507,18 @@ export default class AddWorkOrder { displayElement(createElement('span', 'wo-company-name'), allowCustomer), createElement('span', span => { span.className = 'wo-title'; - span.innerText = r('P_WO_STATUS_COLON', 'Status:'); + span.innerText = this.r('P_WO_STATUS_COLON', 'Status:'); }), dropStatus.create(), createElement('span', span => { span.className = 'wo-title wo-title-required wo-sub-line wo-status-closed'; - span.innerText = r('P_WO_COMPLETEDDATE_COLON', 'Completed Date:'); + span.innerText = this.r('P_WO_COMPLETEDDATE_COLON', 'Completed Date:'); displayElement(span, false); }), displayElement(dateCompleted.create(), false), createElement('span', span => { span.className = 'wo-title wo-title-required wo-sub-line wo-hours'; - span.innerText = r('P_WO_HOURS_COLON', 'Hours:'); + span.innerText = this.r('P_WO_HOURS_COLON', 'Hours:'); displayElement(span, false); }), displayElement( @@ -505,7 +527,7 @@ export default class AddWorkOrder { ), createElement('span', span => { span.className = 'wo-title wo-title-required wo-sub-line wo-odometer'; - span.innerText = r('P_WO_ODOMETER_COLON', 'Odometer:'); + span.innerText = this.r('P_WO_ODOMETER_COLON', 'Odometer:'); displayElement(span, false); }), createElement('div', div => { @@ -517,12 +539,12 @@ export default class AddWorkOrder { ), createElement('span', span => { span.className = 'wo-title'; - span.innerText = r('P_WO_ASSIGNEDTO_COLON', 'Assigned Tech:'); + span.innerText = this.r('P_WO_ASSIGNEDTO_COLON', 'Assigned Tech:'); }), dropAssignedTo.create(), createElement('span', span => { span.className = 'wo-title wo-customer-record'; - span.innerText = r('P_WO_ADVISOR_COLON', 'Advisor:'); + span.innerText = this.r('P_WO_ADVISOR_COLON', 'Advisor:'); if (!allowCustomer) { displayElement(span, false); } @@ -530,7 +552,7 @@ export default class AddWorkOrder { displayElement(dropAdvisor.create(), allowCustomer), createElement('span', span => { span.className = 'wo-title wo-customer-record'; - span.innerText = r('P_WO_LOCATION_COLON', 'Location:'); + span.innerText = this.r('P_WO_LOCATION_COLON', 'Location:'); if (!allowCustomer) { displayElement(span, false); } @@ -538,7 +560,7 @@ export default class AddWorkOrder { displayElement(dropLocation.create(), allowCustomer), createElement('span', span => { span.className = 'wo-title wo-customer-record'; - span.innerText = r('P_WO_DEPARTMENT_COLON', 'Department:'); + span.innerText = this.r('P_WO_DEPARTMENT_COLON', 'Department:'); if (!allowCustomer) { displayElement(span, false); } @@ -594,12 +616,12 @@ export default class AddWorkOrder { } if (this._var.asset.Hide) { if (!option.assetFullcontrol) { - await showAlert(title, r('P_WO_HIDDENCANNOTCREATE', 'The selected asset is hidden and a work order cannot be created.') + '\n\n' + r('P_WO_CONTACTTOUNHIDE', 'Please contact your Fleet Manager to Unhide the asset if you require a work order.')); + await showAlert(title, this.r('P_WO_HIDDENCANNOTCREATE', 'The selected asset is hidden and a work order cannot be created.') + '\n\n' + this.r('P_WO_CONTACTTOUNHIDE', 'Please contact your Fleet Manager to Unhide the asset if you require a work order.')); return false; } - const next = await showConfirm(title, r('P_WO_HIDDENCANNOTCREATE', 'The selected asset is hidden and a work order cannot be created.') + '\n\n' + r('P_WO_PROMPTUNHIDE', 'Do you wish to "Un-Hide" the asset?'), [ - { key: 'unhide', text: r('P_WO_UNHIDE', 'Unhide') }, - { key: 'cancel', text: r('P_WO_CANCELWO', 'Cancel Work Order') } + const next = await showConfirm(title, this.r('P_WO_HIDDENCANNOTCREATE', 'The selected asset is hidden and a work order cannot be created.') + '\n\n' + this.r('P_WO_PROMPTUNHIDE', 'Do you wish to "Un-Hide" the asset?'), [ + { key: 'unhide', text: this.r('P_WO_UNHIDE', 'Unhide') }, + { key: 'cancel', text: this.r('P_WO_CANCELWO', 'Cancel Work Order') } ]); if (next.result !== 'unhide') { return false; @@ -620,21 +642,21 @@ export default class AddWorkOrder { const popWorkorders = new Popup({ title, content: createElement('div', 'wo-opened-workorder', - createElement('header', header => header.innerText = r('P_WO_ASSETOPENEDWORKORDER', 'The selected asset has the following open work orders:')), + createElement('header', header => header.innerText = this.r('P_WO_ASSETOPENEDWORKORDER', 'The selected asset has the following open work orders:')), createElement('div', 'wo-grid-opened') ), resolve, buttons: [ - { key: 'create', text: r('P_WO_CREATEWO', 'Create Work Order'), trigger: () => resolve('create') }, - { key: 'cancel', text: r('P_WO_CANCELWO', 'Cancel Work Order'), trigger: () => resolve('cancel') } + { key: 'create', text: this.r('P_WO_CREATEWO', 'Create Work Order'), trigger: () => resolve('create') }, + { key: 'cancel', text: this.r('P_WO_CANCELWO', 'Cancel Work Order'), trigger: () => resolve('cancel') } ] }); popWorkorders.show().then(mask => { - const grid = new Grid(mask.querySelector('.wo-grid-opened'), r); + const grid = new Grid(mask.querySelector('.wo-grid-opened'), this.r); grid.columns = [ { key: 'WorkOrderNumber', caption: 'WO #', width: 100 }, - { key: 'CreateDateStr', caption: r('P_WO_CREATEDDATE', 'Created Date'), width: 120 }, - { key: 'Description', caption: r('P_WO_COMPLAINT', 'Complaint'), width: 360 } + { key: 'CreateDateStr', caption: this.r('P_WO_CREATEDDATE', 'Created Date'), width: 120 }, + { key: 'Description', caption: this.r('P_WO_COMPLAINT', 'Complaint'), width: 360 } ]; grid.init(); grid.source = wos.map(w => ({ @@ -660,7 +682,7 @@ export default class AddWorkOrder { } } }, - { text: r('P_WO_CANCEL', 'Cancel') } + { text: this.r('P_WO_CANCEL', 'Cancel') } ] }); popup.create(); diff --git a/lib/element/assetSelector.js b/lib/element/assetSelector.js index 6851cbd..88bb806 100644 --- a/lib/element/assetSelector.js +++ b/lib/element/assetSelector.js @@ -1,43 +1,12 @@ -import { Dropdown, Grid, Popup, createCheckbox, createElement, createIcon } from "../ui"; -import { r as lang } from "../utility"; +import { Dropdown, Grid, OptionBase, createCheckbox, createElement, createIcon } from "../ui"; -let r = lang; - -export default class AssetSelector { +export default class AssetSelector extends OptionBase { _var = { - option: { - assetFullcontrol: false, - /** - * @private - * @type {(hidden: boolean, search?: string, groups?: string[], jobsites?: number[], codes?: string[]) => Promise} - */ - requestAssets: null, - /** - * @private - * @type {() => Promise} - */ - requestAddAsset: null, - /** - * @private - * @type {() => Promise<{AssetGroups: any[], Codes: any[], Jobsites: any[]}>} - */ - requestAssetParams: null, - dataSource: { - AssetGroups: [], - Codes: [], - Jobsites: [] - } - }, /** * @private * @type {HTMLElement} */ container: null, - /** - * @private - * @type {Popup} - */ - popup: null, el: { /** * @private @@ -74,24 +43,60 @@ export default class AssetSelector { onSelected; - constructor(opt) { - opt ??= {}; - this._var.option = opt; - const getText = opt.getText; - if (typeof getText === 'function') { - r = getText; - } else if (typeof GetTextByKey === 'function') { - r = GetTextByKey; + constructor(opt = { + assetFullcontrol: false, + ignoreHidden: false, + /** + * @private + * @type {(flag: boolean) => void} + */ + loading: null, + /** + * @private + * @type {() => void} + */ + close: null, + /** + * @private + * @type {(hidden: boolean, search?: string, groups?: string[], jobsites?: number[], codes?: string[]) => Promise} + */ + requestAssets: null, + /** + * @private + * @type {() => Promise} + */ + requestAddAsset: null, + /** + * @private + * @type {() => Promise<{AssetGroups: any[], Codes: any[], Jobsites: any[]}>} + */ + requestAssetParams: null, + dataSource: { + AssetGroups: [], + Codes: [], + Jobsites: [] + } + }) { + super(opt); + } + + get title() { return this.r('P_MA_SELECTASSET', 'Select Asset') } + + get currentAsset() { return this._var.el.grid.currentItem } + + loading(flag) { + if (typeof this._option.loading === 'function') { + this._option.loading(flag); } } refresh() { - const requestAssets = this._var.option.requestAssets; + const requestAssets = this._option.requestAssets; if (typeof requestAssets !== 'function') { return; } const el = this._var.el; - this._var.popup.loading = true; + this.loading(true); requestAssets( el.checkHidden.querySelector('input[type="checkbox"]')?.checked, el.inputSearch.value, @@ -100,23 +105,28 @@ export default class AssetSelector { el.dropJobsiteCode.selected?.value ).then(data => { el.grid.source = data; - }).finally(() => this._var.popup.loading = false); + }).finally(() => this.loading(false)); } select(item) { if (typeof this.onSelected !== 'function') { return false; } + if (item == null) { + item = this._var.el.grid.currentItem; + } + if (item == null) { + return false; + } this.onSelected(item); } - async create() { - const option = this._var.option; - const title = r('P_MA_SELECTASSET', 'Select Asset'); + create() { + const option = this._option; const tabIndex = Math.max.apply(null, [...document.querySelectorAll('[tabindex]')].map(e => e.tabIndex ?? 0)) + 3; const inputSearch = createElement('input', input => { input.type = 'text'; - input.placeholder = r('P_SELECTASSETS_SEARCH', 'Search'); + input.placeholder = this.r('P_SELECTASSETS_SEARCH', 'Search'); input.tabIndex = tabIndex + 2; input.className = 'ui-input'; input.addEventListener('keypress', e => { @@ -127,9 +137,12 @@ export default class AssetSelector { }); const checkHidden = createCheckbox({ tabIndex: tabIndex + 3, - label: r('P_SELECTASSETS_SHOWHIDDEN', 'Show Hidden'), + label: this.r('P_SELECTASSETS_SHOWHIDDEN', 'Show Hidden'), onchange: () => this.refresh() }); + if (option.ignoreHidden) { + checkHidden.style.display = 'none'; + } const dropAssetGroup = new Dropdown({ tabIndex: tabIndex + 4, search: true, @@ -153,21 +166,23 @@ export default class AssetSelector { div.className = 'popup-selector-content'; div.style.height = '400px'; }); - const grid = new Grid(gridContent, r); + const grid = new Grid(gridContent, this.r); grid.columns = [ - { key: 'VIN', caption: r('P_SELECTASSETS_VIN', 'VIN'), width: 170 }, - { key: 'DisplayName', caption: r('P_SELECTASSETS_NAME', 'Name'), width: 190 }, - { key: 'MakeName', caption: r('P_SELECTASSETS_MAKE', 'Make'), width: 110, allowFilter: true }, - { key: 'ModelName', caption: r('P_SELECTASSETS_MODEL', 'Model'), width: 110, allowFilter: true }, - { key: 'TypeName', caption: r('P_SELECTASSETS_TYPE', 'Type'), width: 110, allowFilter: true }, - { key: 'AcquisitionType', caption: r('P_MA_ACQUISITIONTYPE', 'Acquisition Type'), width: 130, allowFilter: true }, - { key: 'AssetGroups', caption: r('P_MA_ASSETGROUP', 'Asset Group'), width: 150 }, - { key: 'Jobsites', caption: r('P_SELECTASSETS_JOBSITE', 'Jobsite'), width: 180, filter: it => it.Jobsites?.map(s => s.Key) } + { key: 'VIN', caption: this.r('P_SELECTASSETS_VIN', 'VIN'), width: 170 }, + { key: 'DisplayName', caption: this.r('P_SELECTASSETS_NAME', 'Name'), width: 190 }, + { key: 'MakeName', caption: this.r('P_SELECTASSETS_MAKE', 'Make'), width: 110, allowFilter: true }, + { key: 'ModelName', caption: this.r('P_SELECTASSETS_MODEL', 'Model'), width: 110, allowFilter: true }, + { key: 'TypeName', caption: this.r('P_SELECTASSETS_TYPE', 'Type'), width: 110, allowFilter: true }, + { key: 'AcquisitionType', caption: this.r('P_MA_ACQUISITIONTYPE', 'Acquisition Type'), width: 130, allowFilter: true }, + { key: 'AssetGroups', caption: this.r('P_MA_ASSETGROUP', 'Asset Group'), width: 150 }, + { key: 'Jobsites', caption: this.r('P_SELECTASSETS_JOBSITE', 'Jobsite'), width: 180, filter: it => it.Jobsites?.map(s => s.Key) } ]; grid.onRowDblClicked = index => { const item = grid.source[index]; this.select(item); - this._var.popup.close(); + if (typeof this._option.close === 'function') { + this._option.close(); + } }; grid.init(); grid.element.tabIndex = tabIndex + 7; @@ -183,19 +198,21 @@ export default class AssetSelector { const container = createElement('div', 'popup-selector', createElement('div', 'popup-selector-header', createElement('img', img => img.src = '../img/modules/devices.png'), - createElement('h3', h3 => h3.innerText = title), + createElement('h3', h3 => h3.innerText = this.title), option.assetFullcontrol ? createElement('button', button => { button.className = 'ui-popup-button'; button.tabIndex = tabIndex + 1; - button.innerText = r('P_MA_ADDASSET', 'Add Asset'); + button.innerText = this.r('P_MA_ADDASSET', 'Add Asset'); button.addEventListener('click', async () => { if (typeof option.requestAddAsset === 'function') { - this._var.popup.loading = true; + this.loading(true); const asset = await option.requestAddAsset(); - this._var.popup.loading = false; + this.loading(false); if (asset != null) { this.select(asset); - this._var.popup.close(); + if (typeof this._option.close === 'function') { + this._option.close(); + } } } }); @@ -211,59 +228,33 @@ export default class AssetSelector { ) ), checkHidden, - createElement('span', span => span.innerText = r('P_WO_ASSETGROUP', 'Asset Group')), + createElement('span', span => span.innerText = this.r('P_WO_ASSETGROUP', 'Asset Group')), dropAssetGroup.create(), - createElement('span', span => span.innerText = r('P_WO_JOBSITE', 'Jobsite')), + createElement('span', span => span.innerText = this.r('P_WO_JOBSITE', 'Jobsite')), dropJobsite.create(), - createElement('span', span => span.innerText = r('P_SELECTASSETS_JOBSITECODE', 'Jobsite Code')), + createElement('span', span => span.innerText = this.r('P_SELECTASSETS_JOBSITECODE', 'Jobsite Code')), dropJobsiteCode.create() ), gridContent ); this._var.container = container; - const popup = new Popup({ - title, - content: container, - persistent: true, - buttons: [ - { - key: 'ok', - text: r('P_GRID_OK', 'OK'), - trigger: () => { - const item = grid.source[grid.selectedIndex]; - if (item == null) { - return false; - } - this.select(item); - } - }, - { text: r('P_WO_CANCEL', 'Cancel') } - ] - }); - this._var.popup = popup; - popup.create(); - popup.rect = { width: 1220 }; - const mask = await popup.show(); + return container; + } + + async init() { + const option = this._option; if (option.dataSource == null) { if (typeof option.requestAssetParams === 'function') { - popup.loading = true; + this.loading(true); const data = await option.requestAssetParams(); option.dataSource = data; } else { option.dataSource = { AssetGroups: [], Jobsites: [], Codes: [] }; } } - dropAssetGroup.source = [{ Key: '-1', Value: '' }, ...option.dataSource.AssetGroups]; - dropJobsite.source = [{ ID: '-1', Name: '' }, ...option.dataSource.Jobsites]; - dropJobsiteCode.source = [{ value: '-1', text: '' }, ...option.dataSource.Codes.map(c => ({ value: c, text: c }))]; + this._var.el.dropAssetGroup.source = [{ Key: '-1', Value: '' }, ...option.dataSource.AssetGroups]; + this._var.el.dropJobsite.source = [{ ID: '-1', Name: '' }, ...option.dataSource.Jobsites]; + this._var.el.dropJobsiteCode.source = [{ value: '-1', text: '' }, ...option.dataSource.Codes.map(c => ({ value: c, text: c }))]; this.refresh(); - return mask; - } - - show() { - if (this._var.popup == null) { - return this.create(); - } - return this._var.popup.show(); } } \ No newline at end of file diff --git a/lib/element/inspectionWizard.js b/lib/element/inspectionWizard.js new file mode 100644 index 0000000..cea4306 --- /dev/null +++ b/lib/element/inspectionWizard.js @@ -0,0 +1,169 @@ +import { OptionBase, Popup, createElement, showAlert } from "../ui"; +import AssetSelector from "./assetselector"; +import TemplateSelector from "./templateselector"; + +export default class InspectionWizard extends OptionBase { + _var = { + /** + * @private + * @type {number} + */ + index: 0, + /** + * @private + * @type {HTMLElement[]} + */ + containers: [], + /** + * @private + * @type {AssetSelector} + */ + assetSelector: null, + asset: null, + template: null, + /** + * @private + * @type {Popup} + */ + popup: null + }; + + /** + * @event + * @type {(this: InspectionWizard, asset: any, template: any) => void} + */ + onSelected; + + constructor(opt = { + /** + * @private + * @type {(assetId: number, search: string) => Promise} + */ + requestTemplates: null, + /** + * @private + * @type {(hidden: boolean, search?: string, groups?: string[], jobsites?: number[], codes?: string[]) => Promise} + */ + requestAssets: null, + /** + * @private + * @type {() => Promise<{AssetGroups: any[], Codes: any[], Jobsites: any[]}>} + */ + requestAssetParams: null + }) { + super(opt); + } + + async create() { + const option = this._option; + const loading = flag => this._var.popup.loading = flag; + const assetSelector = new AssetSelector({ + ignoreHidden: true, + loading, + requestAssets: option.requestAssets, + requestAssetParams: option.requestAssetParams + }); + this._var.assetSelector = assetSelector; + const templateSelector = new TemplateSelector({ + loading, + requestTemplates: option.requestTemplates + }); + assetSelector.onSelected = asset => { + this._var.asset = asset; + this._var.template = null; + this._changePage(1); + templateSelector.assetId = asset.Id; + }; + templateSelector.onSelected = template => { + this._var.template = template; + this._select(); + this._var.popup.close(); + } + this._var.containers = [ + assetSelector.create(), + templateSelector.create() + ]; + const popup = new Popup({ + title: this.r('ADDINSPECTION', 'Add Inspection'), + content: createElement('div', null, ...this._var.containers), + persistent: true, + buttons: [ + { + text: this.r('BACK', 'Back'), + trigger: () => { + this._changePage(0); + return false; + } + }, + { + text: this.r('NEXT', 'Next'), + trigger: () => { + const asset = assetSelector.currentAsset; + if (asset == null) { + showAlert(assetSelector.title, this.r('P_SELECTASSETS_SELECTASSET', 'Please select an Asset.')); + return false; + } + this._var.asset = asset; + this._var.template = null; + this._changePage(1); + templateSelector.assetId = asset.Id; + return false; + } + }, + { + text: this.r('P_GRID_OK', 'OK'), + trigger: () => { + const template = templateSelector.currentTemplate; + if (template == null) { + showAlert(templateSelector.title, this.r('P_WO_PLEASESELECTATEMPLATE', 'Please select a template.')); + return false; + } + this._var.template = template; + this._select(); + } + }, + { text: this.r('P_WO_CANCEL', 'Cancel') } + ] + }); + this._var.popup = popup; + popup.create(); + this._changePage(0); + popup.rect = { width: 1220 }; + const mask = await popup.show(); + assetSelector.init(); + return mask; + } + + show() { + if (this._var.popup == null) { + return this.create(); + } + this._changePage(0); + const selector = this._var.assetSelector; + selector._var.el.inputSearch.value = ''; + selector._var.el.dropAssetGroup.select('-1'); + selector._var.el.dropJobsite.select('-1'); + selector._var.el.dropJobsiteCode.select('-1'); + selector.refresh(); + return this._var.popup.show(); + } + + _select() { + if (typeof this.onSelected === 'function') { + this.onSelected(this._var.asset, this._var.template); + } + } + + _changePage(index) { + if (isNaN(index) || index < 0 || index >= 2) { + return; + } + this._var.index = index; + this._var.containers[0].style.display = index === 0 ? '' : 'none'; + this._var.containers[1].style.display = index === 1 ? '' : 'none'; + const footerButtons = this._var.popup.container.querySelectorAll('.ui-popup-footer>.ui-popup-button'); + footerButtons[0].style.display = index === 0 ? 'none' : ''; + footerButtons[1].style.display = index === 1 ? 'none' : ''; + footerButtons[2].style.display = index === 0 ? 'none' : ''; + } +} \ No newline at end of file diff --git a/lib/element/schedule.js b/lib/element/schedule.js index 943bf6d..8d361da 100644 --- a/lib/element/schedule.js +++ b/lib/element/schedule.js @@ -1,19 +1,10 @@ -import { createElement, createCheckbox, createRadiobox, Dropdown, validation, toDateValue } from "../ui"; -import { r as lang } from "../utility"; +import { createElement, createCheckbox, createRadiobox, Dropdown, validation, toDateValue, OptionBase } from "../ui"; -let r = lang; - -export default class ScheduleItem { +export default class ScheduleItem extends OptionBase { _var = {}; - constructor(opt) { - this._var.option = opt ?? {}; - const getText = opt?.getText; - if (typeof getText === 'function') { - r = getText; - } else if (typeof GetTextByKey === 'function') { - r = GetTextByKey; - } + constructor(opt = {}) { + super(opt); } get checkOccurOnce() { return this._var.container.querySelector('.schedule-id-box-occur-once>input'); } @@ -99,7 +90,7 @@ export default class ScheduleItem { } create() { - const option = this._var.option; + const option = this._option; const drop = new Dropdown({ selected: '0' }); this.dropFrequency = drop; drop.source = [ diff --git a/lib/element/signature.js b/lib/element/signature.js new file mode 100644 index 0000000..29ee623 --- /dev/null +++ b/lib/element/signature.js @@ -0,0 +1,151 @@ +import { OptionBase, Popup, createElement } from "../ui"; + +export default class Signature extends OptionBase { + _var = { + /** + * @private + * @type {HTMLCanvasElement} + */ + canvas: null, + /** + * @private + * @type {Popup} + */ + popup: null, + isDrawing: false, + /** + * @private + * @type {{x: number, y: number}[]} + */ + points: [], + /** + * @private + * @type {{x: number, y: number}[][]} + */ + allPoints: [] + }; + + /** + * @event + * @type {(this: Signature, singature: string) => void} + */ + onSignatured; + + constructor(opt = {}) { + super(opt); + } + + async show() { + const popup = new Popup({ + title: this.r('P_IPT_SIGNATURE', 'Signature'), + content: this._var.canvas = createElement('canvas', canvas => { + canvas.style.width = '100%'; + canvas.style.height = '100%'; + }), + resolve: result => { + if (result.result === 'ok' && this._var.allPoints.length > 0) { + if (typeof this.onSignatured === 'function') { + const data = this._var.canvas.toDataURL('image/png'); + this.onSignatured(data); + } + } else { + if (typeof this.onSignatured === 'function') { + this.onSignatured(); + } + } + }, + buttons: [ + { + text: this.r('P_GRID_OK', 'OK'), + trigger: () => { + if (this._var.allPoints.length === 0) { + return false; + } + return 'ok'; + } + }, + { + text: this.r('P_GRID_RESET', 'Reset'), + trigger: () => { + const ctx = this._var.canvas.getContext('2d'); + ctx.clearRect(0, 0, this._var.canvas.width, this._var.canvas.height); + return false + } + }, + { text: this.r('P_WO_CANCEL', 'Cancel') } + ] + }); + this._var.popup = popup; + popup.create(); + popup.container.classList.add('ui-popup-signature'); + const mask = await popup.show(); + this.init(); + return mask; + } + + init() { + const canvas = this._var.canvas; + canvas.width = canvas.clientWidth; + canvas.height = canvas.clientHeight; + const ctx = canvas.getContext('2d'); + ctx.lineWidth = 3; + ctx.strokeStyle = '#000'; + + canvas.addEventListener('mousedown', e => this._down(ctx, e.offsetX, e.offsetY), false); + canvas.addEventListener('mousemove', e => this._move(ctx, e.offsetX, e.offsetY), false); + canvas.addEventListener('mouseup', () => this._up(ctx), false); + } + + /** + * @private + * @param {CanvasRenderingContext2D} ctx + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + */ + _draw(ctx, x1, y1, x2, y2) { + ctx.moveTo(x1, y1); + ctx.lineTo(x2, y2); + ctx.stroke(); + } + + /** + * @private + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + */ + _down(ctx, x, y) { + this._var.isDrawing = true; + this._var.points.push({ x, y }); + ctx.beginPath(); + } + + /** + * @private + * @param {CanvasRenderingContext2D} ctx + * @param {number} x + * @param {number} y + */ + _move(ctx, x, y) { + if (this._var.isDrawing) { + const lastPoint = this._var.points.at(-1); + this._draw(ctx, lastPoint.x, lastPoint.y, x, y); + this._var.points.push({ x, y }); + } + } + + /** + * @private + * @param {CanvasRenderingContext2D} ctx + */ + _up(ctx) { + if (this._var.isDrawing) { + this._var.isDrawing = false; + ctx.closePath(); + this._var.allPoints.push(this._var.points); + this._var.points = []; + } + } +} \ No newline at end of file diff --git a/lib/element/style.scss b/lib/element/style.scss index 3f2b371..eb4a1d8 100644 --- a/lib/element/style.scss +++ b/lib/element/style.scss @@ -115,6 +115,10 @@ opacity: .4; } } + + .col-icon.disabled>.ui-icon { + cursor: inherit; + } } .open-wo-container { @@ -137,7 +141,7 @@ flex: 1 1 auto; margin: 10px; display: grid; - grid-template-columns: minmax(130px,auto) 1fr; + grid-template-columns: minmax(130px, auto) 1fr; grid-auto-rows: minmax(32px, auto); align-items: center; justify-items: start; @@ -271,6 +275,7 @@ >.search-box { position: relative; + margin-right: 8px; >span { position: absolute; diff --git a/lib/element/templateSelector.js b/lib/element/templateSelector.js index 39fc8a6..e0b8457 100644 --- a/lib/element/templateSelector.js +++ b/lib/element/templateSelector.js @@ -1,27 +1,18 @@ -import { Grid, Popup, createElement, createIcon } from "../ui"; -import { r as lang, nullOrEmpty } from "../utility"; +import { Grid, OptionBase, createElement, createIcon } from "../ui"; +import { nullOrEmpty } from "../utility"; -let r = lang; - -export default class TemplateSelector { +export default class TemplateSelector extends OptionBase { _var = { - option: { - /** - * @private - * @type {(search: string) => Promise} - */ - requestTemplates: null - }, + /** + * @private + * @type {number} + */ + assetId: -1, /** * @private * @type {HTMLElement} */ container: null, - /** - * @private - * @type {Popup} - */ - popup: null, el: { /** * @private @@ -38,30 +29,47 @@ export default class TemplateSelector { /** * @event - * @type {(this: TemplateSelector, template: string) => void} + * @type {(this: TemplateSelector, template: any) => void} */ onSelected; - constructor(opt = {}) { - this._var.option = opt; - const getText = opt.getText; - if (typeof getText === 'function') { - r = getText; - } else if (typeof GetTextByKey === 'function') { - r = GetTextByKey; + constructor(opt = { + /** @type {(flag: boolean) => void} */ + loading: null, + /** @type {() => void} */ + close: null, + /** @type {(assetId: number, search: string) => Promise} */ + requestTemplates: null + }) { + super(opt); + } + + get assetId() { return this._var.assetId } + set assetId(id) { + this._var.assetId = id; + this.refresh(); + } + + get title() { return this.r('P_MODULE_INSPECTIONTEMPLATES', 'Inspection Templates') } + + get currentTemplate() { return this._var.el.grid.currentItem } + + loading(flag) { + if (typeof this._option.loading === 'function') { + this._option.loading(flag); } } refresh() { - const requestTemplates = this._var.option.requestTemplates; + const requestTemplates = this._option.requestTemplates; if (typeof requestTemplates !== 'function') { return; } const el = this._var.el; - this._var.popup.loading = true; - requestTemplates(el.inputSearch.value) + this.loading(true); + requestTemplates(this._var.assetId, el.inputSearch.value) .then(data => el.grid.source = data) - .finally(() => this._var.popup.loading = false); + .finally(() => this.loading(false)); } select(item) { @@ -71,13 +79,11 @@ export default class TemplateSelector { this.onSelected(item); } - async create() { - const option = this._var.option; - const title = r('P_MODULE_INSPECTIONTEMPLATES', 'Inspection Templates'); + create() { const tabIndex = Math.max.apply(null, [...document.querySelectorAll('[tabindex]')].map(e => e.tabIndex ?? 0)) + 3; const inputSearch = createElement('input', input => { input.type = 'text'; - input.placeholder = r('P_SELECTASSETS_SEARCH', 'Search'); + input.placeholder = this.r('P_SELECTASSETS_SEARCH', 'Search'); input.tabIndex = tabIndex + 1; input.className = 'ui-input'; input.addEventListener('keypress', e => e.key === 'Enter' && this.refresh()); @@ -86,22 +92,25 @@ export default class TemplateSelector { div.className = 'popup-selector-content'; div.style.height = '400px'; }); - const grid = new Grid(gridContent, r); + const grid = new Grid(gridContent, this.r); grid.columns = [ { key: 'IssueId', type: Grid.ColumnTypes.Icon, width: 30, + enabled: false, resizable: false, filter: it => nullOrEmpty(it.IssueId) ? '' : 'cubes' }, - { key: 'Name', caption: r('P_IPT_NAME', 'Name'), width: 390 }, - { key: 'Notes', caption: r('P_IPT_NOTES', 'Notes'), width: 630 } + { key: 'Name', caption: this.r('P_IPT_NAME', 'Name'), width: 390 }, + { key: 'Notes', caption: this.r('P_IPT_NOTES', 'Notes'), width: 630 } ]; grid.onRowDblClicked = index => { const item = grid.source[index]; this.select(item); - this._var.popup.close(); + if (typeof this._option.close === 'function') { + this._option.close(); + } }; grid.init(); grid.element.tabIndex = tabIndex + 2; @@ -113,7 +122,7 @@ export default class TemplateSelector { // content const container = createElement('div', 'popup-selector', createElement('div', 'popup-selector-header', - createElement('h3', h3 => h3.innerText = r('P_WO_PLEASESELECTATEMPLATE', 'Please select a template.')) + createElement('h3', h3 => h3.innerText = this.r('P_WO_PLEASESELECTATEMPLATE', 'Please select a template.')) ), createElement('div', 'popup-selector-function', createElement('div', 'search-box', @@ -128,36 +137,6 @@ export default class TemplateSelector { gridContent ); this._var.container = container; - const popup = new Popup({ - title, - content: container, - persistent: true, - buttons: [ - { - text: r('P_GRID_OK', 'OK'), - trigger: () => { - const item = grid.source[grid.selectedIndex]; - if (item == null) { - return false; - } - this.select(item); - } - }, - { text: r('P_WO_CANCEL', 'Cancel') } - ] - }); - this._var.popup = popup; - popup.create(); - popup.rect = { width: 1200 }; - const mask = await popup.show(); - this.refresh(); - return mask; - } - - show() { - if (this._var.popup == null) { - return this.create(); - } - return this._var.popup.show(); + return container; } } \ No newline at end of file diff --git a/lib/ui.js b/lib/ui.js index 1d0588b..1826b51 100644 --- a/lib/ui.js +++ b/lib/ui.js @@ -46,6 +46,24 @@ function offset(e) { }; } +class OptionBase { + _option; + + r; + + constructor(opt) { + this._option = opt; + const getText = opt.getText; + if (typeof getText === 'function') { + this.r = getText; + } else if (typeof GetTextByKey === 'function') { + this.r = GetTextByKey; + } else { + this.r = utility.r; + } + } +} + export { createElement, // icon @@ -99,5 +117,7 @@ export { utility, // functions requestAnimationFrame, - offset + offset, + // base classes + OptionBase } diff --git a/lib/ui/dropdown.js b/lib/ui/dropdown.js index e732857..9e5694a 100644 --- a/lib/ui/dropdown.js +++ b/lib/ui/dropdown.js @@ -87,6 +87,17 @@ function filterSource(searchkeys, textkey, key, source) { return source; } +function getValue(it, valuekey, textkey) { + if (it == null) { + return null; + } + const value = it[valuekey]; + if (value == null || value === '') { + return it[textkey]; + } + return value; +} + /** * 下拉列表参数对象 * @typedef DropdownOptions @@ -171,6 +182,7 @@ export class Dropdown { const source = this.source; const count = source.length; const valuekey = this._var.options.valueKey; + const textkey = this._var.options.textKey; let index = source?.indexOf(this._var.selected); if (isNaN(index) || index < -1) { index = -1; @@ -192,7 +204,7 @@ export class Dropdown { index = count - 1; } } - const target = source[index]?.[valuekey]; + const target = getValue(source[index], valuekey, textkey); if (target != null) { this.select(target); } @@ -315,7 +327,7 @@ export class Dropdown { const textkey = this._var.options.textKey; const template = this._var.options.htmlTemplate; const htmlkey = this._var.options.htmlKey; - let item = this.source.find(it => (ignoreCase ? String(it[valuekey]).toLowerCase() : String(it[valuekey])) === selected); + let item = this.source.find(it => (ignoreCase ? String(getValue(it, valuekey, textkey)).toLowerCase() : String(getValue(it, valuekey, textkey))) === selected); if (this._var.options.input) { if (item == null) { item = { [valuekey]: selected }; @@ -377,7 +389,7 @@ export class Dropdown { const htmlkey = this._var.options.htmlKey; const itemlist = selectedlist.map(a => { const v = typeof a === 'string' ? a : String(a); - let item = source.find(it => String(it[valuekey]) === v); + let item = source.find(it => String(getValue(it, valuekey, textkey)) === v); if (item == null) { item = { [valuekey]: v, @@ -557,15 +569,16 @@ export class Dropdown { } const multiselect = this.multiSelect; const valuekey = this._var.options.valueKey; + const textkey = this._var.options.textKey; const allchecked = this._var.allChecked; const selectedlist = this.selectedList; source.forEach((item, i) => { - let val = item[valuekey]; + let val = getValue(item, valuekey, textkey); if (typeof val !== 'string') { val = String(val); } if (multiselect) { - const selected = selectedlist.some(s => String(s[valuekey]) === val); + const selected = selectedlist.some(s => String(getValue(s, valuekey, textkey)) === val); item.__checked = allchecked || selected; } }); @@ -588,7 +601,7 @@ export class Dropdown { const selected = this.selected; let scrolled; array.forEach((item, i) => { - let val = item[valuekey]; + let val = getValue(item, valuekey, textkey); if (typeof val !== 'string') { val = String(val); } @@ -671,9 +684,9 @@ export class Dropdown { if (all != null) { all.checked = false; } - list = this.source.filter(it => String(it[valuekey]) !== val); + list = this.source.filter(it => String(getValue(it, valuekey, textkey)) !== val); } else { - list = this.selectedList.filter(it => String(it[valuekey]) !== val); + list = this.selectedList.filter(it => String(getValue(it, valuekey, textkey)) !== val); } } } diff --git a/lib/ui/grid/grid.js b/lib/ui/grid/grid.js index 8596e4b..b5be07e 100644 --- a/lib/ui/grid/grid.js +++ b/lib/ui/grid/grid.js @@ -14,7 +14,7 @@ import { requestAnimationFrame } from '../../ui'; /** * @author Tsanie Lily * @license MIT - * @version 1.0.6 + * @version 1.0.7 */ const ScriptPath = (self.document == null ? self.location.href : self.document.currentScript?.src ?? '').replace(/ui\.min\.js\?.+$/, ''); @@ -259,7 +259,7 @@ let r = lang; * @property {GridItemObjectCallback} [styleFilter] - **已过时**
_根据返回值填充单元格样式(填充行列数据时读取)_ * @property {(string | GridItemStringCallback)} [background] - 设置单元格背景色(填充行列数据时读取),支持直接设置颜色字符串或调用函数返回(若赋值则忽略 [bgFilter]{@linkcode GridColumnDefinition#bgFilter}) * @property {GridItemStringCallback} [bgFilter] - **已过时**
_根据返回值设置单元格背景色_ - * @property {boolean} [switch=false] - 复选框为 `ui-switch` 样式 `@since 1.0.6` + * @property {boolean} [switch=false] - 复选框为 `ui-switch` 样式 *@since* 1.0.6 * @property {(any | GridItemObjectCallback)} [attrs] - 根据返回值设置单元格元素的附加属性,允许直接设置对象也支持调用函数返回对象 * @property {KeyMap} [events] - 给单元格元素附加事件(事件函数上下文为数据行对象) * @property {boolean} [allowFilter=false] - 是否允许进行列头过滤 @@ -1065,7 +1065,9 @@ export class Grid { /** * 列滚动时触发的事件 * @event - * @param {Event} e - 滚动事件对象 + * @param {Event} [e] - 滚动事件对象 + * @param {number} index - 起始行 + * @param {number} count - 显示行数 * @this Grid */ onBodyScrolled; @@ -1136,7 +1138,7 @@ export class Grid { * @property {boolean} [tooltipDisabled=false] - 单元格 tooltip 是否禁用 * @property {boolean} [headerVisible=true] - 列头是否显示 * @property {boolean} [headerWrap=true] - 列头是否允许换行 - * @property {boolean} [rowDraggable=false] - 是否允许行间拖拽 @since 1.0.3 + * @property {boolean} [rowDraggable=false] - 是否允许行间拖拽 *since* 1.0.3 * @property {(Window | HTMLElement)} [window=global] - 监听事件的窗口载体 * @property {number} [sortIndex=-1] - 排序列的索引 * @property {GridColumnDirection} [sortDirection=GridColumnDirection.Ascending] - 排序方式,正数升序,负数倒序 @@ -1205,6 +1207,16 @@ export class Grid { return this.columns[this.sortIndex]?.key; } + /** + * 获取当前选中的行对象 + * @readonly + * @type {GridRowItem | null} + * @since 1.0.7 + */ + get currentItem() { + return this.source[this.selectedIndex]; + } + /** * @private * @type {HTMLTableRowElement[]} @@ -1526,10 +1538,10 @@ export class Grid { this._var.rendering = false; if (this._var.source != null) { - if (this.sortIndex >= 0) { - this.sortColumn(true); - } else if (this.sortArray?.length > 0) { + if (this.sortArray?.length > 0) { this.sort(true); + } else if (this.sortIndex >= 0) { + this.sortColumn(true); } else { this.resize(true); } @@ -1575,6 +1587,14 @@ export class Grid { const count = truncate((height - 1) / (this.rowHeight + 1)) + (RedumCount * 2) + 1; if (force || count !== this._var.rowCount) { this._var.rowCount = count; + if (typeof this.onBodyScrolled === 'function') { + if (!this.virtual) { + const tti = this._topToIndex(this._var.el.scrollTop); + this.onBodyScrolled(null, tti.index, count); + } else { + this.onBodyScrolled(null, this._var.startIndex, count); + } + } if (typeof callback === 'function') { callback.call(this); } else { @@ -1792,8 +1812,8 @@ export class Grid { /** * 显示多列排序设置面板 - * @param {Function} [callback] - 更新回调函数 @since 1.0.3 - * @param {boolean} [layout] - 是否显示更新 layout 复选框 @since 1.0.3 + * @param {Function} [callback] - 更新回调函数 *@since* 1.0.3 + * @param {boolean} [layout] - 是否显示更新 layout 复选框 *@since* 1.0.3 * @since 1.0.1 */ showSortPanel(callback, layout) { @@ -1989,6 +2009,8 @@ export class Grid { const source = grid.source; if (source == null || source.length === 0) { this.sortArray = null; + this.sortIndex = -1; + this.sortDirection = GridColumnDirection.Ascending; // arrow icon [...this._headerCells].forEach((th, i) => { const arrow = th.querySelector('.arrow'); @@ -2081,10 +2103,10 @@ export class Grid { // FIXME: 清除缓存会导致选中状态下动态数据源下拉列表显示为空 // delete it.source; it.values = item; - if (this.sortIndex >= 0) { - this.sortColumn(); - } else if (this.sortArray?.length > 0) { + if (this.sortArray?.length > 0) { this.sort(); + } else if (this.sortIndex >= 0) { + this.sortColumn(); } else { this.refresh(); } @@ -2122,10 +2144,10 @@ export class Grid { this._var.source.push(newIt); } } - if (this.sortIndex >= 0) { - this.sortColumn(true); - } else if (this.sortArray?.length > 0) { + if (this.sortArray?.length > 0) { this.sort(true); + } else if (this.sortIndex >= 0) { + this.sortColumn(true); } else { this.reload(); } @@ -2169,10 +2191,10 @@ export class Grid { this._var.source.push(...items); } } - if (this.sortIndex >= 0) { - this.sortColumn(true); - } else if (this.sortArray?.length > 0) { + if (this.sortArray?.length > 0) { this.sort(true); + } else if (this.sortIndex >= 0) { + this.sortColumn(true); } else { this.reload(); } @@ -2564,10 +2586,10 @@ export class Grid { this._var.rowCount = -1; this.resize(true, false, () => { - if (this.sortIndex >= 0) { - this.sortColumn(true); - } else if (this.sortArray?.length > 0) { + if (this.sortArray?.length > 0) { this.sort(true); + } else if (this.sortIndex >= 0) { + this.sortColumn(true); } else { this.reload(); } @@ -3515,13 +3537,7 @@ export class Grid { } } - /** - * @private - * @param {number} top - * @param {boolean} [reload] - * @returns {number} - */ - _scrollToTop(top, reload) { + _topToIndex(top) { const rowHeight = (this.rowHeight + 1); top -= (top % (rowHeight * 2)) + (RedumCount * rowHeight); if (top < 0) { @@ -3535,10 +3551,22 @@ export class Grid { top = bottomTop; } } + return { top, index: top / rowHeight }; + } + + /** + * @private + * @param {number} top + * @param {boolean} [reload] + * @returns {number} + */ + _scrollToTop(top, reload) { + const tti = this._topToIndex(top); + top = tti.top; if (this._var.scrollTop !== top) { this._var.scrollTop = top; if (this.virtual) { - this._var.startIndex = top / rowHeight; + this._var.startIndex = tti.index; } this._fillRows(this._tableRows, this.columns); if (this.virtual) { @@ -4241,21 +4269,25 @@ export class Grid { if (this._var.colAttrs.__filtering != null) { this._onCloseFilter(); } - if (this.onBodyScrolled === 'function') { - this.onBodyScrolled(e); - } this._var.scrollLeft = e.target.scrollLeft; + const top = e.target.scrollTop; if (!this.virtual) { if (this.total != null) { this._var.refs.footer.parentElement.style.bottom = `${this._var.footerOffset - e.target.scrollTop}px`; } + const tti = this._topToIndex(top); + if (this.onBodyScrolled === 'function') { + this.onBodyScrolled(e, tti.index, this._var.rowCount); + } return; } - const top = e.target.scrollTop; this._scrollToTop(top); if (this.total != null) { this._var.refs.footer.parentElement.style.bottom = `${this._var.refs.table.offsetTop + this._var.footerOffset - e.target.scrollTop}px`; } + if (this.onBodyScrolled === 'function') { + this.onBodyScrolled(e, this._var.startIndex, this._var.rowCount); + } if (this._var.isFirefox) { // 修复 firefox 下列头显示位置不正确的问题 debounce(this._fillRows, RefreshInterval, this, this._tableRows, this.columns); diff --git a/lib/ui/popup.d.ts b/lib/ui/popup.d.ts index a4b6a79..dba1e29 100644 --- a/lib/ui/popup.d.ts +++ b/lib/ui/popup.d.ts @@ -63,7 +63,7 @@ interface PopupOptions { /** * 弹出框关闭时的回调函数 */ - resolve?: () => void; + resolve?: (this: Popup, result: { result: any, popup: Popup }) => void; } export class Popup { diff --git a/package-lock.json b/package-lock.json index 8d42ba1..07e225b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,21 +1,21 @@ { "name": "ui-lib", - "version": "1.0.5", + "version": "1.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ui-lib", - "version": "1.0.5", + "version": "1.0.6", "devDependencies": { - "@mxssfd/typedoc-theme": "^1.1.3", + "@mxssfd/typedoc-theme": "^1.1.6", "clean-jsdoc-theme": "^4.3.0", "docdash": "^2.0.2", "jsdoc": "^4.0.3", - "postcss-preset-env": "^9.5.14", - "sass": "^1.77.6", - "typedoc": "^0.25.13", - "vite": "^5.3.1", + "postcss-preset-env": "^9.6.0", + "sass": "^1.77.7", + "typedoc": "^0.26.3", + "vite": "^5.3.3", "vite-plugin-externals": "^0.6.2" } }, @@ -32,9 +32,9 @@ } }, "node_modules/@csstools/cascade-layer-name-parser": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-1.0.11.tgz", - "integrity": "sha512-yhsonEAhaWRQvHFYhSzOUobH2Ev++fMci+ppFRagw0qVSPlcPV4FnNmlwpM/b2BM10ZeMRkVV4So6YRswD0O0w==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-1.0.13.tgz", + "integrity": "sha512-MX0yLTwtZzr82sQ0zOjqimpZbzjMaK/h2pmlrLK7DCzlmiZLYFpoO94WmN1akRVo6ll/TdpHb53vihHLUMyvng==", "dev": true, "funding": [ { @@ -50,14 +50,14 @@ "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1" + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1" } }, "node_modules/@csstools/color-helpers": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-4.2.0.tgz", - "integrity": "sha512-hJJrSBzbfGxUsaR6X4Bzd/FLx0F1ulKnR5ljY9AiXCtsR+H+zSWQDFWlKES1BRaVZTDHLpIIHS9K2o0h+JLlrg==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-4.2.1.tgz", + "integrity": "sha512-CEypeeykO9AN7JWkr1OEOQb0HRzZlPWGwV0Ya6DuVgFdDi6g3ma/cPZ5ZPZM4AWQikDpq/0llnGGlIL+j8afzw==", "dev": true, "funding": [ { @@ -74,9 +74,9 @@ } }, "node_modules/@csstools/css-calc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-1.2.2.tgz", - "integrity": "sha512-0owrl7AruDRKAxoSIW8XzJdz7GnuW3AOj4rYLfmXsoKIX2ZZzttzGXoiC8n8V08X7wIBlEWWVB4C8fAN18+I6Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-1.2.4.tgz", + "integrity": "sha512-tfOuvUQeo7Hz+FcuOd3LfXVp+342pnWUJ7D2y8NUpu1Ww6xnTbHLpz018/y6rtbHifJ3iIEf9ttxXd8KG7nL0Q==", "dev": true, "funding": [ { @@ -92,14 +92,14 @@ "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1" + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1" } }, "node_modules/@csstools/css-color-parser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-2.0.2.tgz", - "integrity": "sha512-Agx2YmxTcZ7TfB7KNZQ+iekaxbWSdblvtA35aTwE3KfuYyjOlCg3P4KGGdQF/cjm1pHWVSBo5duF/BRfZ8s07A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-2.0.4.tgz", + "integrity": "sha512-yUb0mk/k2yVNcQvRmd9uikpu6D0aamFJGgU++5d0lng6ucaJkhKyhDCQCj9rVuQYntvFQKqyU6UfTPQWU2UkXQ==", "dev": true, "funding": [ { @@ -112,21 +112,21 @@ } ], "dependencies": { - "@csstools/color-helpers": "^4.2.0", - "@csstools/css-calc": "^1.2.2" + "@csstools/color-helpers": "^4.2.1", + "@csstools/css-calc": "^1.2.4" }, "engines": { "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1" + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1" } }, "node_modules/@csstools/css-parser-algorithms": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.6.3.tgz", - "integrity": "sha512-xI/tL2zxzEbESvnSxwFgwvy5HS00oCXxL4MLs6HUiDcYfwowsoQaABKxUElp1ARITrINzBnsECOc1q0eg2GOrA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.1.tgz", + "integrity": "sha512-2SJS42gxmACHgikc1WGesXLIT8d/q2l0UFM7TaEeIzdFCE/FPMtTiizcPGGJtlPo2xuQzY09OhrLTzRxqJqwGw==", "dev": true, "funding": [ { @@ -142,13 +142,13 @@ "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-tokenizer": "^2.3.1" + "@csstools/css-tokenizer": "^2.4.1" } }, "node_modules/@csstools/css-tokenizer": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.3.1.tgz", - "integrity": "sha512-iMNHTyxLbBlWIfGtabT157LH9DUx9X8+Y3oymFEuMj8HNc+rpE3dPFGFgHjpKfjeFDjLjYIAIhXPGvS2lKxL9g==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.4.1.tgz", + "integrity": "sha512-eQ9DIktFJBhGjioABJRtUucoWR2mwllurfnM8LuNGAqX3ViZXaUchqk+1s7jjtkFiT9ySdACsFEA3etErkALUg==", "dev": true, "funding": [ { @@ -165,9 +165,9 @@ } }, "node_modules/@csstools/media-query-list-parser": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.11.tgz", - "integrity": "sha512-uox5MVhvNHqitPP+SynrB1o8oPxPMt2JLgp5ghJOWf54WGQ5OKu47efne49r1SWqs3wRP8xSWjnO9MBKxhB1dA==", + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.13.tgz", + "integrity": "sha512-XaHr+16KRU9Gf8XLi3q8kDlI18d5vzKSKCY510Vrtc9iNR0NJzbY9hhTmwhzYZj/ZwGL4VmB3TA9hJW0Um2qFA==", "dev": true, "funding": [ { @@ -183,8 +183,8 @@ "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1" + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1" } }, "node_modules/@csstools/postcss-cascade-layers": { @@ -214,9 +214,9 @@ } }, "node_modules/@csstools/postcss-color-function": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function/-/postcss-color-function-3.0.16.tgz", - "integrity": "sha512-KtmXfckANSKsLBoTQCzggvKft1cmmmDKYjFO4yVlB23nWUgGInVBTE9T5JLmH29NNdTWSEPLWPUxoQ6XiIEn2Q==", + "version": "3.0.19", + "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function/-/postcss-color-function-3.0.19.tgz", + "integrity": "sha512-d1OHEXyYGe21G3q88LezWWx31ImEDdmINNDy0LyLNN9ChgN2bPxoubUPiHf9KmwypBMaHmNcMuA/WZOKdZk/Lg==", "dev": true, "funding": [ { @@ -229,10 +229,10 @@ } ], "dependencies": { - "@csstools/css-color-parser": "^2.0.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/css-color-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0" }, "engines": { @@ -243,9 +243,9 @@ } }, "node_modules/@csstools/postcss-color-mix-function": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@csstools/postcss-color-mix-function/-/postcss-color-mix-function-2.0.16.tgz", - "integrity": "sha512-BJnD1M5Pdypl1cJuwGuzVC52PqgzaObsDLu34jgf+QU7daVFqz432PvpqvXTmfTSNt4OckOT1QIzWexEFlDNXw==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/@csstools/postcss-color-mix-function/-/postcss-color-mix-function-2.0.19.tgz", + "integrity": "sha512-mLvQlMX+keRYr16AuvuV8WYKUwF+D0DiCqlBdvhQ0KYEtcQl9/is9Ssg7RcIys8x0jIn2h1zstS4izckdZj9wg==", "dev": true, "funding": [ { @@ -258,10 +258,38 @@ } ], "dependencies": { - "@csstools/css-color-parser": "^2.0.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/css-color-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", + "@csstools/utilities": "^1.0.0" + }, + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, + "node_modules/@csstools/postcss-content-alt-text": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-content-alt-text/-/postcss-content-alt-text-1.0.0.tgz", + "integrity": "sha512-SkHdj7EMM/57GVvSxSELpUg7zb5eAndBeuvGwFzYtU06/QXJ/h9fuK7wO5suteJzGhm3GDF/EWPCdWV2h1IGHQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "dependencies": { + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0" }, "engines": { @@ -272,9 +300,9 @@ } }, "node_modules/@csstools/postcss-exponential-functions": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@csstools/postcss-exponential-functions/-/postcss-exponential-functions-1.0.7.tgz", - "integrity": "sha512-9usBPQX74OhiF/VuaVrp44UAPzqbKNyoaxEa6tbEXiFp+OAm3yB/TLRKyPUWg5tvvHGCduGJVdJJB3w8c8NBtA==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@csstools/postcss-exponential-functions/-/postcss-exponential-functions-1.0.9.tgz", + "integrity": "sha512-x1Avr15mMeuX7Z5RJUl7DmjhUtg+Amn5DZRD0fQ2TlTFTcJS8U1oxXQ9e5mA62S2RJgUU6db20CRoJyDvae2EQ==", "dev": true, "funding": [ { @@ -287,9 +315,9 @@ } ], "dependencies": { - "@csstools/css-calc": "^1.2.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1" + "@csstools/css-calc": "^1.2.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1" }, "engines": { "node": "^14 || ^16 || >=18" @@ -325,9 +353,9 @@ } }, "node_modules/@csstools/postcss-gamut-mapping": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@csstools/postcss-gamut-mapping/-/postcss-gamut-mapping-1.0.9.tgz", - "integrity": "sha512-JmOeiBJj1RJriAkr+aLBaiYUpEqdNOIo3ERQ5a4uNzy18upzrQ6tz7m2Vt1GQpJ62zQj7rC5PjAhCoZCoyE31g==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@csstools/postcss-gamut-mapping/-/postcss-gamut-mapping-1.0.11.tgz", + "integrity": "sha512-KrHGsUPXRYxboXmJ9wiU/RzDM7y/5uIefLWKFSc36Pok7fxiPyvkSHO51kh+RLZS1W5hbqw9qaa6+tKpTSxa5g==", "dev": true, "funding": [ { @@ -340,9 +368,9 @@ } ], "dependencies": { - "@csstools/css-color-parser": "^2.0.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1" + "@csstools/css-color-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1" }, "engines": { "node": "^14 || ^16 || >=18" @@ -352,9 +380,9 @@ } }, "node_modules/@csstools/postcss-gradients-interpolation-method": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-4.0.17.tgz", - "integrity": "sha512-qSNIqzLPKd2SadfWwHZv42lDRyYlLaM+Vx5rRIsnYCZbQxzFfe1XAwssrcCsHgba5bA6bi5oDoFCx0W+PRCpfw==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-4.0.20.tgz", + "integrity": "sha512-ZFl2JBHano6R20KB5ZrB8KdPM2pVK0u+/3cGQ2T8VubJq982I2LSOvQ4/VtxkAXjkPkk1rXt4AD1ni7UjTZ1Og==", "dev": true, "funding": [ { @@ -367,10 +395,10 @@ } ], "dependencies": { - "@csstools/css-color-parser": "^2.0.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/css-color-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0" }, "engines": { @@ -381,9 +409,9 @@ } }, "node_modules/@csstools/postcss-hwb-function": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@csstools/postcss-hwb-function/-/postcss-hwb-function-3.0.15.tgz", - "integrity": "sha512-l34fRiZ7o5+pULv7OplXniBTU4TuKYNNOv0abuvUanddWGSy3+YHlMKUSgcVFo0d1DorxPAhJSTCrugl+4OmMQ==", + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/@csstools/postcss-hwb-function/-/postcss-hwb-function-3.0.18.tgz", + "integrity": "sha512-3ifnLltR5C7zrJ+g18caxkvSRnu9jBBXCYgnBznRjxm6gQJGnnCO9H6toHfywNdNr/qkiVf2dymERPQLDnjLRQ==", "dev": true, "funding": [ { @@ -396,10 +424,10 @@ } ], "dependencies": { - "@csstools/css-color-parser": "^2.0.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/css-color-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0" }, "engines": { @@ -410,9 +438,9 @@ } }, "node_modules/@csstools/postcss-ic-unit": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@csstools/postcss-ic-unit/-/postcss-ic-unit-3.0.6.tgz", - "integrity": "sha512-fHaU9C/sZPauXMrzPitZ/xbACbvxbkPpHoUgB9Kw5evtsBWdVkVrajOyiT9qX7/c+G1yjApoQjP1fQatldsy9w==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@csstools/postcss-ic-unit/-/postcss-ic-unit-3.0.7.tgz", + "integrity": "sha512-YoaNHH2wNZD+c+rHV02l4xQuDpfR8MaL7hD45iJyr+USwvr0LOheeytJ6rq8FN6hXBmEeoJBeXXgGmM8fkhH4g==", "dev": true, "funding": [ { @@ -425,7 +453,7 @@ } ], "dependencies": { - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0", "postcss-value-parser": "^4.2.0" }, @@ -485,9 +513,9 @@ } }, "node_modules/@csstools/postcss-light-dark-function": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@csstools/postcss-light-dark-function/-/postcss-light-dark-function-1.0.5.tgz", - "integrity": "sha512-kKM9dtEaVmSTb3scL2pgef62KyWv6SK19JiAnCCuiDhlRE6PADKzaPPBXmP3qj4IEgIH+cQhdEosB0eroU6Fnw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@csstools/postcss-light-dark-function/-/postcss-light-dark-function-1.0.8.tgz", + "integrity": "sha512-x0UtpCyVnERsplUeoaY6nEtp1HxTf4lJjoK/ULEm40DraqFfUdUSt76yoOyX5rGY6eeOUOkurHyYlFHVKv/pew==", "dev": true, "funding": [ { @@ -500,9 +528,9 @@ } ], "dependencies": { - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0" }, "engines": { @@ -604,9 +632,9 @@ } }, "node_modules/@csstools/postcss-logical-viewport-units": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-viewport-units/-/postcss-logical-viewport-units-2.0.9.tgz", - "integrity": "sha512-iBBJuExgHwedFH9AqNOHWzZFgYnt17zhu1qWjmSihu1P5pw0lIG9q5t3uIgJJFDNmYoOGfBKan66z9u1QH8yBQ==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-viewport-units/-/postcss-logical-viewport-units-2.0.11.tgz", + "integrity": "sha512-ElITMOGcjQtvouxjd90WmJRIw1J7KMP+M+O87HaVtlgOOlDt1uEPeTeii8qKGe2AiedEp0XOGIo9lidbiU2Ogg==", "dev": true, "funding": [ { @@ -619,7 +647,7 @@ } ], "dependencies": { - "@csstools/css-tokenizer": "^2.3.1", + "@csstools/css-tokenizer": "^2.4.1", "@csstools/utilities": "^1.0.0" }, "engines": { @@ -630,9 +658,9 @@ } }, "node_modules/@csstools/postcss-media-minmax": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@csstools/postcss-media-minmax/-/postcss-media-minmax-1.1.6.tgz", - "integrity": "sha512-bc0frf2Lod53j6wEHVsaVElfvCf6uhc96v99M/wUfer4MmNYfO3YLx1kFuB8xXvb0AXiWx4fohCJqemHV3bfRg==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@csstools/postcss-media-minmax/-/postcss-media-minmax-1.1.8.tgz", + "integrity": "sha512-KYQCal2i7XPNtHAUxCECdrC7tuxIWQCW+s8eMYs5r5PaAiVTeKwlrkRS096PFgojdNCmHeG0Cb7njtuNswNf+w==", "dev": true, "funding": [ { @@ -645,10 +673,10 @@ } ], "dependencies": { - "@csstools/css-calc": "^1.2.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/media-query-list-parser": "^2.1.11" + "@csstools/css-calc": "^1.2.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/media-query-list-parser": "^2.1.13" }, "engines": { "node": "^14 || ^16 || >=18" @@ -658,9 +686,9 @@ } }, "node_modules/@csstools/postcss-media-queries-aspect-ratio-number-values": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@csstools/postcss-media-queries-aspect-ratio-number-values/-/postcss-media-queries-aspect-ratio-number-values-2.0.9.tgz", - "integrity": "sha512-PR0s3tFSxPoKoPLoKuiZuYhwQC5bQxq/gFfywX2u/kh8rMzesARPZYKxE71I3jHWi6KDHGZl9Xb5xcFPwtvLiQ==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@csstools/postcss-media-queries-aspect-ratio-number-values/-/postcss-media-queries-aspect-ratio-number-values-2.0.11.tgz", + "integrity": "sha512-YD6jrib20GRGQcnOu49VJjoAnQ/4249liuz7vTpy/JfgqQ1Dlc5eD4HPUMNLOw9CWey9E6Etxwf/xc/ZF8fECA==", "dev": true, "funding": [ { @@ -673,9 +701,9 @@ } ], "dependencies": { - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/media-query-list-parser": "^2.1.11" + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/media-query-list-parser": "^2.1.13" }, "engines": { "node": "^14 || ^16 || >=18" @@ -736,9 +764,9 @@ } }, "node_modules/@csstools/postcss-oklab-function": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/@csstools/postcss-oklab-function/-/postcss-oklab-function-3.0.16.tgz", - "integrity": "sha512-zm8nND+EraZrmbO4mgcT8FrJrAQUfWNfMmbV5uTCpWtAcO5ycX3E3bO8T1TjczKYRxC5QMM/91n9YExYCF4Mvw==", + "version": "3.0.19", + "resolved": "https://registry.npmjs.org/@csstools/postcss-oklab-function/-/postcss-oklab-function-3.0.19.tgz", + "integrity": "sha512-e3JxXmxjU3jpU7TzZrsNqSX4OHByRC3XjItV3Ieo/JEQmLg5rdOL4lkv/1vp27gXemzfNt44F42k/pn0FpE21Q==", "dev": true, "funding": [ { @@ -751,10 +779,10 @@ } ], "dependencies": { - "@csstools/css-color-parser": "^2.0.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/css-color-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0" }, "engines": { @@ -765,9 +793,9 @@ } }, "node_modules/@csstools/postcss-progressive-custom-properties": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@csstools/postcss-progressive-custom-properties/-/postcss-progressive-custom-properties-3.2.0.tgz", - "integrity": "sha512-BZlirVxCRgKlE7yVme+Xvif72eTn1MYXj8oZ4Knb+jwaH4u3AN1DjbhM7j86RP5vvuAOexJ4JwfifYYKWMN/QQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@csstools/postcss-progressive-custom-properties/-/postcss-progressive-custom-properties-3.3.0.tgz", + "integrity": "sha512-W2oV01phnILaRGYPmGFlL2MT/OgYjQDrL9sFlbdikMFi6oQkFki9B86XqEWR7HCsTZFVq7dbzr/o71B75TKkGg==", "dev": true, "funding": [ { @@ -790,9 +818,9 @@ } }, "node_modules/@csstools/postcss-relative-color-syntax": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@csstools/postcss-relative-color-syntax/-/postcss-relative-color-syntax-2.0.16.tgz", - "integrity": "sha512-TSM8fVqJkT8JZDranZPnkpxjU/Q1sNR192lXMND+EcKOUjYa6uYpGSfHgjnWjCRiBSciettS+sL7y9wmnas7qQ==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/@csstools/postcss-relative-color-syntax/-/postcss-relative-color-syntax-2.0.19.tgz", + "integrity": "sha512-MxUMSNvio1WwuS6WRLlQuv6nNPXwIWUFzBBAvL/tBdWfiKjiJnAa6eSSN5gtaacSqUkQ/Ce5Z1OzLRfeaWhADA==", "dev": true, "funding": [ { @@ -805,10 +833,10 @@ } ], "dependencies": { - "@csstools/css-color-parser": "^2.0.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/css-color-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0" }, "engines": { @@ -844,9 +872,9 @@ } }, "node_modules/@csstools/postcss-stepped-value-functions": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@csstools/postcss-stepped-value-functions/-/postcss-stepped-value-functions-3.0.8.tgz", - "integrity": "sha512-X76+thsvsmH/SkqVbN+vjeFKe1ABGLRx8/Wl68QTb/zvJWdzgx5S/nbszZP5O3nTRc5eI8NxIOrQUiy30fR+0g==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@csstools/postcss-stepped-value-functions/-/postcss-stepped-value-functions-3.0.10.tgz", + "integrity": "sha512-MZwo0D0TYrQhT5FQzMqfy/nGZ28D1iFtpN7Su1ck5BPHS95+/Y5O9S4kEvo76f2YOsqwYcT8ZGehSI1TnzuX2g==", "dev": true, "funding": [ { @@ -859,9 +887,9 @@ } ], "dependencies": { - "@csstools/css-calc": "^1.2.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1" + "@csstools/css-calc": "^1.2.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1" }, "engines": { "node": "^14 || ^16 || >=18" @@ -871,9 +899,9 @@ } }, "node_modules/@csstools/postcss-text-decoration-shorthand": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@csstools/postcss-text-decoration-shorthand/-/postcss-text-decoration-shorthand-3.0.6.tgz", - "integrity": "sha512-Q8HEu4AEiwNVZBD6+DpQ8M9SajpMow4+WtmndWIAv8qxDtDYL4JK1xXWkhOGk28PrcJawOvkrEZ8Ri59UN1TJw==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@csstools/postcss-text-decoration-shorthand/-/postcss-text-decoration-shorthand-3.0.7.tgz", + "integrity": "sha512-+cptcsM5r45jntU6VjotnkC9GteFR7BQBfZ5oW7inLCxj7AfLGAzMbZ60hKTP13AULVZBdxky0P8um0IBfLHVA==", "dev": true, "funding": [ { @@ -886,7 +914,7 @@ } ], "dependencies": { - "@csstools/color-helpers": "^4.2.0", + "@csstools/color-helpers": "^4.2.1", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -897,9 +925,9 @@ } }, "node_modules/@csstools/postcss-trigonometric-functions": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-3.0.8.tgz", - "integrity": "sha512-zEzyGriPqoIYFgHJqWNy8bmoxjM4+ONyTap1ZzQK/Lll/VsCYvx0IckB33W/u89uLSVeeB8xC7uTrkoQ7ogKyQ==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-3.0.10.tgz", + "integrity": "sha512-G9G8moTc2wiad61nY5HfvxLiM/myX0aYK4s1x8MQlPH29WDPxHQM7ghGgvv2qf2xH+rrXhztOmjGHJj4jsEqXw==", "dev": true, "funding": [ { @@ -912,9 +940,9 @@ } ], "dependencies": { - "@csstools/css-calc": "^1.2.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1" + "@csstools/css-calc": "^1.2.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1" }, "engines": { "node": "^14 || ^16 || >=18" @@ -1422,9 +1450,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { @@ -1450,21 +1478,21 @@ } }, "node_modules/@mxssfd/typedoc-theme": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@mxssfd/typedoc-theme/-/typedoc-theme-1.1.3.tgz", - "integrity": "sha512-/yP5rqhvibMpzXpmw0YLLRCpoj3uVWWlwyJseZXzGxTfiA6/fd1uubUqNoQAi2U19atMDonq8mQc+hlVctrX4g==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@mxssfd/typedoc-theme/-/typedoc-theme-1.1.6.tgz", + "integrity": "sha512-XJglheU+MVRS3IFFGouBmwpE8R056L5d5EN2ZJkits3l+1x9IlWHxsq+vgzEmv+B2XOthZno/OADiyUpdDjYSA==", "dev": true, "engines": { "node": ">= 14" }, "peerDependencies": { - "typedoc": "^0.25.1" + "typedoc": "^0.26.2" } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", - "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.1.tgz", + "integrity": "sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==", "cpu": [ "arm" ], @@ -1475,9 +1503,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", - "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.1.tgz", + "integrity": "sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg==", "cpu": [ "arm64" ], @@ -1488,9 +1516,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", - "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.1.tgz", + "integrity": "sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ==", "cpu": [ "arm64" ], @@ -1501,9 +1529,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", - "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.1.tgz", + "integrity": "sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA==", "cpu": [ "x64" ], @@ -1514,9 +1542,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", - "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.1.tgz", + "integrity": "sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==", "cpu": [ "arm" ], @@ -1527,9 +1555,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", - "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.1.tgz", + "integrity": "sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==", "cpu": [ "arm" ], @@ -1540,9 +1568,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", - "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.1.tgz", + "integrity": "sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==", "cpu": [ "arm64" ], @@ -1553,9 +1581,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", - "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.1.tgz", + "integrity": "sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==", "cpu": [ "arm64" ], @@ -1566,9 +1594,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", - "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.1.tgz", + "integrity": "sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==", "cpu": [ "ppc64" ], @@ -1579,9 +1607,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", - "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.1.tgz", + "integrity": "sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==", "cpu": [ "riscv64" ], @@ -1592,9 +1620,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", - "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.1.tgz", + "integrity": "sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==", "cpu": [ "s390x" ], @@ -1605,9 +1633,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", - "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.1.tgz", + "integrity": "sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==", "cpu": [ "x64" ], @@ -1618,9 +1646,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", - "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.1.tgz", + "integrity": "sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==", "cpu": [ "x64" ], @@ -1631,9 +1659,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", - "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.1.tgz", + "integrity": "sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==", "cpu": [ "arm64" ], @@ -1644,9 +1672,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", - "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.1.tgz", + "integrity": "sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg==", "cpu": [ "ia32" ], @@ -1657,9 +1685,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.1.tgz", + "integrity": "sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw==", "cpu": [ "x64" ], @@ -1669,12 +1697,30 @@ "win32" ] }, + "node_modules/@shikijs/core": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.10.3.tgz", + "integrity": "sha512-D45PMaBaeDHxww+EkcDQtDAtzv00Gcsp72ukBtaLSmqRvh0WgGMq3Al0rl1QQBZfuneO75NXMIzEZGFitThWbg==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.4" + } + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", @@ -1697,10 +1743,16 @@ "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", "dev": true }, + "node_modules/@types/unist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==", + "dev": true + }, "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1709,12 +1761,6 @@ "node": ">=0.4.0" } }, - "node_modules/ansi-sequence-parser": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", - "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", - "dev": true - }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -1817,9 +1863,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", - "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", + "version": "4.23.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz", + "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==", "dev": true, "funding": [ { @@ -1836,10 +1882,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001629", - "electron-to-chromium": "^1.4.796", + "caniuse-lite": "^1.0.30001640", + "electron-to-chromium": "^1.4.820", "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.16" + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -1865,9 +1911,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001636", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", - "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", + "version": "1.0.30001640", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001640.tgz", + "integrity": "sha512-lA4VMpW0PSUrFnkmVuEKBUovSWKhj7puyCg8StBChgu298N1AtuF1sKWEvfDuimSEDbhlb/KqPKC3fs1HbuQUA==", "dev": true, "funding": [ { @@ -2033,9 +2079,9 @@ } }, "node_modules/cssdb": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-8.0.2.tgz", - "integrity": "sha512-zbOCmmbcHvr2lP+XrZSgftGMGumbosC6IM3dbxwifwPEBD70pVJaH3Ho191VBEqDg644AM7PPPVj0ZXokTjZng==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-8.1.0.tgz", + "integrity": "sha512-BQN57lfS4dYt2iL0LgyrlDbefZKEtUyrO8rbzrbGrqBk6OoyNTQLF+porY9DrpDBjLo4NEvj2IJttC7vf3x+Ew==", "dev": true, "funding": [ { @@ -2080,9 +2126,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.805", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.805.tgz", - "integrity": "sha512-8W4UJwX/w9T0QSzINJckTKG6CYpAUTqsaWcWIsdud3I1FYJcMgW9QqT1/4CBff/pP/TihWh13OmiyY8neto6vw==", + "version": "1.4.822", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.822.tgz", + "integrity": "sha512-qJzHIt4dRRFKjHHvaExCrG95F65kUP3xysaEZ4I2+/R/uIyr5Ar5g/rkAnrRz0parRUYwzpqN8Pz1HgoiYQPpg==", "dev": true }, "node_modules/entities": { @@ -2337,12 +2383,6 @@ "node": ">=12.0.0" } }, - "node_modules/jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", - "dev": true - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -2458,9 +2498,9 @@ "dev": true }, "node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -2575,9 +2615,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", "dev": true, "funding": [ { @@ -2595,7 +2635,7 @@ ], "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "source-map-js": "^1.2.0" }, "engines": { @@ -2643,9 +2683,9 @@ } }, "node_modules/postcss-color-functional-notation": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-6.0.11.tgz", - "integrity": "sha512-gJ+hAtAsgBF4w7eh28Pg7EA60lx7vE5xO/B/yZawaI6FYHky+5avA9YSe73nJHnAMEVFpCMeJc6Wts5g+niksg==", + "version": "6.0.14", + "resolved": "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-6.0.14.tgz", + "integrity": "sha512-dNUX+UH4dAozZ8uMHZ3CtCNYw8fyFAmqqdcyxMr7PEdM9jLXV19YscoYO0F25KqZYhmtWKQ+4tKrIZQrwzwg7A==", "dev": true, "funding": [ { @@ -2658,10 +2698,10 @@ } ], "dependencies": { - "@csstools/css-color-parser": "^2.0.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/css-color-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0" }, "engines": { @@ -2724,9 +2764,9 @@ } }, "node_modules/postcss-custom-media": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-10.0.6.tgz", - "integrity": "sha512-BjihQoIO4Wjqv9fQNExSJIim8UAmkhLxuJnhJsLTRFSba1y1MhxkJK5awsM//6JJ+/Tu5QUxf624RQAvKHv6SA==", + "version": "10.0.8", + "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-10.0.8.tgz", + "integrity": "sha512-V1KgPcmvlGdxTel4/CyQtBJEFhMVpEmRGFrnVtgfGIHj5PJX9vO36eFBxKBeJn+aCDTed70cc+98Mz3J/uVdGQ==", "dev": true, "funding": [ { @@ -2739,10 +2779,10 @@ } ], "dependencies": { - "@csstools/cascade-layer-name-parser": "^1.0.11", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/media-query-list-parser": "^2.1.11" + "@csstools/cascade-layer-name-parser": "^1.0.13", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/media-query-list-parser": "^2.1.13" }, "engines": { "node": "^14 || ^16 || >=18" @@ -2752,9 +2792,9 @@ } }, "node_modules/postcss-custom-properties": { - "version": "13.3.10", - "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-13.3.10.tgz", - "integrity": "sha512-ejaalIpl7p0k0L5ngIZ86AZGmp3m1KdeOCbSQTK4gQcB1ncaoPTHorw206+tsZRIhIDYvh5ZButEje6740YDXw==", + "version": "13.3.12", + "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-13.3.12.tgz", + "integrity": "sha512-oPn/OVqONB2ZLNqN185LDyaVByELAA/u3l2CS2TS16x2j2XsmV4kd8U49+TMxmUsEU9d8fB/I10E6U7kB0L1BA==", "dev": true, "funding": [ { @@ -2767,9 +2807,9 @@ } ], "dependencies": { - "@csstools/cascade-layer-name-parser": "^1.0.11", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", + "@csstools/cascade-layer-name-parser": "^1.0.13", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", "@csstools/utilities": "^1.0.0", "postcss-value-parser": "^4.2.0" }, @@ -2781,9 +2821,9 @@ } }, "node_modules/postcss-custom-selectors": { - "version": "7.1.10", - "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-7.1.10.tgz", - "integrity": "sha512-bV/6+IExyT2J4kMzX6c+ZMlN1xDfjcC4ePr1ywKezcTgwgUn11qQN3jdzFBpo8Dk1K7vO/OYOwMb5AtJP4JZcg==", + "version": "7.1.12", + "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-7.1.12.tgz", + "integrity": "sha512-ctIoprBMJwByYMGjXG0F7IT2iMF2hnamQ+aWZETyBM0aAlyaYdVZTeUkk8RB+9h9wP+NdN3f01lfvKl2ZSqC0g==", "dev": true, "funding": [ { @@ -2796,10 +2836,10 @@ } ], "dependencies": { - "@csstools/cascade-layer-name-parser": "^1.0.11", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "postcss-selector-parser": "^6.0.13" + "@csstools/cascade-layer-name-parser": "^1.0.13", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "postcss-selector-parser": "^6.1.0" }, "engines": { "node": "^14 || ^16 || >=18" @@ -2834,9 +2874,9 @@ } }, "node_modules/postcss-double-position-gradients": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/postcss-double-position-gradients/-/postcss-double-position-gradients-5.0.6.tgz", - "integrity": "sha512-QJ+089FKMaqDxOhhIHsJrh4IP7h4PIHNC5jZP5PMmnfUScNu8Hji2lskqpFWCvu+5sj+2EJFyzKd13sLEWOZmQ==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/postcss-double-position-gradients/-/postcss-double-position-gradients-5.0.7.tgz", + "integrity": "sha512-1xEhjV9u1s4l3iP5lRt1zvMjI/ya8492o9l/ivcxHhkO3nOz16moC4JpMxDUGrOs4R3hX+KWT7gKoV842cwRgg==", "dev": true, "funding": [ { @@ -2849,7 +2889,7 @@ } ], "dependencies": { - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0", "postcss-value-parser": "^4.2.0" }, @@ -2968,9 +3008,9 @@ } }, "node_modules/postcss-lab-function": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-6.0.16.tgz", - "integrity": "sha512-QWv0VxfjgIl8jBR/wuQcm/o31jn4P/LwzYuVKzNQoO5t7HPcU0d3RfWUiDrHN3frmSv+YYZppr3P81tKFTDyqg==", + "version": "6.0.19", + "resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-6.0.19.tgz", + "integrity": "sha512-vwln/mgvFrotJuGV8GFhpAOu9iGf3pvTBr6dLPDmUcqVD5OsQpEFyQMAFTxSxWXGEzBj6ld4pZ/9GDfEpXvo0g==", "dev": true, "funding": [ { @@ -2983,10 +3023,10 @@ } ], "dependencies": { - "@csstools/css-color-parser": "^2.0.2", - "@csstools/css-parser-algorithms": "^2.6.3", - "@csstools/css-tokenizer": "^2.3.1", - "@csstools/postcss-progressive-custom-properties": "^3.2.0", + "@csstools/css-color-parser": "^2.0.4", + "@csstools/css-parser-algorithms": "^2.7.1", + "@csstools/css-tokenizer": "^2.4.1", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", "@csstools/utilities": "^1.0.0" }, "engines": { @@ -3130,9 +3170,9 @@ } }, "node_modules/postcss-preset-env": { - "version": "9.5.14", - "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-9.5.14.tgz", - "integrity": "sha512-gTMi+3kENN/mN+K59aR+vEOjlkujTmmXJcM9rnAqGh9Y/euQ/ypdp9rd8mO1eoIjAD8vNS15+xbkBxoi+65BqQ==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-9.6.0.tgz", + "integrity": "sha512-Lxfk4RYjUdwPCYkc321QMdgtdCP34AeI94z+/8kVmqnTIlD4bMRQeGcMZgwz8BxHrzQiFXYIR5d7k/9JMs2MEA==", "dev": true, "funding": [ { @@ -3146,56 +3186,57 @@ ], "dependencies": { "@csstools/postcss-cascade-layers": "^4.0.6", - "@csstools/postcss-color-function": "^3.0.16", - "@csstools/postcss-color-mix-function": "^2.0.16", - "@csstools/postcss-exponential-functions": "^1.0.7", + "@csstools/postcss-color-function": "^3.0.19", + "@csstools/postcss-color-mix-function": "^2.0.19", + "@csstools/postcss-content-alt-text": "^1.0.0", + "@csstools/postcss-exponential-functions": "^1.0.9", "@csstools/postcss-font-format-keywords": "^3.0.2", - "@csstools/postcss-gamut-mapping": "^1.0.9", - "@csstools/postcss-gradients-interpolation-method": "^4.0.17", - "@csstools/postcss-hwb-function": "^3.0.15", - "@csstools/postcss-ic-unit": "^3.0.6", + "@csstools/postcss-gamut-mapping": "^1.0.11", + "@csstools/postcss-gradients-interpolation-method": "^4.0.20", + "@csstools/postcss-hwb-function": "^3.0.18", + "@csstools/postcss-ic-unit": "^3.0.7", "@csstools/postcss-initial": "^1.0.1", "@csstools/postcss-is-pseudo-class": "^4.0.8", - "@csstools/postcss-light-dark-function": "^1.0.5", + "@csstools/postcss-light-dark-function": "^1.0.8", "@csstools/postcss-logical-float-and-clear": "^2.0.1", "@csstools/postcss-logical-overflow": "^1.0.1", "@csstools/postcss-logical-overscroll-behavior": "^1.0.1", "@csstools/postcss-logical-resize": "^2.0.1", - "@csstools/postcss-logical-viewport-units": "^2.0.9", - "@csstools/postcss-media-minmax": "^1.1.6", - "@csstools/postcss-media-queries-aspect-ratio-number-values": "^2.0.9", + "@csstools/postcss-logical-viewport-units": "^2.0.11", + "@csstools/postcss-media-minmax": "^1.1.8", + "@csstools/postcss-media-queries-aspect-ratio-number-values": "^2.0.11", "@csstools/postcss-nested-calc": "^3.0.2", "@csstools/postcss-normalize-display-values": "^3.0.2", - "@csstools/postcss-oklab-function": "^3.0.16", - "@csstools/postcss-progressive-custom-properties": "^3.2.0", - "@csstools/postcss-relative-color-syntax": "^2.0.16", + "@csstools/postcss-oklab-function": "^3.0.19", + "@csstools/postcss-progressive-custom-properties": "^3.3.0", + "@csstools/postcss-relative-color-syntax": "^2.0.19", "@csstools/postcss-scope-pseudo-class": "^3.0.1", - "@csstools/postcss-stepped-value-functions": "^3.0.8", - "@csstools/postcss-text-decoration-shorthand": "^3.0.6", - "@csstools/postcss-trigonometric-functions": "^3.0.8", + "@csstools/postcss-stepped-value-functions": "^3.0.10", + "@csstools/postcss-text-decoration-shorthand": "^3.0.7", + "@csstools/postcss-trigonometric-functions": "^3.0.10", "@csstools/postcss-unset-value": "^3.0.1", "autoprefixer": "^10.4.19", - "browserslist": "^4.22.3", + "browserslist": "^4.23.1", "css-blank-pseudo": "^6.0.2", "css-has-pseudo": "^6.0.5", "css-prefers-color-scheme": "^9.0.1", - "cssdb": "^8.0.0", + "cssdb": "^8.1.0", "postcss-attribute-case-insensitive": "^6.0.3", "postcss-clamp": "^4.1.0", - "postcss-color-functional-notation": "^6.0.11", + "postcss-color-functional-notation": "^6.0.14", "postcss-color-hex-alpha": "^9.0.4", "postcss-color-rebeccapurple": "^9.0.3", - "postcss-custom-media": "^10.0.6", - "postcss-custom-properties": "^13.3.10", - "postcss-custom-selectors": "^7.1.10", + "postcss-custom-media": "^10.0.8", + "postcss-custom-properties": "^13.3.12", + "postcss-custom-selectors": "^7.1.12", "postcss-dir-pseudo-class": "^8.0.1", - "postcss-double-position-gradients": "^5.0.6", + "postcss-double-position-gradients": "^5.0.7", "postcss-focus-visible": "^9.0.1", "postcss-focus-within": "^8.0.1", "postcss-font-variant": "^5.0.0", "postcss-gap-properties": "^5.0.1", "postcss-image-set-function": "^6.0.3", - "postcss-lab-function": "^6.0.16", + "postcss-lab-function": "^6.0.19", "postcss-logical": "^7.0.1", "postcss-nesting": "^12.1.5", "postcss-opacity-percentage": "^2.0.0", @@ -3331,9 +3372,9 @@ } }, "node_modules/rollup": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", - "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.1.tgz", + "integrity": "sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -3346,29 +3387,29 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", + "@rollup/rollup-android-arm-eabi": "4.18.1", + "@rollup/rollup-android-arm64": "4.18.1", + "@rollup/rollup-darwin-arm64": "4.18.1", + "@rollup/rollup-darwin-x64": "4.18.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.1", + "@rollup/rollup-linux-arm-musleabihf": "4.18.1", + "@rollup/rollup-linux-arm64-gnu": "4.18.1", + "@rollup/rollup-linux-arm64-musl": "4.18.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.1", + "@rollup/rollup-linux-riscv64-gnu": "4.18.1", + "@rollup/rollup-linux-s390x-gnu": "4.18.1", + "@rollup/rollup-linux-x64-gnu": "4.18.1", + "@rollup/rollup-linux-x64-musl": "4.18.1", + "@rollup/rollup-win32-arm64-msvc": "4.18.1", + "@rollup/rollup-win32-ia32-msvc": "4.18.1", + "@rollup/rollup-win32-x64-msvc": "4.18.1", "fsevents": "~2.3.2" } }, "node_modules/sass": { - "version": "1.77.6", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", - "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", + "version": "1.77.7", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.7.tgz", + "integrity": "sha512-9ywH75cO+rLjbrZ6en3Gp8qAMwPGBapFtlsMJoDTkcMU/bSe5a6cjKVUn5Jr4Gzg5GbP3HE8cm+02pLCgcoMow==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -3383,15 +3424,13 @@ } }, "node_modules/shiki": { - "version": "0.14.7", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", - "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.10.3.tgz", + "integrity": "sha512-eneCLncGuvPdTutJuLyUGS8QNPAVFO5Trvld2wgEq1e002mwctAhJKeMGWtWVXOIEzmlcLRqcgPSorR6AVzOmQ==", "dev": true, "dependencies": { - "ansi-sequence-parser": "^1.1.0", - "jsonc-parser": "^3.2.0", - "vscode-oniguruma": "^1.7.0", - "vscode-textmate": "^8.0.0" + "@shikijs/core": "1.10.3", + "@types/hast": "^3.0.4" } }, "node_modules/showdown": { @@ -3509,30 +3548,31 @@ "dev": true }, "node_modules/typedoc": { - "version": "0.25.13", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.13.tgz", - "integrity": "sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==", + "version": "0.26.3", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.3.tgz", + "integrity": "sha512-6d2Sw9disvvpdk4K7VNjKr5/3hzijtfQVHRthhDqJgnhMHy1wQz4yPMJVKXElvnZhFr0nkzo+GzjXDTRV5yLpg==", "dev": true, "dependencies": { "lunr": "^2.3.9", - "marked": "^4.3.0", - "minimatch": "^9.0.3", - "shiki": "^0.14.7" + "markdown-it": "^14.1.0", + "minimatch": "^9.0.5", + "shiki": "^1.9.1", + "yaml": "^2.4.5" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { - "node": ">= 16" + "node": ">= 18" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x" } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true, "peer": true, "bin": { @@ -3565,9 +3605,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", - "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "dev": true, "funding": [ { @@ -3601,13 +3641,13 @@ "dev": true }, "node_modules/vite": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz", - "integrity": "sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.3.tgz", + "integrity": "sha512-NPQdeCU0Dv2z5fu+ULotpuq5yfCS1BzKUIPhNbP3YBfAMGJXbt2nS+sbTFu+qchaqWTD+H3JK++nRwr6XIcp6A==", "dev": true, "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.38", + "postcss": "^8.4.39", "rollup": "^4.13.0" }, "bin": { @@ -3673,23 +3713,23 @@ "vite": ">=2.0.0" } }, - "node_modules/vscode-oniguruma": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", - "dev": true - }, - "node_modules/vscode-textmate": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", - "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", - "dev": true - }, "node_modules/xmlcreate": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", "dev": true + }, + "node_modules/yaml": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", + "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } } } } diff --git a/package.json b/package.json index 8a9a588..fd42b35 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ui-lib", "private": true, - "version": "1.0.6", + "version": "1.0.7", "type": "module", "files": [ "dist" @@ -28,14 +28,14 @@ "jsdoc-date": "jsdoc -c jsdoc-date.json" }, "devDependencies": { - "@mxssfd/typedoc-theme": "^1.1.3", + "@mxssfd/typedoc-theme": "^1.1.6", "clean-jsdoc-theme": "^4.3.0", "docdash": "^2.0.2", "jsdoc": "^4.0.3", - "postcss-preset-env": "^9.5.14", - "sass": "^1.77.6", - "typedoc": "^0.25.13", - "vite": "^5.3.1", + "postcss-preset-env": "^9.6.0", + "sass": "^1.77.7", + "typedoc": "^0.26.3", + "vite": "^5.3.3", "vite-plugin-externals": "^0.6.2" } }