@ni/nimble-components 20.14.3 → 20.14.4
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/all-components-bundle.js +59 -28
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +19 -15
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/mapping/base/index.d.ts +2 -10
- package/dist/esm/mapping/base/index.js +0 -3
- package/dist/esm/mapping/base/index.js.map +1 -1
- package/dist/esm/mapping/icon/index.d.ts +3 -1
- package/dist/esm/mapping/icon/index.js +3 -0
- package/dist/esm/mapping/icon/index.js.map +1 -1
- package/dist/esm/mapping/spinner/index.d.ts +3 -1
- package/dist/esm/mapping/spinner/index.js +5 -0
- package/dist/esm/mapping/spinner/index.js.map +1 -1
- package/dist/esm/mapping/text/index.d.ts +3 -1
- package/dist/esm/mapping/text/index.js +5 -0
- package/dist/esm/mapping/text/index.js.map +1 -1
- package/dist/esm/table-column/enum-base/index.d.ts +2 -2
- package/dist/esm/table-column/enum-base/index.js.map +1 -1
- package/dist/esm/table-column/enum-base/models/mapping-key-resolver.d.ts +1 -1
- package/dist/esm/table-column/enum-base/models/mapping-key-resolver.js.map +1 -1
- package/dist/esm/table-column/enum-base/models/table-column-enum-base-validator.d.ts +3 -6
- package/dist/esm/table-column/enum-base/models/table-column-enum-base-validator.js +2 -15
- package/dist/esm/table-column/enum-base/models/table-column-enum-base-validator.js.map +1 -1
- package/dist/esm/table-column/enum-text/index.d.ts +1 -1
- package/dist/esm/table-column/enum-text/index.js.map +1 -1
- package/dist/esm/table-column/enum-text/models/table-column-enum-text-validator.d.ts +7 -1
- package/dist/esm/table-column/enum-text/models/table-column-enum-text-validator.js +24 -2
- package/dist/esm/table-column/enum-text/models/table-column-enum-text-validator.js.map +1 -1
- package/dist/esm/table-column/icon/index.d.ts +1 -1
- package/dist/esm/table-column/icon/index.js.map +1 -1
- package/dist/esm/table-column/icon/models/table-column-icon-validator.d.ts +6 -2
- package/dist/esm/table-column/icon/models/table-column-icon-validator.js +23 -7
- package/dist/esm/table-column/icon/models/table-column-icon-validator.js.map +1 -1
- package/package.json +1 -1
|
@@ -3984,19 +3984,21 @@ class Gw extends Fn{get value(){return super.value}set value(e){super.value=`${e
|
|
|
3984
3984
|
`,styles:Ww})
|
|
3985
3985
|
bi.getOrCreate().withPrefix("nimble").register(Kw()),bi.tagFor(Gw)
|
|
3986
3986
|
let Jw=class extends Pt{}
|
|
3987
|
-
e([se()],Jw.prototype,"key",void 0)
|
|
3987
|
+
e([se()],Jw.prototype,"key",void 0)
|
|
3988
3988
|
const Xw=W`<template slot="mapping"></template>`
|
|
3989
|
-
class Yw extends Jw{}
|
|
3989
|
+
class Yw extends Jw{}e([se()],Yw.prototype,"text",void 0)
|
|
3990
|
+
const Qw=Yw.compose({baseName:"mapping-text",template:Xw})
|
|
3990
3991
|
function ey(e){return e.prototype instanceof Bf}bi.getOrCreate().withPrefix("nimble").register(Qw()),bi.tagFor(Yw)
|
|
3991
3992
|
class ty extends Jw{async resolveIconAsync(e){try{this.resolvedIcon=void 0,await customElements.whenDefined(e)}catch(e){return}if(e!==this.icon)return
|
|
3992
3993
|
const t=customElements.get(e)
|
|
3993
3994
|
this.resolvedIcon=ey(t)?e:void 0}iconChanged(){const e=this.icon
|
|
3994
3995
|
if(!e)return void(this.resolvedIcon=void 0)
|
|
3995
3996
|
const t=customElements.get(e)
|
|
3996
|
-
t?this.resolvedIcon=ey(t)?e:void 0:this.resolveIconAsync(e)}}e([se()],ty.prototype,"icon",void 0),e([se()],ty.prototype,"severity",void 0),e([m],ty.prototype,"resolvedIcon",void 0)
|
|
3997
|
+
t?this.resolvedIcon=ey(t)?e:void 0:this.resolveIconAsync(e)}}e([se()],ty.prototype,"icon",void 0),e([se()],ty.prototype,"severity",void 0),e([se()],ty.prototype,"text",void 0),e([m],ty.prototype,"resolvedIcon",void 0)
|
|
3997
3998
|
const ny=ty.compose({baseName:"mapping-icon",template:Xw})
|
|
3998
3999
|
bi.getOrCreate().withPrefix("nimble").register(ny()),bi.tagFor(ty)
|
|
3999
|
-
class iy extends Jw{}
|
|
4000
|
+
class iy extends Jw{}e([se()],iy.prototype,"text",void 0)
|
|
4001
|
+
const oy=iy.compose({baseName:"mapping-spinner",template:Xw})
|
|
4000
4002
|
bi.getOrCreate().withPrefix("nimble").register(oy()),bi.tagFor(iy)
|
|
4001
4003
|
const ry=we`
|
|
4002
4004
|
${Oo("grid")}
|
|
@@ -10186,16 +10188,16 @@ const sP=we`
|
|
|
10186
10188
|
slot[name='mapping'] {
|
|
10187
10189
|
display: none;
|
|
10188
10190
|
}
|
|
10189
|
-
`,aP=W`${uL}<slot ${Ke("mappings")} name="mapping"></slot>`,lP=["invalidMappingKeyValueForType","
|
|
10190
|
-
class cP extends qL{constructor(e,t
|
|
10191
|
+
`,aP=W`${uL}<slot ${Ke("mappings")} name="mapping"></slot>`,lP=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue"]
|
|
10192
|
+
class cP extends qL{constructor(e,t){super(e,t)}validate(e,t){this.untrackAll()
|
|
10191
10193
|
const n=e.map((e=>e.key))
|
|
10192
|
-
this.validateKeyValuesForType(n,t),this.
|
|
10193
|
-
this.setConditionValue("invalidMappingKeyValueForType",n)}
|
|
10194
|
-
this.setConditionValue("unsupportedMappingType",!t)}validateUniqueKeys(e,t){const n=e.map((e=>oP(e,t))),i=new Set(n).size!==n.length
|
|
10194
|
+
this.validateKeyValuesForType(n,t),this.validateUniqueKeys(n,t),this.validateNoMissingKeys(e)}validateKeyValuesForType(e,t){const n=e.some((e=>void 0!==e&&void 0===oP(e,t)))
|
|
10195
|
+
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(e,t){const n=e.map((e=>oP(e,t))),i=new Set(n).size!==n.length
|
|
10195
10196
|
this.setConditionValue("duplicateMappingKey",i)}validateNoMissingKeys(e){const t=e.some((e=>void 0===e.key))
|
|
10196
|
-
this.setConditionValue("missingKeyValue",t)}
|
|
10197
|
-
|
|
10198
|
-
|
|
10197
|
+
this.setConditionValue("missingKeyValue",t)}}const dP=[...lP,"unsupportedMappingType","missingTextValue"]
|
|
10198
|
+
class hP extends cP{constructor(e){super(e,dP)}static isSupportedMappingElement(e){return e instanceof Yw}validate(e,t){super.validate(e,t),this.validateMappingTypes(e),this.validateNoMissingText(e)}validateNoMissingText(e){const t=e.filter(hP.isSupportedMappingElement).some((e=>void 0===e.text))
|
|
10199
|
+
this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(hP.isSupportedMappingElement)
|
|
10200
|
+
this.setConditionValue("unsupportedMappingType",!t)}}class uP{constructor(e){this.text=e}}class pP extends uP{}class fP extends LL{columnConfigChanged(){this.updateText()}cellRecordChanged(){this.updateText()}updateText(){const e=this.cellRecord?.value
|
|
10199
10201
|
if(null==e)return void(this.text="")
|
|
10200
10202
|
const t=this.columnConfig?.mappingConfigs.get(e)
|
|
10201
10203
|
this.text=t instanceof pP&&t.text?t.text:""}}const gP=fP.compose({baseName:"table-column-enum-text-cell-view",template:FL,styles:NL})
|
|
@@ -10231,9 +10233,11 @@ this.columnInternals.columnConfig=e}else this.columnInternals.columnConfig=void
|
|
|
10231
10233
|
return this.format===AP?(e="number"==typeof this.decimalMaximumDigits?0:this.decimalDigits??2,t=this.decimalMaximumDigits??this.decimalDigits??2,new RP(ba.getValueFor(this),e,t)):new TP(ba.getValueFor(this))}determineCellContentAlignment(){return this.alignment===IP?RL:this.alignment===EP||this.format===AP&&"number"!=typeof this.decimalMaximumDigits?DL:RL}}e([se],NP.prototype,"format",void 0),e([se],NP.prototype,"alignment",void 0),e([se({attribute:"decimal-digits",converter:oe})],NP.prototype,"decimalDigits",void 0),e([se({attribute:"decimal-maximum-digits",converter:oe})],NP.prototype,"decimalMaximumDigits",void 0)
|
|
10232
10234
|
const LP=NP.compose({baseName:"table-column-number-text",template:uL,styles:cL})
|
|
10233
10235
|
bi.getOrCreate().withPrefix("nimble").register(LP()),bi.tagFor(NP)
|
|
10234
|
-
const PP=[...lP,"invalidIconName"]
|
|
10235
|
-
class VP extends cP{constructor(e){super(e,PP
|
|
10236
|
-
this.setConditionValue("invalidIconName",t)}
|
|
10236
|
+
const PP=[...lP,"unsupportedMappingType","invalidIconName","missingTextValue"]
|
|
10237
|
+
class VP extends cP{constructor(e){super(e,PP)}static isIconMappingElement(e){return e instanceof ty}static isSupportedMappingElement(e){return e instanceof ty||e instanceof iy}validate(e,t){super.validate(e,t),this.validateMappingTypes(e),this.validateIconNames(e),this.validateNoMissingText(e)}validateIconNames(e){const t=e.filter(VP.isIconMappingElement).some((e=>void 0===e.resolvedIcon))
|
|
10238
|
+
this.setConditionValue("invalidIconName",t)}validateNoMissingText(e){const t=e.filter(VP.isSupportedMappingElement).some((e=>void 0===e.text))
|
|
10239
|
+
this.setConditionValue("missingTextValue",t)}validateMappingTypes(e){const t=e.every(VP.isSupportedMappingElement)
|
|
10240
|
+
this.setConditionValue("unsupportedMappingType",!t)}}const zP=we`
|
|
10237
10241
|
${Oo("inline-flex")}
|
|
10238
10242
|
|
|
10239
10243
|
:host {
|