@public-ui/hydrate 2.2.1-daf78eefb286eb2b5af07293e65a52004723eadc.0 → 2.2.1-e6bb4064f6c9eed624b5929636c056bc0384b2af.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 +56 -37
- package/dist/index.mjs +56 -37
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2658,9 +2658,9 @@ var loglevel = {exports: {}};
|
|
|
2658
2658
|
}));
|
|
2659
2659
|
}(loglevel));
|
|
2660
2660
|
|
|
2661
|
-
var
|
|
2661
|
+
var m = loglevel.exports;
|
|
2662
2662
|
|
|
2663
|
-
const
|
|
2663
|
+
const H=new Map,M=[],Y=new Map,o$1={A11yUi:{CSS_STYLE_CACHE:H,HYDRATED_HISTORY:M,STYLING_TASK_QUEUE:Y,Themes:{}}};let g=!1;const I=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,O=e=>typeof e=="string"&&I.test(e),p=e=>{if(O(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]+)?$/`)},$=(e,t,s,n)=>T(e,t,s,n),T=(e,t,s,n)=>{n=n??{},n.append=n.append??!1,p(e),g===!1&&(g=!0,m.warn(`[Theming] The theme process is locked. This means that the theme "${e}" should not be patched.
|
|
2664
2664
|
|
|
2665
2665
|
import { register } from 'adopted-style-sheets';
|
|
2666
2666
|
import { defineCustomElements } from '...';
|
|
@@ -2670,7 +2670,7 @@ const Y=new Map,I=[],O=new Map,o$1={A11yUi:{CSS_STYLE_CACHE:Y,HYDRATED_HISTORY:I
|
|
|
2670
2670
|
.then(() => {
|
|
2671
2671
|
// run your app or website
|
|
2672
2672
|
})
|
|
2673
|
-
.catch(console.warn);`)),(typeof o$1.A11yUi.Themes[e]!="object"||o$1.A11yUi.Themes[e]===null)&&(o$1.A11yUi.Themes[e]={})
|
|
2673
|
+
.catch(console.warn);`)),(typeof o$1.A11yUi.Themes[e]!="object"||o$1.A11yUi.Themes[e]===null)&&(o$1.A11yUi.Themes[e]={}),n.append&&typeof o$1.A11yUi.Themes[e][t]=="string"?o$1.A11yUi.Themes[e][t]+=s:o$1.A11yUi.Themes[e][t]=s;},k=(e,t,s,n)=>d(e,t,s,n),d=(e,t,s,n)=>(p(e),typeof t=="object"&&t!==null&&Object.getOwnPropertyNames(t).forEach(a=>{const r=t[a],i=a.toLowerCase(),c=typeof n?.transformTagName=="function"&&!["GLOBAL","PROPERTIES"].includes(a)?n.transformTagName(i):a;typeof r=="string"&&r.length>0&&T(e,c.toUpperCase(),r,s);}),e);const C=new Set,F=/--[^;]+/g,q=/:/,J=(e,t)=>{let s=t.match(F);if(Array.isArray(s)){s=s.filter(a=>q.test(a));const n=document.createElement("style");n.innerHTML=`.${e} {${s.join(";")}}`,document.querySelector("head")?.appendChild(n);}C.add(e);},l=(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,""):"",V=e=>{for(const t of Array.from(e.childNodes))if(t instanceof HTMLStyleElement&&t.tagName==="STYLE"&&t.dataset.themingFallback===void 0)e.removeChild(t);else break},W=(e,t)=>{try{if(o$1.A11yUi.Theme?.mode==="ssr")throw new Error("SSR");const s=[];t.forEach(n=>{const a=new CSSStyleSheet;a.replaceSync(n),s.push(a);}),e.adoptedStyleSheets=s;}catch{[...t].reverse().forEach((s,n)=>{if(typeof s!="string"||s.length===0)return;const a=document.createElement("style");switch(a.dataset.themingFallback="",n){case 4:a.dataset.themingBaseA11y="";break;case 3:a.dataset.themingBaseGlobal="";break;case 2:a.dataset.themingBaseComponent="";break;case 1:a.dataset.themingCustomGlobal="";break;case 0:a.dataset.themingCustomComponent="";break;default:a.dataset.themingUnknown="";break}a.innerHTML=s,e.insertBefore(a,e.firstChild);});}},X=(e,t,s)=>{if(s!==!1){const n=[...Array.from(e.childNodes).filter(r=>r instanceof HTMLStyleElement&&r.tagName==="STYLE")];let a;try{a=[...Array.from(e.adoptedStyleSheets)];}catch{a=[];}s?.mode==="before"?(n.reverse().forEach(r=>t.unshift(r.innerHTML)),a.reverse().forEach(r=>t.unshift(Array.from(r.cssRules).map(i=>i.cssText).join("")))):s?.mode==="after"&&(n.forEach(r=>t.push(r.innerHTML)),a.forEach(r=>t.push(Array.from(r.cssRules).map(i=>i.cssText).join(""))));}},w=(e,t)=>{const s=t.name||"default";let n;try{if(e.shadowRoot===null)throw new Error("ShadowRoot is null");n=e.shadowRoot;}catch{n=e;}if(o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.has(e.tagName))L(n,o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.get(e.tagName));else {const a=l(s,"PROPERTIES"),r=l(s,"GLOBAL"),i=l(s,e.tagName);C.has(s)===!1&&J(s,r);const c=[a,r,i];X(n,c,t.encroachCss),t.loglevel==="debug"&&console.log(e.tagName,c),t.cache===!0&&(o$1.A11yUi.CSS_STYLE_CACHE.has(s)===!1&&o$1.A11yUi.CSS_STYLE_CACHE.set(s,new Map),o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.set(e.tagName,c)),L(n,c);}},L=(e,t)=>{V(e),W(e,t);},_=e=>{e.loglevel==="debug"&&o$1.A11yUi.HYDRATED_HISTORY.push({timestamp:Date.now(),numberOfTasks:o$1.A11yUi.STYLING_TASK_QUEUE.size});},te=e=>{o$1.A11yUi.STYLING_TASK_QUEUE.delete(e);},v=(e,t)=>{te(e),_(t);},se=e=>{for(const t of e)if(o$1.A11yUi.STYLING_TASK_QUEUE.has(t.target)&&t.target.classList.contains("hydrated")){const{themeDetails:s}=o$1.A11yUi.STYLING_TASK_QUEUE.get(t.target);w(t.target,s),v(t.target,s);}};try{new MutationObserver(se);}catch{}
|
|
2674
2674
|
|
|
2675
2675
|
const alertTypeOptions = ['default', 'info', 'success', 'warning', 'error'];
|
|
2676
2676
|
const alertVariantOptions = ['card', 'msg'];
|
|
@@ -3745,9 +3745,9 @@ const koliBriQuerySelector = (selector, node) => querySelector(selector, node ||
|
|
|
3745
3745
|
const koliBriQuerySelectorAll = (selector, node) => querySelectorAll(selector, node || getDocument());
|
|
3746
3746
|
class KoliBriDevHelper {
|
|
3747
3747
|
}
|
|
3748
|
-
KoliBriDevHelper.getCssStyle =
|
|
3749
|
-
KoliBriDevHelper.patchTheme =
|
|
3750
|
-
KoliBriDevHelper.patchThemeTag =
|
|
3748
|
+
KoliBriDevHelper.getCssStyle = l;
|
|
3749
|
+
KoliBriDevHelper.patchTheme = k;
|
|
3750
|
+
KoliBriDevHelper.patchThemeTag = $;
|
|
3751
3751
|
KoliBriDevHelper.querySelector = koliBriQuerySelector;
|
|
3752
3752
|
KoliBriDevHelper.querySelectorAll = koliBriQuerySelectorAll;
|
|
3753
3753
|
KoliBriDevHelper.stringifyJson = stringifyJson;
|
|
@@ -4239,7 +4239,7 @@ const validateMsg = (component, value) => {
|
|
|
4239
4239
|
}
|
|
4240
4240
|
catch (e) {
|
|
4241
4241
|
}
|
|
4242
|
-
watchValidator(component, `_msg`, (value) =>
|
|
4242
|
+
watchValidator(component, `_msg`, (value) => isObject$1(value), new Set(['MsgPropType']), value);
|
|
4243
4243
|
});
|
|
4244
4244
|
};
|
|
4245
4245
|
|
|
@@ -6137,11 +6137,15 @@ class InputController extends ControlledInputController {
|
|
|
6137
6137
|
validateTooltipAlign(this.component, value);
|
|
6138
6138
|
}
|
|
6139
6139
|
validateError(value) {
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6140
|
+
if (typeof value === 'string' && value.length > 0) {
|
|
6141
|
+
this.validateMsg({
|
|
6142
|
+
_description: value,
|
|
6143
|
+
_type: 'error',
|
|
6144
|
+
});
|
|
6145
|
+
}
|
|
6146
|
+
else {
|
|
6147
|
+
this.validateMsg();
|
|
6148
|
+
}
|
|
6145
6149
|
}
|
|
6146
6150
|
validateHideError(value) {
|
|
6147
6151
|
validateHideError(this.component, value, {
|
|
@@ -6180,6 +6184,12 @@ class InputController extends ControlledInputController {
|
|
|
6180
6184
|
});
|
|
6181
6185
|
}
|
|
6182
6186
|
validateMsg(value) {
|
|
6187
|
+
if (value === undefined) {
|
|
6188
|
+
value = {
|
|
6189
|
+
_description: '',
|
|
6190
|
+
_type: 'error',
|
|
6191
|
+
};
|
|
6192
|
+
}
|
|
6183
6193
|
validateMsg(this.component, value);
|
|
6184
6194
|
}
|
|
6185
6195
|
validateOn(value) {
|
|
@@ -13526,6 +13536,31 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
13526
13536
|
});
|
|
13527
13537
|
}
|
|
13528
13538
|
|
|
13539
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
13540
|
+
// incorrect for RTL.
|
|
13541
|
+
function getWindowScrollBarX(element, rect) {
|
|
13542
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
13543
|
+
if (!rect) {
|
|
13544
|
+
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
13545
|
+
}
|
|
13546
|
+
return rect.left + leftScroll;
|
|
13547
|
+
}
|
|
13548
|
+
|
|
13549
|
+
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
13550
|
+
if (ignoreScrollbarX === void 0) {
|
|
13551
|
+
ignoreScrollbarX = false;
|
|
13552
|
+
}
|
|
13553
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
13554
|
+
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
|
|
13555
|
+
// RTL <body> scrollbar.
|
|
13556
|
+
getWindowScrollBarX(documentElement, htmlRect));
|
|
13557
|
+
const y = htmlRect.top + scroll.scrollTop;
|
|
13558
|
+
return {
|
|
13559
|
+
x,
|
|
13560
|
+
y
|
|
13561
|
+
};
|
|
13562
|
+
}
|
|
13563
|
+
|
|
13529
13564
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
13530
13565
|
let {
|
|
13531
13566
|
elements,
|
|
@@ -13557,11 +13592,12 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
13557
13592
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
13558
13593
|
}
|
|
13559
13594
|
}
|
|
13595
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
13560
13596
|
return {
|
|
13561
13597
|
width: rect.width * scale.x,
|
|
13562
13598
|
height: rect.height * scale.y,
|
|
13563
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
|
13564
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
|
13599
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
13600
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
13565
13601
|
};
|
|
13566
13602
|
}
|
|
13567
13603
|
|
|
@@ -13569,16 +13605,6 @@ function getClientRects(element) {
|
|
|
13569
13605
|
return Array.from(element.getClientRects());
|
|
13570
13606
|
}
|
|
13571
13607
|
|
|
13572
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
13573
|
-
// incorrect for RTL.
|
|
13574
|
-
function getWindowScrollBarX(element, rect) {
|
|
13575
|
-
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
13576
|
-
if (!rect) {
|
|
13577
|
-
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
13578
|
-
}
|
|
13579
|
-
return rect.left + leftScroll;
|
|
13580
|
-
}
|
|
13581
|
-
|
|
13582
13608
|
// Gets the entire size of the scrollable document area, even extending outside
|
|
13583
13609
|
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
13584
13610
|
function getDocumentRect(element) {
|
|
@@ -13653,9 +13679,10 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
13653
13679
|
} else {
|
|
13654
13680
|
const visualOffsets = getVisualOffsets(element);
|
|
13655
13681
|
rect = {
|
|
13656
|
-
...clippingAncestor,
|
|
13657
13682
|
x: clippingAncestor.x - visualOffsets.x,
|
|
13658
|
-
y: clippingAncestor.y - visualOffsets.y
|
|
13683
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
13684
|
+
width: clippingAncestor.width,
|
|
13685
|
+
height: clippingAncestor.height
|
|
13659
13686
|
};
|
|
13660
13687
|
}
|
|
13661
13688
|
return rectToClientRect(rect);
|
|
@@ -13765,17 +13792,9 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
13765
13792
|
offsets.x = getWindowScrollBarX(documentElement);
|
|
13766
13793
|
}
|
|
13767
13794
|
}
|
|
13768
|
-
|
|
13769
|
-
|
|
13770
|
-
|
|
13771
|
-
const htmlRect = documentElement.getBoundingClientRect();
|
|
13772
|
-
htmlY = htmlRect.top + scroll.scrollTop;
|
|
13773
|
-
htmlX = htmlRect.left + scroll.scrollLeft -
|
|
13774
|
-
// RTL <body> scrollbar.
|
|
13775
|
-
getWindowScrollBarX(documentElement, htmlRect);
|
|
13776
|
-
}
|
|
13777
|
-
const x = rect.left + scroll.scrollLeft - offsets.x - htmlX;
|
|
13778
|
-
const y = rect.top + scroll.scrollTop - offsets.y - htmlY;
|
|
13795
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
13796
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
13797
|
+
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
13779
13798
|
return {
|
|
13780
13799
|
x,
|
|
13781
13800
|
y,
|
package/dist/index.mjs
CHANGED
|
@@ -2654,9 +2654,9 @@ var loglevel = {exports: {}};
|
|
|
2654
2654
|
}));
|
|
2655
2655
|
}(loglevel));
|
|
2656
2656
|
|
|
2657
|
-
var
|
|
2657
|
+
var m = loglevel.exports;
|
|
2658
2658
|
|
|
2659
|
-
const
|
|
2659
|
+
const H=new Map,M=[],Y=new Map,o$1={A11yUi:{CSS_STYLE_CACHE:H,HYDRATED_HISTORY:M,STYLING_TASK_QUEUE:Y,Themes:{}}};let g=!1;const I=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,O=e=>typeof e=="string"&&I.test(e),p=e=>{if(O(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]+)?$/`)},$=(e,t,s,n)=>T(e,t,s,n),T=(e,t,s,n)=>{n=n??{},n.append=n.append??!1,p(e),g===!1&&(g=!0,m.warn(`[Theming] The theme process is locked. This means that the theme "${e}" should not be patched.
|
|
2660
2660
|
|
|
2661
2661
|
import { register } from 'adopted-style-sheets';
|
|
2662
2662
|
import { defineCustomElements } from '...';
|
|
@@ -2666,7 +2666,7 @@ const Y=new Map,I=[],O=new Map,o$1={A11yUi:{CSS_STYLE_CACHE:Y,HYDRATED_HISTORY:I
|
|
|
2666
2666
|
.then(() => {
|
|
2667
2667
|
// run your app or website
|
|
2668
2668
|
})
|
|
2669
|
-
.catch(console.warn);`)),(typeof o$1.A11yUi.Themes[e]!="object"||o$1.A11yUi.Themes[e]===null)&&(o$1.A11yUi.Themes[e]={})
|
|
2669
|
+
.catch(console.warn);`)),(typeof o$1.A11yUi.Themes[e]!="object"||o$1.A11yUi.Themes[e]===null)&&(o$1.A11yUi.Themes[e]={}),n.append&&typeof o$1.A11yUi.Themes[e][t]=="string"?o$1.A11yUi.Themes[e][t]+=s:o$1.A11yUi.Themes[e][t]=s;},k=(e,t,s,n)=>d(e,t,s,n),d=(e,t,s,n)=>(p(e),typeof t=="object"&&t!==null&&Object.getOwnPropertyNames(t).forEach(a=>{const r=t[a],i=a.toLowerCase(),c=typeof n?.transformTagName=="function"&&!["GLOBAL","PROPERTIES"].includes(a)?n.transformTagName(i):a;typeof r=="string"&&r.length>0&&T(e,c.toUpperCase(),r,s);}),e);const C=new Set,F=/--[^;]+/g,q=/:/,J=(e,t)=>{let s=t.match(F);if(Array.isArray(s)){s=s.filter(a=>q.test(a));const n=document.createElement("style");n.innerHTML=`.${e} {${s.join(";")}}`,document.querySelector("head")?.appendChild(n);}C.add(e);},l=(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,""):"",V=e=>{for(const t of Array.from(e.childNodes))if(t instanceof HTMLStyleElement&&t.tagName==="STYLE"&&t.dataset.themingFallback===void 0)e.removeChild(t);else break},W=(e,t)=>{try{if(o$1.A11yUi.Theme?.mode==="ssr")throw new Error("SSR");const s=[];t.forEach(n=>{const a=new CSSStyleSheet;a.replaceSync(n),s.push(a);}),e.adoptedStyleSheets=s;}catch{[...t].reverse().forEach((s,n)=>{if(typeof s!="string"||s.length===0)return;const a=document.createElement("style");switch(a.dataset.themingFallback="",n){case 4:a.dataset.themingBaseA11y="";break;case 3:a.dataset.themingBaseGlobal="";break;case 2:a.dataset.themingBaseComponent="";break;case 1:a.dataset.themingCustomGlobal="";break;case 0:a.dataset.themingCustomComponent="";break;default:a.dataset.themingUnknown="";break}a.innerHTML=s,e.insertBefore(a,e.firstChild);});}},X=(e,t,s)=>{if(s!==!1){const n=[...Array.from(e.childNodes).filter(r=>r instanceof HTMLStyleElement&&r.tagName==="STYLE")];let a;try{a=[...Array.from(e.adoptedStyleSheets)];}catch{a=[];}s?.mode==="before"?(n.reverse().forEach(r=>t.unshift(r.innerHTML)),a.reverse().forEach(r=>t.unshift(Array.from(r.cssRules).map(i=>i.cssText).join("")))):s?.mode==="after"&&(n.forEach(r=>t.push(r.innerHTML)),a.forEach(r=>t.push(Array.from(r.cssRules).map(i=>i.cssText).join(""))));}},w=(e,t)=>{const s=t.name||"default";let n;try{if(e.shadowRoot===null)throw new Error("ShadowRoot is null");n=e.shadowRoot;}catch{n=e;}if(o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.has(e.tagName))L(n,o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.get(e.tagName));else {const a=l(s,"PROPERTIES"),r=l(s,"GLOBAL"),i=l(s,e.tagName);C.has(s)===!1&&J(s,r);const c=[a,r,i];X(n,c,t.encroachCss),t.loglevel==="debug"&&console.log(e.tagName,c),t.cache===!0&&(o$1.A11yUi.CSS_STYLE_CACHE.has(s)===!1&&o$1.A11yUi.CSS_STYLE_CACHE.set(s,new Map),o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.set(e.tagName,c)),L(n,c);}},L=(e,t)=>{V(e),W(e,t);},_=e=>{e.loglevel==="debug"&&o$1.A11yUi.HYDRATED_HISTORY.push({timestamp:Date.now(),numberOfTasks:o$1.A11yUi.STYLING_TASK_QUEUE.size});},te=e=>{o$1.A11yUi.STYLING_TASK_QUEUE.delete(e);},v=(e,t)=>{te(e),_(t);},se=e=>{for(const t of e)if(o$1.A11yUi.STYLING_TASK_QUEUE.has(t.target)&&t.target.classList.contains("hydrated")){const{themeDetails:s}=o$1.A11yUi.STYLING_TASK_QUEUE.get(t.target);w(t.target,s),v(t.target,s);}};try{new MutationObserver(se);}catch{}
|
|
2670
2670
|
|
|
2671
2671
|
const alertTypeOptions = ['default', 'info', 'success', 'warning', 'error'];
|
|
2672
2672
|
const alertVariantOptions = ['card', 'msg'];
|
|
@@ -3741,9 +3741,9 @@ const koliBriQuerySelector = (selector, node) => querySelector(selector, node ||
|
|
|
3741
3741
|
const koliBriQuerySelectorAll = (selector, node) => querySelectorAll(selector, node || getDocument());
|
|
3742
3742
|
class KoliBriDevHelper {
|
|
3743
3743
|
}
|
|
3744
|
-
KoliBriDevHelper.getCssStyle =
|
|
3745
|
-
KoliBriDevHelper.patchTheme =
|
|
3746
|
-
KoliBriDevHelper.patchThemeTag =
|
|
3744
|
+
KoliBriDevHelper.getCssStyle = l;
|
|
3745
|
+
KoliBriDevHelper.patchTheme = k;
|
|
3746
|
+
KoliBriDevHelper.patchThemeTag = $;
|
|
3747
3747
|
KoliBriDevHelper.querySelector = koliBriQuerySelector;
|
|
3748
3748
|
KoliBriDevHelper.querySelectorAll = koliBriQuerySelectorAll;
|
|
3749
3749
|
KoliBriDevHelper.stringifyJson = stringifyJson;
|
|
@@ -4235,7 +4235,7 @@ const validateMsg = (component, value) => {
|
|
|
4235
4235
|
}
|
|
4236
4236
|
catch (e) {
|
|
4237
4237
|
}
|
|
4238
|
-
watchValidator(component, `_msg`, (value) =>
|
|
4238
|
+
watchValidator(component, `_msg`, (value) => isObject$1(value), new Set(['MsgPropType']), value);
|
|
4239
4239
|
});
|
|
4240
4240
|
};
|
|
4241
4241
|
|
|
@@ -6133,11 +6133,15 @@ class InputController extends ControlledInputController {
|
|
|
6133
6133
|
validateTooltipAlign(this.component, value);
|
|
6134
6134
|
}
|
|
6135
6135
|
validateError(value) {
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6136
|
+
if (typeof value === 'string' && value.length > 0) {
|
|
6137
|
+
this.validateMsg({
|
|
6138
|
+
_description: value,
|
|
6139
|
+
_type: 'error',
|
|
6140
|
+
});
|
|
6141
|
+
}
|
|
6142
|
+
else {
|
|
6143
|
+
this.validateMsg();
|
|
6144
|
+
}
|
|
6141
6145
|
}
|
|
6142
6146
|
validateHideError(value) {
|
|
6143
6147
|
validateHideError(this.component, value, {
|
|
@@ -6176,6 +6180,12 @@ class InputController extends ControlledInputController {
|
|
|
6176
6180
|
});
|
|
6177
6181
|
}
|
|
6178
6182
|
validateMsg(value) {
|
|
6183
|
+
if (value === undefined) {
|
|
6184
|
+
value = {
|
|
6185
|
+
_description: '',
|
|
6186
|
+
_type: 'error',
|
|
6187
|
+
};
|
|
6188
|
+
}
|
|
6179
6189
|
validateMsg(this.component, value);
|
|
6180
6190
|
}
|
|
6181
6191
|
validateOn(value) {
|
|
@@ -13522,6 +13532,31 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
13522
13532
|
});
|
|
13523
13533
|
}
|
|
13524
13534
|
|
|
13535
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
13536
|
+
// incorrect for RTL.
|
|
13537
|
+
function getWindowScrollBarX(element, rect) {
|
|
13538
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
13539
|
+
if (!rect) {
|
|
13540
|
+
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
13541
|
+
}
|
|
13542
|
+
return rect.left + leftScroll;
|
|
13543
|
+
}
|
|
13544
|
+
|
|
13545
|
+
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
13546
|
+
if (ignoreScrollbarX === void 0) {
|
|
13547
|
+
ignoreScrollbarX = false;
|
|
13548
|
+
}
|
|
13549
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
13550
|
+
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
|
|
13551
|
+
// RTL <body> scrollbar.
|
|
13552
|
+
getWindowScrollBarX(documentElement, htmlRect));
|
|
13553
|
+
const y = htmlRect.top + scroll.scrollTop;
|
|
13554
|
+
return {
|
|
13555
|
+
x,
|
|
13556
|
+
y
|
|
13557
|
+
};
|
|
13558
|
+
}
|
|
13559
|
+
|
|
13525
13560
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
13526
13561
|
let {
|
|
13527
13562
|
elements,
|
|
@@ -13553,11 +13588,12 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
13553
13588
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
13554
13589
|
}
|
|
13555
13590
|
}
|
|
13591
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
13556
13592
|
return {
|
|
13557
13593
|
width: rect.width * scale.x,
|
|
13558
13594
|
height: rect.height * scale.y,
|
|
13559
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
|
13560
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
|
13595
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
13596
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
13561
13597
|
};
|
|
13562
13598
|
}
|
|
13563
13599
|
|
|
@@ -13565,16 +13601,6 @@ function getClientRects(element) {
|
|
|
13565
13601
|
return Array.from(element.getClientRects());
|
|
13566
13602
|
}
|
|
13567
13603
|
|
|
13568
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
13569
|
-
// incorrect for RTL.
|
|
13570
|
-
function getWindowScrollBarX(element, rect) {
|
|
13571
|
-
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
13572
|
-
if (!rect) {
|
|
13573
|
-
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
13574
|
-
}
|
|
13575
|
-
return rect.left + leftScroll;
|
|
13576
|
-
}
|
|
13577
|
-
|
|
13578
13604
|
// Gets the entire size of the scrollable document area, even extending outside
|
|
13579
13605
|
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
13580
13606
|
function getDocumentRect(element) {
|
|
@@ -13649,9 +13675,10 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
13649
13675
|
} else {
|
|
13650
13676
|
const visualOffsets = getVisualOffsets(element);
|
|
13651
13677
|
rect = {
|
|
13652
|
-
...clippingAncestor,
|
|
13653
13678
|
x: clippingAncestor.x - visualOffsets.x,
|
|
13654
|
-
y: clippingAncestor.y - visualOffsets.y
|
|
13679
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
13680
|
+
width: clippingAncestor.width,
|
|
13681
|
+
height: clippingAncestor.height
|
|
13655
13682
|
};
|
|
13656
13683
|
}
|
|
13657
13684
|
return rectToClientRect(rect);
|
|
@@ -13761,17 +13788,9 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
13761
13788
|
offsets.x = getWindowScrollBarX(documentElement);
|
|
13762
13789
|
}
|
|
13763
13790
|
}
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
|
|
13767
|
-
const htmlRect = documentElement.getBoundingClientRect();
|
|
13768
|
-
htmlY = htmlRect.top + scroll.scrollTop;
|
|
13769
|
-
htmlX = htmlRect.left + scroll.scrollLeft -
|
|
13770
|
-
// RTL <body> scrollbar.
|
|
13771
|
-
getWindowScrollBarX(documentElement, htmlRect);
|
|
13772
|
-
}
|
|
13773
|
-
const x = rect.left + scroll.scrollLeft - offsets.x - htmlX;
|
|
13774
|
-
const y = rect.top + scroll.scrollTop - offsets.y - htmlY;
|
|
13791
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
13792
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
13793
|
+
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
13775
13794
|
return {
|
|
13776
13795
|
x,
|
|
13777
13796
|
y,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/hydrate",
|
|
3
|
-
"version": "2.2.1-
|
|
3
|
+
"version": "2.2.1-e6bb4064f6c9eed624b5929636c056bc0384b2af.0",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": {
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
],
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"rimraf": "6.0.1",
|
|
49
|
-
"@public-ui/components": "2.2.1-
|
|
49
|
+
"@public-ui/components": "2.2.1-e6bb4064f6c9eed624b5929636c056bc0384b2af.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@public-ui/components": "2.2.1-
|
|
52
|
+
"@public-ui/components": "2.2.1-e6bb4064f6c9eed624b5929636c056bc0384b2af.0"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"type": "commonjs",
|