@ni/nimble-components 19.1.0 → 19.1.1

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.
@@ -5413,9 +5413,8 @@ try{t=document.createElement(e)}catch(e){}if(!(t instanceof nw))throw new Error(
5413
5413
  >
5414
5414
  </${e}>
5415
5415
  `)
5416
- class rw{constructor(e){this.uniqueId=Vr("table-column-slot"),this.validConfiguration=!0,this.sortOperation=ew,this.dataRecordFieldNames=[],this.groupingDisabled=!1,this.fractionalWidth=1,this.minPixelWidth=117,this.currentFractionalWidth=1,this.cellRecordFieldNames=e.cellRecordFieldNames,this.cellViewTemplate=sw(e.cellViewTag),this.groupHeaderViewTemplate=ow(e.groupHeaderViewTag),this.delegatedEvents=e.delegatedEvents}fractionalWidthChanged(){this.currentFractionalWidth=this.fractionalWidth}pixelWidthChanged(){this.currentPixelWidth=this.pixelWidth}}e([m],rw.prototype,"columnConfig",void 0),e([m],rw.prototype,"validConfiguration",void 0),e([m],rw.prototype,"operandDataRecordFieldName",void 0),e([m],rw.prototype,"sortOperation",void 0),e([m],rw.prototype,"dataRecordFieldNames",void 0),e([m],rw.prototype,"groupingDisabled",void 0),e([m],rw.prototype,"groupIndex",void 0),e([m],rw.prototype,"pixelWidth",void 0),e([m],rw.prototype,"fractionalWidth",void 0),e([m],rw.prototype,"minPixelWidth",void 0),e([m],rw.prototype,"currentFractionalWidth",void 0),e([m],rw.prototype,"currentPixelWidth",void 0),e([m],rw.prototype,"currentSortIndex",void 0),e([m],rw.prototype,"currentSortDirection",void 0)
5417
- class aw extends Rt{constructor(e){if(super(),this.columnHidden=!1,this.sortDirection=Kb.none,this.sortingDisabled=!1,!e)throw new Error("ColumnInternalsOptions must be provided to constructor")
5418
- this.columnInternals=new rw(e),this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex}checkValidity(){return this.columnInternals.validConfiguration}get validity(){return{}}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex)}sortingDisabledChanged(){this.columnInternals&&(this.sortingDisabled?(this.columnInternals.currentSortDirection=Kb.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex))}}e([ne({attribute:"column-id"})],aw.prototype,"columnId",void 0),e([ne({attribute:"action-menu-slot"})],aw.prototype,"actionMenuSlot",void 0),e([ne({attribute:"action-menu-label"})],aw.prototype,"actionMenuLabel",void 0),e([ne({attribute:"column-hidden",mode:"boolean"})],aw.prototype,"columnHidden",void 0),e([ne({attribute:"sort-index",converter:ie})],aw.prototype,"sortIndex",void 0),e([ne({attribute:"sort-direction"})],aw.prototype,"sortDirection",void 0),e([ne({attribute:"sorting-disabled",mode:"boolean"})],aw.prototype,"sortingDisabled",void 0)
5416
+ class rw{constructor(e){this.uniqueId=Vr("table-column-slot"),this.validConfiguration=!0,this.sortOperation=ew,this.dataRecordFieldNames=[],this.groupingDisabled=!1,this.fractionalWidth=1,this.minPixelWidth=117,this.currentFractionalWidth=1,this.currentSortDirection=Kb.none,this.cellRecordFieldNames=e.cellRecordFieldNames,this.cellViewTemplate=sw(e.cellViewTag),this.groupHeaderViewTemplate=ow(e.groupHeaderViewTag),this.delegatedEvents=e.delegatedEvents,this.sortOperation=e.sortOperation??ew}fractionalWidthChanged(){this.currentFractionalWidth=this.fractionalWidth}pixelWidthChanged(){this.currentPixelWidth=this.pixelWidth}}e([m],rw.prototype,"columnConfig",void 0),e([m],rw.prototype,"validConfiguration",void 0),e([m],rw.prototype,"operandDataRecordFieldName",void 0),e([m],rw.prototype,"sortOperation",void 0),e([m],rw.prototype,"dataRecordFieldNames",void 0),e([m],rw.prototype,"groupingDisabled",void 0),e([m],rw.prototype,"groupIndex",void 0),e([m],rw.prototype,"pixelWidth",void 0),e([m],rw.prototype,"fractionalWidth",void 0),e([m],rw.prototype,"minPixelWidth",void 0),e([m],rw.prototype,"currentFractionalWidth",void 0),e([m],rw.prototype,"currentPixelWidth",void 0),e([m],rw.prototype,"currentSortIndex",void 0),e([m],rw.prototype,"currentSortDirection",void 0)
5417
+ class aw extends Rt{constructor(){super(...arguments),this.columnInternals=new rw(this.getColumnInternalsOptions()),this.columnHidden=!1,this.sortDirection=Kb.none,this.sortingDisabled=!1}checkValidity(){return this.columnInternals.validConfiguration}get validity(){return{}}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex)}sortingDisabledChanged(){this.sortingDisabled?(this.columnInternals.currentSortDirection=Kb.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex)}}e([ne({attribute:"column-id"})],aw.prototype,"columnId",void 0),e([ne({attribute:"action-menu-slot"})],aw.prototype,"actionMenuSlot",void 0),e([ne({attribute:"action-menu-label"})],aw.prototype,"actionMenuLabel",void 0),e([ne({attribute:"column-hidden",mode:"boolean"})],aw.prototype,"columnHidden",void 0),e([ne({attribute:"sort-index",converter:ie})],aw.prototype,"sortIndex",void 0),e([ne({attribute:"sort-direction"})],aw.prototype,"sortDirection",void 0),e([ne({attribute:"sorting-disabled",mode:"boolean"})],aw.prototype,"sortingDisabled",void 0)
5419
5418
  class lw{constructor(){this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.duplicateColumnId=!1,this.missingColumnId=!1,this.duplicateSortIndex=!1,this.duplicateGroupIndex=!1,this.idFieldNameNotConfigured=!1,this.invalidColumnConfiguration=!1,this.recordIds=new Set}getValidity(){return{duplicateRecordId:this.duplicateRecordId,missingRecordId:this.missingRecordId,invalidRecordId:this.invalidRecordId,duplicateColumnId:this.duplicateColumnId,missingColumnId:this.missingColumnId,duplicateSortIndex:this.duplicateSortIndex,duplicateGroupIndex:this.duplicateGroupIndex,idFieldNameNotConfigured:this.idFieldNameNotConfigured,invalidColumnConfiguration:this.invalidColumnConfiguration}}isValid(){return Object.values(this.getValidity()).every((e=>!1===e))}areRecordIdsValid(){const e=this.getValidity()
5420
5419
  return!e.duplicateRecordId&&!e.missingRecordId&&!e.invalidRecordId}validateSelectionMode(e,t){return this.idFieldNameNotConfigured=e!==Xb.none&&"string"!=typeof t,!this.idFieldNameNotConfigured}validateRecordIds(e,t){if(this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.recordIds.clear(),"string"!=typeof t)return!0
5421
5420
  for(const i of e){if(!Object.prototype.hasOwnProperty.call(i,t)){this.missingRecordId=!0
@@ -6332,7 +6331,7 @@ const ux=G`
6332
6331
  class gx extends hx{get text(){return this.groupHeaderValue}get placeholder(){return this.columnConfig?.placeholder??""}get shouldUsePlaceholder(){return"string"!=typeof this.groupHeaderValue}}const vx=gx.compose({baseName:"table-column-text-group-header",template:ux,styles:px})
6333
6332
  ro.getOrCreate().withPrefix("nimble").register(vx())
6334
6333
  const mx=ro.tagFor(gx)
6335
- class fx extends(sx(nx(aw))){constructor(){super({cellRecordFieldNames:["label","href"],cellViewTag:dx,groupHeaderViewTag:mx,delegatedEvents:["click"]}),this.underlineHidden=!1,this.columnInternals.sortOperation=tw}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.columnInternals.operandDataRecordFieldName=this.labelFieldName}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}placeholderChanged(){this.updateColumnConfig()}appearanceChanged(){this.updateColumnConfig()}underlineHiddenChanged(){this.updateColumnConfig()}hreflangChanged(){this.updateColumnConfig()}pingChanged(){this.updateColumnConfig()}referrerpolicyChanged(){this.updateColumnConfig()}relChanged(){this.updateColumnConfig()}targetChanged(){this.updateColumnConfig()}typeChanged(){this.updateColumnConfig()}downloadChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={placeholder:this.placeholder??"",appearance:this.appearance,underlineHidden:this.underlineHidden,hreflang:this.hreflang,ping:this.ping,referrerpolicy:this.referrerpolicy,rel:this.rel,target:this.target,type:this.type,download:this.download}}}e([ne({attribute:"label-field-name"})],fx.prototype,"labelFieldName",void 0),e([ne({attribute:"href-field-name"})],fx.prototype,"hrefFieldName",void 0),e([ne],fx.prototype,"placeholder",void 0),e([ne],fx.prototype,"appearance",void 0),e([ne({attribute:"underline-hidden",mode:"boolean"})],fx.prototype,"underlineHidden",void 0),e([ne],fx.prototype,"hreflang",void 0),e([ne],fx.prototype,"ping",void 0),e([ne],fx.prototype,"referrerpolicy",void 0),e([ne],fx.prototype,"rel",void 0),e([ne],fx.prototype,"target",void 0),e([ne],fx.prototype,"type",void 0),e([ne],fx.prototype,"download",void 0)
6334
+ class fx extends(sx(nx(aw))){constructor(){super(...arguments),this.underlineHidden=!1}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:dx,groupHeaderViewTag:mx,delegatedEvents:["click"],sortOperation:tw}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.columnInternals.operandDataRecordFieldName=this.labelFieldName}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}placeholderChanged(){this.updateColumnConfig()}appearanceChanged(){this.updateColumnConfig()}underlineHiddenChanged(){this.updateColumnConfig()}hreflangChanged(){this.updateColumnConfig()}pingChanged(){this.updateColumnConfig()}referrerpolicyChanged(){this.updateColumnConfig()}relChanged(){this.updateColumnConfig()}targetChanged(){this.updateColumnConfig()}typeChanged(){this.updateColumnConfig()}downloadChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={placeholder:this.placeholder??"",appearance:this.appearance,underlineHidden:this.underlineHidden,hreflang:this.hreflang,ping:this.ping,referrerpolicy:this.referrerpolicy,rel:this.rel,target:this.target,type:this.type,download:this.download}}}e([ne({attribute:"label-field-name"})],fx.prototype,"labelFieldName",void 0),e([ne({attribute:"href-field-name"})],fx.prototype,"hrefFieldName",void 0),e([ne],fx.prototype,"placeholder",void 0),e([ne],fx.prototype,"appearance",void 0),e([ne({attribute:"underline-hidden",mode:"boolean"})],fx.prototype,"underlineHidden",void 0),e([ne],fx.prototype,"hreflang",void 0),e([ne],fx.prototype,"ping",void 0),e([ne],fx.prototype,"referrerpolicy",void 0),e([ne],fx.prototype,"rel",void 0),e([ne],fx.prototype,"target",void 0),e([ne],fx.prototype,"type",void 0),e([ne],fx.prototype,"download",void 0)
6336
6335
  const bx=fx.compose({baseName:"table-column-anchor",template:ox,styles:ix})
6337
6336
  ro.getOrCreate().withPrefix("nimble").register(bx()),ro.tagFor(fx)
6338
6337
  class wx extends(sx(nx(aw))){fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder??""}}}e([ne({attribute:"field-name"})],wx.prototype,"fieldName",void 0),e([ne],wx.prototype,"placeholder",void 0)
@@ -6363,7 +6362,7 @@ class $x extends nw{constructor(){super(...arguments),this.isValidContentAndHasO
6363
6362
  class Cx extends $x{get text(){return this.cellRecord.value}get placeholder(){return this.columnConfig.placeholder}get shouldUsePlaceholder(){return"string"!=typeof this.cellRecord.value}}const kx=Cx.compose({baseName:"table-column-text-cell-view",template:xx,styles:yx})
6364
6363
  ro.getOrCreate().withPrefix("nimble").register(kx())
6365
6364
  const Sx=ro.tagFor(Cx)
6366
- class _x extends wx{constructor(){super({cellRecordFieldNames:["value"],cellViewTag:Sx,groupHeaderViewTag:mx,delegatedEvents:[]}),this.columnInternals.sortOperation=tw}}const Ix=_x.compose({baseName:"table-column-text",template:ox,styles:ix})
6365
+ class _x extends wx{getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:Sx,groupHeaderViewTag:mx,delegatedEvents:[],sortOperation:tw}}}const Ix=_x.compose({baseName:"table-column-text",template:ox,styles:ix})
6367
6366
  ro.getOrCreate().withPrefix("nimble").register(Ix()),ro.tagFor(_x)
6368
6367
  const Rx=fe`
6369
6368
  ${xn("grid")}