@ni/spright-components 6.4.22 → 6.4.24
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.
|
@@ -13969,22 +13969,21 @@ for(let t of this.selectedItems){for(;null!==t.parentElement&&t.parentElement!==
|
|
|
13969
13969
|
t instanceof Zz&&(t.groupSelected=!0)}}}t([ft({attribute:"selection-mode"})],Jz.prototype,"selectionMode",void 0),t([C],Jz.prototype,"selectedItems",void 0)
|
|
13970
13970
|
const Qz=Jz.compose({baseName:"tree-view",baseClass:Lo,template:Xz,styles:Yz})
|
|
13971
13971
|
_i.getOrCreate().withPrefix("nimble").register(Qz())
|
|
13972
|
-
|
|
13973
|
-
|
|
13974
|
-
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(e,this.locale),this.scaledPrefixText=n}static createFactory(t){return e=>new nV(e,t)}format(t){const e=this.formatter.format(t)
|
|
13972
|
+
class tV{constructor(t,e,n){this.singular=t,this.plural=e,this.symbol=n}}class eV extends QP{constructor(t,{unitTranslations:e,scaledPrefixText:n}){if(super(t),!e.get("en"))throw new Error('English translations must exist with locale string "en"')
|
|
13973
|
+
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(e,this.locale),this.scaledPrefixText=n}static createFactory(t){return e=>new eV(e,t)}format(t){const e=this.formatter.format(t)
|
|
13975
13974
|
if(""!==this.scaledPrefixText)return`${e} ${this.scaledPrefixText}${this.unitTranslation.symbol}`
|
|
13976
13975
|
return`${e} ${"one"===this.pluralRules.select(t)?this.unitTranslation.singular:this.unitTranslation.plural}`}getTranslationToUse(t,e){const n=new Intl.Locale(e??"en"),i=n.language,o=n.region
|
|
13977
|
-
return(o?t.get(`${i}-${o}`):void 0)??t.get(i)??t.get("en")}}const
|
|
13978
|
-
const
|
|
13979
|
-
const
|
|
13976
|
+
return(o?t.get(`${i}-${o}`):void 0)??t.get(i)??t.get("en")}}const nV=new Map([["en",new tV("byte","bytes","B")],["fr",new tV("octet","octets","o")],["de",new tV("Byte","Byte","B")],["ja",new tV("バイト","バイト","B")],["zh",new tV("字节","字节","B")]]),iV=[[1,""],[1024,"Ki"],[1048576,"Mi"],[1024**3,"Gi"],[1024**4,"Ti"],[1024**5,"Pi"]]
|
|
13977
|
+
const oV=new class extends nz{constructor(){super(iV.map((([t,e])=>new ez(t,eV.createFactory({unitTranslations:nV,scaledPrefixText:e})))))}},sV=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
|
|
13978
|
+
const rV=new class extends nz{constructor(){super(sV.map((([t,e,n])=>new ez(t,tz.createFactory({style:"unit",unit:e,unitDisplay:n})))))}},aV=Q`<template slot="unit"></template>`,lV=$t`
|
|
13980
13979
|
${Vo("none")}
|
|
13981
13980
|
`
|
|
13982
|
-
class cV extends dz{constructor(){super(),this.binary=!1,this.resolvedUnitScale=
|
|
13983
|
-
const dV=cV.compose({baseName:"unit-byte",template:
|
|
13981
|
+
class cV extends dz{constructor(){super(),this.binary=!1,this.resolvedUnitScale=rV}binaryChanged(){this.resolvedUnitScale=this.binary?oV:rV}}t([ft({mode:"boolean"})],cV.prototype,"binary",void 0)
|
|
13982
|
+
const dV=cV.compose({baseName:"unit-byte",template:aV,styles:lV})
|
|
13984
13983
|
_i.getOrCreate().withPrefix("nimble").register(dV())
|
|
13985
|
-
const hV=[[1e-15,"f"],[1e-12,"p"],[1e-9,"n"],[10**-6,"μ"],[.001,"m"],[.01,"c"],[.1,"d"],[1,""],[1e3,"k"],[10**6,"M"],[10**9,"G"],[10**12,"T"],[10**15,"P"],[10**18,"E"]],uV=new Map([["en",new
|
|
13986
|
-
const pV=new class extends nz{constructor(){super(hV.map((([t,e])=>new ez(t,
|
|
13987
|
-
const fV=class extends dz{constructor(){super(),this.resolvedUnitScale=pV}}.compose({baseName:"unit-volt",template:
|
|
13984
|
+
const hV=[[1e-15,"f"],[1e-12,"p"],[1e-9,"n"],[10**-6,"μ"],[.001,"m"],[.01,"c"],[.1,"d"],[1,""],[1e3,"k"],[10**6,"M"],[10**9,"G"],[10**12,"T"],[10**15,"P"],[10**18,"E"]],uV=new Map([["en",new tV("volt","volts","V")],["fr",new tV("volt","volts","V")],["de",new tV("Volt","Volt","V")],["ja",new tV("ボルト","ボルト","V")],["zh",new tV("伏特","伏特","V")]])
|
|
13985
|
+
const pV=new class extends nz{constructor(){super(hV.map((([t,e])=>new ez(t,eV.createFactory({unitTranslations:uV,scaledPrefixText:e})))))}}
|
|
13986
|
+
const fV=class extends dz{constructor(){super(),this.resolvedUnitScale=pV}}.compose({baseName:"unit-volt",template:aV,styles:lV})
|
|
13988
13987
|
_i.getOrCreate().withPrefix("nimble").register(fV())
|
|
13989
13988
|
var mV={value:()=>{}}
|
|
13990
13989
|
function gV(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t)
|