@public-ui/hydrate 2.0.15 → 2.1.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/index.js +1066 -1198
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -12548,7 +12548,7 @@ var loglevel = {exports: {}};
|
|
|
12548
12548
|
|
|
12549
12549
|
var f = loglevel.exports;
|
|
12550
12550
|
|
|
12551
|
-
const
|
|
12551
|
+
const o$1={};let A=!1;const D=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,I=e=>typeof e=="string"&&D.test(e),g=e=>{if(I(e)===!1)throw new Error(`[Theming] The theme identifier "${typeof e=="string"?e:""}" (Type: ${typeof e}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`)},b=(e,t,s,a)=>{a=a??{},a.append=a.append??!1,g(e),A===!1&&(A=!0,f.warn(`[Theming] The theme process is locked. This means that the theme "${e}" should not be patched.
|
|
12552
12552
|
|
|
12553
12553
|
import { register } from 'adopted-style-sheets';
|
|
12554
12554
|
import { defineCustomElements } from '...';
|
|
@@ -12558,294 +12558,153 @@ const H=(e,t)=>s=>s(e,t),P$1=(e,t)=>s=>s(e,t,{append:!1}),o$1={};let A=!1;const
|
|
|
12558
12558
|
.then(() => {
|
|
12559
12559
|
// run your app or website
|
|
12560
12560
|
})
|
|
12561
|
-
.catch(console.warn);`)),(typeof o$1.A11yUi!="object"||o$1.A11yUi===null)&&(o$1.A11yUi={}),typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&(typeof o$1.A11yUi.Themes!="object"||o$1.A11yUi.Themes===null)&&(o$1.A11yUi.Themes={}),typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&typeof o$1.A11yUi.Themes=="object"&&o$1.A11yUi.Themes!==null&&(typeof o$1.A11yUi.Themes[e]!="object"||o$1.A11yUi.Themes[e]===null)&&(o$1.A11yUi.Themes[e]={}),typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&typeof o$1.A11yUi.Themes=="object"&&o$1.A11yUi.Themes!==null&&typeof o$1.A11yUi.Themes[e]=="object"&&o$1.A11yUi.Themes[e]!==null&&(a.append&&typeof o$1.A11yUi.Themes[e][t]=="string"?o$1.A11yUi.Themes[e][t]+=s:o$1.A11yUi.Themes[e][t]=s);},U=(e,t,s,a)=>(g(e),typeof t=="object"&&t!==null&&Object.getOwnPropertyNames(t).forEach(r=>{const n=t[r],i=r.toLowerCase(),m=typeof a?.transformTagName=="function"&&!["GLOBAL","PROPERTIES"].includes(r)?a.transformTagName(i):r;typeof n=="string"&&n.length>0&&b(e,m.toUpperCase(),n,s);}),e);const c$1=new Map,v=[],L=new Set,h=new Map,B=/--[^;]+/g,G=/:/;(typeof o$1.A11yUi!="object"||o$1.A11yUi===null)&&(o$1.A11yUi={CSS_STYLE_CACHE:h,HYDRATED_HISTORY:v,STYLING_TASK_QUEUE:c$1});const K=(e,t)=>{let s=t.match(B);if(Array.isArray(s)){s=s.filter(r=>G.test(r));const a=document.createElement("style");a.innerHTML=`.${e} {${s.join(";")}}`,document.querySelector("head")?.appendChild(a);}L.add(e);},T=(e,t)=>typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&typeof o$1.A11yUi.Themes=="object"&&o$1.A11yUi.Themes!==null&&typeof o$1.A11yUi.Themes[e]=="object"&&o$1.A11yUi.Themes[e]!==null&&typeof o$1.A11yUi.Themes[e][t]=="string"?o$1.A11yUi.Themes[e][t].replace(/\r?\n/g,""):"",q=e=>{for(const t of Array.from(e.childNodes))if(t instanceof HTMLStyleElement&&t.tagName==="STYLE")e.removeChild(t);else break},F=(e,t)=>{try{const s=[];t.forEach(a=>{const r=new CSSStyleSheet;r.replaceSync(a),s.push(r);}),e.adoptedStyleSheets=s;}catch{t.reverse().forEach(s=>{const a=document.createElement("style");a.innerHTML=s,e.insertBefore(a,e.firstChild);});}},Q=(e,t,s)=>{if(s!==!1){const a=[...Array.from(e.childNodes).filter(n=>n instanceof HTMLStyleElement&&n.tagName==="STYLE")];let r;try{r=[...Array.from(e.adoptedStyleSheets)];}catch{r=[];}s?.mode==="before"?(a.reverse().forEach(n=>t.unshift(n.innerHTML)),r.reverse().forEach(n=>t.unshift(Array.from(n.cssRules).map(i=>i.cssText).join("")))):s?.mode==="after"&&(a.forEach(n=>t.push(n.innerHTML)),r.forEach(n=>t.push(Array.from(n.cssRules).map(i=>i.cssText).join(""))));}},M=(e,t,s)=>{const a=t.name||"default";let r;try{if(e.shadowRoot===null)throw new Error("ShadowRoot is null");r=e.shadowRoot;}catch{r=e;}if(h.get(a)?.has(e.tagName))$(e,r,h.get(a)?.get(e.tagName),s);else {const n=T(a,"PROPERTIES"),i=T(a,"GLOBAL"),m=T(a,e.tagName);L.has(a)===!1&&K(a,i);const y=[n,i,m];Q(r,y,t.encroachCss),t.loglevel==="debug"&&console.log(e.tagName,y),t.cache===!0&&(h.has(a)===!1&&h.set(a,new Map),h.get(a)?.set(e.tagName,y)),$(e,r,y,s);}},$=(e,t,s,a)=>{q(t),F(t,s),e.style.display=a;},O=e=>{e.loglevel==="debug"&&v.push({timestamp:Date.now(),numberOfTasks:c$1.size});},W=e=>{c$1.delete(e);},R=(e,t)=>{W(e),O(t);},X=e=>{for(const t of e)if(c$1.has(t.target)&&t.target.classList.contains("hydrated")){const{styleDisplay:s,themeDetails:a}=c$1.get(t.target);M(t.target,a,s),R(t.target,a);}};try{new MutationObserver(X);}catch{}
|
|
12561
|
+
.catch(console.warn);`)),(typeof o$1.A11yUi!="object"||o$1.A11yUi===null)&&(o$1.A11yUi={}),typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&(typeof o$1.A11yUi.Themes!="object"||o$1.A11yUi.Themes===null)&&(o$1.A11yUi.Themes={}),typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&typeof o$1.A11yUi.Themes=="object"&&o$1.A11yUi.Themes!==null&&(typeof o$1.A11yUi.Themes[e]!="object"||o$1.A11yUi.Themes[e]===null)&&(o$1.A11yUi.Themes[e]={}),typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&typeof o$1.A11yUi.Themes=="object"&&o$1.A11yUi.Themes!==null&&typeof o$1.A11yUi.Themes[e]=="object"&&o$1.A11yUi.Themes[e]!==null&&(a.append&&typeof o$1.A11yUi.Themes[e][t]=="string"?o$1.A11yUi.Themes[e][t]+=s:o$1.A11yUi.Themes[e][t]=s);},U=(e,t,s,a)=>(g(e),typeof t=="object"&&t!==null&&Object.getOwnPropertyNames(t).forEach(r=>{const n=t[r],i=r.toLowerCase(),m=typeof a?.transformTagName=="function"&&!["GLOBAL","PROPERTIES"].includes(r)?a.transformTagName(i):r;typeof n=="string"&&n.length>0&&b(e,m.toUpperCase(),n,s);}),e);const c$1=new Map,v=[],L=new Set,h=new Map,B=/--[^;]+/g,G=/:/;(typeof o$1.A11yUi!="object"||o$1.A11yUi===null)&&(o$1.A11yUi={CSS_STYLE_CACHE:h,HYDRATED_HISTORY:v,STYLING_TASK_QUEUE:c$1});const K=(e,t)=>{let s=t.match(B);if(Array.isArray(s)){s=s.filter(r=>G.test(r));const a=document.createElement("style");a.innerHTML=`.${e} {${s.join(";")}}`,document.querySelector("head")?.appendChild(a);}L.add(e);},T=(e,t)=>typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&typeof o$1.A11yUi.Themes=="object"&&o$1.A11yUi.Themes!==null&&typeof o$1.A11yUi.Themes[e]=="object"&&o$1.A11yUi.Themes[e]!==null&&typeof o$1.A11yUi.Themes[e][t]=="string"?o$1.A11yUi.Themes[e][t].replace(/\r?\n/g,""):"",q=e=>{for(const t of Array.from(e.childNodes))if(t instanceof HTMLStyleElement&&t.tagName==="STYLE")e.removeChild(t);else break},F=(e,t)=>{try{const s=[];t.forEach(a=>{const r=new CSSStyleSheet;r.replaceSync(a),s.push(r);}),e.adoptedStyleSheets=s;}catch{t.reverse().forEach(s=>{const a=document.createElement("style");a.innerHTML=s,e.insertBefore(a,e.firstChild);});}},Q=(e,t,s)=>{if(s!==!1){const a=[...Array.from(e.childNodes).filter(n=>n instanceof HTMLStyleElement&&n.tagName==="STYLE")];let r;try{r=[...Array.from(e.adoptedStyleSheets)];}catch{r=[];}s?.mode==="before"?(a.reverse().forEach(n=>t.unshift(n.innerHTML)),r.reverse().forEach(n=>t.unshift(Array.from(n.cssRules).map(i=>i.cssText).join("")))):s?.mode==="after"&&(a.forEach(n=>t.push(n.innerHTML)),r.forEach(n=>t.push(Array.from(n.cssRules).map(i=>i.cssText).join(""))));}},M=(e,t,s)=>{const a=t.name||"default";let r;try{if(e.shadowRoot===null)throw new Error("ShadowRoot is null");r=e.shadowRoot;}catch{r=e;}if(h.get(a)?.has(e.tagName))$(e,r,h.get(a)?.get(e.tagName),s);else {const n=T(a,"PROPERTIES"),i=T(a,"GLOBAL"),m=T(a,e.tagName);L.has(a)===!1&&K(a,i);const y=[n,i,m];Q(r,y,t.encroachCss),t.loglevel==="debug"&&console.log(e.tagName,y),t.cache===!0&&(h.has(a)===!1&&h.set(a,new Map),h.get(a)?.set(e.tagName,y)),$(e,r,y,s);}},$=(e,t,s,a)=>{q(t),F(t,s),e.style.display=a;},O=e=>{e.loglevel==="debug"&&v.push({timestamp:Date.now(),numberOfTasks:c$1.size});},W=e=>{c$1.delete(e);},R=(e,t)=>{W(e),O(t);},X=e=>{for(const t of e)if(c$1.has(t.target)&&t.target.classList.contains("hydrated")){const{styleDisplay:s,themeDetails:a}=c$1.get(t.target);M(t.target,a,s),R(t.target,a);}};try{new MutationObserver(X);}catch{}
|
|
12562
12562
|
|
|
12563
|
-
const
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12563
|
+
const alertTypeOptions = ['default', 'info', 'success', 'warning', 'error'];
|
|
12564
|
+
const alertVariantOptions = ['card', 'msg'];
|
|
12565
|
+
|
|
12566
|
+
const inputCheckboxVariantOptions = ['button', 'default', 'switch'];
|
|
12567
|
+
|
|
12568
|
+
const koliBriQuoteVariantOptions = ['block', 'inline'];
|
|
12569
|
+
|
|
12570
|
+
const cssResizeOptions = ['both', 'horizontal', 'vertical', 'none'];
|
|
12571
|
+
|
|
12572
|
+
const getWindow$1 = () => (typeof window === 'undefined' ? null : window);
|
|
12573
|
+
const getDocument = () => (typeof getWindow$1().document === 'undefined' ? null : getWindow$1().document);
|
|
12574
|
+
let DEV_MODE = null;
|
|
12575
|
+
let EXPERIMENTAL_MODE = null;
|
|
12576
|
+
const getDevMode = () => DEV_MODE === true;
|
|
12577
|
+
const getExperimentalMode = () => EXPERIMENTAL_MODE === true;
|
|
12578
|
+
const LOG_STYLE = 'color: white; background: #666; font-weight: bold; padding: .25em .5em; border-radius: 3px; border: 1px solid #000';
|
|
12579
|
+
const mapToArray = (msg) => {
|
|
12580
|
+
return Array.isArray(msg) ? msg : [msg];
|
|
12569
12581
|
};
|
|
12570
|
-
const
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
const nodeList = node.querySelectorAll('[class*="hydrated"]');
|
|
12577
|
-
for (let i = 0; i < nodeList.length; i++) {
|
|
12578
|
-
const shadowRoot = nodeList[i].shadowRoot;
|
|
12579
|
-
if (typeof shadowRoot === "object" && shadowRoot !== null) {
|
|
12580
|
-
pushNodes(domNodes, querySelectorAll(selector, shadowRoot));
|
|
12581
|
-
}
|
|
12582
|
-
else {
|
|
12583
|
-
pushNodes(domNodes, querySelectorAll(selector, nodeList[i]));
|
|
12584
|
-
}
|
|
12585
|
-
}
|
|
12586
|
-
return Array.from(domNodes);
|
|
12582
|
+
const getLogLabel = (label) => {
|
|
12583
|
+
return `%c${label}`;
|
|
12584
|
+
};
|
|
12585
|
+
const handleClassifier = (label, classifier) => {
|
|
12586
|
+
if (typeof classifier === 'string' && classifier.length > 0) {
|
|
12587
|
+
return `${getLogLabel(label)} | ${classifier}`;
|
|
12587
12588
|
}
|
|
12588
12589
|
else {
|
|
12589
|
-
|
|
12590
|
+
return getLogLabel(label);
|
|
12590
12591
|
}
|
|
12591
12592
|
};
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
}
|
|
12605
|
-
else {
|
|
12606
|
-
domNode = querySelector(selector, nodeList[i]);
|
|
12607
|
-
}
|
|
12608
|
-
if (domNode !== null) {
|
|
12609
|
-
break;
|
|
12610
|
-
}
|
|
12611
|
-
}
|
|
12593
|
+
const getShield = (label, options) => {
|
|
12594
|
+
return [handleClassifier(label, options === null || options === void 0 ? void 0 : options.classifier), `${LOG_STYLE};${(options === null || options === void 0 ? void 0 : options.overwriteStyle) || ''}`];
|
|
12595
|
+
};
|
|
12596
|
+
const isDevModeOrForceLog = (devMode, forceLog) => devMode() || forceLog === true;
|
|
12597
|
+
class Logger {
|
|
12598
|
+
constructor(label, devMode) {
|
|
12599
|
+
this.label = label;
|
|
12600
|
+
this.devMode = devMode;
|
|
12601
|
+
}
|
|
12602
|
+
debug(msg, options) {
|
|
12603
|
+
if (isDevModeOrForceLog(this.devMode, options === null || options === void 0 ? void 0 : options.forceLog)) {
|
|
12604
|
+
console.debug(...getShield(this.label, options), ...mapToArray(msg));
|
|
12612
12605
|
}
|
|
12613
|
-
return domNode;
|
|
12614
12606
|
}
|
|
12615
|
-
|
|
12616
|
-
|
|
12607
|
+
info(msg, options) {
|
|
12608
|
+
if (isDevModeOrForceLog(this.devMode, options === null || options === void 0 ? void 0 : options.forceLog)) {
|
|
12609
|
+
console.info(...getShield(this.label, options), ...mapToArray(msg));
|
|
12610
|
+
}
|
|
12617
12611
|
}
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
rgbaConvert$1.exports = arr;
|
|
12623
|
-
rgbaConvert$1.exports.arr = arr;
|
|
12624
|
-
rgbaConvert$1.exports.obj = obj;
|
|
12625
|
-
rgbaConvert$1.exports.css = css;
|
|
12626
|
-
rgbaConvert$1.exports.hex = hex;
|
|
12627
|
-
rgbaConvert$1.exports.num = num;
|
|
12628
|
-
|
|
12629
|
-
function arr(data) {
|
|
12630
|
-
var a = parse$2(data);
|
|
12631
|
-
if (a.length == 3) {
|
|
12632
|
-
return a.concat(255)
|
|
12633
|
-
} else {
|
|
12634
|
-
a[3] = Math.round(a[3]);
|
|
12635
|
-
return a
|
|
12636
|
-
}
|
|
12637
|
-
}
|
|
12638
|
-
|
|
12639
|
-
function obj(data) {
|
|
12640
|
-
var a = parse$2(data);
|
|
12641
|
-
return {
|
|
12642
|
-
r: a[0],
|
|
12643
|
-
g: a[1],
|
|
12644
|
-
b: a[2],
|
|
12645
|
-
a: a.length == 3
|
|
12646
|
-
? 255
|
|
12647
|
-
: Math.round(a[3])
|
|
12648
|
-
}
|
|
12649
|
-
}
|
|
12650
|
-
|
|
12651
|
-
function css(data) {
|
|
12652
|
-
var a = parse$2(data);
|
|
12653
|
-
if (a.length == 3) a.push(255);
|
|
12654
|
-
|
|
12655
|
-
return a[3] == 255
|
|
12656
|
-
? 'rgb(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')'
|
|
12657
|
-
: a[3] == 0
|
|
12658
|
-
? 'rgba(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', 0)'
|
|
12659
|
-
: 'rgba(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + String(a[3] / 255).substr(1) + ')'
|
|
12660
|
-
}
|
|
12661
|
-
|
|
12662
|
-
function hex(data) {
|
|
12663
|
-
var a = parse$2(data);
|
|
12664
|
-
if (a.length == 3) a.push(255);
|
|
12665
|
-
var opaque = a[3] == 255;
|
|
12666
|
-
var r = num2hex(a[0]);
|
|
12667
|
-
var g = num2hex(a[1]);
|
|
12668
|
-
var b = num2hex(a[2]);
|
|
12669
|
-
var a = num2hex(Math.round(a[3]));
|
|
12670
|
-
var is = isshort(r, g, b, a);
|
|
12671
|
-
if (opaque) {
|
|
12672
|
-
return is
|
|
12673
|
-
? '#' + r.charAt(0) + g.charAt(0) + b.charAt(0)
|
|
12674
|
-
: '#' + r + g + b
|
|
12675
|
-
}
|
|
12676
|
-
return is
|
|
12677
|
-
? '#' + r.charAt(0) + g.charAt(0) + b.charAt(0) + a.charAt(0)
|
|
12678
|
-
: '#' + r + g + b + a
|
|
12679
|
-
}
|
|
12680
|
-
|
|
12681
|
-
function num(data) {
|
|
12682
|
-
var a = parse$2(data);
|
|
12683
|
-
if (a.length == 3) a.push(255);
|
|
12684
|
-
else a[3] = Math.round(a[3]);
|
|
12685
|
-
return ((a[3] << 24) >>> 0 | a[0] << 16 | a[1] << 8 | a[2]) >>> 0
|
|
12686
|
-
}
|
|
12687
|
-
|
|
12688
|
-
function parse$2(data) {
|
|
12689
|
-
if (typeof data == 'string') {
|
|
12690
|
-
data = data.toLowerCase();
|
|
12691
|
-
return name(data)
|
|
12692
|
-
|| hex3(data)
|
|
12693
|
-
|| hex6(data)
|
|
12694
|
-
|| rgb(data)
|
|
12695
|
-
|| rgba(data)
|
|
12696
|
-
|| [0, 0, 0, 255]
|
|
12697
|
-
}
|
|
12698
|
-
return object(data)
|
|
12699
|
-
|| array(data)
|
|
12700
|
-
|| number(data)
|
|
12701
|
-
|| [0, 0, 0, 255]
|
|
12702
|
-
}
|
|
12703
|
-
|
|
12704
|
-
function num2hex(num) {
|
|
12705
|
-
var s = num.toString(16);
|
|
12706
|
-
return s.length == 1
|
|
12707
|
-
? '0' + s
|
|
12708
|
-
: s
|
|
12709
|
-
}
|
|
12710
|
-
|
|
12711
|
-
function isshort(r, g, b, a) {
|
|
12712
|
-
var h = ['ff', '00', '11', '22', '33', '44', '55', '66',
|
|
12713
|
-
'77', '88', '99', 'aa', 'bb', 'cc', 'dd', 'ee'];
|
|
12714
|
-
return h.indexOf(r) != -1
|
|
12715
|
-
&& h.indexOf(g) != -1
|
|
12716
|
-
&& h.indexOf(b) != -1
|
|
12717
|
-
&& h.indexOf(a) != -1
|
|
12718
|
-
}
|
|
12719
|
-
|
|
12720
|
-
function name(str) {
|
|
12721
|
-
if (str == 'red') return [255, 0, 0]
|
|
12722
|
-
if (str == 'green') return [0, 255, 0]
|
|
12723
|
-
if (str == 'blue') return [0, 0, 255]
|
|
12724
|
-
if (str == 'black') return [0, 0, 0]
|
|
12725
|
-
if (str == 'white') return [255, 255, 255]
|
|
12726
|
-
if (str == 'cyan') return [0, 255, 255]
|
|
12727
|
-
if (str == 'gray') return [128, 128, 128]
|
|
12728
|
-
if (str == 'grey') return [128, 128, 128]
|
|
12729
|
-
if (str == 'magenta') return [255, 0, 255]
|
|
12730
|
-
// ok, not the real css `pink` but my personal `magenta` alias
|
|
12731
|
-
// `pink` is simpler than `fuchsia`, whatever...
|
|
12732
|
-
if (str == 'pink') return [255, 0, 255]
|
|
12733
|
-
if (str == 'yellow') return [255, 255, 0]
|
|
12734
|
-
}
|
|
12735
|
-
|
|
12736
|
-
function hex2num(str) {
|
|
12737
|
-
return str.length == 1
|
|
12738
|
-
? parseInt(str + str, 16)
|
|
12739
|
-
: parseInt(str, 16)
|
|
12740
|
-
}
|
|
12741
|
-
|
|
12742
|
-
function hex3(str) {
|
|
12743
|
-
var s = str.replace(/^#/,'');
|
|
12744
|
-
var l = s.length;
|
|
12745
|
-
if (l == 3 || l == 4) {
|
|
12746
|
-
var r = hex2num(s[0]);
|
|
12747
|
-
var g = hex2num(s[1]);
|
|
12748
|
-
var b = hex2num(s[2]);
|
|
12749
|
-
var a = l == 3
|
|
12750
|
-
? 255
|
|
12751
|
-
: hex2num(s[3]);
|
|
12752
|
-
|
|
12753
|
-
if (isNaN(r) || isNaN(g) || isNaN(b) || isNaN(a)) return
|
|
12754
|
-
|
|
12755
|
-
return [r, g, b, a]
|
|
12756
|
-
}
|
|
12757
|
-
}
|
|
12758
|
-
|
|
12759
|
-
function hex6(str) {
|
|
12760
|
-
var s = str.replace(/^#/,'');
|
|
12761
|
-
var l = s.length;
|
|
12762
|
-
if (l == 6 || l == 8) {
|
|
12763
|
-
var r = hex2num(s.slice(0, 2));
|
|
12764
|
-
var g = hex2num(s.slice(2, 4));
|
|
12765
|
-
var b = hex2num(s.slice(4, 6));
|
|
12766
|
-
var a = l == 6
|
|
12767
|
-
? 255
|
|
12768
|
-
: hex2num(s.slice(6, 8));
|
|
12769
|
-
|
|
12770
|
-
if (isNaN(r) || isNaN(g) || isNaN(b) || isNaN(a)) return
|
|
12771
|
-
|
|
12772
|
-
return [r, g, b, a]
|
|
12773
|
-
}
|
|
12774
|
-
}
|
|
12775
|
-
|
|
12776
|
-
function getnum(val, integer) {
|
|
12777
|
-
if (typeof val != 'number') return -1
|
|
12778
|
-
if (integer === true && Math.floor(val) !== val) return -1
|
|
12779
|
-
return val >= 0 && val <= 255
|
|
12780
|
-
? val
|
|
12781
|
-
: -1
|
|
12782
|
-
}
|
|
12783
|
-
|
|
12784
|
-
function object(obj) {
|
|
12785
|
-
if (Object.prototype.toString.call(obj) === '[object Object]'
|
|
12786
|
-
&& Object.getPrototypeOf(obj) === Object.getPrototypeOf({})) {
|
|
12787
|
-
var r = getnum(obj.r != undefined ? obj.r : obj.red != undefined ? obj.red : 0, true);
|
|
12788
|
-
var g = getnum(obj.g != undefined ? obj.g : obj.green != undefined ? obj.green : 0, true);
|
|
12789
|
-
var b = getnum(obj.b != undefined ? obj.b : obj.blue != undefined ? obj.blue : 0, true);
|
|
12790
|
-
var a = getnum(obj.a != undefined ? obj.a : obj.alpha != undefined ? obj.alpha : 255, true);
|
|
12791
|
-
if (r != -1 && g != -1 && b != -1 && a != -1) {
|
|
12792
|
-
return [r, g, b, a]
|
|
12612
|
+
trace(msg, options) {
|
|
12613
|
+
if (isDevModeOrForceLog(this.devMode, options === null || options === void 0 ? void 0 : options.forceLog)) {
|
|
12614
|
+
console.trace(...getShield(this.label, options), ...mapToArray(msg));
|
|
12615
|
+
}
|
|
12793
12616
|
}
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
if (Array.isArray(arr) && (arr.length == 3 || arr.length == 4)) {
|
|
12799
|
-
var r = getnum(arr[0], true);
|
|
12800
|
-
var g = getnum(arr[1], true);
|
|
12801
|
-
var b = getnum(arr[2], true);
|
|
12802
|
-
var a = getnum(arr[3] != undefined ? arr[3] : 255, true);
|
|
12803
|
-
if (r != -1 && g != -1 && b != -1 && a != -1) {
|
|
12804
|
-
return [r, g, b, a]
|
|
12617
|
+
warn(msg, options) {
|
|
12618
|
+
if (isDevModeOrForceLog(this.devMode, options === null || options === void 0 ? void 0 : options.forceLog)) {
|
|
12619
|
+
console.warn(...getShield(this.label, options), ...mapToArray(msg));
|
|
12620
|
+
}
|
|
12805
12621
|
}
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
if (typeof num == 'number' && Math.floor(num) == num && num <= 4294967295 && num >= 0) {
|
|
12811
|
-
var a = num >> 24 & 255;
|
|
12812
|
-
var r = num >> 16 & 255;
|
|
12813
|
-
var g = num >> 8 & 255;
|
|
12814
|
-
var b = num & 255;
|
|
12815
|
-
return [r, g, b, a]
|
|
12816
|
-
}
|
|
12817
|
-
}
|
|
12818
|
-
|
|
12819
|
-
function rgb(str) {
|
|
12820
|
-
if (str.substr(0, 4) == 'rgb(') {
|
|
12821
|
-
str = str.match(/^rgb\(([^)]+)\)/)[1];
|
|
12822
|
-
var t = str.split(/ *, */).map(Number);
|
|
12823
|
-
var r = getnum(t[0], true);
|
|
12824
|
-
var g = getnum(t[1], true);
|
|
12825
|
-
var b = getnum(t[2], true);
|
|
12826
|
-
if (r != -1 && g != -1 && b != -1) {
|
|
12827
|
-
return [r, g, b, 255]
|
|
12622
|
+
error(msg, options) {
|
|
12623
|
+
if (isDevModeOrForceLog(this.devMode, options === null || options === void 0 ? void 0 : options.forceLog)) {
|
|
12624
|
+
console.error(...getShield(this.label, options), ...mapToArray(msg));
|
|
12625
|
+
}
|
|
12828
12626
|
}
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
if (str.substr(0, 5) == 'rgba(') {
|
|
12834
|
-
str = str.match(/^rgba\(([^)]+)\)/)[1];
|
|
12835
|
-
var t = str.split(/ *, */).map(Number);
|
|
12836
|
-
var r = getnum(t[0], true);
|
|
12837
|
-
var g = getnum(t[1], true);
|
|
12838
|
-
var b = getnum(t[2], true);
|
|
12839
|
-
var a = getnum(t[3] * 255);
|
|
12840
|
-
if (r != -1 && g != -1 && b != -1 && a != -1) {
|
|
12841
|
-
return [r, g, b, a]
|
|
12627
|
+
throw(msg, options) {
|
|
12628
|
+
if (isDevModeOrForceLog(this.devMode, options === null || options === void 0 ? void 0 : options.forceLog)) {
|
|
12629
|
+
throw new Error(...getShield(this.label, options), ...mapToArray(msg));
|
|
12630
|
+
}
|
|
12842
12631
|
}
|
|
12843
|
-
}
|
|
12844
12632
|
}
|
|
12633
|
+
const Log = new Logger('KoliBri', getDevMode);
|
|
12845
12634
|
|
|
12846
|
-
|
|
12635
|
+
const a11yCache = new Set();
|
|
12636
|
+
const a11yHint = (msg, options) => {
|
|
12637
|
+
if (a11yCache.has(msg) === false || !!(options === null || options === void 0 ? void 0 : options.force)) {
|
|
12638
|
+
a11yCache.add(msg);
|
|
12639
|
+
Log.debug([msg].concat((options === null || options === void 0 ? void 0 : options.details) || []), {
|
|
12640
|
+
classifier: `✋ a11y`,
|
|
12641
|
+
forceLog: !!(options === null || options === void 0 ? void 0 : options.force),
|
|
12642
|
+
overwriteStyle: '; background-color: #09f',
|
|
12643
|
+
});
|
|
12644
|
+
}
|
|
12645
|
+
};
|
|
12646
|
+
const devCache = new Set();
|
|
12647
|
+
const devHint = (msg, options) => {
|
|
12648
|
+
if (devCache.has(msg) === false || !!(options === null || options === void 0 ? void 0 : options.force)) {
|
|
12649
|
+
devCache.add(msg);
|
|
12650
|
+
Log.debug([msg].concat((options === null || options === void 0 ? void 0 : options.details) || []), {
|
|
12651
|
+
classifier: `💻 dev`,
|
|
12652
|
+
forceLog: !!(options === null || options === void 0 ? void 0 : options.force),
|
|
12653
|
+
overwriteStyle: '; background-color: #f09',
|
|
12654
|
+
});
|
|
12655
|
+
}
|
|
12656
|
+
};
|
|
12657
|
+
const devWarning = (msg, options) => {
|
|
12658
|
+
if (devCache.has(msg) === false || !!(options === null || options === void 0 ? void 0 : options.force)) {
|
|
12659
|
+
devCache.add(msg);
|
|
12660
|
+
Log.warn([msg].concat((options === null || options === void 0 ? void 0 : options.details) || []), {
|
|
12661
|
+
classifier: `⚠️ dev`,
|
|
12662
|
+
forceLog: !!(options === null || options === void 0 ? void 0 : options.force),
|
|
12663
|
+
overwriteStyle: '; background-color: #f09',
|
|
12664
|
+
});
|
|
12665
|
+
}
|
|
12666
|
+
};
|
|
12667
|
+
const featureCache = new Set();
|
|
12668
|
+
const featureHint = (msg, done = false, options) => {
|
|
12669
|
+
if (featureCache.has(msg) === false || !!(options === null || options === void 0 ? void 0 : options.force)) {
|
|
12670
|
+
featureCache.add(msg);
|
|
12671
|
+
msg += done === true ? ' ✅' : '';
|
|
12672
|
+
Log.debug([msg].concat((options === null || options === void 0 ? void 0 : options.details) || []), {
|
|
12673
|
+
classifier: `🌟 feature`,
|
|
12674
|
+
forceLog: !!(options === null || options === void 0 ? void 0 : options.force),
|
|
12675
|
+
overwriteStyle: '; background-color: #309',
|
|
12676
|
+
});
|
|
12677
|
+
}
|
|
12678
|
+
};
|
|
12679
|
+
devHint(`Wir freuen uns über jedes Feedback, Kommentare, Screenshots oder Demo-Links von einer auf KoliBri-basierenden Anwendung (kolibri@itzbund.de). Vielen Dank!`);
|
|
12680
|
+
const uiUxCache = new Set();
|
|
12681
|
+
const uiUxHint = (msg, options) => {
|
|
12682
|
+
if (uiUxCache.has(msg) === false || !!(options === null || options === void 0 ? void 0 : options.force)) {
|
|
12683
|
+
uiUxCache.add(msg);
|
|
12684
|
+
Log.debug([msg].concat((options === null || options === void 0 ? void 0 : options.details) || []), {
|
|
12685
|
+
classifier: `📑 ui/ux`,
|
|
12686
|
+
forceLog: !!(options === null || options === void 0 ? void 0 : options.force),
|
|
12687
|
+
overwriteStyle: '; background-color: #060;',
|
|
12688
|
+
});
|
|
12689
|
+
}
|
|
12690
|
+
};
|
|
12691
|
+
const a11yHintDisabled = () => {
|
|
12692
|
+
a11yHint(`"Disabled" schränkt die Zugänglichkeit und Sichtbarkeit ein. Wir empfehlen aus Sicht der Barrierefreiheit readonly- statt disabled-Attribut zu verwenden.\n- https://uxdesign.cc/is-it-ok-to-grey-out-disabled-buttons-8afa74a0fae`);
|
|
12693
|
+
};
|
|
12694
|
+
const a11yHintLabelingLandmarks = (value) => {
|
|
12695
|
+
if (typeof value !== 'string' || value === '') {
|
|
12696
|
+
a11yHint(`Manche Strukturelemente, wie bspw. der nav-Tag, können mehrfach in einer Webseite verwendet werden. Damit die gleichnamigen Strukturelemente voneinander unterschieden werden können, ist es erforderlich ein Aria-Label zu setzen.\n- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role#accessibility_concerns`);
|
|
12697
|
+
}
|
|
12698
|
+
};
|
|
12699
|
+
const uiUxHintMillerscheZahl = (className, length = 8) => {
|
|
12700
|
+
if (length > 7) {
|
|
12701
|
+
uiUxHint(`[${className}] Innerhalb von Navigationsstrukturen wird empfohlen nicht mehr als 7 Menüpunkte zu verwenden.
|
|
12847
12702
|
|
|
12848
|
-
|
|
12703
|
+
Links:
|
|
12704
|
+
- https://de.ryte.com/wiki/Millersche_Zahl
|
|
12705
|
+
- https://de.wikipedia.org/wiki/Millersche_Zahl`);
|
|
12706
|
+
}
|
|
12707
|
+
};
|
|
12849
12708
|
|
|
12850
12709
|
var colorName = {
|
|
12851
12710
|
"aliceblue": [240, 248, 255],
|
|
@@ -13004,7 +12863,7 @@ var colorName = {
|
|
|
13004
12863
|
|
|
13005
12864
|
var names = colorName;
|
|
13006
12865
|
|
|
13007
|
-
var colorParse = parse$
|
|
12866
|
+
var colorParse = parse$2;
|
|
13008
12867
|
|
|
13009
12868
|
/**
|
|
13010
12869
|
* Base hues
|
|
@@ -13025,7 +12884,7 @@ var baseHues = {
|
|
|
13025
12884
|
*
|
|
13026
12885
|
* @return {Object} A space indicator `space`, an array `values` and `alpha`
|
|
13027
12886
|
*/
|
|
13028
|
-
function parse$
|
|
12887
|
+
function parse$2(cstr) {
|
|
13029
12888
|
var m, parts = [], alpha = 1, space;
|
|
13030
12889
|
|
|
13031
12890
|
if (typeof cstr === 'string') {
|
|
@@ -13172,7 +13031,7 @@ function parse$1(cstr) {
|
|
|
13172
13031
|
|
|
13173
13032
|
/** @module color-rgba */
|
|
13174
13033
|
|
|
13175
|
-
var parse = colorParse;
|
|
13034
|
+
var parse$1 = colorParse;
|
|
13176
13035
|
|
|
13177
13036
|
var colorRgba = function rgba (color) {
|
|
13178
13037
|
// template literals
|
|
@@ -13181,7 +13040,7 @@ var colorRgba = function rgba (color) {
|
|
|
13181
13040
|
var values;
|
|
13182
13041
|
|
|
13183
13042
|
//attempt to parse non-array arguments
|
|
13184
|
-
var parsed = parse(color);
|
|
13043
|
+
var parsed = parse$1(color);
|
|
13185
13044
|
|
|
13186
13045
|
if (!parsed.space) return []
|
|
13187
13046
|
|
|
@@ -13223,501 +13082,544 @@ function hsl2rgb(hsl) {
|
|
|
13223
13082
|
return rgb;
|
|
13224
13083
|
}
|
|
13225
13084
|
|
|
13226
|
-
var colorRgba$1 = colorRgba;
|
|
13227
|
-
|
|
13228
|
-
var
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
|
|
13279
|
-
|
|
13280
|
-
|
|
13281
|
-
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
|
|
13312
|
-
|
|
13313
|
-
|
|
13314
|
-
|
|
13315
|
-
|
|
13316
|
-
|
|
13317
|
-
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
|
|
13326
|
-
|
|
13327
|
-
|
|
13328
|
-
|
|
13329
|
-
|
|
13330
|
-
|
|
13331
|
-
|
|
13332
|
-
return
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
if (
|
|
13336
|
-
|
|
13337
|
-
|
|
13338
|
-
return
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
return [
|
|
13343
|
-
|
|
13344
|
-
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
|
|
13356
|
-
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
|
|
13360
|
-
|
|
13361
|
-
|
|
13362
|
-
|
|
13085
|
+
var colorRgba$1 = colorRgba;
|
|
13086
|
+
|
|
13087
|
+
var n=.2126,r$1=.7152,t=.0722,e=1/12.92;function u(n){return Math.pow((n+.055)/1.055,2.4)}function a(a){var i=a[0]/255,c=a[1]/255,o=a[2]/255,s=i<=.03928?i*e:u(i),f=c<=.03928?c*e:u(c),l=o<=.03928?o*e:u(o);return s*n+f*r$1+l*t}function i(n){var r=255;8===(n=n.replace(/^#/,"")).length&&(r=parseInt(n.slice(6,8),16),n=n.substring(0,6)),4===n.length&&(r=parseInt(n.slice(3,4).repeat(2),16),n=n.substring(0,3)),3===n.length&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);var t=parseInt(n,16);return [t>>16,t>>8&255,255&t,r]}function c(n,r){return (Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function o(n,r){return c(a(n),a(r))}function s(n,r){return o(i(n),i(r))}
|
|
13088
|
+
|
|
13089
|
+
var rgbaConvert = {exports: {}};
|
|
13090
|
+
|
|
13091
|
+
rgbaConvert.exports = arr;
|
|
13092
|
+
rgbaConvert.exports.arr = arr;
|
|
13093
|
+
rgbaConvert.exports.obj = obj;
|
|
13094
|
+
rgbaConvert.exports.css = css;
|
|
13095
|
+
rgbaConvert.exports.hex = hex;
|
|
13096
|
+
rgbaConvert.exports.num = num;
|
|
13097
|
+
|
|
13098
|
+
function arr(data) {
|
|
13099
|
+
var a = parse(data);
|
|
13100
|
+
if (a.length == 3) {
|
|
13101
|
+
return a.concat(255)
|
|
13102
|
+
} else {
|
|
13103
|
+
a[3] = Math.round(a[3]);
|
|
13104
|
+
return a
|
|
13105
|
+
}
|
|
13106
|
+
}
|
|
13107
|
+
|
|
13108
|
+
function obj(data) {
|
|
13109
|
+
var a = parse(data);
|
|
13110
|
+
return {
|
|
13111
|
+
r: a[0],
|
|
13112
|
+
g: a[1],
|
|
13113
|
+
b: a[2],
|
|
13114
|
+
a: a.length == 3
|
|
13115
|
+
? 255
|
|
13116
|
+
: Math.round(a[3])
|
|
13117
|
+
}
|
|
13118
|
+
}
|
|
13119
|
+
|
|
13120
|
+
function css(data) {
|
|
13121
|
+
var a = parse(data);
|
|
13122
|
+
if (a.length == 3) a.push(255);
|
|
13123
|
+
|
|
13124
|
+
return a[3] == 255
|
|
13125
|
+
? 'rgb(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')'
|
|
13126
|
+
: a[3] == 0
|
|
13127
|
+
? 'rgba(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', 0)'
|
|
13128
|
+
: 'rgba(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + String(a[3] / 255).substr(1) + ')'
|
|
13129
|
+
}
|
|
13130
|
+
|
|
13131
|
+
function hex(data) {
|
|
13132
|
+
var a = parse(data);
|
|
13133
|
+
if (a.length == 3) a.push(255);
|
|
13134
|
+
var opaque = a[3] == 255;
|
|
13135
|
+
var r = num2hex(a[0]);
|
|
13136
|
+
var g = num2hex(a[1]);
|
|
13137
|
+
var b = num2hex(a[2]);
|
|
13138
|
+
var a = num2hex(Math.round(a[3]));
|
|
13139
|
+
var is = isshort(r, g, b, a);
|
|
13140
|
+
if (opaque) {
|
|
13141
|
+
return is
|
|
13142
|
+
? '#' + r.charAt(0) + g.charAt(0) + b.charAt(0)
|
|
13143
|
+
: '#' + r + g + b
|
|
13144
|
+
}
|
|
13145
|
+
return is
|
|
13146
|
+
? '#' + r.charAt(0) + g.charAt(0) + b.charAt(0) + a.charAt(0)
|
|
13147
|
+
: '#' + r + g + b + a
|
|
13148
|
+
}
|
|
13149
|
+
|
|
13150
|
+
function num(data) {
|
|
13151
|
+
var a = parse(data);
|
|
13152
|
+
if (a.length == 3) a.push(255);
|
|
13153
|
+
else a[3] = Math.round(a[3]);
|
|
13154
|
+
return ((a[3] << 24) >>> 0 | a[0] << 16 | a[1] << 8 | a[2]) >>> 0
|
|
13155
|
+
}
|
|
13156
|
+
|
|
13157
|
+
function parse(data) {
|
|
13158
|
+
if (typeof data == 'string') {
|
|
13159
|
+
data = data.toLowerCase();
|
|
13160
|
+
return name(data)
|
|
13161
|
+
|| hex3(data)
|
|
13162
|
+
|| hex6(data)
|
|
13163
|
+
|| rgb(data)
|
|
13164
|
+
|| rgba(data)
|
|
13165
|
+
|| [0, 0, 0, 255]
|
|
13166
|
+
}
|
|
13167
|
+
return object(data)
|
|
13168
|
+
|| array(data)
|
|
13169
|
+
|| number(data)
|
|
13170
|
+
|| [0, 0, 0, 255]
|
|
13171
|
+
}
|
|
13172
|
+
|
|
13173
|
+
function num2hex(num) {
|
|
13174
|
+
var s = num.toString(16);
|
|
13175
|
+
return s.length == 1
|
|
13176
|
+
? '0' + s
|
|
13177
|
+
: s
|
|
13178
|
+
}
|
|
13179
|
+
|
|
13180
|
+
function isshort(r, g, b, a) {
|
|
13181
|
+
var h = ['ff', '00', '11', '22', '33', '44', '55', '66',
|
|
13182
|
+
'77', '88', '99', 'aa', 'bb', 'cc', 'dd', 'ee'];
|
|
13183
|
+
return h.indexOf(r) != -1
|
|
13184
|
+
&& h.indexOf(g) != -1
|
|
13185
|
+
&& h.indexOf(b) != -1
|
|
13186
|
+
&& h.indexOf(a) != -1
|
|
13187
|
+
}
|
|
13188
|
+
|
|
13189
|
+
function name(str) {
|
|
13190
|
+
if (str == 'red') return [255, 0, 0]
|
|
13191
|
+
if (str == 'green') return [0, 255, 0]
|
|
13192
|
+
if (str == 'blue') return [0, 0, 255]
|
|
13193
|
+
if (str == 'black') return [0, 0, 0]
|
|
13194
|
+
if (str == 'white') return [255, 255, 255]
|
|
13195
|
+
if (str == 'cyan') return [0, 255, 255]
|
|
13196
|
+
if (str == 'gray') return [128, 128, 128]
|
|
13197
|
+
if (str == 'grey') return [128, 128, 128]
|
|
13198
|
+
if (str == 'magenta') return [255, 0, 255]
|
|
13199
|
+
// ok, not the real css `pink` but my personal `magenta` alias
|
|
13200
|
+
// `pink` is simpler than `fuchsia`, whatever...
|
|
13201
|
+
if (str == 'pink') return [255, 0, 255]
|
|
13202
|
+
if (str == 'yellow') return [255, 255, 0]
|
|
13203
|
+
}
|
|
13204
|
+
|
|
13205
|
+
function hex2num(str) {
|
|
13206
|
+
return str.length == 1
|
|
13207
|
+
? parseInt(str + str, 16)
|
|
13208
|
+
: parseInt(str, 16)
|
|
13209
|
+
}
|
|
13210
|
+
|
|
13211
|
+
function hex3(str) {
|
|
13212
|
+
var s = str.replace(/^#/,'');
|
|
13213
|
+
var l = s.length;
|
|
13214
|
+
if (l == 3 || l == 4) {
|
|
13215
|
+
var r = hex2num(s[0]);
|
|
13216
|
+
var g = hex2num(s[1]);
|
|
13217
|
+
var b = hex2num(s[2]);
|
|
13218
|
+
var a = l == 3
|
|
13219
|
+
? 255
|
|
13220
|
+
: hex2num(s[3]);
|
|
13221
|
+
|
|
13222
|
+
if (isNaN(r) || isNaN(g) || isNaN(b) || isNaN(a)) return
|
|
13223
|
+
|
|
13224
|
+
return [r, g, b, a]
|
|
13225
|
+
}
|
|
13226
|
+
}
|
|
13227
|
+
|
|
13228
|
+
function hex6(str) {
|
|
13229
|
+
var s = str.replace(/^#/,'');
|
|
13230
|
+
var l = s.length;
|
|
13231
|
+
if (l == 6 || l == 8) {
|
|
13232
|
+
var r = hex2num(s.slice(0, 2));
|
|
13233
|
+
var g = hex2num(s.slice(2, 4));
|
|
13234
|
+
var b = hex2num(s.slice(4, 6));
|
|
13235
|
+
var a = l == 6
|
|
13236
|
+
? 255
|
|
13237
|
+
: hex2num(s.slice(6, 8));
|
|
13238
|
+
|
|
13239
|
+
if (isNaN(r) || isNaN(g) || isNaN(b) || isNaN(a)) return
|
|
13240
|
+
|
|
13241
|
+
return [r, g, b, a]
|
|
13242
|
+
}
|
|
13243
|
+
}
|
|
13244
|
+
|
|
13245
|
+
function getnum(val, integer) {
|
|
13246
|
+
if (typeof val != 'number') return -1
|
|
13247
|
+
if (integer === true && Math.floor(val) !== val) return -1
|
|
13248
|
+
return val >= 0 && val <= 255
|
|
13249
|
+
? val
|
|
13250
|
+
: -1
|
|
13251
|
+
}
|
|
13252
|
+
|
|
13253
|
+
function object(obj) {
|
|
13254
|
+
if (Object.prototype.toString.call(obj) === '[object Object]'
|
|
13255
|
+
&& Object.getPrototypeOf(obj) === Object.getPrototypeOf({})) {
|
|
13256
|
+
var r = getnum(obj.r != undefined ? obj.r : obj.red != undefined ? obj.red : 0, true);
|
|
13257
|
+
var g = getnum(obj.g != undefined ? obj.g : obj.green != undefined ? obj.green : 0, true);
|
|
13258
|
+
var b = getnum(obj.b != undefined ? obj.b : obj.blue != undefined ? obj.blue : 0, true);
|
|
13259
|
+
var a = getnum(obj.a != undefined ? obj.a : obj.alpha != undefined ? obj.alpha : 255, true);
|
|
13260
|
+
if (r != -1 && g != -1 && b != -1 && a != -1) {
|
|
13261
|
+
return [r, g, b, a]
|
|
13363
13262
|
}
|
|
13364
13263
|
}
|
|
13365
|
-
|
|
13366
|
-
|
|
13367
|
-
|
|
13264
|
+
}
|
|
13265
|
+
|
|
13266
|
+
function array(arr) {
|
|
13267
|
+
if (Array.isArray(arr) && (arr.length == 3 || arr.length == 4)) {
|
|
13268
|
+
var r = getnum(arr[0], true);
|
|
13269
|
+
var g = getnum(arr[1], true);
|
|
13270
|
+
var b = getnum(arr[2], true);
|
|
13271
|
+
var a = getnum(arr[3] != undefined ? arr[3] : 255, true);
|
|
13272
|
+
if (r != -1 && g != -1 && b != -1 && a != -1) {
|
|
13273
|
+
return [r, g, b, a]
|
|
13368
13274
|
}
|
|
13369
13275
|
}
|
|
13370
|
-
|
|
13371
|
-
|
|
13372
|
-
|
|
13373
|
-
|
|
13276
|
+
}
|
|
13277
|
+
|
|
13278
|
+
function number(num) {
|
|
13279
|
+
if (typeof num == 'number' && Math.floor(num) == num && num <= 4294967295 && num >= 0) {
|
|
13280
|
+
var a = num >> 24 & 255;
|
|
13281
|
+
var r = num >> 16 & 255;
|
|
13282
|
+
var g = num >> 8 & 255;
|
|
13283
|
+
var b = num & 255;
|
|
13284
|
+
return [r, g, b, a]
|
|
13374
13285
|
}
|
|
13375
|
-
|
|
13376
|
-
|
|
13377
|
-
|
|
13286
|
+
}
|
|
13287
|
+
|
|
13288
|
+
function rgb(str) {
|
|
13289
|
+
if (str.substr(0, 4) == 'rgb(') {
|
|
13290
|
+
str = str.match(/^rgb\(([^)]+)\)/)[1];
|
|
13291
|
+
var t = str.split(/ *, */).map(Number);
|
|
13292
|
+
var r = getnum(t[0], true);
|
|
13293
|
+
var g = getnum(t[1], true);
|
|
13294
|
+
var b = getnum(t[2], true);
|
|
13295
|
+
if (r != -1 && g != -1 && b != -1) {
|
|
13296
|
+
return [r, g, b, 255]
|
|
13378
13297
|
}
|
|
13379
13298
|
}
|
|
13380
13299
|
}
|
|
13381
|
-
const Log = new Logger("KoliBri", getDevMode);
|
|
13382
13300
|
|
|
13383
|
-
|
|
13384
|
-
|
|
13385
|
-
|
|
13386
|
-
|
|
13387
|
-
|
|
13388
|
-
|
|
13389
|
-
|
|
13390
|
-
|
|
13391
|
-
|
|
13392
|
-
|
|
13393
|
-
}
|
|
13394
|
-
const devCache = /* @__PURE__ */ new Set();
|
|
13395
|
-
const devHint = (msg, options) => {
|
|
13396
|
-
if (devCache.has(msg) === false || !!options?.force) {
|
|
13397
|
-
devCache.add(msg);
|
|
13398
|
-
Log.debug([msg].concat(options?.details || []), {
|
|
13399
|
-
classifier: `\u{1F4BB} dev`,
|
|
13400
|
-
forceLog: !!options?.force,
|
|
13401
|
-
overwriteStyle: "; background-color: #f09"
|
|
13402
|
-
});
|
|
13403
|
-
}
|
|
13404
|
-
};
|
|
13405
|
-
const devWarning = (msg, options) => {
|
|
13406
|
-
if (devCache.has(msg) === false || !!options?.force) {
|
|
13407
|
-
devCache.add(msg);
|
|
13408
|
-
Log.warn([msg].concat(options?.details || []), {
|
|
13409
|
-
classifier: `\u26A0\uFE0F dev`,
|
|
13410
|
-
forceLog: !!options?.force,
|
|
13411
|
-
overwriteStyle: "; background-color: #f09"
|
|
13412
|
-
});
|
|
13413
|
-
}
|
|
13414
|
-
};
|
|
13415
|
-
const featureCache = /* @__PURE__ */ new Set();
|
|
13416
|
-
const featureHint = (msg, done = false, options) => {
|
|
13417
|
-
if (featureCache.has(msg) === false || !!options?.force) {
|
|
13418
|
-
featureCache.add(msg);
|
|
13419
|
-
msg += done === true ? " \u2705" : "";
|
|
13420
|
-
Log.debug([msg].concat(options?.details || []), {
|
|
13421
|
-
classifier: `\u{1F31F} feature`,
|
|
13422
|
-
forceLog: !!options?.force,
|
|
13423
|
-
overwriteStyle: "; background-color: #309"
|
|
13424
|
-
});
|
|
13425
|
-
}
|
|
13426
|
-
};
|
|
13427
|
-
devHint(
|
|
13428
|
-
`Wir freuen uns \xFCber jedes Feedback, Kommentare, Screenshots oder Demo-Links von einer auf KoliBri-basierenden Anwendung (kolibri@itzbund.de). Vielen Dank!`
|
|
13429
|
-
);
|
|
13430
|
-
const uiUxCache = /* @__PURE__ */ new Set();
|
|
13431
|
-
const uiUxHint = (msg, options) => {
|
|
13432
|
-
if (uiUxCache.has(msg) === false || !!options?.force) {
|
|
13433
|
-
uiUxCache.add(msg);
|
|
13434
|
-
Log.debug([msg].concat(options?.details || []), {
|
|
13435
|
-
classifier: `\u{1F4D1} ui/ux`,
|
|
13436
|
-
forceLog: !!options?.force,
|
|
13437
|
-
overwriteStyle: "; background-color: #060;"
|
|
13438
|
-
});
|
|
13439
|
-
}
|
|
13440
|
-
};
|
|
13441
|
-
const a11yHintDisabled = () => {
|
|
13442
|
-
a11yHint(
|
|
13443
|
-
`"Disabled" schr\xE4nkt die Zug\xE4nglichkeit und Sichtbarkeit ein. Wir empfehlen aus Sicht der Barrierefreiheit readonly- statt disabled-Attribut zu verwenden.
|
|
13444
|
-
- https://uxdesign.cc/is-it-ok-to-grey-out-disabled-buttons-8afa74a0fae`
|
|
13445
|
-
);
|
|
13446
|
-
};
|
|
13447
|
-
const a11yHintLabelingLandmarks = (value) => {
|
|
13448
|
-
if (typeof value !== "string" || value === "") {
|
|
13449
|
-
a11yHint(
|
|
13450
|
-
`Manche Strukturelemente, wie bspw. der nav-Tag, k\xF6nnen mehrfach in einer Webseite verwendet werden. Damit die gleichnamigen Strukturelemente voneinander unterschieden werden k\xF6nnen, ist es erforderlich ein Aria-Label zu setzen.
|
|
13451
|
-
- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role#accessibility_concerns`
|
|
13452
|
-
);
|
|
13301
|
+
function rgba(str) {
|
|
13302
|
+
if (str.substr(0, 5) == 'rgba(') {
|
|
13303
|
+
str = str.match(/^rgba\(([^)]+)\)/)[1];
|
|
13304
|
+
var t = str.split(/ *, */).map(Number);
|
|
13305
|
+
var r = getnum(t[0], true);
|
|
13306
|
+
var g = getnum(t[1], true);
|
|
13307
|
+
var b = getnum(t[2], true);
|
|
13308
|
+
var a = getnum(t[3] * 255);
|
|
13309
|
+
if (r != -1 && g != -1 && b != -1 && a != -1) {
|
|
13310
|
+
return [r, g, b, a]
|
|
13311
|
+
}
|
|
13453
13312
|
}
|
|
13454
|
-
}
|
|
13455
|
-
const uiUxHintMillerscheZahl = (className, length = 8) => {
|
|
13456
|
-
if (length > 7) {
|
|
13457
|
-
uiUxHint(
|
|
13458
|
-
`[${className}] Innerhalb von Navigationsstrukturen wird empfohlen nicht mehr als 7 Men\xFCpunkte zu verwenden.
|
|
13313
|
+
}
|
|
13459
13314
|
|
|
13460
|
-
|
|
13461
|
-
- https://de.ryte.com/wiki/Millersche_Zahl
|
|
13462
|
-
- https://de.wikipedia.org/wiki/Millersche_Zahl`
|
|
13463
|
-
);
|
|
13464
|
-
}
|
|
13465
|
-
};
|
|
13315
|
+
var rgba$1 = rgbaConvert.exports;
|
|
13466
13316
|
|
|
13467
13317
|
const getContrastYIQ = (r, g, b) => {
|
|
13468
|
-
|
|
13469
|
-
|
|
13318
|
+
const yiq = (r * 299 + g * 587 + b * 114) / 1000;
|
|
13319
|
+
return yiq >= 128 ? -1 : 1;
|
|
13470
13320
|
};
|
|
13471
13321
|
const calcColorContrast = (baseColor, contrastColor, ratio, dir = 1) => {
|
|
13472
|
-
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
|
|
13487
|
-
|
|
13322
|
+
const color = [
|
|
13323
|
+
Math.max(Math.min(Math.round(contrastColor[0] + dir * Math.max(1, contrastColor[0] / 100)), 255), 0),
|
|
13324
|
+
Math.max(Math.min(Math.round(contrastColor[1] + dir * Math.max(1, contrastColor[1] / 100)), 255), 0),
|
|
13325
|
+
Math.max(Math.min(Math.round(contrastColor[2] + dir * Math.max(1, contrastColor[2] / 100)), 255), 0),
|
|
13326
|
+
];
|
|
13327
|
+
const contrast = s(rgba$1.hex(`rgba(${baseColor.join(',')},1)`), rgba$1.hex(`rgba(${color.join(',')},1)`));
|
|
13328
|
+
const summe = color[0] + color[1] + color[2];
|
|
13329
|
+
if (summe === 0 || summe === 765 || contrast > ratio) {
|
|
13330
|
+
return {
|
|
13331
|
+
background: baseColor,
|
|
13332
|
+
foreground: color,
|
|
13333
|
+
contrast,
|
|
13334
|
+
};
|
|
13335
|
+
}
|
|
13336
|
+
else {
|
|
13337
|
+
return calcColorContrast(baseColor, color, ratio, dir);
|
|
13338
|
+
}
|
|
13488
13339
|
};
|
|
13489
|
-
const cache =
|
|
13340
|
+
const cache = new Map();
|
|
13490
13341
|
const getColorContrast = (baseColor, contrastColor, ratio, dir = 1) => {
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
|
|
13342
|
+
if (cache.has(baseColor)) {
|
|
13343
|
+
return cache.get(baseColor);
|
|
13344
|
+
}
|
|
13345
|
+
const color = calcColorContrast(baseColor, contrastColor, ratio, dir);
|
|
13346
|
+
cache.set(baseColor, color);
|
|
13347
|
+
return color;
|
|
13497
13348
|
};
|
|
13498
13349
|
const createContrastColorPair = (color, contrastRatio = 7) => {
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
|
|
13504
|
-
|
|
13505
|
-
|
|
13506
|
-
|
|
13507
|
-
|
|
13508
|
-
|
|
13509
|
-
|
|
13350
|
+
let baseColor = [0, 0, 0, 1];
|
|
13351
|
+
let contrastColor = [255, 255, 255, 1];
|
|
13352
|
+
if (typeof color === 'string') {
|
|
13353
|
+
baseColor = colorRgba$1(color);
|
|
13354
|
+
contrastColor = baseColor;
|
|
13355
|
+
}
|
|
13356
|
+
else if (typeof color === 'object' && color !== null && typeof color.background === 'string' && typeof color.foreground === 'string') {
|
|
13357
|
+
baseColor = colorRgba$1(color.background);
|
|
13358
|
+
if (typeof color.foreground === 'string') {
|
|
13359
|
+
contrastColor = colorRgba$1(color.foreground);
|
|
13360
|
+
}
|
|
13361
|
+
else {
|
|
13362
|
+
contrastColor = baseColor;
|
|
13363
|
+
}
|
|
13364
|
+
}
|
|
13365
|
+
const yiq = getContrastYIQ(baseColor[0], baseColor[1], baseColor[2]);
|
|
13366
|
+
const colorContrast = getColorContrast([baseColor[0], baseColor[1], baseColor[2]], [contrastColor[0], contrastColor[1], contrastColor[2]], contrastRatio, yiq);
|
|
13367
|
+
contrastColor = [...colorContrast.foreground, 1];
|
|
13368
|
+
return {
|
|
13369
|
+
background: rgba$1.hex(`rgba(${baseColor.join(',')})`),
|
|
13370
|
+
foreground: rgba$1.hex(`rgba(${contrastColor.join(',')})`),
|
|
13371
|
+
contrast: colorContrast.contrast,
|
|
13372
|
+
};
|
|
13373
|
+
};
|
|
13374
|
+
|
|
13375
|
+
const pushNodes = (set, domNodes) => {
|
|
13376
|
+
domNodes.forEach((domNode) => {
|
|
13377
|
+
if (set.has(domNode) === false) {
|
|
13378
|
+
set.add(domNode);
|
|
13379
|
+
}
|
|
13380
|
+
});
|
|
13381
|
+
};
|
|
13382
|
+
const querySelectorAll = (selector, node = document) => {
|
|
13383
|
+
if (node instanceof Document ||
|
|
13384
|
+
node instanceof HTMLElement ||
|
|
13385
|
+
node instanceof ShadowRoot) {
|
|
13386
|
+
const domNodes = new Set();
|
|
13387
|
+
pushNodes(domNodes, node.querySelectorAll(selector));
|
|
13388
|
+
const nodeList = node.querySelectorAll('[class*="hydrated"]');
|
|
13389
|
+
for (let i = 0; i < nodeList.length; i++) {
|
|
13390
|
+
const shadowRoot = nodeList[i].shadowRoot;
|
|
13391
|
+
if (typeof shadowRoot === "object" && shadowRoot !== null) {
|
|
13392
|
+
pushNodes(domNodes, querySelectorAll(selector, shadowRoot));
|
|
13393
|
+
}
|
|
13394
|
+
else {
|
|
13395
|
+
pushNodes(domNodes, querySelectorAll(selector, nodeList[i]));
|
|
13396
|
+
}
|
|
13397
|
+
}
|
|
13398
|
+
return Array.from(domNodes);
|
|
13399
|
+
}
|
|
13400
|
+
else {
|
|
13401
|
+
throw new Error(`The parameter document for the method querySelectorAll is not type of Document, HTMLElement or ShadowRoot.`);
|
|
13402
|
+
}
|
|
13403
|
+
};
|
|
13404
|
+
|
|
13405
|
+
const querySelector = (selector, node = document) => {
|
|
13406
|
+
if (node instanceof Document ||
|
|
13407
|
+
node instanceof HTMLElement ||
|
|
13408
|
+
node instanceof ShadowRoot) {
|
|
13409
|
+
let domNode = node.querySelector(selector);
|
|
13410
|
+
if (domNode === null) {
|
|
13411
|
+
const nodeList = node.querySelectorAll('[class*="hydrated"]');
|
|
13412
|
+
for (let i = 0; i < nodeList.length; i++) {
|
|
13413
|
+
const shadowRoot = nodeList[i].shadowRoot;
|
|
13414
|
+
if (typeof shadowRoot === "object" && shadowRoot !== null) {
|
|
13415
|
+
domNode = querySelector(selector, shadowRoot);
|
|
13416
|
+
}
|
|
13417
|
+
else {
|
|
13418
|
+
domNode = querySelector(selector, nodeList[i]);
|
|
13419
|
+
}
|
|
13420
|
+
if (domNode !== null) {
|
|
13421
|
+
break;
|
|
13422
|
+
}
|
|
13423
|
+
}
|
|
13424
|
+
}
|
|
13425
|
+
return domNode;
|
|
13426
|
+
}
|
|
13427
|
+
else {
|
|
13428
|
+
throw new Error(`The parameter document for the method querySelector is not type of Document, HTMLElement or ShadowRoot.`);
|
|
13510
13429
|
}
|
|
13511
|
-
}
|
|
13512
|
-
const yiq = getContrastYIQ(baseColor[0], baseColor[1], baseColor[2]);
|
|
13513
|
-
const colorContrast = getColorContrast(
|
|
13514
|
-
[baseColor[0], baseColor[1], baseColor[2]],
|
|
13515
|
-
[contrastColor[0], contrastColor[1], contrastColor[2]],
|
|
13516
|
-
contrastRatio,
|
|
13517
|
-
yiq
|
|
13518
|
-
);
|
|
13519
|
-
contrastColor = [...colorContrast.foreground, 1];
|
|
13520
|
-
return {
|
|
13521
|
-
background: rgbaConvert.hex(`rgba(${baseColor.join(",")})`),
|
|
13522
|
-
foreground: rgbaConvert.hex(`rgba(${contrastColor.join(",")})`),
|
|
13523
|
-
contrast: colorContrast.contrast
|
|
13524
|
-
};
|
|
13525
13430
|
};
|
|
13526
13431
|
|
|
13527
13432
|
const OBJECT_OBJECT = /\[object Object\]/;
|
|
13528
13433
|
const objectObjectHandler = (value, cb) => {
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13434
|
+
if (typeof value === 'string' && OBJECT_OBJECT.test(value)) {
|
|
13435
|
+
return;
|
|
13436
|
+
}
|
|
13437
|
+
cb();
|
|
13533
13438
|
};
|
|
13534
13439
|
const emptyStringByArrayHandler = (value, cb) => {
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13440
|
+
if (typeof value === 'string' && value === '') {
|
|
13441
|
+
return;
|
|
13442
|
+
}
|
|
13443
|
+
cb();
|
|
13539
13444
|
};
|
|
13540
13445
|
const setEventTarget = (event, target) => {
|
|
13541
|
-
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13446
|
+
Object.defineProperty(event, 'target', {
|
|
13447
|
+
value: target,
|
|
13448
|
+
writable: false,
|
|
13449
|
+
});
|
|
13545
13450
|
};
|
|
13546
13451
|
const patchState = (component) => {
|
|
13547
|
-
|
|
13548
|
-
|
|
13549
|
-
|
|
13550
|
-
|
|
13551
|
-
|
|
13552
|
-
|
|
13553
|
-
|
|
13554
|
-
component.state = {
|
|
13555
|
-
...component.state,
|
|
13556
|
-
...Object.fromEntries(component.nextState)
|
|
13557
|
-
};
|
|
13558
|
-
delete component.nextState;
|
|
13559
|
-
component.nextHooks?.forEach((hooks, key) => {
|
|
13560
|
-
const afterPatch = hooks.get("afterPatch");
|
|
13561
|
-
if (typeof afterPatch === "function") {
|
|
13562
|
-
afterPatch(component.state[key], component.state, component, key);
|
|
13563
|
-
}
|
|
13452
|
+
var _a, _b, _c;
|
|
13453
|
+
(_a = component.nextHooks) === null || _a === void 0 ? void 0 : _a.forEach((hooks, key) => {
|
|
13454
|
+
var _a;
|
|
13455
|
+
const beforePatch = hooks.get('beforePatch');
|
|
13456
|
+
if (typeof beforePatch === 'function') {
|
|
13457
|
+
beforePatch((_a = component.nextState) === null || _a === void 0 ? void 0 : _a.get(key), component.nextState, component, key);
|
|
13458
|
+
}
|
|
13564
13459
|
});
|
|
13565
|
-
|
|
13566
|
-
|
|
13460
|
+
if (((_b = component.nextState) === null || _b === void 0 ? void 0 : _b.size) > 0) {
|
|
13461
|
+
component.state = Object.assign(Object.assign({}, component.state), Object.fromEntries(component.nextState));
|
|
13462
|
+
delete component.nextState;
|
|
13463
|
+
(_c = component.nextHooks) === null || _c === void 0 ? void 0 : _c.forEach((hooks, key) => {
|
|
13464
|
+
const afterPatch = hooks.get('afterPatch');
|
|
13465
|
+
if (typeof afterPatch === 'function') {
|
|
13466
|
+
afterPatch(component.state[key], component.state, component, key);
|
|
13467
|
+
}
|
|
13468
|
+
});
|
|
13469
|
+
}
|
|
13470
|
+
delete component.nextHooks;
|
|
13567
13471
|
};
|
|
13568
13472
|
const setState = (component, propName, value, hooks = {}) => {
|
|
13569
|
-
|
|
13570
|
-
component.nextHooks
|
|
13571
|
-
|
|
13572
|
-
|
|
13573
|
-
component.nextState
|
|
13574
|
-
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13584
|
-
|
|
13585
|
-
|
|
13586
|
-
|
|
13473
|
+
var _a, _b;
|
|
13474
|
+
if (component.nextHooks === undefined) {
|
|
13475
|
+
component.nextHooks = new Map();
|
|
13476
|
+
}
|
|
13477
|
+
if (component.nextState === undefined) {
|
|
13478
|
+
component.nextState = new Map();
|
|
13479
|
+
}
|
|
13480
|
+
const nextHooks = component.nextHooks.get(propName);
|
|
13481
|
+
if (nextHooks instanceof Map === false) {
|
|
13482
|
+
component.nextHooks.set(propName, new Map());
|
|
13483
|
+
}
|
|
13484
|
+
if (typeof hooks.afterPatch === 'function') {
|
|
13485
|
+
(_a = component.nextHooks.get(propName)) === null || _a === void 0 ? void 0 : _a.set('afterPatch', hooks.afterPatch);
|
|
13486
|
+
}
|
|
13487
|
+
if (typeof hooks.beforePatch === 'function') {
|
|
13488
|
+
(_b = component.nextHooks.get(propName)) === null || _b === void 0 ? void 0 : _b.set('beforePatch', hooks.beforePatch);
|
|
13489
|
+
}
|
|
13490
|
+
component.nextState.set(propName, value);
|
|
13491
|
+
patchState(component);
|
|
13587
13492
|
};
|
|
13588
13493
|
const logWarn = (component, propName, value, requiredGeneric) => {
|
|
13589
|
-
|
|
13590
|
-
`[${component.constructor.name}] Der Property-Wert (${value}) f\xFCr '${propName}' ist nicht valide. Folgende Werte sind erlaubt: ${Array.from(
|
|
13591
|
-
requiredGeneric
|
|
13592
|
-
).join(", ")}`
|
|
13593
|
-
);
|
|
13494
|
+
devHint(`[${component.constructor.name}] Der Property-Wert (${value}) für '${propName}' ist nicht valide. Folgende Werte sind erlaubt: ${Array.from(requiredGeneric).join(', ')}`);
|
|
13594
13495
|
};
|
|
13595
13496
|
function watchValidator(component, propName, validationFunction, requiredGeneric, value, options = {}) {
|
|
13596
|
-
|
|
13597
|
-
|
|
13598
|
-
|
|
13599
|
-
|
|
13600
|
-
|
|
13601
|
-
|
|
13602
|
-
|
|
13497
|
+
if (validationFunction(value)) {
|
|
13498
|
+
setState(component, propName, value, options.hooks);
|
|
13499
|
+
}
|
|
13500
|
+
else if (value === undefined && options.required !== true && validationFunction(options.defaultValue)) {
|
|
13501
|
+
setState(component, propName, options.defaultValue, options.hooks);
|
|
13502
|
+
}
|
|
13503
|
+
else {
|
|
13504
|
+
if (!options.required) {
|
|
13505
|
+
requiredGeneric.add(null);
|
|
13506
|
+
}
|
|
13507
|
+
logWarn(component, propName, value, requiredGeneric);
|
|
13603
13508
|
}
|
|
13604
|
-
logWarn(component, propName, value, requiredGeneric);
|
|
13605
|
-
}
|
|
13606
13509
|
}
|
|
13607
13510
|
const watchBoolean = (component, propName, value, options) => {
|
|
13608
|
-
|
|
13511
|
+
watchValidator(component, propName, (value) => typeof value === 'boolean', new Set(['Boolean {true, false}']), value, options);
|
|
13609
13512
|
};
|
|
13610
13513
|
const watchString = (component, propName, value, options = {}) => {
|
|
13611
|
-
|
|
13612
|
-
|
|
13613
|
-
component,
|
|
13614
|
-
propName,
|
|
13615
|
-
(value2) => typeof value2 === "string" && value2.length >= minLength && (typeof options?.maxLength === "undefined" || value2.length <= options.maxLength),
|
|
13616
|
-
/* @__PURE__ */ new Set([`String`]),
|
|
13617
|
-
value,
|
|
13618
|
-
options
|
|
13619
|
-
);
|
|
13514
|
+
const minLength = typeof options.minLength === 'number' ? options === null || options === void 0 ? void 0 : options.minLength : 0;
|
|
13515
|
+
watchValidator(component, propName, (value) => typeof value === 'string' && value.length >= minLength && (typeof (options === null || options === void 0 ? void 0 : options.maxLength) === 'undefined' || value.length <= options.maxLength), new Set([`String`]), value, options);
|
|
13620
13516
|
};
|
|
13621
13517
|
const watchNumber = (component, propName, value, options) => {
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
(value2) => typeof value2 === "number" && (typeof options?.min === "undefined" || typeof options?.min === "number" && value2 >= options.min) && (typeof options?.max === "undefined" || typeof options?.max === "number" && value2 <= options.max),
|
|
13626
|
-
/* @__PURE__ */ new Set(["Number"]),
|
|
13627
|
-
value,
|
|
13628
|
-
options
|
|
13629
|
-
);
|
|
13518
|
+
watchValidator(component, propName, (value) => typeof value === 'number' &&
|
|
13519
|
+
(typeof (options === null || options === void 0 ? void 0 : options.min) === 'undefined' || (typeof (options === null || options === void 0 ? void 0 : options.min) === 'number' && value >= options.min)) &&
|
|
13520
|
+
(typeof (options === null || options === void 0 ? void 0 : options.max) === 'undefined' || (typeof (options === null || options === void 0 ? void 0 : options.max) === 'number' && value <= options.max)), new Set(['Number']), value, options);
|
|
13630
13521
|
};
|
|
13631
13522
|
const watchJsonArrayString = (component, propName, itemValidation, value, arrayValidation = (items) => items === items, options = {}) => {
|
|
13632
|
-
|
|
13633
|
-
|
|
13634
|
-
|
|
13635
|
-
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
|
|
13654
|
-
|
|
13655
|
-
|
|
13656
|
-
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13523
|
+
emptyStringByArrayHandler(value, () => {
|
|
13524
|
+
objectObjectHandler(value, () => {
|
|
13525
|
+
if (typeof value === 'undefined') {
|
|
13526
|
+
value = [];
|
|
13527
|
+
}
|
|
13528
|
+
try {
|
|
13529
|
+
try {
|
|
13530
|
+
value = parseJson(value);
|
|
13531
|
+
}
|
|
13532
|
+
catch (e) {
|
|
13533
|
+
}
|
|
13534
|
+
if (Array.isArray(value)) {
|
|
13535
|
+
const invalid = value.find((item) => !itemValidation(item));
|
|
13536
|
+
if (invalid === undefined && arrayValidation(value)) {
|
|
13537
|
+
setState(component, propName, value, options.hooks);
|
|
13538
|
+
}
|
|
13539
|
+
else {
|
|
13540
|
+
objectObjectHandler(invalid, () => {
|
|
13541
|
+
Log.debug(invalid);
|
|
13542
|
+
throw new Error(`↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.`);
|
|
13543
|
+
});
|
|
13544
|
+
}
|
|
13545
|
+
}
|
|
13546
|
+
else {
|
|
13547
|
+
objectObjectHandler(value, () => {
|
|
13548
|
+
Log.debug(value);
|
|
13549
|
+
throw new Error(`↑ Das Schema für das Property (_options) ist nicht valide. Der Wert wird nicht geändert.`);
|
|
13550
|
+
});
|
|
13551
|
+
}
|
|
13552
|
+
}
|
|
13553
|
+
catch (error) {
|
|
13554
|
+
Log.debug(error);
|
|
13555
|
+
}
|
|
13556
|
+
});
|
|
13661
13557
|
});
|
|
13662
|
-
});
|
|
13663
13558
|
};
|
|
13664
13559
|
const BOOLEAN = /^(true|false)$/;
|
|
13665
13560
|
const INTEGER = /^-?(0|[1-9]\d*)$/;
|
|
13666
13561
|
const FLOAT = /^-?(0.|[1-9]\d*.)\d*[1-9]$/;
|
|
13667
13562
|
const mapString2Unknown = (value) => {
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
|
|
13671
|
-
|
|
13672
|
-
|
|
13673
|
-
|
|
13674
|
-
|
|
13675
|
-
|
|
13676
|
-
|
|
13677
|
-
|
|
13678
|
-
|
|
13679
|
-
|
|
13680
|
-
|
|
13681
|
-
|
|
13563
|
+
const typeStr = typeof value;
|
|
13564
|
+
const oldValue = `${value}`;
|
|
13565
|
+
if (typeof value === 'string') {
|
|
13566
|
+
if (BOOLEAN.test(value)) {
|
|
13567
|
+
value = value === 'true';
|
|
13568
|
+
}
|
|
13569
|
+
else if (INTEGER.test(value)) {
|
|
13570
|
+
value = parseInt(value);
|
|
13571
|
+
}
|
|
13572
|
+
else if (FLOAT.test(value)) {
|
|
13573
|
+
value = parseFloat(value);
|
|
13574
|
+
}
|
|
13575
|
+
else if (JSON_CHARS.test(value)) {
|
|
13576
|
+
try {
|
|
13577
|
+
value = parseJson(value);
|
|
13578
|
+
}
|
|
13579
|
+
catch (e) {
|
|
13580
|
+
}
|
|
13581
|
+
}
|
|
13682
13582
|
}
|
|
13683
|
-
|
|
13684
|
-
|
|
13685
|
-
|
|
13686
|
-
|
|
13687
|
-
return value;
|
|
13583
|
+
if (typeStr !== typeof value) {
|
|
13584
|
+
devHint(`You have used a stringified property value (${oldValue} to ${JSON.stringify(value)}) which type switched from ${typeStr} to ${typeof value}!`);
|
|
13585
|
+
}
|
|
13586
|
+
return value;
|
|
13688
13587
|
};
|
|
13689
13588
|
const stringifyJson = (value) => {
|
|
13690
|
-
|
|
13691
|
-
|
|
13692
|
-
|
|
13693
|
-
|
|
13694
|
-
|
|
13695
|
-
|
|
13696
|
-
|
|
13589
|
+
try {
|
|
13590
|
+
return JSON.stringify(value).replace(/"/g, "'");
|
|
13591
|
+
}
|
|
13592
|
+
catch (error) {
|
|
13593
|
+
Log.warn(['stringifyJson', value]);
|
|
13594
|
+
Log.error(`↑ Das JSON konnte nicht in einen String umgewandelt werden. Es wird ein stringifizierbares JSON erwartet.`);
|
|
13595
|
+
throw new Error();
|
|
13596
|
+
}
|
|
13697
13597
|
};
|
|
13698
13598
|
const JSON_CHARS = /^[{[]/;
|
|
13699
13599
|
const parseJson = (value) => {
|
|
13700
|
-
|
|
13701
|
-
try {
|
|
13702
|
-
return JSON.parse(value);
|
|
13703
|
-
} catch (error) {
|
|
13704
|
-
if (JSON_CHARS.test(value)) {
|
|
13600
|
+
if (typeof value === 'string') {
|
|
13705
13601
|
try {
|
|
13706
|
-
|
|
13707
|
-
}
|
|
13708
|
-
|
|
13709
|
-
|
|
13602
|
+
return JSON.parse(value);
|
|
13603
|
+
}
|
|
13604
|
+
catch (error) {
|
|
13605
|
+
if (JSON_CHARS.test(value)) {
|
|
13606
|
+
try {
|
|
13607
|
+
return JSON.parse(value.replace(/'/g, '"'));
|
|
13608
|
+
}
|
|
13609
|
+
catch (error) {
|
|
13610
|
+
Log.warn(['parseJson', value]);
|
|
13611
|
+
Log.error(`↑ Der JSON-String konnte nicht geparsed werden. Achten Sie darauf, dass einfache Anführungszeichen im Text maskiert werden (‘).`);
|
|
13612
|
+
}
|
|
13613
|
+
}
|
|
13710
13614
|
}
|
|
13711
|
-
}
|
|
13712
13615
|
}
|
|
13713
|
-
|
|
13714
|
-
throw new Error();
|
|
13616
|
+
throw new Error();
|
|
13715
13617
|
};
|
|
13716
13618
|
const mapBoolean2String = (value) => {
|
|
13717
|
-
|
|
13619
|
+
return typeof value === 'boolean' ? (value === true ? 'true' : 'false') : undefined;
|
|
13718
13620
|
};
|
|
13719
13621
|
const mapStringOrBoolean2String = (value) => {
|
|
13720
|
-
|
|
13622
|
+
return typeof value === 'string' ? value : mapBoolean2String(value);
|
|
13721
13623
|
};
|
|
13722
13624
|
const koliBriQuerySelector = (selector, node) => querySelector(selector, node || getDocument());
|
|
13723
13625
|
const koliBriQuerySelectorAll = (selector, node) => querySelectorAll(selector, node || getDocument());
|
|
@@ -13730,626 +13632,592 @@ KoliBriDevHelper.querySelectorAll = koliBriQuerySelectorAll;
|
|
|
13730
13632
|
KoliBriDevHelper.stringifyJson = stringifyJson;
|
|
13731
13633
|
|
|
13732
13634
|
const validateAlignment = (component, propName, value) => {
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13635
|
+
watchValidator(component, propName, (value) => typeof value === 'string' && alignPropTypeOptions.includes(value), new Set(alignPropTypeOptions), value, {
|
|
13636
|
+
defaultValue: 'top',
|
|
13637
|
+
});
|
|
13736
13638
|
};
|
|
13737
13639
|
|
|
13738
|
-
const isObject$1 = (value) => typeof value ===
|
|
13739
|
-
const isString$2 = (value, minLength = 0) => typeof value ===
|
|
13640
|
+
const isObject$1 = (value) => typeof value === 'object' && value !== null;
|
|
13641
|
+
const isString$2 = (value, minLength = 0) => typeof value === 'string' && value.length >= minLength;
|
|
13740
13642
|
const isStyle = (style) => {
|
|
13741
|
-
|
|
13742
|
-
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
|
|
13643
|
+
if (typeof style === 'object' && style !== null) {
|
|
13644
|
+
for (const property in style) {
|
|
13645
|
+
if (isString$2(property, 1) === false) {
|
|
13646
|
+
return false;
|
|
13647
|
+
}
|
|
13648
|
+
}
|
|
13746
13649
|
}
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13650
|
+
else {
|
|
13651
|
+
return isString$2(style, 1);
|
|
13652
|
+
}
|
|
13653
|
+
return true;
|
|
13751
13654
|
};
|
|
13752
|
-
const STATE_CHANGE_EVENT = new Event(
|
|
13655
|
+
const STATE_CHANGE_EVENT = new Event('StateChange');
|
|
13753
13656
|
|
|
13754
13657
|
const validateInputSelectOptions = (option) => {
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
|
|
13758
|
-
|
|
13759
|
-
|
|
13760
|
-
|
|
13761
|
-
|
|
13762
|
-
|
|
13763
|
-
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
|
|
13767
|
-
|
|
13768
|
-
|
|
13769
|
-
|
|
13770
|
-
|
|
13771
|
-
|
|
13658
|
+
if (typeof option === 'object' && option !== null) {
|
|
13659
|
+
if (typeof option.label === 'string' && option.label.length > 0) {
|
|
13660
|
+
option.disabled = option.disabled === true;
|
|
13661
|
+
option.label = `${option.label}`.trim();
|
|
13662
|
+
if (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {
|
|
13663
|
+
a11yHint(`Ein abweichendes Aria-Label (${option.label}) ist nicht barrierefrei. Ein abweichendes Aria-Label sollte aus mindestens drei lesbaren Zeichen bestehen.`);
|
|
13664
|
+
}
|
|
13665
|
+
if (Array.isArray(option.options)) {
|
|
13666
|
+
return (option.options.find((item) => {
|
|
13667
|
+
return validateInputSelectOptions(item) === false;
|
|
13668
|
+
}) === undefined);
|
|
13669
|
+
}
|
|
13670
|
+
return true;
|
|
13671
|
+
}
|
|
13672
|
+
else if (typeof option.label === 'number') {
|
|
13673
|
+
return true;
|
|
13674
|
+
}
|
|
13772
13675
|
}
|
|
13773
|
-
|
|
13774
|
-
return false;
|
|
13676
|
+
return false;
|
|
13775
13677
|
};
|
|
13776
13678
|
|
|
13777
13679
|
const options = {
|
|
13778
|
-
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13680
|
+
hooks: {
|
|
13681
|
+
afterPatch: (value) => {
|
|
13682
|
+
if (value !== -1 && value !== 0) {
|
|
13683
|
+
a11yHint(`Don't Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html`);
|
|
13684
|
+
}
|
|
13685
|
+
},
|
|
13686
|
+
},
|
|
13785
13687
|
};
|
|
13786
13688
|
const validateTabIndex = (component, value) => {
|
|
13787
|
-
|
|
13689
|
+
watchNumber(component, '_tabIndex', value, options);
|
|
13788
13690
|
};
|
|
13789
13691
|
|
|
13790
13692
|
const propagateFocus = (host, ref) => {
|
|
13791
|
-
|
|
13792
|
-
|
|
13793
|
-
|
|
13693
|
+
if (isObject$1(host) && host) {
|
|
13694
|
+
host.focus = (ops) => ref === null || ref === void 0 ? void 0 : ref.focus(ops);
|
|
13695
|
+
}
|
|
13794
13696
|
};
|
|
13795
|
-
let processEnv =
|
|
13697
|
+
let processEnv = 'development';
|
|
13796
13698
|
try {
|
|
13797
|
-
|
|
13798
|
-
}
|
|
13799
|
-
|
|
13699
|
+
processEnv = "production";
|
|
13700
|
+
}
|
|
13701
|
+
catch (e) {
|
|
13702
|
+
processEnv = 'production';
|
|
13800
13703
|
}
|
|
13801
13704
|
const handleSlotContent = (hostRef, slotRef, slotName) => {
|
|
13802
|
-
|
|
13803
|
-
|
|
13804
|
-
|
|
13805
|
-
|
|
13705
|
+
if (hostRef && slotRef && typeof slotName === 'string') {
|
|
13706
|
+
const content = hostRef.querySelector(`[slot="${slotName}"]`);
|
|
13707
|
+
if (content) {
|
|
13708
|
+
slotRef.appendChild(content);
|
|
13709
|
+
}
|
|
13806
13710
|
}
|
|
13807
|
-
}
|
|
13808
13711
|
};
|
|
13809
|
-
const showExpertSlot = (label) => label ===
|
|
13712
|
+
const showExpertSlot = (label) => label === '';
|
|
13810
13713
|
|
|
13811
13714
|
const validateAccessKey = (component, value) => {
|
|
13812
|
-
|
|
13715
|
+
watchString(component, '_accessKey', value);
|
|
13813
13716
|
};
|
|
13814
13717
|
|
|
13815
13718
|
const validateActive = (component, value, options) => {
|
|
13816
|
-
|
|
13719
|
+
watchBoolean(component, '_active', value, options);
|
|
13817
13720
|
};
|
|
13818
13721
|
|
|
13819
13722
|
const validateAdjustHeight = (component, value) => {
|
|
13820
|
-
|
|
13723
|
+
watchBoolean(component, '_adjustHeight', value);
|
|
13821
13724
|
};
|
|
13822
13725
|
|
|
13823
13726
|
const validateAlert = (component, value) => {
|
|
13824
|
-
|
|
13727
|
+
watchBoolean(component, '_alert', value);
|
|
13825
13728
|
};
|
|
13826
13729
|
|
|
13827
|
-
const horizontalAlignOptions = [
|
|
13828
|
-
const verticalAlignOptions = [
|
|
13730
|
+
const horizontalAlignOptions = ['left', 'right'];
|
|
13731
|
+
const verticalAlignOptions = ['top', 'bottom'];
|
|
13829
13732
|
const alignPropTypeOptions = [...horizontalAlignOptions, ...verticalAlignOptions];
|
|
13830
13733
|
const validateAlign = (component, value) => {
|
|
13831
|
-
|
|
13734
|
+
validateAlignment(component, '_align', value);
|
|
13832
13735
|
};
|
|
13833
13736
|
|
|
13834
13737
|
const validateAlternativeButtonLinkRole = (component, value) => {
|
|
13835
|
-
|
|
13738
|
+
watchString(component, '_role', value);
|
|
13836
13739
|
};
|
|
13837
13740
|
|
|
13838
13741
|
const validateAriaControls = (component, value) => {
|
|
13839
|
-
|
|
13742
|
+
watchString(component, '_ariaControls', value);
|
|
13840
13743
|
};
|
|
13841
13744
|
|
|
13842
|
-
const ariaCurrentValuePropTypeOptions = [
|
|
13745
|
+
const ariaCurrentValuePropTypeOptions = ['date', 'location', 'page', 'step', 'time', 'true', 'false'];
|
|
13843
13746
|
const validateAriaCurrentValue = (component, value) => {
|
|
13844
|
-
|
|
13845
|
-
|
|
13846
|
-
|
|
13847
|
-
(value2) => typeof value2 === "string" && ariaCurrentValuePropTypeOptions.includes(value2),
|
|
13848
|
-
/* @__PURE__ */ new Set([`AriaCurrentValue {${ariaCurrentValuePropTypeOptions.join(", ")}`]),
|
|
13849
|
-
value,
|
|
13850
|
-
{
|
|
13851
|
-
defaultValue: "page"
|
|
13852
|
-
}
|
|
13853
|
-
);
|
|
13747
|
+
watchValidator(component, `_ariaCurrentValue`, (value) => typeof value === 'string' && ariaCurrentValuePropTypeOptions.includes(value), new Set([`AriaCurrentValue {${ariaCurrentValuePropTypeOptions.join(', ')}`]), value, {
|
|
13748
|
+
defaultValue: 'page',
|
|
13749
|
+
});
|
|
13854
13750
|
};
|
|
13855
13751
|
|
|
13856
13752
|
const validateAriaExpanded = (component, value) => {
|
|
13857
|
-
|
|
13753
|
+
watchBoolean(component, '_ariaExpanded', value);
|
|
13858
13754
|
};
|
|
13859
13755
|
|
|
13860
13756
|
const validateAriaSelected = (component, value) => {
|
|
13861
|
-
|
|
13757
|
+
watchBoolean(component, '_ariaSelected', value);
|
|
13862
13758
|
};
|
|
13863
13759
|
|
|
13864
13760
|
const validateButtonCallbacks = (component, value) => {
|
|
13865
|
-
|
|
13866
|
-
component,
|
|
13867
|
-
`_on`,
|
|
13868
|
-
(value2) => typeof value2 === "object" && value2 !== null,
|
|
13869
|
-
/* @__PURE__ */ new Set(["ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}"]),
|
|
13870
|
-
value
|
|
13871
|
-
);
|
|
13761
|
+
watchValidator(component, `_on`, (value) => typeof value === 'object' && value !== null, new Set(['ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}']), value);
|
|
13872
13762
|
};
|
|
13873
13763
|
|
|
13874
|
-
const buttonTypePropTypeOptions = [
|
|
13764
|
+
const buttonTypePropTypeOptions = ['button', 'reset', 'submit'];
|
|
13875
13765
|
const validateButtonType = (component, value) => {
|
|
13876
|
-
|
|
13877
|
-
component,
|
|
13878
|
-
`_type`,
|
|
13879
|
-
(value2) => typeof value2 === "string" && buttonTypePropTypeOptions.includes(value2),
|
|
13880
|
-
/* @__PURE__ */ new Set([`KoliBriButtonType {${buttonTypePropTypeOptions.join(", ")}`]),
|
|
13881
|
-
value
|
|
13882
|
-
);
|
|
13766
|
+
watchValidator(component, `_type`, (value) => typeof value === 'string' && buttonTypePropTypeOptions.includes(value), new Set([`KoliBriButtonType {${buttonTypePropTypeOptions.join(', ')}`]), value);
|
|
13883
13767
|
};
|
|
13884
13768
|
|
|
13885
|
-
const buttonVariantPropTypeOptions = [
|
|
13769
|
+
const buttonVariantPropTypeOptions = ['primary', 'secondary', 'normal', 'tertiary', 'danger', 'ghost', 'custom'];
|
|
13886
13770
|
const validateButtonVariant = (component, value) => {
|
|
13887
|
-
|
|
13888
|
-
|
|
13889
|
-
|
|
13890
|
-
(value2) => typeof value2 === "string" && buttonVariantPropTypeOptions.includes(value2),
|
|
13891
|
-
/* @__PURE__ */ new Set([`KoliBriButtonVariant {${buttonVariantPropTypeOptions.join(", ")}`]),
|
|
13892
|
-
value,
|
|
13893
|
-
{
|
|
13894
|
-
defaultValue: "normal"
|
|
13895
|
-
}
|
|
13896
|
-
);
|
|
13771
|
+
watchValidator(component, `_variant`, (value) => typeof value === 'string' && buttonVariantPropTypeOptions.includes(value), new Set([`KoliBriButtonVariant {${buttonVariantPropTypeOptions.join(', ')}`]), value, {
|
|
13772
|
+
defaultValue: 'normal',
|
|
13773
|
+
});
|
|
13897
13774
|
};
|
|
13898
13775
|
|
|
13899
13776
|
const validateChecked = (component, value) => {
|
|
13900
|
-
|
|
13777
|
+
watchBoolean(component, '_checked', value);
|
|
13901
13778
|
};
|
|
13902
13779
|
|
|
13903
13780
|
const validateCollapsible = (component, value) => {
|
|
13904
|
-
|
|
13781
|
+
watchBoolean(component, '_collapsible', value);
|
|
13905
13782
|
};
|
|
13906
13783
|
|
|
13907
13784
|
const HEX_REGEX = /^#((\d|[a-f]){8}|(\d|[a-f]){6}|(\d|[a-f]){3,4})$/i;
|
|
13908
13785
|
function isHexString(value) {
|
|
13909
|
-
|
|
13786
|
+
return HEX_REGEX.test(value);
|
|
13910
13787
|
}
|
|
13911
13788
|
function isColorObjectString(value) {
|
|
13912
|
-
|
|
13913
|
-
|
|
13914
|
-
|
|
13915
|
-
|
|
13916
|
-
|
|
13917
|
-
|
|
13918
|
-
|
|
13789
|
+
if (value.startsWith('{')) {
|
|
13790
|
+
try {
|
|
13791
|
+
const parsed = JSON.parse(value);
|
|
13792
|
+
if (isValidColorPair(parsed))
|
|
13793
|
+
return { type: 'ColorPair', value: parsed };
|
|
13794
|
+
}
|
|
13795
|
+
catch (error) {
|
|
13796
|
+
return { type: null, value: null };
|
|
13797
|
+
}
|
|
13919
13798
|
}
|
|
13920
|
-
|
|
13921
|
-
return { type: null, value: null };
|
|
13799
|
+
return { type: null, value: null };
|
|
13922
13800
|
}
|
|
13923
13801
|
function typeOfColor(value) {
|
|
13924
|
-
|
|
13925
|
-
|
|
13926
|
-
|
|
13927
|
-
|
|
13928
|
-
|
|
13929
|
-
|
|
13930
|
-
|
|
13931
|
-
|
|
13932
|
-
|
|
13933
|
-
|
|
13934
|
-
|
|
13935
|
-
|
|
13936
|
-
|
|
13802
|
+
if (value) {
|
|
13803
|
+
if (typeof value === 'string') {
|
|
13804
|
+
if (isHexString(value))
|
|
13805
|
+
return { type: 'string', valid: true, value: value };
|
|
13806
|
+
else {
|
|
13807
|
+
const colorObject = isColorObjectString(value);
|
|
13808
|
+
if (colorObject.value)
|
|
13809
|
+
return { type: colorObject.type, valid: true, value: colorObject.value };
|
|
13810
|
+
}
|
|
13811
|
+
}
|
|
13812
|
+
else {
|
|
13813
|
+
const asColorPair = value;
|
|
13814
|
+
if (isValidColorPair(asColorPair))
|
|
13815
|
+
return { type: 'ColorPair', valid: true, value: asColorPair };
|
|
13816
|
+
}
|
|
13937
13817
|
}
|
|
13938
|
-
|
|
13939
|
-
return { type: null, valid: false, value: "" };
|
|
13818
|
+
return { type: null, valid: false, value: '' };
|
|
13940
13819
|
}
|
|
13941
13820
|
function isValidColorPair(value) {
|
|
13942
|
-
|
|
13821
|
+
return !!(typeof value === 'object' &&
|
|
13822
|
+
value &&
|
|
13823
|
+
typeof value.backgroundColor === 'string' &&
|
|
13824
|
+
(typeof value.foregroundColor === 'string' ||
|
|
13825
|
+
(value.foregroundColor &&
|
|
13826
|
+
typeof value.foregroundColor.primary === 'string' &&
|
|
13827
|
+
typeof value.foregroundColor.secondary === 'string' &&
|
|
13828
|
+
typeof value.foregroundColor.neutral === 'string')));
|
|
13943
13829
|
}
|
|
13944
13830
|
function validatorFunction(value) {
|
|
13945
|
-
|
|
13946
|
-
|
|
13947
|
-
|
|
13948
|
-
|
|
13949
|
-
|
|
13950
|
-
|
|
13951
|
-
|
|
13952
|
-
|
|
13831
|
+
const valueType = typeOfColor(value);
|
|
13832
|
+
switch (valueType.type) {
|
|
13833
|
+
case null:
|
|
13834
|
+
return false;
|
|
13835
|
+
case 'string':
|
|
13836
|
+
case 'ColorPair':
|
|
13837
|
+
return valueType.valid;
|
|
13838
|
+
}
|
|
13953
13839
|
}
|
|
13954
13840
|
const validateColor = (component, value, options) => {
|
|
13955
|
-
|
|
13841
|
+
watchValidator(component, '_color', validatorFunction, new Set(['rgb in hex', 'ColorPair']), value, options);
|
|
13956
13842
|
};
|
|
13957
13843
|
const handleColorChange = (value) => {
|
|
13958
|
-
|
|
13959
|
-
|
|
13960
|
-
|
|
13961
|
-
|
|
13962
|
-
|
|
13963
|
-
|
|
13964
|
-
|
|
13965
|
-
|
|
13966
|
-
|
|
13967
|
-
|
|
13968
|
-
|
|
13969
|
-
|
|
13970
|
-
|
|
13971
|
-
|
|
13972
|
-
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
|
|
13977
|
-
|
|
13844
|
+
var _a;
|
|
13845
|
+
let colorContrast;
|
|
13846
|
+
const valueType = typeOfColor(value);
|
|
13847
|
+
switch (valueType.type) {
|
|
13848
|
+
case 'string':
|
|
13849
|
+
colorContrast = createContrastColorPair(valueType.value);
|
|
13850
|
+
break;
|
|
13851
|
+
case 'ColorPair': {
|
|
13852
|
+
const asColorPair = valueType.value;
|
|
13853
|
+
let foreground = '';
|
|
13854
|
+
if (typeof asColorPair.foregroundColor === 'string')
|
|
13855
|
+
foreground = asColorPair.foregroundColor;
|
|
13856
|
+
else if ((_a = asColorPair.foregroundColor) === null || _a === void 0 ? void 0 : _a.primary)
|
|
13857
|
+
foreground = asColorPair.foregroundColor.primary;
|
|
13858
|
+
if (!foreground || typeof foreground !== 'string')
|
|
13859
|
+
foreground = '#fff';
|
|
13860
|
+
colorContrast = createContrastColorPair({
|
|
13861
|
+
background: asColorPair.backgroundColor,
|
|
13862
|
+
foreground,
|
|
13863
|
+
});
|
|
13864
|
+
break;
|
|
13865
|
+
}
|
|
13866
|
+
case null:
|
|
13867
|
+
console.warn(`_color was empty or invalid (${JSON.stringify(value)})`);
|
|
13868
|
+
colorContrast = createContrastColorPair({
|
|
13869
|
+
background: '#000',
|
|
13870
|
+
foreground: '#000',
|
|
13871
|
+
});
|
|
13978
13872
|
}
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
|
|
13982
|
-
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
|
|
13986
|
-
if (colorContrast.contrast < 7) {
|
|
13987
|
-
a11yHint(
|
|
13988
|
-
`[KolBadge] The contrast of ${colorContrast.contrast} (\u22657, AAA) is to low, between the color pair ${colorContrast.background} and ${colorContrast.foreground}.`
|
|
13989
|
-
);
|
|
13990
|
-
}
|
|
13991
|
-
return {
|
|
13992
|
-
backgroundColor: colorContrast.background,
|
|
13993
|
-
foregroundColor: colorContrast.foreground
|
|
13994
|
-
};
|
|
13873
|
+
if (colorContrast.contrast < 7) {
|
|
13874
|
+
a11yHint(`[KolBadge] The contrast of ${colorContrast.contrast} (≥7, AAA) is to low, between the color pair ${colorContrast.background} and ${colorContrast.foreground}.`);
|
|
13875
|
+
}
|
|
13876
|
+
return {
|
|
13877
|
+
backgroundColor: colorContrast.background,
|
|
13878
|
+
foregroundColor: colorContrast.foreground,
|
|
13879
|
+
};
|
|
13995
13880
|
};
|
|
13996
13881
|
|
|
13997
13882
|
const validateCustomClass = (component, value) => {
|
|
13998
|
-
|
|
13999
|
-
|
|
14000
|
-
|
|
13883
|
+
watchString(component, '_customClass', value, {
|
|
13884
|
+
defaultValue: undefined,
|
|
13885
|
+
});
|
|
14001
13886
|
};
|
|
14002
13887
|
|
|
14003
13888
|
const validateDisabled = (component, value) => {
|
|
14004
|
-
|
|
14005
|
-
|
|
14006
|
-
|
|
14007
|
-
|
|
14008
|
-
|
|
14009
|
-
|
|
14010
|
-
|
|
14011
|
-
|
|
14012
|
-
|
|
13889
|
+
watchBoolean(component, '_disabled', value, {
|
|
13890
|
+
hooks: {
|
|
13891
|
+
afterPatch: (value) => {
|
|
13892
|
+
if (value === true) {
|
|
13893
|
+
a11yHintDisabled();
|
|
13894
|
+
}
|
|
13895
|
+
},
|
|
13896
|
+
},
|
|
13897
|
+
});
|
|
14013
13898
|
};
|
|
14014
13899
|
|
|
14015
13900
|
const validateDownload = (component, value) => {
|
|
14016
|
-
|
|
13901
|
+
watchString(component, '_download', value);
|
|
14017
13902
|
};
|
|
14018
13903
|
|
|
14019
13904
|
const validateErrorList = (component, value) => {
|
|
14020
|
-
|
|
13905
|
+
watchValidator(component, 'errorList', (value) => typeof value === 'object', new Set(['Object']), value);
|
|
14021
13906
|
};
|
|
14022
13907
|
|
|
14023
13908
|
const validateHasCloser = (component, value) => {
|
|
14024
|
-
|
|
13909
|
+
watchBoolean(component, '_hasCloser', value);
|
|
14025
13910
|
};
|
|
14026
13911
|
|
|
14027
13912
|
const validateHasCompactButton = (component, value) => {
|
|
14028
|
-
|
|
13913
|
+
watchBoolean(component, '_hasCompactButton', value);
|
|
14029
13914
|
};
|
|
14030
13915
|
|
|
14031
13916
|
const validateHasCounter = (component, value) => {
|
|
14032
|
-
|
|
13917
|
+
watchBoolean(component, '_hasCounter', value);
|
|
14033
13918
|
};
|
|
14034
13919
|
|
|
14035
13920
|
const validateHasIconsWhenExpanded = (component, value) => {
|
|
14036
|
-
|
|
13921
|
+
watchBoolean(component, '_hasIconsWhenExpanded', value);
|
|
14037
13922
|
};
|
|
14038
13923
|
|
|
14039
|
-
const headingVariantPropTypeOptions = [
|
|
13924
|
+
const headingVariantPropTypeOptions = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'strong'];
|
|
14040
13925
|
const validateHeadingVariant = (component, value) => {
|
|
14041
|
-
|
|
14042
|
-
component,
|
|
14043
|
-
`_variant`,
|
|
14044
|
-
(value2) => typeof value2 === "string" && headingVariantPropTypeOptions.includes(value2),
|
|
14045
|
-
/* @__PURE__ */ new Set([`KoliBriHeadingVariant {${headingVariantPropTypeOptions.join(", ")}`]),
|
|
14046
|
-
value
|
|
14047
|
-
);
|
|
13926
|
+
watchValidator(component, `_variant`, (value) => typeof value === 'string' && headingVariantPropTypeOptions.includes(value), new Set([`KoliBriHeadingVariant {${headingVariantPropTypeOptions.join(', ')}`]), value);
|
|
14048
13927
|
};
|
|
14049
13928
|
|
|
14050
13929
|
const validateHideError = (component, value, options) => {
|
|
14051
|
-
|
|
13930
|
+
watchBoolean(component, '_hideError', value, options);
|
|
14052
13931
|
};
|
|
14053
13932
|
|
|
14054
13933
|
const validateHideLabel = (component, value, options = {}) => {
|
|
14055
|
-
|
|
13934
|
+
watchBoolean(component, '_hideLabel', value, options);
|
|
14056
13935
|
};
|
|
14057
13936
|
|
|
14058
13937
|
const validateHref = (component, value, options = {}) => {
|
|
14059
|
-
|
|
13938
|
+
watchString(component, '_href', value, options);
|
|
14060
13939
|
};
|
|
14061
13940
|
|
|
14062
13941
|
const mapCustomIcon = (state, alignment, icon) => {
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
14068
|
-
|
|
14069
|
-
|
|
13942
|
+
if (isObject$1(icon)) {
|
|
13943
|
+
state[alignment] = icon;
|
|
13944
|
+
}
|
|
13945
|
+
else if (isString$2(icon, 1)) {
|
|
13946
|
+
state[alignment] = {
|
|
13947
|
+
icon: icon,
|
|
13948
|
+
};
|
|
13949
|
+
}
|
|
14070
13950
|
};
|
|
14071
13951
|
const mapIconProp2State = (icon) => {
|
|
14072
|
-
|
|
14073
|
-
|
|
14074
|
-
|
|
14075
|
-
|
|
14076
|
-
|
|
14077
|
-
|
|
14078
|
-
|
|
14079
|
-
|
|
14080
|
-
|
|
14081
|
-
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
13952
|
+
let state = {};
|
|
13953
|
+
if (isString$2(icon, 1)) {
|
|
13954
|
+
state = {
|
|
13955
|
+
left: {
|
|
13956
|
+
icon: icon,
|
|
13957
|
+
},
|
|
13958
|
+
};
|
|
13959
|
+
}
|
|
13960
|
+
else if (typeof icon === 'object' && icon !== null) {
|
|
13961
|
+
mapCustomIcon(state, 'top', icon.top);
|
|
13962
|
+
mapCustomIcon(state, 'right', icon.right);
|
|
13963
|
+
mapCustomIcon(state, 'bottom', icon.bottom);
|
|
13964
|
+
mapCustomIcon(state, 'left', icon.left);
|
|
13965
|
+
}
|
|
13966
|
+
return state;
|
|
14086
13967
|
};
|
|
14087
13968
|
const beforePatchIcon = (component) => {
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14091
|
-
|
|
13969
|
+
var _a, _b, _c;
|
|
13970
|
+
if ((_a = component.nextState) === null || _a === void 0 ? void 0 : _a.has('_icons')) {
|
|
13971
|
+
const icons = (_b = component.nextState) === null || _b === void 0 ? void 0 : _b.get('_icons');
|
|
13972
|
+
(_c = component.nextState) === null || _c === void 0 ? void 0 : _c.set('_icons', mapIconProp2State(icons));
|
|
13973
|
+
}
|
|
14092
13974
|
};
|
|
14093
|
-
const isIcon = (value) => typeof value ===
|
|
13975
|
+
const isIcon = (value) => typeof value === 'object' &&
|
|
13976
|
+
value !== null &&
|
|
13977
|
+
(typeof value.style === 'undefined' || isStyle(value.style)) &&
|
|
13978
|
+
(typeof value.label === 'undefined' || isString$2(value.label)) &&
|
|
13979
|
+
isString$2(value.icon, 1);
|
|
14094
13980
|
const validateIcons = (component, value, options = {}) => {
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
|
|
14098
|
-
|
|
14099
|
-
}
|
|
14100
|
-
watchValidator(
|
|
14101
|
-
component,
|
|
14102
|
-
"_icons",
|
|
14103
|
-
(value2) => {
|
|
14104
|
-
const valueIsEmptyObject = typeof value2 === "object" && value2 !== null && Object.keys(value2).length === 0;
|
|
14105
|
-
return value2 === null || valueIsEmptyObject || isString$2(value2, 1) || typeof value2 === "object" && value2 !== null && (isString$2(value2.left, 1) || isIcon(value2.left) || isString$2(value2.right, 1) || isIcon(value2.right) || isString$2(value2.top, 1) || isIcon(value2.top) || isString$2(value2.bottom, 1) || isIcon(value2.bottom));
|
|
14106
|
-
},
|
|
14107
|
-
/* @__PURE__ */ new Set(["KoliBriIcon"]),
|
|
14108
|
-
value,
|
|
14109
|
-
{
|
|
14110
|
-
...options,
|
|
14111
|
-
defaultValue: {},
|
|
14112
|
-
hooks: {
|
|
14113
|
-
afterPatch: options.hooks?.afterPatch,
|
|
14114
|
-
beforePatch: (nextValue, nextState, component2, key) => {
|
|
14115
|
-
if (typeof options.hooks?.beforePatch === "function") {
|
|
14116
|
-
options.hooks?.beforePatch(nextValue, nextState, component2, key);
|
|
14117
|
-
}
|
|
14118
|
-
beforePatchIcon(component2);
|
|
14119
|
-
}
|
|
13981
|
+
objectObjectHandler(value, () => {
|
|
13982
|
+
var _a;
|
|
13983
|
+
try {
|
|
13984
|
+
value = parseJson(value);
|
|
14120
13985
|
}
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
13986
|
+
catch (e) {
|
|
13987
|
+
}
|
|
13988
|
+
watchValidator(component, '_icons', (value) => {
|
|
13989
|
+
const valueIsEmptyObject = typeof value === 'object' && value !== null && Object.keys(value).length === 0;
|
|
13990
|
+
return (value === null ||
|
|
13991
|
+
valueIsEmptyObject ||
|
|
13992
|
+
isString$2(value, 1) ||
|
|
13993
|
+
(typeof value === 'object' &&
|
|
13994
|
+
value !== null &&
|
|
13995
|
+
(isString$2(value.left, 1) ||
|
|
13996
|
+
isIcon(value.left) ||
|
|
13997
|
+
isString$2(value.right, 1) ||
|
|
13998
|
+
isIcon(value.right) ||
|
|
13999
|
+
isString$2(value.top, 1) ||
|
|
14000
|
+
isIcon(value.top) ||
|
|
14001
|
+
isString$2(value.bottom, 1) ||
|
|
14002
|
+
isIcon(value.bottom))));
|
|
14003
|
+
}, new Set(['KoliBriIcon']), value, Object.assign(Object.assign({}, options), { defaultValue: {}, hooks: {
|
|
14004
|
+
afterPatch: (_a = options.hooks) === null || _a === void 0 ? void 0 : _a.afterPatch,
|
|
14005
|
+
beforePatch: (nextValue, nextState, component, key) => {
|
|
14006
|
+
var _a, _b;
|
|
14007
|
+
if (typeof ((_a = options.hooks) === null || _a === void 0 ? void 0 : _a.beforePatch) === 'function') {
|
|
14008
|
+
(_b = options.hooks) === null || _b === void 0 ? void 0 : _b.beforePatch(nextValue, nextState, component, key);
|
|
14009
|
+
}
|
|
14010
|
+
beforePatchIcon(component);
|
|
14011
|
+
},
|
|
14012
|
+
} }));
|
|
14013
|
+
});
|
|
14124
14014
|
};
|
|
14125
14015
|
|
|
14126
14016
|
const validateId = (component, value) => {
|
|
14127
|
-
|
|
14017
|
+
watchString(component, '_id', value);
|
|
14128
14018
|
};
|
|
14129
14019
|
|
|
14130
14020
|
const validateImageSource = (component, value, options) => {
|
|
14131
|
-
|
|
14021
|
+
watchString(component, '_src', value, options);
|
|
14132
14022
|
};
|
|
14133
14023
|
|
|
14134
14024
|
const validateIndeterminate = (component, value) => {
|
|
14135
|
-
|
|
14025
|
+
watchBoolean(component, '_indeterminate', value);
|
|
14136
14026
|
};
|
|
14137
14027
|
|
|
14138
14028
|
const headingLevelOptions = [0, 1, 2, 3, 4, 5, 6];
|
|
14139
14029
|
const READABLE_CHARS = /[a-zA-Z0-9äöüÄÖÜß]/g;
|
|
14140
14030
|
const ONLY_NUMBERS = /^\d+$/;
|
|
14141
14031
|
function countReadableChars(str) {
|
|
14142
|
-
|
|
14032
|
+
var _a;
|
|
14033
|
+
return typeof str === 'string' ? ((_a = str.match(READABLE_CHARS)) === null || _a === void 0 ? void 0 : _a.length) || 0 : 0;
|
|
14143
14034
|
}
|
|
14144
14035
|
function hasEnoughReadableChars(str, min = 1) {
|
|
14145
|
-
|
|
14036
|
+
return countReadableChars(str) >= min;
|
|
14146
14037
|
}
|
|
14147
14038
|
function containsOnlyNumbers(str) {
|
|
14148
|
-
|
|
14039
|
+
return ONLY_NUMBERS.test(str);
|
|
14149
14040
|
}
|
|
14150
14041
|
function getValidationOptions(options) {
|
|
14151
|
-
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
};
|
|
14042
|
+
var _a;
|
|
14043
|
+
return Object.assign(Object.assign({}, options), { hooks: {
|
|
14044
|
+
afterPatch: (value, state, component, key) => {
|
|
14045
|
+
var _a, _b;
|
|
14046
|
+
if (typeof ((_a = options.hooks) === null || _a === void 0 ? void 0 : _a.afterPatch) === 'function') {
|
|
14047
|
+
(_b = options.hooks) === null || _b === void 0 ? void 0 : _b.afterPatch(value, state, component, key);
|
|
14048
|
+
}
|
|
14049
|
+
if (typeof value === 'string' && hasEnoughReadableChars(value, 3) === false && containsOnlyNumbers(value) === false) {
|
|
14050
|
+
a11yHint(`The heading or label ("${value}") is not accessible. A label should consist of at least three readable characters.`);
|
|
14051
|
+
}
|
|
14052
|
+
if (typeof value === 'string' && value.length > 80) {
|
|
14053
|
+
uiUxHint(`A heading or label should not be longer than 80 characters.`);
|
|
14054
|
+
}
|
|
14055
|
+
},
|
|
14056
|
+
beforePatch: (_a = options.hooks) === null || _a === void 0 ? void 0 : _a.beforePatch,
|
|
14057
|
+
} });
|
|
14168
14058
|
}
|
|
14169
|
-
const LABEL_VALUES =
|
|
14059
|
+
const LABEL_VALUES = new Set(['string']);
|
|
14170
14060
|
const validateLabel = (component, value, options = {}) => {
|
|
14171
|
-
|
|
14061
|
+
watchValidator(component, '_label', (value) => typeof value === 'string', LABEL_VALUES, value, getValidationOptions(options));
|
|
14172
14062
|
};
|
|
14173
14063
|
const validateLabelWithExpertSlot = validateLabel;
|
|
14174
14064
|
|
|
14175
14065
|
const validateLinkCallbacks = (component, value) => {
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
_on: value
|
|
14180
|
-
};
|
|
14181
|
-
}
|
|
14066
|
+
if (typeof value === 'object' && typeof (value === null || value === void 0 ? void 0 : value.onClick) === 'function') {
|
|
14067
|
+
component.state = Object.assign(Object.assign({}, component.state), { _on: value });
|
|
14068
|
+
}
|
|
14182
14069
|
};
|
|
14183
14070
|
|
|
14184
14071
|
const validateLinkTarget = (component, value) => {
|
|
14185
|
-
|
|
14072
|
+
watchString(component, '_target', value);
|
|
14186
14073
|
};
|
|
14187
14074
|
|
|
14188
|
-
const loadingOptions = [
|
|
14075
|
+
const loadingOptions = ['eager', 'lazy'];
|
|
14189
14076
|
function validateLoading(component, value) {
|
|
14190
|
-
|
|
14077
|
+
watchValidator(component, '_loading', (value) => typeof value === 'string' && loadingOptions.includes(value), new Set(loadingOptions), value);
|
|
14191
14078
|
}
|
|
14192
14079
|
|
|
14193
14080
|
const validateMax = (component, value, options) => {
|
|
14194
|
-
|
|
14081
|
+
watchNumber(component, '_max', value, options);
|
|
14195
14082
|
};
|
|
14196
14083
|
|
|
14197
14084
|
const validateMsg = (component, value) => {
|
|
14198
|
-
|
|
14085
|
+
watchValidator(component, `_msg`, (value) => typeof value === 'object', new Set(['Object']), value);
|
|
14199
14086
|
};
|
|
14200
14087
|
|
|
14201
14088
|
const validateMultiple = (component, value) => {
|
|
14202
|
-
|
|
14089
|
+
watchBoolean(component, '_multiple', value);
|
|
14203
14090
|
};
|
|
14204
14091
|
|
|
14205
14092
|
const validateName = (component, value, options) => {
|
|
14206
|
-
|
|
14093
|
+
watchString(component, '_name', value, options);
|
|
14207
14094
|
};
|
|
14208
14095
|
|
|
14209
14096
|
const validateOpen = (component, value, options) => {
|
|
14210
|
-
|
|
14097
|
+
watchBoolean(component, '_open', value, options);
|
|
14211
14098
|
};
|
|
14212
14099
|
|
|
14213
14100
|
const validateOptions = (component, value, options = {}) => {
|
|
14214
|
-
|
|
14215
|
-
component,
|
|
14216
|
-
"_options",
|
|
14217
|
-
(item) => typeof item === "object" && item !== null && typeof item.label === "string" && item.label.length > 0,
|
|
14218
|
-
value,
|
|
14219
|
-
void 0,
|
|
14220
|
-
options
|
|
14221
|
-
);
|
|
14101
|
+
watchJsonArrayString(component, '_options', (item) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0, value, undefined, options);
|
|
14222
14102
|
};
|
|
14223
14103
|
const validateOptionsWithOptgroup = (component, value, options = {}) => {
|
|
14224
|
-
|
|
14104
|
+
watchJsonArrayString(component, '_options', validateInputSelectOptions, value, undefined, options);
|
|
14225
14105
|
};
|
|
14226
14106
|
|
|
14227
|
-
const paginationPositionPropTypeOptions = [
|
|
14107
|
+
const paginationPositionPropTypeOptions = ['top', 'bottom', 'both'];
|
|
14228
14108
|
const validatePaginationPosition = (component, value) => {
|
|
14229
|
-
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
(value2) => typeof value2 === "string" && paginationPositionPropTypeOptions.includes(value2),
|
|
14233
|
-
/* @__PURE__ */ new Set([`PaginationPositionPropType {${paginationPositionPropTypeOptions.join(", ")}`]),
|
|
14234
|
-
value,
|
|
14235
|
-
{
|
|
14236
|
-
defaultValue: "bottom"
|
|
14237
|
-
}
|
|
14238
|
-
);
|
|
14109
|
+
watchValidator(component, `_paginationPosition`, (value) => typeof value === 'string' && paginationPositionPropTypeOptions.includes(value), new Set([`PaginationPositionPropType {${paginationPositionPropTypeOptions.join(', ')}`]), value, {
|
|
14110
|
+
defaultValue: 'bottom',
|
|
14111
|
+
});
|
|
14239
14112
|
};
|
|
14240
14113
|
|
|
14241
14114
|
const validateReadOnly = (component, value) => {
|
|
14242
|
-
|
|
14115
|
+
watchBoolean(component, '_readOnly', value);
|
|
14243
14116
|
};
|
|
14244
14117
|
|
|
14245
14118
|
const validateRequired = (component, value) => {
|
|
14246
|
-
|
|
14119
|
+
watchBoolean(component, '_required', value);
|
|
14247
14120
|
};
|
|
14248
14121
|
|
|
14249
14122
|
const validateRows = (component, value) => {
|
|
14250
|
-
|
|
14123
|
+
watchNumber(component, `_rows`, value, { min: 1 });
|
|
14251
14124
|
};
|
|
14252
14125
|
|
|
14253
14126
|
const validateShow = (component, value, hooks) => {
|
|
14254
|
-
|
|
14127
|
+
watchBoolean(component, '_show', value, hooks);
|
|
14255
14128
|
};
|
|
14256
14129
|
|
|
14257
14130
|
const validateSuggestions = (component, value) => {
|
|
14258
|
-
|
|
14259
|
-
|
|
14260
|
-
|
|
14261
|
-
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14265
|
-
|
|
14266
|
-
|
|
14131
|
+
watchJsonArrayString(component, '_suggestions', (item) => typeof item === 'string' || typeof item === 'number', value, undefined, {
|
|
14132
|
+
hooks: {
|
|
14133
|
+
afterPatch: (value) => {
|
|
14134
|
+
if (Array.isArray(value) && value.length) {
|
|
14135
|
+
a11yHint('Property suggestions: Options have accessibility issues in how browsers implemented them and should not be used for now.');
|
|
14136
|
+
}
|
|
14137
|
+
},
|
|
14138
|
+
},
|
|
14139
|
+
});
|
|
14267
14140
|
};
|
|
14268
14141
|
|
|
14269
14142
|
const validateTableCallbacks = (component, value) => {
|
|
14270
|
-
|
|
14143
|
+
watchValidator(component, `_on`, (value) => typeof value === 'object' && value !== null, new Set(['TableCallbacksPropType {Events.onSort}']), value);
|
|
14271
14144
|
};
|
|
14272
14145
|
|
|
14273
14146
|
const validateTableData = (component, value, setStateHooks) => {
|
|
14274
|
-
|
|
14275
|
-
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14282
|
-
|
|
14283
|
-
|
|
14284
|
-
|
|
14285
|
-
|
|
14147
|
+
emptyStringByArrayHandler(value, () => {
|
|
14148
|
+
objectObjectHandler(value, () => {
|
|
14149
|
+
if (typeof value === 'undefined') {
|
|
14150
|
+
value = [];
|
|
14151
|
+
}
|
|
14152
|
+
try {
|
|
14153
|
+
value = parseJson(value);
|
|
14154
|
+
}
|
|
14155
|
+
catch (e) {
|
|
14156
|
+
}
|
|
14157
|
+
if (Array.isArray(value) && value.every((data) => typeof data === 'object' && data !== null)) {
|
|
14158
|
+
setState(component, '_data', value, setStateHooks);
|
|
14159
|
+
}
|
|
14160
|
+
});
|
|
14286
14161
|
});
|
|
14287
|
-
});
|
|
14288
14162
|
};
|
|
14289
14163
|
|
|
14290
14164
|
const validateTableDataFoot = (component, value, setStateHooks) => {
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14297
|
-
|
|
14298
|
-
|
|
14299
|
-
|
|
14300
|
-
|
|
14301
|
-
|
|
14302
|
-
|
|
14165
|
+
emptyStringByArrayHandler(value, () => {
|
|
14166
|
+
objectObjectHandler(value, () => {
|
|
14167
|
+
if (typeof value === 'undefined') {
|
|
14168
|
+
value = [];
|
|
14169
|
+
}
|
|
14170
|
+
try {
|
|
14171
|
+
value = parseJson(value);
|
|
14172
|
+
}
|
|
14173
|
+
catch (e) {
|
|
14174
|
+
}
|
|
14175
|
+
if (Array.isArray(value) && value.every((data) => typeof data === 'object' && data !== null)) {
|
|
14176
|
+
setState(component, '_dataFoot', value, setStateHooks);
|
|
14177
|
+
}
|
|
14178
|
+
});
|
|
14303
14179
|
});
|
|
14304
|
-
});
|
|
14305
14180
|
};
|
|
14306
14181
|
|
|
14307
14182
|
const validateTableHeaderCells = (component, value) => {
|
|
14308
|
-
|
|
14309
|
-
|
|
14310
|
-
|
|
14311
|
-
|
|
14312
|
-
|
|
14313
|
-
|
|
14314
|
-
|
|
14183
|
+
emptyStringByArrayHandler(value, () => {
|
|
14184
|
+
objectObjectHandler(value, () => {
|
|
14185
|
+
try {
|
|
14186
|
+
value = parseJson(value);
|
|
14187
|
+
}
|
|
14188
|
+
catch (e) {
|
|
14189
|
+
}
|
|
14190
|
+
watchValidator(component, '_headerCells', (value) => typeof value === 'object' && value !== null, new Set(['TableHeaderCellsPropType']), value);
|
|
14191
|
+
});
|
|
14315
14192
|
});
|
|
14316
|
-
});
|
|
14317
14193
|
};
|
|
14318
14194
|
|
|
14319
14195
|
const validateTooltipAlign = (component, value) => {
|
|
14320
|
-
|
|
14196
|
+
validateAlignment(component, '_tooltipAlign', value);
|
|
14321
14197
|
};
|
|
14322
14198
|
|
|
14323
14199
|
const validateTouched = (component, value) => {
|
|
14324
|
-
|
|
14200
|
+
watchBoolean(component, '_touched', value);
|
|
14325
14201
|
};
|
|
14326
14202
|
|
|
14327
|
-
const spinVariantPropTypeOptions = [
|
|
14203
|
+
const spinVariantPropTypeOptions = ['cycle', 'dot', 'none'];
|
|
14328
14204
|
const validateSpinVariant = (component, value) => {
|
|
14329
|
-
|
|
14330
|
-
component,
|
|
14331
|
-
"_variant",
|
|
14332
|
-
(value2) => typeof value2 === "string" && spinVariantPropTypeOptions.includes(value2),
|
|
14333
|
-
new Set(spinVariantPropTypeOptions),
|
|
14334
|
-
value
|
|
14335
|
-
);
|
|
14205
|
+
watchValidator(component, '_variant', (value) => typeof value === 'string' && spinVariantPropTypeOptions.includes(value), new Set(spinVariantPropTypeOptions), value);
|
|
14336
14206
|
};
|
|
14337
14207
|
|
|
14338
|
-
const inputDateTypeOptions = [
|
|
14339
|
-
|
|
14340
|
-
const inputTextTypeOptions = ["text", "search", "url", "tel"];
|
|
14208
|
+
const inputDateTypeOptions = ['date', 'datetime-local', 'month', 'time', 'week'];
|
|
14341
14209
|
|
|
14342
|
-
const
|
|
14210
|
+
const inputTextTypeOptions = ['text', 'search', 'url', 'tel'];
|
|
14343
14211
|
|
|
14344
|
-
const
|
|
14212
|
+
const inputTypeOnOffOptions = ['on', 'off'];
|
|
14345
14213
|
|
|
14346
|
-
|
|
14347
|
-
KoliBriProgressVariantEnum2["bar"] = "bar";
|
|
14348
|
-
KoliBriProgressVariantEnum2["cycle"] = "cycle";
|
|
14349
|
-
return KoliBriProgressVariantEnum2;
|
|
14350
|
-
})(KoliBriProgressVariantEnum || {});
|
|
14214
|
+
const orientationOptions = ['horizontal', 'vertical'];
|
|
14351
14215
|
|
|
14352
|
-
|
|
14216
|
+
var KoliBriProgressVariantEnum;
|
|
14217
|
+
(function (KoliBriProgressVariantEnum) {
|
|
14218
|
+
KoliBriProgressVariantEnum["bar"] = "bar";
|
|
14219
|
+
KoliBriProgressVariantEnum["cycle"] = "cycle";
|
|
14220
|
+
})(KoliBriProgressVariantEnum || (KoliBriProgressVariantEnum = {}));
|
|
14353
14221
|
|
|
14354
14222
|
let nonce = () => Math.floor(Math.random() * 16777215).toString(16);
|
|
14355
14223
|
if (processEnv === 'test') {
|
|
@@ -14394,7 +14262,7 @@ class KolAbbr {
|
|
|
14394
14262
|
};
|
|
14395
14263
|
}
|
|
14396
14264
|
render() {
|
|
14397
|
-
return (hAsync(Host, { key: '
|
|
14265
|
+
return (hAsync(Host, { key: '598d706f074db11649d068894821a214d3373d11', class: "kol-abbr" }, hAsync("abbr", { key: 'cea033577a07ea9cbc48cf32f2afa798b2f70c1b', "aria-labelledby": this.nonce, role: "definition", tabindex: "0", title: this.state._label }, hAsync("span", { key: 'f28a0dacfb9e1d5807f763e03401e1b71c0414c3', title: "" }, hAsync("slot", { key: 'c72ee140bfc1c43d781a5309c07f9a47689d6f4e' }))), hAsync(KolTooltipWcTag, { key: '2743bb91c1b770375bda8e19668e7ad698b10baa', _align: this.state._tooltipAlign, _id: this.nonce, _label: this.state._label })));
|
|
14398
14266
|
}
|
|
14399
14267
|
validateLabel(value) {
|
|
14400
14268
|
validateLabel(this, value, {
|
|
@@ -14474,11 +14342,11 @@ class KolAccordion {
|
|
|
14474
14342
|
};
|
|
14475
14343
|
}
|
|
14476
14344
|
render() {
|
|
14477
|
-
return (hAsync(Host, { key: '
|
|
14345
|
+
return (hAsync(Host, { key: 'f1672f2cf8b9aa85b1f63ab68d00300b74638dd8', class: "kol-accordion" }, hAsync("div", { key: 'e80bb532a6f148e9608b9d5b4eca382cf8c01e8d', class: {
|
|
14478
14346
|
accordion: true,
|
|
14479
14347
|
disabled: this.state._disabled === true,
|
|
14480
14348
|
open: this.state._open === true,
|
|
14481
|
-
} }, hAsync(KolHeadingWcTag, { key: '
|
|
14349
|
+
} }, hAsync(KolHeadingWcTag, { key: 'e221fc0ccd86504a3e491a8e32c55da5fa76a365', _label: "", _level: this.state._level, class: "accordion-heading" }, hAsync(KolButtonWcTag, { key: 'f65af86aab71ff029bba8108495477d7be05c2f3', class: "accordion-button", ref: this.catchRef, slot: "expert", _ariaControls: this.nonce, _ariaExpanded: this.state._open, _disabled: this.state._disabled, _icons: this.state._open ? 'codicon codicon-remove' : 'codicon codicon-add', _label: this.state._label, _on: { onClick: this.onClick } })), hAsync("div", { key: '5435d015a21707724c7180dbb96e7a0af30f9d42', class: "wrapper" }, hAsync("div", { key: '5a9958a91c49d8b807627f7029ad975e52c6e1ea', class: "animation-wrapper" }, hAsync("div", { key: '367a024dca25373063df9ec0e679161ad26bffb8', "aria-hidden": this.state._open === false ? 'true' : undefined, class: "content", id: this.nonce }, hAsync("slot", { key: 'dfbbf47f20297d5f5052d7df8f74bd659ce054fd' })))))));
|
|
14482
14350
|
}
|
|
14483
14351
|
validateDisabled(value) {
|
|
14484
14352
|
validateDisabled(this, value);
|
|
@@ -14552,7 +14420,7 @@ class KolAlert {
|
|
|
14552
14420
|
};
|
|
14553
14421
|
}
|
|
14554
14422
|
render() {
|
|
14555
|
-
return (hAsync(Host, { key: '
|
|
14423
|
+
return (hAsync(Host, { key: '4f87a50275ed8a213086458ce239ab24148b4e95', class: "kol-alert" }, hAsync(KolAlertWcTag, { key: '97764b041f739deb6fda2f01d31993131de5e6ab', _alert: this._alert, _hasCloser: this._hasCloser, _label: this._label, _level: this._level, _on: this._on, _type: this._type, _variant: this._variant }, hAsync("slot", { key: '3108fc83dd474231a55d3ffaf4bb8fae2ac7719d' }))));
|
|
14556
14424
|
}
|
|
14557
14425
|
static get style() { return {
|
|
14558
14426
|
default: KolAlertDefaultStyle0
|
|
@@ -14788,17 +14656,17 @@ class KolAlertWc {
|
|
|
14788
14656
|
this.validateAlert(false);
|
|
14789
14657
|
}, 10000);
|
|
14790
14658
|
}
|
|
14791
|
-
return (hAsync(Host, { key: '
|
|
14659
|
+
return (hAsync(Host, { key: 'ecb2cd45b14f92cc1c337d2b81382a8cc820e869', class: {
|
|
14792
14660
|
'kol-alert-wc': true,
|
|
14793
14661
|
alert: true,
|
|
14794
14662
|
[this.state._type]: true,
|
|
14795
14663
|
[this.state._variant]: true,
|
|
14796
14664
|
hasCloser: !!this.state._hasCloser,
|
|
14797
|
-
}, role: this.state._alert ? 'alert' : undefined }, hAsync("div", { key: '
|
|
14665
|
+
}, role: this.state._alert ? 'alert' : undefined }, hAsync("div", { key: 'b190de9f62c33d970daabc1b5638132da33c936e', class: "heading" }, hAsync(AlertIcon, { key: 'e1da8b194a13ec6f9270efc2234caadcee77e827', label: this.state._label, type: this.state._type }), hAsync("div", { key: '7ffd000cfbe218c582791e8646ff5caf9bad5b25', class: "heading-content" }, typeof this.state._label === 'string' && ((_a = this.state._label) === null || _a === void 0 ? void 0 : _a.length) > 0 && (hAsync(KolHeadingWcTag, { key: 'f9e7c598243a4868b80b248fdf4dfdeed5d24a2b', _label: this.state._label, _level: this.state._level })), this.state._variant === 'msg' && (hAsync("div", { key: 'b5b70319b6c7747872e9d8072a1fe7565938f7c1', class: "content" }, hAsync("slot", { key: 'b75edf24762d861147d5ee5fa0701b4c5a30eed1' })))), this.state._hasCloser && (hAsync(KolButtonWcTag, { key: 'a21b86376be7c8c5d8b03be1bf9635525e0ab3b7', class: "close", _hideLabel: true, _icons: {
|
|
14798
14666
|
left: {
|
|
14799
14667
|
icon: 'codicon codicon-close',
|
|
14800
14668
|
},
|
|
14801
|
-
}, _label: translate('kol-close'), _on: this.on, _tooltipAlign: "left" }))), this.state._variant === 'card' && (hAsync("div", { key: '
|
|
14669
|
+
}, _label: translate('kol-close'), _on: this.on, _tooltipAlign: "left" }))), this.state._variant === 'card' && (hAsync("div", { key: '222dfcfd8c2a42d88045b744d7fb98dea05be855', class: "content" }, hAsync("slot", { key: '48fb55900500e45c7f9670e065a26de7189f771f' })))));
|
|
14802
14670
|
}
|
|
14803
14671
|
validateAlert(value) {
|
|
14804
14672
|
watchBoolean(this, '_alert', value);
|
|
@@ -14872,7 +14740,7 @@ class KolAvatar {
|
|
|
14872
14740
|
this._label = undefined;
|
|
14873
14741
|
}
|
|
14874
14742
|
render() {
|
|
14875
|
-
return (hAsync(Host, { key: '
|
|
14743
|
+
return (hAsync(Host, { key: '27dcef5bc7bcb3d600f33e1776e8c1e913ede9d8', class: "kol-avatar" }, hAsync(KolAvatarWcTag, { key: 'f8c1eb9c59ef3bbcbe704834ce4325284f8e6e8c', _src: this._src, _label: this._label })));
|
|
14876
14744
|
}
|
|
14877
14745
|
static get style() { return {
|
|
14878
14746
|
default: KolAvatarDefaultStyle0
|
|
@@ -14917,7 +14785,7 @@ class KolAvatarWc {
|
|
|
14917
14785
|
};
|
|
14918
14786
|
}
|
|
14919
14787
|
render() {
|
|
14920
|
-
return (hAsync(Host, { key: '
|
|
14788
|
+
return (hAsync(Host, { key: '672b71c600e54214bbaf86210fe439af3f187c83', class: "kol-avatar-wc" }, hAsync("div", { key: '8631bb174ac54c1677149d12979f6837dddd692d', "aria-label": translate('kol-avatar-alt', { placeholders: { name: this.state._label } }), class: "container", role: "img" }, this.state._src ? (hAsync("img", { alt: "", "aria-hidden": "true", class: "image", src: this.state._src })) : (hAsync("span", { "aria-hidden": "true", class: "initials" }, formatLabelAsInitials(this.state._label.trim()))))));
|
|
14921
14789
|
}
|
|
14922
14790
|
validateSrc(value) {
|
|
14923
14791
|
validateImageSource(this, value);
|
|
@@ -14980,12 +14848,12 @@ class KolBadge {
|
|
|
14980
14848
|
}
|
|
14981
14849
|
render() {
|
|
14982
14850
|
const hasSmartButton = typeof this.state._smartButton === 'object' && this.state._smartButton !== null;
|
|
14983
|
-
return (hAsync(Host, { key: '
|
|
14851
|
+
return (hAsync(Host, { key: '0b334746c26463bbc697f08077e165e56b34a97f', class: "kol-badge" }, hAsync("span", { key: '83210f467b224cb691d844a0311f4a31a1ad6e79', class: {
|
|
14984
14852
|
'smart-button': typeof this.state._smartButton === 'object' && this.state._smartButton !== null,
|
|
14985
14853
|
}, style: {
|
|
14986
14854
|
backgroundColor: this.bgColorStr,
|
|
14987
14855
|
color: this.colorStr,
|
|
14988
|
-
} }, hAsync(KolSpanWcTag, { key: '
|
|
14856
|
+
} }, hAsync(KolSpanWcTag, { key: 'd5a3248d67baa494d9671e0da7de918511af084b', id: hasSmartButton ? this.id : undefined, _allowMarkdown: true, _icons: this._icons, _label: this._label }), hasSmartButton && this.renderSmartButton(this.state._smartButton))));
|
|
14989
14857
|
}
|
|
14990
14858
|
validateColor(value) {
|
|
14991
14859
|
validateColor(this, value, {
|
|
@@ -15068,7 +14936,7 @@ class KolBreadcrumb {
|
|
|
15068
14936
|
};
|
|
15069
14937
|
}
|
|
15070
14938
|
render() {
|
|
15071
|
-
return (hAsync(Host, { key: '
|
|
14939
|
+
return (hAsync(Host, { key: '1cfa36fa9a381d7b470854ec4a550b54817e37d6', class: "kol-breadcrumb" }, hAsync("nav", { key: 'd913f0b8853e65302801b62abb9ee1a7911ba264', "aria-label": this.state._label }, hAsync("ul", { key: '9719d99bcfedb925e819b0abf14977692fdabc76' }, this.state._links.length === 0 && (hAsync("li", { key: '1681efdfcdb0eb6d31fe0baf14efa89208ef04e9' }, hAsync(KolIconTag, { key: '21f1969a164aaa85d48a8e985e2e788be10a5135', _label: "", _icons: "codicon codicon-home" }), "\u2026")), this.state._links.map(this.renderLink)))));
|
|
15072
14940
|
}
|
|
15073
14941
|
validateLabel(value, _oldValue, initial = false) {
|
|
15074
14942
|
if (!initial) {
|
|
@@ -15144,11 +15012,11 @@ class KolButton {
|
|
|
15144
15012
|
return this._value;
|
|
15145
15013
|
}
|
|
15146
15014
|
render() {
|
|
15147
|
-
return (hAsync(Host, { key: '
|
|
15015
|
+
return (hAsync(Host, { key: 'f25b58d924abdc5215b2ec354a57427bed43b001', class: "kol-button" }, hAsync(KolButtonWcTag, { key: 'e9afcf44b454f0a2c22bc1346fe583f697621efb', ref: this.catchRef, class: {
|
|
15148
15016
|
button: true,
|
|
15149
15017
|
[this._variant]: this._variant !== 'custom',
|
|
15150
15018
|
[this._customClass]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,
|
|
15151
|
-
}, _accessKey: this._accessKey, _ariaControls: this._ariaControls, _ariaExpanded: this._ariaExpanded, _ariaSelected: this._ariaSelected, _customClass: this._customClass, _disabled: this._disabled, _hideLabel: this._hideLabel, _icons: this._icons, _id: this._id, _label: this._label, _name: this._name, _on: this._on, _role: this._role, _syncValueBySelector: this._syncValueBySelector, _tabIndex: this._tabIndex, _tooltipAlign: this._tooltipAlign, _type: this._type, _value: this._value, _variant: this._variant }, hAsync("slot", { key: '
|
|
15019
|
+
}, _accessKey: this._accessKey, _ariaControls: this._ariaControls, _ariaExpanded: this._ariaExpanded, _ariaSelected: this._ariaSelected, _customClass: this._customClass, _disabled: this._disabled, _hideLabel: this._hideLabel, _icons: this._icons, _id: this._id, _label: this._label, _name: this._name, _on: this._on, _role: this._role, _syncValueBySelector: this._syncValueBySelector, _tabIndex: this._tabIndex, _tooltipAlign: this._tooltipAlign, _type: this._type, _value: this._value, _variant: this._variant }, hAsync("slot", { key: '5b515b5587a2c125450f6b11952ab776bbc41a62', name: "expert", slot: "expert" }))));
|
|
15152
15020
|
}
|
|
15153
15021
|
get host() { return getElement(this); }
|
|
15154
15022
|
static get style() { return {
|
|
@@ -15193,7 +15061,7 @@ class KolButtonGroup {
|
|
|
15193
15061
|
registerInstance(this, hostRef);
|
|
15194
15062
|
}
|
|
15195
15063
|
render() {
|
|
15196
|
-
return (hAsync(Host, { key: '
|
|
15064
|
+
return (hAsync(Host, { key: 'e53bb9644f55447a8d34607dcf23cd22afba7cc3', class: "kol-button-group" }, hAsync(KolButtonGroupWcTag, { key: 'b4ddb170e6b597a461a4106d2903ecedc9741e6d' }, hAsync("slot", { key: 'c0297ef635d4a7b87e8c4ab5f2a9e5235eb059ca' }))));
|
|
15197
15065
|
}
|
|
15198
15066
|
static get style() { return {
|
|
15199
15067
|
default: KolButtonGroupDefaultStyle0
|
|
@@ -15214,7 +15082,7 @@ class KolButtonGroupWc {
|
|
|
15214
15082
|
this.state = {};
|
|
15215
15083
|
}
|
|
15216
15084
|
render() {
|
|
15217
|
-
return (hAsync(Host, { key: '
|
|
15085
|
+
return (hAsync(Host, { key: 'd70d07aee8bf780d21f93ad48d5549e65e889f02', class: "kol-button-group-wc" }, hAsync("slot", { key: '3dfb84fee69b23211aab06b29d28690cdebe5ffc' })));
|
|
15218
15086
|
}
|
|
15219
15087
|
static get cmpMeta() { return {
|
|
15220
15088
|
"$flags$": 4,
|
|
@@ -15259,7 +15127,7 @@ class KolButtonLink {
|
|
|
15259
15127
|
return this._value;
|
|
15260
15128
|
}
|
|
15261
15129
|
render() {
|
|
15262
|
-
return (hAsync(Host, { key: '
|
|
15130
|
+
return (hAsync(Host, { key: 'bcca14709dca36d36884f1bda80d249ef151cf03', class: "kol-button-link" }, hAsync(KolButtonWcTag, { key: '1601a8be9c9c8c85cb776f95aa3981ccc388d978', ref: this.catchRef, _accessKey: this._accessKey, _ariaControls: this._ariaControls, _ariaExpanded: this._ariaExpanded, _ariaSelected: this._ariaSelected, _disabled: this._disabled, _icons: this._icons, _hideLabel: this._hideLabel, _id: this._id, _label: this._label, _name: this._name, _on: this._on, _role: "link", _syncValueBySelector: this._syncValueBySelector, _tabIndex: this._tabIndex, _tooltipAlign: this._tooltipAlign, _type: this._type, _value: this._value }, hAsync("slot", { key: 'dd476ba7cf6a6d3b08553cc7490ee51d4f08fff0', name: "expert", slot: "expert" }))));
|
|
15263
15131
|
}
|
|
15264
15132
|
get host() { return getElement(this); }
|
|
15265
15133
|
static get style() { return {
|
|
@@ -15554,13 +15422,13 @@ class AssociatedInputController {
|
|
|
15554
15422
|
class KolButtonWc {
|
|
15555
15423
|
render() {
|
|
15556
15424
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
15557
|
-
return (hAsync(Host, { key: '
|
|
15425
|
+
return (hAsync(Host, { key: 'c0d16e55ccda6586451460ed73035afc5094a20c', class: "kol-button-wc" }, hAsync("button", Object.assign({ key: '6ee3c6aa4c7eb2870b69369ae303b344f9243615', ref: this.catchRef, accessKey: this.state._accessKey || undefined, "aria-controls": this.state._ariaControls, "aria-expanded": mapBoolean2String(this.state._ariaExpanded), "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, "aria-selected": mapStringOrBoolean2String(this.state._ariaSelected), class: {
|
|
15558
15426
|
button: true,
|
|
15559
15427
|
disabled: this.state._disabled === true,
|
|
15560
15428
|
[this.state._variant]: this.state._variant !== 'custom',
|
|
15561
15429
|
[this.state._customClass]: this.state._variant === 'custom' && typeof this.state._customClass === 'string' && this.state._customClass.length > 0,
|
|
15562
15430
|
'hide-label': this.state._hideLabel === true,
|
|
15563
|
-
}, disabled: this.state._disabled, id: this.state._id, name: this.state._name }, this.state._on, { onClick: this.onClick, role: this.state._role, tabIndex: this.state._tabIndex, type: this.state._type }), hAsync(KolSpanWcTag, { key: '
|
|
15431
|
+
}, disabled: this.state._disabled, id: this.state._id, name: this.state._name }, this.state._on, { onClick: this.onClick, role: this.state._role, tabIndex: this.state._tabIndex, type: this.state._type }), hAsync(KolSpanWcTag, { key: '89e898b52482ab8f2b991ee630d3c01eba2c5673', class: "button-inner", _accessKey: this.state._accessKey, _icons: this.state._icons, _hideLabel: this.state._hideLabel, _label: hasExpertSlot ? '' : this.state._label }, hAsync("slot", { key: 'c7f11890216223942c6adea500e5904409877564', name: "expert", slot: "expert" }))), hAsync(KolTooltipWcTag, { key: '31d7ab91f54a8046442ffdb435f55cb4681d1b32', "aria-hidden": "true", hidden: hasExpertSlot || !this.state._hideLabel, _accessKey: this._accessKey, _align: this.state._tooltipAlign, _label: typeof this.state._label === 'string' ? this.state._label : '' })));
|
|
15564
15432
|
}
|
|
15565
15433
|
constructor(hostRef) {
|
|
15566
15434
|
registerInstance(this, hostRef);
|
|
@@ -15779,7 +15647,7 @@ class KolCard {
|
|
|
15779
15647
|
};
|
|
15780
15648
|
}
|
|
15781
15649
|
render() {
|
|
15782
|
-
return (hAsync(Host, { key: '
|
|
15650
|
+
return (hAsync(Host, { key: '6a075e6c225c33dbfab5bbc6e78751eb1a2ee474', class: "kol-card" }, hAsync("div", { key: 'a3aee1a0c51e4aadd5bab63252686a9adfa7cfb6', class: "card" }, hAsync("div", { key: '1f73f4e0302ba9bb5b7fb5e0cbc6b00e7a3abdde', class: "header" }, hAsync(KolHeadingWcTag, { key: '0d077a8431e89744ed58c51d5e645f445e009169', _label: this.state._label, _level: this.state._level })), hAsync("div", { key: 'aef0ace6767b8978efd6a14967d51808660cdcad', class: "content" }, hAsync("slot", { key: '7fe022672f6e418364f63cb0a72dfbed09207c8e' })), this.state._hasCloser && (hAsync(KolButtonWcTag, { key: 'ff59bb6a947d9d435f4c2a2cf968daa5064ec2d3', class: "close", _hideLabel: true, _icons: {
|
|
15783
15651
|
left: {
|
|
15784
15652
|
icon: 'codicon codicon-close',
|
|
15785
15653
|
},
|
|
@@ -15942,10 +15810,10 @@ class KolDetails {
|
|
|
15942
15810
|
};
|
|
15943
15811
|
}
|
|
15944
15812
|
render() {
|
|
15945
|
-
return (hAsync(Host, { key: '
|
|
15813
|
+
return (hAsync(Host, { key: '4ad8208280a549ec10c547b20ddb003e04e68f01', class: "kol-details" }, hAsync("details", { key: '229ce17a1772bed26309a249a4326152edbe4e6e', ref: this.catchDetails, class: {
|
|
15946
15814
|
disabled: this.state._disabled === true,
|
|
15947
15815
|
open: this.state._open === true,
|
|
15948
|
-
}, onToggle: this.handleToggle }, hAsync("summary", { key: '
|
|
15816
|
+
}, onToggle: this.handleToggle }, hAsync("summary", { key: '727bb07a088a3138ff4fc29ee6fe43bcf9543379', ref: this.catchSummary, "aria-disabled": this.state._disabled ? 'true' : undefined, onClick: this.preventToggleIfDisabled, onKeyPress: this.preventToggleIfDisabled, tabIndex: this.state._disabled ? -1 : undefined }, hAsync(KolIconTag, { key: '5ecf957e42408222a4fbd78c2a9974c6c6880bc9', _label: "", _icons: "codicon codicon-chevron-right", class: `icon ${this.state._open ? 'is-open' : ''}` }), hAsync("span", { key: '2efa00fd37325648edd0c430db88a1d6f73d270c' }, this.state._label)), hAsync("div", { key: '1d527e8caeb3c9458ecde81c4c779c505ed19dc4', "aria-hidden": this.state._open === false ? 'true' : undefined, class: "content", ref: (element) => (this.contentElement = element) }, hAsync(KolIndentedTextTag, { key: '6f57d85524db46b0a381e535b7e280ca92483ce7' }, hAsync("slot", { key: '518dd2d74ae80a0de06efcbd1097aa8e72de5db1' }))))));
|
|
15949
15817
|
}
|
|
15950
15818
|
validateDisabled(value) {
|
|
15951
15819
|
validateDisabled(this, value);
|
|
@@ -16040,10 +15908,10 @@ class KolForm {
|
|
|
16040
15908
|
this.state = {};
|
|
16041
15909
|
}
|
|
16042
15910
|
render() {
|
|
16043
|
-
return (hAsync(Host, { key: '
|
|
15911
|
+
return (hAsync(Host, { key: 'c2f978944c0da89b0c1f721e48e62c20897c6e84', class: "kol-form" }, this._errorList && this._errorList.length > 0 && (hAsync(KolAlertTag, { key: '89cc664c87a2aa777ff084d447f16cebf36d33ae', _type: "error" }, translate('kol-error-list-message'), hAsync("nav", { key: '1720c956e40dd31ebbc4e97aef78f8e1f8c204ae', "aria-label": translate('kol-error-list') }, hAsync("ul", { key: 'f99ca1869fdc217c7ebca978c2f92bf1467e19a7' }, this._errorList.map((error, index) => (hAsync("li", { key: index }, hAsync(KolLinkTag, { _href: error.selector, _label: error.message, _on: { onClick: this.handleLinkClick }, ref: (el) => {
|
|
16044
15912
|
if (index === 0)
|
|
16045
15913
|
this.errorListElement = el;
|
|
16046
|
-
} })))))))), hAsync("form", { key: '
|
|
15914
|
+
} })))))))), hAsync("form", { key: '9076849c5f027e66ca37da072ac15271b19ae464', method: "post", onSubmit: this.onSubmit, onReset: this.onReset, autoComplete: "off", noValidate: true }, this.state._requiredText === true ? (hAsync("p", null, hAsync(KolIndentedTextTag, null, translate('kol-form-description')))) : typeof this.state._requiredText === 'string' && this.state._requiredText.length > 0 ? (hAsync("p", null, hAsync(KolIndentedTextTag, null, this.state._requiredText))) : null, hAsync("slot", { key: 'c94ae6cfb941c2a73196cb77361fb74bcaff9d0f' }))));
|
|
16047
15915
|
}
|
|
16048
15916
|
async focusErrorList() {
|
|
16049
15917
|
setTimeout(() => {
|
|
@@ -16108,7 +15976,7 @@ class KolHeading {
|
|
|
16108
15976
|
this._variant = undefined;
|
|
16109
15977
|
}
|
|
16110
15978
|
render() {
|
|
16111
|
-
return (hAsync(KolHeadingWcTag, { key: '
|
|
15979
|
+
return (hAsync(KolHeadingWcTag, { key: 'd18d1a32f3a8872e62fe7d6c7d9743679bf013ad', _label: this._label, _level: this._level, _secondaryHeadline: this._secondaryHeadline, _variant: this._variant, class: "kol-heading" }, hAsync("slot", { key: '33dbca9444ebac88573e83027076aca06a2bcfd4', name: "expert", slot: "expert" })));
|
|
16112
15980
|
}
|
|
16113
15981
|
static get style() { return {
|
|
16114
15982
|
default: KolHeadingDefaultStyle0
|
|
@@ -16186,7 +16054,7 @@ class KolHeadingWc {
|
|
|
16186
16054
|
this.validateVariant(this._variant);
|
|
16187
16055
|
}
|
|
16188
16056
|
render() {
|
|
16189
|
-
return (hAsync(Host, { key: '
|
|
16057
|
+
return (hAsync(Host, { key: '0486dd8c673554b08b07640dace2e2a63d5e8d7a', class: "kol-heading-wc" }, typeof this.state._secondaryHeadline === 'string' && this.state._secondaryHeadline.length > 0 ? (hAsync("hgroup", null, this.renderHeadline(this.state._label, this.state._level), this.state._secondaryHeadline && this.renderSecondaryHeadline(this.state._secondaryHeadline, this.state._level + 1))) : (this.renderHeadline(this.state._label, this.state._level))));
|
|
16190
16058
|
}
|
|
16191
16059
|
static get watchers() { return {
|
|
16192
16060
|
"_label": ["validateLabel"],
|
|
@@ -16225,7 +16093,7 @@ class KolIcon {
|
|
|
16225
16093
|
}
|
|
16226
16094
|
render() {
|
|
16227
16095
|
const ariaShow = this.state._label.length > 0;
|
|
16228
|
-
return (hAsync(Host, { key: '
|
|
16096
|
+
return (hAsync(Host, { key: '6f3cb974496a4f84a7e5c0712af1df89e8d09ced', exportparts: "icon", class: "kol-icon" }, hAsync("i", { key: '988ccb3b3521fedb0c39d141cb3e1865b5cfc603', "aria-hidden": ariaShow ? undefined : 'true', "aria-label": ariaShow ? this.state._label : undefined, class: this.state._icons, part: "icon", role: "img" })));
|
|
16229
16097
|
}
|
|
16230
16098
|
validateIcons(value) {
|
|
16231
16099
|
watchString(this, '_icons', value, {
|
|
@@ -16306,7 +16174,7 @@ class KolImage {
|
|
|
16306
16174
|
this.validateSrcset(this._srcset);
|
|
16307
16175
|
}
|
|
16308
16176
|
render() {
|
|
16309
|
-
return (hAsync(Host, { key: '
|
|
16177
|
+
return (hAsync(Host, { key: '976da0c35e4cfec6f956185740885cee765fc2d5', class: "kol-image" }, hAsync("img", { key: 'd9aab0d1ff56a0a63acd16d130a9703fd2fb2d2e', alt: this.state._alt, loading: this.state._loading, sizes: this.state._sizes, src: this.state._src, srcset: this.state._srcset })));
|
|
16310
16178
|
}
|
|
16311
16179
|
static get watchers() { return {
|
|
16312
16180
|
"_alt": ["validateAlt"],
|
|
@@ -16344,7 +16212,7 @@ class KolIndentedText {
|
|
|
16344
16212
|
this.state = {};
|
|
16345
16213
|
}
|
|
16346
16214
|
render() {
|
|
16347
|
-
return (hAsync(Host, { key: '
|
|
16215
|
+
return (hAsync(Host, { key: '6097077f44baffeaab91669a12c8e3897f83e46a', class: "kol-indented-text-wc" }, hAsync("div", { key: 'b534e57df62b8714e6bed627268ce784a67490f8' }, hAsync("slot", { key: '99d0151973c297b5f23acfb2217b4c41b58327b6' }))));
|
|
16348
16216
|
}
|
|
16349
16217
|
static get style() { return {
|
|
16350
16218
|
default: KolIndentedTextDefaultStyle0
|
|
@@ -16411,18 +16279,18 @@ class KolInput {
|
|
|
16411
16279
|
const hasExpertSlot = showExpertSlot(this._label);
|
|
16412
16280
|
const hasHint = typeof this._hint === 'string' && this._hint.length > 0;
|
|
16413
16281
|
const useTooltopInsteadOfLabel = !hasExpertSlot && this._hideLabel;
|
|
16414
|
-
return (hAsync(Host, { key: '
|
|
16282
|
+
return (hAsync(Host, { key: 'b072543f7641ef363994245d06c7f2bd764f753f', class: clsx('kol-input', this.getModifierClassNameByMsgType(), {
|
|
16415
16283
|
disabled: this._disabled === true,
|
|
16416
16284
|
error: hasError === true,
|
|
16417
16285
|
'read-only': this._readOnly === true,
|
|
16418
16286
|
required: this._required === true,
|
|
16419
16287
|
touched: this._touched === true,
|
|
16420
16288
|
'hidden-error': this._hideError === true,
|
|
16421
|
-
}) }, hAsync("label", { key: '
|
|
16289
|
+
}) }, hAsync("label", { key: 'c1477c93278760eb904c8be41af9e2d616172455', class: "input-label", id: !useTooltopInsteadOfLabel ? `${this._id}-label` : undefined, hidden: useTooltopInsteadOfLabel, htmlFor: this._id }, hAsync("span", { key: '56168b5b34ff6cb4fcf61ee06b10319ac4e5011a', class: "input-label-span" }, hAsync("slot", { key: 'a5d86e031f9de5ab58df928c01b6f3495afa73aa', name: "label" }))), hasHint && (hAsync("span", { key: '9eb13cd9be0d8f3b292e4741b9b5e3a30f87ea57', class: "hint", id: `${this._id}-hint` }, this._hint)), hAsync("div", { key: '544a5b66396437d9d204377a26b5a7f8b4920aa7', class: {
|
|
16422
16290
|
input: true,
|
|
16423
16291
|
'icon-left': typeof ((_e = this._icons) === null || _e === void 0 ? void 0 : _e.left) === 'object',
|
|
16424
16292
|
'icon-right': typeof ((_f = this._icons) === null || _f === void 0 ? void 0 : _f.right) === 'object',
|
|
16425
|
-
} }, ((_g = this._icons) === null || _g === void 0 ? void 0 : _g.left) && (hAsync(KolIconTag, { key: '
|
|
16293
|
+
} }, ((_g = this._icons) === null || _g === void 0 ? void 0 : _g.left) && (hAsync(KolIconTag, { key: '52f24a7649e61ba65586fa4fcd718af977188b2d', _label: "", _icons: ((_h = this._icons) === null || _h === void 0 ? void 0 : _h.left).icon, style: this.getIconStyles((_j = this._icons) === null || _j === void 0 ? void 0 : _j.left) })), hAsync("div", { key: 'ca294a18ec2654cf6f645ff3c3fd0810acc671a7', ref: this.catchInputSlot, id: this.slotName, class: "input-slot" }), typeof this._smartButton === 'object' && this._smartButton !== null && (hAsync(KolButtonWcTag, { key: 'bf192702fd5569ad649a0df9468b0ed269263226', _customClass: this._smartButton._customClass, _disabled: this._smartButton._disabled, _icons: this._smartButton._icons, _hideLabel: true, _id: this._smartButton._id, _label: this._smartButton._label, _on: this._smartButton._on, _tooltipAlign: this._smartButton._tooltipAlign, _variant: this._smartButton._variant })), ((_k = this._icons) === null || _k === void 0 ? void 0 : _k.right) && (hAsync(KolIconTag, { key: 'cdbd580ebe51b27dbf57a23cf6cb4b9a0dc52c93', _label: "", _icons: ((_l = this._icons) === null || _l === void 0 ? void 0 : _l.right).icon, style: this.getIconStyles((_m = this._icons) === null || _m === void 0 ? void 0 : _m.right) }))), useTooltopInsteadOfLabel && (hAsync(KolTooltipWcTag, { key: '36299e559eaaf1542fa14aee60ea18ce5ad43d27', "aria-hidden": "true", class: "input-tooltip", _accessKey: this._accessKey, _align: this._tooltipAlign, _id: this._hideLabel ? `${this._id}-label` : undefined, _label: this._label })), showFormFieldMsg && hAsync(FormFieldMsg, { key: '1ef7bb15638c51e4905126e53d55c0bd78401014', _alert: this._alert, _hideError: this._hideError, _msg: this._msg, _id: this._id }), Array.isArray(this._suggestions) && this._suggestions.length > 0 && (hAsync("datalist", { key: '2140b9cf07bc0cc2cd6b68d96c51aea78261c7b6', id: `${this._id}-list` }, this._suggestions.map((option) => (hAsync("option", { value: option }))))), this._hasCounter && (hAsync("span", { key: '25ca509e7a4a52187a3b6fc47d66c4d03a241b23', class: "counter", "aria-atomic": "true", "aria-live": "polite" }, this._currentLength, this._maxLength && (hAsync(Fragment, null, hAsync("span", { key: '1ed61d7a3113d4a5dcfa88988d16d5c0521c8501', "aria-label": translate('kol-of'), role: "img" }, "/"), this._maxLength)), ' ', hAsync("span", { key: 'c460083b600b8b402dc533987cbc542824476036' }, translate('kol-characters'))))));
|
|
16426
16294
|
}
|
|
16427
16295
|
getModifierClassNameByMsgType() {
|
|
16428
16296
|
var _a, _b;
|
|
@@ -16821,13 +16689,13 @@ class KolInputCheckbox {
|
|
|
16821
16689
|
render() {
|
|
16822
16690
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
16823
16691
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
16824
|
-
return (hAsync(Host, { key: '
|
|
16692
|
+
return (hAsync(Host, { key: '24e81e8cf941c8f84a8d8f191e17f2d0a6ce3e3d', class: "kol-input-checkbox" }, hAsync(KolInputTag, { key: '5b1e2f37db302927ded8c14c96473bc60442ad73', class: {
|
|
16825
16693
|
checkbox: true,
|
|
16826
16694
|
[this.state._variant]: true,
|
|
16827
16695
|
'hide-label': !!this.state._hideLabel,
|
|
16828
16696
|
checked: this.state._checked,
|
|
16829
16697
|
indeterminate: this.state._indeterminate,
|
|
16830
|
-
}, "data-role": this.state._variant === 'button' ? 'button' : undefined, _accessKey: this.state._accessKey, _alert: this.state._alert, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _id: this.state._id, _label: this.state._label, _required: this.state._required, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '
|
|
16698
|
+
}, "data-role": this.state._variant === 'button' ? 'button' : undefined, _accessKey: this.state._accessKey, _alert: this.state._alert, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _id: this.state._id, _label: this.state._label, _required: this.state._required, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '50ed12ecd0ace678478f27bbcc32f86a974a6e43', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("label", { key: 'd45fd240a98954594a53ae600183a4b31bf132c2', slot: "input", class: "checkbox-container" }, hAsync(KolIconTag, { key: '10b9b1a82924e8aac37792514a1f876303447420', class: "icon", _icons: this.state._indeterminate ? this.state._icons.indeterminate : this.state._checked ? this.state._icons.checked : this.state._icons.unchecked, _label: "" }), hAsync("input", Object.assign({ key: 'a169b87320d6380d9938fee01c9b9b134034635f', class: `checkbox-input-element${this.state._variant === 'button' ? ' visually-hidden' : ''}`, ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, checked: this.state._checked, disabled: this.state._disabled, id: this.state._id, indeterminate: this.state._indeterminate, name: this.state._name, required: this.state._required, tabIndex: this.state._tabIndex, type: "checkbox" }, this.controller.onFacade, { onInput: this.onInput, onChange: this.onChange, onClick: undefined }))))));
|
|
16831
16699
|
}
|
|
16832
16700
|
constructor(hostRef) {
|
|
16833
16701
|
registerInstance(this, hostRef);
|
|
@@ -17100,10 +16968,10 @@ class KolInputColor {
|
|
|
17100
16968
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
17101
16969
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
17102
16970
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
17103
|
-
return (hAsync(Host, { key: '
|
|
16971
|
+
return (hAsync(Host, { key: 'afba48f148c11fcea78655daef032e2774921205', class: "kol-input-color" }, hAsync(KolInputTag, { key: 'f27891ebbc5c4c0bd959460d3c277efb9ab273ba', class: {
|
|
17104
16972
|
color: true,
|
|
17105
16973
|
'hide-label': !!this.state._hideLabel,
|
|
17106
|
-
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _msg: this.state._msg, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _hideError: this.state._hideError, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '
|
|
16974
|
+
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _msg: this.state._msg, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _hideError: this.state._hideError, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '9222b9ba80eaac4f3a5e581184352837bf029de3', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: 'a0661d6582ec4311214fdca9aa134706218fe53a', slot: "input" }, hAsync("input", Object.assign({ key: 'ce78154c045e5f1cdaf52b35170d2d7571daf8e9', ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, name: this.state._name, slot: "input", spellcheck: "false", type: "color", value: this.state._value }, this.controller.onFacade))))));
|
|
17107
16975
|
}
|
|
17108
16976
|
constructor(hostRef) {
|
|
17109
16977
|
registerInstance(this, hostRef);
|
|
@@ -17412,10 +17280,10 @@ class KolInputDate {
|
|
|
17412
17280
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
17413
17281
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
17414
17282
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
17415
|
-
return (hAsync(Host, { key: '
|
|
17283
|
+
return (hAsync(Host, { key: '4220dc41de222199dfb25a72b442da7149b7a289', class: { 'kol-input-date': true, 'has-value': this.state._hasValue } }, hAsync(KolInputTag, { key: '30846ab551fb07bb757402090959c42e9da6a82b', class: {
|
|
17416
17284
|
[this.state._type]: true,
|
|
17417
17285
|
'hide-label': !!this.state._hideLabel,
|
|
17418
|
-
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _readOnly: this.state._readOnly, _required: this.state._required, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '
|
|
17286
|
+
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _readOnly: this.state._readOnly, _required: this.state._required, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: 'f82498c7a5f3414120bb98d027acf60e06744ef2', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: '5b96d92a28c046641153ca10f028cc7bb18928c0', slot: "input" }, hAsync("input", Object.assign({ key: 'bc7c446ca2eb46bf28fbc3fee6bb7e964342d8d8', ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, max: this.state._max, min: this.state._min, name: this.state._name, readOnly: this.state._readOnly, required: this.state._required, step: this.state._step, spellcheck: "false", type: this.state._type, value: this.state._value }, this.controller.onFacade, { onKeyDown: this.onKeyDown }))))));
|
|
17419
17287
|
}
|
|
17420
17288
|
constructor(hostRef) {
|
|
17421
17289
|
registerInstance(this, hostRef);
|
|
@@ -17743,10 +17611,10 @@ class KolInputEmail {
|
|
|
17743
17611
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
17744
17612
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
17745
17613
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
17746
|
-
return (hAsync(Host, { key: '
|
|
17614
|
+
return (hAsync(Host, { key: 'd9e5fc37a05a1fa49e0206d45943f8c789bd3780', class: {
|
|
17747
17615
|
'kol-input-email': true,
|
|
17748
17616
|
'has-value': this.state._hasValue,
|
|
17749
|
-
} }, hAsync(KolInputTag, { key: '
|
|
17617
|
+
} }, hAsync(KolInputTag, { key: '1f252d60c0808ced9529b92e113d782c1c61dbb6', class: { email: true, 'hide-label': !!this.state._hideLabel }, _accessKey: this.state._accessKey, _alert: this.state._alert, _currentLength: this.state._currentLength, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hasCounter: this.state._hasCounter, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _maxLength: this.state._maxLength, _readOnly: this.state._readOnly, _required: this.state._required, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: 'f9269342577e13a1955967c354df3745b8e4072f', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: '385b7b1c58c3fcb68588d5e8d390f2625e09d381', slot: "input" }, hAsync("input", Object.assign({ key: 'd53a875e911643f0d88fc4be69866e082f561831', ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, multiple: this.state._multiple, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, maxlength: this.state._maxLength, name: this.state._name, pattern: this.state._pattern, placeholder: this.state._placeholder, readOnly: this.state._readOnly, required: this.state._required, spellcheck: "false", type: "email", value: this.state._value }, this.controller.onFacade, { onKeyDown: this.onKeyDown, onInput: this.onInput }))))));
|
|
17750
17618
|
}
|
|
17751
17619
|
constructor(hostRef) {
|
|
17752
17620
|
registerInstance(this, hostRef);
|
|
@@ -18005,10 +17873,10 @@ class KolInputFile {
|
|
|
18005
17873
|
render() {
|
|
18006
17874
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
18007
17875
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
18008
|
-
return (hAsync(Host, { key: '
|
|
17876
|
+
return (hAsync(Host, { key: 'c54b21929a1510e62f8b8e2f38c7d101893c2767', class: "kol-input-file" }, hAsync(KolInputTag, { key: '497a5872213a3839bdffe4d680bba054f375f545', class: {
|
|
18009
17877
|
file: true,
|
|
18010
17878
|
'hide-label': !!this.state._hideLabel,
|
|
18011
|
-
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _required: this.state._required, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '
|
|
17879
|
+
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _required: this.state._required, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: 'e5db03b67cfe419b7374a0fb1f59cd078d5e7889', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: '5b56a86b918329431d10a7d3392417eb6a5f5306', slot: "input" }, hAsync("input", Object.assign({ key: '1c2714425a93ec6016e483c4aed6594b5ebf459e', ref: this.catchRef, title: "", accept: this.state._accept, accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, multiple: this.state._multiple, name: this.state._name, required: this.state._required, spellcheck: "false", type: "file", value: this.state._value }, this.controller.onFacade, { onChange: this.onChange, onInput: this.onInput }))))));
|
|
18012
17880
|
}
|
|
18013
17881
|
constructor(hostRef) {
|
|
18014
17882
|
registerInstance(this, hostRef);
|
|
@@ -18279,13 +18147,13 @@ class KolInputNumber {
|
|
|
18279
18147
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
18280
18148
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
18281
18149
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
18282
|
-
return (hAsync(Host, { key: '
|
|
18150
|
+
return (hAsync(Host, { key: '91783f6017eaa7dcbbced141b8839847daa911e8', class: {
|
|
18283
18151
|
'kol-input-number': true,
|
|
18284
18152
|
'has-value': this.state._hasValue,
|
|
18285
|
-
} }, hAsync(KolInputTag, { key: '
|
|
18153
|
+
} }, hAsync(KolInputTag, { key: '2a6cb2cd0ca1144ee03b71efceeb845cd3aa3075', class: {
|
|
18286
18154
|
number: true,
|
|
18287
18155
|
'hide-label': !!this.state._hideLabel,
|
|
18288
|
-
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _readOnly: this.state._readOnly, _required: this.state._required, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '
|
|
18156
|
+
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _suggestions: this.state._suggestions, _readOnly: this.state._readOnly, _required: this.state._required, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '9a7cb3e1fa673ad7cf664db90197d431aa925560', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: '85c3571c8bf8b6cbd9ee513fd37844054e594a1e', slot: "input" }, hAsync("input", Object.assign({ key: 'cb013053ba2b6fbd24230994f6c5f9cb02bb979a', ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, max: this.state._max, min: this.state._min, name: this.state._name, readOnly: this.state._readOnly, required: this.state._required, placeholder: this.state._placeholder, step: this.state._step, spellcheck: "false", type: "number", value: this.state._value }, this.controller.onFacade, { onKeyDown: this.onKeyDown }))))));
|
|
18289
18157
|
}
|
|
18290
18158
|
constructor(hostRef) {
|
|
18291
18159
|
registerInstance(this, hostRef);
|
|
@@ -18510,13 +18378,13 @@ class KolInputPassword {
|
|
|
18510
18378
|
render() {
|
|
18511
18379
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
18512
18380
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
18513
|
-
return (hAsync(Host, { key: '
|
|
18381
|
+
return (hAsync(Host, { key: 'b65180af7655e0e88aac633077dddb3c50730ea3', class: {
|
|
18514
18382
|
'kol-input-password': true,
|
|
18515
18383
|
'has-value': this.state._hasValue,
|
|
18516
|
-
} }, hAsync(KolInputTag, { key: '
|
|
18384
|
+
} }, hAsync(KolInputTag, { key: 'b09e33d725665c6eea46c8d339256988e890c4c2', class: {
|
|
18517
18385
|
'hide-label': !!this.state._hideLabel,
|
|
18518
18386
|
password: true,
|
|
18519
|
-
}, _accessKey: this.state._accessKey, _currentLength: this.state._currentLength, _disabled: this.state._disabled, _msg: this.state._msg, _hasCounter: this.state._hasCounter, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _maxLength: this.state._maxLength, _readOnly: this.state._readOnly, _required: this.state._required, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '
|
|
18387
|
+
}, _accessKey: this.state._accessKey, _currentLength: this.state._currentLength, _disabled: this.state._disabled, _msg: this.state._msg, _hasCounter: this.state._hasCounter, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _maxLength: this.state._maxLength, _readOnly: this.state._readOnly, _required: this.state._required, _smartButton: this.state._smartButton, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '2981d1a6ff67804a9658b13d7cdb54c74b616392', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: '43f5a64981d410768399080258ae03a23a3cd441', slot: "input" }, hAsync("input", Object.assign({ key: 'db4867a0d462cb0a207edd0b1025f0302351bc8c', ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, maxlength: this.state._maxLength, name: this.state._name, pattern: this.state._pattern, placeholder: this.state._placeholder, readOnly: this.state._readOnly, required: this.state._required, spellcheck: "false", type: "password", value: this.state._value }, this.controller.onFacade, { onKeyDown: this.onKeyDown, onInput: this.onInput }))))));
|
|
18520
18388
|
}
|
|
18521
18389
|
constructor(hostRef) {
|
|
18522
18390
|
registerInstance(this, hostRef);
|
|
@@ -18737,14 +18605,14 @@ class KolInputRadio {
|
|
|
18737
18605
|
render() {
|
|
18738
18606
|
const { ariaDescribedBy, hasError } = getRenderStates(this.state);
|
|
18739
18607
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
18740
|
-
return (hAsync(Host, { key: '
|
|
18608
|
+
return (hAsync(Host, { key: '24f9de4ff11db8aba5b2d8c6c038f93f19324f34', class: "kol-input-radio" }, hAsync("fieldset", { key: '1886a14329f816f6998f559b0ac063b8acf226b8', class: {
|
|
18741
18609
|
fieldset: true,
|
|
18742
18610
|
disabled: this.state._disabled === true,
|
|
18743
18611
|
error: hasError === true,
|
|
18744
18612
|
required: this.state._required === true,
|
|
18745
18613
|
'hidden-error': this._hideError === true,
|
|
18746
18614
|
[this.state._orientation]: true,
|
|
18747
|
-
} }, hAsync("legend", { key: '
|
|
18615
|
+
} }, hAsync("legend", { key: 'af6944de35814915086c4d5dc74ec8ad17cf1034', class: "block w-full mb-1 leading-normal" }, hAsync("span", { key: '8ff0e5957bde7e21edb470567cfa74b528f3bef2' }, hAsync("span", { key: '03381cc1802b3bd249b4aaa27a59f6512327856d', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this._accessKey === 'string' ? (hAsync(InternalUnderlinedAccessKey, { accessKey: this._accessKey, label: this._label })) : (this._label)))), this.state._options.map((option, index) => {
|
|
18748
18616
|
const customId = `${this.state._id}-${index}`;
|
|
18749
18617
|
const slotName = `radio-${index}`;
|
|
18750
18618
|
const selected = this.state._value === option.value;
|
|
@@ -18757,7 +18625,7 @@ class KolInputRadio {
|
|
|
18757
18625
|
padding: this.state._hideLabel ? '0' : undefined,
|
|
18758
18626
|
visibility: this.state._hideLabel ? 'hidden' : undefined,
|
|
18759
18627
|
} }, hAsync("span", null, hAsync("span", { class: "radio-label-span-inner" }, option.label))))));
|
|
18760
|
-
}), hasError && hAsync(FormFieldMsg, { key: '
|
|
18628
|
+
}), hasError && hAsync(FormFieldMsg, { key: '8da03360a1a1c33485cc1bd4fa75f6b5179d0ac4', _alert: this.state._alert, _hideError: this.state._hideError, _msg: this.state._msg, _id: this.state._id }))));
|
|
18761
18629
|
}
|
|
18762
18630
|
constructor(hostRef) {
|
|
18763
18631
|
registerInstance(this, hostRef);
|
|
@@ -19010,13 +18878,13 @@ class KolInputRange {
|
|
|
19010
18878
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
19011
18879
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
19012
18880
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
19013
|
-
return (hAsync(Host, { key: '
|
|
18881
|
+
return (hAsync(Host, { key: 'eb243e9c807f8c36c3cd11edf8a010a5144f0e2a', class: "kol-input-range" }, hAsync(KolInputTag, { key: '910302fbe7b5c7eb1dbb4b77ada57211e0094197', class: {
|
|
19014
18882
|
range: true,
|
|
19015
18883
|
'hide-label': !!this.state._hideLabel,
|
|
19016
|
-
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '
|
|
18884
|
+
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _msg: this.state._msg, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { key: '6c33d4205f3fd42f4866382990c2b54ff705c0c3', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: 'c3a7fb9fac84afdc0e1e6185dbd7e5d4bba967ed', slot: "input" }, hAsync("div", { key: '7ebc67b2227b02f2612e522d04c4842b813884cb', class: "inputs-wrapper", style: {
|
|
19017
18885
|
'--kolibri-input-range--input-number--width': `${this.state._max}`.length + 0.5 + 'em',
|
|
19018
|
-
} }, hAsync("input", Object.assign({ key: '
|
|
19019
|
-
hAsync("datalist", { key: '
|
|
18886
|
+
} }, hAsync("input", Object.assign({ key: 'cdf917c6f8505693c5b2309c5d638eb61fe04658', ref: this.catchInputRangeRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, "aria-hidden": "true", autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, list: hasSuggestions ? `${this.state._id}-list` : undefined, max: this.state._max, min: this.state._min, name: this.state._name ? `${this.state._name}-range` : undefined, spellcheck: "false", step: this.state._step, tabIndex: -1, type: "range", value: this.state._value }, this.controller.onFacade, { onChange: this.onChange })), hAsync("input", Object.assign({ key: '990cfd5048c010921ea55eb6e836094b50e2e876', ref: this.catchInputNumberRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, max: this.state._max, min: this.state._min, name: this.state._name ? `${this.state._name}-number` : undefined, step: this.state._step, type: "number", value: this.state._value }, this.controller.onFacade, { onKeyDown: this.onKeyDown, onChange: this.onChange }))), hasSuggestions && [
|
|
18887
|
+
hAsync("datalist", { key: '69bf9f5216d51bb46e48875191db608aadb10df3', id: `${this.state._id}-list` }, this.state._suggestions.map((option) => (hAsync("option", { value: option })))),
|
|
19020
18888
|
]))));
|
|
19021
18889
|
}
|
|
19022
18890
|
constructor(hostRef) {
|
|
@@ -19232,13 +19100,13 @@ class KolInputText {
|
|
|
19232
19100
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
19233
19101
|
const hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;
|
|
19234
19102
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
19235
|
-
return (hAsync(Host, { key: '
|
|
19103
|
+
return (hAsync(Host, { key: 'd5d16bb0adf2be9984ae68798d4514189a68eda0', class: {
|
|
19236
19104
|
'has-value': this.state._hasValue,
|
|
19237
19105
|
'kol-input-text': true,
|
|
19238
|
-
} }, hAsync(KolInputTag, { key: '
|
|
19106
|
+
} }, hAsync(KolInputTag, { key: 'f1c247e405bb06c6d3f71229fa36eafc20c8f90d', class: {
|
|
19239
19107
|
[this.state._type]: true,
|
|
19240
19108
|
'hide-label': !!this.state._hideLabel,
|
|
19241
|
-
}, _accessKey: this.state._accessKey, _currentLength: this.state._currentLength, _disabled: this.state._disabled, _hasCounter: this.state._hasCounter, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _maxLength: this.state._maxLength, _msg: this.state._msg, _readOnly: this.state._readOnly, _required: this.state._required, _smartButton: this.state._smartButton, _suggestions: this.state._suggestions, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '
|
|
19109
|
+
}, _accessKey: this.state._accessKey, _currentLength: this.state._currentLength, _disabled: this.state._disabled, _hasCounter: this.state._hasCounter, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _maxLength: this.state._maxLength, _msg: this.state._msg, _readOnly: this.state._readOnly, _required: this.state._required, _smartButton: this.state._smartButton, _suggestions: this.state._suggestions, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: 'a2409bd3131e5d94144df961c817b233ddf095a7', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: '433b6fc79d40f2587b58308bb3afb6680f742e8c', slot: "input" }, hAsync("input", Object.assign({ key: 'd88d6840550e2647e9d25d43db8c423019d0653a', ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoComplete: this.state._autoComplete, autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, list: hasSuggestions ? `${this.state._id}-list` : undefined, maxlength: this.state._maxLength, name: this.state._name, pattern: this.state._pattern, placeholder: this.state._placeholder, readOnly: this.state._readOnly, required: this.state._required, spellcheck: "false", type: this.state._type, value: this.state._value }, this.controller.onFacade, { onChange: this.onChange, onInput: this.onInput, onKeyDown: this.onKeyDown }))))));
|
|
19242
19110
|
}
|
|
19243
19111
|
constructor(hostRef) {
|
|
19244
19112
|
registerInstance(this, hostRef);
|
|
@@ -19500,7 +19368,7 @@ class KolKolibri {
|
|
|
19500
19368
|
}
|
|
19501
19369
|
render() {
|
|
19502
19370
|
const fillColor = `rgb(${this.state._color.red},${this.state._color.green},${this.state._color.blue})`;
|
|
19503
|
-
return (hAsync(Host, { key: '
|
|
19371
|
+
return (hAsync(Host, { key: '5fa07f54481e954f3ada11dde5d42b88350932d0', class: "kol-kolibri" }, hAsync("svg", { key: '84d3c6b420079d3a8d26bc0eb6a33f5b09471ec6', role: "img", "aria-label": translate('kol-kolibri-logo'), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 600 600", fill: fillColor }, hAsync("path", { key: 'e64b0df6ca04f01f4b428f04f665bc73fc984f24', d: "M353 322L213 304V434L353 322Z" }), hAsync("path", { key: 'eab9abfd4ff3d50bbd87fbdbf5386be5f7918eb1', d: "M209 564V304L149 434L209 564Z" }), hAsync("path", { key: 'bf7dbd997df13f831cd93c0bd74203ad58a400c6', d: "M357 316L417 250L361 210L275 244L357 316Z" }), hAsync("path", { key: 'b92bc28b3225115e6167ccd64d536c6503516c43', d: "M329 218L237 92L250 222L272 241L329 218Z" }), hAsync("path", { key: '4c5eadac3cf237a08d978bd47275a98b75bee325', d: "M353 318L35 36L213 300L353 318Z" }), hAsync("path", { key: '0affb05d6011a26a8323c3e45bd40abdbd1cc5af', d: "M391 286L565 272L421 252L391 286Z" }), this.state._labeled === true && (hAsync("text", { key: '08b76cb8e49176c705da4f2f3b0e0c7ba7110f97', x: "250", y: "525", fill: fillColor }, "KoliBri")))));
|
|
19504
19372
|
}
|
|
19505
19373
|
validateColor(value) {
|
|
19506
19374
|
validateColor(this, value, {
|
|
@@ -19564,7 +19432,7 @@ class KolLink {
|
|
|
19564
19432
|
this._tooltipAlign = 'right';
|
|
19565
19433
|
}
|
|
19566
19434
|
render() {
|
|
19567
|
-
return (hAsync(Host, { key: '
|
|
19435
|
+
return (hAsync(Host, { key: '8a381f4c68eeb1a70ab27f86dcca9328cc98c50f', class: "kol-link" }, hAsync(KolLinkWcTag, { key: '67b91c5efc3478cf0682711554f9ba8932375667', ref: this.catchRef, _accessKey: this._accessKey, _ariaCurrentValue: this._ariaCurrentValue, _disabled: this._disabled, _download: this._download, _hideLabel: this._hideLabel, _href: this._href, _icons: this._icons, _label: this._label, _on: this._on, _role: this._role, _tabIndex: this._tabIndex, _target: this._target, _tooltipAlign: this._tooltipAlign }, hAsync("slot", { key: '2e275aa4ead87791588f79f80b49b39390ab9c70', name: "expert", slot: "expert" }))));
|
|
19568
19436
|
}
|
|
19569
19437
|
get host() { return getElement(this); }
|
|
19570
19438
|
static get style() { return {
|
|
@@ -19620,11 +19488,11 @@ class KolLinkButton {
|
|
|
19620
19488
|
this._variant = 'normal';
|
|
19621
19489
|
}
|
|
19622
19490
|
render() {
|
|
19623
|
-
return (hAsync(Host, { key: '
|
|
19491
|
+
return (hAsync(Host, { key: '48b7c1ddbc5bf67ffcd240f66344f2726421e504', class: "kol-link-button" }, hAsync(KolLinkWcTag, { key: '3c5dd469e4c56704f1b2965d835e6b8062f51830', ref: this.catchRef, class: {
|
|
19624
19492
|
button: true,
|
|
19625
19493
|
[this._variant]: this._variant !== 'custom',
|
|
19626
19494
|
[this._customClass]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,
|
|
19627
|
-
}, _accessKey: this._accessKey, _ariaCurrentValue: this._ariaCurrentValue, _disabled: this._disabled, _download: this._download, _hideLabel: this._hideLabel, _href: this._href, _icons: this._icons, _label: this._label, _on: this._on, _role: "button", _tabIndex: this._tabIndex, _target: this._target, _tooltipAlign: this._tooltipAlign }, hAsync("slot", { key: '
|
|
19495
|
+
}, _accessKey: this._accessKey, _ariaCurrentValue: this._ariaCurrentValue, _disabled: this._disabled, _download: this._download, _hideLabel: this._hideLabel, _href: this._href, _icons: this._icons, _label: this._label, _on: this._on, _role: "button", _tabIndex: this._tabIndex, _target: this._target, _tooltipAlign: this._tooltipAlign }, hAsync("slot", { key: '55d4e4041b79de0efc434b0effea997c85a0958c', name: "expert", slot: "expert" }))));
|
|
19628
19496
|
}
|
|
19629
19497
|
get host() { return getElement(this); }
|
|
19630
19498
|
static get style() { return {
|
|
@@ -19687,10 +19555,10 @@ class KolLinkGroup {
|
|
|
19687
19555
|
}
|
|
19688
19556
|
render() {
|
|
19689
19557
|
const ListTag = this.isUl ? 'ul' : 'ol';
|
|
19690
|
-
return (hAsync(Host, { key: '
|
|
19558
|
+
return (hAsync(Host, { key: '153895c9059653467587b4f6c8f2282b5ebc8bb3', class: "kol-link-group" }, hAsync(ListTag, { key: '4c6d27071580b94e66bd3a3f59b67e940d1d24c6', "aria-label": this.state._label, class: {
|
|
19691
19559
|
vertical: this.state._orientation === 'vertical',
|
|
19692
19560
|
horizontal: this.state._orientation === 'horizontal',
|
|
19693
|
-
} }, hAsync(ListItem, { key: '
|
|
19561
|
+
} }, hAsync(ListItem, { key: '42e740e727f5a1d92131ef08f4102b35c1a1a105', links: this.state._links, orientation: this.state._orientation, listStyleType: this.state._listStyleType }))));
|
|
19694
19562
|
}
|
|
19695
19563
|
validateLabel(value, _oldValue, initial = false) {
|
|
19696
19564
|
if (!initial && this.state._label) {
|
|
@@ -19829,13 +19697,13 @@ class KolLinkWc {
|
|
|
19829
19697
|
render() {
|
|
19830
19698
|
const { isExternal, tagAttrs } = this.getRenderValues();
|
|
19831
19699
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
19832
|
-
return (hAsync(Host, { key: '
|
|
19700
|
+
return (hAsync(Host, { key: '82f9f5d0f689c25163bd6136ca5c34dcb1fd692b', class: "kol-link-wc" }, hAsync("a", Object.assign({ key: 'b7db13f7744362450d778d707e5540558d997ecb', ref: this.catchRef }, tagAttrs, { accessKey: this.state._accessKey, "aria-current": this.state._ariaCurrent, "aria-disabled": this.state._disabled ? 'true' : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string'
|
|
19833
19701
|
? `${this.state._label}${isExternal ? ` (${translate('kol-open-link-in-tab')})` : ''}`
|
|
19834
19702
|
: undefined, class: {
|
|
19835
19703
|
disabled: this.state._disabled === true,
|
|
19836
19704
|
'external-link': isExternal,
|
|
19837
19705
|
'hide-label': this.state._hideLabel === true,
|
|
19838
|
-
} }, this.state._on, { onClick: this.onClick, onKeyPress: this.onClick, role: this.state._role, tabIndex: this.state._disabled ? -1 : this.state._tabIndex }), hAsync(KolSpanWcTag, { key: '
|
|
19706
|
+
} }, this.state._on, { onClick: this.onClick, onKeyPress: this.onClick, role: this.state._role, tabIndex: this.state._disabled ? -1 : this.state._tabIndex }), hAsync(KolSpanWcTag, { key: '74e96d85bcef160e5cb9c0d5676981b32e5abaaf', _accessKey: this.state._accessKey, _icons: this.state._icons, _hideLabel: this.state._hideLabel, _label: hasExpertSlot ? '' : this.state._label || this.state._href }, hAsync("slot", { key: 'e6f537ca1733bf45673369cb51f9cd0a5ed8d349', name: "expert", slot: "expert" })), isExternal && (hAsync(KolIconTag, { key: 'b41fee1ddbffadab9c2371ff336fadb3ce7abe74', class: "external-link-icon", _label: this.state._hideLabel ? '' : translate('kol-open-link-in-tab'), _icons: 'codicon codicon-link-external', "aria-hidden": this.state._hideLabel }))), hAsync(KolTooltipWcTag, { key: 'c6e48539bc159d804fd5cff1983a1a652f16a312', "aria-hidden": "true", hidden: hasExpertSlot || !this.state._hideLabel, _accessKey: this.state._accessKey, _align: this.state._tooltipAlign, _label: this.state._label || this.state._href })));
|
|
19839
19707
|
}
|
|
19840
19708
|
validateAccessKey(value) {
|
|
19841
19709
|
validateAccessKey(this, value);
|
|
@@ -20149,7 +20017,7 @@ class KolLogo {
|
|
|
20149
20017
|
}
|
|
20150
20018
|
render() {
|
|
20151
20019
|
var _a;
|
|
20152
|
-
return (hAsync(Host, { key: '
|
|
20020
|
+
return (hAsync(Host, { key: 'f90b9eb725f5b4f91f75bac9b4dfaf1133f8b811', class: "kol-logo" }, hAsync("svg", { key: '964e79a52eeed741a496d403c3091ee777274f22', "aria-label": translate('kol-logo-description', { placeholders: { orgShort: this.state._org, orgLong: getAriaLabel(this.state._org) } }), role: "img", viewBox: "0 0 225 100" }, hAsync("rect", { key: 'd2a5552316874a4e7227d97161e24c218fd9075b', width: "100%", height: "100%", fill: "white" }), hAsync("svg", { key: 'a2eec4b28bd7914394488fc1254a2c06112cd654', x: "0", y: "4", height: "75" }, hAsync(Adler, { key: '237cda1d159ca7a744a2a95db53b1d984540a5d7' })), hAsync("svg", { key: 'a0ce2abe404ba2aa2d3d08738b130a333990ad75', x: "40.5", y: "3.5", height: "100" }, hAsync("rect", { key: '51cc93247982b30b6c340385d86f7e81b13265aa', width: "5", height: "30" }), hAsync("rect", { key: 'a39a2992ab3ea869026c065b9d85b6eb6552fc17', y: "30", width: "5", height: "30", fill: "red" }), hAsync("rect", { key: '7be8ea205996ee15a2969e68547ff93d4c32b02e', y: "60", width: "5", height: "30", fill: "#fc0" })), hAsync("svg", { key: 'fe5a7fcbf4e373e85cb0e42eb4766f53d0369161', x: "50", y: "0" }, hAsync("text", { key: 'a48b054b6c6cd67d5d55895d3c5d78434737ee6b', x: "0", y: "-0.05em", "font-family": "BundesSans Web", style: { backgroundColor: 'white', color: 'black' } }, BUND_LOGO_TEXT_MAP.has(this.state._org) ? (hAsync("tspan", null, (_a = BUND_LOGO_TEXT_MAP.get(this.state._org)) === null || _a === void 0 ? void 0 : _a.map((text, index) => {
|
|
20153
20021
|
return (hAsync("tspan", { x: "0", dy: "1.1em", key: `kol-logo-text-${index}` }, text));
|
|
20154
20022
|
}))) : (hAsync("tspan", { fill: "red" }, hAsync("tspan", { x: "0", dy: "1.1em" }, "Der Schl\u00FCsselwert"), hAsync("tspan", { x: "0", dy: "1.1em", "font-weight": "bold" }, "'", this.state._org, "'"), hAsync("tspan", { x: "0", dy: "1.1em" }, "ist nicht definiert."), hAsync("tspan", { x: "0", dy: "1.1em" }, "oder freigegeben."))))))));
|
|
20155
20023
|
}
|
|
@@ -20321,16 +20189,16 @@ class KolModal {
|
|
|
20321
20189
|
}
|
|
20322
20190
|
}
|
|
20323
20191
|
render() {
|
|
20324
|
-
return (hAsync(Host, { key: '
|
|
20192
|
+
return (hAsync(Host, { key: 'cdf90127b1e3a6494acc2cd6f9e70245f0e78327', class: "kol-modal", ref: (el) => {
|
|
20325
20193
|
this.hostElement = el;
|
|
20326
|
-
} }, this.state._activeElement && (hAsync("div", { key: '
|
|
20194
|
+
} }, this.state._activeElement && (hAsync("div", { key: '786de2516f2d40b3d31fa8fd89e905bf4d05c35f', class: "overlay" }, hAsync("div", { key: '22425204eaa3a2a133c8ea8e272356d0ffcb4aee', class: "modal", style: {
|
|
20327
20195
|
width: this.state._width,
|
|
20328
20196
|
}, "aria-label": this.state._label, "aria-modal": "true", role: "dialog", onKeyDown: this.onKeyDown, ref: (el) => {
|
|
20329
20197
|
if (el) {
|
|
20330
20198
|
el.setAttribute('tabindex', '0');
|
|
20331
20199
|
setTimeout(() => el.focus(), 250);
|
|
20332
20200
|
}
|
|
20333
|
-
} }, hAsync("slot", { key: '
|
|
20201
|
+
} }, hAsync("slot", { key: '9762249853efc9159e664ff78bbb503fe7165d4e' }))))));
|
|
20334
20202
|
}
|
|
20335
20203
|
validateActiveElement(value) {
|
|
20336
20204
|
watchValidator(this, '_activeElement', (value) => typeof value === 'object' || value === null, new Set(['HTMLElement', 'null']), value, {
|
|
@@ -20505,11 +20373,11 @@ class KolNav {
|
|
|
20505
20373
|
const collapsible = this.state._collapsible === true;
|
|
20506
20374
|
const hideLabel = this.state._hideLabel === true;
|
|
20507
20375
|
const orientation = this.state._orientation;
|
|
20508
|
-
return (hAsync(Host, { key: '
|
|
20376
|
+
return (hAsync(Host, { key: 'e1283eeb0574940f509d54be36e39b04bb961da4', class: "kol-nav" }, hAsync("div", { key: '1c46dd45b99ca748a2624d17f359a3cfc7809852', class: {
|
|
20509
20377
|
nav: true,
|
|
20510
20378
|
[orientation]: true,
|
|
20511
20379
|
'is-compact': this.state._hideLabel,
|
|
20512
|
-
} }, hAsync("nav", { key: '
|
|
20380
|
+
} }, hAsync("nav", { key: 'd23205b77dfed032f7f44f2e7d36bce5450c7ac2', "aria-label": this.state._label, id: "nav" }, hAsync(this.linkList, { key: 'bb988b5cea41ad49060a4b5e5081bae0eae1576c', collapsible: collapsible, hideLabel: hideLabel, deep: 0, links: this.state._links, orientation: orientation })), hasCompactButton && (hAsync("div", { key: 'ea122511b46cddbb705f829c2edb2a75c951c2b7', class: "compact" }, hAsync(KolButtonTag, { key: '0e8c5c86aea8f2c626c62b5eba3e8dfe2b4e45c7', _ariaControls: "nav", _ariaExpanded: !hideLabel, _icons: hideLabel ? 'codicon codicon-chevron-right' : 'codicon codicon-chevron-left', _hideLabel: true, _label: translate(hideLabel ? 'kol-nav-maximize' : 'kol-nav-minimize'), _on: {
|
|
20513
20381
|
onClick: () => {
|
|
20514
20382
|
this.state = Object.assign(Object.assign({}, this.state), { _hideLabel: this.state._hideLabel === false });
|
|
20515
20383
|
},
|
|
@@ -22981,7 +22849,7 @@ class KolPopover {
|
|
|
22981
22849
|
});
|
|
22982
22850
|
}
|
|
22983
22851
|
render() {
|
|
22984
|
-
return (hAsync(Host, { key: '
|
|
22852
|
+
return (hAsync(Host, { key: '300c5938b894d91a742353f79f6a96da6f4fc59f', ref: this.catchHostAndTriggerElement, class: "kol-popover-wc" }, hAsync("div", { key: 'f1141877e7fe0cf9118e32012dcbaccf443d6067', class: { popover: true, hidden: !this.state._show, show: this.state._visible }, ref: this.catchPopoverElement }, hAsync("div", { key: 'a4d43160414c7a0ed78edd1c7a04b88446c77e63', class: `arrow ${this.state._align}`, ref: this.catchArrowElement }), hAsync("slot", { key: '8a65a9097d526128e6b548133f98eb7578314944' }))));
|
|
22985
22853
|
}
|
|
22986
22854
|
validateAlign(value) {
|
|
22987
22855
|
validateAlign(this, value);
|
|
@@ -23057,7 +22925,7 @@ class KolProcess {
|
|
|
23057
22925
|
};
|
|
23058
22926
|
}
|
|
23059
22927
|
render() {
|
|
23060
|
-
return (hAsync(Host, { key: '
|
|
22928
|
+
return (hAsync(Host, { key: '1b2fd8a4d1aa5c22458d9bdfc9a4e5dd445fad4b', class: "kol-progress" }, createProgressSVG(this.state), hAsync("progress", { key: '7bae4af9ebda7668022a90cc52706b849618c03f', "aria-busy": this.state._value < this.state._max ? 'true' : 'false', max: this.state._max, value: this.state._value }), hAsync("span", { key: 'c9195793cc06eac202d9e760d7613a7441492e0f', "aria-live": "polite", "aria-relevant": "removals text", class: "visually-hidden" }, this.state._liveValue, " von ", this.state._max, " ", this.state._unit)));
|
|
23061
22929
|
}
|
|
23062
22930
|
validateLabel(value) {
|
|
23063
22931
|
validateLabel(this, value);
|
|
@@ -23166,9 +23034,9 @@ class KolQuote {
|
|
|
23166
23034
|
}
|
|
23167
23035
|
render() {
|
|
23168
23036
|
const hasExpertSlot = showExpertSlot(this.state._quote);
|
|
23169
|
-
return (hAsync(Host, { key: '
|
|
23037
|
+
return (hAsync(Host, { key: '06071e4062c3dad31dc54678b3809cda9d97bec3', class: "kol-quote" }, hAsync("figure", { key: 'a1ddfd8830f510be2acb2511e142168e9c57435a', class: {
|
|
23170
23038
|
[this.state._variant]: true,
|
|
23171
|
-
} }, this.state._variant === 'block' ? (hAsync("blockquote", { cite: this.state._href }, this.state._quote, hAsync("span", { "aria-hidden": !hasExpertSlot ? 'true' : undefined, hidden: !hasExpertSlot }, hAsync("slot", { name: "expert" })))) : (hAsync("q", { cite: this.state._href }, this.state._quote, hAsync("span", { "aria-hidden": !hasExpertSlot ? 'true' : undefined, hidden: !hasExpertSlot }, hAsync("slot", { name: "expert" })))), typeof this.state._label === 'string' && this.state._label.length > 0 && (hAsync("figcaption", { key: '
|
|
23039
|
+
} }, this.state._variant === 'block' ? (hAsync("blockquote", { cite: this.state._href }, this.state._quote, hAsync("span", { "aria-hidden": !hasExpertSlot ? 'true' : undefined, hidden: !hasExpertSlot }, hAsync("slot", { name: "expert" })))) : (hAsync("q", { cite: this.state._href }, this.state._quote, hAsync("span", { "aria-hidden": !hasExpertSlot ? 'true' : undefined, hidden: !hasExpertSlot }, hAsync("slot", { name: "expert" })))), typeof this.state._label === 'string' && this.state._label.length > 0 && (hAsync("figcaption", { key: '27b79e60e46de28765eefaf8859bf54ab2cc0596' }, hAsync("cite", { key: '3522b8bdb372c71e24d1bed45616326f535e7a4f' }, hAsync(KolLinkTag, { key: '3a5fb98869d14d343a7b184d887d057ae6e6cc2b', _href: this.state._href, _label: this.state._label, _target: "_blank" })))))));
|
|
23172
23040
|
}
|
|
23173
23041
|
static get watchers() { return {
|
|
23174
23042
|
"_label": ["validateLabel"],
|
|
@@ -23309,10 +23177,10 @@ class KolSelect {
|
|
|
23309
23177
|
render() {
|
|
23310
23178
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
23311
23179
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
23312
|
-
return (hAsync(Host, { key: '
|
|
23180
|
+
return (hAsync(Host, { key: '281965cb420409ea118d2a8b70f5cd08d9d9bd00', class: { 'kol-select': true, 'has-value': this.state._hasValue } }, hAsync(KolInputTag, { key: 'd64734967e6f8c8670b4fce43656c0ed6e968067', class: {
|
|
23313
23181
|
'hide-label': !!this.state._hideLabel,
|
|
23314
23182
|
select: true,
|
|
23315
|
-
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _msg: this.state._msg, _required: this.state._required, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '
|
|
23183
|
+
}, _accessKey: this.state._accessKey, _disabled: this.state._disabled, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _icons: this.state._icons, _id: this.state._id, _label: this.state._label, _msg: this.state._msg, _required: this.state._required, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: '3d6e5e1d5078fcc8b887a31a6d830f11c9ba7191', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: '018c2855120bc9774e561195cd73add25131b756', slot: "input" }, hAsync("select", Object.assign({ key: '017a457ddff0db9a6d9e0ee432693705be666ea4', ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, multiple: this.state._multiple, name: this.state._name, required: this.state._required, size: this.state._rows, spellcheck: "false" }, this.controller.onFacade, { onInput: this.onInput.bind(this), onChange: this.onChange.bind(this) }), this.state._options.map((option, index) => {
|
|
23316
23184
|
const key = `-${index}`;
|
|
23317
23185
|
if (Array.isArray(option.options)) {
|
|
23318
23186
|
return this.renderOptgroup(option, key);
|
|
@@ -23526,7 +23394,7 @@ class KolSkipNav {
|
|
|
23526
23394
|
};
|
|
23527
23395
|
}
|
|
23528
23396
|
render() {
|
|
23529
|
-
return (hAsync(Host, { key: '
|
|
23397
|
+
return (hAsync(Host, { key: '62f4060670b0fed1dc581206f5f36df9704d7656', class: "kol-skip-nav" }, hAsync("nav", { key: '15f57db51b516c5b8909cad29e7119f083e39c25', "aria-label": this.state._label }, hAsync("ul", { key: 'e05945c95e92c1c673a53e241ff7d262d5fa3bd4' }, this.state._links.map((link, index) => {
|
|
23530
23398
|
return (hAsync("li", { key: index }, hAsync(KolLinkWcTag, Object.assign({}, link))));
|
|
23531
23399
|
})))));
|
|
23532
23400
|
}
|
|
@@ -23582,7 +23450,7 @@ class KolSpan {
|
|
|
23582
23450
|
this._label = undefined;
|
|
23583
23451
|
}
|
|
23584
23452
|
render() {
|
|
23585
|
-
return (hAsync(KolSpanWcTag, { key: '
|
|
23453
|
+
return (hAsync(KolSpanWcTag, { key: 'ee9f6e5d82f7ec05e39bf110b919fcddc151e51c', _icons: this._icons, _hideLabel: this._hideLabel, _label: this._label, _accessKey: this._accessKey, class: "kol-span" }, hAsync("slot", { key: 'c2e215b6a57d768e70838584bef7f68f16869c05', name: "expert", slot: "expert" })));
|
|
23586
23454
|
}
|
|
23587
23455
|
static get style() { return {
|
|
23588
23456
|
default: KolSpanDefaultStyle0
|
|
@@ -31946,10 +31814,10 @@ class KolSpanWc {
|
|
|
31946
31814
|
render() {
|
|
31947
31815
|
var _a, _b, _c, _d, _e;
|
|
31948
31816
|
const hideExpertSlot = !showExpertSlot(this.state._label);
|
|
31949
|
-
return (hAsync(Host, { key: '
|
|
31817
|
+
return (hAsync(Host, { key: 'e510f5dc275004bb1201d767d3c4f6b1b111bdab', class: {
|
|
31950
31818
|
'kol-span-wc': true,
|
|
31951
31819
|
'hide-label': !!this.state._hideLabel,
|
|
31952
|
-
} }, this.state._icons.top && (hAsync(KolIconTag, { key: '
|
|
31820
|
+
} }, this.state._icons.top && (hAsync(KolIconTag, { key: '2554e38751a822efe5e7150a19083ee0a911da4c', class: "icon top", style: this.state._icons.top.style, _label: (_a = this.state._icons.top.label) !== null && _a !== void 0 ? _a : '', _icons: this.state._icons.top.icon })), hAsync("span", { key: 'ce63ae4e376293fb190d7100e691a9ebadd6d260' }, this.state._icons.left && (hAsync(KolIconTag, { key: '5adba55d5d8b919c9c800642ab1d7951304f956e', class: "icon left", style: this.state._icons.left.style, _label: (_b = this.state._icons.left.label) !== null && _b !== void 0 ? _b : '', _icons: this.state._icons.left.icon })), !this.state._hideLabel && hideExpertSlot ? (this.state._allowMarkdown && typeof this.state._label === 'string' && this.state._label.length > 0 ? (hAsync("span", { class: "span-label md", innerHTML: md(this.state._label) })) : (hAsync("span", { class: "span-label" }, this.state._accessKey && this.state._label.length ? (hAsync(InternalUnderlinedAccessKey, { label: this.state._label, accessKey: this.state._accessKey })) : ((_c = this.state._label) !== null && _c !== void 0 ? _c : '')))) : (''), hAsync("span", { key: '74d5b1e1b8ec86eb74195f6a53ae0dd817c6afbc', "aria-hidden": hideExpertSlot ? 'true' : undefined, class: "span-label", hidden: hideExpertSlot }, hAsync("slot", { key: '436b3c15ff051a5dfb143f31f4c2d179166a6a42', name: "expert" })), this.state._accessKey && (hAsync("span", { key: 'cfc776df99c587e283569617f2b2e99f99e9c8ac', class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey)), this.state._icons.right && (hAsync(KolIconTag, { key: 'a0e42c2487db4cb4b5cc3449e58aece39411c741', class: "icon right", style: this.state._icons.right.style, _label: (_d = this.state._icons.right.label) !== null && _d !== void 0 ? _d : '', _icons: this.state._icons.right.icon }))), this.state._icons.bottom && (hAsync(KolIconTag, { key: 'c87ec45ce7ed99f51a23586ab033130763e96164', class: "icon bottom", style: this.state._icons.bottom.style, _label: (_e = this.state._icons.bottom.label) !== null && _e !== void 0 ? _e : '', _icons: this.state._icons.bottom.icon }))));
|
|
31953
31821
|
}
|
|
31954
31822
|
validateAccessKey(value) {
|
|
31955
31823
|
validateAccessKey(this, value);
|
|
@@ -32027,7 +31895,7 @@ class KolSpin {
|
|
|
32027
31895
|
};
|
|
32028
31896
|
}
|
|
32029
31897
|
render() {
|
|
32030
|
-
return (hAsync(Host, { key: '
|
|
31898
|
+
return (hAsync(Host, { key: 'f53191060ef62b54c4ffdee2c31994a5b336cc42', class: "kol-spin" }, this.state._show ? (hAsync("span", { "aria-busy": "true", "aria-label": translate('kol-action-running'), "aria-live": "polite", class: {
|
|
32031
31899
|
spin: true,
|
|
32032
31900
|
[this.state._variant]: true,
|
|
32033
31901
|
}, role: "alert" }, renderSpin(this.state._variant))) : (this.showToggled && hAsync("span", { "aria-label": translate('kol-action-done'), "aria-busy": "false", "aria-live": "polite", role: "alert" }))));
|
|
@@ -32133,12 +32001,12 @@ class KolSplitButton {
|
|
|
32133
32001
|
}
|
|
32134
32002
|
render() {
|
|
32135
32003
|
const i18nDropdownLabel = 'kol-split-button-dropdown-label';
|
|
32136
|
-
return (hAsync(Host, { key: '
|
|
32004
|
+
return (hAsync(Host, { key: '577e9b8c7a01714e07fda6c20be8b550ceec7a41', class: "kol-split-button" }, hAsync(KolButtonWcTag, { key: 'aa76711ab35310847527db57f8d0eef9d8335e66', class: {
|
|
32137
32005
|
'main-button': true,
|
|
32138
32006
|
button: true,
|
|
32139
32007
|
[this._variant]: this._variant !== 'custom',
|
|
32140
32008
|
[this._customClass]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,
|
|
32141
|
-
}, _ariaControls: this._ariaControls, _ariaExpanded: this._ariaExpanded, _ariaSelected: this._ariaSelected, _customClass: this._customClass, _disabled: this._disabled, _icons: this._icons, _hideLabel: this._hideLabel, _label: this._label, _name: this._name, _on: this.clickButtonHandler, _role: this._role, _syncValueBySelector: this._syncValueBySelector, _tabIndex: this._tabIndex, _tooltipAlign: this._tooltipAlign, _type: this._type, _value: this._value, _variant: this._variant }), hAsync("div", { key: '
|
|
32009
|
+
}, _ariaControls: this._ariaControls, _ariaExpanded: this._ariaExpanded, _ariaSelected: this._ariaSelected, _customClass: this._customClass, _disabled: this._disabled, _icons: this._icons, _hideLabel: this._hideLabel, _label: this._label, _name: this._name, _on: this.clickButtonHandler, _role: this._role, _syncValueBySelector: this._syncValueBySelector, _tabIndex: this._tabIndex, _tooltipAlign: this._tooltipAlign, _type: this._type, _value: this._value, _variant: this._variant }), hAsync("div", { key: '4c1c1b823d00042ab3994a1977bc7e56a349d0eb', class: "horizontal-line" }), hAsync(KolButtonWcTag, { key: '68e6c444187f0c23a1826525fc6e2aa75656225b', class: "secondary-button", _disabled: this._disabled, _hideLabel: true, _icons: "codicon codicon-triangle-down", _label: this.state._show ? translate(`${i18nDropdownLabel}-close`) : translate(`${i18nDropdownLabel}-open`), _on: this.clickToggleHandler }), hAsync("div", { key: 'd4d0c8ade557050fae42d93b9aa62c0f88eae065', class: "popover", ref: this.catchDropdownElements }, hAsync("div", { key: '2746ac0256c4527da54f26f8a45ae1616ab396cb', class: "popover-content" }, hAsync("slot", { key: 'dd32316292731dad9385af76f50e605db6098013' })))));
|
|
32142
32010
|
}
|
|
32143
32011
|
static get style() { return {
|
|
32144
32012
|
default: KolSplitButtonDefaultStyle0
|
|
@@ -32184,7 +32052,7 @@ class KolSymbol {
|
|
|
32184
32052
|
};
|
|
32185
32053
|
}
|
|
32186
32054
|
render() {
|
|
32187
|
-
return (hAsync(Host, { key: '
|
|
32055
|
+
return (hAsync(Host, { key: 'fd0af666653696ea6411cd6d9725c02c7b043aac', class: "kol-symbol" }, hAsync("span", { key: 'e8bf06ac3129716bce0a1138e7ee9fc12d7ba669', "aria-label": this.state._label, role: "term" }, this.state._symbol)));
|
|
32188
32056
|
}
|
|
32189
32057
|
validateLabel(value) {
|
|
32190
32058
|
validateLabel(this, value, {
|
|
@@ -32231,7 +32099,7 @@ class KolTable {
|
|
|
32231
32099
|
this._paginationPosition = 'bottom';
|
|
32232
32100
|
}
|
|
32233
32101
|
render() {
|
|
32234
|
-
return (hAsync(KolTableStatefulTag, { key: '
|
|
32102
|
+
return (hAsync(KolTableStatefulTag, { key: '2fa55ce67702810dbcead3fbc5416da5333a83a8', _allowMultiSort: this._allowMultiSort, _data: this._data, _dataFoot: this._dataFoot, _headers: this._headers, _label: this._label, _minWidth: this._minWidth, _pagination: this._pagination, _paginationPosition: this._paginationPosition }));
|
|
32235
32103
|
}
|
|
32236
32104
|
static get cmpMeta() { return {
|
|
32237
32105
|
"$flags$": 9,
|
|
@@ -32565,7 +32433,7 @@ class KolTableStateful {
|
|
|
32565
32433
|
horizontal: (_c = this.state._headers.horizontal) === null || _c === void 0 ? void 0 : _c.map((row) => row.map((cell) => (Object.assign(Object.assign({}, cell), { sortDirection: this.getHeaderCellSortState(cell) })))),
|
|
32566
32434
|
vertical: (_d = this.state._headers.vertical) === null || _d === void 0 ? void 0 : _d.map((column) => column.map((cell) => (Object.assign(Object.assign({}, cell), { sortDirection: this.getHeaderCellSortState(cell) })))),
|
|
32567
32435
|
};
|
|
32568
|
-
return (hAsync(Host, { key: '
|
|
32436
|
+
return (hAsync(Host, { key: '541f6b9870f00c0055d3aee0f17f98ada2dbcf50', class: "kol-table-stateful" }, this.pageEndSlice > 0 && this.showPagination && paginationTop, hAsync(KolTableStatelessTag, { key: '40d80660d9e9e5dd5be33035f7e311178dc4e9c6', _data: displayedData, _headerCells: headerCells, _label: this.state._label, _dataFoot: this.state._dataFoot, _minWidth: this.state._minWidth, _on: {
|
|
32569
32437
|
onSort: (_, payload) => {
|
|
32570
32438
|
this.handleSort(payload);
|
|
32571
32439
|
},
|
|
@@ -32618,7 +32486,7 @@ class KolTableStateless$1 {
|
|
|
32618
32486
|
this._on = undefined;
|
|
32619
32487
|
}
|
|
32620
32488
|
render() {
|
|
32621
|
-
return (hAsync(Host, { key: '
|
|
32489
|
+
return (hAsync(Host, { key: '5a8bbdc836f6588ca1124b93d9214f772e28166c', class: "kol-table-stateless" }, hAsync(KolTableStatelessWcTag, { key: 'c3b088e32b37a9736925366d2fa03b8b5f8366e1', _data: this._data, _dataFoot: this._dataFoot, _headerCells: this._headerCells, _label: this._label, _minWidth: this._minWidth, _on: this._on })));
|
|
32622
32490
|
}
|
|
32623
32491
|
static get style() { return {
|
|
32624
32492
|
default: KolTableStatelessDefaultStyle0
|
|
@@ -32929,9 +32797,9 @@ class KolTableStateless {
|
|
|
32929
32797
|
}
|
|
32930
32798
|
render() {
|
|
32931
32799
|
const dataField = this.createDataField(this.state._data, this.state._headerCells);
|
|
32932
|
-
return (hAsync(Host, { key: '
|
|
32800
|
+
return (hAsync(Host, { key: 'c9b39f96474ce8823023d795cc6e0045a6274f6f', class: "kol-table-stateless" }, hAsync("div", { key: '74701c4df7b4893d3aaa3b0076833bf4387d81bf', ref: (element) => (this.tableDivElement = element), class: "table", tabindex: this.tableDivElementHasScrollbar ? '-1' : undefined }, hAsync("table", { key: '3d2c8cf625a7691d27b8bef847eea6b78c189fa3', style: {
|
|
32933
32801
|
minWidth: this.state._minWidth,
|
|
32934
|
-
} }, hAsync("div", { key: '
|
|
32802
|
+
} }, hAsync("div", { key: '6e2102c988e7d10aeef90b98d0e79c98f4bd0ccf', class: "focus-element", tabindex: this.tableDivElementHasScrollbar ? '0' : undefined, "aria-describedby": "caption" }, "\u00A0"), hAsync("caption", { key: '12d75c33f91621cf233473d4e7c3cf615e4fa0e9', id: "caption" }, this.state._label), Array.isArray(this.state._headerCells.horizontal) && (hAsync("thead", { key: '3cd7592b87e9169a1f073d38dbf1cd304500bd15' }, this.state._headerCells.horizontal.map((cols, rowIndex) => (hAsync("tr", { key: `thead-${rowIndex}` }, cols.map((cell, colIndex) => {
|
|
32935
32803
|
if (cell.asTd === true) {
|
|
32936
32804
|
return (hAsync("td", { key: `thead-${rowIndex}-${colIndex}-${cell.label}`, class: {
|
|
32937
32805
|
[cell.textAlign]: typeof cell.textAlign === 'string' && cell.textAlign.length > 0,
|
|
@@ -32947,7 +32815,7 @@ class KolTableStateless {
|
|
|
32947
32815
|
else {
|
|
32948
32816
|
return this.renderHeadingCell(cell, rowIndex, colIndex);
|
|
32949
32817
|
}
|
|
32950
|
-
})))))), hAsync("tbody", { key: '
|
|
32818
|
+
})))))), hAsync("tbody", { key: '3b77b39bdaab0c831a45d23355dd265028f6dbb1' }, dataField.map(this.renderTableRow)), this.renderFoot()))));
|
|
32951
32819
|
}
|
|
32952
32820
|
static get watchers() { return {
|
|
32953
32821
|
"_data": ["validateData"],
|
|
@@ -33125,11 +32993,11 @@ class KolTabs {
|
|
|
33125
32993
|
} }))));
|
|
33126
32994
|
}
|
|
33127
32995
|
render() {
|
|
33128
|
-
return (hAsync(Host, { key: '
|
|
32996
|
+
return (hAsync(Host, { key: 'e36b32000d1ea25d35f8fba6f67a5c6aa57543b8', class: "kol-tabs" }, hAsync("div", { key: '37f564d3a8f5998a277293e8d2100de5f6efc99e', ref: (el) => {
|
|
33129
32997
|
this.tabPanelsElement = el;
|
|
33130
32998
|
}, class: {
|
|
33131
32999
|
[`tabs-align-${this.state._align}`]: true,
|
|
33132
|
-
} }, this.renderButtonGroup(), hAsync("div", { key: '
|
|
33000
|
+
} }, this.renderButtonGroup(), hAsync("div", { key: '8acaea80ef08b28174c3502d8b502c8b7abb1008', class: "tabs-content", ref: this.catchTabPanelHost }))));
|
|
33133
33001
|
}
|
|
33134
33002
|
validateAlign(value) {
|
|
33135
33003
|
validateAlign(this, value);
|
|
@@ -33334,7 +33202,7 @@ class KolTextarea {
|
|
|
33334
33202
|
render() {
|
|
33335
33203
|
const { ariaDescribedBy } = getRenderStates(this.state);
|
|
33336
33204
|
const hasExpertSlot = showExpertSlot(this.state._label);
|
|
33337
|
-
return (hAsync(Host, { key: '
|
|
33205
|
+
return (hAsync(Host, { key: '67bb77454b3cdaf1c8a59d8922f96cf1f6fad122', class: { 'kol-textarea': true, 'has-value': this.state._hasValue } }, hAsync(KolInputTag, { key: '144962ff9ceae7342e7f77b0d571ffe1da7d5d91', class: { textarea: true, 'hide-label': !!this.state._hideLabel, 'has-counter': !!this.state._hasCounter }, _accessKey: this.state._accessKey, _alert: this.state._alert, _currentLength: this.state._currentLength, _disabled: this.state._disabled, _hideError: this.state._hideError, _hasCounter: this.state._hasCounter, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _id: this.state._id, _label: this.state._label, _maxLength: this.state._maxLength, _msg: this.state._msg, _readOnly: this.state._readOnly, _required: this.state._required, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched, onClick: () => { var _a; return (_a = this.ref) === null || _a === void 0 ? void 0 : _a.focus(); }, role: `presentation` }, hAsync("span", { key: 'c984e1c64ca8fcfe4461d9fa58d46c61e4172d33', slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { key: '2ad8230de55cc7383a7155bb990a39742619f74a', slot: "input" }, hAsync("textarea", Object.assign({ key: '940a4da1e41065482cd18a80f1582ba203721af7', ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, autoCapitalize: "off", autoCorrect: "off", disabled: this.state._disabled, id: this.state._id, maxlength: this.state._maxLength, name: this.state._name, readOnly: this.state._readOnly, required: this.state._required, rows: this.state._rows, placeholder: this.state._placeholder, spellcheck: "false" }, this.controller.onFacade, { onInput: this.onInput, style: {
|
|
33338
33206
|
resize: this.state._resize,
|
|
33339
33207
|
}, value: this.state._value }))))));
|
|
33340
33208
|
}
|
|
@@ -33601,7 +33469,7 @@ class KolToastContainer {
|
|
|
33601
33469
|
}
|
|
33602
33470
|
}
|
|
33603
33471
|
render() {
|
|
33604
|
-
return (hAsync(Host, { key: '
|
|
33472
|
+
return (hAsync(Host, { key: '4b44fe3b919950fa399f60e3c0e678e50274ca81', class: "kol-toast-container" }, this.state._toastStates.length > 1 && (hAsync(KolButtonTag, { key: 'f9c329569fc33360f6730a6c4bbcf9eb5e2fc67b', _label: translate('kol-toast-close-all'), class: "close-all", _on: {
|
|
33605
33473
|
onClick: () => {
|
|
33606
33474
|
void this.closeAll();
|
|
33607
33475
|
},
|
|
@@ -33755,7 +33623,7 @@ class KolTooltip {
|
|
|
33755
33623
|
this.showOrHideTooltip();
|
|
33756
33624
|
}
|
|
33757
33625
|
render() {
|
|
33758
|
-
return (hAsync(Host, { key: '
|
|
33626
|
+
return (hAsync(Host, { key: '2838ea3d5f84699772717fd00308bb63e190c5b5', class: "kol-tooltip-wc" }, this.state._label !== '' && (hAsync("div", { key: 'd0140b5288f11f179ebe4956018a9592f890dcb1', class: "tooltip-floating", ref: this.catchTooltipElement }, hAsync("div", { key: '7702db6cbcb4bc11d2ad5707f6ed74361825d0ab', class: "tooltip-area tooltip-arrow", ref: this.catchArrowElement }), hAsync(KolSpanWcTag, { key: 'c056746633c094caf92e3f48dfd728fb33d8c922', class: "tooltip-area tooltip-content", id: this.state._id, _accessKey: this._accessKey, _label: this.state._label })))));
|
|
33759
33627
|
}
|
|
33760
33628
|
validateAccessKey(value) {
|
|
33761
33629
|
validateAccessKey(this, value);
|
|
@@ -33834,7 +33702,7 @@ class KolTree {
|
|
|
33834
33702
|
this._label = undefined;
|
|
33835
33703
|
}
|
|
33836
33704
|
render() {
|
|
33837
|
-
return (hAsync(Host, { key: '
|
|
33705
|
+
return (hAsync(Host, { key: 'b8f702c2c3a146c116716fefc665a3868be8c43c', class: "kol-tree" }, hAsync(KolTreeWcTag, { key: 'd4c1893cc63355e9061792e297e6550e620f2887', _label: this._label }, hAsync("slot", { key: 'd60ceef03740e10316c0d282800b73965f6c48e0' }))));
|
|
33838
33706
|
}
|
|
33839
33707
|
static get style() { return {
|
|
33840
33708
|
default: KolTreeDefaultStyle0
|
|
@@ -33882,7 +33750,7 @@ class KolTreeItem {
|
|
|
33882
33750
|
return (_b = (await ((_a = this.element) === null || _a === void 0 ? void 0 : _a.isOpen()))) !== null && _b !== void 0 ? _b : false;
|
|
33883
33751
|
}
|
|
33884
33752
|
render() {
|
|
33885
|
-
return (hAsync(KolTreeItemWcTag, { key: '
|
|
33753
|
+
return (hAsync(KolTreeItemWcTag, { key: 'a69b8e45457c1e0e153610d0820dd6e2a93d6ea3', class: "kol-tree-item", _active: this._active, _label: this._label, _open: this._open, _href: this._href, ref: (element) => (this.element = element) }, hAsync("slot", { key: 'f9878c6fae30f9be9cfdb6074a41a2608244f2f7' })));
|
|
33886
33754
|
}
|
|
33887
33755
|
static get style() { return {
|
|
33888
33756
|
default: KolTreeItemDefaultStyle0
|
|
@@ -33922,11 +33790,11 @@ class KolTreeItemWc {
|
|
|
33922
33790
|
this._href = undefined;
|
|
33923
33791
|
}
|
|
33924
33792
|
render() {
|
|
33925
|
-
return (hAsync(Host, { key: '
|
|
33793
|
+
return (hAsync(Host, { key: '1011a3769ceefaf5be42707c8fbf8d390ba0d5e0', onSlotchange: this.handleSlotchange.bind(this), class: "kol-tree-item-wc" }, hAsync("li", { key: '47aac7e77d5cf17468692fe0049f47b92ec0794e', class: "tree-item" }, hAsync(KolLinkTag, { key: '8893830dd17d545cd41d97f616cbdf08ca36326a', class: {
|
|
33926
33794
|
'tree-link': true,
|
|
33927
33795
|
active: Boolean(this.state._active),
|
|
33928
|
-
}, _label: "", _href: this.state._href, ref: (element) => (this.linkElement = element), _tabIndex: this.state._active ? 0 : -1 }, hAsync("span", { key: '
|
|
33929
|
-
(this.state._open ? (hAsync("span", { class: "toggle-button", onClick: (event) => void this.handleCollapseClick(event) }, "-")) : (hAsync("span", { class: "toggle-button", onClick: (event) => void this.handleExpandClick(event) }, "+"))), ' ', this.state._label)), hAsync("ul", { key: '
|
|
33796
|
+
}, _label: "", _href: this.state._href, ref: (element) => (this.linkElement = element), _tabIndex: this.state._active ? 0 : -1 }, hAsync("span", { key: '3d9dd2cc87cc41cad7cca4d3ccc981db0066e893', slot: "expert" }, this.state._hasChildren &&
|
|
33797
|
+
(this.state._open ? (hAsync("span", { class: "toggle-button", onClick: (event) => void this.handleCollapseClick(event) }, "-")) : (hAsync("span", { class: "toggle-button", onClick: (event) => void this.handleExpandClick(event) }, "+"))), ' ', this.state._label)), hAsync("ul", { key: 'aa684b3054ecefd83f212fcdb4890eeff1ce7545', hidden: !this.state._hasChildren || !this.state._open, role: "group" }, hAsync("slot", { key: '96503129fae60d97d8cc7e421c303a6f94840e02' })))));
|
|
33930
33798
|
}
|
|
33931
33799
|
validateActive(value) {
|
|
33932
33800
|
validateActive(this, value || false);
|
|
@@ -34022,7 +33890,7 @@ class KolTreeWc {
|
|
|
34022
33890
|
validateLabel(this, value);
|
|
34023
33891
|
}
|
|
34024
33892
|
render() {
|
|
34025
|
-
return (hAsync(Host, { key: '
|
|
33893
|
+
return (hAsync(Host, { key: '2a7d6c44d79e4865fbf43834a7c5e5eb09ad9302', onSlotchange: this.handleSlotchange.bind(this), class: "kol-tree-wc" }, hAsync("nav", { key: 'c06f3add4871974aa4e06c8ca0547a9c990efd8a', class: "tree", "aria-label": this.state._label }, hAsync("ul", { key: '8c0d782c7b0cf4bd88dbab8629738b60429a988c', class: "treeview-navigation", role: "tree", "aria-label": this.state._label }, hAsync("slot", { key: '11086a8f0d7cb80a187a459ff9e3dcff121310df' })))));
|
|
34026
33894
|
}
|
|
34027
33895
|
static isTreeItem(element) {
|
|
34028
33896
|
return (element === null || element === void 0 ? void 0 : element.tagName) === TREE_ITEM_TAG_NAME.toUpperCase();
|
|
@@ -34179,7 +34047,7 @@ class KolVersion {
|
|
|
34179
34047
|
};
|
|
34180
34048
|
}
|
|
34181
34049
|
render() {
|
|
34182
|
-
return (hAsync(Host, { key: '
|
|
34050
|
+
return (hAsync(Host, { key: '252159679fb88587d2ae6df7479df43f255ff3e2', class: "kol-version" }, hAsync(KolBadgeTag, { key: '2d2f8e44d6f08eedfe2e2e33ef3c8abec3ea8e1c', _color: "#bec5c9", _icons: {
|
|
34183
34051
|
left: { icon: 'codicon codicon-versions', label: translate('kol-version') },
|
|
34184
34052
|
}, _label: this.state._label })));
|
|
34185
34053
|
}
|