@public-ui/sample-react 3.0.0 → 3.0.1-rc.0
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/1006.js +1 -1
- package/dist/1752.js +1 -1
- package/dist/1932.js +1 -1
- package/dist/2069.js +1 -1
- package/dist/2113.js +2 -0
- package/dist/2212.js +1 -1
- package/dist/2231.js +1 -1
- package/dist/2321.js +1 -1
- package/dist/2596.js +1 -1
- package/dist/2827.js +1 -1
- package/dist/2894.js +1 -1
- package/dist/3099.js +1 -1
- package/dist/3151.js +1 -1
- package/dist/3203.js +1 -1
- package/dist/3540.js +1 -1
- package/dist/373.js +1 -1
- package/dist/3874.js +1 -1
- package/dist/3918.js +1 -1
- package/dist/3920.js +1 -1
- package/dist/4030.js +1 -1
- package/dist/4048.js +1 -1
- package/dist/4201.js +1 -1
- package/dist/4389.js +1 -1
- package/dist/4587.js +1 -1
- package/dist/4611.js +1 -1
- package/dist/4641.js +1 -1
- package/dist/4656.js +2 -0
- package/dist/4876.js +1 -1
- package/dist/5249.js +1 -1
- package/dist/5301.js +1 -1
- package/dist/5690.js +1 -1
- package/dist/5746.js +1 -1
- package/dist/6047.js +1 -1
- package/dist/6066.js +1 -1
- package/dist/6256.js +1 -1
- package/dist/6304.js +1 -1
- package/dist/6509.js +2 -0
- package/dist/6781.js +1 -1
- package/dist/6790.js +1 -1
- package/dist/6984.js +1 -1
- package/dist/7013.js +1 -1
- package/dist/7178.js +1 -1
- package/dist/7347.js +1 -1
- package/dist/7444.js +1 -1
- package/dist/7533.js +1 -1
- package/dist/7535.js +1 -1
- package/dist/775.js +1 -1
- package/dist/8137.js +1 -1
- package/dist/8180.js +1 -1
- package/dist/8192.js +1 -1
- package/dist/8246.js +1 -1
- package/dist/833.js +1 -1
- package/dist/8378.js +1 -1
- package/dist/8605.js +1 -1
- package/dist/8625.js +1 -1
- package/dist/907.js +1 -1
- package/dist/9108.js +1 -1
- package/dist/9255.js +1 -1
- package/dist/9322.js +1 -1
- package/dist/9581.js +1 -1
- package/dist/9719.js +1 -1
- package/dist/9731.js +1 -1
- package/dist/9930.js +1 -1
- package/dist/9938.js +1 -1
- package/dist/main.js +1 -1
- package/package.json +4 -4
- package/dist/808.js +0 -2
- package/dist/8948.js +0 -2
- package/dist/9374.js +0 -2
- /package/dist/{808.js.LICENSE.txt → 2113.js.LICENSE.txt} +0 -0
- /package/dist/{8948.js.LICENSE.txt → 4656.js.LICENSE.txt} +0 -0
- /package/dist/{9374.js.LICENSE.txt → 6509.js.LICENSE.txt} +0 -0
package/dist/7013.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 7013.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7013],{182:(e,t,n)=>{n.d(t,{I:()=>y,K:()=>f,a:()=>g});var i=n(6733),o=n(257),a=n(1111),l=n(8045),s=n(9867),r=n(1698),d=n(3885),c=n(376),u=n(1476),h=n(8057);const m=(e,t)=>{var{position:n="start",class:o}=e,s=(0,a._)(e,["position","class"]);const r="kol-input-container__adornment",d=`${r}--${n}`;return(0,i.h)("div",Object.assign({class:(0,l.c)(r,d,o)},s),t)};function p(e){return!!e&&(Array.isArray(e)?e.length>0:Boolean(e))}const b=(e,t)=>{var{class:n}=e,o=(0,a._)(e,["class"]);return(0,i.h)("div",Object.assign({class:(0,l.c)("kol-input-container__container",n)},o),t)},v=(e,t)=>{const{class:n,startAdornment:o,endAdornment:r,disabled:d,msg:c,touched:u,containerProps:h,startAdornmentProps:v,endAdornmentProps:_}=e,f=(0,a._)(e,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),g=(0,s.c)(c,u),y={"kol-input-container--disabled":d,[`kol-input-container--${(null==c?void 0:c.type)||"error"}`]:g},k=Object.assign({class:(0,l.c)("kol-input-container",y,n)},f);return p(o)||p(r)?(0,i.h)("div",Object.assign({},k),(0,i.h)(m,Object.assign({},v,{position:"start"}),o),(0,i.h)(b,Object.assign({},h),t),(0,i.h)(m,Object.assign({},_,{position:"end"}),r)):(0,i.h)("div",Object.assign({},k),(0,i.h)(b,Object.assign({},h),t))},_=e=>{const{label:t,icons:n,hideLabel:o,disabled:l,onClick:s}=e,d=(0,a._)(e,["label","icons","hideLabel","disabled","onClick"]);return(0,i.h)(r.a,Object.assign({_label:t,_disabled:l,_icons:n,_hideLabel:o,_on:{onClick:s}},d))},f=e=>{const{componentName:t="button",label:n,icon:o,onClick:l}=e,s=(0,a._)(e,["componentName","label","icon","onClick"]),r="button"===t?_:d.K;return(0,i.h)(r,Object.assign({label:n||"",hideLabel:!0,icons:`codicon codicon-${o}`,onClick:l},s))},g=({state:e,endAdornment:t},n)=>{const{icons:o,smartButton:a,disabled:l,msg:r,touched:d}=function(e){let t,n;return"_icons"in e&&(t=e._icons),"_smartButton"in e&&(n=e._smartButton),{icons:t,smartButton:n,disabled:e._disabled,msg:(0,s.a)(e._msg),touched:e._touched}}(e);let h=null==o?void 0:o.left;(0,c.i)(h)&&(h={icon:h});let m=null==o?void 0:o.right;(0,c.i)(m)&&(m={icon:m});const p=[],b=[];return t&&(Array.isArray(t)?b.push(...t):b.push(t)),h&&p.push((0,i.h)(f,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,u.i)(h)?h:{}))),(0,u.i)(a)&&b.push((0,i.h)(f,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},a,{hideLabel:!0,disabled:l}))),m&&b.push((0,i.h)(f,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,u.i)(m)?m:{}))),(0,i.h)(v,{disabled:l,msg:r,touched:d,startAdornment:p,endAdornment:b},n)};class y extends s.I{constructor(e,t,n){super(e,t,n),this.numberStringRegex=/^\d+(\.\d+)?$/,this.parseToNumber=e=>"number"==typeof e?isNaN(e)?null:e:this.isNumberString(e)?parseFloat(e):null,this.validateNumber=(e,t)=>(0,o.w)(this.component,e,(e=>null==e||"number"==typeof e||"string"==typeof e&&this.numberStringRegex.test(e)),new Set(["number","NumberString"]),t,{hooks:{beforePatch:(t,n)=>{(null==n?void 0:n.has(e))&&(null==n||n.set(e,this.parseToNumber(t)))}}}),this.component=e}validateIcons(e){(0,h.v)(this.component,e)}isNumberString(e){return"string"==typeof e&&this.numberStringRegex.test(e)}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}},1476:(e,t,n)=>{function i(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}n.d(t,{i:()=>i})},3885:(e,t,n)=>{n.d(t,{K:()=>a});var i=n(6733),o=n(1698);const a=e=>{const{class:t,style:n,icons:a,label:l,onClick:s}=e;return(0,i.h)(o.d,{class:t,style:n,onClick:s,_icons:a,_label:l})}},5151:(e,t,n)=>{n.d(t,{a:()=>l,p:()=>s});var i=n(257),o=n(1698);const a=e=>{for((0,i.F)()&&((0,i.D)("↓ Search form element start."),i.L.debug(e));e instanceof HTMLElement&&"FORM"!==e.tagName&&e.tagName!==o.g.toUpperCase();){try{e=e.parentElement instanceof HTMLElement?e.parentElement:e.parentNode instanceof ShadowRoot?e.parentNode.host:null}catch(e){}(0,i.F)()&&(i.L.debug(e),(0,i.D)("↑ Search form element finished."))}return e},l=(e={})=>{var t,n;const l=a(e.form);if(l instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===l.tagName)(0,i.I)(e,l),l.dispatchEvent(e);else if(l.tagName===o.g.toUpperCase()){(0,i.I)(e,i.a.querySelector("form",l));const o=l;"function"==typeof(null===(t=o._on)||void 0===t?void 0:t.onReset)&&(null===(n=o._on)||void 0===n||n.onReset(e))}}},s=(e={})=>{const t=a(e.form);if(t instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:t});if("FORM"===t.tagName)(0,i.F)()&&!1===t.noValidate&&(0,i.D)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout((()=>{"function"==typeof t.requestSubmit?t.requestSubmit():((0,i.I)(e,t),t.dispatchEvent(e))}));else if(t.tagName===o.g.toUpperCase()){(0,i.I)(e,i.a.querySelector("form",t));const n=t;setTimeout((()=>{var t,i;"function"==typeof(null===(t=n._on)||void 0===t?void 0:t.onSubmit)&&(null===(i=n._on)||void 0===i||i.onSubmit(e))}))}}}},7013:(e,t,n)=>{n.r(t),n.d(t,{kol_input_number:()=>p});var i=n(6733),o=n(8045),a=n(2190),l=n(5151),s=n(9867),r=n(7162),d=n(182),c=n(257),u=n(7368),h=(n(1698),n(3694),n(1042),n(8296),n(4269),n(3710),n(5561),n(5154),n(753),n(3472),n(1111),n(9709),n(9272),n(6660),n(3185),n(2425),n(376),n(5538),n(8176),n(3885),n(1476),n(8057),(e,t,n)=>new Promise(((i,o)=>{var a=e=>{try{s(n.next(e))}catch(e){o(e)}},l=e=>{try{s(n.throw(e))}catch(e){o(e)}},s=e=>e.done?i(e.value):Promise.resolve(e.value).then(a,l);s((n=n.apply(e,t)).next())})));class m extends d.I{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){(0,c.w)(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateSuggestions(e){(0,u.v)(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){(0,c.A)(this.component,"_placeholder",e)}validateReadOnly(e){(0,c.h)(this.component,"_readOnly",e)}validateRequired(e){(0,c.h)(this.component,"_required",e)}validateStep(e){this.validateNumber("_step",e)}validateValue(e){this.validateNumber("_value",e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const p=class{getValue(){return h(this,null,(function*(){return this.remapValue(this.state._value)}))}kolFocus(){return h(this,null,(function*(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}))}setInitialValueType(e){this.controller.isNumberString(e)?this._initialValueType="NumberString":"number"!=typeof e||isNaN(e)?this._initialValueType="null":this._initialValueType="number"}remapValue(e){return null==e?null:"NumberString"===this._initialValueType?String(e):e}getFormFieldProps(){return{state:this.state,class:(0,o.c)("kol-input-number","number",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"number"},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return(0,i.h)(s.F,Object.assign({key:"feca61b5264bf7d6c2ff99750c740c40cd2718be"},this.getFormFieldProps()),(0,i.h)(d.a,{key:"e5c1c8c4b34e514eb48169fd3c698d9623621a26",state:this.state},(0,i.h)(r.I,Object.assign({key:"3bd9aa36a2b5cf83821f9f372c501b2424f8c8d8"},this.getInputProps()))))}constructor(e){(0,i.r)(this,e),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value;this._value=this.remapValue(""===n?null:Number(n)),this.controller.onFacade.onInput(e,!0,this._value)},this.onChange=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value,i=this.remapValue(""===n?null:Number(n));this.controller.onFacade.onChange(e,i)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||(0,l.p)({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._step=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideMsg:!1,_id:`id-${(0,a.n)()}`,_label:"",_suggestions:[]},this._initialValueType="null",this.inputHasFocus=!1,this.controller=new m(this,"number",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}static get delegatesFocus(){return!0}get host(){return(0,i.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};p.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}"}},7162:(e,t,n)=>{n.d(t,{I:()=>r,S:()=>s});var i=n(1111),o=n(6733),a=n(8176),l=(n(257),n(9867));const s=e=>{var{id:t,suggestions:n}=e,a=(0,i._)(e,["id","suggestions"]);return n?(0,o.h)("datalist",Object.assign({id:`${t}-list`},a),n.map((e=>(0,o.h)("option",{value:e})))):null},r=e=>{var{state:t,customSuggestions:n}=e,r=(0,i._)(e,["state","customSuggestions"]);return(0,o.h)(a.I,Object.assign({},function(e,t){const{ariaDescribedBy:n}=(0,l.g)(e),i={id:e._id,hideLabel:e._hideLabel,label:e._label,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:n};return"_type"in e&&(i.type=e._type),"_value"in e&&(i.value=e._value),"_required"in e&&(i.required=e._required),"_maxLength"in e&&(i.maxlength=e._maxLength),"_placeholder"in e&&(i.placeholder=e._placeholder),"_autoComplete"in e&&(i.autoComplete=e._autoComplete),"_spellCheck"in e&&(i.spellcheck=e._spellCheck),"_pattern"in e&&(i.pattern=e._pattern),"_readOnly"in e&&(i.readonly=e._readOnly),"_min"in e&&(i.min=e._min),"_max"in e&&(i.max=e._max),"_step"in e&&(i.step=e._step),"_multiple"in e&&(i.multiple=e._multiple),"_checked"in e&&(i.checked=e._checked),"_indeterminate"in e&&(i.indeterminate=e._indeterminate),"_touched"in e&&(i.touched=e._touched),"_msg"in e&&(i.msg=(0,l.a)(e._msg)),"_suggestions"in e&&!t&&Array.isArray(e._suggestions)&&e._suggestions.length>0&&(i.suggestions=(0,o.h)(s,{id:e._id,suggestions:e._suggestions})),i}(t,n),r))}},7368:(e,t,n)=>{n.d(t,{v:()=>o});var i=n(257);const o=(e,t)=>{(0,i.y)(e,"_suggestions",(e=>"string"==typeof e||"number"==typeof e),t,void 0,{hooks:{afterPatch:e=>{Array.isArray(e)&&e.length&&(0,i.b)("Property suggestions: Options have accessibility issues in how browsers implemented them and should not be used for now.")}}})}},8057:(e,t,n)=>{n.d(t,{v:()=>l});var i=n(257);const o=(e,t,n)=>{(0,i.v)(n)?e[t]=n:(0,i.q)(n,1)&&(e[t]={icon:n})},a=e=>"object"==typeof e&&null!==e&&(void 0===e.style||(0,i.t)(e.style))&&(void 0===e.label||(0,i.q)(e.label))&&(0,i.q)(e.icon,1),l=(e,t,n={})=>{(0,i.o)(t,(()=>{var l;try{t=(0,i.j)(t)}catch(e){}(0,i.w)(e,"_icons",(e=>{const t="object"==typeof e&&null!==e&&0===Object.keys(e).length;return null===e||t||(0,i.q)(e,1)||"object"==typeof e&&null!==e&&((0,i.q)(e.left,1)||a(e.left)||(0,i.q)(e.right,1)||a(e.right)||(0,i.q)(e.top,1)||a(e.top)||(0,i.q)(e.bottom,1)||a(e.bottom))}),new Set(["KoliBriIcon"]),t,Object.assign(Object.assign({},n),{defaultValue:{},hooks:{afterPatch:null===(l=n.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(e,t,a,l)=>{var s,r;"function"==typeof(null===(s=n.hooks)||void 0===s?void 0:s.beforePatch)&&(null===(r=n.hooks)||void 0===r||r.beforePatch(e,t,a,l)),(e=>{var t,n,a;if(null===(t=e.nextState)||void 0===t?void 0:t.has("_icons")){const t=null===(n=e.nextState)||void 0===n?void 0:n.get("_icons");null===(a=e.nextState)||void 0===a||a.set("_icons",(e=>{let t={};return(0,i.q)(e,1)?t={left:{icon:e}}:"object"==typeof e&&null!==e&&(o(t,"top",e.top),o(t,"right",e.right),o(t,"bottom",e.bottom),o(t,"left",e.left)),t})(t))}})(a)}}}))}))}},8176:(e,t,n)=>{n.d(t,{I:()=>s});var i=n(1111),o=n(6733),a=n(8045),l=(n(257),n(9867));const s=e=>{const{class:t,msg:n,required:s,disabled:r,touched:d,readonly:c,ariaDescribedBy:u,hideLabel:h,label:m,suggestions:p,value:b}=e,v=(0,i._)(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),_=(0,l.c)(n,d),f={"kol-input--disabled":Boolean(r),"kol-input--required":Boolean(s),"kol-input--touched":Boolean(d),"kol-input--readonly":Boolean(c),[`kol-input--${(null==n?void 0:n.type)||"error"}`]:_},g=Object.assign(Object.assign({class:(0,a.c)("kol-input",f,t),required:s,disabled:r,readonly:c,type:"text",list:p?`${v.id}-list`:void 0},(0,l.e)({ariaDescribedBy:u,hideLabel:h,label:m})),v);return(0,o.h)(o.F,null,(0,o.h)("input",Object.assign({},g,{value:b})),p)}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7013],{1335:(e,t,n)=>{n.d(t,{I:()=>r,S:()=>s});var i=n(1111),o=n(6123),a=n(6205),l=(n(257),n(4571));const s=e=>{var{id:t,suggestions:n}=e,a=(0,i._)(e,["id","suggestions"]);return n?(0,o.h)("datalist",Object.assign({id:`${t}-list`},a),n.map((e=>(0,o.h)("option",{value:e})))):null},r=e=>{var{state:t,customSuggestions:n}=e,r=(0,i._)(e,["state","customSuggestions"]);return(0,o.h)(a.I,Object.assign({},function(e,t){const{ariaDescribedBy:n}=(0,l.g)(e),i={id:e._id,hideLabel:e._hideLabel,label:e._label,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:n};return"_type"in e&&(i.type=e._type),"_value"in e&&(i.value=e._value),"_required"in e&&(i.required=e._required),"_maxLength"in e&&(i.maxlength=e._maxLength),"_placeholder"in e&&(i.placeholder=e._placeholder),"_autoComplete"in e&&(i.autoComplete=e._autoComplete),"_spellCheck"in e&&(i.spellcheck=e._spellCheck),"_pattern"in e&&(i.pattern=e._pattern),"_readOnly"in e&&(i.readonly=e._readOnly),"_min"in e&&(i.min=e._min),"_max"in e&&(i.max=e._max),"_step"in e&&(i.step=e._step),"_multiple"in e&&(i.multiple=e._multiple),"_checked"in e&&(i.checked=e._checked),"_indeterminate"in e&&(i.indeterminate=e._indeterminate),"_touched"in e&&(i.touched=e._touched),"_msg"in e&&(i.msg=(0,l.a)(e._msg)),"_suggestions"in e&&!t&&Array.isArray(e._suggestions)&&e._suggestions.length>0&&(i.suggestions=(0,o.h)(s,{id:e._id,suggestions:e._suggestions})),i}(t,n),r))}},1476:(e,t,n)=>{function i(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}n.d(t,{i:()=>i})},2074:(e,t,n)=>{n.d(t,{K:()=>a});var i=n(6123),o=n(1698);const a=e=>{const{class:t,style:n,icons:a,label:l,onClick:s}=e;return(0,i.h)(o.d,{class:t,style:n,onClick:s,_icons:a,_label:l})}},2420:(e,t,n)=>{n.d(t,{I:()=>y,K:()=>f,a:()=>g});var i=n(6123),o=n(257),a=n(1111),l=n(8045),s=n(4571),r=n(1698),d=n(2074),c=n(3806),u=n(1476),h=n(8057);const m=(e,t)=>{var{position:n="start",class:o}=e,s=(0,a._)(e,["position","class"]);const r="kol-input-container__adornment",d=`${r}--${n}`;return(0,i.h)("div",Object.assign({class:(0,l.c)(r,d,o)},s),t)};function p(e){return!!e&&(Array.isArray(e)?e.length>0:Boolean(e))}const b=(e,t)=>{var{class:n}=e,o=(0,a._)(e,["class"]);return(0,i.h)("div",Object.assign({class:(0,l.c)("kol-input-container__container",n)},o),t)},v=(e,t)=>{const{class:n,startAdornment:o,endAdornment:r,disabled:d,msg:c,touched:u,containerProps:h,startAdornmentProps:v,endAdornmentProps:_}=e,f=(0,a._)(e,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),g=(0,s.c)(c,u),y={"kol-input-container--disabled":d,[`kol-input-container--${(null==c?void 0:c.type)||"error"}`]:g},k=Object.assign({class:(0,l.c)("kol-input-container",y,n)},f);return p(o)||p(r)?(0,i.h)("div",Object.assign({},k),(0,i.h)(m,Object.assign({},v,{position:"start"}),o),(0,i.h)(b,Object.assign({},h),t),(0,i.h)(m,Object.assign({},_,{position:"end"}),r)):(0,i.h)("div",Object.assign({},k),(0,i.h)(b,Object.assign({},h),t))},_=e=>{const{label:t,icons:n,hideLabel:o,disabled:l,onClick:s}=e,d=(0,a._)(e,["label","icons","hideLabel","disabled","onClick"]);return(0,i.h)(r.a,Object.assign({_label:t,_disabled:l,_icons:n,_hideLabel:o,_on:{onClick:s}},d))},f=e=>{const{componentName:t="button",label:n,icon:o,onClick:l}=e,s=(0,a._)(e,["componentName","label","icon","onClick"]),r="button"===t?_:d.K;return(0,i.h)(r,Object.assign({label:n||"",hideLabel:!0,icons:`codicon codicon-${o}`,onClick:l},s))},g=({state:e,endAdornment:t},n)=>{const{icons:o,smartButton:a,disabled:l,msg:r,touched:d}=function(e){let t,n;return"_icons"in e&&(t=e._icons),"_smartButton"in e&&(n=e._smartButton),{icons:t,smartButton:n,disabled:e._disabled,msg:(0,s.a)(e._msg),touched:e._touched}}(e);let h=null==o?void 0:o.left;(0,c.i)(h)&&(h={icon:h});let m=null==o?void 0:o.right;(0,c.i)(m)&&(m={icon:m});const p=[],b=[];return t&&(Array.isArray(t)?b.push(...t):b.push(t)),h&&p.push((0,i.h)(f,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,u.i)(h)?h:{}))),(0,u.i)(a)&&b.push((0,i.h)(f,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},a,{hideLabel:!0,disabled:l}))),m&&b.push((0,i.h)(f,Object.assign({componentName:"icon",class:"kol-input-container__icon"},(0,u.i)(m)?m:{}))),(0,i.h)(v,{disabled:l,msg:r,touched:d,startAdornment:p,endAdornment:b},n)};class y extends s.I{constructor(e,t,n){super(e,t,n),this.numberStringRegex=/^\d+(\.\d+)?$/,this.parseToNumber=e=>"number"==typeof e?isNaN(e)?null:e:this.isNumberString(e)?parseFloat(e):null,this.validateNumber=(e,t)=>(0,o.w)(this.component,e,(e=>null==e||"number"==typeof e||"string"==typeof e&&this.numberStringRegex.test(e)),new Set(["number","NumberString"]),t,{hooks:{beforePatch:(t,n)=>{(null==n?void 0:n.has(e))&&(null==n||n.set(e,this.parseToNumber(t)))}}}),this.component=e}validateIcons(e){(0,h.v)(this.component,e)}isNumberString(e){return"string"==typeof e&&this.numberStringRegex.test(e)}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}},5151:(e,t,n)=>{n.d(t,{a:()=>l,p:()=>s});var i=n(257),o=n(1698);const a=e=>{for((0,i.F)()&&((0,i.D)("↓ Search form element start."),i.L.debug(e));e instanceof HTMLElement&&"FORM"!==e.tagName&&e.tagName!==o.g.toUpperCase();){try{e=e.parentElement instanceof HTMLElement?e.parentElement:e.parentNode instanceof ShadowRoot?e.parentNode.host:null}catch(e){}(0,i.F)()&&(i.L.debug(e),(0,i.D)("↑ Search form element finished."))}return e},l=(e={})=>{var t,n;const l=a(e.form);if(l instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===l.tagName)(0,i.I)(e,l),l.dispatchEvent(e);else if(l.tagName===o.g.toUpperCase()){(0,i.I)(e,i.a.querySelector("form",l));const o=l;"function"==typeof(null===(t=o._on)||void 0===t?void 0:t.onReset)&&(null===(n=o._on)||void 0===n||n.onReset(e))}}},s=(e={})=>{const t=a(e.form);if(t instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:t});if("FORM"===t.tagName)(0,i.F)()&&!1===t.noValidate&&(0,i.D)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout((()=>{"function"==typeof t.requestSubmit?t.requestSubmit():((0,i.I)(e,t),t.dispatchEvent(e))}));else if(t.tagName===o.g.toUpperCase()){(0,i.I)(e,i.a.querySelector("form",t));const n=t;setTimeout((()=>{var t,i;"function"==typeof(null===(t=n._on)||void 0===t?void 0:t.onSubmit)&&(null===(i=n._on)||void 0===i||i.onSubmit(e))}))}}}},6205:(e,t,n)=>{n.d(t,{I:()=>s});var i=n(1111),o=n(6123),a=n(8045),l=(n(257),n(4571));const s=e=>{const{class:t,msg:n,required:s,disabled:r,touched:d,readonly:c,ariaDescribedBy:u,hideLabel:h,label:m,suggestions:p,value:b}=e,v=(0,i._)(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),_=(0,l.c)(n,d),f={"kol-input--disabled":Boolean(r),"kol-input--required":Boolean(s),"kol-input--touched":Boolean(d),"kol-input--readonly":Boolean(c),[`kol-input--${(null==n?void 0:n.type)||"error"}`]:_},g=Object.assign(Object.assign({class:(0,a.c)("kol-input",f,t),required:s,disabled:r,readonly:c,type:"text",list:p?`${v.id}-list`:void 0},(0,l.e)({ariaDescribedBy:u,hideLabel:h,label:m})),v);return(0,o.h)(o.F,null,(0,o.h)("input",Object.assign({},g,{value:b})),p)}},7013:(e,t,n)=>{n.r(t),n.d(t,{kol_input_number:()=>p});var i=n(6123),o=n(8045),a=n(9167),l=n(5151),s=n(4571),r=n(1335),d=n(2420),c=n(257),u=n(7368),h=(n(1698),n(3694),n(1042),n(8296),n(4269),n(3710),n(5561),n(5154),n(753),n(3472),n(1111),n(2803),n(9272),n(6660),n(3185),n(5150),n(3806),n(5538),n(6205),n(2074),n(1476),n(8057),(e,t,n)=>new Promise(((i,o)=>{var a=e=>{try{s(n.next(e))}catch(e){o(e)}},l=e=>{try{s(n.throw(e))}catch(e){o(e)}},s=e=>e.done?i(e.value):Promise.resolve(e.value).then(a,l);s((n=n.apply(e,t)).next())})));class m extends d.I{constructor(e,t,n){super(e,t,n),this.component=e}validateAutoComplete(e){(0,c.w)(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateSuggestions(e){(0,u.v)(this.component,e)}validateMax(e){this.validateNumber("_max",e)}validateMin(e){this.validateNumber("_min",e)}validatePlaceholder(e){(0,c.A)(this.component,"_placeholder",e)}validateReadOnly(e){(0,c.h)(this.component,"_readOnly",e)}validateRequired(e){(0,c.h)(this.component,"_required",e)}validateStep(e){this.validateNumber("_step",e)}validateValue(e){this.validateNumber("_value",e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateValue(this.component._value)}}const p=class{getValue(){return h(this,null,(function*(){return this.remapValue(this.state._value)}))}kolFocus(){return h(this,null,(function*(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}))}setInitialValueType(e){this.controller.isNumberString(e)?this._initialValueType="NumberString":"number"!=typeof e||isNaN(e)?this._initialValueType="null":this._initialValueType="number"}remapValue(e){return null==e?null:"NumberString"===this._initialValueType?String(e):e}getFormFieldProps(){return{state:this.state,class:(0,o.c)("kol-input-number","number",{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var e;return null===(e=this.inputRef)||void 0===e?void 0:e.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state,type:"number"},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onKeyDown:this.onKeyDown,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return(0,i.h)(s.F,Object.assign({key:"feca61b5264bf7d6c2ff99750c740c40cd2718be"},this.getFormFieldProps()),(0,i.h)(d.a,{key:"e5c1c8c4b34e514eb48169fd3c698d9623621a26",state:this.state},(0,i.h)(r.I,Object.assign({key:"3bd9aa36a2b5cf83821f9f372c501b2424f8c8d8"},this.getInputProps()))))}constructor(e){(0,i.r)(this,e),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value;this._value=this.remapValue(""===n?null:Number(n)),this.controller.onFacade.onInput(e,!0,this._value)},this.onChange=e=>{var t;const n=null===(t=this.inputRef)||void 0===t?void 0:t.value,i=this.remapValue(""===n?null:Number(n));this.controller.onFacade.onChange(e,i)},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||(0,l.p)({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._step=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideMsg:!1,_id:`id-${(0,a.n)()}`,_label:"",_suggestions:[]},this._initialValueType="null",this.inputHasFocus=!1,this.controller=new m(this,"number",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAutoComplete(e){this.controller.validateAutoComplete(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMax(e){this.controller.validateMax(e)}validateMin(e){this.controller.validateMin(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSmartButton(e){this.controller.validateSmartButton(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateStep(e){this.controller.validateStep(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),null!=e&&this.setInitialValueType(e)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e))}static get delegatesFocus(){return!0}get host(){return(0,i.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};p.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}"}},7368:(e,t,n)=>{n.d(t,{v:()=>o});var i=n(257);const o=(e,t)=>{(0,i.y)(e,"_suggestions",(e=>"string"==typeof e||"number"==typeof e),t,void 0,{hooks:{afterPatch:e=>{Array.isArray(e)&&e.length&&(0,i.b)("Property suggestions: Options have accessibility issues in how browsers implemented them and should not be used for now.")}}})}},8057:(e,t,n)=>{n.d(t,{v:()=>l});var i=n(257);const o=(e,t,n)=>{(0,i.v)(n)?e[t]=n:(0,i.q)(n,1)&&(e[t]={icon:n})},a=e=>"object"==typeof e&&null!==e&&(void 0===e.style||(0,i.t)(e.style))&&(void 0===e.label||(0,i.q)(e.label))&&(0,i.q)(e.icon,1),l=(e,t,n={})=>{(0,i.o)(t,(()=>{var l;try{t=(0,i.j)(t)}catch(e){}(0,i.w)(e,"_icons",(e=>{const t="object"==typeof e&&null!==e&&0===Object.keys(e).length;return null===e||t||(0,i.q)(e,1)||"object"==typeof e&&null!==e&&((0,i.q)(e.left,1)||a(e.left)||(0,i.q)(e.right,1)||a(e.right)||(0,i.q)(e.top,1)||a(e.top)||(0,i.q)(e.bottom,1)||a(e.bottom))}),new Set(["KoliBriIcon"]),t,Object.assign(Object.assign({},n),{defaultValue:{},hooks:{afterPatch:null===(l=n.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(e,t,a,l)=>{var s,r;"function"==typeof(null===(s=n.hooks)||void 0===s?void 0:s.beforePatch)&&(null===(r=n.hooks)||void 0===r||r.beforePatch(e,t,a,l)),(e=>{var t,n,a;if(null===(t=e.nextState)||void 0===t?void 0:t.has("_icons")){const t=null===(n=e.nextState)||void 0===n?void 0:n.get("_icons");null===(a=e.nextState)||void 0===a||a.set("_icons",(e=>{let t={};return(0,i.q)(e,1)?t={left:{icon:e}}:"object"==typeof e&&null!==e&&(o(t,"top",e.top),o(t,"right",e.right),o(t,"bottom",e.bottom),o(t,"left",e.left)),t})(t))}})(a)}}}))}))}}}]);
|
package/dist/7178.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 7178.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7178],{376:(t,e,a)=>{a.d(e,{K:()=>n,i:()=>l});var i=a(5538),s=a(6733),o="[object String]";function l(t){return"string"==typeof t||!(0,i.i)(t)&&(0,i.a)(t)&&(0,i.b)(t)==o}const n=({badgeText:t,label:e})=>{const a=t;let[i,...o]=e.split(a);return 0===o.length&&(t=a.toUpperCase(),[i,...o]=e.split(a)),0===o.length&&(t=a.toLowerCase(),[i,...o]=e.split(a)),(0,s.h)(s.F,null,i,o.length?(0,s.h)(s.F,null,(0,s.h)("u",null,t),o.join(a)):null)}},753:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(257);const s=(t,e,a={})=>{(0,i.h)(t,"_hideLabel",e,a)}},1042:(t,e,a)=>{a.d(e,{A:()=>o});var i=a(257),s=a(8296);class o{constructor(t,e,a){var o,l,n,r,c;if(this.experimentalMode=(0,i.F)(),this.setFormAssociatedValue=t=>{var e;const a=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==a&&""!==a||(0,i.D)(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const s=this.tryToStringifyValue(t);this.syncValue(t,s,this.formAssociated),this.syncValue(t,s,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(a),this.type=e,(null===(o=(0,s.g)())||void 0===o?void 0:o.reflectInputValues)&&("KOL-BUTTON"===(c=null===(l=this.host)||void 0===l?void 0:l.tagName)||"KOL-COMBOBOX"===c||"KOL-INPUT-CHECKBOX"===c||"KOL-INPUT-COLOR"===c||"KOL-INPUT-DATE"===c||"KOL-INPUT-EMAIL"===c||"KOL-INPUT-FILE"===c||"KOL-INPUT-NUMBER"===c||"KOL-INPUT-PASSWORD"===c||"KOL-INPUT-RADIO"===c||"KOL-INPUT-RANGE"===c||"KOL-INPUT-TEXT"===c||"KOL-SELECT"===c||"KOL-SINGLE-SELECT"===c||"KOL-TEXTAREA"===c)&&t._name){switch(null===(n=this.host)||void 0===n||n.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.type){case"button":case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type",this.type);break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,a){if(this.experimentalMode)try{if("boolean"!=typeof(a="object"==typeof a&&null!==a?JSON.stringify(a):a)&&"number"!=typeof a&&"string"!=typeof a)throw new Error("Invalid value type: "+typeof a);null==e||e.setAttribute(t,`${a}`)}catch(a){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return(0,i.G)(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,a){if(a)switch(this.type){case"file":a.files=t;break;case"select":a.querySelectorAll("option").forEach((t=>{a.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),a.appendChild(t)}}));break;case"radio":"string"==typeof e&&(a.setAttribute("value",e),a.setAttribute("checked",""),a.value=e);break;default:"string"==typeof e?(a.setAttribute("value",e),a.value=e):(a.removeAttribute("value"),a.value="")}}validateName(t){((t,e,a)=>{(0,i.A)(t,"_name",e,a)})(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&(0,i.D)("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}validateSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}},1476:(t,e,a)=>{function i(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}a.d(e,{i:()=>i})},2061:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(257);const s=(t,e)=>{(0,i.h)(t,"_disabled",e,{hooks:{afterPatch:t=>{!0===t&&(0,i.i)()}}})}},2190:(t,e,a)=>{a.d(e,{i:()=>l,n:()=>r,r:()=>n});var i=a(257),s=a(6733);const o=()=>{let t=(0,i.e)().KoliBri;return void 0===t&&(t={},Object.defineProperty((0,i.e)(),"KoliBri",{value:t,writable:!1})),t},l=()=>{(()=>{const t=(0,i.g)().querySelector('meta[name="kolibri"]');if(t&&t.hasAttribute("content")){const e=t.getAttribute("content");"string"==typeof e&&((0,i.s)(e.includes("dev-mode=true")),(0,i.c)(e.includes("experimental-mode=true")),(0,i.d)(e.includes("color-contrast-analysis=true")))}})(),i.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${s.E.kolibriVersion}\n\t`,{forceLog:!0})},n=()=>{!0!==o().adviceShown&&(Object.defineProperty(o(),"adviceShown",{get:function(){return!0}}),i.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let r=()=>Math.floor(16777215*Math.random()).toString(16);"test"===i.p&&(r=()=>"nonce")},3472:(t,e,a)=>{a.d(e,{a:()=>h,b:()=>n,c:()=>r,h:()=>s,v:()=>d});var i=a(257);const s=[0,1,2,3,4,5,6],o=/[a-zA-Z0-9äöüÄÖÜß]/g,l=/^\d+$/;function n(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(o))||void 0===e?void 0:e.length)||0}(t)>=e}function r(t){return l.test(t)}const c=new Set(["string"]),d=(t,e,a={})=>{(0,i.w)(t,"_label",(t=>"string"==typeof t),c,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,a,s,o)=>{var l,c;"function"==typeof(null===(l=t.hooks)||void 0===l?void 0:l.afterPatch)&&(null===(c=t.hooks)||void 0===c||c.afterPatch(e,a,s,o)),"string"==typeof e&&!1===n(e,3)&&!1===r(e)&&(0,i.b)(`The heading or label ("${e}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof e&&e.length>80&&(0,i.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}})}(a))},h=d},3710:(t,e,a)=>{a.d(e,{a:()=>r,b:()=>n,c:()=>l,v:()=>s});var i=a(257);const s=(t,e)=>{(0,i.A)(t,"_accessKey",e)},o={hooks:{afterPatch:t=>{-1!==t&&0!==t&&(0,i.b)("Don't Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},l=(t,e)=>{(0,i.E)(t,"_tabIndex",e,o)},n=(t,e)=>{(0,i.A)(t,"_shortKey",e)},r=(t,e)=>{if(t&&e)throw new Error("AccessKey and ShortKey are used. Only one is allowed.")}},3885:(t,e,a)=>{a.d(e,{K:()=>o});var i=a(6733),s=a(1698);const o=t=>{const{class:e,style:a,icons:o,label:l,onClick:n}=t;return(0,i.h)(s.d,{class:e,style:a,onClick:n,_icons:o,_label:l})}},5151:(t,e,a)=>{a.d(e,{a:()=>l,p:()=>n});var i=a(257),s=a(1698);const o=t=>{for((0,i.F)()&&((0,i.D)("↓ Search form element start."),i.L.debug(t));t instanceof HTMLElement&&"FORM"!==t.tagName&&t.tagName!==s.g.toUpperCase();){try{t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null}catch(t){}(0,i.F)()&&(i.L.debug(t),(0,i.D)("↑ Search form element finished."))}return t},l=(t={})=>{var e,a;const l=o(t.form);if(l instanceof HTMLElement){const t=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===l.tagName)(0,i.I)(t,l),l.dispatchEvent(t);else if(l.tagName===s.g.toUpperCase()){(0,i.I)(t,i.a.querySelector("form",l));const s=l;"function"==typeof(null===(e=s._on)||void 0===e?void 0:e.onReset)&&(null===(a=s._on)||void 0===a||a.onReset(t))}}},n=(t={})=>{const e=o(t.form);if(e instanceof HTMLElement){const t=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:e});if("FORM"===e.tagName)(0,i.F)()&&!1===e.noValidate&&(0,i.D)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout((()=>{"function"==typeof e.requestSubmit?e.requestSubmit():((0,i.I)(t,e),e.dispatchEvent(t))}));else if(e.tagName===s.g.toUpperCase()){(0,i.I)(t,i.a.querySelector("form",e));const a=e;setTimeout((()=>{var e,i;"function"==typeof(null===(e=a._on)||void 0===e?void 0:e.onSubmit)&&(null===(i=a._on)||void 0===i||i.onSubmit(t))}))}}}},5154:(t,e,a)=>{a.d(e,{a:()=>s,v:()=>l});var i=a(257);const s=(t,e,a)=>{(0,i.w)(t,e,(t=>"string"==typeof t&&o.includes(t)),new Set(o),a,{defaultValue:"top"})},o=["left","right","top","bottom"],l=(t,e)=>{s(t,"_align",e)}},5538:(t,e,a)=>{a.d(e,{S:()=>l,a:()=>p,b:()=>f,f:()=>i,i:()=>_,r:()=>o});const i="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g;var s="object"==typeof self&&self&&self.Object===Object&&self;const o=i||s||Function("return this")(),l=o.Symbol;var n=Object.prototype,r=n.hasOwnProperty,c=n.toString,d=l?l.toStringTag:void 0,h=Object.prototype.toString,u="[object Null]",b="[object Undefined]",v=l?l.toStringTag:void 0;function f(t){return null==t?void 0===t?b:u:v&&v in Object(t)?function(t){var e=r.call(t,d),a=t[d];try{t[d]=void 0;var i=!0}catch(t){}var s=c.call(t);return i&&(e?t[d]=a:delete t[d]),s}(t):function(t){return h.call(t)}(t)}function p(t){return null!=t&&"object"==typeof t}const _=Array.isArray},5561:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(5154);a(257);const s=(t,e)=>{(0,i.a)(t,"_tooltipAlign",e)}},7178:(t,e,a)=>{a.r(e),a.d(e,{kol_button_wc:()=>A});var i=a(6733),s=a(257),o=a(3694),l=a(2190),n=a(5151),r=a(1042),c=a(1698),d=a(3710),h=a(8045),u=(a(9272),a(6660),a(8386)),b=a(8768),v=a(7881),f=a(2061),p=a(753),_=a(8057),y=a(3472),m=a(5561);a(8296),a(4269),a(3185),a(1111),a(3885),a(6363),a(376),a(5538),a(1476),a(5154);const g=["button","reset","submit"],A=class{kolFocus(){return t=this,e=function*(){var t;null===(t=this.buttonRef)||void 0===t||t.focus()},new Promise(((a,i)=>{var s=t=>{try{l(e.next(t))}catch(t){i(t)}},o=t=>{try{l(e.throw(t))}catch(t){i(t)}},l=t=>t.done?a(t.value):Promise.resolve(t.value).then(s,o);l((e=e.apply(t,null)).next())}));var t,e}render(){var t,e;const a=(0,s.l)(this.state._label),o=Boolean(null===(e=null===(t=this.state._ariaDescription)||void 0===t?void 0:t.trim())||void 0===e?void 0:e.length),l=this.state._accessKey||this.state._shortKey;return(0,i.h)(i.H,{key:"d94296c447c53cca42b7528040a6e133f984e5ee"},(0,i.h)("button",{key:"06b70077d51672e90774f8342e383007252bafd4",ref:this.catchRef,accessKey:this.state._accessKey||void 0,"aria-controls":this.state._ariaControls,"aria-describedby":o?this.internalDescriptionById:void 0,"aria-expanded":(0,s.O)(this.state._ariaExpanded),"aria-haspopup":this._ariaHasPopup,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":(0,s.P)(this.state._ariaSelected),class:(0,h.c)("kol-button",{"kol-button--disabled":!0===this.state._disabled,[`kol-button--${this.state._variant}`]:"custom"!==this.state._variant,"kol-button--hide-label":!0===this.state._hideLabel,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0}),disabled:this.state._disabled,id:this.state._id,name:this.state._name,onClick:this.onClick,onMouseDown:this.onMouseDown,role:this.state._role,tabIndex:this.state._tabIndex,type:this.state._type},(0,i.h)(u.K,{key:"730ec14988b2731caafdf350485e3da7164eb9a2",class:"kol-button__text",badgeText:l,icons:this.state._icons,hideLabel:this.state._hideLabel,label:a?"":this.state._label},(0,i.h)("slot",{key:"d4340b53b690ec8cbc8b0a7cafcbe614352432a0",name:"expert",slot:"expert"}))),(0,i.h)(c.f,{key:"b18fdaa2da5d12cab05f514ef719f7a08a2da0c8","aria-hidden":"true",hidden:a||!this.state._hideLabel,class:"kol-button__tooltip",_badgeText:l,_align:this.state._tooltipAlign,_label:"string"==typeof this.state._label?this.state._label:""}),o&&(0,i.h)("span",{key:"8ff3b675471a480a6a5cdb940cb79739af92e13d",class:"visually-hidden",id:this.internalDescriptionById},this.state._ariaDescription))}constructor(t){(0,i.r)(this,t),this.internalDescriptionById=(0,l.n)(),this.catchRef=t=>{this.buttonRef=t},this.onClick=t=>{var e,a;"submit"===this.state._type?(0,n.p)({form:this.host,ref:this.buttonRef}):"reset"===this.state._type?(0,n.a)({form:this.host,ref:this.buttonRef}):(this.controller.setFormAssociatedValue(this.state._value),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onClick)&&((0,s.I)(t,this.buttonRef),null===(a=this.state._on)||void 0===a||a.onClick(t,this.state._value))),this.host&&(0,o.d)(this.host,o.K.click,this.state._value)},this.onMouseDown=t=>{var e,a,i;null===(i=null===(a=null===(e=this.state)||void 0===e?void 0:e._on)||void 0===a?void 0:a.onMouseDown)||void 0===i||i.call(a,t),this.host&&(0,o.d)(this.host,o.K.mousedown)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaDescription=void 0,this._ariaExpanded=void 0,this._ariaHasPopup=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_icons:{},_label:"",_on:{},_type:"button",_variant:"normal"},this.controller=new r.A(this,"button",this.host)}validateAccessKey(t){(0,d.v)(this,t),(0,d.a)(t,this._shortKey)}validateAriaControls(t){((t,e)=>{(0,s.A)(t,"_ariaControls",e)})(this,t)}validateAriaDescription(t){(0,b.v)(this,t)}validateAriaExpanded(t){(0,b.a)(this,t)}validateAriaSelected(t){((t,e)=>{(0,s.h)(t,"_ariaSelected",e)})(this,t)}validateCustomClass(t){(0,v.v)(this,t)}validateDisabled(t){(0,f.v)(this,t)}validateHideLabel(t){(0,p.v)(this,t)}validateIcons(t){(0,_.v)(this,t)}validateId(t){(0,s.A)(this,"_id",t)}validateLabel(t){(0,y.a)(this,t,{required:!0})}validateName(t){this.controller.validateName(t)}validateOn(t){((t,e)=>{(0,s.w)(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}"]),e)})(this,t)}validateRole(t){(0,b.b)(this,t)}validateShortKey(t){(0,d.b)(this,t),(0,d.a)(this._accessKey,t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){(0,d.c)(this,t)}validateTooltipAlign(t){(0,m.v)(this,t)}validateType(t){((t,e)=>{(0,s.w)(t,"_type",(t=>"string"==typeof t&&g.includes(t)),new Set([`KoliBriButtonType {${g.join(", ")}`]),e)})(this,t)}validateValue(t){(0,s.k)(this,"_value",t),this.controller.setFormAssociatedValue(this.state._value)}validateVariant(t){(0,b.c)(this,t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaDescription(this._ariaDescription),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel),this.validateIcons(this._icons),this.validateId(this._id),this.validateLabel(this._label),this.validateName(this._name),this.validateOn(this._on),this.validateRole(this._role),this.validateShortKey(this._shortKey),this.validateSyncValueBySelector(this._syncValueBySelector),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateValue(this._value),this.validateVariant(this._variant),(0,d.a)(this._accessKey,this._shortKey)}get host(){return(0,i.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaDescription:["validateAriaDescription"],_ariaExpanded:["validateAriaExpanded"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}}}},7881:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(257);const s=(t,e)=>{(0,i.A)(t,"_customClass",e,{defaultValue:void 0})}},8057:(t,e,a)=>{a.d(e,{v:()=>l});var i=a(257);const s=(t,e,a)=>{(0,i.v)(a)?t[e]=a:(0,i.q)(a,1)&&(t[e]={icon:a})},o=t=>"object"==typeof t&&null!==t&&(void 0===t.style||(0,i.t)(t.style))&&(void 0===t.label||(0,i.q)(t.label))&&(0,i.q)(t.icon,1),l=(t,e,a={})=>{(0,i.o)(e,(()=>{var l;try{e=(0,i.j)(e)}catch(t){}(0,i.w)(t,"_icons",(t=>{const e="object"==typeof t&&null!==t&&0===Object.keys(t).length;return null===t||e||(0,i.q)(t,1)||"object"==typeof t&&null!==t&&((0,i.q)(t.left,1)||o(t.left)||(0,i.q)(t.right,1)||o(t.right)||(0,i.q)(t.top,1)||o(t.top)||(0,i.q)(t.bottom,1)||o(t.bottom))}),new Set(["KoliBriIcon"]),e,Object.assign(Object.assign({},a),{defaultValue:{},hooks:{afterPatch:null===(l=a.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(t,e,o,l)=>{var n,r;"function"==typeof(null===(n=a.hooks)||void 0===n?void 0:n.beforePatch)&&(null===(r=a.hooks)||void 0===r||r.beforePatch(t,e,o,l)),(t=>{var e,a,o;if(null===(e=t.nextState)||void 0===e?void 0:e.has("_icons")){const e=null===(a=t.nextState)||void 0===a?void 0:a.get("_icons");null===(o=t.nextState)||void 0===o||o.set("_icons",(t=>{let e={};return(0,i.q)(t,1)?e={left:{icon:t}}:"object"==typeof t&&null!==t&&(s(e,"top",t.top),s(e,"right",t.right),s(e,"bottom",t.bottom),s(e,"left",t.left)),e})(e))}})(o)}}}))}))}},8386:(t,e,a)=>{a.d(e,{K:()=>v});var i=a(1111),s=a(6733),o=a(8045),l=a(3885),n=a(257),r=a(6363),c=a(376),d=a(1476);const h=t=>{const{class:e,style:a,label:i,icon:n}=t;return(0,s.h)(l.K,{class:(0,o.c)("icon",e),style:a,label:i||"",icons:n})},u=({label:t,hideLabel:e,allowMarkdown:a,badgeText:i})=>{if(e||!(0,c.i)(t))return null;const l="kol-span__label";return a?(0,s.h)("span",{class:(0,o.c)(l,"md"),innerHTML:(0,r.m)(t)}):i?(0,s.h)("span",{class:(0,o.c)(l)},(0,s.h)(c.K,{label:t,badgeText:i})):(0,s.h)("span",{class:(0,o.c)(l)},t)},b=({hideLabel:t,label:e,badgeText:a,allowMarkdown:i},o)=>{const l=!(0,n.l)(e);return(0,s.h)(s.F,null,l&&(0,s.h)(u,{label:e,hideLabel:t,badgeText:a,allowMarkdown:i}),(0,s.h)("span",{"aria-hidden":l?"true":void 0,class:"kol-span__label",hidden:l},o),(0,c.i)(a)&&a.length>0&&(0,s.h)("span",{class:"badge-text-hint","aria-hidden":"true"},a))},v=(t,e)=>{const{class:a,label:l,hideLabel:n=!1,badgeText:r,allowMarkdown:u,icons:v}=t,f=(0,i._)(t,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let p=null,_=null,y=null,m=null;return(0,d.i)(v)?(p=v.top,_=v.left,y=v.right,m=v.bottom):(0,c.i)(v)&&(_={icon:v}),(0,s.h)("span",Object.assign({class:(0,o.c)("kol-span",{"kol-span--hide-label":n},a)},f),(0,d.i)(p)&&(0,s.h)(h,Object.assign({class:"top"},p)),(0,s.h)("span",{class:"kol-span__container"},(0,d.i)(_)&&(0,s.h)(h,Object.assign({class:"left"},_)),(0,s.h)(b,{label:l,hideLabel:n,allowMarkdown:u,badgeText:r},e),(0,d.i)(y)&&(0,s.h)(h,Object.assign({class:"right"},y))),(0,d.i)(m)&&(0,s.h)(h,Object.assign({class:"bottom"},m)))}},8768:(t,e,a)=>{a.d(e,{a:()=>n,b:()=>o,c:()=>c,v:()=>l});var i=a(257);const s=["button","link","tab","treeitem"],o=(t,e)=>{(0,i.w)(t,"_role",(t=>"string"==typeof t&&s.includes(t)),new Set([`KoliBriAlternativeButtonLinkRole {${s.join(", ")}`]),e)},l=(t,e)=>{(0,i.A)(t,"_ariaDescription",e)},n=(t,e)=>{(0,i.h)(t,"_ariaExpanded",e)},r=["primary","secondary","normal","tertiary","danger","ghost","custom"],c=(t,e)=>{(0,i.w)(t,"_variant",(t=>"string"==typeof t&&r.includes(t)),new Set([`KoliBriButtonVariant {${r.join(", ")}`]),e,{defaultValue:"normal"})}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7178],{753:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(257);const s=(t,e,a={})=>{(0,i.h)(t,"_hideLabel",e,a)}},1042:(t,e,a)=>{a.d(e,{A:()=>o});var i=a(257),s=a(8296);class o{constructor(t,e,a){var o,l,n,r,c;if(this.experimentalMode=(0,i.F)(),this.setFormAssociatedValue=t=>{var e;const a=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==a&&""!==a||(0,i.D)(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);const s=this.tryToStringifyValue(t);this.syncValue(t,s,this.formAssociated),this.syncValue(t,s,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(a),this.type=e,(null===(o=(0,s.g)())||void 0===o?void 0:o.reflectInputValues)&&("KOL-BUTTON"===(c=null===(l=this.host)||void 0===l?void 0:l.tagName)||"KOL-COMBOBOX"===c||"KOL-INPUT-CHECKBOX"===c||"KOL-INPUT-COLOR"===c||"KOL-INPUT-DATE"===c||"KOL-INPUT-EMAIL"===c||"KOL-INPUT-FILE"===c||"KOL-INPUT-NUMBER"===c||"KOL-INPUT-PASSWORD"===c||"KOL-INPUT-RADIO"===c||"KOL-INPUT-RANGE"===c||"KOL-INPUT-TEXT"===c||"KOL-SELECT"===c||"KOL-SINGLE-SELECT"===c||"KOL-TEXTAREA"===c)&&t._name){switch(null===(n=this.host)||void 0===n||n.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.type){case"button":case"color":case"date":case"email":case"file":case"number":case"password":case"radio":case"range":case"text":this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type",this.type);break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(r=this.host)||void 0===r||r.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,a){if(this.experimentalMode)try{if("boolean"!=typeof(a="object"==typeof a&&null!==a?JSON.stringify(a):a)&&"number"!=typeof a&&"string"!=typeof a)throw new Error("Invalid value type: "+typeof a);null==e||e.setAttribute(t,`${a}`)}catch(a){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return(0,i.G)(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,a){if(a)switch(this.type){case"file":a.files=t;break;case"select":a.querySelectorAll("option").forEach((t=>{a.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),a.appendChild(t)}}));break;case"radio":"string"==typeof e&&(a.setAttribute("value",e),a.setAttribute("checked",""),a.value=e);break;default:"string"==typeof e?(a.setAttribute("value",e),a.value=e):(a.removeAttribute("value"),a.value="")}}validateName(t){((t,e,a)=>{(0,i.A)(t,"_name",e,a)})(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&(0,i.D)("A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.")}validateSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}},1476:(t,e,a)=>{function i(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}a.d(e,{i:()=>i})},2061:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(257);const s=(t,e)=>{(0,i.h)(t,"_disabled",e,{hooks:{afterPatch:t=>{!0===t&&(0,i.i)()}}})}},2074:(t,e,a)=>{a.d(e,{K:()=>o});var i=a(6123),s=a(1698);const o=t=>{const{class:e,style:a,icons:o,label:l,onClick:n}=t;return(0,i.h)(s.d,{class:e,style:a,onClick:n,_icons:o,_label:l})}},3472:(t,e,a)=>{a.d(e,{a:()=>h,b:()=>n,c:()=>r,h:()=>s,v:()=>d});var i=a(257);const s=[0,1,2,3,4,5,6],o=/[a-zA-Z0-9äöüÄÖÜß]/g,l=/^\d+$/;function n(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(o))||void 0===e?void 0:e.length)||0}(t)>=e}function r(t){return l.test(t)}const c=new Set(["string"]),d=(t,e,a={})=>{(0,i.w)(t,"_label",(t=>"string"==typeof t),c,e,function(t){var e;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(e,a,s,o)=>{var l,c;"function"==typeof(null===(l=t.hooks)||void 0===l?void 0:l.afterPatch)&&(null===(c=t.hooks)||void 0===c||c.afterPatch(e,a,s,o)),"string"==typeof e&&!1===n(e,3)&&!1===r(e)&&(0,i.b)(`The heading or label ("${e}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof e&&e.length>80&&(0,i.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}})}(a))},h=d},3710:(t,e,a)=>{a.d(e,{a:()=>r,b:()=>n,c:()=>l,v:()=>s});var i=a(257);const s=(t,e)=>{(0,i.A)(t,"_accessKey",e)},o={hooks:{afterPatch:t=>{-1!==t&&0!==t&&(0,i.b)("Don't Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},l=(t,e)=>{(0,i.E)(t,"_tabIndex",e,o)},n=(t,e)=>{(0,i.A)(t,"_shortKey",e)},r=(t,e)=>{if(t&&e)throw new Error("AccessKey and ShortKey are used. Only one is allowed.")}},3806:(t,e,a)=>{a.d(e,{K:()=>n,i:()=>l});var i=a(5538),s=a(6123),o="[object String]";function l(t){return"string"==typeof t||!(0,i.i)(t)&&(0,i.a)(t)&&(0,i.b)(t)==o}const n=({badgeText:t,label:e})=>{const a=t;let[i,...o]=e.split(a);return 0===o.length&&(t=a.toUpperCase(),[i,...o]=e.split(a)),0===o.length&&(t=a.toLowerCase(),[i,...o]=e.split(a)),(0,s.h)(s.F,null,i,o.length?(0,s.h)(s.F,null,(0,s.h)("u",null,t),o.join(a)):null)}},5151:(t,e,a)=>{a.d(e,{a:()=>l,p:()=>n});var i=a(257),s=a(1698);const o=t=>{for((0,i.F)()&&((0,i.D)("↓ Search form element start."),i.L.debug(t));t instanceof HTMLElement&&"FORM"!==t.tagName&&t.tagName!==s.g.toUpperCase();){try{t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null}catch(t){}(0,i.F)()&&(i.L.debug(t),(0,i.D)("↑ Search form element finished."))}return t},l=(t={})=>{var e,a;const l=o(t.form);if(l instanceof HTMLElement){const t=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===l.tagName)(0,i.I)(t,l),l.dispatchEvent(t);else if(l.tagName===s.g.toUpperCase()){(0,i.I)(t,i.a.querySelector("form",l));const s=l;"function"==typeof(null===(e=s._on)||void 0===e?void 0:e.onReset)&&(null===(a=s._on)||void 0===a||a.onReset(t))}}},n=(t={})=>{const e=o(t.form);if(e instanceof HTMLElement){const t=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:e});if("FORM"===e.tagName)(0,i.F)()&&!1===e.noValidate&&(0,i.D)("If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.",{force:!0}),setTimeout((()=>{"function"==typeof e.requestSubmit?e.requestSubmit():((0,i.I)(t,e),e.dispatchEvent(t))}));else if(e.tagName===s.g.toUpperCase()){(0,i.I)(t,i.a.querySelector("form",e));const a=e;setTimeout((()=>{var e,i;"function"==typeof(null===(e=a._on)||void 0===e?void 0:e.onSubmit)&&(null===(i=a._on)||void 0===i||i.onSubmit(t))}))}}}},5154:(t,e,a)=>{a.d(e,{a:()=>s,v:()=>l});var i=a(257);const s=(t,e,a)=>{(0,i.w)(t,e,(t=>"string"==typeof t&&o.includes(t)),new Set(o),a,{defaultValue:"top"})},o=["left","right","top","bottom"],l=(t,e)=>{s(t,"_align",e)}},5538:(t,e,a)=>{a.d(e,{S:()=>l,a:()=>p,b:()=>f,f:()=>i,i:()=>_,r:()=>o});const i="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g;var s="object"==typeof self&&self&&self.Object===Object&&self;const o=i||s||Function("return this")(),l=o.Symbol;var n=Object.prototype,r=n.hasOwnProperty,c=n.toString,d=l?l.toStringTag:void 0,h=Object.prototype.toString,u="[object Null]",b="[object Undefined]",v=l?l.toStringTag:void 0;function f(t){return null==t?void 0===t?b:u:v&&v in Object(t)?function(t){var e=r.call(t,d),a=t[d];try{t[d]=void 0;var i=!0}catch(t){}var s=c.call(t);return i&&(e?t[d]=a:delete t[d]),s}(t):function(t){return h.call(t)}(t)}function p(t){return null!=t&&"object"==typeof t}const _=Array.isArray},5561:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(5154);a(257);const s=(t,e)=>{(0,i.a)(t,"_tooltipAlign",e)}},7178:(t,e,a)=>{a.r(e),a.d(e,{kol_button_wc:()=>A});var i=a(6123),s=a(257),o=a(3694),l=a(9167),n=a(5151),r=a(1042),c=a(1698),d=a(3710),h=a(8045),u=(a(9272),a(6660),a(8216)),b=a(8768),v=a(7881),f=a(2061),p=a(753),_=a(8057),y=a(3472),m=a(5561);a(8296),a(4269),a(3185),a(1111),a(2074),a(6363),a(3806),a(5538),a(1476),a(5154);const g=["button","reset","submit"],A=class{kolFocus(){return t=this,e=function*(){var t;null===(t=this.buttonRef)||void 0===t||t.focus()},new Promise(((a,i)=>{var s=t=>{try{l(e.next(t))}catch(t){i(t)}},o=t=>{try{l(e.throw(t))}catch(t){i(t)}},l=t=>t.done?a(t.value):Promise.resolve(t.value).then(s,o);l((e=e.apply(t,null)).next())}));var t,e}render(){var t,e;const a=(0,s.l)(this.state._label),o=Boolean(null===(e=null===(t=this.state._ariaDescription)||void 0===t?void 0:t.trim())||void 0===e?void 0:e.length),l=this.state._accessKey||this.state._shortKey;return(0,i.h)(i.H,{key:"d94296c447c53cca42b7528040a6e133f984e5ee"},(0,i.h)("button",{key:"06b70077d51672e90774f8342e383007252bafd4",ref:this.catchRef,accessKey:this.state._accessKey||void 0,"aria-controls":this.state._ariaControls,"aria-describedby":o?this.internalDescriptionById:void 0,"aria-expanded":(0,s.O)(this.state._ariaExpanded),"aria-haspopup":this._ariaHasPopup,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":(0,s.P)(this.state._ariaSelected),class:(0,h.c)("kol-button",{"kol-button--disabled":!0===this.state._disabled,[`kol-button--${this.state._variant}`]:"custom"!==this.state._variant,"kol-button--hide-label":!0===this.state._hideLabel,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0}),disabled:this.state._disabled,id:this.state._id,name:this.state._name,onClick:this.onClick,onMouseDown:this.onMouseDown,role:this.state._role,tabIndex:this.state._tabIndex,type:this.state._type},(0,i.h)(u.K,{key:"730ec14988b2731caafdf350485e3da7164eb9a2",class:"kol-button__text",badgeText:l,icons:this.state._icons,hideLabel:this.state._hideLabel,label:a?"":this.state._label},(0,i.h)("slot",{key:"d4340b53b690ec8cbc8b0a7cafcbe614352432a0",name:"expert",slot:"expert"}))),(0,i.h)(c.f,{key:"b18fdaa2da5d12cab05f514ef719f7a08a2da0c8","aria-hidden":"true",hidden:a||!this.state._hideLabel,class:"kol-button__tooltip",_badgeText:l,_align:this.state._tooltipAlign,_label:"string"==typeof this.state._label?this.state._label:""}),o&&(0,i.h)("span",{key:"8ff3b675471a480a6a5cdb940cb79739af92e13d",class:"visually-hidden",id:this.internalDescriptionById},this.state._ariaDescription))}constructor(t){(0,i.r)(this,t),this.internalDescriptionById=(0,l.n)(),this.catchRef=t=>{this.buttonRef=t},this.onClick=t=>{var e,a;"submit"===this.state._type?(0,n.p)({form:this.host,ref:this.buttonRef}):"reset"===this.state._type?(0,n.a)({form:this.host,ref:this.buttonRef}):(this.controller.setFormAssociatedValue(this.state._value),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onClick)&&((0,s.I)(t,this.buttonRef),null===(a=this.state._on)||void 0===a||a.onClick(t,this.state._value))),this.host&&(0,o.d)(this.host,o.K.click,this.state._value)},this.onMouseDown=t=>{var e,a,i;null===(i=null===(a=null===(e=this.state)||void 0===e?void 0:e._on)||void 0===a?void 0:a.onMouseDown)||void 0===i||i.call(a,t),this.host&&(0,o.d)(this.host,o.K.mousedown)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaDescription=void 0,this._ariaExpanded=void 0,this._ariaHasPopup=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_icons:{},_label:"",_on:{},_type:"button",_variant:"normal"},this.controller=new r.A(this,"button",this.host)}validateAccessKey(t){(0,d.v)(this,t),(0,d.a)(t,this._shortKey)}validateAriaControls(t){((t,e)=>{(0,s.A)(t,"_ariaControls",e)})(this,t)}validateAriaDescription(t){(0,b.v)(this,t)}validateAriaExpanded(t){(0,b.a)(this,t)}validateAriaSelected(t){((t,e)=>{(0,s.h)(t,"_ariaSelected",e)})(this,t)}validateCustomClass(t){(0,v.v)(this,t)}validateDisabled(t){(0,f.v)(this,t)}validateHideLabel(t){(0,p.v)(this,t)}validateIcons(t){(0,_.v)(this,t)}validateId(t){(0,s.A)(this,"_id",t)}validateLabel(t){(0,y.a)(this,t,{required:!0})}validateName(t){this.controller.validateName(t)}validateOn(t){((t,e)=>{(0,s.w)(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}"]),e)})(this,t)}validateRole(t){(0,b.b)(this,t)}validateShortKey(t){(0,d.b)(this,t),(0,d.a)(this._accessKey,t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){(0,d.c)(this,t)}validateTooltipAlign(t){(0,m.v)(this,t)}validateType(t){((t,e)=>{(0,s.w)(t,"_type",(t=>"string"==typeof t&&g.includes(t)),new Set([`KoliBriButtonType {${g.join(", ")}`]),e)})(this,t)}validateValue(t){(0,s.k)(this,"_value",t),this.controller.setFormAssociatedValue(this.state._value)}validateVariant(t){(0,b.c)(this,t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaDescription(this._ariaDescription),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel),this.validateIcons(this._icons),this.validateId(this._id),this.validateLabel(this._label),this.validateName(this._name),this.validateOn(this._on),this.validateRole(this._role),this.validateShortKey(this._shortKey),this.validateSyncValueBySelector(this._syncValueBySelector),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateValue(this._value),this.validateVariant(this._variant),(0,d.a)(this._accessKey,this._shortKey)}get host(){return(0,i.g)(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaDescription:["validateAriaDescription"],_ariaExpanded:["validateAriaExpanded"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}}}},7881:(t,e,a)=>{a.d(e,{v:()=>s});var i=a(257);const s=(t,e)=>{(0,i.A)(t,"_customClass",e,{defaultValue:void 0})}},8057:(t,e,a)=>{a.d(e,{v:()=>l});var i=a(257);const s=(t,e,a)=>{(0,i.v)(a)?t[e]=a:(0,i.q)(a,1)&&(t[e]={icon:a})},o=t=>"object"==typeof t&&null!==t&&(void 0===t.style||(0,i.t)(t.style))&&(void 0===t.label||(0,i.q)(t.label))&&(0,i.q)(t.icon,1),l=(t,e,a={})=>{(0,i.o)(e,(()=>{var l;try{e=(0,i.j)(e)}catch(t){}(0,i.w)(t,"_icons",(t=>{const e="object"==typeof t&&null!==t&&0===Object.keys(t).length;return null===t||e||(0,i.q)(t,1)||"object"==typeof t&&null!==t&&((0,i.q)(t.left,1)||o(t.left)||(0,i.q)(t.right,1)||o(t.right)||(0,i.q)(t.top,1)||o(t.top)||(0,i.q)(t.bottom,1)||o(t.bottom))}),new Set(["KoliBriIcon"]),e,Object.assign(Object.assign({},a),{defaultValue:{},hooks:{afterPatch:null===(l=a.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(t,e,o,l)=>{var n,r;"function"==typeof(null===(n=a.hooks)||void 0===n?void 0:n.beforePatch)&&(null===(r=a.hooks)||void 0===r||r.beforePatch(t,e,o,l)),(t=>{var e,a,o;if(null===(e=t.nextState)||void 0===e?void 0:e.has("_icons")){const e=null===(a=t.nextState)||void 0===a?void 0:a.get("_icons");null===(o=t.nextState)||void 0===o||o.set("_icons",(t=>{let e={};return(0,i.q)(t,1)?e={left:{icon:t}}:"object"==typeof t&&null!==t&&(s(e,"top",t.top),s(e,"right",t.right),s(e,"bottom",t.bottom),s(e,"left",t.left)),e})(e))}})(o)}}}))}))}},8216:(t,e,a)=>{a.d(e,{K:()=>v});var i=a(1111),s=a(6123),o=a(8045),l=a(2074),n=a(257),r=a(6363),c=a(3806),d=a(1476);const h=t=>{const{class:e,style:a,label:i,icon:n}=t;return(0,s.h)(l.K,{class:(0,o.c)("icon",e),style:a,label:i||"",icons:n})},u=({label:t,hideLabel:e,allowMarkdown:a,badgeText:i})=>{if(e||!(0,c.i)(t))return null;const l="kol-span__label";return a?(0,s.h)("span",{class:(0,o.c)(l,"md"),innerHTML:(0,r.m)(t)}):i?(0,s.h)("span",{class:(0,o.c)(l)},(0,s.h)(c.K,{label:t,badgeText:i})):(0,s.h)("span",{class:(0,o.c)(l)},t)},b=({hideLabel:t,label:e,badgeText:a,allowMarkdown:i},o)=>{const l=!(0,n.l)(e);return(0,s.h)(s.F,null,l&&(0,s.h)(u,{label:e,hideLabel:t,badgeText:a,allowMarkdown:i}),(0,s.h)("span",{"aria-hidden":l?"true":void 0,class:"kol-span__label",hidden:l},o),(0,c.i)(a)&&a.length>0&&(0,s.h)("span",{class:"badge-text-hint","aria-hidden":"true"},a))},v=(t,e)=>{const{class:a,label:l,hideLabel:n=!1,badgeText:r,allowMarkdown:u,icons:v}=t,f=(0,i._)(t,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let p=null,_=null,y=null,m=null;return(0,d.i)(v)?(p=v.top,_=v.left,y=v.right,m=v.bottom):(0,c.i)(v)&&(_={icon:v}),(0,s.h)("span",Object.assign({class:(0,o.c)("kol-span",{"kol-span--hide-label":n},a)},f),(0,d.i)(p)&&(0,s.h)(h,Object.assign({class:"top"},p)),(0,s.h)("span",{class:"kol-span__container"},(0,d.i)(_)&&(0,s.h)(h,Object.assign({class:"left"},_)),(0,s.h)(b,{label:l,hideLabel:n,allowMarkdown:u,badgeText:r},e),(0,d.i)(y)&&(0,s.h)(h,Object.assign({class:"right"},y))),(0,d.i)(m)&&(0,s.h)(h,Object.assign({class:"bottom"},m)))}},8768:(t,e,a)=>{a.d(e,{a:()=>n,b:()=>o,c:()=>c,v:()=>l});var i=a(257);const s=["button","link","tab","treeitem"],o=(t,e)=>{(0,i.w)(t,"_role",(t=>"string"==typeof t&&s.includes(t)),new Set([`KoliBriAlternativeButtonLinkRole {${s.join(", ")}`]),e)},l=(t,e)=>{(0,i.A)(t,"_ariaDescription",e)},n=(t,e)=>{(0,i.h)(t,"_ariaExpanded",e)},r=["primary","secondary","normal","tertiary","danger","ghost","custom"],c=(t,e)=>{(0,i.w)(t,"_variant",(t=>"string"==typeof t&&r.includes(t)),new Set([`KoliBriButtonVariant {${r.join(", ")}`]),e,{defaultValue:"normal"})}},9167:(t,e,a)=>{a.d(e,{i:()=>l,n:()=>r,r:()=>n});var i=a(257),s=a(6123);const o=()=>{let t=(0,i.e)().KoliBri;return void 0===t&&(t={},Object.defineProperty((0,i.e)(),"KoliBri",{value:t,writable:!1})),t},l=()=>{(()=>{const t=(0,i.g)().querySelector('meta[name="kolibri"]');if(t&&t.hasAttribute("content")){const e=t.getAttribute("content");"string"==typeof e&&((0,i.s)(e.includes("dev-mode=true")),(0,i.c)(e.includes("experimental-mode=true")),(0,i.d)(e.includes("color-contrast-analysis=true")))}})(),i.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${s.E.kolibriVersion}\n\t`,{forceLog:!0})},n=()=>{!0!==o().adviceShown&&(Object.defineProperty(o(),"adviceShown",{get:function(){return!0}}),i.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let r=()=>Math.floor(16777215*Math.random()).toString(16);"test"===i.p&&(r=()=>"nonce")}}]);
|
package/dist/7347.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 7347.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7347],{7347:(n,e,t)=>{t.r(e),t.d(e,{kol_tree_item:()=>a});var i=t(
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7347],{7347:(n,e,t)=>{t.r(e),t.d(e,{kol_tree_item:()=>a});var i=t(6123),o=t(1698),l=(n,e,t)=>new Promise(((i,o)=>{var l=n=>{try{r(t.next(n))}catch(n){o(n)}},a=n=>{try{r(t.throw(n))}catch(n){o(n)}},r=n=>n.done?i(n.value):Promise.resolve(n.value).then(l,a);r((t=t.apply(n,e)).next())}));const a=class{constructor(n){(0,i.r)(this,n),this._active=void 0,this._label=void 0,this._open=void 0,this._href=void 0}focusLink(){return l(this,null,(function*(){this.element&&(yield this.element.focusLink())}))}expand(){return l(this,null,(function*(){this.element&&(yield this.element.expand())}))}collapse(){return l(this,null,(function*(){this.element&&(yield this.element.collapse())}))}isOpen(){return l(this,null,(function*(){var n,e;return null!==(e=yield null===(n=this.element)||void 0===n?void 0:n.isOpen())&&void 0!==e&&e}))}render(){return(0,i.h)(o.p,{key:"058ffb876889218e812b8d16395cf3d4735e9786",_active:this._active,_label:this._label,_open:this._open,_href:this._href,ref:n=>this.element=n},(0,i.h)("slot",{key:"a084e5ba793a60fd5696756cd16d92e50f6c9c9f"}))}};a.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tree-item {\n --indentation: var(--tree-item-indentation, calc(10rem / var(--kolibri-root-font-size, 16)));\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tree-item__link .kol-link {\n align-items: center;\n display: inline-flex;\n min-height: var(--a11y-min-size);\n padding-left: max(var(--indentation) * var(--level) + (8rem / var(--kolibri-root-font-size, 16)), 8rem / var(--kolibri-root-font-size, 16));\n padding-right: calc(6rem / var(--kolibri-root-font-size, 16));\n text-decoration: none;\n }\n .kol-tree-item__link--first-level .kol-link {\n padding-left: calc(6rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tree-item__link-inner {\n display: flex;\n align-items: center;\n }\n .kol-tree-item__children {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree-item .kol-span {\n place-items: unset;\n }\n .kol-tree-item__toggle-button, .kol-tree-item__toggle-button-placeholder {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n display: inline-flex;\n justify-content: center;\n align-items: center;\n }\n .kol-tree-item__text {\n text-decoration: underline;\n }\n}"}}}]);
|
package/dist/7444.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 7444.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7444],{376:(e,n,t)=>{t.d(n,{K:()=>i,i:()=>l});var o=t(5538),r=t(6733),a="[object String]";function l(e){return"string"==typeof e||!(0,o.i)(e)&&(0,o.a)(e)&&(0,o.b)(e)==a}const i=({badgeText:e,label:n})=>{const t=e;let[o,...a]=n.split(t);return 0===a.length&&(e=t.toUpperCase(),[o,...a]=n.split(t)),0===a.length&&(e=t.toLowerCase(),[o,...a]=n.split(t)),(0,r.h)(r.F,null,o,a.length?(0,r.h)(r.F,null,(0,r.h)("u",null,e),a.join(t)):null)}},1476:(e,n,t)=>{function o(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)}t.d(n,{i:()=>o})},2190:(e,n,t)=>{t.d(n,{i:()=>l,n:()=>s,r:()=>i});var o=t(257),r=t(6733);const a=()=>{let e=(0,o.e)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,o.e)(),"KoliBri",{value:e,writable:!1})),e},l=()=>{(()=>{const e=(0,o.g)().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const n=e.getAttribute("content");"string"==typeof n&&((0,o.s)(n.includes("dev-mode=true")),(0,o.c)(n.includes("experimental-mode=true")),(0,o.d)(n.includes("color-contrast-analysis=true")))}})(),o.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${r.E.kolibriVersion}\n\t`,{forceLog:!0})},i=()=>{!0!==a().adviceShown&&(Object.defineProperty(a(),"adviceShown",{get:function(){return!0}}),o.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let s=()=>Math.floor(16777215*Math.random()).toString(16);"test"===o.p&&(s=()=>"nonce")},3885:(e,n,t)=>{t.d(n,{K:()=>a});var o=t(6733),r=t(1698);const a=e=>{const{class:n,style:t,icons:a,label:l,onClick:i}=e;return(0,o.h)(r.d,{class:n,style:t,onClick:i,_icons:a,_label:l})}},5538:(e,n,t)=>{t.d(n,{S:()=>l,a:()=>f,b:()=>p,f:()=>o,i:()=>m,r:()=>a});const o="object"==typeof t.g&&t.g&&t.g.Object===Object&&t.g;var r="object"==typeof self&&self&&self.Object===Object&&self;const a=o||r||Function("return this")(),l=a.Symbol;var i=Object.prototype,s=i.hasOwnProperty,c=i.toString,d=l?l.toStringTag:void 0,u=Object.prototype.toString,h="[object Null]",b="[object Undefined]",g=l?l.toStringTag:void 0;function p(e){return null==e?void 0===e?b:h:g&&g in Object(e)?function(e){var n=s.call(e,d),t=e[d];try{e[d]=void 0;var o=!0}catch(e){}var r=c.call(e);return o&&(n?e[d]=t:delete e[d]),r}(e):function(e){return u.call(e)}(e)}function f(e){return null!=e&&"object"==typeof e}const m=Array.isArray},6697:(e,n,t)=>{t.d(n,{c:()=>i,h:()=>f,v:()=>p});var o=t(257),r={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},a={red:0,orange:60,yellow:120,green:180,blue:240,purple:300},l=function(e){var n,t,o=[],l=1;if("string"==typeof e)if(e=e.toLowerCase(),r[e])o=r[e].slice(),t="rgb";else if("transparent"===e)l=0,t="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var i=e.slice(1);l=1,(d=i.length)<=4?(o=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],4===d&&(l=parseInt(i[3]+i[3],16)/255)):(o=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],8===d&&(l=parseInt(i[6]+i[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),t="rgb"}else if(n=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var s=n[1],c="rgb"===s;t=i=s.replace(/a$/,"");var d="cmyk"===i?4:"gray"===i?1:3;o=n[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,n){if(/%$/.test(e))return n===d?parseFloat(e)/100:"rgb"===i?255*parseFloat(e)/100:parseFloat(e);if("h"===i[n]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==a[e])return a[e]}return parseFloat(e)})),s===i&&o.push(1),l=c||void 0===o[d]?1:o[d],o=o.slice(0,d)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(o=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),t=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(o=[e[0],e[1],e[2]],t="rgb",l=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(t="rgb",o=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(t="hsl",o=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),l=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(l/=100)):(t="rgb",o=[e>>>16,(65280&e)>>>8,255&e]);return{space:t,values:o,alpha:l}},i=function(e){var n;Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var t=l(e);if(!t.space)return[];var o=[0,0,0],r="h"===t.space[0]?[360,100,100]:[255,255,255];return(n=Array(3))[0]=Math.min(Math.max(t.values[0],o[0]),r[0]),n[1]=Math.min(Math.max(t.values[1],o[1]),r[1]),n[2]=Math.min(Math.max(t.values[2],o[2]),r[2]),"h"===t.space[0]&&(n=function(e){var n,t,o,r,a,l=e[0]/360,i=e[1]/100,s=e[2]/100,c=0;if(0===i)return[a=255*s,a,a];for(n=2*s-(t=s<.5?s*(1+i):s+i-s*i),r=[0,0,0];c<3;)(o=l+1/3*-(c-1))<0?o++:o>1&&o--,a=6*o<1?n+6*(t-n)*o:2*o<1?t:3*o<2?n+(t-n)*(2/3-o)*6:n,r[c++]=255*a;return r}(n)),n.push(Math.min(Math.max(t.alpha,0),1)),n};const s=(e,n,t,r=1)=>{const a=[Math.max(Math.min(Math.round(n[0]+r*Math.max(1,n[0]/100)),255),0),Math.max(Math.min(Math.round(n[1]+r*Math.max(1,n[1]/100)),255),0),Math.max(Math.min(Math.round(n[2]+r*Math.max(1,n[2]/100)),255),0)],l=(0,o.m)(o.r.hex(`rgba(${e.join(",")},1)`),o.r.hex(`rgba(${a.join(",")},1)`)),i=a[0]+a[1]+a[2];return 0===i||765===i||l>t?{background:e,foreground:a,contrast:l}:s(e,a,t,r)},c=new Map,d=(e,n=7)=>{let t=[0,0,0,1],r=[255,255,255,1];"string"==typeof e?(t=i(e),r=t):"object"==typeof e&&null!==e&&"string"==typeof e.background&&"string"==typeof e.foreground&&(t=i(e.background),r="string"==typeof e.foreground?i(e.foreground):t);const a=(299*t[0]+587*t[1]+114*t[2])/1e3>=128?-1:1;const l=((e,n,t,o=1)=>{if(c.has(e))return c.get(e);const r=s(e,n,t,o);return c.set(e,r),r})([t[0],t[1],t[2]],[r[0],r[1],r[2]],n,a);return r=[...l.foreground,1],{background:o.r.hex(`rgba(${t.join(",")})`),foreground:o.r.hex(`rgba(${r.join(",")})`),contrast:l.contrast}},u=/^#((\d|[a-f]){8}|(\d|[a-f]){6}|(\d|[a-f]){3,4})$/i;function h(e){if(e)if("string"==typeof e){if(function(e){return u.test(e)}(e))return{type:"string",valid:!0,value:e};{const n=function(e){if(e.startsWith("{"))try{const n=JSON.parse(e);if(b(n))return{type:"ColorPair",value:n}}catch(e){return{type:null,value:null}}return{type:null,value:null}}(e);if(n.value)return{type:n.type,valid:!0,value:n.value}}}else{const n=e;if(b(n))return{type:"ColorPair",valid:!0,value:n}}return{type:null,valid:!1,value:""}}function b(e){return!("object"!=typeof e||!e||"string"!=typeof e.backgroundColor||!("string"==typeof e.foregroundColor||e.foregroundColor&&"string"==typeof e.foregroundColor.primary&&"string"==typeof e.foregroundColor.secondary&&"string"==typeof e.foregroundColor.neutral))}function g(e){const n=h(e);switch(n.type){case null:return!1;case"string":case"ColorPair":return n.valid}}const p=(e,n,t)=>{(0,o.w)(e,"_color",g,new Set(["rgb in hex","ColorPair"]),n,t)},f=e=>{var n;let t;const r=h(e);switch(r.type){case"string":t=d(r.value);break;case"ColorPair":{const e=r.value;let o="";"string"==typeof e.foregroundColor?o=e.foregroundColor:(null===(n=e.foregroundColor)||void 0===n?void 0:n.primary)&&(o=e.foregroundColor.primary),o&&"string"==typeof o||(o="#fff"),t=d({background:e.backgroundColor,foreground:o});break}case null:o.L.warn(`_color was empty or invalid (${JSON.stringify(e)})`,{forceLog:!0}),t=d({background:"#000",foreground:"#000"})}return t.contrast<7&&(0,o.b)(`[KolBadge] The contrast of ${t.contrast} (≥7, AAA) is to low, between the color pair ${t.background} and ${t.foreground}.`),{backgroundColor:t.background,foregroundColor:t.foreground}}},7444:(e,n,t)=>{t.r(n),t.d(n,{kol_badge:()=>u});var o=t(6733),r=t(257),a=t(8045),l=t(1698),i=(t(9272),t(6660),t(8386)),s=t(2190),c=t(6697),d=t(8057);t(4269),t(3185),t(1111),t(3885),t(6363),t(376),t(5538),t(1476),(0,r.f)("[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).");const u=class{constructor(e){(0,o.r)(this,e),this.bgColorStr="#000",this.colorStr="#fff",this.id=(0,s.n)(),this.handleColorChange=e=>{const n=(0,c.h)(e);this.bgColorStr=n.backgroundColor,this.colorStr=n.foregroundColor},this._color="#000",this._icons=void 0,this._label=void 0,this._smartButton=void 0,this.state={_color:{backgroundColor:"#000",foregroundColor:"#fff"},_icons:{}}}renderSmartButton(e){return(0,o.h)(l.a,{class:"kol-badge__smart-button",_ariaControls:this.id,_customClass:e._customClass,_disabled:e._disabled,_hideLabel:!0,_icons:e._icons,_id:e._id,_label:e._label,_on:e._on,_tooltipAlign:e._tooltipAlign,_variant:e._variant})}render(){const e="object"==typeof this.state._smartButton&&null!==this.state._smartButton;return(0,o.h)("span",{key:"c04540b377e88484c6c982be4d411937ef3618ef",class:(0,a.c)("kol-badge",{"kol-badge--has-smart-button":"object"==typeof this.state._smartButton&&null!==this.state._smartButton}),style:{backgroundColor:this.bgColorStr,color:this.colorStr}},(0,o.h)(i.K,{key:"d01ea028555a90f21229d1584bfb93a5c2a00c25",class:"kol-badge__label",id:e?this.id:void 0,allowMarkdown:!0,icons:this.state._icons,label:this._label}),e&&this.renderSmartButton(this.state._smartButton))}validateIcons(e){(0,d.v)(this,e)}validateColor(e){(0,c.v)(this,e,{defaultValue:"#000",hooks:{beforePatch:this.handleColorChange}})}validateSmartButton(e){(0,r.o)(e,(()=>{try{e=(0,r.j)(e)}catch(e){}(0,r.k)(this,"_smartButton",e)}))}componentWillLoad(){this.validateIcons(this._icons),this.validateColor(this._color),this.validateSmartButton(this._smartButton)}static get watchers(){return{_icons:["validateIcons"],_color:["validateColor"],_smartButton:["validateSmartButton"]}}};u.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-badge {\n display: inline-flex;\n place-items: center;\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-badge .kol-badge__smart-button .button {\n color: inherit;\n }\n}"}},8057:(e,n,t)=>{t.d(n,{v:()=>l});var o=t(257);const r=(e,n,t)=>{(0,o.v)(t)?e[n]=t:(0,o.q)(t,1)&&(e[n]={icon:t})},a=e=>"object"==typeof e&&null!==e&&(void 0===e.style||(0,o.t)(e.style))&&(void 0===e.label||(0,o.q)(e.label))&&(0,o.q)(e.icon,1),l=(e,n,t={})=>{(0,o.o)(n,(()=>{var l;try{n=(0,o.j)(n)}catch(e){}(0,o.w)(e,"_icons",(e=>{const n="object"==typeof e&&null!==e&&0===Object.keys(e).length;return null===e||n||(0,o.q)(e,1)||"object"==typeof e&&null!==e&&((0,o.q)(e.left,1)||a(e.left)||(0,o.q)(e.right,1)||a(e.right)||(0,o.q)(e.top,1)||a(e.top)||(0,o.q)(e.bottom,1)||a(e.bottom))}),new Set(["KoliBriIcon"]),n,Object.assign(Object.assign({},t),{defaultValue:{},hooks:{afterPatch:null===(l=t.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(e,n,a,l)=>{var i,s;"function"==typeof(null===(i=t.hooks)||void 0===i?void 0:i.beforePatch)&&(null===(s=t.hooks)||void 0===s||s.beforePatch(e,n,a,l)),(e=>{var n,t,a;if(null===(n=e.nextState)||void 0===n?void 0:n.has("_icons")){const n=null===(t=e.nextState)||void 0===t?void 0:t.get("_icons");null===(a=e.nextState)||void 0===a||a.set("_icons",(e=>{let n={};return(0,o.q)(e,1)?n={left:{icon:e}}:"object"==typeof e&&null!==e&&(r(n,"top",e.top),r(n,"right",e.right),r(n,"bottom",e.bottom),r(n,"left",e.left)),n})(n))}})(a)}}}))}))}},8386:(e,n,t)=>{t.d(n,{K:()=>g});var o=t(1111),r=t(6733),a=t(8045),l=t(3885),i=t(257),s=t(6363),c=t(376),d=t(1476);const u=e=>{const{class:n,style:t,label:o,icon:i}=e;return(0,r.h)(l.K,{class:(0,a.c)("icon",n),style:t,label:o||"",icons:i})},h=({label:e,hideLabel:n,allowMarkdown:t,badgeText:o})=>{if(n||!(0,c.i)(e))return null;const l="kol-span__label";return t?(0,r.h)("span",{class:(0,a.c)(l,"md"),innerHTML:(0,s.m)(e)}):o?(0,r.h)("span",{class:(0,a.c)(l)},(0,r.h)(c.K,{label:e,badgeText:o})):(0,r.h)("span",{class:(0,a.c)(l)},e)},b=({hideLabel:e,label:n,badgeText:t,allowMarkdown:o},a)=>{const l=!(0,i.l)(n);return(0,r.h)(r.F,null,l&&(0,r.h)(h,{label:n,hideLabel:e,badgeText:t,allowMarkdown:o}),(0,r.h)("span",{"aria-hidden":l?"true":void 0,class:"kol-span__label",hidden:l},a),(0,c.i)(t)&&t.length>0&&(0,r.h)("span",{class:"badge-text-hint","aria-hidden":"true"},t))},g=(e,n)=>{const{class:t,label:l,hideLabel:i=!1,badgeText:s,allowMarkdown:h,icons:g}=e,p=(0,o._)(e,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let f=null,m=null,y=null,v=null;return(0,d.i)(g)?(f=g.top,m=g.left,y=g.right,v=g.bottom):(0,c.i)(g)&&(m={icon:g}),(0,r.h)("span",Object.assign({class:(0,a.c)("kol-span",{"kol-span--hide-label":i},t)},p),(0,d.i)(f)&&(0,r.h)(u,Object.assign({class:"top"},f)),(0,r.h)("span",{class:"kol-span__container"},(0,d.i)(m)&&(0,r.h)(u,Object.assign({class:"left"},m)),(0,r.h)(b,{label:l,hideLabel:i,allowMarkdown:h,badgeText:s},n),(0,d.i)(y)&&(0,r.h)(u,Object.assign({class:"right"},y))),(0,d.i)(v)&&(0,r.h)(u,Object.assign({class:"bottom"},v)))}}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7444],{1476:(e,n,t)=>{function o(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)}t.d(n,{i:()=>o})},2074:(e,n,t)=>{t.d(n,{K:()=>a});var o=t(6123),r=t(1698);const a=e=>{const{class:n,style:t,icons:a,label:l,onClick:i}=e;return(0,o.h)(r.d,{class:n,style:t,onClick:i,_icons:a,_label:l})}},3806:(e,n,t)=>{t.d(n,{K:()=>i,i:()=>l});var o=t(5538),r=t(6123),a="[object String]";function l(e){return"string"==typeof e||!(0,o.i)(e)&&(0,o.a)(e)&&(0,o.b)(e)==a}const i=({badgeText:e,label:n})=>{const t=e;let[o,...a]=n.split(t);return 0===a.length&&(e=t.toUpperCase(),[o,...a]=n.split(t)),0===a.length&&(e=t.toLowerCase(),[o,...a]=n.split(t)),(0,r.h)(r.F,null,o,a.length?(0,r.h)(r.F,null,(0,r.h)("u",null,e),a.join(t)):null)}},5538:(e,n,t)=>{t.d(n,{S:()=>l,a:()=>f,b:()=>p,f:()=>o,i:()=>m,r:()=>a});const o="object"==typeof t.g&&t.g&&t.g.Object===Object&&t.g;var r="object"==typeof self&&self&&self.Object===Object&&self;const a=o||r||Function("return this")(),l=a.Symbol;var i=Object.prototype,s=i.hasOwnProperty,c=i.toString,d=l?l.toStringTag:void 0,u=Object.prototype.toString,h="[object Null]",b="[object Undefined]",g=l?l.toStringTag:void 0;function p(e){return null==e?void 0===e?b:h:g&&g in Object(e)?function(e){var n=s.call(e,d),t=e[d];try{e[d]=void 0;var o=!0}catch(e){}var r=c.call(e);return o&&(n?e[d]=t:delete e[d]),r}(e):function(e){return u.call(e)}(e)}function f(e){return null!=e&&"object"==typeof e}const m=Array.isArray},6697:(e,n,t)=>{t.d(n,{c:()=>i,h:()=>f,v:()=>p});var o=t(257),r={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},a={red:0,orange:60,yellow:120,green:180,blue:240,purple:300},l=function(e){var n,t,o=[],l=1;if("string"==typeof e)if(e=e.toLowerCase(),r[e])o=r[e].slice(),t="rgb";else if("transparent"===e)l=0,t="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var i=e.slice(1);l=1,(d=i.length)<=4?(o=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],4===d&&(l=parseInt(i[3]+i[3],16)/255)):(o=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],8===d&&(l=parseInt(i[6]+i[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),t="rgb"}else if(n=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var s=n[1],c="rgb"===s;t=i=s.replace(/a$/,"");var d="cmyk"===i?4:"gray"===i?1:3;o=n[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,n){if(/%$/.test(e))return n===d?parseFloat(e)/100:"rgb"===i?255*parseFloat(e)/100:parseFloat(e);if("h"===i[n]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==a[e])return a[e]}return parseFloat(e)})),s===i&&o.push(1),l=c||void 0===o[d]?1:o[d],o=o.slice(0,d)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(o=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),t=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(o=[e[0],e[1],e[2]],t="rgb",l=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(t="rgb",o=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(t="hsl",o=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),l=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(l/=100)):(t="rgb",o=[e>>>16,(65280&e)>>>8,255&e]);return{space:t,values:o,alpha:l}},i=function(e){var n;Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var t=l(e);if(!t.space)return[];var o=[0,0,0],r="h"===t.space[0]?[360,100,100]:[255,255,255];return(n=Array(3))[0]=Math.min(Math.max(t.values[0],o[0]),r[0]),n[1]=Math.min(Math.max(t.values[1],o[1]),r[1]),n[2]=Math.min(Math.max(t.values[2],o[2]),r[2]),"h"===t.space[0]&&(n=function(e){var n,t,o,r,a,l=e[0]/360,i=e[1]/100,s=e[2]/100,c=0;if(0===i)return[a=255*s,a,a];for(n=2*s-(t=s<.5?s*(1+i):s+i-s*i),r=[0,0,0];c<3;)(o=l+1/3*-(c-1))<0?o++:o>1&&o--,a=6*o<1?n+6*(t-n)*o:2*o<1?t:3*o<2?n+(t-n)*(2/3-o)*6:n,r[c++]=255*a;return r}(n)),n.push(Math.min(Math.max(t.alpha,0),1)),n};const s=(e,n,t,r=1)=>{const a=[Math.max(Math.min(Math.round(n[0]+r*Math.max(1,n[0]/100)),255),0),Math.max(Math.min(Math.round(n[1]+r*Math.max(1,n[1]/100)),255),0),Math.max(Math.min(Math.round(n[2]+r*Math.max(1,n[2]/100)),255),0)],l=(0,o.m)(o.r.hex(`rgba(${e.join(",")},1)`),o.r.hex(`rgba(${a.join(",")},1)`)),i=a[0]+a[1]+a[2];return 0===i||765===i||l>t?{background:e,foreground:a,contrast:l}:s(e,a,t,r)},c=new Map,d=(e,n=7)=>{let t=[0,0,0,1],r=[255,255,255,1];"string"==typeof e?(t=i(e),r=t):"object"==typeof e&&null!==e&&"string"==typeof e.background&&"string"==typeof e.foreground&&(t=i(e.background),r="string"==typeof e.foreground?i(e.foreground):t);const a=(299*t[0]+587*t[1]+114*t[2])/1e3>=128?-1:1;const l=((e,n,t,o=1)=>{if(c.has(e))return c.get(e);const r=s(e,n,t,o);return c.set(e,r),r})([t[0],t[1],t[2]],[r[0],r[1],r[2]],n,a);return r=[...l.foreground,1],{background:o.r.hex(`rgba(${t.join(",")})`),foreground:o.r.hex(`rgba(${r.join(",")})`),contrast:l.contrast}},u=/^#((\d|[a-f]){8}|(\d|[a-f]){6}|(\d|[a-f]){3,4})$/i;function h(e){if(e)if("string"==typeof e){if(function(e){return u.test(e)}(e))return{type:"string",valid:!0,value:e};{const n=function(e){if(e.startsWith("{"))try{const n=JSON.parse(e);if(b(n))return{type:"ColorPair",value:n}}catch(e){return{type:null,value:null}}return{type:null,value:null}}(e);if(n.value)return{type:n.type,valid:!0,value:n.value}}}else{const n=e;if(b(n))return{type:"ColorPair",valid:!0,value:n}}return{type:null,valid:!1,value:""}}function b(e){return!("object"!=typeof e||!e||"string"!=typeof e.backgroundColor||!("string"==typeof e.foregroundColor||e.foregroundColor&&"string"==typeof e.foregroundColor.primary&&"string"==typeof e.foregroundColor.secondary&&"string"==typeof e.foregroundColor.neutral))}function g(e){const n=h(e);switch(n.type){case null:return!1;case"string":case"ColorPair":return n.valid}}const p=(e,n,t)=>{(0,o.w)(e,"_color",g,new Set(["rgb in hex","ColorPair"]),n,t)},f=e=>{var n;let t;const r=h(e);switch(r.type){case"string":t=d(r.value);break;case"ColorPair":{const e=r.value;let o="";"string"==typeof e.foregroundColor?o=e.foregroundColor:(null===(n=e.foregroundColor)||void 0===n?void 0:n.primary)&&(o=e.foregroundColor.primary),o&&"string"==typeof o||(o="#fff"),t=d({background:e.backgroundColor,foreground:o});break}case null:o.L.warn(`_color was empty or invalid (${JSON.stringify(e)})`,{forceLog:!0}),t=d({background:"#000",foreground:"#000"})}return t.contrast<7&&(0,o.b)(`[KolBadge] The contrast of ${t.contrast} (≥7, AAA) is to low, between the color pair ${t.background} and ${t.foreground}.`),{backgroundColor:t.background,foregroundColor:t.foreground}}},7444:(e,n,t)=>{t.r(n),t.d(n,{kol_badge:()=>u});var o=t(6123),r=t(257),a=t(8045),l=t(1698),i=(t(9272),t(6660),t(8216)),s=t(9167),c=t(6697),d=t(8057);t(4269),t(3185),t(1111),t(2074),t(6363),t(3806),t(5538),t(1476),(0,r.f)("[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).");const u=class{constructor(e){(0,o.r)(this,e),this.bgColorStr="#000",this.colorStr="#fff",this.id=(0,s.n)(),this.handleColorChange=e=>{const n=(0,c.h)(e);this.bgColorStr=n.backgroundColor,this.colorStr=n.foregroundColor},this._color="#000",this._icons=void 0,this._label=void 0,this._smartButton=void 0,this.state={_color:{backgroundColor:"#000",foregroundColor:"#fff"},_icons:{}}}renderSmartButton(e){return(0,o.h)(l.a,{class:"kol-badge__smart-button",_ariaControls:this.id,_customClass:e._customClass,_disabled:e._disabled,_hideLabel:!0,_icons:e._icons,_id:e._id,_label:e._label,_on:e._on,_tooltipAlign:e._tooltipAlign,_variant:e._variant})}render(){const e="object"==typeof this.state._smartButton&&null!==this.state._smartButton;return(0,o.h)("span",{key:"c04540b377e88484c6c982be4d411937ef3618ef",class:(0,a.c)("kol-badge",{"kol-badge--has-smart-button":"object"==typeof this.state._smartButton&&null!==this.state._smartButton}),style:{backgroundColor:this.bgColorStr,color:this.colorStr}},(0,o.h)(i.K,{key:"d01ea028555a90f21229d1584bfb93a5c2a00c25",class:"kol-badge__label",id:e?this.id:void 0,allowMarkdown:!0,icons:this.state._icons,label:this._label}),e&&this.renderSmartButton(this.state._smartButton))}validateIcons(e){(0,d.v)(this,e)}validateColor(e){(0,c.v)(this,e,{defaultValue:"#000",hooks:{beforePatch:this.handleColorChange}})}validateSmartButton(e){(0,r.o)(e,(()=>{try{e=(0,r.j)(e)}catch(e){}(0,r.k)(this,"_smartButton",e)}))}componentWillLoad(){this.validateIcons(this._icons),this.validateColor(this._color),this.validateSmartButton(this._smartButton)}static get watchers(){return{_icons:["validateIcons"],_color:["validateColor"],_smartButton:["validateSmartButton"]}}};u.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-badge {\n display: inline-flex;\n place-items: center;\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-badge .kol-badge__smart-button .button {\n color: inherit;\n }\n}"}},8057:(e,n,t)=>{t.d(n,{v:()=>l});var o=t(257);const r=(e,n,t)=>{(0,o.v)(t)?e[n]=t:(0,o.q)(t,1)&&(e[n]={icon:t})},a=e=>"object"==typeof e&&null!==e&&(void 0===e.style||(0,o.t)(e.style))&&(void 0===e.label||(0,o.q)(e.label))&&(0,o.q)(e.icon,1),l=(e,n,t={})=>{(0,o.o)(n,(()=>{var l;try{n=(0,o.j)(n)}catch(e){}(0,o.w)(e,"_icons",(e=>{const n="object"==typeof e&&null!==e&&0===Object.keys(e).length;return null===e||n||(0,o.q)(e,1)||"object"==typeof e&&null!==e&&((0,o.q)(e.left,1)||a(e.left)||(0,o.q)(e.right,1)||a(e.right)||(0,o.q)(e.top,1)||a(e.top)||(0,o.q)(e.bottom,1)||a(e.bottom))}),new Set(["KoliBriIcon"]),n,Object.assign(Object.assign({},t),{defaultValue:{},hooks:{afterPatch:null===(l=t.hooks)||void 0===l?void 0:l.afterPatch,beforePatch:(e,n,a,l)=>{var i,s;"function"==typeof(null===(i=t.hooks)||void 0===i?void 0:i.beforePatch)&&(null===(s=t.hooks)||void 0===s||s.beforePatch(e,n,a,l)),(e=>{var n,t,a;if(null===(n=e.nextState)||void 0===n?void 0:n.has("_icons")){const n=null===(t=e.nextState)||void 0===t?void 0:t.get("_icons");null===(a=e.nextState)||void 0===a||a.set("_icons",(e=>{let n={};return(0,o.q)(e,1)?n={left:{icon:e}}:"object"==typeof e&&null!==e&&(r(n,"top",e.top),r(n,"right",e.right),r(n,"bottom",e.bottom),r(n,"left",e.left)),n})(n))}})(a)}}}))}))}},8216:(e,n,t)=>{t.d(n,{K:()=>g});var o=t(1111),r=t(6123),a=t(8045),l=t(2074),i=t(257),s=t(6363),c=t(3806),d=t(1476);const u=e=>{const{class:n,style:t,label:o,icon:i}=e;return(0,r.h)(l.K,{class:(0,a.c)("icon",n),style:t,label:o||"",icons:i})},h=({label:e,hideLabel:n,allowMarkdown:t,badgeText:o})=>{if(n||!(0,c.i)(e))return null;const l="kol-span__label";return t?(0,r.h)("span",{class:(0,a.c)(l,"md"),innerHTML:(0,s.m)(e)}):o?(0,r.h)("span",{class:(0,a.c)(l)},(0,r.h)(c.K,{label:e,badgeText:o})):(0,r.h)("span",{class:(0,a.c)(l)},e)},b=({hideLabel:e,label:n,badgeText:t,allowMarkdown:o},a)=>{const l=!(0,i.l)(n);return(0,r.h)(r.F,null,l&&(0,r.h)(h,{label:n,hideLabel:e,badgeText:t,allowMarkdown:o}),(0,r.h)("span",{"aria-hidden":l?"true":void 0,class:"kol-span__label",hidden:l},a),(0,c.i)(t)&&t.length>0&&(0,r.h)("span",{class:"badge-text-hint","aria-hidden":"true"},t))},g=(e,n)=>{const{class:t,label:l,hideLabel:i=!1,badgeText:s,allowMarkdown:h,icons:g}=e,p=(0,o._)(e,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let f=null,m=null,y=null,v=null;return(0,d.i)(g)?(f=g.top,m=g.left,y=g.right,v=g.bottom):(0,c.i)(g)&&(m={icon:g}),(0,r.h)("span",Object.assign({class:(0,a.c)("kol-span",{"kol-span--hide-label":i},t)},p),(0,d.i)(f)&&(0,r.h)(u,Object.assign({class:"top"},f)),(0,r.h)("span",{class:"kol-span__container"},(0,d.i)(m)&&(0,r.h)(u,Object.assign({class:"left"},m)),(0,r.h)(b,{label:l,hideLabel:i,allowMarkdown:h,badgeText:s},n),(0,d.i)(y)&&(0,r.h)(u,Object.assign({class:"right"},y))),(0,d.i)(v)&&(0,r.h)(u,Object.assign({class:"bottom"},v)))}},9167:(e,n,t)=>{t.d(n,{i:()=>l,n:()=>s,r:()=>i});var o=t(257),r=t(6123);const a=()=>{let e=(0,o.e)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,o.e)(),"KoliBri",{value:e,writable:!1})),e},l=()=>{(()=>{const e=(0,o.g)().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const n=e.getAttribute("content");"string"==typeof n&&((0,o.s)(n.includes("dev-mode=true")),(0,o.c)(n.includes("experimental-mode=true")),(0,o.d)(n.includes("color-contrast-analysis=true")))}})(),o.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${r.E.kolibriVersion}\n\t`,{forceLog:!0})},i=()=>{!0!==a().adviceShown&&(Object.defineProperty(a(),"adviceShown",{get:function(){return!0}}),o.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let s=()=>Math.floor(16777215*Math.random()).toString(16);"test"===o.p&&(s=()=>"nonce")}}]);
|
package/dist/7533.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 7533.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7533],{792:(e,t,o)=>{o.d(t,{a:()=>l,b:()=>s,c:()=>a,d:()=>c,e:()=>r,v:()=>i});var n=o(257);const r=(e,t)=>{(0,n.w)(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableCallbacksPropType {Events.onSort, Events.onSelectionChange}"]),t)},a=(e,t)=>{(0,n.w)(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableStatefulCallbacksPropType {Events.onSelectionChange}"]),t)},i=(e,t,o)=>{(0,n.M)(t,(()=>{(0,n.o)(t,(()=>{void 0===t&&(t=[]);try{t=(0,n.j)(t)}catch(e){}Array.isArray(t)&&t.every((e=>"object"==typeof e&&null!==e))&&(0,n.k)(e,"_data",t,o)}))}))},l=(e,t,o)=>{(0,n.M)(t,(()=>{(0,n.o)(t,(()=>{void 0===t&&(t=[]);try{t=(0,n.j)(t)}catch(e){}Array.isArray(t)&&t.every((e=>"object"==typeof e&&null!==e))&&(0,n.k)(e,"_dataFoot",t,o)}))}))},s=(e,t)=>{var o;(o="string"==typeof t?(()=>{try{return(0,n.j)(t)}catch(e){return}})():t)&&(0,n.v)(o)&&"function"==typeof o.label&&(!o.selectedKeys||Array.isArray(o.selectedKeys))&&(0,n.k)(e,"_selection",t)},c=(e,t)=>{(0,n.w)(e,"_tableSettings",(e=>"object"==typeof e&&null!==e),new Set(["TableSettings"]),t)}},1476:(e,t,o)=>{function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}o.d(t,{i:()=>n})},2190:(e,t,o)=>{o.d(t,{i:()=>i,n:()=>s,r:()=>l});var n=o(257),r=o(6733);const a=()=>{let e=(0,n.e)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,n.e)(),"KoliBri",{value:e,writable:!1})),e},i=()=>{(()=>{const e=(0,n.g)().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const t=e.getAttribute("content");"string"==typeof t&&((0,n.s)(t.includes("dev-mode=true")),(0,n.c)(t.includes("experimental-mode=true")),(0,n.d)(t.includes("color-contrast-analysis=true")))}})(),n.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${r.E.kolibriVersion}\n\t`,{forceLog:!0})},l=()=>{!0!==a().adviceShown&&(Object.defineProperty(a(),"adviceShown",{get:function(){return!0}}),n.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let s=()=>Math.floor(16777215*Math.random()).toString(16);"test"===n.p&&(s=()=>"nonce")},3472:(e,t,o)=>{o.d(t,{a:()=>d,b:()=>l,c:()=>s,h:()=>r,v:()=>h});var n=o(257);const r=[0,1,2,3,4,5,6],a=/[a-zA-Z0-9äöüÄÖÜß]/g,i=/^\d+$/;function l(e,t=1){return function(e){var t;return"string"==typeof e&&(null===(t=e.match(a))||void 0===t?void 0:t.length)||0}(e)>=t}function s(e){return i.test(e)}const c=new Set(["string"]),h=(e,t,o={})=>{(0,n.w)(e,"_label",(e=>"string"==typeof e),c,t,function(e){var t;return Object.assign(Object.assign({},e),{hooks:{afterPatch:(t,o,r,a)=>{var i,c;"function"==typeof(null===(i=e.hooks)||void 0===i?void 0:i.afterPatch)&&(null===(c=e.hooks)||void 0===c||c.afterPatch(t,o,r,a)),"string"==typeof t&&!1===l(t,3)&&!1===s(t)&&(0,n.b)(`The heading or label ("${t}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof t&&t.length>80&&(0,n.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(t=e.hooks)||void 0===t?void 0:t.beforePatch}})}(o))},d=h},3571:(e,t,o)=>{var n,r,a,i;o.d(t,{C:()=>n,K:()=>a}),(r=n||(n={})).onBlur="onBlur",r.onChange="onChange",r.onChangePage="onChangePage",r.onClick="onClick",r.onClose="onClose",r.onDblClick="onDblClick",r.onFocus="onFocus",r.onInput="onInput",r.onKeyDown="onKeyDown",r.onKeyPress="onKeyPress",r.onKeyUp="onKeyUp",r.onMouseDown="onMouseDown",r.onMouseMove="onMouseMove",r.onMouseOut="onMouseOut",r.onMouseOver="onMouseOver",r.onMouseUp="onMouseUp",r.onReset="onReset",r.onSelect="onSelect",r.onSelectionChange="onSelectionChange",r.onChangePageSize="onChangePageSize",r.onSort="onSort",r.onSubmit="onSubmit",r.onToggle="onToggle",(i=a||(a={})).ArrowDown="ArrowDown",i.ArrowLeft="ArrowLeft",i.ArrowRight="ArrowRight",i.ArrowUp="ArrowUp",i.Enter="Enter",i.Space=" "},5538:(e,t,o)=>{o.d(t,{S:()=>i,a:()=>p,b:()=>f,f:()=>n,i:()=>_,r:()=>a});const n="object"==typeof o.g&&o.g&&o.g.Object===Object&&o.g;var r="object"==typeof self&&self&&self.Object===Object&&self;const a=n||r||Function("return this")(),i=a.Symbol;var l=Object.prototype,s=l.hasOwnProperty,c=l.toString,h=i?i.toStringTag:void 0,d=Object.prototype.toString,u="[object Null]",b="[object Undefined]",v=i?i.toStringTag:void 0;function f(e){return null==e?void 0===e?b:u:v&&v in Object(e)?function(e){var t=s.call(e,h),o=e[h];try{e[h]=void 0;var n=!0}catch(e){}var r=c.call(e);return n&&(t?e[h]=o:delete e[h]),r}(e):function(e){return d.call(e)}(e)}function p(e){return null!=e&&"object"==typeof e}const _=Array.isArray},7533:(e,t,o)=>{o.r(t),o.d(t,{kol_table_stateless_wc:()=>Ve});var n=o(6733),r=o(8045),a=o(1698),i=o(9272),l=o(257),s=o(3571),c=o(2190),h=o(3694),d=o(792),u=o(5538),b=o(1476),v=o(3472);function f(e){if(!(0,b.i)(e))return!1;var t=(0,u.b)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}o(4269),e=o.hmd(e);const p=u.r["__core-js_shared__"];var _,y=(_=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"",g=Function.prototype.toString;function k(e){if(null!=e){try{return g.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var S=/^\[object .+?Constructor\]$/,m=Function.prototype,w=Object.prototype,j=m.toString,A=w.hasOwnProperty,C=RegExp("^"+j.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O(e,t){var o=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!(0,b.i)(e)||(t=e,y&&y in t))&&(f(e)?C:S).test(k(e));var t}(o)?o:void 0}const D=O(u.r,"WeakMap");var E=/^(?:0|[1-9]\d*)$/;function z(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&E.test(e))&&e>-1&&e%1==0&&e<t}function T(e,t){return e===t||e!=e&&t!=t}function K(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var P=Object.prototype;function x(e){return(0,u.a)(e)&&"[object Arguments]"==(0,u.b)(e)}var M=Object.prototype,R=M.hasOwnProperty,$=M.propertyIsEnumerable;const F=x(function(){return arguments}())?x:function(e){return(0,u.a)(e)&&R.call(e,"callee")&&!$.call(e,"callee")};var W="object"==typeof exports&&exports&&!exports.nodeType&&exports,H=W&&e&&!e.nodeType&&e,I=H&&H.exports===W?u.r.Buffer:void 0;const L=(I?I.isBuffer:void 0)||function(){return!1};var N={};N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Arguments]"]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object Boolean]"]=N["[object DataView]"]=N["[object Date]"]=N["[object Error]"]=N["[object Function]"]=N["[object Map]"]=N["[object Number]"]=N["[object Object]"]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object WeakMap]"]=!1;var B,U="object"==typeof exports&&exports&&!exports.nodeType&&exports,q=U&&e&&!e.nodeType&&e,V=q&&q.exports===U&&u.f.process,G=function(){try{return q&&q.require&&q.require("util").types||V&&V.binding&&V.binding("util")}catch(e){}}(),X=G&&G.isTypedArray;const Y=X?(B=X,function(e){return B(e)}):function(e){return(0,u.a)(e)&&K(e.length)&&!!N[(0,u.b)(e)]};var Z=Object.prototype.hasOwnProperty;var J=function(e,t){return function(o){return e(t(o))}}(Object.keys,Object);const Q=J;var ee=Object.prototype.hasOwnProperty;function te(e){return null!=(t=e)&&K(t.length)&&!f(t)?function(e,t){var o=(0,u.i)(e),n=!o&&F(e),r=!o&&!n&&L(e),a=!o&&!n&&!r&&Y(e),i=o||n||r||a,l=i?function(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}(e.length,String):[],s=l.length;for(var c in e)!t&&!Z.call(e,c)||i&&("length"==c||r&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||z(c,s))||l.push(c);return l}(e):function(e){if(o=(t=e)&&t.constructor,t!==("function"==typeof o&&o.prototype||P))return Q(e);var t,o,n=[];for(var r in Object(e))ee.call(e,r)&&"constructor"!=r&&n.push(r);return n}(e);var t}const oe=O(Object,"create");var ne=Object.prototype.hasOwnProperty,re=Object.prototype.hasOwnProperty;function ae(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function ie(e,t){for(var o=e.length;o--;)if(T(e[o][0],t))return o;return-1}ae.prototype.clear=function(){this.__data__=oe?oe(null):{},this.size=0},ae.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ae.prototype.get=function(e){var t=this.__data__;if(oe){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return ne.call(t,e)?t[e]:void 0},ae.prototype.has=function(e){var t=this.__data__;return oe?void 0!==t[e]:re.call(t,e)},ae.prototype.set=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=oe&&void 0===t?"__lodash_hash_undefined__":t,this};var le=Array.prototype.splice;function se(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}se.prototype.clear=function(){this.__data__=[],this.size=0},se.prototype.delete=function(e){var t=this.__data__,o=ie(t,e);return!(o<0||(o==t.length-1?t.pop():le.call(t,o,1),--this.size,0))},se.prototype.get=function(e){var t=this.__data__,o=ie(t,e);return o<0?void 0:t[o][1]},se.prototype.has=function(e){return ie(this.__data__,e)>-1},se.prototype.set=function(e,t){var o=this.__data__,n=ie(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};const ce=O(u.r,"Map");function he(e,t){var o,n,r=e.__data__;return("string"==(n=typeof(o=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==o:null===o)?r["string"==typeof t?"string":"hash"]:r.map}function de(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function ue(e){var t=this.__data__=new se(e);this.size=t.size}de.prototype.clear=function(){this.size=0,this.__data__={hash:new ae,map:new(ce||se),string:new ae}},de.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},de.prototype.get=function(e){return he(this,e).get(e)},de.prototype.has=function(e){return he(this,e).has(e)},de.prototype.set=function(e,t){var o=he(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this},ue.prototype.clear=function(){this.__data__=new se,this.size=0},ue.prototype.delete=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o},ue.prototype.get=function(e){return this.__data__.get(e)},ue.prototype.has=function(e){return this.__data__.has(e)},ue.prototype.set=function(e,t){var o=this.__data__;if(o instanceof se){var n=o.__data__;if(!ce||n.length<199)return n.push([e,t]),this.size=++o.size,this;o=this.__data__=new de(n)}return o.set(e,t),this.size=o.size,this};var be=Object.prototype.propertyIsEnumerable,ve=Object.getOwnPropertySymbols;const fe=ve?function(e){return null==e?[]:(e=Object(e),function(t){for(var o=-1,n=null==t?0:t.length,r=0,a=[];++o<n;){var i=t[o];l=i,be.call(e,l)&&(a[r++]=i)}var l;return a}(ve(e)))}:function(){return[]};function pe(e){return function(e,t,o){var n=t(e);return(0,u.i)(e)?n:function(e,t){for(var o=-1,n=t.length,r=e.length;++o<n;)e[r+o]=t[o];return e}(n,o(e))}(e,te,fe)}const _e=O(u.r,"DataView"),ye=O(u.r,"Promise"),ge=O(u.r,"Set");var ke="[object Map]",Se="[object Promise]",me="[object Set]",we="[object WeakMap]",je="[object DataView]",Ae=k(_e),Ce=k(ce),Oe=k(ye),De=k(ge),Ee=k(D),ze=u.b;(_e&&ze(new _e(new ArrayBuffer(1)))!=je||ce&&ze(new ce)!=ke||ye&&ze(ye.resolve())!=Se||ge&&ze(new ge)!=me||D&&ze(new D)!=we)&&(ze=function(e){var t=(0,u.b)(e),o="[object Object]"==t?e.constructor:void 0,n=o?k(o):"";if(n)switch(n){case Ae:return je;case Ce:return ke;case Oe:return Se;case De:return me;case Ee:return we}return t});const Te=ze,Ke=u.r.Uint8Array;function Pe(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new de;++t<o;)this.add(e[t])}function xe(e,t){for(var o=-1,n=null==e?0:e.length;++o<n;)if(t(e[o],o,e))return!0;return!1}function Me(e,t,o,n,r,a){var i=1&o,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=2&o?new Pe:void 0;for(a.set(e,t),a.set(t,e);++d<l;){var v=e[d],f=t[d];if(n)var p=i?n(f,v,d,t,e,a):n(v,f,d,e,t,a);if(void 0!==p){if(p)continue;u=!1;break}if(b){if(!xe(t,(function(e,t){if(i=t,!b.has(i)&&(v===e||r(v,e,o,n,a)))return b.push(t);var i}))){u=!1;break}}else if(v!==f&&!r(v,f,o,n,a)){u=!1;break}}return a.delete(e),a.delete(t),u}function Re(e){var t=-1,o=Array(e.size);return e.forEach((function(e,n){o[++t]=[n,e]})),o}function $e(e){var t=-1,o=Array(e.size);return e.forEach((function(e){o[++t]=e})),o}Pe.prototype.add=Pe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Pe.prototype.has=function(e){return this.__data__.has(e)};var Fe=u.S?u.S.prototype:void 0,We=Fe?Fe.valueOf:void 0,He=Object.prototype.hasOwnProperty,Ie="[object Arguments]",Le="[object Array]",Ne="[object Object]",Be=Object.prototype.hasOwnProperty;function Ue(e,t,o,n,r){return e===t||(null==e||null==t||!(0,u.a)(e)&&!(0,u.a)(t)?e!=e&&t!=t:function(e,t,o,n,r,a){var i=(0,u.i)(e),l=(0,u.i)(t),s=i?Le:Te(e),c=l?Le:Te(t),h=(s=s==Ie?Ne:s)==Ne,d=(c=c==Ie?Ne:c)==Ne,b=s==c;if(b&&L(e)){if(!L(t))return!1;i=!0,h=!1}if(b&&!h)return a||(a=new ue),i||Y(e)?Me(e,t,o,n,r,a):function(e,t,o,n,r,a,i){switch(o){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new Ke(e),new Ke(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return T(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Re;case"[object Set]":var s=1&n;if(l||(l=$e),e.size!=t.size&&!s)return!1;var c=i.get(e);if(c)return c==t;n|=2,i.set(e,t);var h=Me(l(e),l(t),n,r,a,i);return i.delete(e),h;case"[object Symbol]":if(We)return We.call(e)==We.call(t)}return!1}(e,t,s,o,n,r,a);if(!(1&o)){var v=h&&Be.call(e,"__wrapped__"),f=d&&Be.call(t,"__wrapped__");if(v||f){var p=v?e.value():e,_=f?t.value():t;return a||(a=new ue),r(p,_,o,n,a)}}return!!b&&(a||(a=new ue),function(e,t,o,n,r,a){var i=1&o,l=pe(e),s=l.length;if(s!=pe(t).length&&!i)return!1;for(var c=s;c--;){var h=l[c];if(!(i?h in t:He.call(t,h)))return!1}var d=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var b=!0;a.set(e,t),a.set(t,e);for(var v=i;++c<s;){var f=e[h=l[c]],p=t[h];if(n)var _=i?n(p,f,h,t,e,a):n(f,p,h,e,t,a);if(!(void 0===_?f===p||r(f,p,o,n,a):_)){b=!1;break}v||(v="constructor"==h)}if(b&&!v){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(b=!1)}return a.delete(e),a.delete(t),b}(e,t,o,n,r,a))}(e,t,o,n,Ue,r))}const qe=/^\d+(\.\d+)?([a-z]+|%)?$/,Ve=class{constructor(e){(0,n.r)(this,e),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.renderTableRow=(e,t,o,a=!1)=>{var i,l;let s=String(t);return this.horizontal&&(null===(i=e[0])||void 0===i?void 0:i.data)&&(s=null!==(l=this.getDataKey(e[0].data))&&void 0!==l?l:s),(0,n.h)("tr",{class:(0,r.c)("kol-table__row",{"kol-table__row--body":!a,"kol-table__row--footer":a}),key:`row-${s}`},this.renderSelectionCell(e,t),e.map(((e,n)=>this.renderTableCell(e,t,n,o))))},this.renderTableCell=(e,t,o,a)=>{const i=this.getColumnSettings(e);if(i&&!i.visible)return"";let l=`${t}-${o}-${e.label}`;if(e.data){const n=this.getDataKey(e.data);l=n?`${n}-${this.horizontal?o:t}`:l}return e.headerCell?this.renderHeadingCell(e,t,o,a):(0,n.h)("td",{key:`cell-${l}`,class:(0,r.c)("kol-table__cell kol-table__cell--body",{[`kol-table__cell--align-${e.textAlign}`]:e.textAlign}),colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:(null==i?void 0:i.width)?`${i.width}ch`:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:"")},this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto"},this.tableDivElementHasScrollbar=!1,this.previousHeaderCells=void 0,this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0,this._tableSettings=void 0}validateData(e){(0,d.v)(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){(0,d.a)(this,e)}validateHeaderCells(e){((e,t)=>{(0,l.M)(t,(()=>{(0,l.o)(t,(()=>{try{t=(0,l.j)(t)}catch(e){}(0,l.w)(e,"_headerCells",(e=>"object"==typeof e&&null!==e&&(void 0===e.horizontal||Array.isArray(e.horizontal)&&void 0===e.horizontal.find((e=>!Array.isArray(e))))&&(void 0===e.vertical||Array.isArray(e.vertical)&&void 0===e.vertical.find((e=>!Array.isArray(e))))&&!0),new Set(["TableHeaderCellsPropType"]),t)}))}))})(this,e),function(e,t){return Ue(e,t)}(this.previousHeaderCells,this.state._headerCells)||this.initializeTableSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){(0,v.v)(this,e,{required:!0})}validateMinWidth(e){((e,t)=>{(0,l.w)(e,"_minWidth",(e=>"string"==typeof e&&qe.test(e)),new Set(["String","/^\\d+(\\.\\d+)?([a-z]+|%)?$/"]),t,void 0)})(this,e)}validateOn(e){(0,d.e)(this,e)}validateSelection(e){(0,d.b)(this,e)}validateTableSettings(e){(0,d.d)(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const o=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let n=this.checkboxRefs.indexOf(o);n>-1&&(e.preventDefault(),"ArrowDown"===e.key?(n=(n+1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()):"ArrowUp"===e.key&&(e.preventDefault(),n=(n+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}handleSettingsChange(e){(0,l.k)(this,"_tableSettings",e.detail)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach((e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,(0,c.n)())})),this.dataToKeyMap.forEach(((t,o)=>{e.includes(o)||this.dataToKeyMap.delete(o)}))}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout((()=>{if("function"==typeof e.render){const o=e.render(t,e,e.data,this.state._data);"string"==typeof o&&(t.textContent=o)}}))))}getNumberOfCols(e,t){let o=0;return e.forEach((e=>{let t=0;Array.isArray(e)&&e.forEach((e=>{var o;return t+=null!==(o=e.colSpan)&&void 0!==o?o:1})),o<t&&(o=t)})),0===o&&(o=t.length),o}getNumberOfRows(e,t){var o;let n=0;return e.forEach((e=>{let t=0;Array.isArray(e)&&e.forEach((e=>{var o;return t+=null!==(o=e.rowSpan)&&void 0!==o?o:1})),n<t&&(n=t)})),0===n?n=t.length:n-=(null===(o=this.state._dataFoot)||void 0===o?void 0:o.length)||0,n}getThePrimaryHeadersWithKeysIfExists(e){const t=[];return e.forEach((e=>{e.forEach((e=>{"string"==typeof e.key&&t.push(e)}))})),t}getPrimaryHeaders(e){var t,o;let n=this.getThePrimaryHeadersWithKeysIfExists(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===n.length&&(n=this.getThePrimaryHeadersWithKeysIfExists(null!==(o=e.vertical)&&void 0!==o?o:[]),n.length>0&&(this.horizontal=!1)),n}getColumnPositionMap(){var e;const t=new Map;return null===(e=this.state._tableSettings)||void 0===e||e.columns.forEach((e=>{t.set(e.key,e.position)})),t}sortByColumnPosition(e){const t=this.getColumnPositionMap();return[...e].sort(((e,o)=>{var n,r,a,i;return(null!==(r=t.get(null!==(n=e.key)&&void 0!==n?n:""))&&void 0!==r?r:Number.MAX_SAFE_INTEGER)-(null!==(i=t.get(null!==(a=o.key)&&void 0!==a?a:""))&&void 0!==i?i:Number.MAX_SAFE_INTEGER)}))}createDataField(e,t,o){var n;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const r=this.getPrimaryHeaders(t),a=this.getNumberOfCols(t.horizontal,e);let l=this.getNumberOfRows(t.vertical,e),s=0;o&&(s=l,l+=(null===(n=this.state._dataFoot)||void 0===n?void 0:n.length)||0);const c=[],h=[],d=[];t.vertical.forEach(((e,t)=>{h[t]=0,d[t]=[]}));const u=this.sortByColumnPosition(r);for(let n=s;n<l;n++){const r=[];t.vertical.forEach(((e,t)=>{let o=0;if(d[t].forEach((e=>o+=e)),o<=n){const a=e[n-o+h[t]];if("object"==typeof a){r.push(Object.assign(Object.assign({},a),{headerCell:!0,data:{}}));let e=1;if("number"==typeof a.rowSpan&&a.rowSpan>1&&(e=a.rowSpan),d[t].push(e),"number"==typeof a.colSpan&&a.colSpan>1)for(let o=1;o<a.colSpan;o++)d[t+o].push(e);h[t]++}}}));for(let t=0;t<a;t++)if(!0===this.horizontal){const a=o&&this.state._dataFoot?this.state._dataFoot[n-s]:e[n];"object"==typeof u[t]&&null!==u[t]&&"string"==typeof u[t].key&&"object"==typeof a&&null!==a&&r.push(Object.assign(Object.assign({},u[t]),{colSpan:void 0,data:a,label:a[u[t].key],rowSpan:void 0}))}else"object"==typeof u[n]&&null!==u[n]&&"string"==typeof u[n].key&&"object"==typeof e[t]&&null!==e[t]&&r.push(Object.assign(Object.assign({},u[n]),{colSpan:void 0,data:e[t],label:e[t][u[n].key],rowSpan:void 0}));c.push(r)}if(0===e.length){let e=0,o=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach((t=>{e+=t.colSpan||1})),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach((e=>{o+=e.rowSpan||1})));const n={colSpan:e,label:(0,i.t)("kol-no-entries"),render:void 0,rowSpan:Math.max(o,1)};0===c.length?c.push([n]):c[0].push(n)}return c}handleSelectionChangeCallbackAndEvent(e,t){var o;"function"==typeof(null===(o=this.state._on)||void 0===o?void 0:o[s.C.onSelectionChange])&&this.state._on[s.C.onSelectionChange](e,t),this.host&&(0,h.d)(this.host,h.K.selectionChange,t)}initializeTableSettings(){if(this._tableSettings)return;const e=this.getPrimaryHeaders(this.state._headerCells);this.state._tableSettings||(this.state._tableSettings={columns:[]}),this.state._tableSettings.columns=e.filter((e=>e.key)).map(((e,t)=>{var o;return{key:null!==(o=e.key)&&void 0!==o?o:(0,c.n)(),label:e.label,position:t,visible:!0}}))}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings)}renderSelectionCell(e,t){var o,i,l;const s=this.state._selection;if(!s)return"";const c=this.getSelectionKeyPropertyName(),h=null===(o=e[0])||void 0===o?void 0:o.data;if(!h)return"";const d=h[c],u=s.multiple||void 0===s.multiple,b=null===(i=null==s?void 0:s.selectedKeys)||void 0===i?void 0:i.includes(d),v=null===(l=null==s?void 0:s.disabledKeys)||void 0===l?void 0:l.includes(d),f=s.label(h),p={name:"selection",checked:b,disabled:v,id:d,"aria-label":f};return(0,n.h)("td",{key:`tbody-${t}-selection`,class:"kol-table__cell kol-table__cell--selection"},(0,n.h)("div",{class:(0,r.c)("kol-table__selection",{"kol-table__selection--checked":b})},u?(0,n.h)("label",{class:(0,r.c)("kol-table__selection-label",{"kol-table__selection-label--disabled":v})},(0,n.h)(a.d,{class:"kol-table__selection-icon",_icons:"codicon "+(b?"codicon-check":""),_label:""}),(0,n.h)("input",Object.assign({class:(0,r.c)("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},p,{type:"checkbox",onInput:e=>{var t,o;const n=b?null===(o=null==s?void 0:s.selectedKeys)||void 0===o?void 0:o.filter((e=>e!==d)):[...null!==(t=null==s?void 0:s.selectedKeys)&&void 0!==t?t:[],d];this.handleSelectionChangeCallbackAndEvent(e,null!=n?n:[])}}))):(0,n.h)("label",{class:"kol-table__selection-label"},(0,n.h)("input",Object.assign({class:(0,r.c)("kol-table__selection-input kol-table__selection-input--radio")},p,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,d)}}))),(0,n.h)(a.f,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${d}-label`,_label:f})))}getColumnSettings(e){var t;return null===(t=this.state._tableSettings)||void 0===t?void 0:t.columns.find((t=>t.key===e.key))}getSelectionKeyPropertyName(){var e,t;return null!==(t=null===(e=this.state._selection)||void 0===e?void 0:e.keyPropertyName)&&void 0!==t?t:"id"}getDataWithSelectionEnabled(){const e=this.getSelectionKeyPropertyName();return this.state._data.filter((t=>{var o,n;return!(null===(n=null===(o=this.state._selection)||void 0===o?void 0:o.disabledKeys)||void 0===n?void 0:n.includes(t[e]))}))}getSelectedKeysWithoutDisabledKeys(){var e,t;return null===(t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys)||void 0===t?void 0:t.filter((e=>{var t,o;return!(null===(o=null===(t=this.state._selection)||void 0===t?void 0:t.disabledKeys)||void 0===o?void 0:o.includes(e))}))}getSelectedKeysWithDisabledKeysOnly(){var e,t;return null===(t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys)||void 0===t?void 0:t.filter((e=>{var t,o;return null===(o=null===(t=this.state._selection)||void 0===t?void 0:t.disabledKeys)||void 0===o?void 0:o.includes(e)}))}getRevertedSelection(e){var t;const o=this.getSelectionKeyPropertyName(),n=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&n.push(...this.getDataWithSelectionEnabled().map((e=>null==e?void 0:e[o]))),n}getTableMinWidth(){var e,t;const o=null!==(t=null===(e=this.state._tableSettings)||void 0===e?void 0:e.columns.filter((e=>e.visible)).reduce(((e,t)=>{var o;return e+(null!==(o=t.width)&&void 0!==o?o:0)}),0))&&void 0!==t?t:0;return"auto"===this.state._minWidth?`${o}ch`:`max(${this.state._minWidth}, ${o}ch)`}renderHeadingSelectionCell(){var e,t;const o=this.state._selection;if(!o||!o.multiple&&void 0!==o.multiple)return(0,n.h)("th",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});const l=null!==(t=null===(e=this.getSelectedKeysWithoutDisabledKeys())||void 0===e?void 0:e.length)&&void 0!==t?t:0,s=l===this.getDataWithSelectionEnabled().length,c=0!==l&&!s;let h="kol-table-selection-indeterminate";s&&!c&&(h="kol-table-selection-none"),0===l&&(h="kol-table-selection-all");const d=(0,i.t)(h);return(0,n.h)("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header"},(0,n.h)("div",{class:(0,r.c)("kol-table__selection",{"kol-table__selection--indeterminate":c,"kol-table__selection--checked":s})},(0,n.h)("label",{class:"kol-table__selection-label"},(0,n.h)(a.d,{class:"kol-table__selection-icon",_icons:"codicon "+(c?"codicon-remove":s?"codicon-check":""),_label:""}),(0,n.h)("input",{class:(0,r.c)("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:s&&!c,indeterminate:c,"aria-label":d,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!s))}})),(0,n.h)(a.f,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${h}-label`,_label:d})))}renderHeaderTdCell(){return(0,n.h)(n.F,null,Array.isArray(this.state._headerCells.horizontal)&&this.state._headerCells.horizontal.length>0&&Array.isArray(this.state._headerCells.vertical)&&this.state._headerCells.vertical.length>0&&Array.isArray(this.state._headerCells.horizontal)&&(0,n.h)("td",{"aria-hidden":"true",colSpan:this.state._headerCells.vertical.length,rowSpan:this.state._headerCells.horizontal.length}))}renderHeadingCell(e,t,o,i){const l=this.getColumnSettings(e);if(l&&!l.visible)return"";let s,c="codicon codicon-fold";if(e.sortDirection)switch(e.sortDirection){case"ASC":c="codicon codicon-chevron-up",s="ascending";break;case"DESC":c="codicon codicon-chevron-down",s="descending"}const d=i?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col";return(0,n.h)("th",{key:`${t}-${o}-${e.label}`,class:(0,r.c)("kol-table__cell kol-table__cell--header",{[`kol-table__cell--align-${e.textAlign}`]:e.textAlign,[`kol-table__cell--${s}`]:s}),scope:d,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:(null==l?void 0:l.width)?`${l.width}ch`:e.width},"aria-sort":s,"data-sort":`sort-${e.sortDirection}`},e.sortDirection?(0,n.h)(a.a,{class:"kol-table__sort-button",exportparts:"icon",_icons:{right:c},_label:e.label,_on:{onClick:t=>{var o;"function"==typeof(null===(o=this.state._on)||void 0===o?void 0:o.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection}),this.host&&(0,h.d)(this.host,h.K.sort,{key:e.key,currentSortDirection:e.sortDirection})}}}):e.label)}renderSpacer(e,t){var o,a;const i=(null===(o=this.state._headerCells.vertical)||void 0===o?void 0:o.length)||0,l=null===(a=null==t?void 0:t[0])||void 0===a?void 0:a.reduce(((e,t)=>e+(t.colSpan||1)),0),s=this.state._selection?1:0;return(0,n.h)("tr",{"aria-hidden":"true",class:(0,r.c)("kol-table__spacer",`kol-table__spacer--${e}`)},(0,n.h)("td",{class:(0,r.c)(`kol-table__spacer-line kol-table__spacer-line--${e}`),colSpan:i+l+s}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return(0,n.h)("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",e),e.map(((e,t)=>this.renderTableRow(e,t,!0,!0)))])}render(){var e;const t=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const o=null===(e=this.state._headerCells.horizontal)||void 0===e?void 0:e.map((e=>this.sortByColumnPosition(e)));return(0,n.h)("div",{key:"41ef1f9232f94305a6492420a311cf543b582a22",class:"kol-table"},(0,n.h)(a.v,{key:"3e0def33d6cf806d72c305d0e350b7ee4b2d3899",_tableSettings:this.state._tableSettings}),(0,n.h)("div",{key:"cc55a031f7bae8733cc5877763b68f9b1717b3e2",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},(0,n.h)("table",{key:"c96b4770ff54fb28a6d6eea1a9f021132e04652c",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},(0,n.h)("div",{key:"96095fade8aa2347d2db8e4a42a735e07a683f05",class:"kol-table__focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),(0,n.h)("caption",{key:"fbf77baecd9f1f569c97df6596e598926f4fc420",class:"kol-table__caption",id:"caption"},this.state._label),Array.isArray(o)&&(0,n.h)("thead",{key:"aeab10b5b582c3134e5e0e7a483fbd441e00edc1",class:"kol-table__head"},[o.map(((e,t)=>(0,n.h)("tr",{class:"kol-table__head-row",key:`thead-${t}`},this.state._selection&&this.renderHeadingSelectionCell(),0===t&&this.renderHeaderTdCell(),Array.isArray(e)&&e.map(((e,o)=>this.renderHeadingCell(e,t,o,!1)))))),this.renderSpacer("head",o)]),(0,n.h)("tbody",{key:"536ad9c3574792ce18cf2694a4251cd781587aea",class:"kol-table__body"},t.map(((e,t)=>this.renderTableRow(e,t,!0)))),this.renderFoot())))}get host(){return(0,n.g)(this)}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"],_tableSettings:["validateTableSettings"]}}}},8045:(e,t,o)=>{function n(e){var t,o,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=n(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function r(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=n(e))&&(r&&(r+=" "),r+=t);return r}o.d(t,{c:()=>r})},9272:(e,t,o)=>{o.d(t,{t:()=>a});var n=o(4269),r=o(257);let a=(e,t)=>{var o;return(null!==(o=(0,n.g)())&&void 0!==o?o:(0,n.i)("de")).translate(e,t)};"test"===r.p&&(a=e=>e)}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[7533],{792:(e,t,o)=>{o.d(t,{a:()=>l,b:()=>s,c:()=>a,d:()=>c,e:()=>r,v:()=>i});var n=o(257);const r=(e,t)=>{(0,n.w)(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableCallbacksPropType {Events.onSort, Events.onSelectionChange}"]),t)},a=(e,t)=>{(0,n.w)(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["TableStatefulCallbacksPropType {Events.onSelectionChange}"]),t)},i=(e,t,o)=>{(0,n.M)(t,(()=>{(0,n.o)(t,(()=>{void 0===t&&(t=[]);try{t=(0,n.j)(t)}catch(e){}Array.isArray(t)&&t.every((e=>"object"==typeof e&&null!==e))&&(0,n.k)(e,"_data",t,o)}))}))},l=(e,t,o)=>{(0,n.M)(t,(()=>{(0,n.o)(t,(()=>{void 0===t&&(t=[]);try{t=(0,n.j)(t)}catch(e){}Array.isArray(t)&&t.every((e=>"object"==typeof e&&null!==e))&&(0,n.k)(e,"_dataFoot",t,o)}))}))},s=(e,t)=>{var o;(o="string"==typeof t?(()=>{try{return(0,n.j)(t)}catch(e){return}})():t)&&(0,n.v)(o)&&"function"==typeof o.label&&(!o.selectedKeys||Array.isArray(o.selectedKeys))&&(0,n.k)(e,"_selection",t)},c=(e,t)=>{(0,n.w)(e,"_tableSettings",(e=>"object"==typeof e&&null!==e),new Set(["TableSettings"]),t)}},1476:(e,t,o)=>{function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}o.d(t,{i:()=>n})},3472:(e,t,o)=>{o.d(t,{a:()=>d,b:()=>l,c:()=>s,h:()=>r,v:()=>h});var n=o(257);const r=[0,1,2,3,4,5,6],a=/[a-zA-Z0-9äöüÄÖÜß]/g,i=/^\d+$/;function l(e,t=1){return function(e){var t;return"string"==typeof e&&(null===(t=e.match(a))||void 0===t?void 0:t.length)||0}(e)>=t}function s(e){return i.test(e)}const c=new Set(["string"]),h=(e,t,o={})=>{(0,n.w)(e,"_label",(e=>"string"==typeof e),c,t,function(e){var t;return Object.assign(Object.assign({},e),{hooks:{afterPatch:(t,o,r,a)=>{var i,c;"function"==typeof(null===(i=e.hooks)||void 0===i?void 0:i.afterPatch)&&(null===(c=e.hooks)||void 0===c||c.afterPatch(t,o,r,a)),"string"==typeof t&&!1===l(t,3)&&!1===s(t)&&(0,n.b)(`The heading or label ("${t}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof t&&t.length>80&&(0,n.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(t=e.hooks)||void 0===t?void 0:t.beforePatch}})}(o))},d=h},3571:(e,t,o)=>{var n,r,a,i;o.d(t,{C:()=>n,K:()=>a}),(r=n||(n={})).onBlur="onBlur",r.onChange="onChange",r.onChangePage="onChangePage",r.onClick="onClick",r.onClose="onClose",r.onDblClick="onDblClick",r.onFocus="onFocus",r.onInput="onInput",r.onKeyDown="onKeyDown",r.onKeyPress="onKeyPress",r.onKeyUp="onKeyUp",r.onMouseDown="onMouseDown",r.onMouseMove="onMouseMove",r.onMouseOut="onMouseOut",r.onMouseOver="onMouseOver",r.onMouseUp="onMouseUp",r.onReset="onReset",r.onSelect="onSelect",r.onSelectionChange="onSelectionChange",r.onChangePageSize="onChangePageSize",r.onSort="onSort",r.onSubmit="onSubmit",r.onToggle="onToggle",(i=a||(a={})).ArrowDown="ArrowDown",i.ArrowLeft="ArrowLeft",i.ArrowRight="ArrowRight",i.ArrowUp="ArrowUp",i.Enter="Enter",i.Space=" "},5538:(e,t,o)=>{o.d(t,{S:()=>i,a:()=>p,b:()=>f,f:()=>n,i:()=>_,r:()=>a});const n="object"==typeof o.g&&o.g&&o.g.Object===Object&&o.g;var r="object"==typeof self&&self&&self.Object===Object&&self;const a=n||r||Function("return this")(),i=a.Symbol;var l=Object.prototype,s=l.hasOwnProperty,c=l.toString,h=i?i.toStringTag:void 0,d=Object.prototype.toString,u="[object Null]",b="[object Undefined]",v=i?i.toStringTag:void 0;function f(e){return null==e?void 0===e?b:u:v&&v in Object(e)?function(e){var t=s.call(e,h),o=e[h];try{e[h]=void 0;var n=!0}catch(e){}var r=c.call(e);return n&&(t?e[h]=o:delete e[h]),r}(e):function(e){return d.call(e)}(e)}function p(e){return null!=e&&"object"==typeof e}const _=Array.isArray},7533:(e,t,o)=>{o.r(t),o.d(t,{kol_table_stateless_wc:()=>Ve});var n=o(6123),r=o(8045),a=o(1698),i=o(9272),l=o(257),s=o(3571),c=o(9167),h=o(3694),d=o(792),u=o(5538),b=o(1476),v=o(3472);function f(e){if(!(0,b.i)(e))return!1;var t=(0,u.b)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}o(4269),e=o.hmd(e);const p=u.r["__core-js_shared__"];var _,y=(_=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"",g=Function.prototype.toString;function k(e){if(null!=e){try{return g.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var S=/^\[object .+?Constructor\]$/,m=Function.prototype,w=Object.prototype,j=m.toString,A=w.hasOwnProperty,C=RegExp("^"+j.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O(e,t){var o=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!(0,b.i)(e)||(t=e,y&&y in t))&&(f(e)?C:S).test(k(e));var t}(o)?o:void 0}const D=O(u.r,"WeakMap");var E=/^(?:0|[1-9]\d*)$/;function z(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&E.test(e))&&e>-1&&e%1==0&&e<t}function T(e,t){return e===t||e!=e&&t!=t}function K(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var P=Object.prototype;function x(e){return(0,u.a)(e)&&"[object Arguments]"==(0,u.b)(e)}var M=Object.prototype,R=M.hasOwnProperty,$=M.propertyIsEnumerable;const F=x(function(){return arguments}())?x:function(e){return(0,u.a)(e)&&R.call(e,"callee")&&!$.call(e,"callee")};var W="object"==typeof exports&&exports&&!exports.nodeType&&exports,H=W&&e&&!e.nodeType&&e,I=H&&H.exports===W?u.r.Buffer:void 0;const L=(I?I.isBuffer:void 0)||function(){return!1};var N={};N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Arguments]"]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object Boolean]"]=N["[object DataView]"]=N["[object Date]"]=N["[object Error]"]=N["[object Function]"]=N["[object Map]"]=N["[object Number]"]=N["[object Object]"]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object WeakMap]"]=!1;var B,U="object"==typeof exports&&exports&&!exports.nodeType&&exports,q=U&&e&&!e.nodeType&&e,V=q&&q.exports===U&&u.f.process,G=function(){try{return q&&q.require&&q.require("util").types||V&&V.binding&&V.binding("util")}catch(e){}}(),X=G&&G.isTypedArray;const Y=X?(B=X,function(e){return B(e)}):function(e){return(0,u.a)(e)&&K(e.length)&&!!N[(0,u.b)(e)]};var Z=Object.prototype.hasOwnProperty;var J=function(e,t){return function(o){return e(t(o))}}(Object.keys,Object);const Q=J;var ee=Object.prototype.hasOwnProperty;function te(e){return null!=(t=e)&&K(t.length)&&!f(t)?function(e,t){var o=(0,u.i)(e),n=!o&&F(e),r=!o&&!n&&L(e),a=!o&&!n&&!r&&Y(e),i=o||n||r||a,l=i?function(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}(e.length,String):[],s=l.length;for(var c in e)!t&&!Z.call(e,c)||i&&("length"==c||r&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||z(c,s))||l.push(c);return l}(e):function(e){if(o=(t=e)&&t.constructor,t!==("function"==typeof o&&o.prototype||P))return Q(e);var t,o,n=[];for(var r in Object(e))ee.call(e,r)&&"constructor"!=r&&n.push(r);return n}(e);var t}const oe=O(Object,"create");var ne=Object.prototype.hasOwnProperty,re=Object.prototype.hasOwnProperty;function ae(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function ie(e,t){for(var o=e.length;o--;)if(T(e[o][0],t))return o;return-1}ae.prototype.clear=function(){this.__data__=oe?oe(null):{},this.size=0},ae.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ae.prototype.get=function(e){var t=this.__data__;if(oe){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return ne.call(t,e)?t[e]:void 0},ae.prototype.has=function(e){var t=this.__data__;return oe?void 0!==t[e]:re.call(t,e)},ae.prototype.set=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=oe&&void 0===t?"__lodash_hash_undefined__":t,this};var le=Array.prototype.splice;function se(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}se.prototype.clear=function(){this.__data__=[],this.size=0},se.prototype.delete=function(e){var t=this.__data__,o=ie(t,e);return!(o<0||(o==t.length-1?t.pop():le.call(t,o,1),--this.size,0))},se.prototype.get=function(e){var t=this.__data__,o=ie(t,e);return o<0?void 0:t[o][1]},se.prototype.has=function(e){return ie(this.__data__,e)>-1},se.prototype.set=function(e,t){var o=this.__data__,n=ie(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};const ce=O(u.r,"Map");function he(e,t){var o,n,r=e.__data__;return("string"==(n=typeof(o=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==o:null===o)?r["string"==typeof t?"string":"hash"]:r.map}function de(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function ue(e){var t=this.__data__=new se(e);this.size=t.size}de.prototype.clear=function(){this.size=0,this.__data__={hash:new ae,map:new(ce||se),string:new ae}},de.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},de.prototype.get=function(e){return he(this,e).get(e)},de.prototype.has=function(e){return he(this,e).has(e)},de.prototype.set=function(e,t){var o=he(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this},ue.prototype.clear=function(){this.__data__=new se,this.size=0},ue.prototype.delete=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o},ue.prototype.get=function(e){return this.__data__.get(e)},ue.prototype.has=function(e){return this.__data__.has(e)},ue.prototype.set=function(e,t){var o=this.__data__;if(o instanceof se){var n=o.__data__;if(!ce||n.length<199)return n.push([e,t]),this.size=++o.size,this;o=this.__data__=new de(n)}return o.set(e,t),this.size=o.size,this};var be=Object.prototype.propertyIsEnumerable,ve=Object.getOwnPropertySymbols;const fe=ve?function(e){return null==e?[]:(e=Object(e),function(t){for(var o=-1,n=null==t?0:t.length,r=0,a=[];++o<n;){var i=t[o];l=i,be.call(e,l)&&(a[r++]=i)}var l;return a}(ve(e)))}:function(){return[]};function pe(e){return function(e,t,o){var n=t(e);return(0,u.i)(e)?n:function(e,t){for(var o=-1,n=t.length,r=e.length;++o<n;)e[r+o]=t[o];return e}(n,o(e))}(e,te,fe)}const _e=O(u.r,"DataView"),ye=O(u.r,"Promise"),ge=O(u.r,"Set");var ke="[object Map]",Se="[object Promise]",me="[object Set]",we="[object WeakMap]",je="[object DataView]",Ae=k(_e),Ce=k(ce),Oe=k(ye),De=k(ge),Ee=k(D),ze=u.b;(_e&&ze(new _e(new ArrayBuffer(1)))!=je||ce&&ze(new ce)!=ke||ye&&ze(ye.resolve())!=Se||ge&&ze(new ge)!=me||D&&ze(new D)!=we)&&(ze=function(e){var t=(0,u.b)(e),o="[object Object]"==t?e.constructor:void 0,n=o?k(o):"";if(n)switch(n){case Ae:return je;case Ce:return ke;case Oe:return Se;case De:return me;case Ee:return we}return t});const Te=ze,Ke=u.r.Uint8Array;function Pe(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new de;++t<o;)this.add(e[t])}function xe(e,t){for(var o=-1,n=null==e?0:e.length;++o<n;)if(t(e[o],o,e))return!0;return!1}function Me(e,t,o,n,r,a){var i=1&o,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=2&o?new Pe:void 0;for(a.set(e,t),a.set(t,e);++d<l;){var v=e[d],f=t[d];if(n)var p=i?n(f,v,d,t,e,a):n(v,f,d,e,t,a);if(void 0!==p){if(p)continue;u=!1;break}if(b){if(!xe(t,(function(e,t){if(i=t,!b.has(i)&&(v===e||r(v,e,o,n,a)))return b.push(t);var i}))){u=!1;break}}else if(v!==f&&!r(v,f,o,n,a)){u=!1;break}}return a.delete(e),a.delete(t),u}function Re(e){var t=-1,o=Array(e.size);return e.forEach((function(e,n){o[++t]=[n,e]})),o}function $e(e){var t=-1,o=Array(e.size);return e.forEach((function(e){o[++t]=e})),o}Pe.prototype.add=Pe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Pe.prototype.has=function(e){return this.__data__.has(e)};var Fe=u.S?u.S.prototype:void 0,We=Fe?Fe.valueOf:void 0,He=Object.prototype.hasOwnProperty,Ie="[object Arguments]",Le="[object Array]",Ne="[object Object]",Be=Object.prototype.hasOwnProperty;function Ue(e,t,o,n,r){return e===t||(null==e||null==t||!(0,u.a)(e)&&!(0,u.a)(t)?e!=e&&t!=t:function(e,t,o,n,r,a){var i=(0,u.i)(e),l=(0,u.i)(t),s=i?Le:Te(e),c=l?Le:Te(t),h=(s=s==Ie?Ne:s)==Ne,d=(c=c==Ie?Ne:c)==Ne,b=s==c;if(b&&L(e)){if(!L(t))return!1;i=!0,h=!1}if(b&&!h)return a||(a=new ue),i||Y(e)?Me(e,t,o,n,r,a):function(e,t,o,n,r,a,i){switch(o){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new Ke(e),new Ke(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return T(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Re;case"[object Set]":var s=1&n;if(l||(l=$e),e.size!=t.size&&!s)return!1;var c=i.get(e);if(c)return c==t;n|=2,i.set(e,t);var h=Me(l(e),l(t),n,r,a,i);return i.delete(e),h;case"[object Symbol]":if(We)return We.call(e)==We.call(t)}return!1}(e,t,s,o,n,r,a);if(!(1&o)){var v=h&&Be.call(e,"__wrapped__"),f=d&&Be.call(t,"__wrapped__");if(v||f){var p=v?e.value():e,_=f?t.value():t;return a||(a=new ue),r(p,_,o,n,a)}}return!!b&&(a||(a=new ue),function(e,t,o,n,r,a){var i=1&o,l=pe(e),s=l.length;if(s!=pe(t).length&&!i)return!1;for(var c=s;c--;){var h=l[c];if(!(i?h in t:He.call(t,h)))return!1}var d=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var b=!0;a.set(e,t),a.set(t,e);for(var v=i;++c<s;){var f=e[h=l[c]],p=t[h];if(n)var _=i?n(p,f,h,t,e,a):n(f,p,h,e,t,a);if(!(void 0===_?f===p||r(f,p,o,n,a):_)){b=!1;break}v||(v="constructor"==h)}if(b&&!v){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(b=!1)}return a.delete(e),a.delete(t),b}(e,t,o,n,r,a))}(e,t,o,n,Ue,r))}const qe=/^\d+(\.\d+)?([a-z]+|%)?$/,Ve=class{constructor(e){(0,n.r)(this,e),this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.renderTableRow=(e,t,o,a=!1)=>{var i,l;let s=String(t);return this.horizontal&&(null===(i=e[0])||void 0===i?void 0:i.data)&&(s=null!==(l=this.getDataKey(e[0].data))&&void 0!==l?l:s),(0,n.h)("tr",{class:(0,r.c)("kol-table__row",{"kol-table__row--body":!a,"kol-table__row--footer":a}),key:`row-${s}`},this.renderSelectionCell(e,t),e.map(((e,n)=>this.renderTableCell(e,t,n,o))))},this.renderTableCell=(e,t,o,a)=>{const i=this.getColumnSettings(e);if(i&&!i.visible)return"";let l=`${t}-${o}-${e.label}`;if(e.data){const n=this.getDataKey(e.data);l=n?`${n}-${this.horizontal?o:t}`:l}return e.headerCell?this.renderHeadingCell(e,t,o,a):(0,n.h)("td",{key:`cell-${l}`,class:(0,r.c)("kol-table__cell kol-table__cell--body",{[`kol-table__cell--align-${e.textAlign}`]:e.textAlign}),colSpan:e.colSpan,rowSpan:e.rowSpan,style:{textAlign:e.textAlign,width:(null==i?void 0:i.width)?`${i.width}ch`:e.width},ref:"function"==typeof e.render?t=>{this.cellRender(e,t)}:void 0},"function"!=typeof e.render?e.label:"")},this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto"},this.tableDivElementHasScrollbar=!1,this.previousHeaderCells=void 0,this._data=void 0,this._dataFoot=void 0,this._headerCells=void 0,this._label=void 0,this._minWidth=void 0,this._on=void 0,this._selection=void 0,this._tableSettings=void 0}validateData(e){(0,d.v)(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){(0,d.a)(this,e)}validateHeaderCells(e){((e,t)=>{(0,l.M)(t,(()=>{(0,l.o)(t,(()=>{try{t=(0,l.j)(t)}catch(e){}(0,l.w)(e,"_headerCells",(e=>"object"==typeof e&&null!==e&&(void 0===e.horizontal||Array.isArray(e.horizontal)&&void 0===e.horizontal.find((e=>!Array.isArray(e))))&&(void 0===e.vertical||Array.isArray(e.vertical)&&void 0===e.vertical.find((e=>!Array.isArray(e))))&&!0),new Set(["TableHeaderCellsPropType"]),t)}))}))})(this,e),function(e,t){return Ue(e,t)}(this.previousHeaderCells,this.state._headerCells)||this.initializeTableSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){(0,v.v)(this,e,{required:!0})}validateMinWidth(e){((e,t)=>{(0,l.w)(e,"_minWidth",(e=>"string"==typeof e&&qe.test(e)),new Set(["String","/^\\d+(\\.\\d+)?([a-z]+|%)?$/"]),t,void 0)})(this,e)}validateOn(e){(0,d.e)(this,e)}validateSelection(e){(0,d.b)(this,e)}validateTableSettings(e){(0,d.d)(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const o=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let n=this.checkboxRefs.indexOf(o);n>-1&&(e.preventDefault(),"ArrowDown"===e.key?(n=(n+1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()):"ArrowUp"===e.key&&(e.preventDefault(),n=(n+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}handleSettingsChange(e){(0,l.k)(this,"_tableSettings",e.detail)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach((e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,(0,c.n)())})),this.dataToKeyMap.forEach(((t,o)=>{e.includes(o)||this.dataToKeyMap.delete(o)}))}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout((()=>{if("function"==typeof e.render){const o=e.render(t,e,e.data,this.state._data);"string"==typeof o&&(t.textContent=o)}}))))}getNumberOfCols(e,t){let o=0;return e.forEach((e=>{let t=0;Array.isArray(e)&&e.forEach((e=>{var o;return t+=null!==(o=e.colSpan)&&void 0!==o?o:1})),o<t&&(o=t)})),0===o&&(o=t.length),o}getNumberOfRows(e,t){var o;let n=0;return e.forEach((e=>{let t=0;Array.isArray(e)&&e.forEach((e=>{var o;return t+=null!==(o=e.rowSpan)&&void 0!==o?o:1})),n<t&&(n=t)})),0===n?n=t.length:n-=(null===(o=this.state._dataFoot)||void 0===o?void 0:o.length)||0,n}getThePrimaryHeadersWithKeysIfExists(e){const t=[];return e.forEach((e=>{e.forEach((e=>{"string"==typeof e.key&&t.push(e)}))})),t}getPrimaryHeaders(e){var t,o;let n=this.getThePrimaryHeadersWithKeysIfExists(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===n.length&&(n=this.getThePrimaryHeadersWithKeysIfExists(null!==(o=e.vertical)&&void 0!==o?o:[]),n.length>0&&(this.horizontal=!1)),n}getColumnPositionMap(){var e;const t=new Map;return null===(e=this.state._tableSettings)||void 0===e||e.columns.forEach((e=>{t.set(e.key,e.position)})),t}sortByColumnPosition(e){const t=this.getColumnPositionMap();return[...e].sort(((e,o)=>{var n,r,a,i;return(null!==(r=t.get(null!==(n=e.key)&&void 0!==n?n:""))&&void 0!==r?r:Number.MAX_SAFE_INTEGER)-(null!==(i=t.get(null!==(a=o.key)&&void 0!==a?a:""))&&void 0!==i?i:Number.MAX_SAFE_INTEGER)}))}createDataField(e,t,o){var n;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const r=this.getPrimaryHeaders(t),a=this.getNumberOfCols(t.horizontal,e);let l=this.getNumberOfRows(t.vertical,e),s=0;o&&(s=l,l+=(null===(n=this.state._dataFoot)||void 0===n?void 0:n.length)||0);const c=[],h=[],d=[];t.vertical.forEach(((e,t)=>{h[t]=0,d[t]=[]}));const u=this.sortByColumnPosition(r);for(let n=s;n<l;n++){const r=[];t.vertical.forEach(((e,t)=>{let o=0;if(d[t].forEach((e=>o+=e)),o<=n){const a=e[n-o+h[t]];if("object"==typeof a){r.push(Object.assign(Object.assign({},a),{headerCell:!0,data:{}}));let e=1;if("number"==typeof a.rowSpan&&a.rowSpan>1&&(e=a.rowSpan),d[t].push(e),"number"==typeof a.colSpan&&a.colSpan>1)for(let o=1;o<a.colSpan;o++)d[t+o].push(e);h[t]++}}}));for(let t=0;t<a;t++)if(!0===this.horizontal){const a=o&&this.state._dataFoot?this.state._dataFoot[n-s]:e[n];"object"==typeof u[t]&&null!==u[t]&&"string"==typeof u[t].key&&"object"==typeof a&&null!==a&&r.push(Object.assign(Object.assign({},u[t]),{colSpan:void 0,data:a,label:a[u[t].key],rowSpan:void 0}))}else"object"==typeof u[n]&&null!==u[n]&&"string"==typeof u[n].key&&"object"==typeof e[t]&&null!==e[t]&&r.push(Object.assign(Object.assign({},u[n]),{colSpan:void 0,data:e[t],label:e[t][u[n].key],rowSpan:void 0}));c.push(r)}if(0===e.length){let e=0,o=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach((t=>{e+=t.colSpan||1})),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach((e=>{o+=e.rowSpan||1})));const n={colSpan:e,label:(0,i.t)("kol-no-entries"),render:void 0,rowSpan:Math.max(o,1)};0===c.length?c.push([n]):c[0].push(n)}return c}handleSelectionChangeCallbackAndEvent(e,t){var o;"function"==typeof(null===(o=this.state._on)||void 0===o?void 0:o[s.C.onSelectionChange])&&this.state._on[s.C.onSelectionChange](e,t),this.host&&(0,h.d)(this.host,h.K.selectionChange,t)}initializeTableSettings(){if(this._tableSettings)return;const e=this.getPrimaryHeaders(this.state._headerCells);this.state._tableSettings||(this.state._tableSettings={columns:[]}),this.state._tableSettings.columns=e.filter((e=>e.key)).map(((e,t)=>{var o;return{key:null!==(o=e.key)&&void 0!==o?o:(0,c.n)(),label:e.label,position:t,visible:!0}}))}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings)}renderSelectionCell(e,t){var o,i,l;const s=this.state._selection;if(!s)return"";const c=this.getSelectionKeyPropertyName(),h=null===(o=e[0])||void 0===o?void 0:o.data;if(!h)return"";const d=h[c],u=s.multiple||void 0===s.multiple,b=null===(i=null==s?void 0:s.selectedKeys)||void 0===i?void 0:i.includes(d),v=null===(l=null==s?void 0:s.disabledKeys)||void 0===l?void 0:l.includes(d),f=s.label(h),p={name:"selection",checked:b,disabled:v,id:d,"aria-label":f};return(0,n.h)("td",{key:`tbody-${t}-selection`,class:"kol-table__cell kol-table__cell--selection"},(0,n.h)("div",{class:(0,r.c)("kol-table__selection",{"kol-table__selection--checked":b})},u?(0,n.h)("label",{class:(0,r.c)("kol-table__selection-label",{"kol-table__selection-label--disabled":v})},(0,n.h)(a.d,{class:"kol-table__selection-icon",_icons:"codicon "+(b?"codicon-check":""),_label:""}),(0,n.h)("input",Object.assign({class:(0,r.c)("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},p,{type:"checkbox",onInput:e=>{var t,o;const n=b?null===(o=null==s?void 0:s.selectedKeys)||void 0===o?void 0:o.filter((e=>e!==d)):[...null!==(t=null==s?void 0:s.selectedKeys)&&void 0!==t?t:[],d];this.handleSelectionChangeCallbackAndEvent(e,null!=n?n:[])}}))):(0,n.h)("label",{class:"kol-table__selection-label"},(0,n.h)("input",Object.assign({class:(0,r.c)("kol-table__selection-input kol-table__selection-input--radio")},p,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,d)}}))),(0,n.h)(a.f,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${d}-label`,_label:f})))}getColumnSettings(e){var t;return null===(t=this.state._tableSettings)||void 0===t?void 0:t.columns.find((t=>t.key===e.key))}getSelectionKeyPropertyName(){var e,t;return null!==(t=null===(e=this.state._selection)||void 0===e?void 0:e.keyPropertyName)&&void 0!==t?t:"id"}getDataWithSelectionEnabled(){const e=this.getSelectionKeyPropertyName();return this.state._data.filter((t=>{var o,n;return!(null===(n=null===(o=this.state._selection)||void 0===o?void 0:o.disabledKeys)||void 0===n?void 0:n.includes(t[e]))}))}getSelectedKeysWithoutDisabledKeys(){var e,t;return null===(t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys)||void 0===t?void 0:t.filter((e=>{var t,o;return!(null===(o=null===(t=this.state._selection)||void 0===t?void 0:t.disabledKeys)||void 0===o?void 0:o.includes(e))}))}getSelectedKeysWithDisabledKeysOnly(){var e,t;return null===(t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys)||void 0===t?void 0:t.filter((e=>{var t,o;return null===(o=null===(t=this.state._selection)||void 0===t?void 0:t.disabledKeys)||void 0===o?void 0:o.includes(e)}))}getRevertedSelection(e){var t;const o=this.getSelectionKeyPropertyName(),n=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&n.push(...this.getDataWithSelectionEnabled().map((e=>null==e?void 0:e[o]))),n}getTableMinWidth(){var e,t;const o=null!==(t=null===(e=this.state._tableSettings)||void 0===e?void 0:e.columns.filter((e=>e.visible)).reduce(((e,t)=>{var o;return e+(null!==(o=t.width)&&void 0!==o?o:0)}),0))&&void 0!==t?t:0;return"auto"===this.state._minWidth?`${o}ch`:`max(${this.state._minWidth}, ${o}ch)`}renderHeadingSelectionCell(){var e,t;const o=this.state._selection;if(!o||!o.multiple&&void 0!==o.multiple)return(0,n.h)("th",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});const l=null!==(t=null===(e=this.getSelectedKeysWithoutDisabledKeys())||void 0===e?void 0:e.length)&&void 0!==t?t:0,s=l===this.getDataWithSelectionEnabled().length,c=0!==l&&!s;let h="kol-table-selection-indeterminate";s&&!c&&(h="kol-table-selection-none"),0===l&&(h="kol-table-selection-all");const d=(0,i.t)(h);return(0,n.h)("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header"},(0,n.h)("div",{class:(0,r.c)("kol-table__selection",{"kol-table__selection--indeterminate":c,"kol-table__selection--checked":s})},(0,n.h)("label",{class:"kol-table__selection-label"},(0,n.h)(a.d,{class:"kol-table__selection-icon",_icons:"codicon "+(c?"codicon-remove":s?"codicon-check":""),_label:""}),(0,n.h)("input",{class:(0,r.c)("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:s&&!c,indeterminate:c,"aria-label":d,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!s))}})),(0,n.h)(a.f,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${h}-label`,_label:d})))}renderHeaderTdCell(){return(0,n.h)(n.F,null,Array.isArray(this.state._headerCells.horizontal)&&this.state._headerCells.horizontal.length>0&&Array.isArray(this.state._headerCells.vertical)&&this.state._headerCells.vertical.length>0&&Array.isArray(this.state._headerCells.horizontal)&&(0,n.h)("td",{"aria-hidden":"true",colSpan:this.state._headerCells.vertical.length,rowSpan:this.state._headerCells.horizontal.length}))}renderHeadingCell(e,t,o,i){const l=this.getColumnSettings(e);if(l&&!l.visible)return"";let s,c="codicon codicon-fold";if(e.sortDirection)switch(e.sortDirection){case"ASC":c="codicon codicon-chevron-up",s="ascending";break;case"DESC":c="codicon codicon-chevron-down",s="descending"}const d=i?"row":"number"==typeof e.colSpan&&e.colSpan>1?"colgroup":"col";return(0,n.h)("th",{key:`${t}-${o}-${e.label}`,class:(0,r.c)("kol-table__cell kol-table__cell--header",{[`kol-table__cell--align-${e.textAlign}`]:e.textAlign,[`kol-table__cell--${s}`]:s}),scope:d,colSpan:e.colSpan,rowSpan:e.rowSpan,style:{width:(null==l?void 0:l.width)?`${l.width}ch`:e.width},"aria-sort":s,"data-sort":`sort-${e.sortDirection}`},e.sortDirection?(0,n.h)(a.a,{class:"kol-table__sort-button",exportparts:"icon",_icons:{right:c},_label:e.label,_on:{onClick:t=>{var o;"function"==typeof(null===(o=this.state._on)||void 0===o?void 0:o.onSort)&&e.key&&e.sortDirection&&this.state._on.onSort(t,{key:e.key,currentSortDirection:e.sortDirection}),this.host&&(0,h.d)(this.host,h.K.sort,{key:e.key,currentSortDirection:e.sortDirection})}}}):e.label)}renderSpacer(e,t){var o,a;const i=(null===(o=this.state._headerCells.vertical)||void 0===o?void 0:o.length)||0,l=null===(a=null==t?void 0:t[0])||void 0===a?void 0:a.reduce(((e,t)=>e+(t.colSpan||1)),0),s=this.state._selection?1:0;return(0,n.h)("tr",{"aria-hidden":"true",class:(0,r.c)("kol-table__spacer",`kol-table__spacer--${e}`)},(0,n.h)("td",{class:(0,r.c)(`kol-table__spacer-line kol-table__spacer-line--${e}`),colSpan:i+l+s}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const e=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return(0,n.h)("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",e),e.map(((e,t)=>this.renderTableRow(e,t,!0,!0)))])}render(){var e;const t=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const o=null===(e=this.state._headerCells.horizontal)||void 0===e?void 0:e.map((e=>this.sortByColumnPosition(e)));return(0,n.h)("div",{key:"41ef1f9232f94305a6492420a311cf543b582a22",class:"kol-table"},(0,n.h)(a.v,{key:"3e0def33d6cf806d72c305d0e350b7ee4b2d3899",_tableSettings:this.state._tableSettings}),(0,n.h)("div",{key:"cc55a031f7bae8733cc5877763b68f9b1717b3e2",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},(0,n.h)("table",{key:"c96b4770ff54fb28a6d6eea1a9f021132e04652c",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},(0,n.h)("div",{key:"96095fade8aa2347d2db8e4a42a735e07a683f05",class:"kol-table__focus-element",tabindex:this.tableDivElementHasScrollbar?"0":void 0,"aria-describedby":"caption"}," "),(0,n.h)("caption",{key:"fbf77baecd9f1f569c97df6596e598926f4fc420",class:"kol-table__caption",id:"caption"},this.state._label),Array.isArray(o)&&(0,n.h)("thead",{key:"aeab10b5b582c3134e5e0e7a483fbd441e00edc1",class:"kol-table__head"},[o.map(((e,t)=>(0,n.h)("tr",{class:"kol-table__head-row",key:`thead-${t}`},this.state._selection&&this.renderHeadingSelectionCell(),0===t&&this.renderHeaderTdCell(),Array.isArray(e)&&e.map(((e,o)=>this.renderHeadingCell(e,t,o,!1)))))),this.renderSpacer("head",o)]),(0,n.h)("tbody",{key:"536ad9c3574792ce18cf2694a4251cd781587aea",class:"kol-table__body"},t.map(((e,t)=>this.renderTableRow(e,t,!0)))),this.renderFoot())))}get host(){return(0,n.g)(this)}static get watchers(){return{_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_on:["validateOn"],_selection:["validateSelection"],_tableSettings:["validateTableSettings"]}}}},8045:(e,t,o)=>{function n(e){var t,o,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=n(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function r(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=n(e))&&(r&&(r+=" "),r+=t);return r}o.d(t,{c:()=>r})},9167:(e,t,o)=>{o.d(t,{i:()=>i,n:()=>s,r:()=>l});var n=o(257),r=o(6123);const a=()=>{let e=(0,n.e)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,n.e)(),"KoliBri",{value:e,writable:!1})),e},i=()=>{(()=>{const e=(0,n.g)().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const t=e.getAttribute("content");"string"==typeof t&&((0,n.s)(t.includes("dev-mode=true")),(0,n.c)(t.includes("experimental-mode=true")),(0,n.d)(t.includes("color-contrast-analysis=true")))}})(),n.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${r.E.kolibriVersion}\n\t`,{forceLog:!0})},l=()=>{!0!==a().adviceShown&&(Object.defineProperty(a(),"adviceShown",{get:function(){return!0}}),n.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let s=()=>Math.floor(16777215*Math.random()).toString(16);"test"===n.p&&(s=()=>"nonce")},9272:(e,t,o)=>{o.d(t,{t:()=>a});var n=o(4269),r=o(257);let a=(e,t)=>{var o;return(null!==(o=(0,n.g)())&&void 0!==o?o:(0,n.i)("de")).translate(e,t)};"test"===r.p&&(a=e=>e)}}]);
|