web-mojo 2.2.18 → 2.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin.cjs.js +1 -1
- package/dist/admin.cjs.js.map +1 -1
- package/dist/admin.es.js +108 -19
- package/dist/admin.es.js.map +1 -1
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.es.js +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +1 -1
- package/dist/chunks/{ChatView-BdRd1iSt.js → ChatView-C8J_kZZC.js} +70 -46
- package/dist/chunks/ChatView-C8J_kZZC.js.map +1 -0
- package/dist/chunks/ChatView-CDFsDm15.js +2 -0
- package/dist/chunks/ChatView-CDFsDm15.js.map +1 -0
- package/dist/chunks/{Collection-sSP1JF8d.js → Collection-zmb3xHhH.js} +2 -2
- package/dist/chunks/{Collection-sSP1JF8d.js.map → Collection-zmb3xHhH.js.map} +1 -1
- package/dist/chunks/ContextMenu-BHxY9KIb.js +3 -0
- package/dist/chunks/ContextMenu-BHxY9KIb.js.map +1 -0
- package/dist/chunks/{ContextMenu-C9qnhdFg.js → ContextMenu-LPGlaOZ5.js} +3 -2
- package/dist/chunks/ContextMenu-LPGlaOZ5.js.map +1 -0
- package/dist/chunks/{ListView-0fx1T87y.js → ListView-BBZw7GUS.js} +2 -2
- package/dist/chunks/{ListView-0fx1T87y.js.map → ListView-BBZw7GUS.js.map} +1 -1
- package/dist/chunks/{TokenManager-DhnHDZlt.js → TokenManager-B5wXvBZd.js} +2 -2
- package/dist/chunks/{TokenManager-DhnHDZlt.js.map → TokenManager-B5wXvBZd.js.map} +1 -1
- package/dist/chunks/{TokenManager-BPJHPKPk.js → TokenManager-zfkM5o1u.js} +3 -3
- package/dist/chunks/{TokenManager-BPJHPKPk.js.map → TokenManager-zfkM5o1u.js.map} +1 -1
- package/dist/chunks/{version-DBGAt8po.js → version-BgmfUPIs.js} +2 -2
- package/dist/chunks/{version-DBGAt8po.js.map → version-BgmfUPIs.js.map} +1 -1
- package/dist/chunks/{version-WosnMiWn.js → version-eR5sdxoe.js} +4 -4
- package/dist/chunks/{version-WosnMiWn.js.map → version-eR5sdxoe.js.map} +1 -1
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.es.js +4 -4
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +45 -44
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.es.js +1 -1
- package/dist/map.es.js +1 -1
- package/dist/timeline.es.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/ChatView-BJbSvaqi.js +0 -2
- package/dist/chunks/ChatView-BJbSvaqi.js.map +0 -1
- package/dist/chunks/ChatView-BdRd1iSt.js.map +0 -1
- package/dist/chunks/ContextMenu-C9qnhdFg.js.map +0 -1
- package/dist/chunks/ContextMenu-NNHmt1iq.js +0 -3
- package/dist/chunks/ContextMenu-NNHmt1iq.js.map +0 -1
package/dist/auth.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./chunks/version-DBGAt8po.js");function s({baseURL:e,fetchImpl:s=("undefined"!=typeof fetch?fetch.bind(window):null),storage:t=("undefined"!=typeof localStorage?localStorage:null),endpoints:n={}}={}){if(!e)throw new Error("createAuthClient: baseURL is required");if(!s)throw new Error("createAuthClient: fetch implementation is not available in this environment");if(!t)throw new Error("createAuthClient: storage (localStorage) is not available in this environment");const o="access_token",r="refresh_token",a="user",i={login:"/login",forgot:"/auth/forgot",resetCode:"/auth/password/reset/code",resetToken:"/auth/password/reset/token",...n};async function l(t,n){const o=await s(`${e}${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n||{})});let r={};try{r=await o.json()}catch(a){}if(!o.ok)throw r||{message:`Request failed with status ${o.status}`};return r}function d(e){return e&&e.data&&e.data.data||e&&e.data||e}function c(e){const s=d(e);if(!s||!s.access_token)throw new Error("No access_token in response.");t.setItem(o,s.access_token),s.refresh_token&&t.setItem(r,s.refresh_token),s.user&&t.setItem(a,JSON.stringify(s.user))}return{async login(e,s){const t=await l(i.login,{username:e,password:s});return c(t),d(t)},forgot:async({email:e,method:s})=>l(i.forgot,{email:e,method:s}),async resetWithCode({email:e,code:s,newPassword:t}){const n=await l(i.resetCode,{email:e,code:s,new_password:t});return c(n),d(n)},async resetWithToken({token:e,newPassword:s}){const t=await l(i.resetToken,{token:e,new_password:s});return c(t),d(t)},logout(){t.removeItem(o),t.removeItem(r),t.removeItem(a)},isAuthenticated:()=>!!t.getItem(o),getToken:()=>t.getItem(o),getUser(){const e=t.getItem(a);try{return e?JSON.parse(e):null}catch{return null}},getAuthHeader(){const e=t.getItem(o);return e?`Bearer ${e}`:null},getErrorMessage:function(e){return e?.message||e?.error||Array.isArray(e?.errors)&&e.errors[0]?.message||"An error occurred. Please try again."},parseResponse:d}}function t(e,t={}){if(!(e&&e instanceof Element))throw new Error("mountAuth: container must be a DOM Element");const{baseURL:n,onSuccessRedirect:o,allowRedirectOrigins:r,branding:a={},theme:i,endpoints:l,providers:d,texts:c={}}=t;if(!n)throw new Error("mountAuth: baseURL is required");const u=new URLSearchParams(window.location.search),m=u.get("redirect")||u.get("next")||u.get("returnTo"),p=String(o||m||"/");function g(){!function(e){if(!r||0===r.length)return!0;try{const s=new URL(e,window.location.origin);return r.includes(s.origin)}catch{return!1}}(p)?window.location.href="/":window.location.href=p.startsWith("http")?p:new URL(p,window.location.origin).href}const w=s({baseURL:n,endpoints:l}),b=a.title||"Sign In",f=a.subtitle||"Sign in to your account",h=a.logoUrl||"",y={emailOrUsername:c.emailOrUsername||"Email or Username",password:c.password||"Password",signIn:c.signIn||"Sign In",forgotPassword:c.forgotPassword||"Forgot password?",resetYourPassword:c.resetYourPassword||"Reset Your Password",emailAddress:c.emailAddress||"Email Address",resetMethod:c.resetMethod||"Reset Method",emailCode:c.emailCode||"Email me a code",emailLink:c.emailLink||"Email me a magic link",sendReset:c.sendReset||"Send Reset",back:c.back||"Back",enterResetCode:c.enterResetCode||"Enter Reset Code",weSentCodeTo:c.weSentCodeTo||"We sent a code to",resetCode:c.resetCode||"Reset Code",newPassword:c.newPassword||"New Password",confirmPassword:c.confirmPassword||"Confirm Password",resetPassword:c.resetPassword||"Reset Password",setYourNewPassword:c.setYourNewPassword||"Set Your New Password",setPassword:c.setPassword||"Set Password",invalidCredentials:c.invalidCredentials||"Invalid credentials.",successRedirecting:c.successRedirecting||"Success! Redirecting...",pleaseFillAllFields:c.pleaseFillAllFields||"Please fill in all fields.",passwordsDoNotMatch:c.passwordsDoNotMatch||"Passwords do not match."},v=`\n <div class="auth-container">\n <div class="auth-card">\n <div class="auth-header">\n ${h?`<img src="${h}" alt="${b}" style="max-height:60px;margin-bottom:10px" />`:""}\n <h1 class="auth-title">${b}</h1>\n <p class="auth-subtitle">${f}</p>\n </div>\n\n <div id="status-message" class="alert" role="status" style="display:none;"></div>\n\n \x3c!-- Sign In View --\x3e\n <div id="view-signin" class="auth-view">\n <form id="form-signin" novalidate>\n <div class="mb-3">\n <label for="signin-username" class="form-label">${y.emailOrUsername}</label>\n <input type="text" class="form-control" id="signin-username" placeholder="${y.emailOrUsername}" autocomplete="username" required />\n </div>\n <div class="mb-3">\n <label for="signin-password" class="form-label">${y.password}</label>\n <input type="password" class="form-control" id="signin-password" placeholder="${y.password}" autocomplete="current-password" required />\n </div>\n <button type="submit" class="btn btn-primary w-100 mb-3" id="btn-signin">\n <span class="btn-text">${y.signIn}</span>\n <span class="btn-spinner spinner-border spinner-border-sm" style="display:none;"></span>\n </button>\n <div class="text-center">\n <a href="#" id="link-forgot" class="text-decoration-none">${y.forgotPassword}</a>\n </div>\n\n ${d&&(d.google||d.passkey)?`\n <div class="position-relative my-3">\n <hr class="text-muted" />\n <span class="position-absolute top-50 start-50 translate-middle bg-white px-3 text-muted small">OR</span>\n </div>\n <div class="d-grid gap-2">\n ${d.google?'<button type="button" class="btn btn-outline-primary" id="btn-google"><i class="bi bi-google me-2"></i>Continue with Google</button>':""}\n ${d.passkey?'<button type="button" class="btn btn-outline-secondary" id="btn-passkey"><i class="bi bi-fingerprint me-2"></i>Sign in with Passkey</button>':""}\n </div>\n `:""}\n </form>\n </div>\n\n \x3c!-- Forgot Password View --\x3e\n <div id="view-forgot" class="auth-view" style="display:none;">\n <button type="button" class="btn btn-link p-0 mb-3" id="btn-back-signin">\n <span aria-hidden="true">←</span> ${y.back}\n </button>\n <h2 class="h5 mb-3">${y.resetYourPassword}</h2>\n <form id="form-forgot" novalidate>\n <div class="mb-3">\n <label for="forgot-email" class="form-label">${y.emailAddress}</label>\n <input type="email" class="form-control" id="forgot-email" placeholder="${y.emailAddress}" autocomplete="email" required />\n </div>\n <div class="mb-3">\n <label class="form-label">${y.resetMethod}</label>\n <div class="form-check">\n <input class="form-check-input" type="radio" name="reset-method" id="method-code" value="code" checked />\n <label class="form-check-label" for="method-code">${y.emailCode}</label>\n </div>\n <div class="form-check">\n <input class="form-check-input" type="radio" name="reset-method" id="method-link" value="link" />\n <label class="form-check-label" for="method-link">${y.emailLink}</label>\n </div>\n </div>\n <button type="submit" class="btn btn-primary w-100" id="btn-forgot">\n <span class="btn-text">${y.sendReset}</span>\n <span class="btn-spinner spinner-border spinner-border-sm" style="display:none;"></span>\n </button>\n </form>\n </div>\n\n \x3c!-- Reset with Code View --\x3e\n <div id="view-reset-code" class="auth-view" style="display:none;">\n <button type="button" class="btn btn-link p-0 mb-3" id="btn-back-forgot">\n <span aria-hidden="true">←</span> ${y.back}\n </button>\n <h2 class="h5 mb-3">${y.enterResetCode}</h2>\n <p class="text-muted small mb-3">${y.weSentCodeTo} <strong id="reset-email-display"></strong></p>\n <form id="form-reset-code" novalidate>\n <div class="mb-3">\n <label for="reset-code" class="form-label">${y.resetCode}</label>\n <input type="text" class="form-control" id="reset-code" placeholder="${y.resetCode}" required />\n </div>\n <div class="mb-3">\n <label for="reset-password" class="form-label">${y.newPassword}</label>\n <input type="password" class="form-control" id="reset-password" placeholder="${y.newPassword}" autocomplete="new-password" required />\n </div>\n <div class="mb-3">\n <label for="reset-password-confirm" class="form-label">${y.confirmPassword}</label>\n <input type="password" class="form-control" id="reset-password-confirm" placeholder="${y.confirmPassword}" autocomplete="new-password" required />\n </div>\n <button type="submit" class="btn btn-primary w-100" id="btn-reset-code">\n <span class="btn-text">${y.resetPassword}</span>\n <span class="btn-spinner spinner-border spinner-border-sm" style="display:none;"></span>\n </button>\n </form>\n </div>\n\n \x3c!-- Set Password via Magic Link View --\x3e\n <div id="view-set-password" class="auth-view" style="display:none;">\n <h2 class="h5 mb-3">${y.setYourNewPassword}</h2>\n <form id="form-set-password" novalidate>\n <div class="mb-3">\n <label for="set-password" class="form-label">${y.newPassword}</label>\n <input type="password" class="form-control" id="set-password" placeholder="${y.newPassword}" autocomplete="new-password" required />\n </div>\n <div class="mb-3">\n <label for="set-password-confirm" class="form-label">${y.confirmPassword}</label>\n <input type="password" class="form-control" id="set-password-confirm" placeholder="${y.confirmPassword}" autocomplete="new-password" required />\n </div>\n <button type="submit" class="btn btn-primary w-100" id="btn-set-password">\n <span class="btn-text">${y.setPassword}</span>\n <span class="btn-spinner spinner-border spinner-border-sm" style="display:none;"></span>\n </button>\n </form>\n </div>\n </div>\n </div>\n `;e.innerHTML=v,i&&e.classList.add(String(i));const k={views:{signin:e.querySelector("#view-signin"),forgot:e.querySelector("#view-forgot"),resetCode:e.querySelector("#view-reset-code"),setPassword:e.querySelector("#view-set-password")},forms:{signin:e.querySelector("#form-signin"),forgot:e.querySelector("#form-forgot"),resetCode:e.querySelector("#form-reset-code"),setPassword:e.querySelector("#form-set-password")},buttons:{signin:e.querySelector("#btn-signin"),forgot:e.querySelector("#btn-forgot"),resetCode:e.querySelector("#btn-reset-code"),setPassword:e.querySelector("#btn-set-password"),backSignin:e.querySelector("#btn-back-signin"),backForgot:e.querySelector("#btn-back-forgot"),google:e.querySelector("#btn-google"),passkey:e.querySelector("#btn-passkey")},inputs:{signinUsername:e.querySelector("#signin-username"),signinPassword:e.querySelector("#signin-password"),forgotEmail:e.querySelector("#forgot-email"),resetCode:e.querySelector("#reset-code"),resetPassword:e.querySelector("#reset-password"),resetPasswordConfirm:e.querySelector("#reset-password-confirm"),setPassword:e.querySelector("#set-password"),setPasswordConfirm:e.querySelector("#set-password-confirm")},radios:{resetMethodCode:e.querySelector("#method-code"),resetMethodLink:e.querySelector("#method-link")},labels:{resetEmailDisplay:e.querySelector("#reset-email-display")},links:{forgot:e.querySelector("#link-forgot")},message:e.querySelector("#status-message")};function S(e){Object.entries(k.views).forEach(([s,t])=>{t&&(t.style.display=s===e?"block":"none")}),setTimeout(()=>{const s=k.views[e],t=s?.querySelector("h1, h2, .auth-title, .h5");if(t)t.setAttribute("tabindex","-1"),t.focus?.();else{const e=s?.querySelector("input, button");e?.focus?.()}},60)}function P(e,s="info"){const t=k.message;t&&(t.textContent=e,t.className=`alert alert-${s}`,t.style.display="block",t.setAttribute("role","danger"===s?"alert":"status"))}function C(){const e=k.message;e&&(e.style.display="none")}function E(e,s){if(!e)return;const t=e.querySelector(".btn-text"),n=e.querySelector(".btn-spinner");e.disabled=!!s,t&&(t.style.display=s?"none":"inline"),n&&(n.style.display=s?"inline-block":"none")}async function I(e){e?.preventDefault?.(),C();const s=k.inputs.signinUsername?.value?.trim(),t=k.inputs.signinPassword?.value;if(s&&t){E(k.buttons.signin,!0);try{await w.login(s,t),P(`${y.successRedirecting}`,"success"),setTimeout(g,350)}catch(n){P(w.getErrorMessage(n)||y.invalidCredentials,"danger"),E(k.buttons.signin,!1)}}else P("Please enter both username and password.","danger")}async function R(e){e?.preventDefault?.(),C();const s=k.inputs.forgotEmail?.value?.trim(),t=k.radios.resetMethodCode?.checked?"code":k.radios.resetMethodLink?.checked?"link":"code";if(s){E(k.buttons.forgot,!0);try{await w.forgot({email:s,method:t}),"code"===t?(sessionStorage.setItem("reset_email",s),sessionStorage.setItem("reset_method",t),k.labels.resetEmailDisplay&&(k.labels.resetEmailDisplay.textContent=s),S("resetCode"),P("Reset code sent! Check your email.","success")):P("Magic link sent! Check your email and click the link.","success")}catch(n){P(w.getErrorMessage(n)||"Something went wrong. Please try again.","danger")}finally{E(k.buttons.forgot,!1)}}else P("Please enter your email address.","danger")}async function q(e){e?.preventDefault?.(),C();const s=k.inputs.resetCode?.value?.trim(),t=k.inputs.resetPassword?.value,n=k.inputs.resetPasswordConfirm?.value,o=sessionStorage.getItem("reset_email");if(!o)return P("Session expired. Please restart the password reset process.","danger"),void S("forgot");if(s&&t)if(t===n){E(k.buttons.resetCode,!0);try{await w.resetWithCode({email:o,code:s,newPassword:t}),sessionStorage.removeItem("reset_email"),sessionStorage.removeItem("reset_method"),P(y.successRedirecting,"success"),setTimeout(g,350)}catch(r){P(w.getErrorMessage(r)||"Invalid code or code expired.","danger"),E(k.buttons.resetCode,!1)}}else P(y.passwordsDoNotMatch,"danger");else P(y.pleaseFillAllFields,"danger")}async function $(e){e?.preventDefault?.(),C();const s=k.inputs.setPassword?.value,t=k.inputs.setPasswordConfirm?.value,n=sessionStorage.getItem("login_token");if(!n)return P("Invalid or expired link. Please request a new one.","danger"),void S("forgot");if(s)if(s===t){E(k.buttons.setPassword,!0);try{await w.resetWithToken({token:n,newPassword:s}),sessionStorage.removeItem("login_token"),P(y.successRedirecting,"success"),setTimeout(g,350)}catch(o){P(w.getErrorMessage(o)||"Invalid or expired link.","danger"),E(k.buttons.setPassword,!1)}}else P(y.passwordsDoNotMatch,"danger");else P("Please enter a new password.","danger")}function x(e){e?.preventDefault?.(),C(),S("forgot")}function L(){C(),S("signin")}function _(){C(),S("forgot")}return k.forms.signin?.addEventListener("submit",I),k.forms.forgot?.addEventListener("submit",R),k.forms.resetCode?.addEventListener("submit",q),k.forms.setPassword?.addEventListener("submit",$),k.links.forgot?.addEventListener("click",x),k.buttons.backSignin?.addEventListener("click",L),k.buttons.backForgot?.addEventListener("click",_),d?.google&&k.buttons.google&&k.buttons.google.addEventListener("click",s=>{s?.preventDefault?.(),d.google.onClick?.({container:e,auth:w,redirect:g,showMessage:P})}),d?.passkey&&k.buttons.passkey&&k.buttons.passkey.addEventListener("click",s=>{s?.preventDefault?.(),d.passkey.onClick?.({container:e,auth:w,redirect:g,showMessage:P})}),function(){const e=new URLSearchParams(window.location.search),s=e.get("login_token");if(s){sessionStorage.setItem("login_token",s),e.delete("login_token");const t=e.toString()?`${window.location.pathname}?${e.toString()}`:window.location.pathname;return window.history.replaceState({},"",t),S("setPassword"),void P("Please set your new password.","info")}const t=sessionStorage.getItem("reset_email");if(t)return k.labels.resetEmailDisplay&&(k.labels.resetEmailDisplay.textContent=t),void S("resetCode");S("signin")}(),{destroy(){k.forms.signin?.removeEventListener("submit",I),k.forms.forgot?.removeEventListener("submit",R),k.forms.resetCode?.removeEventListener("submit",q),k.forms.setPassword?.removeEventListener("submit",$),k.links.forgot?.removeEventListener("click",x),k.buttons.backSignin?.removeEventListener("click",L),k.buttons.backForgot?.removeEventListener("click",_),d?.google&&k.buttons.google&&k.buttons.google.replaceWith(k.buttons.google.cloneNode(!0)),d?.passkey&&k.buttons.passkey&&k.buttons.passkey.replaceWith(k.buttons.passkey.cloneNode(!0)),e.innerHTML=""}}}const n={mountAuth:t,createAuthClient:s},o=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,createAuthClient:s,default:n,mountAuth:t},Symbol.toStringTag,{value:"Module"}));exports.BUILD_TIME=e.BUILD_TIME,exports.VERSION=e.VERSION,exports.VERSION_INFO=e.VERSION_INFO,exports.VERSION_MAJOR=e.VERSION_MAJOR,exports.VERSION_MINOR=e.VERSION_MINOR,exports.VERSION_REVISION=e.VERSION_REVISION,exports.createAuthClient=s,exports.default=o,exports.mountAuth=t;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./chunks/version-BgmfUPIs.js");function s({baseURL:e,fetchImpl:s=("undefined"!=typeof fetch?fetch.bind(window):null),storage:t=("undefined"!=typeof localStorage?localStorage:null),endpoints:n={}}={}){if(!e)throw new Error("createAuthClient: baseURL is required");if(!s)throw new Error("createAuthClient: fetch implementation is not available in this environment");if(!t)throw new Error("createAuthClient: storage (localStorage) is not available in this environment");const o="access_token",r="refresh_token",a="user",i={login:"/login",forgot:"/auth/forgot",resetCode:"/auth/password/reset/code",resetToken:"/auth/password/reset/token",...n};async function l(t,n){const o=await s(`${e}${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n||{})});let r={};try{r=await o.json()}catch(a){}if(!o.ok)throw r||{message:`Request failed with status ${o.status}`};return r}function d(e){return e&&e.data&&e.data.data||e&&e.data||e}function c(e){const s=d(e);if(!s||!s.access_token)throw new Error("No access_token in response.");t.setItem(o,s.access_token),s.refresh_token&&t.setItem(r,s.refresh_token),s.user&&t.setItem(a,JSON.stringify(s.user))}return{async login(e,s){const t=await l(i.login,{username:e,password:s});return c(t),d(t)},forgot:async({email:e,method:s})=>l(i.forgot,{email:e,method:s}),async resetWithCode({email:e,code:s,newPassword:t}){const n=await l(i.resetCode,{email:e,code:s,new_password:t});return c(n),d(n)},async resetWithToken({token:e,newPassword:s}){const t=await l(i.resetToken,{token:e,new_password:s});return c(t),d(t)},logout(){t.removeItem(o),t.removeItem(r),t.removeItem(a)},isAuthenticated:()=>!!t.getItem(o),getToken:()=>t.getItem(o),getUser(){const e=t.getItem(a);try{return e?JSON.parse(e):null}catch{return null}},getAuthHeader(){const e=t.getItem(o);return e?`Bearer ${e}`:null},getErrorMessage:function(e){return e?.message||e?.error||Array.isArray(e?.errors)&&e.errors[0]?.message||"An error occurred. Please try again."},parseResponse:d}}function t(e,t={}){if(!(e&&e instanceof Element))throw new Error("mountAuth: container must be a DOM Element");const{baseURL:n,onSuccessRedirect:o,allowRedirectOrigins:r,branding:a={},theme:i,endpoints:l,providers:d,texts:c={}}=t;if(!n)throw new Error("mountAuth: baseURL is required");const u=new URLSearchParams(window.location.search),m=u.get("redirect")||u.get("next")||u.get("returnTo"),p=String(o||m||"/");function g(){!function(e){if(!r||0===r.length)return!0;try{const s=new URL(e,window.location.origin);return r.includes(s.origin)}catch{return!1}}(p)?window.location.href="/":window.location.href=p.startsWith("http")?p:new URL(p,window.location.origin).href}const w=s({baseURL:n,endpoints:l}),b=a.title||"Sign In",f=a.subtitle||"Sign in to your account",h=a.logoUrl||"",y={emailOrUsername:c.emailOrUsername||"Email or Username",password:c.password||"Password",signIn:c.signIn||"Sign In",forgotPassword:c.forgotPassword||"Forgot password?",resetYourPassword:c.resetYourPassword||"Reset Your Password",emailAddress:c.emailAddress||"Email Address",resetMethod:c.resetMethod||"Reset Method",emailCode:c.emailCode||"Email me a code",emailLink:c.emailLink||"Email me a magic link",sendReset:c.sendReset||"Send Reset",back:c.back||"Back",enterResetCode:c.enterResetCode||"Enter Reset Code",weSentCodeTo:c.weSentCodeTo||"We sent a code to",resetCode:c.resetCode||"Reset Code",newPassword:c.newPassword||"New Password",confirmPassword:c.confirmPassword||"Confirm Password",resetPassword:c.resetPassword||"Reset Password",setYourNewPassword:c.setYourNewPassword||"Set Your New Password",setPassword:c.setPassword||"Set Password",invalidCredentials:c.invalidCredentials||"Invalid credentials.",successRedirecting:c.successRedirecting||"Success! Redirecting...",pleaseFillAllFields:c.pleaseFillAllFields||"Please fill in all fields.",passwordsDoNotMatch:c.passwordsDoNotMatch||"Passwords do not match."},v=`\n <div class="auth-container">\n <div class="auth-card">\n <div class="auth-header">\n ${h?`<img src="${h}" alt="${b}" style="max-height:60px;margin-bottom:10px" />`:""}\n <h1 class="auth-title">${b}</h1>\n <p class="auth-subtitle">${f}</p>\n </div>\n\n <div id="status-message" class="alert" role="status" style="display:none;"></div>\n\n \x3c!-- Sign In View --\x3e\n <div id="view-signin" class="auth-view">\n <form id="form-signin" novalidate>\n <div class="mb-3">\n <label for="signin-username" class="form-label">${y.emailOrUsername}</label>\n <input type="text" class="form-control" id="signin-username" placeholder="${y.emailOrUsername}" autocomplete="username" required />\n </div>\n <div class="mb-3">\n <label for="signin-password" class="form-label">${y.password}</label>\n <input type="password" class="form-control" id="signin-password" placeholder="${y.password}" autocomplete="current-password" required />\n </div>\n <button type="submit" class="btn btn-primary w-100 mb-3" id="btn-signin">\n <span class="btn-text">${y.signIn}</span>\n <span class="btn-spinner spinner-border spinner-border-sm" style="display:none;"></span>\n </button>\n <div class="text-center">\n <a href="#" id="link-forgot" class="text-decoration-none">${y.forgotPassword}</a>\n </div>\n\n ${d&&(d.google||d.passkey)?`\n <div class="position-relative my-3">\n <hr class="text-muted" />\n <span class="position-absolute top-50 start-50 translate-middle bg-white px-3 text-muted small">OR</span>\n </div>\n <div class="d-grid gap-2">\n ${d.google?'<button type="button" class="btn btn-outline-primary" id="btn-google"><i class="bi bi-google me-2"></i>Continue with Google</button>':""}\n ${d.passkey?'<button type="button" class="btn btn-outline-secondary" id="btn-passkey"><i class="bi bi-fingerprint me-2"></i>Sign in with Passkey</button>':""}\n </div>\n `:""}\n </form>\n </div>\n\n \x3c!-- Forgot Password View --\x3e\n <div id="view-forgot" class="auth-view" style="display:none;">\n <button type="button" class="btn btn-link p-0 mb-3" id="btn-back-signin">\n <span aria-hidden="true">←</span> ${y.back}\n </button>\n <h2 class="h5 mb-3">${y.resetYourPassword}</h2>\n <form id="form-forgot" novalidate>\n <div class="mb-3">\n <label for="forgot-email" class="form-label">${y.emailAddress}</label>\n <input type="email" class="form-control" id="forgot-email" placeholder="${y.emailAddress}" autocomplete="email" required />\n </div>\n <div class="mb-3">\n <label class="form-label">${y.resetMethod}</label>\n <div class="form-check">\n <input class="form-check-input" type="radio" name="reset-method" id="method-code" value="code" checked />\n <label class="form-check-label" for="method-code">${y.emailCode}</label>\n </div>\n <div class="form-check">\n <input class="form-check-input" type="radio" name="reset-method" id="method-link" value="link" />\n <label class="form-check-label" for="method-link">${y.emailLink}</label>\n </div>\n </div>\n <button type="submit" class="btn btn-primary w-100" id="btn-forgot">\n <span class="btn-text">${y.sendReset}</span>\n <span class="btn-spinner spinner-border spinner-border-sm" style="display:none;"></span>\n </button>\n </form>\n </div>\n\n \x3c!-- Reset with Code View --\x3e\n <div id="view-reset-code" class="auth-view" style="display:none;">\n <button type="button" class="btn btn-link p-0 mb-3" id="btn-back-forgot">\n <span aria-hidden="true">←</span> ${y.back}\n </button>\n <h2 class="h5 mb-3">${y.enterResetCode}</h2>\n <p class="text-muted small mb-3">${y.weSentCodeTo} <strong id="reset-email-display"></strong></p>\n <form id="form-reset-code" novalidate>\n <div class="mb-3">\n <label for="reset-code" class="form-label">${y.resetCode}</label>\n <input type="text" class="form-control" id="reset-code" placeholder="${y.resetCode}" required />\n </div>\n <div class="mb-3">\n <label for="reset-password" class="form-label">${y.newPassword}</label>\n <input type="password" class="form-control" id="reset-password" placeholder="${y.newPassword}" autocomplete="new-password" required />\n </div>\n <div class="mb-3">\n <label for="reset-password-confirm" class="form-label">${y.confirmPassword}</label>\n <input type="password" class="form-control" id="reset-password-confirm" placeholder="${y.confirmPassword}" autocomplete="new-password" required />\n </div>\n <button type="submit" class="btn btn-primary w-100" id="btn-reset-code">\n <span class="btn-text">${y.resetPassword}</span>\n <span class="btn-spinner spinner-border spinner-border-sm" style="display:none;"></span>\n </button>\n </form>\n </div>\n\n \x3c!-- Set Password via Magic Link View --\x3e\n <div id="view-set-password" class="auth-view" style="display:none;">\n <h2 class="h5 mb-3">${y.setYourNewPassword}</h2>\n <form id="form-set-password" novalidate>\n <div class="mb-3">\n <label for="set-password" class="form-label">${y.newPassword}</label>\n <input type="password" class="form-control" id="set-password" placeholder="${y.newPassword}" autocomplete="new-password" required />\n </div>\n <div class="mb-3">\n <label for="set-password-confirm" class="form-label">${y.confirmPassword}</label>\n <input type="password" class="form-control" id="set-password-confirm" placeholder="${y.confirmPassword}" autocomplete="new-password" required />\n </div>\n <button type="submit" class="btn btn-primary w-100" id="btn-set-password">\n <span class="btn-text">${y.setPassword}</span>\n <span class="btn-spinner spinner-border spinner-border-sm" style="display:none;"></span>\n </button>\n </form>\n </div>\n </div>\n </div>\n `;e.innerHTML=v,i&&e.classList.add(String(i));const k={views:{signin:e.querySelector("#view-signin"),forgot:e.querySelector("#view-forgot"),resetCode:e.querySelector("#view-reset-code"),setPassword:e.querySelector("#view-set-password")},forms:{signin:e.querySelector("#form-signin"),forgot:e.querySelector("#form-forgot"),resetCode:e.querySelector("#form-reset-code"),setPassword:e.querySelector("#form-set-password")},buttons:{signin:e.querySelector("#btn-signin"),forgot:e.querySelector("#btn-forgot"),resetCode:e.querySelector("#btn-reset-code"),setPassword:e.querySelector("#btn-set-password"),backSignin:e.querySelector("#btn-back-signin"),backForgot:e.querySelector("#btn-back-forgot"),google:e.querySelector("#btn-google"),passkey:e.querySelector("#btn-passkey")},inputs:{signinUsername:e.querySelector("#signin-username"),signinPassword:e.querySelector("#signin-password"),forgotEmail:e.querySelector("#forgot-email"),resetCode:e.querySelector("#reset-code"),resetPassword:e.querySelector("#reset-password"),resetPasswordConfirm:e.querySelector("#reset-password-confirm"),setPassword:e.querySelector("#set-password"),setPasswordConfirm:e.querySelector("#set-password-confirm")},radios:{resetMethodCode:e.querySelector("#method-code"),resetMethodLink:e.querySelector("#method-link")},labels:{resetEmailDisplay:e.querySelector("#reset-email-display")},links:{forgot:e.querySelector("#link-forgot")},message:e.querySelector("#status-message")};function S(e){Object.entries(k.views).forEach(([s,t])=>{t&&(t.style.display=s===e?"block":"none")}),setTimeout(()=>{const s=k.views[e],t=s?.querySelector("h1, h2, .auth-title, .h5");if(t)t.setAttribute("tabindex","-1"),t.focus?.();else{const e=s?.querySelector("input, button");e?.focus?.()}},60)}function P(e,s="info"){const t=k.message;t&&(t.textContent=e,t.className=`alert alert-${s}`,t.style.display="block",t.setAttribute("role","danger"===s?"alert":"status"))}function C(){const e=k.message;e&&(e.style.display="none")}function E(e,s){if(!e)return;const t=e.querySelector(".btn-text"),n=e.querySelector(".btn-spinner");e.disabled=!!s,t&&(t.style.display=s?"none":"inline"),n&&(n.style.display=s?"inline-block":"none")}async function I(e){e?.preventDefault?.(),C();const s=k.inputs.signinUsername?.value?.trim(),t=k.inputs.signinPassword?.value;if(s&&t){E(k.buttons.signin,!0);try{await w.login(s,t),P(`${y.successRedirecting}`,"success"),setTimeout(g,350)}catch(n){P(w.getErrorMessage(n)||y.invalidCredentials,"danger"),E(k.buttons.signin,!1)}}else P("Please enter both username and password.","danger")}async function R(e){e?.preventDefault?.(),C();const s=k.inputs.forgotEmail?.value?.trim(),t=k.radios.resetMethodCode?.checked?"code":k.radios.resetMethodLink?.checked?"link":"code";if(s){E(k.buttons.forgot,!0);try{await w.forgot({email:s,method:t}),"code"===t?(sessionStorage.setItem("reset_email",s),sessionStorage.setItem("reset_method",t),k.labels.resetEmailDisplay&&(k.labels.resetEmailDisplay.textContent=s),S("resetCode"),P("Reset code sent! Check your email.","success")):P("Magic link sent! Check your email and click the link.","success")}catch(n){P(w.getErrorMessage(n)||"Something went wrong. Please try again.","danger")}finally{E(k.buttons.forgot,!1)}}else P("Please enter your email address.","danger")}async function q(e){e?.preventDefault?.(),C();const s=k.inputs.resetCode?.value?.trim(),t=k.inputs.resetPassword?.value,n=k.inputs.resetPasswordConfirm?.value,o=sessionStorage.getItem("reset_email");if(!o)return P("Session expired. Please restart the password reset process.","danger"),void S("forgot");if(s&&t)if(t===n){E(k.buttons.resetCode,!0);try{await w.resetWithCode({email:o,code:s,newPassword:t}),sessionStorage.removeItem("reset_email"),sessionStorage.removeItem("reset_method"),P(y.successRedirecting,"success"),setTimeout(g,350)}catch(r){P(w.getErrorMessage(r)||"Invalid code or code expired.","danger"),E(k.buttons.resetCode,!1)}}else P(y.passwordsDoNotMatch,"danger");else P(y.pleaseFillAllFields,"danger")}async function $(e){e?.preventDefault?.(),C();const s=k.inputs.setPassword?.value,t=k.inputs.setPasswordConfirm?.value,n=sessionStorage.getItem("login_token");if(!n)return P("Invalid or expired link. Please request a new one.","danger"),void S("forgot");if(s)if(s===t){E(k.buttons.setPassword,!0);try{await w.resetWithToken({token:n,newPassword:s}),sessionStorage.removeItem("login_token"),P(y.successRedirecting,"success"),setTimeout(g,350)}catch(o){P(w.getErrorMessage(o)||"Invalid or expired link.","danger"),E(k.buttons.setPassword,!1)}}else P(y.passwordsDoNotMatch,"danger");else P("Please enter a new password.","danger")}function x(e){e?.preventDefault?.(),C(),S("forgot")}function L(){C(),S("signin")}function _(){C(),S("forgot")}return k.forms.signin?.addEventListener("submit",I),k.forms.forgot?.addEventListener("submit",R),k.forms.resetCode?.addEventListener("submit",q),k.forms.setPassword?.addEventListener("submit",$),k.links.forgot?.addEventListener("click",x),k.buttons.backSignin?.addEventListener("click",L),k.buttons.backForgot?.addEventListener("click",_),d?.google&&k.buttons.google&&k.buttons.google.addEventListener("click",s=>{s?.preventDefault?.(),d.google.onClick?.({container:e,auth:w,redirect:g,showMessage:P})}),d?.passkey&&k.buttons.passkey&&k.buttons.passkey.addEventListener("click",s=>{s?.preventDefault?.(),d.passkey.onClick?.({container:e,auth:w,redirect:g,showMessage:P})}),function(){const e=new URLSearchParams(window.location.search),s=e.get("login_token");if(s){sessionStorage.setItem("login_token",s),e.delete("login_token");const t=e.toString()?`${window.location.pathname}?${e.toString()}`:window.location.pathname;return window.history.replaceState({},"",t),S("setPassword"),void P("Please set your new password.","info")}const t=sessionStorage.getItem("reset_email");if(t)return k.labels.resetEmailDisplay&&(k.labels.resetEmailDisplay.textContent=t),void S("resetCode");S("signin")}(),{destroy(){k.forms.signin?.removeEventListener("submit",I),k.forms.forgot?.removeEventListener("submit",R),k.forms.resetCode?.removeEventListener("submit",q),k.forms.setPassword?.removeEventListener("submit",$),k.links.forgot?.removeEventListener("click",x),k.buttons.backSignin?.removeEventListener("click",L),k.buttons.backForgot?.removeEventListener("click",_),d?.google&&k.buttons.google&&k.buttons.google.replaceWith(k.buttons.google.cloneNode(!0)),d?.passkey&&k.buttons.passkey&&k.buttons.passkey.replaceWith(k.buttons.passkey.cloneNode(!0)),e.innerHTML=""}}}const n={mountAuth:t,createAuthClient:s},o=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,createAuthClient:s,default:n,mountAuth:t},Symbol.toStringTag,{value:"Module"}));exports.BUILD_TIME=e.BUILD_TIME,exports.VERSION=e.VERSION,exports.VERSION_INFO=e.VERSION_INFO,exports.VERSION_MAJOR=e.VERSION_MAJOR,exports.VERSION_MINOR=e.VERSION_MINOR,exports.VERSION_REVISION=e.VERSION_REVISION,exports.createAuthClient=s,exports.default=o,exports.mountAuth=t;
|
|
2
2
|
//# sourceMappingURL=auth.cjs.js.map
|
package/dist/auth.es.js
CHANGED
package/dist/charts.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./chunks/MetricsMiniChartWidget-CMplnXWP.js"),e=require("./chunks/Rest-P-KCJpjB.js"),s=require("./chunks/Dialog-Bib7iGr7.js"),i=require("./chunks/version-DBGAt8po.js");class CircularProgress extends e.View{constructor(t={}){super({className:`circular-progress ${t.className||""}`,...t}),this.SIZE_PRESETS={xs:40,sm:60,md:80,lg:120,xl:180},this.STROKE_PRESETS={xs:4,sm:6,md:8,lg:12,xl:16},this.value=void 0!==t.value?t.value:0,this.min=void 0!==t.min?t.min:0,this.max=void 0!==t.max?t.max:100,this.sizePreset="string"==typeof t.size&&this.SIZE_PRESETS[t.size]?t.size:null,this.size=this.resolveSize(void 0!==t.size?t.size:"md"),this.strokeWidth="auto"===t.strokeWidth||void 0===t.strokeWidth?this.getAutoStrokeWidth(t.size):t.strokeWidth,this.theme=t.theme||"basic",this.variant=t.variant||"default",this.color=t.color,this.trackColor=t.trackColor,this.textColor=t.textColor,this.gradientColors=t.gradientColors||null,this.applyTheme(),this.applyVariant(),this.rotation=void 0!==t.rotation?t.rotation:-90,this.gap=t.gap||0,this.showValue=!1!==t.showValue,this.valueFormat=t.valueFormat||"percentage",this.valueFormatter=t.valueFormatter||null,this.label=t.label||null,this.labelHtml=t.labelHtml||null,this.icon=t.icon||null,this.animate=!1!==t.animate,this.animationDuration=t.animationDuration||600,this.animationEasing=t.animationEasing||"ease-out",this.rounded=!1!==t.rounded,this.shadow=t.shadow||!1,this.clickable=t.clickable||!1,this.tooltip=t.tooltip||null,this.tooltipPlacement=t.tooltipPlacement||"top",this.segments=t.segments||null,this.segmentGap=t.segmentGap||2,this.dataFormatter=e.dataFormatter,this.svg=null,this.centerElement=null,this.popover=null,this.gradientId=`gradient-${Math.random().toString(36).substr(2,9)}`}resolveSize(t){return"string"==typeof t&&this.SIZE_PRESETS[t]?this.SIZE_PRESETS[t]:"number"==typeof t?t:this.SIZE_PRESETS.md}getAutoStrokeWidth(t){if("string"==typeof t&&this.STROKE_PRESETS[t])return this.STROKE_PRESETS[t];const e=this.resolveSize(t);return e<=40?4:e<=60?6:e<=80?8:e<=120?12:16}applyTheme(){const t={basic:{trackColor:"#e9ecef",textColor:null,backgroundColor:null},shadowed:{trackColor:"#d1d5db",textColor:null,backgroundColor:null,shadow:!0},dark:{trackColor:"#374151",textColor:"#e5e7eb",backgroundColor:"#1f2937"},light:{trackColor:"#f3f4f6",textColor:"#111827",backgroundColor:"#ffffff"}},e=t[this.theme]||t.basic;this.trackColor||(this.trackColor=e.trackColor),!this.textColor&&e.textColor&&(this.textColor=e.textColor),e.shadow&&!1===this.shadow&&(this.shadow=e.shadow)}applyVariant(){const t={success:{color:"#198754",trackColor:"rgba(25, 135, 84, 0.1)"},danger:{color:"#dc3545",trackColor:"rgba(220, 53, 69, 0.1)"},warning:{color:"#ffc107",trackColor:"rgba(255, 193, 7, 0.1)"},info:{color:"#0dcaf0",trackColor:"rgba(13, 202, 240, 0.1)"},default:{color:"#0d6efd"}};if(t[this.variant]){const e=t[this.variant];this.color||(this.color=e.color),e.trackColor&&this.trackColor===this.applyTheme.trackColor&&(this.trackColor=e.trackColor)}this.color||(this.color="#0d6efd")}getTemplate(){const t=this.sizePreset?`circular-progress-${this.sizePreset}`:"",e="default"!==this.variant?`circular-progress-${this.variant}`:"",s="basic"!==this.theme?`circular-progress-theme-${this.theme}`:"",i=this.clickable?"circular-progress-clickable":"",r=this.shadow?"circular-progress-shadow":"",o=this.textColor?`color: ${this.textColor};`:"";return`\n <div class="circular-progress-container ${t} ${e} ${s} ${i} ${r}"\n style="width: ${this.size}px; height: ${this.size}px;">\n <svg class="circular-progress-svg" \n width="${this.size}" \n height="${this.size}"\n viewBox="0 0 ${this.size} ${this.size}">\n </svg>\n <div class="circular-progress-center" style="${o}">\n <div class="circular-progress-content"></div>\n </div>\n </div>\n `}async onAfterRender(){this.svg=this.element.querySelector(".circular-progress-svg"),this.centerElement=this.element.querySelector(".circular-progress-content"),this.containerElement=this.element.querySelector(".circular-progress-container"),this.renderProgress(),this.renderCenterContent(),this.clickable&&this.setupClickHandler(),this.tooltip&&this.clickable&&this.setupTooltip()}renderProgress(){if(!this.svg)return;this.svg.innerHTML="";const t=this.size/2,e=(this.size-this.strokeWidth)/2,s=2*Math.PI*e;this.gradientColors&&this.gradientColors.length>1&&this.createGradient(),this.segments&&Array.isArray(this.segments)&&this.segments.length>0?this.renderSegments(t,e,s):this.renderSingleProgress(t,e,s)}renderSingleProgress(t,e,s){const i=(this.gap>0?360-this.gap:360)/360*s,r=this.createCircle(t,e,{stroke:this.trackColor,strokeWidth:this.strokeWidth,fill:"none",strokeLinecap:this.rounded?"round":"butt",strokeDasharray:this.gap>0?`${i} ${s}`:"none",transform:`rotate(${this.rotation} ${t} ${t})`});this.svg.appendChild(r);const o=i-this.getPercentage()/100*i,a=this.gradientColors?`url(#${this.gradientId})`:this.color,n=this.createCircle(t,e,{stroke:a,strokeWidth:this.strokeWidth,fill:"none",strokeLinecap:this.rounded?"round":"butt",strokeDasharray:`${i} ${s}`,strokeDashoffset:this.animate?i:o,transform:`rotate(${this.rotation} ${t} ${t})`,class:"circular-progress-bar"});this.svg.appendChild(n),this.animate&&this.animateProgress(n,o)}renderSegments(t,e,s){const i=(this.gap>0?360-this.gap:360)/360*s,r=this.createCircle(t,e,{stroke:this.trackColor,strokeWidth:this.strokeWidth,fill:"none",strokeLinecap:this.rounded?"round":"butt",strokeDasharray:this.gap>0?`${i} ${s}`:"none",transform:`rotate(${this.rotation} ${t} ${t})`});this.svg.appendChild(r),this.segments.reduce((t,e)=>t+(e.value||0),0)>this.max&&console.warn("CircularProgress: Segment total exceeds max value. Clamping to max.");let o=0;this.segments.forEach((r,a)=>{const n=(r.value||0)/(this.max-this.min)*100/100*i,h=this.segmentGap/360*s;if(n>0){const l=this.createCircle(t,e,{stroke:r.color||this.color,strokeWidth:this.strokeWidth,fill:"none",strokeLinecap:this.rounded?"round":"butt",strokeDasharray:`${n} ${s}`,strokeDashoffset:this.animate?i:-o,transform:`rotate(${this.rotation} ${t} ${t})`,class:`circular-progress-segment circular-progress-segment-${a}`,"data-segment-index":a});this.svg.appendChild(l),this.animate&&this.animateProgress(l,-o,100*a),o+=n+h}})}createCircle(t,e,s={}){const i=document.createElementNS("http://www.w3.org/2000/svg","circle");return i.setAttribute("cx",t),i.setAttribute("cy",t),i.setAttribute("r",e),Object.entries(s).forEach(([t,e])=>{"strokeWidth"===t?i.setAttribute("stroke-width",e):"strokeLinecap"===t?i.setAttribute("stroke-linecap",e):"strokeDasharray"===t?i.setAttribute("stroke-dasharray",e):"strokeDashoffset"===t?i.setAttribute("stroke-dashoffset",e):i.setAttribute(t,e)}),i}createGradient(){const t=document.createElementNS("http://www.w3.org/2000/svg","defs"),e=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");e.setAttribute("id",this.gradientId),e.setAttribute("x1","0%"),e.setAttribute("y1","0%"),e.setAttribute("x2","100%"),e.setAttribute("y2","100%"),this.gradientColors.forEach((t,s)=>{const i=document.createElementNS("http://www.w3.org/2000/svg","stop"),r=s/(this.gradientColors.length-1)*100;i.setAttribute("offset",`${r}%`),i.setAttribute("stop-color",t),e.appendChild(i)}),t.appendChild(e),this.svg.appendChild(t)}animateProgress(t,e,s=0){setTimeout(()=>{t.style.transition=`stroke-dashoffset ${this.animationDuration}ms ${this.animationEasing}`,t.style.strokeDashoffset=e},s)}renderCenterContent(){if(this.centerElement)if(this.labelHtml)this.centerElement.innerHTML=this.labelHtml;else if(this.icon)this.centerElement.innerHTML=`<i class="${this.icon}"></i>`;else if(this.showValue){let t=`<div class="circular-progress-value">${this.getFormattedValue()}</div>`;this.label&&(t+=`<div class="circular-progress-label">${this.label}</div>`),this.centerElement.innerHTML=t}}getFormattedValue(){const t=this.value,e=this.min,s=this.max;if(this.valueFormatter&&"function"==typeof this.valueFormatter)return this.valueFormatter(t,e,s);switch(this.valueFormat){case"percentage":return`${Math.round(this.getPercentage())}%`;case"fraction":return`${t}/${s}`;case"value":return t.toString();default:if(this.dataFormatter)try{return this.dataFormatter.pipe(t,this.valueFormat)}catch(i){return console.warn("CircularProgress: DataFormatter error, falling back to percentage",i),`${Math.round(this.getPercentage())}%`}return`${Math.round(this.getPercentage())}%`}}getPercentage(){const t=this.max-this.min;return 0===t?0:(this.value-this.min)/t*100}setupClickHandler(){this.containerElement&&(this.containerElement.style.cursor="pointer",this.containerElement.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation();const e=this.getPercentage();this.emit("progress:clicked",{value:this.value,percentage:e,min:this.min,max:this.max}),this.tooltip&&this.togglePopover()}))}setupTooltip(){}togglePopover(){if(this.containerElement&&void 0!==window.bootstrap){if(!this.popover){const t=this.getTooltipContent(),e="object"==typeof this.tooltip&&this.tooltip.title?this.tooltip.title:void 0,s={content:t,html:!0,placement:this.tooltipPlacement,trigger:"manual",container:"body"};e&&(s.title=e),this.popover=new window.bootstrap.Popover(this.containerElement,s)}window.bootstrap.Popover.getInstance(this.containerElement)&&this.containerElement.getAttribute("aria-describedby")?this.popover.hide():(this.popover.setContent({".popover-body":this.getTooltipContent()}),this.popover.show())}else console.warn("CircularProgress: Bootstrap is required for tooltip support")}getTooltipContent(){return"function"==typeof this.tooltip?this.tooltip(this.value,{min:this.min,max:this.max,percentage:this.getPercentage()}):"object"==typeof this.tooltip?this.tooltip.html||this.tooltip.content||"":this.tooltip||""}setValue(t,e=!0){if(this.value,this.value=Math.max(this.min,Math.min(this.max,t)),this.renderCenterContent(),this.svg&&!this.segments){const t=this.svg.querySelector(".circular-progress-bar");if(t){const s=this.size/2-this.strokeWidth/2,i=2*Math.PI*s,r=(this.gap>0?360-this.gap:360)/360*i,o=r-this.getPercentage()/100*r;e?(t.style.transition=`stroke-dashoffset ${this.animationDuration}ms ${this.animationEasing}`,t.style.strokeDashoffset=o):(t.style.transition="none",t.style.strokeDashoffset=o)}}else{const t=this.animate;this.animate=e,this.renderProgress(),this.animate=t}}setRange(t,e){this.min=t,this.max=e,this.renderProgress(),this.renderCenterContent()}increment(t=1){this.setValue(this.value+t)}decrement(t=1){this.setValue(this.value-t)}setColor(t){if(this.color=t,this.gradientColors=null,this.svg&&!this.segments){const e=this.svg.querySelector(".circular-progress-bar");e&&e.setAttribute("stroke",t)}else this.renderProgress()}setGradient(t){Array.isArray(t)&&t.length>1&&(this.gradientColors=t,this.gradientId=`gradient-${Math.random().toString(36).substr(2,9)}`,this.renderProgress())}setSize(t){this.containerElement&&this.sizePreset&&this.containerElement.classList.remove(`circular-progress-${this.sizePreset}`),this.sizePreset="string"==typeof t&&this.SIZE_PRESETS[t]?t:null,this.size=this.resolveSize(t),this.strokeWidth=this.getAutoStrokeWidth(t),this.containerElement&&(this.containerElement.style.width=`${this.size}px`,this.containerElement.style.height=`${this.size}px`,this.sizePreset&&this.containerElement.classList.add(`circular-progress-${this.sizePreset}`)),this.svg&&(this.svg.setAttribute("width",this.size),this.svg.setAttribute("height",this.size),this.svg.setAttribute("viewBox",`0 0 ${this.size} ${this.size}`)),this.renderProgress()}animateTo(t,e=1e3){const s=this.value,i=t-s,r=performance.now(),o=a=>{const n=a-r,h=Math.min(n/e,1),l=1-Math.pow(1-h,3),c=s+i*l;this.setValue(c,!1),h<1?requestAnimationFrame(o):this.setValue(t,!1)};requestAnimationFrame(o)}pulse(){this.containerElement&&(this.containerElement.style.animation="none",setTimeout(()=>{this.containerElement.style.animation="circular-progress-pulse 0.5s ease-out"},10),setTimeout(()=>{this.containerElement.style.animation=""},500))}complete(){this.variant="success",this.applyVariant(),this.setValue(this.max),this.pulse()}reset(){this.setValue(this.min)}hide(){this.element&&(this.element.style.display="none")}show(){this.element&&(this.element.style.display="")}getValue(){return this.value}getPercentageValue(){return this.getPercentage()}async onBeforeDestroy(){this.popover&&(this.popover.dispose(),this.popover=null),await super.onBeforeDestroy()}}exports.BaseChart=t.BaseChart,exports.MetricsChart=t.MetricsChart,exports.MetricsMiniChart=t.MetricsMiniChart,exports.MetricsMiniChartWidget=t.MetricsMiniChartWidget,exports.MiniChart=t.MiniChart,exports.PieChart=t.PieChart,exports.SeriesChart=t.SeriesChart,exports.WebApp=s.WebApp,exports.BUILD_TIME=i.BUILD_TIME,exports.VERSION=i.VERSION,exports.VERSION_INFO=i.VERSION_INFO,exports.VERSION_MAJOR=i.VERSION_MAJOR,exports.VERSION_MINOR=i.VERSION_MINOR,exports.VERSION_REVISION=i.VERSION_REVISION,exports.CircularProgress=CircularProgress;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./chunks/MetricsMiniChartWidget-CMplnXWP.js"),e=require("./chunks/Rest-P-KCJpjB.js"),s=require("./chunks/Dialog-Bib7iGr7.js"),i=require("./chunks/version-BgmfUPIs.js");class CircularProgress extends e.View{constructor(t={}){super({className:`circular-progress ${t.className||""}`,...t}),this.SIZE_PRESETS={xs:40,sm:60,md:80,lg:120,xl:180},this.STROKE_PRESETS={xs:4,sm:6,md:8,lg:12,xl:16},this.value=void 0!==t.value?t.value:0,this.min=void 0!==t.min?t.min:0,this.max=void 0!==t.max?t.max:100,this.sizePreset="string"==typeof t.size&&this.SIZE_PRESETS[t.size]?t.size:null,this.size=this.resolveSize(void 0!==t.size?t.size:"md"),this.strokeWidth="auto"===t.strokeWidth||void 0===t.strokeWidth?this.getAutoStrokeWidth(t.size):t.strokeWidth,this.theme=t.theme||"basic",this.variant=t.variant||"default",this.color=t.color,this.trackColor=t.trackColor,this.textColor=t.textColor,this.gradientColors=t.gradientColors||null,this.applyTheme(),this.applyVariant(),this.rotation=void 0!==t.rotation?t.rotation:-90,this.gap=t.gap||0,this.showValue=!1!==t.showValue,this.valueFormat=t.valueFormat||"percentage",this.valueFormatter=t.valueFormatter||null,this.label=t.label||null,this.labelHtml=t.labelHtml||null,this.icon=t.icon||null,this.animate=!1!==t.animate,this.animationDuration=t.animationDuration||600,this.animationEasing=t.animationEasing||"ease-out",this.rounded=!1!==t.rounded,this.shadow=t.shadow||!1,this.clickable=t.clickable||!1,this.tooltip=t.tooltip||null,this.tooltipPlacement=t.tooltipPlacement||"top",this.segments=t.segments||null,this.segmentGap=t.segmentGap||2,this.dataFormatter=e.dataFormatter,this.svg=null,this.centerElement=null,this.popover=null,this.gradientId=`gradient-${Math.random().toString(36).substr(2,9)}`}resolveSize(t){return"string"==typeof t&&this.SIZE_PRESETS[t]?this.SIZE_PRESETS[t]:"number"==typeof t?t:this.SIZE_PRESETS.md}getAutoStrokeWidth(t){if("string"==typeof t&&this.STROKE_PRESETS[t])return this.STROKE_PRESETS[t];const e=this.resolveSize(t);return e<=40?4:e<=60?6:e<=80?8:e<=120?12:16}applyTheme(){const t={basic:{trackColor:"#e9ecef",textColor:null,backgroundColor:null},shadowed:{trackColor:"#d1d5db",textColor:null,backgroundColor:null,shadow:!0},dark:{trackColor:"#374151",textColor:"#e5e7eb",backgroundColor:"#1f2937"},light:{trackColor:"#f3f4f6",textColor:"#111827",backgroundColor:"#ffffff"}},e=t[this.theme]||t.basic;this.trackColor||(this.trackColor=e.trackColor),!this.textColor&&e.textColor&&(this.textColor=e.textColor),e.shadow&&!1===this.shadow&&(this.shadow=e.shadow)}applyVariant(){const t={success:{color:"#198754",trackColor:"rgba(25, 135, 84, 0.1)"},danger:{color:"#dc3545",trackColor:"rgba(220, 53, 69, 0.1)"},warning:{color:"#ffc107",trackColor:"rgba(255, 193, 7, 0.1)"},info:{color:"#0dcaf0",trackColor:"rgba(13, 202, 240, 0.1)"},default:{color:"#0d6efd"}};if(t[this.variant]){const e=t[this.variant];this.color||(this.color=e.color),e.trackColor&&this.trackColor===this.applyTheme.trackColor&&(this.trackColor=e.trackColor)}this.color||(this.color="#0d6efd")}getTemplate(){const t=this.sizePreset?`circular-progress-${this.sizePreset}`:"",e="default"!==this.variant?`circular-progress-${this.variant}`:"",s="basic"!==this.theme?`circular-progress-theme-${this.theme}`:"",i=this.clickable?"circular-progress-clickable":"",r=this.shadow?"circular-progress-shadow":"",o=this.textColor?`color: ${this.textColor};`:"";return`\n <div class="circular-progress-container ${t} ${e} ${s} ${i} ${r}"\n style="width: ${this.size}px; height: ${this.size}px;">\n <svg class="circular-progress-svg" \n width="${this.size}" \n height="${this.size}"\n viewBox="0 0 ${this.size} ${this.size}">\n </svg>\n <div class="circular-progress-center" style="${o}">\n <div class="circular-progress-content"></div>\n </div>\n </div>\n `}async onAfterRender(){this.svg=this.element.querySelector(".circular-progress-svg"),this.centerElement=this.element.querySelector(".circular-progress-content"),this.containerElement=this.element.querySelector(".circular-progress-container"),this.renderProgress(),this.renderCenterContent(),this.clickable&&this.setupClickHandler(),this.tooltip&&this.clickable&&this.setupTooltip()}renderProgress(){if(!this.svg)return;this.svg.innerHTML="";const t=this.size/2,e=(this.size-this.strokeWidth)/2,s=2*Math.PI*e;this.gradientColors&&this.gradientColors.length>1&&this.createGradient(),this.segments&&Array.isArray(this.segments)&&this.segments.length>0?this.renderSegments(t,e,s):this.renderSingleProgress(t,e,s)}renderSingleProgress(t,e,s){const i=(this.gap>0?360-this.gap:360)/360*s,r=this.createCircle(t,e,{stroke:this.trackColor,strokeWidth:this.strokeWidth,fill:"none",strokeLinecap:this.rounded?"round":"butt",strokeDasharray:this.gap>0?`${i} ${s}`:"none",transform:`rotate(${this.rotation} ${t} ${t})`});this.svg.appendChild(r);const o=i-this.getPercentage()/100*i,a=this.gradientColors?`url(#${this.gradientId})`:this.color,n=this.createCircle(t,e,{stroke:a,strokeWidth:this.strokeWidth,fill:"none",strokeLinecap:this.rounded?"round":"butt",strokeDasharray:`${i} ${s}`,strokeDashoffset:this.animate?i:o,transform:`rotate(${this.rotation} ${t} ${t})`,class:"circular-progress-bar"});this.svg.appendChild(n),this.animate&&this.animateProgress(n,o)}renderSegments(t,e,s){const i=(this.gap>0?360-this.gap:360)/360*s,r=this.createCircle(t,e,{stroke:this.trackColor,strokeWidth:this.strokeWidth,fill:"none",strokeLinecap:this.rounded?"round":"butt",strokeDasharray:this.gap>0?`${i} ${s}`:"none",transform:`rotate(${this.rotation} ${t} ${t})`});this.svg.appendChild(r),this.segments.reduce((t,e)=>t+(e.value||0),0)>this.max&&console.warn("CircularProgress: Segment total exceeds max value. Clamping to max.");let o=0;this.segments.forEach((r,a)=>{const n=(r.value||0)/(this.max-this.min)*100/100*i,h=this.segmentGap/360*s;if(n>0){const l=this.createCircle(t,e,{stroke:r.color||this.color,strokeWidth:this.strokeWidth,fill:"none",strokeLinecap:this.rounded?"round":"butt",strokeDasharray:`${n} ${s}`,strokeDashoffset:this.animate?i:-o,transform:`rotate(${this.rotation} ${t} ${t})`,class:`circular-progress-segment circular-progress-segment-${a}`,"data-segment-index":a});this.svg.appendChild(l),this.animate&&this.animateProgress(l,-o,100*a),o+=n+h}})}createCircle(t,e,s={}){const i=document.createElementNS("http://www.w3.org/2000/svg","circle");return i.setAttribute("cx",t),i.setAttribute("cy",t),i.setAttribute("r",e),Object.entries(s).forEach(([t,e])=>{"strokeWidth"===t?i.setAttribute("stroke-width",e):"strokeLinecap"===t?i.setAttribute("stroke-linecap",e):"strokeDasharray"===t?i.setAttribute("stroke-dasharray",e):"strokeDashoffset"===t?i.setAttribute("stroke-dashoffset",e):i.setAttribute(t,e)}),i}createGradient(){const t=document.createElementNS("http://www.w3.org/2000/svg","defs"),e=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");e.setAttribute("id",this.gradientId),e.setAttribute("x1","0%"),e.setAttribute("y1","0%"),e.setAttribute("x2","100%"),e.setAttribute("y2","100%"),this.gradientColors.forEach((t,s)=>{const i=document.createElementNS("http://www.w3.org/2000/svg","stop"),r=s/(this.gradientColors.length-1)*100;i.setAttribute("offset",`${r}%`),i.setAttribute("stop-color",t),e.appendChild(i)}),t.appendChild(e),this.svg.appendChild(t)}animateProgress(t,e,s=0){setTimeout(()=>{t.style.transition=`stroke-dashoffset ${this.animationDuration}ms ${this.animationEasing}`,t.style.strokeDashoffset=e},s)}renderCenterContent(){if(this.centerElement)if(this.labelHtml)this.centerElement.innerHTML=this.labelHtml;else if(this.icon)this.centerElement.innerHTML=`<i class="${this.icon}"></i>`;else if(this.showValue){let t=`<div class="circular-progress-value">${this.getFormattedValue()}</div>`;this.label&&(t+=`<div class="circular-progress-label">${this.label}</div>`),this.centerElement.innerHTML=t}}getFormattedValue(){const t=this.value,e=this.min,s=this.max;if(this.valueFormatter&&"function"==typeof this.valueFormatter)return this.valueFormatter(t,e,s);switch(this.valueFormat){case"percentage":return`${Math.round(this.getPercentage())}%`;case"fraction":return`${t}/${s}`;case"value":return t.toString();default:if(this.dataFormatter)try{return this.dataFormatter.pipe(t,this.valueFormat)}catch(i){return console.warn("CircularProgress: DataFormatter error, falling back to percentage",i),`${Math.round(this.getPercentage())}%`}return`${Math.round(this.getPercentage())}%`}}getPercentage(){const t=this.max-this.min;return 0===t?0:(this.value-this.min)/t*100}setupClickHandler(){this.containerElement&&(this.containerElement.style.cursor="pointer",this.containerElement.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation();const e=this.getPercentage();this.emit("progress:clicked",{value:this.value,percentage:e,min:this.min,max:this.max}),this.tooltip&&this.togglePopover()}))}setupTooltip(){}togglePopover(){if(this.containerElement&&void 0!==window.bootstrap){if(!this.popover){const t=this.getTooltipContent(),e="object"==typeof this.tooltip&&this.tooltip.title?this.tooltip.title:void 0,s={content:t,html:!0,placement:this.tooltipPlacement,trigger:"manual",container:"body"};e&&(s.title=e),this.popover=new window.bootstrap.Popover(this.containerElement,s)}window.bootstrap.Popover.getInstance(this.containerElement)&&this.containerElement.getAttribute("aria-describedby")?this.popover.hide():(this.popover.setContent({".popover-body":this.getTooltipContent()}),this.popover.show())}else console.warn("CircularProgress: Bootstrap is required for tooltip support")}getTooltipContent(){return"function"==typeof this.tooltip?this.tooltip(this.value,{min:this.min,max:this.max,percentage:this.getPercentage()}):"object"==typeof this.tooltip?this.tooltip.html||this.tooltip.content||"":this.tooltip||""}setValue(t,e=!0){if(this.value,this.value=Math.max(this.min,Math.min(this.max,t)),this.renderCenterContent(),this.svg&&!this.segments){const t=this.svg.querySelector(".circular-progress-bar");if(t){const s=this.size/2-this.strokeWidth/2,i=2*Math.PI*s,r=(this.gap>0?360-this.gap:360)/360*i,o=r-this.getPercentage()/100*r;e?(t.style.transition=`stroke-dashoffset ${this.animationDuration}ms ${this.animationEasing}`,t.style.strokeDashoffset=o):(t.style.transition="none",t.style.strokeDashoffset=o)}}else{const t=this.animate;this.animate=e,this.renderProgress(),this.animate=t}}setRange(t,e){this.min=t,this.max=e,this.renderProgress(),this.renderCenterContent()}increment(t=1){this.setValue(this.value+t)}decrement(t=1){this.setValue(this.value-t)}setColor(t){if(this.color=t,this.gradientColors=null,this.svg&&!this.segments){const e=this.svg.querySelector(".circular-progress-bar");e&&e.setAttribute("stroke",t)}else this.renderProgress()}setGradient(t){Array.isArray(t)&&t.length>1&&(this.gradientColors=t,this.gradientId=`gradient-${Math.random().toString(36).substr(2,9)}`,this.renderProgress())}setSize(t){this.containerElement&&this.sizePreset&&this.containerElement.classList.remove(`circular-progress-${this.sizePreset}`),this.sizePreset="string"==typeof t&&this.SIZE_PRESETS[t]?t:null,this.size=this.resolveSize(t),this.strokeWidth=this.getAutoStrokeWidth(t),this.containerElement&&(this.containerElement.style.width=`${this.size}px`,this.containerElement.style.height=`${this.size}px`,this.sizePreset&&this.containerElement.classList.add(`circular-progress-${this.sizePreset}`)),this.svg&&(this.svg.setAttribute("width",this.size),this.svg.setAttribute("height",this.size),this.svg.setAttribute("viewBox",`0 0 ${this.size} ${this.size}`)),this.renderProgress()}animateTo(t,e=1e3){const s=this.value,i=t-s,r=performance.now(),o=a=>{const n=a-r,h=Math.min(n/e,1),l=1-Math.pow(1-h,3),c=s+i*l;this.setValue(c,!1),h<1?requestAnimationFrame(o):this.setValue(t,!1)};requestAnimationFrame(o)}pulse(){this.containerElement&&(this.containerElement.style.animation="none",setTimeout(()=>{this.containerElement.style.animation="circular-progress-pulse 0.5s ease-out"},10),setTimeout(()=>{this.containerElement.style.animation=""},500))}complete(){this.variant="success",this.applyVariant(),this.setValue(this.max),this.pulse()}reset(){this.setValue(this.min)}hide(){this.element&&(this.element.style.display="none")}show(){this.element&&(this.element.style.display="")}getValue(){return this.value}getPercentageValue(){return this.getPercentage()}async onBeforeDestroy(){this.popover&&(this.popover.dispose(),this.popover=null),await super.onBeforeDestroy()}}exports.BaseChart=t.BaseChart,exports.MetricsChart=t.MetricsChart,exports.MetricsMiniChart=t.MetricsMiniChart,exports.MetricsMiniChartWidget=t.MetricsMiniChartWidget,exports.MiniChart=t.MiniChart,exports.PieChart=t.PieChart,exports.SeriesChart=t.SeriesChart,exports.WebApp=s.WebApp,exports.BUILD_TIME=i.BUILD_TIME,exports.VERSION=i.VERSION,exports.VERSION_INFO=i.VERSION_INFO,exports.VERSION_MAJOR=i.VERSION_MAJOR,exports.VERSION_MINOR=i.VERSION_MINOR,exports.VERSION_REVISION=i.VERSION_REVISION,exports.CircularProgress=CircularProgress;
|
|
2
2
|
//# sourceMappingURL=charts.cjs.js.map
|
package/dist/charts.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { B, M, b, c, a, P, S } from "./chunks/MetricsMiniChartWidget-DfW7iH5B.js";
|
|
2
2
|
import { V as View, d as dataFormatter } from "./chunks/Rest-0oRgqNjX.js";
|
|
3
3
|
import { W } from "./chunks/Dialog-BGsJJdvU.js";
|
|
4
|
-
import { B as B2, a as a2, V, b as b2, c as c2, d } from "./chunks/version-
|
|
4
|
+
import { B as B2, a as a2, V, b as b2, c as c2, d } from "./chunks/version-eR5sdxoe.js";
|
|
5
5
|
class CircularProgress extends View {
|
|
6
6
|
constructor(options = {}) {
|
|
7
7
|
super({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as Model, C as Collection } from "./Collection-
|
|
1
|
+
import { M as Model, C as Collection } from "./Collection-zmb3xHhH.js";
|
|
2
2
|
import { r as rest, V as View, d as dataFormatter, a as Mustache } from "./Rest-0oRgqNjX.js";
|
|
3
|
-
import { T as ToastService, G as GroupList, c as UserList, P as Page } from "./ContextMenu-
|
|
3
|
+
import { T as ToastService, G as GroupList, c as UserList, P as Page } from "./ContextMenu-LPGlaOZ5.js";
|
|
4
4
|
import { D as Dialog } from "./Dialog-BGsJJdvU.js";
|
|
5
|
-
import { L as ListViewItem, a as ListView } from "./ListView-
|
|
5
|
+
import { L as ListViewItem, a as ListView } from "./ListView-BBZw7GUS.js";
|
|
6
6
|
import { F as FormView, a as applyFileDropMixin } from "./FormView-D_VTD2EY.js";
|
|
7
7
|
class S3Bucket extends Model {
|
|
8
8
|
constructor(data = {}) {
|
|
@@ -1820,6 +1820,17 @@ const CommonEventFields = [
|
|
|
1820
1820
|
{ value: "request_path", label: "Request Path", description: "Request path associated with event", meta: { type: "str" } },
|
|
1821
1821
|
{ value: "method", label: "Method", description: "HTTP method or function name", meta: { type: "str" } }
|
|
1822
1822
|
];
|
|
1823
|
+
const CommonScopeOptions = [
|
|
1824
|
+
{ value: "global", label: "Global" },
|
|
1825
|
+
{ value: "account", label: "Account" },
|
|
1826
|
+
{ value: "incident", label: "Incident" },
|
|
1827
|
+
{ value: "ossec", label: "OSSEC" },
|
|
1828
|
+
{ value: "fileman", label: "File Manager" },
|
|
1829
|
+
{ value: "metrics", label: "Metrics" },
|
|
1830
|
+
{ value: "jobs", label: "Jobs" },
|
|
1831
|
+
{ value: "realtime", label: "Realtime" },
|
|
1832
|
+
{ value: "aws", label: "AWS" }
|
|
1833
|
+
];
|
|
1823
1834
|
class RuleSet extends Model {
|
|
1824
1835
|
constructor(data = {}) {
|
|
1825
1836
|
super(data, {
|
|
@@ -1851,9 +1862,10 @@ const RuleSetForms = {
|
|
|
1851
1862
|
},
|
|
1852
1863
|
{
|
|
1853
1864
|
name: "category",
|
|
1854
|
-
type: "
|
|
1855
|
-
label: "
|
|
1865
|
+
type: "combo",
|
|
1866
|
+
label: "Scope",
|
|
1856
1867
|
required: true,
|
|
1868
|
+
options: CommonScopeOptions,
|
|
1857
1869
|
placeholder: "e.g., ossec, auth, api_error",
|
|
1858
1870
|
cols: 6
|
|
1859
1871
|
},
|
|
@@ -1926,8 +1938,9 @@ const RuleSetForms = {
|
|
|
1926
1938
|
},
|
|
1927
1939
|
{
|
|
1928
1940
|
name: "category",
|
|
1929
|
-
type: "
|
|
1930
|
-
label: "
|
|
1941
|
+
type: "combo",
|
|
1942
|
+
label: "Scope",
|
|
1943
|
+
options: CommonScopeOptions,
|
|
1931
1944
|
required: true,
|
|
1932
1945
|
placeholder: "e.g., ossec, auth, api_error",
|
|
1933
1946
|
cols: 6
|
|
@@ -2035,7 +2048,17 @@ const RuleForms = {
|
|
|
2035
2048
|
allowCustom: true,
|
|
2036
2049
|
showDescription: true,
|
|
2037
2050
|
help: "Select a common field or type a custom field name",
|
|
2038
|
-
cols:
|
|
2051
|
+
cols: 8
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
name: "index",
|
|
2055
|
+
type: "select",
|
|
2056
|
+
label: "Index",
|
|
2057
|
+
required: true,
|
|
2058
|
+
start: 0,
|
|
2059
|
+
end: 14,
|
|
2060
|
+
step: 1,
|
|
2061
|
+
cols: 4
|
|
2039
2062
|
},
|
|
2040
2063
|
{
|
|
2041
2064
|
name: "comparator",
|
|
@@ -2056,7 +2079,7 @@ const RuleForms = {
|
|
|
2056
2079
|
},
|
|
2057
2080
|
{
|
|
2058
2081
|
name: "value",
|
|
2059
|
-
type: "
|
|
2082
|
+
type: "textarea",
|
|
2060
2083
|
label: "Value",
|
|
2061
2084
|
required: true,
|
|
2062
2085
|
placeholder: "Enter comparison value",
|
|
@@ -7478,42 +7501,43 @@ export {
|
|
|
7478
7501
|
ComparatorOptions as a3,
|
|
7479
7502
|
ValueTypeOptions as a4,
|
|
7480
7503
|
CommonEventFields as a5,
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7504
|
+
CommonScopeOptions as a6,
|
|
7505
|
+
Job as a7,
|
|
7506
|
+
JobList as a8,
|
|
7507
|
+
JobForms as a9,
|
|
7508
|
+
GeoLocatedIPList as aA,
|
|
7509
|
+
Ticket as aB,
|
|
7510
|
+
TicketList as aC,
|
|
7511
|
+
TicketNote as aD,
|
|
7512
|
+
TicketNoteList as aE,
|
|
7513
|
+
TicketForms as aF,
|
|
7514
|
+
TicketCategories as aG,
|
|
7515
|
+
JobLog as aa,
|
|
7516
|
+
JobLogList as ab,
|
|
7517
|
+
JobEvent as ac,
|
|
7518
|
+
JobEventList as ad,
|
|
7519
|
+
JobsEngineStats as ae,
|
|
7520
|
+
JobRunner as af,
|
|
7521
|
+
JobRunnerList as ag,
|
|
7522
|
+
JobRunnerForms as ah,
|
|
7523
|
+
Log as ai,
|
|
7524
|
+
LogList as aj,
|
|
7525
|
+
MemberList as ak,
|
|
7526
|
+
MemberForms as al,
|
|
7527
|
+
MetricsPermission as am,
|
|
7528
|
+
MetricsPermissionList as an,
|
|
7529
|
+
MetricsForms as ao,
|
|
7530
|
+
PushDevice as ap,
|
|
7531
|
+
PushDeviceList as aq,
|
|
7532
|
+
PushTemplate as ar,
|
|
7533
|
+
PushTemplateList as as,
|
|
7534
|
+
PushConfig as at,
|
|
7535
|
+
PushConfigList as au,
|
|
7536
|
+
PushDelivery as av,
|
|
7537
|
+
PushDeliveryList as aw,
|
|
7538
|
+
PushConfigForms as ax,
|
|
7539
|
+
PushTemplateForms as ay,
|
|
7540
|
+
GeoLocatedIP as az,
|
|
7517
7541
|
TablePage as b,
|
|
7518
7542
|
TabView as c,
|
|
7519
7543
|
ChatMessageView as d,
|
|
@@ -7540,4 +7564,4 @@ export {
|
|
|
7540
7564
|
File$1 as y,
|
|
7541
7565
|
FileList as z
|
|
7542
7566
|
};
|
|
7543
|
-
//# sourceMappingURL=ChatView-
|
|
7567
|
+
//# sourceMappingURL=ChatView-C8J_kZZC.js.map
|