@ni/nimble-components 32.2.8 → 32.2.10
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 +12 -6
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +8 -4
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/dialog/index.js.map +1 -1
- package/dist/esm/drawer/index.js +1 -1
- package/dist/esm/drawer/index.js.map +1 -1
- package/dist/esm/testing/async-helpers.js +1 -1
- package/dist/esm/testing/async-helpers.js.map +1 -1
- package/dist/esm/text-field/styles.js +6 -2
- package/dist/esm/text-field/styles.js.map +1 -1
- package/dist/esm/utilities/testing/component.js +2 -2
- package/dist/esm/utilities/testing/component.js.map +1 -1
- package/dist/esm/utilities/wait-until-custom-elements-defined-async.js +5 -3
- package/dist/esm/utilities/wait-until-custom-elements-defined-async.js.map +1 -1
- package/package.json +1 -1
|
@@ -3652,7 +3652,7 @@ const tv=Symbol("user dismissed"),ev=Mt`
|
|
|
3652
3652
|
</template>
|
|
3653
3653
|
`
|
|
3654
3654
|
class iv extends We{constructor(){super(...arguments),this.preventDismiss=!1,this.headerHidden=!1,this.footerHidden=!1,this.footerIsEmpty=!0}get open(){return void 0!==this.resolveShow}async show(){if(this.open)throw new Error("Dialog is already open")
|
|
3655
|
-
return this.dialogElement.showModal(),new Promise(((t,e)=>{this.resolveShow=t}))}close(t){if(!this.open)throw new Error("Dialog is not open")
|
|
3655
|
+
return this.dialogElement.showModal(),await new Promise(((t,e)=>{this.resolveShow=t}))}close(t){if(!this.open)throw new Error("Dialog is not open")
|
|
3656
3656
|
this.dialogElement.close(),this.doResolveShow(t)}slottedFooterElementsChanged(t,e){this.footerIsEmpty=!e?.length}cancelHandler(t){return this.preventDismiss?t.preventDefault():this.doResolveShow(tv),!0}closeHandler(t){t.target===this.dialogElement&&this.resolveShow&&this.doResolveShow(tv)}doResolveShow(t){if(!this.resolveShow)throw new Error("Do not call doResolveShow unless there is a promise to resolve")
|
|
3657
3657
|
this.resolveShow(t),this.resolveShow=void 0}}iv.UserDismissed=tv,t([ft({attribute:"prevent-dismiss",mode:"boolean"})],iv.prototype,"preventDismiss",void 0),t([ft({attribute:"header-hidden",mode:"boolean"})],iv.prototype,"headerHidden",void 0),t([ft({attribute:"footer-hidden",mode:"boolean"})],iv.prototype,"footerHidden",void 0),t([C],iv.prototype,"footerIsEmpty",void 0),t([C],iv.prototype,"slottedFooterElements",void 0),Ke(iv,wn)
|
|
3658
3658
|
const sv=iv.compose({baseName:"dialog",template:nv,styles:ev,baseClass:iv})
|
|
@@ -3803,7 +3803,7 @@ const ov=Mt`
|
|
|
3803
3803
|
</dialog>
|
|
3804
3804
|
`,av="right"
|
|
3805
3805
|
class lv extends We{constructor(){super(...arguments),this.location=av,this.preventDismiss=!1,this.closing=!1,this.animationEndHandlerFunction=()=>this.animationEndHandler()}get open(){return void 0!==this.resolveShow}async show(){if(this.open)throw new Error("Drawer is already open")
|
|
3806
|
-
return this.openDialog(),new Promise(((t,e)=>{this.resolveShow=t}))}close(t){if(!this.open||this.closing)throw new Error("Drawer is not open or already closing")
|
|
3806
|
+
return this.openDialog(),await new Promise(((t,e)=>{this.resolveShow=t}))}close(t){if(!this.open||this.closing)throw new Error("Drawer is not open or already closing")
|
|
3807
3807
|
this.closeReason=t,this.closeDialog()}cancelHandler(t){return t.preventDefault(),this.preventDismiss||(this.closeReason=tv,this.closeDialog()),!0}closeHandler(t){t.target===this.dialog&&this.resolveShow&&this.doResolveShow(tv)}doResolveShow(t){if(!this.resolveShow)throw new Error("Do not call doResolveShow unless there is a promise to resolve")
|
|
3808
3808
|
this.resolveShow(t),this.resolveShow=void 0}openDialog(){this.dialog.showModal(),this.triggerAnimation()}closeDialog(){this.closing=!0,this.triggerAnimation()}triggerAnimation(){this.dialog.offsetHeight,this.dialog.classList.add("animating"),this.closing&&this.dialog.classList.add("closing"),this.dialog.addEventListener(Pa,this.animationEndHandlerFunction)}animationEndHandler(){this.dialog.removeEventListener(Pa,this.animationEndHandlerFunction),this.dialog.classList.remove("animating"),this.closing&&(this.dialog.classList.remove("closing"),this.dialog.close(),this.closing=!1,this.doResolveShow(this.closeReason))}}lv.UserDismissed=tv,t([ft],lv.prototype,"location",void 0),t([ft({attribute:"prevent-dismiss",mode:"boolean"})],lv.prototype,"preventDismiss",void 0),Ke(lv,wn)
|
|
3809
3809
|
const cv=lv.compose({baseName:"drawer",template:rv,styles:ov})
|
|
@@ -8684,7 +8684,7 @@ break
|
|
|
8684
8684
|
case"pattern":this.track("pattern")
|
|
8685
8685
|
break
|
|
8686
8686
|
case"buttonLabel":this.track("buttonLabel")}this.queueUpdate()}trackMentionElementsInstancesChanged(){this.track("pattern"),this.track("mappingConfigs"),this.track("buttonLabel"),this.queueUpdate()}queueUpdate(){this.richText.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,b.queueUpdate((()=>{this.richText.createConfig(),this.untrackAll(),this.updateQueued=!1}))))}}class iE{constructor(){this.invalidMentionConfiguration=!1,this.duplicateMentionConfiguration=!1}getValidity(){return{invalidMentionConfiguration:this.invalidMentionConfiguration,duplicateMentionConfiguration:this.duplicateMentionConfiguration}}isValid(){return Object.values(this.getValidity()).every((t=>!1===t))}validate(t){this.validateDuplicateMentionConfigurations(t),this.validateMentionConfigurations(t)}validateMentionConfigurations(t){return this.invalidMentionConfiguration=t.some((t=>!t.mentionInternals.validator.isValid())),!this.invalidMentionConfiguration}validateDuplicateMentionConfigurations(t){const e=t.map((t=>t.mentionInternals.character))
|
|
8687
|
-
return this.duplicateMentionConfiguration=e.length!==new Set(e).size,!this.duplicateMentionConfiguration}}async function sE(t){const e=t.map((async t=>t.matches(":not(:defined)")
|
|
8687
|
+
return this.duplicateMentionConfiguration=e.length!==new Set(e).size,!this.duplicateMentionConfiguration}}async function sE(t){const e=t.map((async t=>{t.matches(":not(:defined)")&&await customElements.whenDefined(t.localName)}))
|
|
8688
8688
|
await Promise.all(e)}class oE extends We{constructor(){super(...arguments),this.mentionInternalsNotifiers=[],this.childItems=[],this.richTextUpdateTracker=new nE(this),this.richTextValidator=new iE}get validity(){return this.richTextValidator.getValidity()}checkValidity(){return this.richTextValidator.isValid()}handleChange(t,e){t instanceof KD&&"string"==typeof e&&this.richTextUpdateTracker.trackMentionInternalsPropertyChanged(e)}createConfig(){this.validate(),this.richTextValidator.isValid()?(this.richTextUpdateTracker.updateMappingConfigs||this.richTextUpdateTracker.updatePattern)&&(this.configuration=new JD(this.mentionElements)):this.configuration=void 0}validate(){this.richTextValidator.validate(this.mentionElements)}childItemsChanged(t,e){void 0!==t&&this.updateMentionElementsFromChildItems()}async updateMentionElementsFromChildItems(){await sE(this.childItems),this.mentionElements=this.childItems.filter((t=>t instanceof YD)),this.observeMentionInternals(),this.richTextUpdateTracker.trackMentionElementsInstancesChanged()}observeMentionInternals(){this.removeMentionInternalsObservers()
|
|
8689
8689
|
for(const t of this.mentionElements){const e=x.getNotifier(t.mentionInternals)
|
|
8690
8690
|
e.subscribe(this),this.mentionInternalsNotifiers.push(e)}}removeMentionInternalsObservers(){this.mentionInternalsNotifiers.forEach((t=>{t.unsubscribe(this)})),this.mentionInternalsNotifiers=[]}}t([C],oE.prototype,"childItems",void 0),t([C],oE.prototype,"configuration",void 0)
|
|
@@ -12485,8 +12485,9 @@ const pB="underline",fB="outline",mB="block",gB="frameless",vB=Mt`
|
|
|
12485
12485
|
align-items: center;
|
|
12486
12486
|
justify-content: center;
|
|
12487
12487
|
border: 0px solid rgba(${xl}, 0.3);
|
|
12488
|
-
gap: ${
|
|
12488
|
+
gap: ${zl};
|
|
12489
12489
|
padding: ${ql};
|
|
12490
|
+
padding-left: calc(${ql} + ${zl});
|
|
12490
12491
|
}
|
|
12491
12492
|
|
|
12492
12493
|
:host([readonly]) .root {
|
|
@@ -12541,6 +12542,7 @@ const pB="underline",fB="outline",mB="block",gB="frameless",vB=Mt`
|
|
|
12541
12542
|
slot[name='start']::slotted(*) {
|
|
12542
12543
|
flex: none;
|
|
12543
12544
|
opacity: 0.6;
|
|
12545
|
+
margin-right: ${zl};
|
|
12544
12546
|
}
|
|
12545
12547
|
|
|
12546
12548
|
:host([disabled]) slot[name='start']::slotted(*) {
|
|
@@ -12588,6 +12590,7 @@ const pB="underline",fB="outline",mB="block",gB="frameless",vB=Mt`
|
|
|
12588
12590
|
[part='end']::after {
|
|
12589
12591
|
content: '';
|
|
12590
12592
|
position: absolute;
|
|
12593
|
+
margin-left: calc(-1 * (${ql} + ${zl}));
|
|
12591
12594
|
bottom: calc(-1 * ${ql});
|
|
12592
12595
|
width: 0px;
|
|
12593
12596
|
height: 0px;
|
|
@@ -12659,6 +12662,7 @@ const pB="underline",fB="outline",mB="block",gB="frameless",vB=Mt`
|
|
|
12659
12662
|
.root {
|
|
12660
12663
|
border-width: ${ql};
|
|
12661
12664
|
padding: 0;
|
|
12665
|
+
padding-left: ${zl};
|
|
12662
12666
|
}
|
|
12663
12667
|
`),Ih(gB,Mt`
|
|
12664
12668
|
.control {
|