PageSourceSearch

https://www.siku.de/theme/90cb1092fdf35b49884e707d0a60130d/js/stor…refront.form-submit-loader.plugin.e2a9a6.js

js siku.de collected 2026-09-24 11:27:22 UTC 3,891 bytes, 3 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3693],{44(t,e,i){i.d(e,{A:()=>n});var s=i(5683);class n extends s.A{constructor(t,e="before"){super(t,e),this._isValidElement()||console.warn(`[ButtonLoadingIndicatorUtil] Parent element is not of type <button> or <a>. Given element: ${this.parent}`)}create(){if(!this._isValidElement()){console.warn(`[ButtonLoadingIndicatorUtil] Unable to create loading indicator. Parent element is not of type <button> or <a>. Given element: ${this.parent}`);return}if("inner"===this.position){let t=this.parent.getBoundingClientRect().width;this.parent.style.width=`${t}px`}super.create(),this.parent.classList.add(`is-loading-indicator-${this.position}`),this._isButtonElement()?this.parent.disabled=!0:this._isAnchorElement()&&this.parent.classList.add("disabled")}remove(){if(!this.exists()){console.warn(`[ButtonLoadingIndicatorUtil] Unable to remove loading indicator. No indicator present on given element: ${this.parent}`);return}"inner"===this.position&&(this.parent.style.width="auto"),super.remove(),this.parent.classList.remove(`is-loading-indicator-${this.position}`),this._isButtonElement()?this.parent.disabled=!1:this._isAnchorElement()&&this.parent.classList.remove("disabled")}_isValidElement(){return this._isButtonElement()||this._isAnchorElement()}_isButtonElement(){return this.parent?.tagName.toLowerCase()==="button"}_isAnchorElement(){return this.parent?.tagName.toLowerCase()==="a"}}},3693(t,e,i){i.r(e),i.d(e,{default:()=>r});var s=i(44),n=i(4335),o=i(5683);class r extends n.A{static #t=this.options={formWrapperSelector:"body",indicatorPosition:o.c.INNER,skipLoadingIndicator:!1};init(){this._getForm()&&this._getSubmitButtons()&&(this._validationPluginActive=!!window.PluginManager.getPluginInstanceFromElement(this._form,"FormValidation"),this._submittedButtonLoaders=[],this._registerEvents())}_getForm(){return this.el&&"FORM"===this.el.nodeName?(this._form=this.el,!0):(this._form=this.el.closest("form"),this._form)}_getSubmitButtons(){this._submitButtons=Array.from(this._form.querySelectorAll("button[type=submit]"));let t=this._form.id;return t&&(this._submitButtons=this._submitButtons.concat(Array.from(this._form.closest(this.options.formWrapperSelector).querySelectorAll(`:not(form) > button[type=submit][form="${t}"]`)))),!!this._submitButtons.length}_registerEvents(){this._form.addEventListener("submit",this._onFormSubmit.bind(this)),this._form.addEventListener("removeLoader",this.removeLoadingIndicator.bind(this))}_onFormSubmit(){this._validationPluginActive&&!1===this.el.checkValidity()||(this._submitButtons.forEach(t=>{if(this.options.skipLoadingIndicator){t.disabled=!0;return}let e=new s.A(t,this.options.indicatorPosition);e.create(),this._submittedButtonLoaders.push(e)}),this.$emitter.publish("beforeSubmit"))}removeLoadingIndicator(){this._submittedButtonLoaders.forEach(t=>t.remove()),this._submittedButtonLoaders=[]}constructor(...t){super(...t),this._submittedButtonLoaders=[]}}},5683(t,e,i){i.d(e,{A:()=>o,c:()=>n});let s="loader",n={BEFORE:"before",AFTER:"after",INNER:"inner"};class o{constructor(t,e=n.BEFORE){this.parent=t instanceof Element?t:document.body.querySelector(t),this.position=e}create(){if(!this.exists()){if(this.position===n.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=o.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),o.getTemplate())}}remove(){if(this.position===n.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${s}`).forEach(t=>t.remove())}exists(){return this.parent.querySelectorAll(`.${s}`).length>0}_getPosition(){return this.position===n.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${s}" role="status">
2                    <span class="visually-hidden">Loading...</span>
3                </div>`}static SELECTOR_CLASS(){return s}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.