You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2025/02/11 14:25:40 UTC

(myfaces-tobago) branch main updated: refactor: cleanup (#6014)

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/main by this push:
     new 71205394c7 refactor: cleanup (#6014)
71205394c7 is described below

commit 71205394c712809a19533217ee72904f3352bc7e
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Tue Feb 11 15:25:34 2025 +0100

    refactor: cleanup (#6014)
---
 .../webapp/content/100-upload/File_Upload.xhtml    |  2 +-
 .../tobago-theme-standard/src/main/js/tobago.js    |  8 +++----
 .../src/main/js/tobago.js.map                      |  2 +-
 .../src/main/ts/tobago-behavior.ts                 | 26 +++++++++++-----------
 4 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/100-upload/File_Upload.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/100-upload/File_Upload.xhtml
index 19b3a4c4ce..4fb9bfe8ce 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/100-upload/File_Upload.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/100-upload/File_Upload.xhtml
@@ -83,7 +83,7 @@
       to the <code class="language-markup">&lt;tc:file/></code> tag.</p>
     <tc:file label="Ajax" value="#{uploadController.fileAjax}" id="fileAjax">
       <tc:validateFileItem maxSize="1048576"/>
-      <f:ajax listener="#{uploadController.uploadAjax}" render="s3 list :page:messages"/>
+      <f:ajax listener="#{uploadController.uploadAjax}" render="list :page:messages"/>
     </tc:file>
   </tc:section>
 
diff --git a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
index 2d301d4a6e..f6dfa76180 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
+++ b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js
@@ -1,19 +1,19 @@
-!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t;!function(e){e.ACTIVE="active",e.AUTOCOMPLETE="autocomplete",e.AUTOCOMPLETE_INPUT="autocomplete-input",e.BOTTOM_0="bottom-0",e.COLLAPSE="collapse",e.COLLAPSING="collapsing",e.D_NONE="d-none",e.DISABLED="disabled",e.DROPDOWN="dropdown",e.DROPDOWN_ITEM="dropdown-item",e.DROPDOWN_MENU="dropdown-menu",e.DROPDOWN_MENU_END="dropdown-menu-end",e.END_0="end-0",e.FADE="fade",e.FIXED_BOTTOM="fixed-bo [...]
+!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t;!function(e){e.ACTIVE="active",e.AUTOCOMPLETE="autocomplete",e.AUTOCOMPLETE_INPUT="autocomplete-input",e.BOTTOM_0="bottom-0",e.COLLAPSE="collapse",e.COLLAPSING="collapsing",e.D_NONE="d-none",e.DISABLED="disabled",e.DROPDOWN="dropdown",e.DROPDOWN_ITEM="dropdown-item",e.DROPDOWN_MENU="dropdown-menu",e.DROPDOWN_MENU_END="dropdown-menu-end",e.END_0="end-0",e.FADE="fade",e.FIXED_BOTTOM="fixed-bo [...]
 /*!
       * Bootstrap v5.3.3 (https://getbootstrap.com/)
       * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
       * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
       */
-const pt=new Map,gt={set(e,t,s){pt.has(e)||pt.set(e,new Map);const i=pt.get(e);i.has(t)||0===i.size?i.set(t,s):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>pt.has(e)&&pt.get(e).get(t)||null,remove(e,t){if(!pt.has(e))return;const s=pt.get(e);s.delete(t),0===s.size&&pt.delete(e)}},ft="transitionend",mt=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),b [...]
+const pt=new Map,gt={set(e,t,s){pt.has(e)||pt.set(e,new Map);const i=pt.get(e);i.has(t)||0===i.size?i.set(t,s):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>pt.has(e)&&pt.get(e).get(t)||null,remove(e,t){if(!pt.has(e))return;const s=pt.get(e);s.delete(t),0===s.size&&pt.delete(e)}},ft="transitionend",mt=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),b [...]
 /**
      * @license
      * Copyright 2017 Google LLC
      * SPDX-License-Identifier: BSD-3-Clause
-     */const ur=globalThis,hr=ur.trustedTypes,pr=hr?hr.createPolicy("lit-html",{createHTML:e=>e}):void 0,gr="$lit$",fr=`lit$${Math.random().toFixed(9).slice(2)}$`,mr="?"+fr,br=`<${mr}>`,vr=document,_r=()=>vr.createComment(""),yr=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Er=Array.isArray,wr="[ \t\n\f\r]",Ar=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Sr=/-->/g,Lr=/>/g,Or=RegExp(`>|${wr}(?:([^\\s"'>=/]+)(${wr}*=${wr}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Tr=/'/g,xr [...]
+     */const ur=globalThis,hr=ur.trustedTypes,pr=hr?hr.createPolicy("lit-html",{createHTML:e=>e}):void 0,gr="$lit$",fr=`lit$${Math.random().toFixed(9).slice(2)}$`,mr="?"+fr,br=`<${mr}>`,vr=document,_r=()=>vr.createComment(""),yr=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Er=Array.isArray,wr="[ \t\n\f\r]",Ar=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Sr=/-->/g,Lr=/>/g,Or=RegExp(`>|${wr}(?:([^\\s"'>=/]+)(${wr}*=${wr}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Tr=/'/g,xr [...]
   <button type='button'
       class='tobago-button btn btn-secondary badge' aria-label='deselect ${e}'
       ${s>0?" tabindex='"+String(s)+"'":""}
       @click="${this.removeBadge.bind(this)}"
       @focus="${this.focusEvent.bind(this)}"
-      @blur="${this.blurEvent.bind(this)}"><i class='bi-x-lg'></i></button>`}removeBadge(e){var t;const s=e.target.closest(".btn-group").dataset.tobagoValue,i=this.hiddenSelect.querySelector(`[value="${s}"]`);i.selected=!1;const n=this.badges.querySelector(`[data-tobago-value="${s}"]`),o=n.previousElementSibling,r="SPAN"===(null===(t=n.nextElementSibling)||void 0===t?void 0:t.tagName)?n.nextElementSibling:null;o?o.querySelector("button.btn.badge").focus():r?r.querySelector("button.btn.ba [...]
+      @blur="${this.blurEvent.bind(this)}"><i class='bi-x-lg'></i></button>`}removeBadge(e){var t;const s=e.target.closest(".btn-group").dataset.tobagoValue,i=this.hiddenSelect.querySelector(`[value="${s}"]`);i.selected=!1;const n=this.badges.querySelector(`[data-tobago-value="${s}"]`),o=n.previousElementSibling,r="SPAN"===(null===(t=n.nextElementSibling)||void 0===t?void 0:t.tagName)?n.nextElementSibling:null;o?o.querySelector("button.btn.badge").focus():r?r.querySelector("button.btn.ba [...]
 //# sourceMappingURL=tobago.js.map
diff --git a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
index 877de0c3cc..f45754d1c4 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
+++ b/tobago-theme/tobago-theme-standard/src/main/js/tobago.js.map
@@ -1 +1 @@
-{"version":3,"file":"tobago.js","sources":["../ts/tobago-css.ts","../ts/tobago-key.ts","../ts/tobago-bar.ts","../ts/tobago-date.ts","../ts/tobago-menu-store.ts","../../../../node_modules/@popperjs/core/lib/enums.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../../node_modules/@popperjs/core/lib/modifiers/applyStyles [...]
\ No newline at end of file
+{"version":3,"file":"tobago.js","sources":["../ts/tobago-css.ts","../ts/tobago-key.ts","../ts/tobago-bar.ts","../ts/tobago-date.ts","../ts/tobago-menu-store.ts","../../../../node_modules/@popperjs/core/lib/enums.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../../node_modules/@popperjs/core/lib/modifiers/applyStyles [...]
\ No newline at end of file
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-behavior.ts b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-behavior.ts
index a6a75bcdb1..be3bc64e4a 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-behavior.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-behavior.ts
@@ -136,42 +136,42 @@ class Behavior extends HTMLElement {
               resetValues: this.resetValues,
               delay: this.delay,
               onevent: (event: EventData) => {
-                console.debug(`Status: ${event.status} - Type: ${event.type}`);
+                // console.debug(`Status: ${event.status} - Type: ${event.type}`);
               },
               myfaces: {
                 upload: {
                   progress: (upload: XMLHttpRequestUpload, event: ProgressEvent) => {
-                    console.debug(`progress: ${event.loaded} of ${event.total}`);
+                    // console.debug(`progress: ${event.loaded} of ${event.total}`);
                     if (this.actionElement.tagName === "TOBAGO-FILE") {
                       (this.actionElement as File).updateProgress(event.loaded, event.total);
                     }
                   },
                   preinit: (upload: XMLHttpRequestUpload) => {
-                    console.debug(`preinit`);
+                    // console.debug(`preinit`);
                   },
                   loadstart: (upload: XMLHttpRequestUpload, event: ProgressEvent) => {
-                    console.debug(`loadstart: ${event.loaded} of ${event.total}`);
+                    // console.debug(`loadstart: ${event.loaded} of ${event.total}`);
                     if (this.actionElement.tagName === "TOBAGO-FILE") {
                       (this.actionElement as File).startProgress(event.loaded, event.total);
                     }
                   },
                   load: (upload: XMLHttpRequestUpload, event: ProgressEvent) => {
-                    console.debug(`load: ${event.loaded} of ${event.total}`);
+                    // console.debug(`load: ${event.loaded} of ${event.total}`);
                   },
                   loadend: (upload: XMLHttpRequestUpload, event: ProgressEvent) => {
-                    console.debug(`loadend: ${event.loaded} of ${event.total}`);
+                    // console.debug(`loadend: ${event.loaded} of ${event.total}`);
                     if (this.actionElement.tagName === "TOBAGO-FILE") {
                       (this.actionElement as File).finishProgress();
                     }
                   },
                   error: (upload: XMLHttpRequestUpload, event: ProgressEvent) => {
-                    console.debug(`error: ${event.loaded} of ${event.total}`);
+                    // console.debug(`error: ${event.loaded} of ${event.total}`);
                   },
                   abort: (upload: XMLHttpRequestUpload, event: ProgressEvent) => {
-                    console.debug(`abort: ${event.loaded} of ${event.total}`);
+                    // console.debug(`abort: ${event.loaded} of ${event.total}`);
                   },
                   timeout: (upload: XMLHttpRequestUpload, event: ProgressEvent) => {
-                    console.debug(`timeout: ${event.loaded} of ${event.total}`);
+                    // console.debug(`timeout: ${event.loaded} of ${event.total}`);
                   }
                 }
               }
@@ -234,7 +234,7 @@ class Behavior extends HTMLElement {
   validate(ids: string): boolean {
     let allValid = true;
     if (ids) {
-      console.debug("Is all valid? ids=", ids);
+      // console.debug("Is all valid? ids=", ids);
       for (const id of ids.split(/\s+/)) {
         const element = document.getElementById(id);
         if (element) {
@@ -246,15 +246,15 @@ class Behavior extends HTMLElement {
           );
           for (const formElement of formElements) {
             if (!formElement.checkValidity()) {
-              console.debug("invalid", formElement.id);
+              // console.debug("invalid", formElement.id);
               allValid = false;
             } else {
-              console.debug("valid", formElement.id);
+              // console.debug("valid", formElement.id);
             }
           }
         }
       }
-      console.debug("Is all valid?", allValid);
+      // console.debug("Is all valid?", allValid);
       return allValid;
     }
   }