@ni/nimble-components 29.8.0 → 29.8.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.
Files changed (33) hide show
  1. package/dist/all-components-bundle.js +40 -18
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +215 -206
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/table/components/header/index.d.ts +2 -1
  6. package/dist/esm/table/components/header/index.js +5 -1
  7. package/dist/esm/table/components/header/index.js.map +1 -1
  8. package/dist/esm/table/components/header/styles.js +10 -3
  9. package/dist/esm/table/components/header/styles.js.map +1 -1
  10. package/dist/esm/table/components/header/template.js +2 -1
  11. package/dist/esm/table/components/header/template.js.map +1 -1
  12. package/dist/esm/table/template.js +1 -0
  13. package/dist/esm/table/template.js.map +1 -1
  14. package/dist/esm/table/types.d.ts +11 -0
  15. package/dist/esm/table/types.js +9 -0
  16. package/dist/esm/table/types.js.map +1 -1
  17. package/dist/esm/table-column/base/models/column-internals.d.ts +5 -1
  18. package/dist/esm/table-column/base/models/column-internals.js +8 -1
  19. package/dist/esm/table-column/base/models/column-internals.js.map +1 -1
  20. package/dist/esm/table-column/number-text/cell-view/index.js +2 -2
  21. package/dist/esm/table-column/number-text/cell-view/index.js.map +1 -1
  22. package/dist/esm/table-column/number-text/index.d.ts +2 -3
  23. package/dist/esm/table-column/number-text/index.js +6 -5
  24. package/dist/esm/table-column/number-text/index.js.map +1 -1
  25. package/dist/esm/table-column/text-base/cell-view/index.d.ts +2 -3
  26. package/dist/esm/table-column/text-base/cell-view/index.js +2 -2
  27. package/dist/esm/table-column/text-base/cell-view/index.js.map +1 -1
  28. package/dist/esm/table-column/text-base/cell-view/template.js +2 -2
  29. package/dist/esm/table-column/text-base/cell-view/template.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/esm/table-column/text-base/cell-view/types.d.ts +0 -8
  32. package/dist/esm/table-column/text-base/cell-view/types.js +0 -8
  33. package/dist/esm/table-column/text-base/cell-view/types.js.map +0 -1
@@ -10224,10 +10224,10 @@ return m._valuesCache[e]}if(m._groupingValuesCache.hasOwnProperty(e))return m._g
10224
10224
  const s=t.getColumn(e),o=null==s?void 0:s.getAggregationFn()
10225
10225
  return o?(m._groupingValuesCache[e]=o(e,f,h),m._groupingValuesCache[e]):void 0}}),p.forEach((t=>{s.push(t),o[t.id]=t})),m}))
10226
10226
  return d},a=r(n.rows,0)
10227
- return a.forEach((t=>{s.push(t),o[t.id]=t})),{rows:a,flatRows:s,rowsById:o}}),tO(t.options,"debugTable",0,(()=>{t._queue((()=>{t._autoResetExpanded(),t._autoResetPageIndex()}))})))}const KO=void 0,YO="can-load-children",XO="loading-children",JO={none:void 0,ascending:"ascending",descending:"descending"},QO={none:void 0,single:"single",multiple:"multiple"},tR="not-selected",eR="selected",nR="partially-selected",iR="none",sR="columnHeader",oR="headerActions",rR="row",aR="rowSelectionCheckbox",lR="cell",cR="cellActionMenu",dR="cellContent",hR="basic",uR="localeAwareCaseSensitive",pR=117,fR=1
10228
- class mR extends We{}t([C],mR.prototype,"groupHeaderValue",void 0),t([C],mR.prototype,"columnConfig",void 0)
10229
- const gR=t=>((t=>{let e
10230
- try{e=document.createElement(t)}catch(t){}if(!(e instanceof mR))throw new Error(`Group header view tag name (${t}) must evaluate to an element extending TableGroupHeaderView`)})(t),Q`
10227
+ return a.forEach((t=>{s.push(t),o[t.id]=t})),{rows:a,flatRows:s,rowsById:o}}),tO(t.options,"debugTable",0,(()=>{t._queue((()=>{t._autoResetExpanded(),t._autoResetPageIndex()}))})))}const KO=void 0,YO="can-load-children",XO="loading-children",JO={none:void 0,ascending:"ascending",descending:"descending"},QO={none:void 0,single:"single",multiple:"multiple"},tR="not-selected",eR="selected",nR="partially-selected",iR="left",sR="right",oR="none",rR="columnHeader",aR="headerActions",lR="row",cR="rowSelectionCheckbox",dR="cell",hR="cellActionMenu",uR="cellContent",pR="basic",fR="localeAwareCaseSensitive",mR=117,gR=1
10228
+ class vR extends We{}t([C],vR.prototype,"groupHeaderValue",void 0),t([C],vR.prototype,"columnConfig",void 0)
10229
+ const bR=t=>((t=>{let e
10230
+ try{e=document.createElement(t)}catch(t){}if(!(e instanceof vR))throw new Error(`Group header view tag name (${t}) must evaluate to an element extending TableGroupHeaderView`)})(t),Q`
10231
10231
  <${t}
10232
10232
  :groupHeaderValue="${t=>t.groupRowValue}"
10233
10233
  :columnConfig="${t=>t.groupColumn?.columnInternals.columnConfig}"
@@ -10235,11 +10235,11 @@ try{e=document.createElement(t)}catch(t){}if(!(e instanceof mR))throw new Error(
10235
10235
  >
10236
10236
  </${t}>
10237
10237
  `)
10238
- class vR extends We{constructor(){super(...arguments),this.delegatedEvents=[],this.delegatedEventHandler=()=>{}}get tabbableChildren(){return[]}focusedRecycleCallback(){}columnChanged(){for(const t of this.delegatedEvents)this.removeEventListener(t,this.delegatedEventHandler)
10238
+ class yR extends We{constructor(){super(...arguments),this.delegatedEvents=[],this.delegatedEventHandler=()=>{}}get tabbableChildren(){return[]}focusedRecycleCallback(){}columnChanged(){for(const t of this.delegatedEvents)this.removeEventListener(t,this.delegatedEventHandler)
10239
10239
  if(this.delegatedEvents=[],this.delegatedEventHandler=()=>{},this.column){this.delegatedEvents=this.column.columnInternals.delegatedEvents,this.delegatedEventHandler=t=>{this.recordId&&this.column?.dispatchEvent(new CustomEvent("delegated-event",{detail:{originalEvent:t,recordId:this.recordId}}))}
10240
- for(const t of this.delegatedEvents)this.addEventListener(t,this.delegatedEventHandler)}}}function bR(t,e){return`${t}-${e}`}function yR(t,e){return bR(t.columnInternals.uniqueId,e)}t([C],vR.prototype,"cellRecord",void 0),t([C],vR.prototype,"columnConfig",void 0),t([C],vR.prototype,"column",void 0),t([C],vR.prototype,"recordId",void 0)
10241
- const wR=t=>((t=>{let e
10242
- try{e=document.createElement(t)}catch(t){}if(!(e instanceof vR))throw new Error(`Cell view tag name (${t}) must evaluate to an element extending TableCellView`)})(t),Q`
10240
+ for(const t of this.delegatedEvents)this.addEventListener(t,this.delegatedEventHandler)}}}function wR(t,e){return`${t}-${e}`}function xR(t,e){return wR(t.columnInternals.uniqueId,e)}t([C],yR.prototype,"cellRecord",void 0),t([C],yR.prototype,"columnConfig",void 0),t([C],yR.prototype,"column",void 0),t([C],yR.prototype,"recordId",void 0)
10241
+ const CR=t=>((t=>{let e
10242
+ try{e=document.createElement(t)}catch(t){}if(!(e instanceof yR))throw new Error(`Cell view tag name (${t}) must evaluate to an element extending TableCellView`)})(t),Q`
10243
10243
  <${t}
10244
10244
  :cellRecord="${t=>t.cellState?.cellRecord}"
10245
10245
  :columnConfig="${t=>t.cellState?.columnConfig}"
@@ -10249,16 +10249,16 @@ try{e=document.createElement(t)}catch(t){}if(!(e instanceof vR))throw new Error(
10249
10249
  >
10250
10250
  ${Qt((t=>t.column?.columnInternals.slotNames||[]),Q`
10251
10251
  <slot
10252
- name="${(t,e)=>yR(e.parent.column,t)}"
10252
+ name="${(t,e)=>xR(e.parent.column,t)}"
10253
10253
  slot="${t=>t}"
10254
10254
  ></slot>
10255
10255
  `)}
10256
10256
  </${t}>
10257
10257
  `)
10258
- class xR{constructor(t){this.uniqueId=Va("table-column-slot"),this.sortOperation=hR,this.dataRecordFieldNames=[],this.groupingDisabled=!0,this.fractionalWidth=fR,this.minPixelWidth=pR,this.resizingDisabled=!1,this.hideHeaderIndicators=!1,this.currentFractionalWidth=fR,this.sortingDisabled=!0,this.currentSortDirection=JO.none,this.cellRecordFieldNames=t.cellRecordFieldNames,this.cellViewTemplate=wR(t.cellViewTag),t.groupHeaderViewTag&&(this.groupHeaderViewTemplate=gR(t.groupHeaderViewTag)),this.delegatedEvents=t.delegatedEvents,this.slotNames=t.slotNames??[],this.sortOperation=t.sortOperation??hR,this.validator=t.validator}fractionalWidthChanged(){this.currentFractionalWidth=this.fractionalWidth}pixelWidthChanged(){this.currentPixelWidth=this.pixelWidth}}function CR(t,...e){for(const n of e)if(t===n)return!0
10259
- return!1}t([C],xR.prototype,"columnConfig",void 0),t([C],xR.prototype,"operandDataRecordFieldName",void 0),t([C],xR.prototype,"sortOperation",void 0),t([C],xR.prototype,"dataRecordFieldNames",void 0),t([C],xR.prototype,"groupingDisabled",void 0),t([C],xR.prototype,"groupIndex",void 0),t([C],xR.prototype,"pixelWidth",void 0),t([C],xR.prototype,"fractionalWidth",void 0),t([C],xR.prototype,"minPixelWidth",void 0),t([C],xR.prototype,"resizingDisabled",void 0),t([C],xR.prototype,"hideHeaderIndicators",void 0),t([C],xR.prototype,"currentFractionalWidth",void 0),t([C],xR.prototype,"currentPixelWidth",void 0),t([C],xR.prototype,"sortingDisabled",void 0),t([C],xR.prototype,"currentSortIndex",void 0),t([C],xR.prototype,"currentSortDirection",void 0)
10260
- class kR extends We{constructor(){super(...arguments),this.columnInternals=new xR(this.getColumnInternalsOptions()),this.columnHidden=!1,this.hasOverflow=!1}checkValidity(){return this.columnInternals.validator.isColumnValid}get validity(){return this.columnInternals.validator.getValidity()}get headerTextContent(){return this.contentSlot.assignedNodes().map((t=>t.textContent?.trim())).join(" ")}connectedCallback(){super.connectedCallback(),this.setAttribute("slot",this.columnInternals.uniqueId)}}t([ft({attribute:"column-id"})],kR.prototype,"columnId",void 0),t([ft({attribute:"action-menu-slot"})],kR.prototype,"actionMenuSlot",void 0),t([ft({attribute:"action-menu-label"})],kR.prototype,"actionMenuLabel",void 0),t([ft({attribute:"column-hidden",mode:"boolean"})],kR.prototype,"columnHidden",void 0),t([C],kR.prototype,"hasOverflow",void 0)
10261
- class SR{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.invalidParentIdConfiguration=!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,invalidParentIdConfiguration:this.invalidParentIdConfiguration}}isValid(){return Object.values(this.getValidity()).every((t=>!1===t))}areRecordIdsValid(){const t=this.getValidity()
10258
+ class kR{constructor(t){this.uniqueId=Va("table-column-slot"),this.sortOperation=pR,this.dataRecordFieldNames=[],this.groupingDisabled=!0,this.fractionalWidth=gR,this.minPixelWidth=mR,this.resizingDisabled=!1,this.hideHeaderIndicators=!1,this.headerAlignment=iR,this.currentFractionalWidth=gR,this.sortingDisabled=!0,this.currentSortDirection=JO.none,this.cellRecordFieldNames=t.cellRecordFieldNames,this.cellViewTemplate=CR(t.cellViewTag),t.groupHeaderViewTag&&(this.groupHeaderViewTemplate=bR(t.groupHeaderViewTag)),this.delegatedEvents=t.delegatedEvents,this.slotNames=t.slotNames??[],this.sortOperation=t.sortOperation??pR,this.validator=t.validator}fractionalWidthChanged(){this.currentFractionalWidth=this.fractionalWidth}pixelWidthChanged(){this.currentPixelWidth=this.pixelWidth}}function SR(t,...e){for(const n of e)if(t===n)return!0
10259
+ return!1}t([C],kR.prototype,"columnConfig",void 0),t([C],kR.prototype,"operandDataRecordFieldName",void 0),t([C],kR.prototype,"sortOperation",void 0),t([C],kR.prototype,"dataRecordFieldNames",void 0),t([C],kR.prototype,"groupingDisabled",void 0),t([C],kR.prototype,"groupIndex",void 0),t([C],kR.prototype,"pixelWidth",void 0),t([C],kR.prototype,"fractionalWidth",void 0),t([C],kR.prototype,"minPixelWidth",void 0),t([C],kR.prototype,"resizingDisabled",void 0),t([C],kR.prototype,"hideHeaderIndicators",void 0),t([C],kR.prototype,"headerAlignment",void 0),t([C],kR.prototype,"currentFractionalWidth",void 0),t([C],kR.prototype,"currentPixelWidth",void 0),t([C],kR.prototype,"sortingDisabled",void 0),t([C],kR.prototype,"currentSortIndex",void 0),t([C],kR.prototype,"currentSortDirection",void 0)
10260
+ class _R extends We{constructor(){super(...arguments),this.columnInternals=new kR(this.getColumnInternalsOptions()),this.columnHidden=!1,this.hasOverflow=!1}checkValidity(){return this.columnInternals.validator.isColumnValid}get validity(){return this.columnInternals.validator.getValidity()}get headerTextContent(){return this.contentSlot.assignedNodes().map((t=>t.textContent?.trim())).join(" ")}connectedCallback(){super.connectedCallback(),this.setAttribute("slot",this.columnInternals.uniqueId)}}t([ft({attribute:"column-id"})],_R.prototype,"columnId",void 0),t([ft({attribute:"action-menu-slot"})],_R.prototype,"actionMenuSlot",void 0),t([ft({attribute:"action-menu-label"})],_R.prototype,"actionMenuLabel",void 0),t([ft({attribute:"column-hidden",mode:"boolean"})],_R.prototype,"columnHidden",void 0),t([C],_R.prototype,"hasOverflow",void 0)
10261
+ class IR{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.invalidParentIdConfiguration=!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,invalidParentIdConfiguration:this.invalidParentIdConfiguration}}isValid(){return Object.values(this.getValidity()).every((t=>!1===t))}areRecordIdsValid(){const t=this.getValidity()
10262
10262
  return!t.duplicateRecordId&&!t.missingRecordId&&!t.invalidRecordId}validateIdFieldConfiguration(t,e,n){const i=t!==QO.none||"string"==typeof n
10263
10263
  return this.idFieldNameNotConfigured=!!i&&"string"!=typeof e,!this.idFieldNameNotConfigured}validateRecordIds(t,e){if(this.duplicateRecordId=!1,this.missingRecordId=!1,this.invalidRecordId=!1,this.recordIds.clear(),"string"!=typeof e)return!0
10264
10264
  for(const n of t){if(!Object.prototype.hasOwnProperty.call(n,e)){this.missingRecordId=!0
@@ -10268,7 +10268,7 @@ const e=t.some((t=>t))
10268
10268
  if(!e)return!0
10269
10269
  const n=new Set
10270
10270
  for(const e of t)e?(n.has(e)&&(this.duplicateColumnId=!0),n.add(e)):this.missingColumnId=!0
10271
- return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t){return this.duplicateSortIndex=!this.validateIndicesAreUnique(t),!this.duplicateSortIndex}validateColumnGroupIndices(t){return this.duplicateGroupIndex=!this.validateIndicesAreUnique(t),!this.duplicateGroupIndex}validateColumnConfigurations(t){return this.invalidColumnConfiguration=t.some((t=>!t.columnInternals.validator.isColumnValid)),!this.invalidColumnConfiguration}getPresentRecordIds(t){return t.filter((t=>this.recordIds.has(t)))}getOptionsWithPresentIds(t){return t.filter((t=>this.recordIds.has(t.recordId)))}setParentIdConfigurationValidity(t){this.invalidParentIdConfiguration=!t}validateIndicesAreUnique(t){return new Set(t).size===t.length}}const _R=Mt`
10271
+ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t){return this.duplicateSortIndex=!this.validateIndicesAreUnique(t),!this.duplicateSortIndex}validateColumnGroupIndices(t){return this.duplicateGroupIndex=!this.validateIndicesAreUnique(t),!this.duplicateGroupIndex}validateColumnConfigurations(t){return this.invalidColumnConfiguration=t.some((t=>!t.columnInternals.validator.isColumnValid)),!this.invalidColumnConfiguration}getPresentRecordIds(t){return t.filter((t=>this.recordIds.has(t)))}getOptionsWithPresentIds(t){return t.filter((t=>this.recordIds.has(t.recordId)))}setParentIdConfigurationValidity(t){this.invalidParentIdConfiguration=!t}validateIndicesAreUnique(t){return new Set(t).size===t.length}}const MR=Mt`
10272
10272
  ${zs("flex")}
10273
10273
 
10274
10274
  :host {
@@ -10466,21 +10466,28 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t
10466
10466
  background-color: ${Ro(ho,.1)};
10467
10467
  position: absolute;
10468
10468
  }
10469
- `)),IR=Mt`
10469
+ `)),$R=Mt`
10470
10470
  ${zs("flex")}
10471
10471
 
10472
10472
  :host {
10473
10473
  height: ${Cl};
10474
10474
  align-items: center;
10475
- padding: 0px ${_l};
10475
+ padding-left: ${_l};
10476
+ padding-right: ${Sl};
10476
10477
  font: ${Fd};
10477
10478
  color: ${Nd};
10478
10479
  ${ul.cssCustomProperty}: ${Nd};
10479
10480
  text-transform: uppercase;
10480
- gap: ${_l};
10481
+ gap: ${Sl};
10481
10482
  cursor: default;
10482
10483
  }
10483
10484
 
10485
+ :host(.right-align) {
10486
+ flex-direction: row-reverse;
10487
+ padding-left: ${Sl};
10488
+ padding-right: ${_l};
10489
+ }
10490
+
10484
10491
  :host(${Vs}) {
10485
10492
  outline: calc(2 * ${$l}) solid ${hl};
10486
10493
  outline-offset: calc(-2 * ${$l});
@@ -10490,8 +10497,9 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t
10490
10497
  .grouped-indicator {
10491
10498
  flex: 0 0 auto;
10492
10499
  }
10493
- `,MR=Q`
10500
+ `,ER=Q`
10494
10501
  <template role="columnheader"
10502
+ class="${t=>t.alignment===sR?"right-align":""}"
10495
10503
  aria-sort="${t=>t.ariaSort}"
10496
10504
  ${""}
10497
10505
  @mousedown="${(t,e)=>!(e.event.detail>1)}"
@@ -10525,10 +10533,10 @@ return!this.missingColumnId&&!this.duplicateColumnId}validateColumnSortIndices(t
10525
10533
  `)}
10526
10534
  </template>
10527
10535
  `
10528
- class $R extends We{constructor(){super(...arguments),this.sortDirection=JO.none,this.firstSortedColumn=!1,this.indicatorsHidden=!1,this.isGrouped=!1}sortDirectionChanged(t,e){this.updateAriaSort()}firstSortedColumnChanged(t,e){this.updateAriaSort()}updateAriaSort(){this.firstSortedColumn&&this.sortDirection!==JO.none?this.sortDirection===JO.ascending?this.ariaSort="ascending":this.ariaSort="descending":this.ariaSort=null}}t([ft({attribute:"sort-direction"})],$R.prototype,"sortDirection",void 0),t([ft({attribute:"first-sorted-column",mode:"boolean"})],$R.prototype,"firstSortedColumn",void 0),t([ft({attribute:"indicators-hidden",mode:"boolean"})],$R.prototype,"indicatorsHidden",void 0),t([C],$R.prototype,"isGrouped",void 0)
10529
- const ER=$R.compose({baseName:"table-header",template:MR,styles:IR})
10530
- _i.getOrCreate().withPrefix("nimble").register(ER())
10531
- const DR="nimble-table-header",AR=Mt`
10536
+ class DR extends We{constructor(){super(...arguments),this.sortDirection=JO.none,this.firstSortedColumn=!1,this.indicatorsHidden=!1,this.alignment=iR,this.isGrouped=!1}sortDirectionChanged(t,e){this.updateAriaSort()}firstSortedColumnChanged(t,e){this.updateAriaSort()}updateAriaSort(){this.firstSortedColumn&&this.sortDirection!==JO.none?this.sortDirection===JO.ascending?this.ariaSort="ascending":this.ariaSort="descending":this.ariaSort=null}}t([ft({attribute:"sort-direction"})],DR.prototype,"sortDirection",void 0),t([ft({attribute:"first-sorted-column",mode:"boolean"})],DR.prototype,"firstSortedColumn",void 0),t([ft({attribute:"indicators-hidden",mode:"boolean"})],DR.prototype,"indicatorsHidden",void 0),t([C],DR.prototype,"alignment",void 0),t([C],DR.prototype,"isGrouped",void 0)
10537
+ const AR=DR.compose({baseName:"table-header",template:ER,styles:$R})
10538
+ _i.getOrCreate().withPrefix("nimble").register(AR())
10539
+ const TR="nimble-table-header",OR=Mt`
10532
10540
  :host .animating {
10533
10541
  transition: ${qd} ease-in;
10534
10542
  }
@@ -10551,9 +10559,9 @@ const DR="nimble-table-header",AR=Mt`
10551
10559
  transition-duration: 0s;
10552
10560
  }
10553
10561
  }
10554
- `,TR=Mt`
10562
+ `,RR=Mt`
10555
10563
  ${zs("flex")}
10556
- ${AR}
10564
+ ${OR}
10557
10565
 
10558
10566
  :host {
10559
10567
  width: fit-content;
@@ -10715,7 +10723,7 @@ const DR="nimble-table-header",AR=Mt`
10715
10723
  :host([selected]:hover)::before {
10716
10724
  background-color: ${Ro(ho,.2)};
10717
10725
  }
10718
- `)),OR=Mt`
10726
+ `)),FR=Mt`
10719
10727
  ${zs("flex")}
10720
10728
 
10721
10729
  :host {
@@ -10757,7 +10765,7 @@ const DR="nimble-table-header",AR=Mt`
10757
10765
  .action-menu.cell-action-menu-focused {
10758
10766
  display: block;
10759
10767
  }
10760
- `,RR=Q`
10768
+ `,NR=Q`
10761
10769
  <template role="cell" style="--ni-private-table-cell-nesting-level: ${t=>t.nestingLevel}"
10762
10770
  @focusin="${t=>t.onCellFocusIn()}"
10763
10771
  @blur="${t=>t.onCellBlur()}"
@@ -10785,10 +10793,10 @@ const DR="nimble-table-header",AR=Mt`
10785
10793
  `)}
10786
10794
  </template>
10787
10795
  `
10788
- class FR extends We{constructor(){super(...arguments),this.hasActionMenu=!1,this.menuOpen=!1,this.nestingLevel=0}get cellView(){return this.cellViewContainer.firstElementChild}onActionMenuBeforeToggle(t){this.$emit("cell-action-menu-beforetoggle",t.detail)}onActionMenuToggle(t){this.menuOpen=t.detail.newState,this.$emit("cell-action-menu-toggle",t.detail)}onActionMenuBlur(){this.$emit("cell-action-menu-blur",this)}onCellViewFocusIn(){this.$emit("cell-view-focus-in",this)}onCellFocusIn(){this.$emit("cell-focus-in",this)}onCellBlur(){this.$emit("cell-blur",this)}}t([C],FR.prototype,"cellState",void 0),t([C],FR.prototype,"column",void 0),t([C],FR.prototype,"recordId",void 0),t([ft({attribute:"column-id"})],FR.prototype,"columnId",void 0),t([ft({attribute:"has-action-menu",mode:"boolean"})],FR.prototype,"hasActionMenu",void 0),t([ft({attribute:"menu-open",mode:"boolean"})],FR.prototype,"menuOpen",void 0),t([ft({attribute:"action-menu-label"})],FR.prototype,"actionMenuLabel",void 0),t([C],FR.prototype,"cellViewTemplate",void 0),t([C],FR.prototype,"cellViewContainer",void 0),t([C],FR.prototype,"nestingLevel",void 0)
10789
- const NR=FR.compose({baseName:"table-cell",template:RR,styles:OR})
10790
- _i.getOrCreate().withPrefix("nimble").register(NR())
10791
- const LR="nimble-table-cell",BR=Q`
10796
+ class LR extends We{constructor(){super(...arguments),this.hasActionMenu=!1,this.menuOpen=!1,this.nestingLevel=0}get cellView(){return this.cellViewContainer.firstElementChild}onActionMenuBeforeToggle(t){this.$emit("cell-action-menu-beforetoggle",t.detail)}onActionMenuToggle(t){this.menuOpen=t.detail.newState,this.$emit("cell-action-menu-toggle",t.detail)}onActionMenuBlur(){this.$emit("cell-action-menu-blur",this)}onCellViewFocusIn(){this.$emit("cell-view-focus-in",this)}onCellFocusIn(){this.$emit("cell-focus-in",this)}onCellBlur(){this.$emit("cell-blur",this)}}t([C],LR.prototype,"cellState",void 0),t([C],LR.prototype,"column",void 0),t([C],LR.prototype,"recordId",void 0),t([ft({attribute:"column-id"})],LR.prototype,"columnId",void 0),t([ft({attribute:"has-action-menu",mode:"boolean"})],LR.prototype,"hasActionMenu",void 0),t([ft({attribute:"menu-open",mode:"boolean"})],LR.prototype,"menuOpen",void 0),t([ft({attribute:"action-menu-label"})],LR.prototype,"actionMenuLabel",void 0),t([C],LR.prototype,"cellViewTemplate",void 0),t([C],LR.prototype,"cellViewContainer",void 0),t([C],LR.prototype,"nestingLevel",void 0)
10797
+ const BR=LR.compose({baseName:"table-cell",template:NR,styles:FR})
10798
+ _i.getOrCreate().withPrefix("nimble").register(BR())
10799
+ const PR="nimble-table-cell",zR=Q`
10792
10800
  <template
10793
10801
  role="row"
10794
10802
  aria-selected=${t=>t.ariaSelected}
@@ -10844,7 +10852,7 @@ const LR="nimble-table-cell",BR=Q`
10844
10852
  >
10845
10853
  ${Qt((t=>t.columns),Q`
10846
10854
  ${Gt((t=>!t.columnHidden),Q`
10847
- <${LR}
10855
+ <${PR}
10848
10856
  class="cell"
10849
10857
  :cellState="${(t,e)=>e.parent.cellStates[e.index]}"
10850
10858
  :cellViewTemplate="${t=>t.columnInternals.cellViewTemplate}"
@@ -10868,22 +10876,22 @@ const LR="nimble-table-cell",BR=Q`
10868
10876
 
10869
10877
  ${Qt((t=>t.columnInternals.slotNames),Q`
10870
10878
  <slot
10871
- name="${(t,e)=>yR(e.parent,t)}"
10872
- slot="${(t,e)=>yR(e.parent,t)}"
10879
+ name="${(t,e)=>xR(e.parent,t)}"
10880
+ slot="${(t,e)=>xR(e.parent,t)}"
10873
10881
  ></slot>
10874
10882
  `)}
10875
- </${LR}>
10883
+ </${PR}>
10876
10884
  `)}
10877
10885
  `,{recycle:!1,positioning:!0})}
10878
10886
  </span>
10879
10887
  </template>
10880
10888
  `
10881
- class PR extends We{constructor(){super(...arguments),this.selectable=!1,this.selected=!1,this.hideSelection=!1,this.expanded=!1,this.columnNotifiers=[],this.columns=[],this.nestingLevel=0,this.isParentRow=!1,this.menuOpen=!1,this.rowOperationGridCellHidden=!1,this.loading=!1,this.cellIndentLevels=[],this.cellStates=[],this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon?.removeEventListener("transitionend",this.removeAnimatingClass)}}get isTopLevelParentRow(){return this.isParentRow&&0===this.nestingLevel}get isNestedParent(){return this.isParentRow&&this.nestingLevel>0}get showSelectionCheckbox(){return this.selectable&&!this.hideSelection}get ariaSelected(){return this.selectable?this.selected?"true":"false":null}onSelectionCheckboxChange(t){if(this.ignoreSelectionChangeEvents)return
10889
+ class VR extends We{constructor(){super(...arguments),this.selectable=!1,this.selected=!1,this.hideSelection=!1,this.expanded=!1,this.columnNotifiers=[],this.columns=[],this.nestingLevel=0,this.isParentRow=!1,this.menuOpen=!1,this.rowOperationGridCellHidden=!1,this.loading=!1,this.cellIndentLevels=[],this.cellStates=[],this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon?.removeEventListener("transitionend",this.removeAnimatingClass)}}get isTopLevelParentRow(){return this.isParentRow&&0===this.nestingLevel}get isNestedParent(){return this.isParentRow&&this.nestingLevel>0}get showSelectionCheckbox(){return this.selectable&&!this.hideSelection}get ariaSelected(){return this.selectable?this.selected?"true":"false":null}onSelectionCheckboxChange(t){if(this.ignoreSelectionChangeEvents)return
10882
10890
  const e=t.target.checked
10883
10891
  this.onSelectionChange(!e,e)}onSelectionChange(t,e){this.selected=e
10884
10892
  const n={oldState:t,newState:e}
10885
- this.$emit("row-selection-toggle",n)}onCellActionMenuBeforeToggle(t,e){this.currentActionMenuColumn=e,this.emitActionMenuToggleEvent("row-action-menu-beforetoggle",t.detail,e)}onCellActionMenuToggle(t,e){this.menuOpen=t.detail.newState,this.emitActionMenuToggleEvent("row-action-menu-toggle",t.detail,e)}closeOpenActionMenus(){if(this.menuOpen){const t=Array.from(this.cellContainer.children).find((t=>t instanceof FR&&t.menuOpen))
10886
- t?.actionMenuButton?.open&&t.actionMenuButton.toggleButton.control.click()}}handleChange(t,e){t instanceof xR&&"string"==typeof e&&(CR(e,"columnConfig")||CR(e,"dataRecordFieldNames"))&&this.updateCellStates()}getFocusableElements(){return{selectionCheckbox:this.showSelectionCheckbox?this.selectionCheckbox:void 0,cells:Array.from(this.cellContainer.querySelectorAll(LR)).map((t=>({cell:t,actionMenuButton:t.hasActionMenu?t.actionMenuButton:void 0})))}}onRowExpandToggle(t){const e={oldState:this.expanded,newState:!this.expanded,recordId:this.recordId}
10893
+ this.$emit("row-selection-toggle",n)}onCellActionMenuBeforeToggle(t,e){this.currentActionMenuColumn=e,this.emitActionMenuToggleEvent("row-action-menu-beforetoggle",t.detail,e)}onCellActionMenuToggle(t,e){this.menuOpen=t.detail.newState,this.emitActionMenuToggleEvent("row-action-menu-toggle",t.detail,e)}closeOpenActionMenus(){if(this.menuOpen){const t=Array.from(this.cellContainer.children).find((t=>t instanceof LR&&t.menuOpen))
10894
+ t?.actionMenuButton?.open&&t.actionMenuButton.toggleButton.control.click()}}handleChange(t,e){t instanceof kR&&"string"==typeof e&&(SR(e,"columnConfig")||SR(e,"dataRecordFieldNames"))&&this.updateCellStates()}getFocusableElements(){return{selectionCheckbox:this.showSelectionCheckbox?this.selectionCheckbox:void 0,cells:Array.from(this.cellContainer.querySelectorAll(PR)).map((t=>({cell:t,actionMenuButton:t.hasActionMenu?t.actionMenuButton:void 0})))}}onRowExpandToggle(t){const e={oldState:this.expanded,newState:!this.expanded,recordId:this.recordId}
10887
10895
  this.$emit("row-expand-toggle",e),t?.stopImmediatePropagation(),this.animationClass="animating",this.expandIcon?.addEventListener("transitionend",this.removeAnimatingClass)}onCellViewSlotsRequest(t,e){if(e.stopImmediatePropagation(),"string"!=typeof this.recordId)return
10888
10896
  const n={recordId:this.recordId,columnInternalId:t.columnInternals.uniqueId,slots:e.detail.slots}
10889
10897
  this.$emit("row-slots-request",n)}emitActionMenuToggleEvent(t,e,n){const i={newState:e.newState,oldState:e.oldState,recordIds:[this.recordId],columnId:n.columnId}
@@ -10891,12 +10899,12 @@ this.$emit(t,i)}columnsChanged(){this.updateCellIndentLevels(),this.updateCellSt
10891
10899
  return e.subscribe(this),e}))}updateCellStates(){this.cellStates=this.columns.map((t=>{const e=t.columnInternals.dataRecordFieldNames
10892
10900
  let n
10893
10901
  if(this.hasValidFieldNames(e)&&this.dataRecord){const i=e.map((t=>this.dataRecord[t]))
10894
- n={cellRecord:Object.fromEntries(t.columnInternals.cellRecordFieldNames.map(((t,e)=>[t,i[e]]))),columnConfig:t.columnInternals.columnConfig}}return n}))}hasValidFieldNames(t){return t.every((t=>void 0!==t))}selectedChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selected,this.ignoreSelectionChangeEvents=!1)}}t([ft({attribute:"record-id"})],PR.prototype,"recordId",void 0),t([ft({mode:"boolean"})],PR.prototype,"selectable",void 0),t([ft({mode:"boolean"})],PR.prototype,"selected",void 0),t([ft({attribute:"hide-selection",mode:"boolean"})],PR.prototype,"hideSelection",void 0),t([ft({mode:"boolean"})],PR.prototype,"expanded",void 0),t([C],PR.prototype,"dataRecord",void 0),t([C],PR.prototype,"columns",void 0),t([C],PR.prototype,"currentActionMenuColumn",void 0),t([C],PR.prototype,"nestingLevel",void 0),t([C],PR.prototype,"resolvedRowIndex",void 0),t([ft({attribute:"is-parent-row",mode:"boolean"})],PR.prototype,"isParentRow",void 0),t([ft({attribute:"menu-open",mode:"boolean"})],PR.prototype,"menuOpen",void 0),t([ft({attribute:"row-operation-grid-cell-hidden",mode:"boolean"})],PR.prototype,"rowOperationGridCellHidden",void 0),t([ft({mode:"boolean"})],PR.prototype,"loading",void 0),t([C],PR.prototype,"cellIndentLevels",void 0),t([C],PR.prototype,"cellStates",void 0),t([C],PR.prototype,"selectionCheckbox",void 0),t([C],PR.prototype,"animationClass",void 0),t([k],PR.prototype,"isTopLevelParentRow",null),t([k],PR.prototype,"isNestedParent",null),t([k],PR.prototype,"showSelectionCheckbox",null),t([k],PR.prototype,"ariaSelected",null)
10895
- const zR=PR.compose({baseName:"table-row",template:BR,styles:TR})
10896
- _i.getOrCreate().withPrefix("nimble").register(zR())
10897
- const VR="nimble-table-row",HR=Mt`
10902
+ n={cellRecord:Object.fromEntries(t.columnInternals.cellRecordFieldNames.map(((t,e)=>[t,i[e]]))),columnConfig:t.columnInternals.columnConfig}}return n}))}hasValidFieldNames(t){return t.every((t=>void 0!==t))}selectedChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selected,this.ignoreSelectionChangeEvents=!1)}}t([ft({attribute:"record-id"})],VR.prototype,"recordId",void 0),t([ft({mode:"boolean"})],VR.prototype,"selectable",void 0),t([ft({mode:"boolean"})],VR.prototype,"selected",void 0),t([ft({attribute:"hide-selection",mode:"boolean"})],VR.prototype,"hideSelection",void 0),t([ft({mode:"boolean"})],VR.prototype,"expanded",void 0),t([C],VR.prototype,"dataRecord",void 0),t([C],VR.prototype,"columns",void 0),t([C],VR.prototype,"currentActionMenuColumn",void 0),t([C],VR.prototype,"nestingLevel",void 0),t([C],VR.prototype,"resolvedRowIndex",void 0),t([ft({attribute:"is-parent-row",mode:"boolean"})],VR.prototype,"isParentRow",void 0),t([ft({attribute:"menu-open",mode:"boolean"})],VR.prototype,"menuOpen",void 0),t([ft({attribute:"row-operation-grid-cell-hidden",mode:"boolean"})],VR.prototype,"rowOperationGridCellHidden",void 0),t([ft({mode:"boolean"})],VR.prototype,"loading",void 0),t([C],VR.prototype,"cellIndentLevels",void 0),t([C],VR.prototype,"cellStates",void 0),t([C],VR.prototype,"selectionCheckbox",void 0),t([C],VR.prototype,"animationClass",void 0),t([k],VR.prototype,"isTopLevelParentRow",null),t([k],VR.prototype,"isNestedParent",null),t([k],VR.prototype,"showSelectionCheckbox",null),t([k],VR.prototype,"ariaSelected",null)
10903
+ const HR=VR.compose({baseName:"table-row",template:zR,styles:RR})
10904
+ _i.getOrCreate().withPrefix("nimble").register(HR())
10905
+ const UR="nimble-table-row",qR=Mt`
10898
10906
  ${zs("grid")}
10899
- ${AR}
10907
+ ${OR}
10900
10908
 
10901
10909
  :host {
10902
10910
  align-items: center;
@@ -10982,7 +10990,7 @@ const VR="nimble-table-row",HR=Mt`
10982
10990
  :host(:hover)::before {
10983
10991
  background-color: ${Ro(ho,.1)};
10984
10992
  }
10985
- `)),UR=Q`
10993
+ `)),jR=Q`
10986
10994
  <template
10987
10995
  role="row"
10988
10996
  @click=${t=>t.onGroupExpandToggle()}
@@ -11022,14 +11030,14 @@ const VR="nimble-table-row",HR=Mt`
11022
11030
  </div>
11023
11031
  </template>
11024
11032
  `
11025
- class qR extends We{constructor(){super(...arguments),this.nestingLevel=0,this.expanded=!1,this.selectable=!1,this.selectionState=tR,this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon.removeEventListener("transitionend",this.removeAnimatingClass)}}onGroupExpandToggle(){this.$emit("group-expand-toggle"),this.animationClass="animating",this.expandIcon.addEventListener("transitionend",this.removeAnimatingClass)}onSelectionCheckboxChange(t){if(this.ignoreSelectionChangeEvents)return
11033
+ class WR extends We{constructor(){super(...arguments),this.nestingLevel=0,this.expanded=!1,this.selectable=!1,this.selectionState=tR,this.animationClass="",this.ignoreSelectionChangeEvents=!1,this.removeAnimatingClass=()=>{this.animationClass="",this.expandIcon.removeEventListener("transitionend",this.removeAnimatingClass)}}onGroupExpandToggle(){this.$emit("group-expand-toggle"),this.animationClass="animating",this.expandIcon.addEventListener("transitionend",this.removeAnimatingClass)}onSelectionCheckboxChange(t){if(this.ignoreSelectionChangeEvents)return
11026
11034
  const e=t.target.checked
11027
11035
  this.selectionState=e?eR:tR
11028
11036
  const n={oldState:!e,newState:e}
11029
- this.$emit("group-selection-toggle",n)}getFocusableElements(){return{selectionCheckbox:this.selectable?this.selectionCheckbox:void 0,cells:[]}}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===eR,this.selectionCheckbox.indeterminate=this.selectionState===nR,this.ignoreSelectionChangeEvents=!1)}}t([C],qR.prototype,"groupRowValue",void 0),t([C],qR.prototype,"nestingLevel",void 0),t([C],qR.prototype,"resolvedRowIndex",void 0),t([C],qR.prototype,"immediateChildCount",void 0),t([C],qR.prototype,"groupColumn",void 0),t([ft({mode:"boolean"})],qR.prototype,"expanded",void 0),t([ft({mode:"boolean"})],qR.prototype,"selectable",void 0),t([ft({attribute:"selection-state"})],qR.prototype,"selectionState",void 0),t([C],qR.prototype,"selectionCheckbox",void 0),t([C],qR.prototype,"animationClass",void 0)
11030
- const jR=qR.compose({baseName:"table-group-row",template:UR,styles:HR})
11031
- _i.getOrCreate().withPrefix("nimble").register(jR())
11032
- const WR="nimble-table-group-row",GR=Q`
11037
+ this.$emit("group-selection-toggle",n)}getFocusableElements(){return{selectionCheckbox:this.selectable?this.selectionCheckbox:void 0,cells:[]}}selectionStateChanged(){this.setSelectionCheckboxState()}selectionCheckboxChanged(){this.setSelectionCheckboxState()}setSelectionCheckboxState(){this.selectionCheckbox&&(this.ignoreSelectionChangeEvents=!0,this.selectionCheckbox.checked=this.selectionState===eR,this.selectionCheckbox.indeterminate=this.selectionState===nR,this.ignoreSelectionChangeEvents=!1)}}t([C],WR.prototype,"groupRowValue",void 0),t([C],WR.prototype,"nestingLevel",void 0),t([C],WR.prototype,"resolvedRowIndex",void 0),t([C],WR.prototype,"immediateChildCount",void 0),t([C],WR.prototype,"groupColumn",void 0),t([ft({mode:"boolean"})],WR.prototype,"expanded",void 0),t([ft({mode:"boolean"})],WR.prototype,"selectable",void 0),t([ft({attribute:"selection-state"})],WR.prototype,"selectionState",void 0),t([C],WR.prototype,"selectionCheckbox",void 0),t([C],WR.prototype,"animationClass",void 0)
11038
+ const GR=WR.compose({baseName:"table-group-row",template:jR,styles:qR})
11039
+ _i.getOrCreate().withPrefix("nimble").register(GR())
11040
+ const ZR="nimble-table-group-row",KR=Q`
11033
11041
  <template
11034
11042
  role="treegrid"
11035
11043
  ${""}
@@ -11100,7 +11108,7 @@ const WR="nimble-table-group-row",GR=Q`
11100
11108
  @mousedown="${(t,e)=>e.parent.onLeftDividerMouseDown(e.event,e.index)}">
11101
11109
  </div>
11102
11110
  `)}
11103
- <${DR}
11111
+ <${TR}
11104
11112
  class="header"
11105
11113
  ${""}
11106
11114
  sort-direction="${t=>"number"==typeof t.columnInternals.currentSortIndex?t.columnInternals.currentSortDirection:JO.none}"
@@ -11108,10 +11116,11 @@ const WR="nimble-table-group-row",GR=Q`
11108
11116
  ?indicators-hidden="${t=>t.columnInternals.hideHeaderIndicators}"
11109
11117
  @keydown="${(t,e)=>e.parent.onHeaderKeyDown(t,e.event)}"
11110
11118
  @click="${(t,e)=>e.parent.toggleColumnSort(t,e.event.shiftKey)}"
11119
+ :alignment="${t=>t.columnInternals.headerAlignment}"
11111
11120
  :isGrouped=${t=>"number"==typeof t.columnInternals.groupIndex&&!t.columnInternals.groupingDisabled}
11112
11121
  >
11113
11122
  <slot name="${t=>t.slot}"></slot>
11114
- </${DR}>
11123
+ </${TR}>
11115
11124
  ${Gt(((t,e)=>e.index<e.length-1),Q`
11116
11125
  <div
11117
11126
  class="
@@ -11132,12 +11141,12 @@ const WR="nimble-table-group-row",GR=Q`
11132
11141
  </div>
11133
11142
  <div class="table-viewport" tabindex="-1" ${Ut("viewport")}>
11134
11143
  <div class="table-scroll"></div>
11135
- <div class="table-row-container ${t=>""+(t.showCollapseAll?"collapse-all-visible":"")}" ${oe({property:"rowElements",filter:te(`${VR}, ${WR}`)})}
11144
+ <div class="table-row-container ${t=>""+(t.showCollapseAll?"collapse-all-visible":"")}" ${oe({property:"rowElements",filter:te(`${UR}, ${ZR}`)})}
11136
11145
  role="rowgroup">
11137
11146
  ${Gt((t=>t.columns.length>0&&t.canRenderRows),Q`
11138
11147
  ${Qt((t=>t.virtualizer.visibleItems),Q`
11139
11148
  ${Gt(((t,e)=>e.parent.tableData[t.index]?.isGroupRow),Q`
11140
- <${WR}
11149
+ <${ZR}
11141
11150
  class="group-row"
11142
11151
  ${""}
11143
11152
  tabindex="-1"
@@ -11154,10 +11163,10 @@ const WR="nimble-table-group-row",GR=Q`
11154
11163
  @group-selection-toggle="${(t,e)=>e.parent.onRowSelectionToggle(t.index,e.event)}"
11155
11164
  @group-expand-toggle="${(t,e)=>e.parent.handleGroupRowExpanded(t.index,e.event)}"
11156
11165
  >
11157
- </${WR}>
11166
+ </${ZR}>
11158
11167
  `)}
11159
11168
  ${Gt(((t,e)=>!e.parent.tableData[t.index]?.isGroupRow),Q`
11160
- <${VR}
11169
+ <${UR}
11161
11170
  class="row"
11162
11171
  ${""}
11163
11172
  tabindex="-1"
@@ -11196,7 +11205,7 @@ const WR="nimble-table-group-row",GR=Q`
11196
11205
  slot="${t=>t.slot}"
11197
11206
  ></slot>
11198
11207
  `)}
11199
- </${VR}>
11208
+ </${UR}>
11200
11209
  `)}
11201
11210
  `)}
11202
11211
  `)}
@@ -11206,7 +11215,7 @@ const WR="nimble-table-group-row",GR=Q`
11206
11215
  </div>
11207
11216
  </template>
11208
11217
  `
11209
- function ZR(t,e,n){let i,s=n.initialDeps??[]
11218
+ function YR(t,e,n){let i,s=n.initialDeps??[]
11210
11219
  return()=>{var o,r,a,l
11211
11220
  let c
11212
11221
  n.key&&(null==(o=n.debug)?void 0:o.call(n))&&(c=Date.now())
@@ -11215,11 +11224,11 @@ if(!(d.length!==s.length||d.some(((t,e)=>s[e]!==t))))return i
11215
11224
  let h
11216
11225
  if(s=d,n.key&&(null==(r=n.debug)?void 0:r.call(n))&&(h=Date.now()),i=e(...d),n.key&&(null==(a=n.debug)?void 0:a.call(n))){const t=Math.round(100*(Date.now()-c))/100,e=Math.round(100*(Date.now()-h))/100,i=e/16,s=(t,e)=>{for(t=String(t);t.length<e;)t=" "+t
11217
11226
  return t}
11218
- console.info(`%c⏱ ${s(e,5)} /${s(t,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,i),i}}function KR(t,e){if(void 0===t)throw new Error("Unexpected undefined")
11219
- return t}const YR=(t,e,n)=>{let i
11220
- return function(...s){t.clearTimeout(i),i=t.setTimeout((()=>e.apply(this,s)),n)}},XR=t=>t,JR=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),i=[]
11227
+ console.info(`%c⏱ ${s(e,5)} /${s(t,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,i),i}}function XR(t,e){if(void 0===t)throw new Error("Unexpected undefined")
11228
+ return t}const JR=(t,e,n)=>{let i
11229
+ return function(...s){t.clearTimeout(i),i=t.setTimeout((()=>e.apply(this,s)),n)}},QR=t=>t,tF=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),i=[]
11221
11230
  for(let t=e;t<=n;t++)i.push(t)
11222
- return i},QR=(t,e)=>{const n=t.scrollElement
11231
+ return i},eF=(t,e)=>{const n=t.scrollElement
11223
11232
  if(!n)return
11224
11233
  const i=t.targetWindow
11225
11234
  if(!i)return
@@ -11229,21 +11238,21 @@ if(s(n.getBoundingClientRect()),!i.ResizeObserver)return()=>{}
11229
11238
  const o=new i.ResizeObserver((t=>{const e=t[0]
11230
11239
  if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0]
11231
11240
  if(t)return void s({width:t.inlineSize,height:t.blockSize})}s(n.getBoundingClientRect())}))
11232
- return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},tF={passive:!0},eF="undefined"==typeof window||"onscrollend"in window,nF=(t,e)=>{const n=t.scrollElement
11241
+ return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},nF={passive:!0},iF="undefined"==typeof window||"onscrollend"in window,sF=(t,e)=>{const n=t.scrollElement
11233
11242
  if(!n)return
11234
11243
  const i=t.targetWindow
11235
11244
  if(!i)return
11236
11245
  let s=0
11237
- const o=eF?()=>{}:YR(i,(()=>{e(s,!1)}),t.options.isScrollingResetDelay),r=i=>()=>{s=n[t.options.horizontal?"scrollLeft":"scrollTop"],o(),e(s,i)},a=r(!0),l=r(!1)
11238
- return l(),n.addEventListener("scroll",a,tF),n.addEventListener("scrollend",l,tF),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},iF=(t,e,n)=>{if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0]
11239
- if(t){return Math.round(t[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},sF=(t,{adjustments:e=0,behavior:n},i)=>{var s,o
11246
+ const o=iF?()=>{}:JR(i,(()=>{e(s,!1)}),t.options.isScrollingResetDelay),r=i=>()=>{s=n[t.options.horizontal?"scrollLeft":"scrollTop"],o(),e(s,i)},a=r(!0),l=r(!1)
11247
+ return l(),n.addEventListener("scroll",a,nF),n.addEventListener("scrollend",l,nF),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},oF=(t,e,n)=>{if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0]
11248
+ if(t){return Math.round(t[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},rF=(t,{adjustments:e=0,behavior:n},i)=>{var s,o
11240
11249
  const r=t+e
11241
11250
  null==(o=null==(s=i.scrollElement)?void 0:s.scrollTo)||o.call(s,{[i.options.horizontal?"left":"top"]:r,behavior:n})}
11242
- const oF=(t,e,n,i)=>{for(;t<=e;){const s=(t+e)/2|0,o=n(s)
11251
+ const aF=(t,e,n,i)=>{for(;t<=e;){const s=(t+e)/2|0,o=n(s)
11243
11252
  if(o<i)t=s+1
11244
11253
  else{if(!(o>i))return s
11245
11254
  e=s-1}}return t>0?t-1:0}
11246
- class rF{get pageSize(){return this._pageSize}get rowHeight(){return parseFloat(Cl.getValueFor(this.table))+2*parseFloat($l.getValueFor(this.table))}constructor(t,e){this.visibleItems=[],this.scrollHeight=0,this.headerContainerMarginRight=0,this.rowContainerYOffset=0,this._pageSize=0,this.table=t,this.tanStackTable=e,this.viewportResizeObserver=new ResizeObserver((t=>{const e=t[0]?.borderBoxSize[0]
11255
+ class lF{get pageSize(){return this._pageSize}get rowHeight(){return parseFloat(Cl.getValueFor(this.table))+2*parseFloat($l.getValueFor(this.table))}constructor(t,e){this.visibleItems=[],this.scrollHeight=0,this.headerContainerMarginRight=0,this.rowContainerYOffset=0,this._pageSize=0,this.table=t,this.tanStackTable=e,this.viewportResizeObserver=new ResizeObserver((t=>{const e=t[0]?.borderBoxSize[0]
11247
11256
  if(e){this.updatePageSize()
11248
11257
  const t=e.inlineSize
11249
11258
  this.headerContainerMarginRight=t-this.table.viewport.clientWidth}}))}connect(){this.viewportResizeObserver.observe(this.table.viewport),this.updateVirtualizer()
@@ -11254,7 +11263,7 @@ const e=()=>t||(this.targetWindow&&this.targetWindow.ResizeObserver?t=new this.t
11254
11263
  return{disconnect:()=>{var t
11255
11264
  return null==(t=e())?void 0:t.disconnect()},observe:t=>{var n
11256
11265
  return null==(n=e())?void 0:n.observe(t,{box:"border-box"})},unobserve:t=>{var n
11257
- return null==(n=e())?void 0:n.unobserve(t)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach((([e,n])=>{void 0===n&&delete t[e]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:XR,rangeExtractor:JR,onChange:()=>{},measureElement:iF,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,e)=>{var n,i
11266
+ return null==(n=e())?void 0:n.unobserve(t)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach((([e,n])=>{void 0===n&&delete t[e]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:QR,rangeExtractor:tF,onChange:()=>{},measureElement:oF,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,e)=>{var n,i
11258
11267
  const{startIndex:s,endIndex:o}=this.range??{startIndex:void 0,endIndex:void 0},r=this.calculateRange();(t||s!==(null==r?void 0:r.startIndex)||o!==(null==r?void 0:r.endIndex))&&(null==(i=(n=this.options).onChange)||i.call(n,this,e))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((t=>t())),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t
11259
11268
  const e=this.options.enabled?this.options.getScrollElement():null
11260
11269
  if(this.scrollElement!==e){if(this.cleanup(),!e)return void this.notify(!1,!1)
@@ -11264,7 +11273,7 @@ this.isScrolling=e,this.notify(n!==e,e)})))}},this.getSize=()=>this.options.enab
11264
11273
  for(let s=e-1;s>=0;s--){const e=t[s]
11265
11274
  if(n.has(e.lane))continue
11266
11275
  const o=i.get(e.lane)
11267
- if(null==o||e.end>o.end?i.set(e.lane,e):e.end<o.end&&n.set(e.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort(((t,e)=>t.end===e.end?t.index-e.index:t.end-e.end))[0]:void 0},this.getMeasurementOptions=ZR((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((t,e,n,i,s)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:e,scrollMargin:n,getItemKey:i,enabled:s})),{key:!1}),this.getMeasurements=ZR((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:t,paddingStart:e,scrollMargin:n,getItemKey:i,enabled:s},o)=>{var r
11276
+ if(null==o||e.end>o.end?i.set(e.lane,e):e.end<o.end&&n.set(e.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort(((t,e)=>t.end===e.end?t.index-e.index:t.end-e.end))[0]:void 0},this.getMeasurementOptions=YR((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((t,e,n,i,s)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:e,scrollMargin:n,getItemKey:i,enabled:s})),{key:!1}),this.getMeasurements=YR((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:t,paddingStart:e,scrollMargin:n,getItemKey:i,enabled:s},o)=>{var r
11268
11277
  if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[]
11269
11278
  0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((t=>{this.itemSizeCache.set(t.key,t.size)})))
11270
11279
  const a=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0
@@ -11274,20 +11283,20 @@ for(let s=a;s<t;s++){let t=null==(r=this.measurementsCache[s])?void 0:r.measureE
11274
11283
  t||(t=t=>{const e=i(s),n=this.elementsCache.get(e)
11275
11284
  t?(n!==t&&(n&&this.observer.unobserve(n),this.observer.observe(t),this.elementsCache.set(e,t)),t.isConnected&&this.resizeItem(s,this.options.measureElement(t,void 0,this))):n&&(this.observer.unobserve(n),this.elementsCache.delete(e))})
11276
11285
  const a=i(s),c=1===this.options.lanes?l[s-1]:this.getFurthestMeasurement(l,s),d=c?c.end+this.options.gap:e+n,h=o.get(a),u="number"==typeof h?h:this.options.estimateSize(s),p=d+u,f=c?c.lane:s%this.options.lanes
11277
- l[s]={index:s,start:d,size:u,end:p,key:a,lane:f,measureElement:t}}return this.measurementsCache=l,l}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=ZR((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((t,e,n)=>this.range=t.length>0&&e>0?function({measurements:t,outerSize:e,scrollOffset:n}){const i=t.length-1,s=oF(0,i,(e=>t[e].start),n)
11286
+ l[s]={index:s,start:d,size:u,end:p,key:a,lane:f,measureElement:t}}return this.measurementsCache=l,l}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=YR((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((t,e,n)=>this.range=t.length>0&&e>0?function({measurements:t,outerSize:e,scrollOffset:n}){const i=t.length-1,s=aF(0,i,(e=>t[e].start),n)
11278
11287
  let o=s
11279
11288
  for(;o<i&&t[o].end<n+e;)o++
11280
- return{startIndex:s,endIndex:o}}({measurements:t,outerSize:e,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=ZR((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((t,e,n,i)=>null===e?[]:t({startIndex:e.startIndex,endIndex:e.endIndex,overscan:n,count:i})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,n=t.getAttribute(e)
11289
+ return{startIndex:s,endIndex:o}}({measurements:t,outerSize:e,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=YR((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((t,e,n,i)=>null===e?[]:t({startIndex:e.startIndex,endIndex:e.endIndex,overscan:n,count:i})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,n=t.getAttribute(e)
11281
11290
  return n?parseInt(n,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this._measureElement=(t,e)=>{const n=this.indexFromElement(t),i=this.getMeasurements()[n]
11282
11291
  if(!i||!t.isConnected)return void this.elementsCache.forEach(((e,n)=>{e===t&&(this.observer.unobserve(t),this.elementsCache.delete(n))}))
11283
11292
  const s=this.elementsCache.get(i.key)
11284
11293
  s!==t&&(s&&this.observer.unobserve(s),this.observer.observe(t),this.elementsCache.set(i.key,t)),this.resizeItem(n,this.options.measureElement(t,e,this))},this.resizeItem=(t,e)=>{const n=this.getMeasurements()[t]
11285
11294
  if(!n)return
11286
11295
  const i=e-(this.itemSizeCache.get(n.key)??n.size)
11287
- 0!==i&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,i,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,e)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=ZR((()=>[this.getIndexes(),this.getMeasurements()]),((t,e)=>{const n=[]
11296
+ 0!==i&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,i,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,e)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=YR((()=>[this.getIndexes(),this.getMeasurements()]),((t,e)=>{const n=[]
11288
11297
  for(let i=0,s=t.length;i<s;i++){const s=e[t[i]]
11289
11298
  n.push(s)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const e=this.getMeasurements()
11290
- if(0!==e.length)return KR(e[oF(0,e.length-1,(t=>KR(e[t]).start),t)])},this.getOffsetForAlignment=(t,e)=>{const n=this.getSize(),i=this.getScrollOffset()
11299
+ if(0!==e.length)return XR(e[aF(0,e.length-1,(t=>XR(e[t]).start),t)])},this.getOffsetForAlignment=(t,e)=>{const n=this.getSize(),i=this.getScrollOffset()
11291
11300
  "auto"===e&&(e=t<=i?"start":t>=i+n?"end":"start"),"start"===e||("end"===e?t-=n:"center"===e&&(t-=n/2))
11292
11301
  const s=this.options.horizontal?"scrollWidth":"scrollHeight",o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-n
11293
11302
  return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1))
@@ -11301,23 +11310,23 @@ return[this.getOffsetForAlignment(o,e),e]},this.isDynamicMode=()=>this.elementsC
11301
11310
  const i=this.getOffsetForIndex(t,e)
11302
11311
  if(!i)return
11303
11312
  const[s,o]=i
11304
- this._scrollToOffset(s,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[s]=KR(this.getOffsetForIndex(t,o))
11313
+ this._scrollToOffset(s,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[s]=XR(this.getOffsetForIndex(t,o))
11305
11314
  e=s,i=this.getScrollOffset(),Math.abs(e-i)<1||this.scrollToIndex(t,{align:o,behavior:n})}else this.scrollToIndex(t,{align:o,behavior:n})
11306
11315
  var e,i})))},this.scrollBy=(t,{behavior:e}={})=>{this.cancelScrollToIndex(),"smooth"===e&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:e})},this.getTotalSize=()=>{var t
11307
11316
  const e=this.getMeasurements()
11308
11317
  let n
11309
11318
  return n=0===e.length?this.options.paddingStart:1===this.options.lanes?(null==(t=e[e.length-1])?void 0:t.end)??0:Math.max(...e.slice(-this.options.lanes).map((t=>t.end))),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:e,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:e},this)},this.measure=()=>{var t,e
11310
11319
  this.itemSizeCache=new Map,null==(e=(t=this.options).onChange)||e.call(t,this,!1)},this.setOptions(t)}}(t),this.virtualizer._willUpdate(),this.handleVirtualizerChange()}createVirtualizerOptions(){const t=this.rowHeight
11311
- return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:e=>t,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:sF,observeElementOffset:nF,observeElementRect:QR,onChange:()=>this.handleVirtualizerChange()}}handleVirtualizerChange(){this.table.handleFocusedCellRecycling()
11320
+ return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:e=>t,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:rF,observeElementOffset:sF,observeElementRect:eF,onChange:()=>this.handleVirtualizerChange()}}handleVirtualizerChange(){this.table.handleFocusedCellRecycling()
11312
11321
  const t=this.virtualizer
11313
11322
  this.visibleItems=t.getVirtualItems(),this.scrollHeight=t.getTotalSize()
11314
11323
  let e=0
11315
- if(this.visibleItems.length>0){e=this.visibleItems[0].start}this.rowContainerYOffset=e}updatePageSize(){this._pageSize=Math.round(this.table.viewport.clientHeight/this.rowHeight)}}function aF(t){switch(t){case hR:return cF
11316
- case uR:return lF
11317
- default:return cF}}function lF(t,e,n){const i=t.getValue(n),s=e.getValue(n)
11318
- return"string"==typeof i&&"string"==typeof s?i.localeCompare(s):i===s?0:void 0===i||null===i&&void 0!==s?-1:1}function cF(t,e,n){const i=t.getValue(n),s=e.getValue(n)
11319
- return Object.is(i,s)?0:void 0===i?-1:void 0===s?1:null===i?-1:null===s?1:Number.isNaN(i)?-1:Number.isNaN(s)?1:0===i&&0===s?Object.is(i,-0)?-1:1:i>s?1:-1}t([C],rF.prototype,"visibleItems",void 0),t([C],rF.prototype,"scrollHeight",void 0),t([C],rF.prototype,"headerContainerMarginRight",void 0),t([C],rF.prototype,"rowContainerYOffset",void 0)
11320
- class dF{constructor(t){this.table=t,this.isColumnBeingSized=!1,this.visibleColumns=[],this.currentTotalDelta=0,this.dragStart=0,this.initialColumnWidths=[],this.onDividerMouseMove=t=>{const e=t
11324
+ if(this.visibleItems.length>0){e=this.visibleItems[0].start}this.rowContainerYOffset=e}updatePageSize(){this._pageSize=Math.round(this.table.viewport.clientHeight/this.rowHeight)}}function cF(t){switch(t){case pR:return hF
11325
+ case fR:return dF
11326
+ default:return hF}}function dF(t,e,n){const i=t.getValue(n),s=e.getValue(n)
11327
+ return"string"==typeof i&&"string"==typeof s?i.localeCompare(s):i===s?0:void 0===i||null===i&&void 0!==s?-1:1}function hF(t,e,n){const i=t.getValue(n),s=e.getValue(n)
11328
+ return Object.is(i,s)?0:void 0===i?-1:void 0===s?1:null===i?-1:null===s?1:Number.isNaN(i)?-1:Number.isNaN(s)?1:0===i&&0===s?Object.is(i,-0)?-1:1:i>s?1:-1}t([C],lF.prototype,"visibleItems",void 0),t([C],lF.prototype,"scrollHeight",void 0),t([C],lF.prototype,"headerContainerMarginRight",void 0),t([C],lF.prototype,"rowContainerYOffset",void 0)
11329
+ class uF{constructor(t){this.table=t,this.isColumnBeingSized=!1,this.visibleColumns=[],this.currentTotalDelta=0,this.dragStart=0,this.initialColumnWidths=[],this.onDividerMouseMove=t=>{const e=t
11321
11330
  for(let t=0;t<this.visibleColumns.length;t++)this.visibleColumns[t].columnInternals.currentPixelWidth=this.initialColumnWidths[t]?.initialPixelWidth
11322
11331
  this.currentTotalDelta=this.getAllowedSizeDelta(e.clientX-this.dragStart),this.performCascadeSizeLeft(this.leftColumnIndex,this.currentTotalDelta),this.performCascadeSizeRight(this.rightColumnIndex,this.currentTotalDelta)
11323
11332
  const n=this.getTotalColumnFixedWidth()-this.initialColumnTotalWidth
@@ -11354,10 +11363,10 @@ for(const t of this.visibleColumns)this.initialColumnWidths.push({initalColumnFr
11354
11363
  const t=this.gridSizedColumns.reduce(((t,e)=>t+e.columnInternals.currentPixelWidth),0),e=t/this.gridSizedColumns.length
11355
11364
  let n=0
11356
11365
  for(let t=0;t<this.visibleColumns.length&&n<this.gridSizedColumns.length;t++){const i=this.visibleColumns[t]
11357
- i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/e,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((t=>!t.columnHidden))}getLeftColumnIndexFromDivider(t){return Math.floor(t/2)}}t([C],dF.prototype,"isColumnBeingSized",void 0),t([C],dF.prototype,"activeColumnIndex",void 0),t([C],dF.prototype,"activeColumnDivider",void 0)
11358
- const hF=(t,...e)=>{for(const n of e)if(t===n)return!0
11359
- return!1},uF=["rowIds","rowParentIds","groupRows","columnIds","columnHidden","columnSort","columnSortDisabled","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
11360
- class pF extends wE{constructor(t){super(uF),this.table=t,this.updateQueued=!1}get updateRowIds(){return this.isTracked("rowIds")}get updateRowParentIds(){return this.isTracked("rowParentIds")}get updateGroupRows(){return this.isTracked("groupRows")}get updateColumnIds(){return this.isTracked("columnIds")}get updateColumnSort(){return this.isTracked("columnSort")}get updateColumnWidths(){return this.isTracked("columnWidths")}get updateColumnDefinition(){return this.isTracked("columnDefinition")}get updateActionMenuSlots(){return this.isTracked("actionMenuSlots")}get updateSelectionMode(){return this.isTracked("selectionMode")}get requiresTanStackUpdate(){return this.isTracked("rowIds")||this.isTracked("rowParentIds")||this.isTracked("columnSort")||this.isTracked("columnDefinition")||this.isTracked("groupRows")||this.isTracked("selectionMode")}get requiresTanStackDataReset(){return this.isTracked("rowIds")||this.isTracked("columnDefinition")||this.isTracked("rowParentIds")}get requiresKeyboardFocusReset(){return this.isTracked("columnSortDisabled")||this.isTracked("columnDefinition")||this.isTracked("columnHidden")||this.isTracked("selectionMode")||this.isTracked("actionMenuSlots")}trackAllStateChanged(){this.trackAll(),this.queueUpdate()}get hasPendingUpdates(){return this.updateQueued}trackColumnPropertyChanged(t){hF(t,"columnId")?this.track("columnIds"):CR(t,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):CR(t,"sortingDisabled")?(this.track("columnSort"),this.track("columnSortDisabled")):CR(t,"currentSortDirection","currentSortIndex")?this.track("columnSort"):CR(t,"currentFractionalWidth","currentPixelWidth","minPixelWidth","resizingDisabled")?this.track("columnWidths"):hF(t,"columnHidden")?(this.track("columnWidths"),this.track("columnHidden")):hF(t,"actionMenuSlot")?this.track("actionMenuSlots"):CR(t,"groupIndex","groupingDisabled")&&this.track("groupRows"),this.queueUpdate()}trackColumnInstancesChanged(){this.track("columnIds"),this.track("columnDefinition"),this.track("columnSort"),this.track("columnSortDisabled"),this.track("columnWidths"),this.track("actionMenuSlots"),this.track("groupRows"),this.queueUpdate()}trackIdFieldNameChanged(){this.track("rowIds"),this.queueUpdate()}trackParentIdFieldNameChanged(){this.track("rowParentIds"),this.queueUpdate()}trackSelectionModeChanged(){this.track("selectionMode"),this.queueUpdate()}queueUpdate(){this.table.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,b.queueUpdate((()=>{this.table.update(),this.untrackAll(),this.updateQueued=!1}))))}}class fF{constructor(t){this.tanStackTable=t}reset(){}toggleIsRowSelected(t,e){t.isGroupRow&&t.selectionState===eR?this.deselectAllLeafRows(t.id):this.tanStackTable.getRow(t.id).toggleSelected(e,{selectChildren:t.isGroupRow})}selectSingleRow(t){if(t.isGroupRow)throw new Error("function not intended to select grouped rows")
11366
+ i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/e,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((t=>!t.columnHidden))}getLeftColumnIndexFromDivider(t){return Math.floor(t/2)}}t([C],uF.prototype,"isColumnBeingSized",void 0),t([C],uF.prototype,"activeColumnIndex",void 0),t([C],uF.prototype,"activeColumnDivider",void 0)
11367
+ const pF=(t,...e)=>{for(const n of e)if(t===n)return!0
11368
+ return!1},fF=["rowIds","rowParentIds","groupRows","columnIds","columnHidden","columnSort","columnSortDisabled","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
11369
+ class mF extends wE{constructor(t){super(fF),this.table=t,this.updateQueued=!1}get updateRowIds(){return this.isTracked("rowIds")}get updateRowParentIds(){return this.isTracked("rowParentIds")}get updateGroupRows(){return this.isTracked("groupRows")}get updateColumnIds(){return this.isTracked("columnIds")}get updateColumnSort(){return this.isTracked("columnSort")}get updateColumnWidths(){return this.isTracked("columnWidths")}get updateColumnDefinition(){return this.isTracked("columnDefinition")}get updateActionMenuSlots(){return this.isTracked("actionMenuSlots")}get updateSelectionMode(){return this.isTracked("selectionMode")}get requiresTanStackUpdate(){return this.isTracked("rowIds")||this.isTracked("rowParentIds")||this.isTracked("columnSort")||this.isTracked("columnDefinition")||this.isTracked("groupRows")||this.isTracked("selectionMode")}get requiresTanStackDataReset(){return this.isTracked("rowIds")||this.isTracked("columnDefinition")||this.isTracked("rowParentIds")}get requiresKeyboardFocusReset(){return this.isTracked("columnSortDisabled")||this.isTracked("columnDefinition")||this.isTracked("columnHidden")||this.isTracked("selectionMode")||this.isTracked("actionMenuSlots")}trackAllStateChanged(){this.trackAll(),this.queueUpdate()}get hasPendingUpdates(){return this.updateQueued}trackColumnPropertyChanged(t){pF(t,"columnId")?this.track("columnIds"):SR(t,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):SR(t,"sortingDisabled")?(this.track("columnSort"),this.track("columnSortDisabled")):SR(t,"currentSortDirection","currentSortIndex")?this.track("columnSort"):SR(t,"currentFractionalWidth","currentPixelWidth","minPixelWidth","resizingDisabled")?this.track("columnWidths"):pF(t,"columnHidden")?(this.track("columnWidths"),this.track("columnHidden")):pF(t,"actionMenuSlot")?this.track("actionMenuSlots"):SR(t,"groupIndex","groupingDisabled")&&this.track("groupRows"),this.queueUpdate()}trackColumnInstancesChanged(){this.track("columnIds"),this.track("columnDefinition"),this.track("columnSort"),this.track("columnSortDisabled"),this.track("columnWidths"),this.track("actionMenuSlots"),this.track("groupRows"),this.queueUpdate()}trackIdFieldNameChanged(){this.track("rowIds"),this.queueUpdate()}trackParentIdFieldNameChanged(){this.track("rowParentIds"),this.queueUpdate()}trackSelectionModeChanged(){this.track("selectionMode"),this.queueUpdate()}queueUpdate(){this.table.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,b.queueUpdate((()=>{this.table.update(),this.untrackAll(),this.updateQueued=!1}))))}}class gF{constructor(t){this.tanStackTable=t}reset(){}toggleIsRowSelected(t,e){t.isGroupRow&&t.selectionState===eR?this.deselectAllLeafRows(t.id):this.tanStackTable.getRow(t.id).toggleSelected(e,{selectChildren:t.isGroupRow})}selectSingleRow(t){if(t.isGroupRow)throw new Error("function not intended to select grouped rows")
11361
11370
  const e=this.tanStackTable.getState().rowSelection,n=[]
11362
11371
  if(Object.entries(e).forEach((([t,e])=>{e&&n.push(t)})),1===n.length&&n[0]===t.id)return!1
11363
11372
  const i={}
@@ -11367,7 +11376,7 @@ this.tanStackTable.setRowSelection(i)}getAllLeafRowIds(t){const e=this.tanStackT
11367
11376
  return e?.getIsGrouped()?e.getLeafRows().filter((t=>!t.getIsGrouped())).map((t=>t.id)):[]}getAllOrderedRows(){const t=this.tanStackTable.getPreExpandedRowModel().rows
11368
11377
  return this.getOrderedRows(t)}getOrderedRows(t){const e=[]
11369
11378
  for(const n of t)e.push(n),n.subRows?.length&&e.push(...this.getOrderedRows(n.subRows))
11370
- return e}}class mF extends fF{handleRowSelectionToggle(t,e,n){return!1}handleRowClick(t,e,n){return!1}handleActionMenuOpening(t){return!1}}class gF extends fF{handleRowSelectionToggle(t,e,n){return n&&this.tryUpdateRangeSelection(t.id)||(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t,e)),!0}handleRowClick(t,e,n){return n?(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t),!0):!(!e||!this.tryUpdateRangeSelection(t.id))||(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.selectSingleRow(t))}handleActionMenuOpening(t){return t.selectionState!==eR&&this.selectSingleRow(t)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(t){if(void 0===this.shiftSelectStartRowId)return!1
11379
+ return e}}class vF extends gF{handleRowSelectionToggle(t,e,n){return!1}handleRowClick(t,e,n){return!1}handleActionMenuOpening(t){return!1}}class bF extends gF{handleRowSelectionToggle(t,e,n){return n&&this.tryUpdateRangeSelection(t.id)||(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t,e)),!0}handleRowClick(t,e,n){return n?(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t),!0):!(!e||!this.tryUpdateRangeSelection(t.id))||(this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.selectSingleRow(t))}handleActionMenuOpening(t){return t.selectionState!==eR&&this.selectSingleRow(t)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(t){if(void 0===this.shiftSelectStartRowId)return!1
11371
11380
  const e=this.getAllOrderedRows(),n=this.getRowIndexForId(this.shiftSelectStartRowId,e)
11372
11381
  if(-1===n)return!1
11373
11382
  const i=this.tanStackTable.getState().rowSelection
@@ -11377,20 +11386,20 @@ this.updateSelectionStateForRange(t,n,s,i,!0)}updateSelectionStateForRange(t,e,n
11377
11386
  const o=Math.min(e,n),r=Math.max(e,n)
11378
11387
  for(let e=o;e<=r;e++){const n=i[e]
11379
11388
  n.getIsGrouped()||this.updateSelectionStateForRow(t,n.id,s)}const a=i[n]
11380
- a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((e=>this.updateSelectionStateForRow(t,e,s)))}updateSelectionStateForRow(t,e,n){n?t[e]=!0:delete t[e]}getRowIndexForId(t,e){return t?e.findIndex((e=>e.id===t)):-1}}class vF extends fF{handleRowSelectionToggle(t,e,n){return this.toggleIsRowSelected(t,e),!0}handleRowClick(t,e,n){return this.selectSingleRow(t)}handleActionMenuOpening(t){return this.handleRowClick(t,!1,!1)}}class bF{constructor(t,e){this.tanStackTable=t,this.selectionManager=this.createSelectionManager(e)}handleRowSelectionToggle(t,e,n){return!!t&&this.selectionManager.handleRowSelectionToggle(t,e,n)}handleRowClick(t,e,n){return!!t&&this.selectionManager.handleRowClick(t,e,n)}handleActionMenuOpening(t){return!!t&&this.selectionManager.handleActionMenuOpening(t)}handleSelectionModeChanged(t){this.selectionManager=this.createSelectionManager(t)}handleSelectionReset(){this.selectionManager.reset()}getCurrentSelectedRecordIds(){const t=this.tanStackTable.options.state.rowSelection
11389
+ a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((e=>this.updateSelectionStateForRow(t,e,s)))}updateSelectionStateForRow(t,e,n){n?t[e]=!0:delete t[e]}getRowIndexForId(t,e){return t?e.findIndex((e=>e.id===t)):-1}}class yF extends gF{handleRowSelectionToggle(t,e,n){return this.toggleIsRowSelected(t,e),!0}handleRowClick(t,e,n){return this.selectSingleRow(t)}handleActionMenuOpening(t){return this.handleRowClick(t,!1,!1)}}class wF{constructor(t,e){this.tanStackTable=t,this.selectionManager=this.createSelectionManager(e)}handleRowSelectionToggle(t,e,n){return!!t&&this.selectionManager.handleRowSelectionToggle(t,e,n)}handleRowClick(t,e,n){return!!t&&this.selectionManager.handleRowClick(t,e,n)}handleActionMenuOpening(t){return!!t&&this.selectionManager.handleActionMenuOpening(t)}handleSelectionModeChanged(t){this.selectionManager=this.createSelectionManager(t)}handleSelectionReset(){this.selectionManager.reset()}getCurrentSelectedRecordIds(){const t=this.tanStackTable.options.state.rowSelection
11381
11390
  if(!t)return[]
11382
11391
  const e=[]
11383
- return Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e}createSelectionManager(t){switch(t){case QO.multiple:return new gF(this.tanStackTable)
11384
- case QO.single:return new vF(this.tanStackTable)
11385
- case QO.none:return new mF(this.tanStackTable)
11386
- default:throw new Error("unknown selection mode found")}}}function yF(t,e){const n=e,i=[],s={},o=new Set
11392
+ return Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e}createSelectionManager(t){switch(t){case QO.multiple:return new bF(this.tanStackTable)
11393
+ case QO.single:return new yF(this.tanStackTable)
11394
+ case QO.none:return new vF(this.tanStackTable)
11395
+ default:throw new Error("unknown selection mode found")}}}function xF(t,e){const n=e,i=[],s={},o=new Set
11387
11396
  for(let e=0;e<t.length;e++){const r=t[e],a=r[n.id],l=r[n.parentId]
11388
11397
  Object.prototype.hasOwnProperty.call(s,a)||(s[a]={subRows:[],clientRecord:void 0,originalIndex:void 0}),o&&o.delete(a),s[a].clientRecord=r
11389
11398
  const c=s[a]
11390
11399
  c.originalIndex=e,null==l?i.push(c):(Object.prototype.hasOwnProperty.call(s,l)||(s[l]={subRows:[],clientRecord:void 0,originalIndex:void 0},o&&o.add(l)),s[l].subRows.push(c))}if(o?.size){const t=Array.from(o.values()).join(",")
11391
- throw new Error(`The items array contains orphans that point to the following parentIds: [${t}]. These parentIds do not exist in the items array.`)}if(wF(i)<Object.keys(s).length)throw new Error("The items array contains nodes with a circular parent/child relationship.")
11392
- return i}function wF(t){return t.reduce(((t,e)=>t+1+(e.subRows&&wF(e.subRows))),0)}class xF{constructor(t,e,n){if(this.isDataFlat=!1,"string"==typeof e&&"string"==typeof n)try{this._hierarchicalData=yF(t,{id:e,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(t=!1){const e=[]
11393
- return this.getAllNodes(this._hierarchicalData,e),this.isDataFlat||!t?e.map((t=>t.clientRecord)):e.sort(((t,e)=>t.originalIndex-e.originalIndex)).map((t=>t.clientRecord))}getAllNodes(t,e){for(const n of t)e.push(n),n.subRows&&this.getAllNodes(n.subRows,e)}}class CF{constructor(t){this.tanStackTable=t,this.explicitExpansionStates=new Map,this.hierarchyOptions=new Map,this.isHierarchyEnabled=!1,this.parentRowsWithChildren=new Set}isRowExpanded(t){if(!this.isRowExpandable(t))return!1
11400
+ throw new Error(`The items array contains orphans that point to the following parentIds: [${t}]. These parentIds do not exist in the items array.`)}if(CF(i)<Object.keys(s).length)throw new Error("The items array contains nodes with a circular parent/child relationship.")
11401
+ return i}function CF(t){return t.reduce(((t,e)=>t+1+(e.subRows&&CF(e.subRows))),0)}class kF{constructor(t,e,n){if(this.isDataFlat=!1,"string"==typeof e&&"string"==typeof n)try{this._hierarchicalData=xF(t,{id:e,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(t=!1){const e=[]
11402
+ return this.getAllNodes(this._hierarchicalData,e),this.isDataFlat||!t?e.map((t=>t.clientRecord)):e.sort(((t,e)=>t.originalIndex-e.originalIndex)).map((t=>t.clientRecord))}getAllNodes(t,e){for(const n of t)e.push(n),n.subRows&&this.getAllNodes(n.subRows,e)}}class SF{constructor(t){this.tanStackTable=t,this.explicitExpansionStates=new Map,this.hierarchyOptions=new Map,this.isHierarchyEnabled=!1,this.parentRowsWithChildren=new Set}isRowExpanded(t){if(!this.isRowExpandable(t))return!1
11394
11403
  return this.explicitExpansionStates.get(t.id)??this.getDefaultExpansionState(t)}toggleRowExpansion(t){if(!this.isRowExpandable(t))return
11395
11404
  const e=this.isRowExpanded(t)
11396
11405
  this.explicitExpansionStates.set(t.id,!e),t.toggleExpanded()}collapseAll(){this.resetExpansionState()
@@ -11405,15 +11414,15 @@ for(const{recordId:n,options:i}of t){e.set(n,i)
11405
11414
  const t=this.hierarchyOptions.get(n)?.delayedHierarchyState,s=i.delayedHierarchyState
11406
11415
  t!==XO||s!==YO||this.parentRowsWithChildren.has(n)||this.explicitExpansionStates.delete(n)}this.hierarchyOptions=e}isRowExpandable(t){return t.subRows.length>0||this.canLoadDelayedChildren(t.id)}setHierarchyEnabled(t){this.isHierarchyEnabled=t}isLoadingChildren(t){return!!this.isHierarchyEnabled&&(this.hierarchyOptions.get(t)?.delayedHierarchyState===XO??!1)}canLoadDelayedChildren(t){if(!this.isHierarchyEnabled)return!1
11407
11416
  const e=this.hierarchyOptions.get(t)?.delayedHierarchyState
11408
- return e!==KO}getDefaultExpansionState(t){return 0!==t.subRows.length}}class kF extends yE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class SF extends kF{constructor(t){super(t),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}setConditionValue(t,e){e?this.track(t):this.untrack(t),this.updateColumnInternalsFlag()}updateColumnInternalsFlag(){this.isColumnValid=this.isValid()}}t([C],SF.prototype,"isColumnValid",void 0)
11409
- class _F{get inNavigationMode(){return this.focusType!==cR&&this.focusType!==dR}constructor(t,e){this.table=t,this.virtualizer=e,this.focusType=iR,this.headerActionIndex=-1,this.rowIndex=-1,this.cellContentIndex=-1,this.columnIndex=-1,this.focusWithinTable=!1,this.isCurrentlyFocusingElement=!1,this.visibleRowNotifiers=[],this.onTableFocusIn=t=>{this.focusWithinTable=!0,this.updateFocusStateFromActiveElement(!1)
11417
+ return e!==KO}getDefaultExpansionState(t){return 0!==t.subRows.length}}class _F extends yE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class IF extends _F{constructor(t){super(t),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}setConditionValue(t,e){e?this.track(t):this.untrack(t),this.updateColumnInternalsFlag()}updateColumnInternalsFlag(){this.isColumnValid=this.isValid()}}t([C],IF.prototype,"isColumnValid",void 0)
11418
+ class MF{get inNavigationMode(){return this.focusType!==hR&&this.focusType!==uR}constructor(t,e){this.table=t,this.virtualizer=e,this.focusType=oR,this.headerActionIndex=-1,this.rowIndex=-1,this.cellContentIndex=-1,this.columnIndex=-1,this.focusWithinTable=!1,this.isCurrentlyFocusingElement=!1,this.visibleRowNotifiers=[],this.onTableFocusIn=t=>{this.focusWithinTable=!0,this.updateFocusStateFromActiveElement(!1)
11410
11419
  const e=void 0!==this.table.openActionMenuRecordId
11411
- if((t.target===this.table||this.focusType===iR)&&!e){let t=!0
11420
+ if((t.target===this.table||this.focusType===oR)&&!e){let t=!0
11412
11421
  this.hasRowOrCellFocusType()&&this.scrollToAndFocusRow(this.rowIndex)&&(t=!1),t&&!this.setFocusOnHeader()&&this.table.blur()}},this.onTableFocusOut=()=>{this.focusWithinTable=!1},this.onCellActionMenuBlur=t=>{t.stopPropagation()
11413
11422
  const e=t.detail
11414
11423
  e.actionMenuButton&&this.setActionMenuButtonFocused(e.actionMenuButton,!1)},this.onCellViewFocusIn=t=>{t.stopPropagation(),this.updateFocusStateFromActiveElement(!1)},this.onCellFocusIn=t=>{t.stopPropagation()
11415
11424
  const e=t.detail
11416
- this.updateFocusStateFromActiveElement(!0),this.focusType===rR&&this.getActiveElement()===e&&this.focusCurrentRow(!1)},this.onCellBlur=t=>{t.stopPropagation()
11425
+ this.updateFocusStateFromActiveElement(!0),this.focusType===lR&&this.getActiveElement()===e&&this.focusCurrentRow(!1)},this.onCellBlur=t=>{t.stopPropagation()
11417
11426
  const e=t.detail
11418
11427
  this.setElementFocusable(e,!1)},this.onCaptureKeyDown=t=>{let e=!1
11419
11428
  if(t.key===Ba)e=this.onTabPressed(t.shiftKey)
@@ -11439,106 +11448,106 @@ case La:e=this.onSpacePressed(t.shiftKey)
11439
11448
  break
11440
11449
  case"F2":e=this.onF2Pressed()}e&&t.preventDefault()},this.onKeyDown=t=>{if(!(this.inNavigationMode||t.defaultPrevented||t.key!==Ta&&"F2"!==t.key)){const t=this.getCurrentRow()
11441
11450
  t&&this.trySetCellFocus(t.getFocusableElements())}},this.onViewportKeyDown=t=>{let e=!this.inNavigationMode&&(t.key===Ea||t.key===Ia)
11442
- switch(t.key){case Fa:case Ra:case Oa:case Da:e=!0}e&&(t.preventDefault(),t.stopImmediatePropagation())},this.tableNotifier=x.getNotifier(this.table),this.tableNotifier.subscribe(this,"rowElements"),this.virtualizerNotifier=x.getNotifier(this.virtualizer),this.virtualizerNotifier.subscribe(this,"visibleItems")}resetFocusState(){this.focusType=iR
11451
+ switch(t.key){case Fa:case Ra:case Oa:case Da:e=!0}e&&(t.preventDefault(),t.stopImmediatePropagation())},this.tableNotifier=x.getNotifier(this.table),this.tableNotifier.subscribe(this,"rowElements"),this.virtualizerNotifier=x.getNotifier(this.virtualizer),this.virtualizerNotifier.subscribe(this,"visibleItems")}resetFocusState(){this.focusType=oR
11443
11452
  const t=this.getActiveElement()
11444
11453
  t&&this.isInTable(t)&&this.setDefaultFocus()}get hasActiveRowOrCellFocus(){return this.focusWithinTable&&this.hasRowOrCellFocusType()}connect(){this.table.addEventListener("keydown",this.onCaptureKeyDown,{capture:!0}),this.table.addEventListener("keydown",this.onKeyDown),this.table.addEventListener("focusin",this.onTableFocusIn),this.table.addEventListener("focusout",this.onTableFocusOut),this.table.viewport.addEventListener("keydown",this.onViewportKeyDown),this.table.viewport.addEventListener("cell-action-menu-blur",this.onCellActionMenuBlur),this.table.viewport.addEventListener("cell-view-focus-in",this.onCellViewFocusIn),this.table.viewport.addEventListener("cell-focus-in",this.onCellFocusIn),this.table.viewport.addEventListener("cell-blur",this.onCellBlur)}disconnect(){this.table.removeEventListener("keydown",this.onCaptureKeyDown,{capture:!0}),this.table.removeEventListener("keydown",this.onKeyDown),this.table.removeEventListener("focusin",this.onTableFocusIn),this.table.removeEventListener("focusout",this.onTableFocusOut),this.table.viewport.removeEventListener("keydown",this.onViewportKeyDown),this.table.viewport.removeEventListener("cell-action-menu-blur",this.onCellActionMenuBlur),this.table.viewport.removeEventListener("cell-view-focus-in",this.onCellViewFocusIn),this.table.viewport.removeEventListener("cell-focus-in",this.onCellFocusIn),this.table.viewport.removeEventListener("cell-blur",this.onCellBlur)}handleChange(t,e){let n=!1
11445
11454
  if(t===this.virtualizer&&"visibleItems"===e)n=!0
11446
11455
  else if(t===this.table&&"rowElements"===e){for(const t of this.visibleRowNotifiers)t.unsubscribe(this)
11447
11456
  this.visibleRowNotifiers=[]
11448
11457
  for(const t of this.table.rowElements){x.getNotifier(t).subscribe(this,"resolvedRowIndex"),t.resolvedRowIndex===this.rowIndex&&(n=!0)}}else"resolvedRowIndex"===e&&this.isResolvedRowType(t)&&t.resolvedRowIndex===this.rowIndex&&(n=!0)
11449
- if(n&&(this.focusType!==cR&&this.focusType!==dR||this.setCellFocusState(this.columnIndex,this.rowIndex,!1),this.inNavigationMode&&this.hasRowOrCellFocusType())){if(this.rowIndex>this.table.tableData.length-1){if(!(this.table.tableData.length>0))return void(this.focusWithinTable?this.setDefaultFocus():this.focusType=iR)
11458
+ if(n&&(this.focusType!==hR&&this.focusType!==uR||this.setCellFocusState(this.columnIndex,this.rowIndex,!1),this.inNavigationMode&&this.hasRowOrCellFocusType())){if(this.rowIndex>this.table.tableData.length-1){if(!(this.table.tableData.length>0))return void(this.focusWithinTable?this.setDefaultFocus():this.focusType=oR)
11450
11459
  this.rowIndex=0}this.focusWithinTable&&this.focusCurrentRow(!1)}}handleFocusedCellRecycling(t){t&&!this.focusWithinTable&&this.focusCurrentRow(!1)}onRowFocusIn(t){if(this.isCurrentlyFocusingElement)return
11451
11460
  const e=t.target
11452
11461
  this.isResolvedRowType(e)&&this.rowIndex!==e.resolvedRowIndex&&this.setRowFocusState(e.resolvedRowIndex)}onRowBlur(t){const e=t.target
11453
11462
  this.isResolvedRowType(e)&&this.setElementFocusable(e,!1)}onRowActionMenuToggle(t){if(t.detail.newState){const e=t.target,n=this.table.visibleColumns.findIndex((e=>e.columnId===t.detail.columnId))
11454
11463
  this.setCellActionMenuFocusState(e.resolvedRowIndex,n,!1)}}onEnterPressed(t){let e,n
11455
- if(this.hasRowOrCellFocusType()&&(e=this.getCurrentRow(),n=e?.getFocusableElements()),this.focusType===rR&&e instanceof qR)return this.toggleRowExpanded(e),!0
11456
- if(this.focusType===lR){if(t){const t=n?.cells[this.columnIndex]
11457
- if(t?.actionMenuButton&&!t.actionMenuButton.open)return t.actionMenuButton.toggleButton.control.click(),!0}return this.focusFirstInteractiveElementInCurrentCell(n)}return!1}onF2Pressed(){if(this.focusType===lR){const t=this.getCurrentRow(),e=t?.getFocusableElements()
11458
- return this.focusFirstInteractiveElementInCurrentCell(e)}return!1}onSpacePressed(t){if(this.focusType===rR||this.focusType===lR){if(this.focusType===rR||t){const t=this.getCurrentRow()
11459
- t instanceof PR&&t.selectable?t.onSelectionChange(t.selected,!t.selected):t instanceof qR&&this.toggleRowExpanded(t)}return!0}return!1}onLeftArrowPressed(){let t,e,n
11460
- switch(this.hasRowOrCellFocusType()?(t=this.getCurrentRow(),e=t?.getFocusableElements()):this.hasHeaderFocusType()&&(n=this.getTableHeaderFocusableElements()),this.focusType){case oR:return this.trySetHeaderActionFocus(n,this.headerActionIndex-1)
11461
- case sR:return this.trySetColumnHeaderFocus(n,this.columnIndex-1)||this.trySetHeaderActionFocus(n,n.headerActions.length-1)
11462
- case rR:return!0===this.isRowExpanded(t)&&(this.toggleRowExpanded(t),!0)
11463
- case aR:return this.setRowFocusState(),this.focusCurrentRow(!0)
11464
- case lR:return this.trySetCellFocus(e,this.columnIndex-1)||this.trySetRowSelectionCheckboxFocus(e)||(this.setRowFocusState(),this.focusCurrentRow(!0)),!0}return!1}onRightArrowPressed(){let t,e,n
11465
- switch(this.hasRowOrCellFocusType()?(t=this.getCurrentRow(),e=t?.getFocusableElements()):this.hasHeaderFocusType()&&(n=this.getTableHeaderFocusableElements()),this.focusType){case oR:return this.trySetHeaderActionFocus(n,this.headerActionIndex+1)||this.trySetColumnHeaderFocus(n,0)
11466
- case sR:return this.trySetColumnHeaderFocus(n,this.columnIndex+1)
11467
- case rR:return!1===this.isRowExpanded(t)?(this.toggleRowExpanded(t),!0):this.trySetRowSelectionCheckboxFocus(e)||this.trySetCellFocus(e,0)
11468
- case aR:return this.trySetCellFocus(e,0)
11469
- case lR:return this.trySetCellFocus(e,this.columnIndex+1)}return!1}onUpArrowPressed(){return this.onMoveUp(1),!0}onPageUpPressed(){return this.onMoveUp(this.virtualizer.pageSize)}onHomePressed(t){if(this.handleHomeEndWithinRow(t)){const t=this.getCurrentRow(),e=t?.getFocusableElements()
11464
+ if(this.hasRowOrCellFocusType()&&(e=this.getCurrentRow(),n=e?.getFocusableElements()),this.focusType===lR&&e instanceof WR)return this.toggleRowExpanded(e),!0
11465
+ if(this.focusType===dR){if(t){const t=n?.cells[this.columnIndex]
11466
+ if(t?.actionMenuButton&&!t.actionMenuButton.open)return t.actionMenuButton.toggleButton.control.click(),!0}return this.focusFirstInteractiveElementInCurrentCell(n)}return!1}onF2Pressed(){if(this.focusType===dR){const t=this.getCurrentRow(),e=t?.getFocusableElements()
11467
+ return this.focusFirstInteractiveElementInCurrentCell(e)}return!1}onSpacePressed(t){if(this.focusType===lR||this.focusType===dR){if(this.focusType===lR||t){const t=this.getCurrentRow()
11468
+ t instanceof VR&&t.selectable?t.onSelectionChange(t.selected,!t.selected):t instanceof WR&&this.toggleRowExpanded(t)}return!0}return!1}onLeftArrowPressed(){let t,e,n
11469
+ switch(this.hasRowOrCellFocusType()?(t=this.getCurrentRow(),e=t?.getFocusableElements()):this.hasHeaderFocusType()&&(n=this.getTableHeaderFocusableElements()),this.focusType){case aR:return this.trySetHeaderActionFocus(n,this.headerActionIndex-1)
11470
+ case rR:return this.trySetColumnHeaderFocus(n,this.columnIndex-1)||this.trySetHeaderActionFocus(n,n.headerActions.length-1)
11471
+ case lR:return!0===this.isRowExpanded(t)&&(this.toggleRowExpanded(t),!0)
11472
+ case cR:return this.setRowFocusState(),this.focusCurrentRow(!0)
11473
+ case dR:return this.trySetCellFocus(e,this.columnIndex-1)||this.trySetRowSelectionCheckboxFocus(e)||(this.setRowFocusState(),this.focusCurrentRow(!0)),!0}return!1}onRightArrowPressed(){let t,e,n
11474
+ switch(this.hasRowOrCellFocusType()?(t=this.getCurrentRow(),e=t?.getFocusableElements()):this.hasHeaderFocusType()&&(n=this.getTableHeaderFocusableElements()),this.focusType){case aR:return this.trySetHeaderActionFocus(n,this.headerActionIndex+1)||this.trySetColumnHeaderFocus(n,0)
11475
+ case rR:return this.trySetColumnHeaderFocus(n,this.columnIndex+1)
11476
+ case lR:return!1===this.isRowExpanded(t)?(this.toggleRowExpanded(t),!0):this.trySetRowSelectionCheckboxFocus(e)||this.trySetCellFocus(e,0)
11477
+ case cR:return this.trySetCellFocus(e,0)
11478
+ case dR:return this.trySetCellFocus(e,this.columnIndex+1)}return!1}onUpArrowPressed(){return this.onMoveUp(1),!0}onPageUpPressed(){return this.onMoveUp(this.virtualizer.pageSize)}onHomePressed(t){if(this.handleHomeEndWithinRow(t)){const t=this.getCurrentRow(),e=t?.getFocusableElements()
11470
11479
  return this.trySetRowSelectionCheckboxFocus(e)||this.trySetCellFocus(e,0)}return this.onMoveUp(0,0)}onDownArrowPressed(){return this.onMoveDown(1),!0}onPageDownPressed(){return this.onMoveDown(this.virtualizer.pageSize)}onEndPressed(t){if(this.handleHomeEndWithinRow(t)){const t=this.getCurrentRow(),e=t?.getFocusableElements()
11471
- return this.trySetCellFocus(e,this.table.visibleColumns.length-1)}return this.onMoveDown(0,this.table.tableData.length-1)}handleHomeEndWithinRow(t){return(this.focusType===lR||this.focusType===aR)&&!t}onTabPressed(t){const e=this.getActiveElement()
11480
+ return this.trySetCellFocus(e,this.table.visibleColumns.length-1)}return this.onMoveDown(0,this.table.tableData.length-1)}handleHomeEndWithinRow(t){return(this.focusType===dR||this.focusType===cR)&&!t}onTabPressed(t){const e=this.getActiveElement()
11472
11481
  if(null===e||e===this.table)return!1
11473
11482
  const n=this.hasRowOrCellFocusType()?this.getNextRowTabStop(t):this.getNextHeaderTabStop(t)
11474
11483
  return n?(this.focusType=n.focusType,this.rowIndex=n.rowIndex??this.rowIndex,this.columnIndex=n.columnIndex??this.columnIndex,this.headerActionIndex=n.headerActionIndex??this.headerActionIndex,this.cellContentIndex=n.cellContentIndex??this.cellContentIndex,this.hasRowOrCellFocusType()?this.focusCurrentRow(!1):this.focusHeaderElement(),!0):(this.blurAfterLastTab(e),!1)}getNextRowTabStop(t){const e=this.getCurrentRow()
11475
11484
  if(void 0===e)return
11476
11485
  let n=-1
11477
11486
  const i=[],s=e.getFocusableElements()
11478
- s.selectionCheckbox&&(i.push({focusType:aR}),this.focusType===aR&&(n=0))
11487
+ s.selectionCheckbox&&(i.push({focusType:cR}),this.focusType===cR&&(n=0))
11479
11488
  let o=0
11480
11489
  for(;o<s.cells.length;){const e=i.length,r=s.cells[o],a=r.cell.cellView.tabbableChildren
11481
- for(let t=0;t<a.length;t++)i.push({focusType:dR,columnIndex:o,cellContentIndex:t}),this.focusType===dR&&this.columnIndex===o&&this.cellContentIndex===t&&(n=i.length-1)
11482
- r.actionMenuButton&&(i.push({focusType:cR,columnIndex:o}),this.focusType===cR&&this.columnIndex===o&&(n=i.length-1))
11490
+ for(let t=0;t<a.length;t++)i.push({focusType:uR,columnIndex:o,cellContentIndex:t}),this.focusType===uR&&this.columnIndex===o&&this.cellContentIndex===t&&(n=i.length-1)
11491
+ r.actionMenuButton&&(i.push({focusType:hR,columnIndex:o}),this.focusType===hR&&this.columnIndex===o&&(n=i.length-1))
11483
11492
  const l=i.length-1
11484
- this.focusType===lR&&this.columnIndex===o&&(n=t?l+1:e-1),o+=1}this.focusType===rR&&(n=t?i.length:-1)
11493
+ this.focusType===dR&&this.columnIndex===o&&(n=t?l+1:e-1),o+=1}this.focusType===lR&&(n=t?i.length:-1)
11485
11494
  return i[n+(t?-1:1)]}getNextHeaderTabStop(t){let e=-1
11486
11495
  const n=[],i=this.getTableHeaderFocusableElements().headerActions
11487
- for(let t=0;t<i.length;t++)n.push({focusType:oR,headerActionIndex:t})
11488
- e=this.focusType===oR?this.headerActionIndex:n.length
11496
+ for(let t=0;t<i.length;t++)n.push({focusType:aR,headerActionIndex:t})
11497
+ e=this.focusType===aR?this.headerActionIndex:n.length
11489
11498
  return n[e+(t?-1:1)]}blurAfterLastTab(t){this.table.tabIndex=-1,window.requestAnimationFrame((()=>{this.table.tabIndex=0})),this.setElementFocusable(t,!1)}onMoveUp(t,e){const n=t>1
11490
- switch(this.focusType){case rR:case aR:case lR:{const i={}
11499
+ switch(this.focusType){case lR:case cR:case dR:{const i={}
11491
11500
  let s=this.rowIndex
11492
11501
  if(void 0!==e&&(s=e),s-=t,n&&s<0&&(s=0),t>1&&(i.align="start"),s<this.rowIndex&&s>=0)return this.scrollToAndFocusRow(s,i)
11493
11502
  if(-1===s){const t=this.getTableHeaderFocusableElements()
11494
- return this.focusType===rR||this.focusType===aR?this.trySetHeaderActionFocus(t,0)||this.trySetColumnHeaderFocus(t,0):this.trySetColumnHeaderFocus(t,this.columnIndex)}return!1}}return!1}onMoveDown(t,e){const n=t>1
11495
- switch(this.focusType){case oR:return this.setRowFocusState(0),this.scrollToAndFocusRow(0)
11496
- case sR:return this.setCellFocusState(this.columnIndex,0,!1),this.scrollToAndFocusRow(0)
11497
- case rR:case aR:case lR:{const i={}
11503
+ return this.focusType===lR||this.focusType===cR?this.trySetHeaderActionFocus(t,0)||this.trySetColumnHeaderFocus(t,0):this.trySetColumnHeaderFocus(t,this.columnIndex)}return!1}}return!1}onMoveDown(t,e){const n=t>1
11504
+ switch(this.focusType){case aR:return this.setRowFocusState(0),this.scrollToAndFocusRow(0)
11505
+ case rR:return this.setCellFocusState(this.columnIndex,0,!1),this.scrollToAndFocusRow(0)
11506
+ case lR:case cR:case dR:{const i={}
11498
11507
  let s=this.rowIndex
11499
11508
  return void 0!==e&&(s=e),s+=t,n&&s>=this.table.tableData.length&&(s=this.table.tableData.length-1),t>1&&(i.align="end"),s>this.rowIndex&&s<this.table.tableData.length&&this.scrollToAndFocusRow(s,i)}}return!1}updateFocusStateFromActiveElement(t){const e=this.getActiveElement()
11500
11509
  if(e){const n=this.getContainingRow(e)
11501
- if(n){if(!(n instanceof qR)){const t=this.getContainingCell(e)
11510
+ if(n){if(!(n instanceof WR)){const t=this.getContainingCell(e)
11502
11511
  if(t){const i=this.table.visibleColumns.indexOf(t.column)
11503
11512
  if(t.actionMenuButton===e)return void this.setCellActionMenuFocusState(n.resolvedRowIndex,i,!1)
11504
11513
  const s=t.cellView.tabbableChildren.indexOf(e)
11505
11514
  if(s>-1)return void this.setCellContentFocusState(s,n.resolvedRowIndex,i,!1)}}t&&this.hasRowOrCellFocusType()&&this.rowIndex!==n.resolvedRowIndex&&this.setRowFocusState(n.resolvedRowIndex)}}}focusElement(t,e){const n=this.getActiveElement()
11506
- n!==t&&(this.setElementFocusable(t,!0),this.isCurrentlyFocusingElement=!0,t.focus(e),this.isCurrentlyFocusingElement=!1,n&&this.isInTable(n)&&this.setElementFocusable(n,!1))}setElementFocusable(t,e){t!==this.table&&(t.tabIndex=e?0:-1)}setActionMenuButtonFocused(t,e){e?t.classList.add("cell-action-menu-focused"):t.classList.remove("cell-action-menu-focused")}setFocusOnHeader(){return this.hasHeaderFocusType()?this.focusHeaderElement():(this.setDefaultFocus(),this.focusType!==iR)}setDefaultFocus(){const t=this.getTableHeaderFocusableElements()
11507
- this.trySetHeaderActionFocus(t,0)||this.trySetColumnHeaderFocus(t,0)||this.scrollToAndFocusRow(0)||(this.focusType=iR)}scrollToAndFocusRow(t,e){if(t>=0&&t<this.table.tableData.length){switch(this.focusType){case iR:case oR:case sR:this.setRowFocusState(t)}return this.rowIndex=t,this.virtualizer.scrollToIndex(t,e),this.focusCurrentRow(!0),!0}return!1}focusCurrentRow(t){const e=this.getCurrentRowVisibleIndex()
11515
+ n!==t&&(this.setElementFocusable(t,!0),this.isCurrentlyFocusingElement=!0,t.focus(e),this.isCurrentlyFocusingElement=!1,n&&this.isInTable(n)&&this.setElementFocusable(n,!1))}setElementFocusable(t,e){t!==this.table&&(t.tabIndex=e?0:-1)}setActionMenuButtonFocused(t,e){e?t.classList.add("cell-action-menu-focused"):t.classList.remove("cell-action-menu-focused")}setFocusOnHeader(){return this.hasHeaderFocusType()?this.focusHeaderElement():(this.setDefaultFocus(),this.focusType!==oR)}setDefaultFocus(){const t=this.getTableHeaderFocusableElements()
11516
+ this.trySetHeaderActionFocus(t,0)||this.trySetColumnHeaderFocus(t,0)||this.scrollToAndFocusRow(0)||(this.focusType=oR)}scrollToAndFocusRow(t,e){if(t>=0&&t<this.table.tableData.length){switch(this.focusType){case oR:case aR:case rR:this.setRowFocusState(t)}return this.rowIndex=t,this.virtualizer.scrollToIndex(t,e),this.focusCurrentRow(!0),!0}return!1}focusCurrentRow(t){const e=this.getCurrentRowVisibleIndex()
11508
11517
  if(e<0)return!1
11509
11518
  const n=this.table.rowElements[e]
11510
11519
  let i=!1
11511
- switch(this.focusType){case rR:i=!0
11520
+ switch(this.focusType){case lR:i=!0
11512
11521
  break
11513
- case lR:case cR:case dR:i=n instanceof qR}const s={preventScroll:!t}
11522
+ case dR:case hR:case uR:i=n instanceof WR}const s={preventScroll:!t}
11514
11523
  return i?(this.focusElement(n,s),!0):(this.focusRowElement(n,s),!0)}focusRowElement(t,e){const n=t.getFocusableElements()
11515
11524
  let i
11516
- switch(this.focusType){case aR:i=n.selectionCheckbox
11525
+ switch(this.focusType){case cR:i=n.selectionCheckbox
11517
11526
  break
11518
- case lR:i=n.cells[this.columnIndex].cell
11527
+ case dR:i=n.cells[this.columnIndex].cell
11519
11528
  break
11520
- case cR:{const t=n.cells[this.columnIndex]?.cell.actionMenuButton
11529
+ case hR:{const t=n.cells[this.columnIndex]?.cell.actionMenuButton
11521
11530
  t&&(i=t,this.setActionMenuButtonFocused(t,!0))
11522
- break}case dR:i=n.cells[this.columnIndex]?.cell.cellView.tabbableChildren[this.cellContentIndex]}i&&this.focusElement(i,e)}focusHeaderElement(){const t=this.getTableHeaderFocusableElements()
11531
+ break}case uR:i=n.cells[this.columnIndex]?.cell.cellView.tabbableChildren[this.cellContentIndex]}i&&this.focusElement(i,e)}focusHeaderElement(){const t=this.getTableHeaderFocusableElements()
11523
11532
  let e
11524
- switch(this.focusType){case oR:e=t.headerActions[this.headerActionIndex]
11533
+ switch(this.focusType){case aR:e=t.headerActions[this.headerActionIndex]
11525
11534
  break
11526
- case sR:e=t.columnHeaders[this.columnIndex]}return!!e&&(this.focusElement(e),!0)}getCurrentRowVisibleIndex(){return this.table.rowElements.findIndex((t=>t.resolvedRowIndex===this.rowIndex))}getTableHeaderFocusableElements(){const t=[]
11535
+ case rR:e=t.columnHeaders[this.columnIndex]}return!!e&&(this.focusElement(e),!0)}getCurrentRowVisibleIndex(){return this.table.rowElements.findIndex((t=>t.resolvedRowIndex===this.rowIndex))}getTableHeaderFocusableElements(){const t=[]
11527
11536
  this.table.selectionCheckbox?.getRootNode()===this.table.shadowRoot&&t.push(this.table.selectionCheckbox),this.table.showCollapseAll&&this.table.collapseAllButton?.getRootNode()===this.table.shadowRoot&&t.push(this.table.collapseAllButton)
11528
11537
  const e=[]
11529
- return this.canFocusColumnHeaders()&&this.table.columnHeadersContainer.querySelectorAll(DR).forEach((t=>e.push(t))),{headerActions:t,columnHeaders:e}}canFocusColumnHeaders(){return void 0!==this.table.columns.find((t=>!t.columnInternals.sortingDisabled))}getCurrentRow(){return this.table.rowElements[this.getCurrentRowVisibleIndex()]}isRowExpanded(t){if(t instanceof PR&&t.isParentRow||t instanceof qR)return t.expanded}toggleRowExpanded(t){t instanceof qR?t.onGroupExpandToggle():t.onRowExpandToggle(),this.focusRowElement(t)}getContainingRow(t){return this.getContainingElement(t,(t=>this.isResolvedRowType(t)))}getContainingCell(t){return this.getContainingElement(t,(t=>t instanceof FR))}getContainingElement(t,e){let n=t
11538
+ return this.canFocusColumnHeaders()&&this.table.columnHeadersContainer.querySelectorAll(TR).forEach((t=>e.push(t))),{headerActions:t,columnHeaders:e}}canFocusColumnHeaders(){return void 0!==this.table.columns.find((t=>!t.columnInternals.sortingDisabled))}getCurrentRow(){return this.table.rowElements[this.getCurrentRowVisibleIndex()]}isRowExpanded(t){if(t instanceof VR&&t.isParentRow||t instanceof WR)return t.expanded}toggleRowExpanded(t){t instanceof WR?t.onGroupExpandToggle():t.onRowExpandToggle(),this.focusRowElement(t)}getContainingRow(t){return this.getContainingElement(t,(t=>this.isResolvedRowType(t)))}getContainingCell(t){return this.getContainingElement(t,(t=>t instanceof LR))}getContainingElement(t,e){let n=t
11530
11539
  for(;n&&n!==this.table;){if(e(n))return n
11531
11540
  n=n.parentElement??n.parentNode?.host}}isInTable(t){let e=t
11532
11541
  for(;e&&e!==this.table;)e=e.parentElement??e.parentNode?.host
11533
11542
  return e===this.table}getActiveElement(){let t=document.activeElement
11534
- for(;t?.shadowRoot?.activeElement&&(t=t.shadowRoot.activeElement,!(t instanceof We)||this.isResolvedRowType(t)||t instanceof FR||t instanceof vR););return t}focusFirstInteractiveElementInCurrentCell(t){return!!t&&(this.trySetCellContentFocus(t,0)||this.trySetCellActionMenuFocus(t))}hasRowOrCellFocusType(){switch(this.focusType){case lR:case cR:case dR:case rR:case aR:return!0
11535
- default:return!1}}hasHeaderFocusType(){switch(this.focusType){case oR:case sR:return!0
11536
- default:return!1}}trySetRowSelectionCheckboxFocus(t){return!!t?.selectionCheckbox&&(this.focusType=aR,this.focusCurrentRow(!0),!0)}trySetColumnHeaderFocus(t,e){return e>=0&&e<t.columnHeaders.length&&(this.focusType=sR,this.columnIndex=e,this.focusHeaderElement(),!0)}trySetHeaderActionFocus(t,e){return e>=0&&e<t.headerActions.length&&(this.focusType=oR,this.headerActionIndex=e,this.focusHeaderElement(),!0)}trySetCellFocus(t,e,n){if(!t)return!1
11543
+ for(;t?.shadowRoot?.activeElement&&(t=t.shadowRoot.activeElement,!(t instanceof We)||this.isResolvedRowType(t)||t instanceof LR||t instanceof yR););return t}focusFirstInteractiveElementInCurrentCell(t){return!!t&&(this.trySetCellContentFocus(t,0)||this.trySetCellActionMenuFocus(t))}hasRowOrCellFocusType(){switch(this.focusType){case dR:case hR:case uR:case lR:case cR:return!0
11544
+ default:return!1}}hasHeaderFocusType(){switch(this.focusType){case aR:case rR:return!0
11545
+ default:return!1}}trySetRowSelectionCheckboxFocus(t){return!!t?.selectionCheckbox&&(this.focusType=cR,this.focusCurrentRow(!0),!0)}trySetColumnHeaderFocus(t,e){return e>=0&&e<t.columnHeaders.length&&(this.focusType=rR,this.columnIndex=e,this.focusHeaderElement(),!0)}trySetHeaderActionFocus(t,e){return e>=0&&e<t.headerActions.length&&(this.focusType=aR,this.headerActionIndex=e,this.focusHeaderElement(),!0)}trySetCellFocus(t,e,n){if(!t)return!1
11537
11546
  const i=e??this.columnIndex,s=n??this.rowIndex
11538
- return i>=0&&i<t.cells.length&&(this.focusType=lR,this.setRowCellFocusState(i,s,!0),!0)}trySetCellContentFocus(t,e,n,i){if(!t)return!1
11547
+ return i>=0&&i<t.cells.length&&(this.focusType=dR,this.setRowCellFocusState(i,s,!0),!0)}trySetCellContentFocus(t,e,n,i){if(!t)return!1
11539
11548
  const s=n??this.columnIndex,o=i??this.rowIndex
11540
11549
  return s>=0&&s<t.cells.length&&e>=0&&e<t.cells[s].cell.cellView.tabbableChildren.length&&(this.setCellContentFocusState(e,o,s,!0),!0)}trySetCellActionMenuFocus(t,e,n){const i=e??this.columnIndex,s=n??this.rowIndex
11541
- return!!(i>=0&&i<t.cells.length&&t.cells[i].actionMenuButton)&&(this.setCellActionMenuFocusState(s,i,!0),!0)}setCellActionMenuFocusState(t,e,n){this.focusType=cR,this.setRowCellFocusState(e,t,n)}setCellContentFocusState(t,e,n,i){this.focusType=dR,this.cellContentIndex=t,this.setRowCellFocusState(n,e,i)}setRowFocusState(t){this.focusType=rR,void 0!==t&&(this.rowIndex=t)}setCellFocusState(t,e,n){this.focusType=lR,this.setRowCellFocusState(t,e,n)}setRowCellFocusState(t,e,n){this.rowIndex=e,this.columnIndex=t,n&&this.focusCurrentRow(!0)}isResolvedRowType(t){return t instanceof PR||t instanceof qR}}let IF=class extends We{get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===QO.multiple||this.showCollapseAll}constructor(){super(),this.selectionMode=QO.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.actionMenuSlots=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=tR,this.showCollapseAll=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.documentShiftKeyDown=!1,this.tableValidator=new SR,this.tableUpdateTracker=new pF(this),this.columnNotifiers=[],this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.columnRequestedSlots=new Map,this.onViewPortScroll=t=>{this.scrollX=t.target.scrollLeft},this.onKeyDown=t=>{t.key===Na&&(this.documentShiftKeyDown=!0)},this.onKeyUp=t=>{t.key===Na&&(this.documentShiftKeyDown=!1)},this.getRowCanExpand=t=>this.expansionManager.isRowExpandable(t),this.getIsRowExpanded=t=>this.expansionManager.isRowExpanded(t),this.handleRowSelectionChange=t=>{const e=t instanceof Function?t(this.table.getState().rowSelection):t
11550
+ return!!(i>=0&&i<t.cells.length&&t.cells[i].actionMenuButton)&&(this.setCellActionMenuFocusState(s,i,!0),!0)}setCellActionMenuFocusState(t,e,n){this.focusType=hR,this.setRowCellFocusState(e,t,n)}setCellContentFocusState(t,e,n,i){this.focusType=uR,this.cellContentIndex=t,this.setRowCellFocusState(n,e,i)}setRowFocusState(t){this.focusType=lR,void 0!==t&&(this.rowIndex=t)}setCellFocusState(t,e,n){this.focusType=dR,this.setRowCellFocusState(t,e,n)}setRowCellFocusState(t,e,n){this.rowIndex=e,this.columnIndex=t,n&&this.focusCurrentRow(!0)}isResolvedRowType(t){return t instanceof VR||t instanceof WR}}let $F=class extends We{get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===QO.multiple||this.showCollapseAll}constructor(){super(),this.selectionMode=QO.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.actionMenuSlots=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=tR,this.showCollapseAll=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.documentShiftKeyDown=!1,this.tableValidator=new IR,this.tableUpdateTracker=new mF(this),this.columnNotifiers=[],this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.columnRequestedSlots=new Map,this.onViewPortScroll=t=>{this.scrollX=t.target.scrollLeft},this.onKeyDown=t=>{t.key===Na&&(this.documentShiftKeyDown=!0)},this.onKeyUp=t=>{t.key===Na&&(this.documentShiftKeyDown=!1)},this.getRowCanExpand=t=>this.expansionManager.isRowExpandable(t),this.getIsRowExpanded=t=>this.expansionManager.isRowExpanded(t),this.handleRowSelectionChange=t=>{const e=t instanceof Function?t(this.table.getState().rowSelection):t
11542
11551
  this.updateTableOptions({state:{rowSelection:e}})},this.handleExpandedChange=t=>{const e=t instanceof Function?t(this.table.getState().expanded):t
11543
11552
  this.updateTableOptions({state:{expanded:e}})},this.options={data:[],onStateChange:t=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:t=>QT((()=>[t.options.data]),(e=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(e,s,o){void 0===s&&(s=0)
11544
11553
  const r=[]
@@ -11561,13 +11570,13 @@ d=n&&i?0:n?l:-l}}if(0===d&&(d=a.sortingFn(t,e,s.id)),0!==d)return c&&(d*=-1),a.i
11561
11570
  s.push(t),null!=(e=t.subRows)&&e.length&&(t.subRows=a(t.subRows))})),e}
11562
11571
  return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}}),tO(t.options,"debugTable",0,(()=>t._autoResetPageIndex()))),getGroupedRowModel:ZO(),getExpandedRowModel:t=>QT((()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows]),((t,e,n)=>!e.rows.length||!0!==t&&!Object.keys(null!=t?t:{}).length?e:n?function(t){const e=[],n=t=>{var i
11563
11572
  e.push(t),null!=(i=t.subRows)&&i.length&&t.getIsExpanded()&&t.subRows.forEach(n)}
11564
- return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}(e):e),tO(t.options,"debugTable")),getRowCanExpand:this.getRowCanExpand,getIsRowExpanded:this.getIsRowExpanded,getSubRows:t=>t.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:t=>!t.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=GO(this.options),this.virtualizer=new rF(this,this.table),this.keyboardNavigationManager=new _F(this,this.virtualizer),this.layoutManager=new dF(this),this.layoutManagerNotifier=x.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new bF(this.table,this.selectionMode),this.expansionManager=new CF(this.table)}async setData(t){await this.processPendingUpdates()
11573
+ return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}(e):e),tO(t.options,"debugTable")),getRowCanExpand:this.getRowCanExpand,getIsRowExpanded:this.getIsRowExpanded,getSubRows:t=>t.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:t=>!t.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=GO(this.options),this.virtualizer=new lF(this,this.table),this.keyboardNavigationManager=new MF(this,this.virtualizer),this.layoutManager=new uF(this),this.layoutManagerNotifier=x.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new wF(this.table,this.selectionMode),this.expansionManager=new SF(this.table)}async setData(t){await this.processPendingUpdates()
11565
11574
  const e=this.calculateTanStackData(t)
11566
11575
  this.updateTableOptions(e)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(t){await this.processPendingUpdates(),this.selectionMode!==QO.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(t)}})}async setRecordHierarchyOptions(t){await this.processPendingUpdates()
11567
11576
  const e=structuredClone(t),n=this.tableValidator.getOptionsWithPresentIds(e)
11568
- this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),this.keyboardNavigationManager.connect(),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.keyboardNavigationManager.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp)}checkValidity(){return this.tableValidator.isValid()}handleChange(t,e){(t instanceof kR||t instanceof xR)&&"string"==typeof e?this.tableUpdateTracker.trackColumnPropertyChanged(e):t instanceof SF&&"isColumnValid"===e?this.tableValidator.validateColumnConfigurations(this.columns):t instanceof dF&&"isColumnBeingSized"===e&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(t,e){e.stopImmediatePropagation()
11577
+ this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),this.keyboardNavigationManager.connect(),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.keyboardNavigationManager.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp)}checkValidity(){return this.tableValidator.isValid()}handleChange(t,e){(t instanceof _R||t instanceof kR)&&"string"==typeof e?this.tableUpdateTracker.trackColumnPropertyChanged(e):t instanceof IF&&"isColumnValid"===e?this.tableValidator.validateColumnConfigurations(this.columns):t instanceof uF&&"isColumnBeingSized"===e&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(t,e){e.stopImmediatePropagation()
11569
11578
  this.selectionManager.handleRowSelectionToggle(this.tableData[t],e.detail.newState,this.documentShiftKeyDown)&&this.emitSelectionChangeEvent()}onRowClick(t,e){return this.selectionManager.handleRowClick(this.tableData[t],e.shiftKey,e.ctrlKey||e.metaKey)&&this.emitSelectionChangeEvent(),!0}onRowFocusIn(t){this.keyboardNavigationManager.onRowFocusIn(t)}onRowBlur(t){this.keyboardNavigationManager.onRowBlur(t)}onAllRowsSelectionChange(t){t.stopPropagation(),this.ignoreSelectionChangeEvents||(this.table.toggleAllRowsSelected(this.selectionCheckbox.checked),this.emitSelectionChangeEvent())}onRowActionMenuBeforeToggle(t,e){e.stopImmediatePropagation(),this.handleActionMenuBeforeToggleEvent(t,e)}onRowActionMenuToggle(t){t.stopImmediatePropagation(),this.handleRowActionMenuToggleEvent(t)}onRowSlotsRequest(t){t.stopImmediatePropagation()
11570
- for(const e of t.detail.slots){const n=bR(t.detail.columnInternalId,e.slot)
11579
+ for(const e of t.detail.slots){const n=wR(t.detail.columnInternalId,e.slot)
11571
11580
  this.columnRequestedSlots.set(e.name,{recordId:t.detail.recordId,uniqueSlot:n})}this.refreshRows()}handleCollapseAllRows(){this.expansionManager.collapseAll()}onRightDividerMouseDown(t,e){0===t.button&&this.layoutManager.beginColumnInteractiveSize(t.clientX,this.getRightDividerIndex(e))}onLeftDividerMouseDown(t,e){0===t.button&&this.layoutManager.beginColumnInteractiveSize(t.clientX,this.getLeftDividerIndex(e))}getLeftDividerIndex(t){return 2*t-1}getRightDividerIndex(t){return 2*t}handleGroupRowExpanded(t,e){this.toggleRowExpanded(t),e.stopPropagation()}handleRowExpanded(t){this.toggleRowExpanded(t)}toggleColumnSort(t,e){if(t.columnInternals.sortingDisabled)return
11572
11581
  const n=this.getColumnsParticipatingInSorting().sort(((t,e)=>t.columnInternals.currentSortIndex-e.columnInternals.currentSortIndex)),i=n.indexOf(t),s=i>-1,o=t.columnInternals.currentSortDirection
11573
11582
  let r=JO.ascending
@@ -11576,15 +11585,15 @@ for(let i=0;i<n.length;i++){const s=n[i]
11576
11585
  e?n[i].columnInternals.currentSortIndex=i:s===t?s.columnInternals.currentSortIndex=0:(s.columnInternals.currentSortIndex=void 0,s.columnInternals.currentSortDirection=JO.none)}this.emitColumnConfigurationChangeEvent()}onHeaderKeyDown(t,e){const n=e.shiftKey
11577
11586
  return e.key===Aa&&this.toggleColumnSort(t,n),!0}update(){this.validate(),this.tableUpdateTracker.requiresTanStackUpdate&&this.updateTanStack(),this.tableUpdateTracker.updateActionMenuSlots&&this.updateActionMenuSlots(),this.tableUpdateTracker.updateColumnWidths&&(this.rowGridColumns=this.layoutManager.getGridTemplateColumns(),this.visibleColumns=this.columns.filter((t=>!t.columnHidden))),this.tableUpdateTracker.requiresKeyboardFocusReset&&this.keyboardNavigationManager.resetFocusState()}get ariaMultiSelectable(){switch(this.selectionMode){case QO.multiple:return"true"
11578
11587
  case QO.single:return"false"
11579
- default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(t){this.dataHierarchyManager=new xF(t,this.idFieldName,this.parentIdFieldName)
11588
+ default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(t){this.dataHierarchyManager=new kF(t,this.idFieldName,this.parentIdFieldName)
11580
11589
  const e=this.dataHierarchyManager.hierarchicalData
11581
11590
  this.tableValidator.setParentIdConfigurationValidity(this.dataHierarchyManager.parentIdConfigurationValid)
11582
11591
  const n={data:e}
11583
11592
  if(this.validateWithData(t),this.tableValidator.areRecordIdsValid()){const t=this.selectionManager.getCurrentSelectedRecordIds()
11584
11593
  n.state={rowSelection:this.calculateTanStackSelectionState(t),expanded:!0}}return n}handleFocusedCellRecycling(){const t=this.keyboardNavigationManager.hasActiveRowOrCellFocus
11585
11594
  let e=this.shadowRoot.activeElement
11586
- for(;null!==e&&!(e instanceof vR)&&e.shadowRoot;)e=e.shadowRoot.activeElement
11587
- if(e instanceof vR&&e.focusedRecycleCallback(),void 0!==this.openActionMenuRecordId){const t=this.rowElements.find((t=>t instanceof PR&&t.recordId===this.openActionMenuRecordId))
11595
+ for(;null!==e&&!(e instanceof yR)&&e.shadowRoot;)e=e.shadowRoot.activeElement
11596
+ if(e instanceof yR&&e.focusedRecycleCallback(),void 0!==this.openActionMenuRecordId){const t=this.rowElements.find((t=>t instanceof VR&&t.recordId===this.openActionMenuRecordId))
11588
11597
  t?.closeOpenActionMenus()}this.keyboardNavigationManager.handleFocusedCellRecycling(t)}selectionModeChanged(t,e){this.$fastController.isConnected&&this.tableUpdateTracker.trackSelectionModeChanged()}idFieldNameChanged(t,e){this.$fastController.isConnected&&this.tableUpdateTracker.trackIdFieldNameChanged()}parentIdFieldNameChanged(t,e){this.$fastController.isConnected&&this.tableUpdateTracker.trackParentIdFieldNameChanged()}columnsChanged(t,e){this.$fastController.isConnected&&(this.observeColumns(),this.tableUpdateTracker.trackColumnInstancesChanged())}removeActionMenuSlotsFromColumnRequestedSlots(){for(const t of this.actionMenuSlots)this.columnRequestedSlots.delete(t)
11589
11598
  this.refreshRows()}async handleActionMenuBeforeToggleEvent(t,e){this.selectionManager.handleActionMenuOpening(this.tableData[t])&&await this.emitSelectionChangeEvent(),this.openActionMenuRecordId=e.detail.recordIds[0],this.removeActionMenuSlotsFromColumnRequestedSlots()
11590
11599
  const n=await this.getActionMenuToggleEventDetail(e)
@@ -11597,7 +11606,7 @@ e.subscribe(this),this.columnNotifiers.push(e)
11597
11606
  const n=x.getNotifier(t.columnInternals)
11598
11607
  n.subscribe(this),this.columnNotifiers.push(n)
11599
11608
  const i=x.getNotifier(t.columnInternals.validator)
11600
- i.subscribe(this),this.columnNotifiers.push(i)}}getColumnsParticipatingInSorting(){return this.columns.filter((t=>!t.columnInternals.sortingDisabled&&t.columnInternals.currentSortDirection!==JO.none&&"number"==typeof t.columnInternals.currentSortIndex))}getColumnsParticipatingInGrouping(){return this.columns.filter((t=>!t.columnInternals.groupingDisabled&&"number"==typeof t.columnInternals.groupIndex))}childItemsChanged(){this.updateColumnsFromChildItems()}async updateColumnsFromChildItems(){await SE(this.childItems),this.columns=this.childItems.filter((t=>t instanceof kR))}updateTanStack(){const t={state:{}}
11609
+ i.subscribe(this),this.columnNotifiers.push(i)}}getColumnsParticipatingInSorting(){return this.columns.filter((t=>!t.columnInternals.sortingDisabled&&t.columnInternals.currentSortDirection!==JO.none&&"number"==typeof t.columnInternals.currentSortIndex))}getColumnsParticipatingInGrouping(){return this.columns.filter((t=>!t.columnInternals.groupingDisabled&&"number"==typeof t.columnInternals.groupIndex))}childItemsChanged(){this.updateColumnsFromChildItems()}async updateColumnsFromChildItems(){await SE(this.childItems),this.columns=this.childItems.filter((t=>t instanceof _R))}updateTanStack(){const t={state:{}}
11601
11610
  if(this.tableUpdateTracker.updateColumnSort&&(t.state.sorting=this.calculateTanStackSortState()),this.tableUpdateTracker.updateColumnDefinition&&(t.columns=this.calculateTanStackColumns()),this.tableUpdateTracker.updateRowIds&&(t.getRowId=this.calculateTanStackRowIdFunction(),t.state.rowSelection={},this.selectionManager.handleSelectionReset(),this.expansionManager.resetHierarchyOptions()),this.tableUpdateTracker.updateRowParentIds&&this.expansionManager.setHierarchyEnabled(this.isHierarchyEnabled()),this.tableUpdateTracker.updateSelectionMode&&(t.enableMultiRowSelection=this.selectionMode===QO.multiple,t.enableSubRowSelection=this.selectionMode===QO.multiple,t.state.rowSelection={},this.selectionManager.handleSelectionModeChanged(this.selectionMode)),this.dataHierarchyManager&&this.tableUpdateTracker.requiresTanStackDataReset)if(this.parentIdFieldName||this.tableUpdateTracker.updateRowParentIds){const e=this.dataHierarchyManager.getAllRecords(!0),n=this.calculateTanStackData(e)
11602
11611
  n.state&&(t.state.rowSelection=n.state.rowSelection),t.data=n.data}else t.data=[...this.table.options.data]
11603
11612
  this.tableUpdateTracker.updateGroupRows&&(t.state.grouping=this.calculateTanStackGroupingState()),(this.tableUpdateTracker.updateRowIds||this.tableUpdateTracker.updateRowParentIds||this.tableUpdateTracker.updateGroupRows)&&(t.state.expanded=!0,this.expansionManager.resetExpansionState()),this.updateTableOptions(t)}updateActionMenuSlots(){const t=new Set
@@ -11618,14 +11627,14 @@ if(void 0!==e)return this.columns.find((t=>t.columnInternals.uniqueId===e))}upda
11618
11627
  this.expansionManager.processDataUpdate(t)}this.refreshRows()}toggleRowExpanded(t){const e=this.table.getRowModel().rows[t]
11619
11628
  this.expansionManager.toggleRowExpansion(e)}calculateTanStackSortState(){const t=this.getColumnsParticipatingInSorting().sort(((t,e)=>t.columnInternals.currentSortIndex-e.columnInternals.currentSortIndex))
11620
11629
  return this.firstSortedColumn=t.length?t[0]:void 0,t.map((t=>({id:t.columnInternals.uniqueId,desc:t.columnInternals.currentSortDirection===JO.descending})))}calculateTanStackGroupingState(){return this.getColumnsParticipatingInGrouping().sort(((t,e)=>t.columnInternals.groupIndex-e.columnInternals.groupIndex)).map((t=>t.columnInternals.uniqueId))}calculateTanStackRowIdFunction(){return null===this.idFieldName||void 0===this.idFieldName?void 0:t=>t.clientRecord[this.idFieldName]}calculateTanStackColumns(){return this.columns.map((t=>({id:t.columnInternals.uniqueId,accessorFn:e=>{const n=t.columnInternals.operandDataRecordFieldName
11621
- if("string"==typeof n)return e.clientRecord[n]},sortingFn:aF(t.columnInternals.sortOperation),sortUndefined:!1})))}calculateTanStackSelectionState(t){if(this.selectionMode===QO.none)return{}
11630
+ if("string"==typeof n)return e.clientRecord[n]},sortingFn:cF(t.columnInternals.sortOperation),sortUndefined:!1})))}calculateTanStackSelectionState(t){if(this.selectionMode===QO.none)return{}
11622
11631
  const e={},n=this.tableValidator.getPresentRecordIds(t)
11623
11632
  for(const t of n)if(e[t]=!0,this.selectionMode===QO.single)break
11624
11633
  return e}}
11625
- t([ft({attribute:"id-field-name"})],IF.prototype,"idFieldName",void 0),t([ft({attribute:"parent-id-field-name"})],IF.prototype,"parentIdFieldName",void 0),t([ft({attribute:"selection-mode"})],IF.prototype,"selectionMode",void 0),t([C],IF.prototype,"tableData",void 0),t([C],IF.prototype,"columns",void 0),t([C],IF.prototype,"childItems",void 0),t([C],IF.prototype,"rowElements",void 0),t([C],IF.prototype,"actionMenuSlots",void 0),t([C],IF.prototype,"openActionMenuRecordId",void 0),t([C],IF.prototype,"canRenderRows",void 0),t([C],IF.prototype,"scrollX",void 0),t([C],IF.prototype,"rowGridColumns",void 0),t([C],IF.prototype,"selectionState",void 0),t([C],IF.prototype,"selectionCheckbox",void 0),t([C],IF.prototype,"collapseAllButton",void 0),t([C],IF.prototype,"showCollapseAll",void 0),t([C],IF.prototype,"firstSortedColumn",void 0),t([C],IF.prototype,"visibleColumns",void 0),t([C],IF.prototype,"tableScrollableMinWidth",void 0),t([C],IF.prototype,"documentShiftKeyDown",void 0)
11626
- const MF=IF.compose({baseName:"table",template:GR,styles:_R})
11627
- _i.getOrCreate().withPrefix("nimble").register(MF())
11628
- const $F=Mt`
11634
+ t([ft({attribute:"id-field-name"})],$F.prototype,"idFieldName",void 0),t([ft({attribute:"parent-id-field-name"})],$F.prototype,"parentIdFieldName",void 0),t([ft({attribute:"selection-mode"})],$F.prototype,"selectionMode",void 0),t([C],$F.prototype,"tableData",void 0),t([C],$F.prototype,"columns",void 0),t([C],$F.prototype,"childItems",void 0),t([C],$F.prototype,"rowElements",void 0),t([C],$F.prototype,"actionMenuSlots",void 0),t([C],$F.prototype,"openActionMenuRecordId",void 0),t([C],$F.prototype,"canRenderRows",void 0),t([C],$F.prototype,"scrollX",void 0),t([C],$F.prototype,"rowGridColumns",void 0),t([C],$F.prototype,"selectionState",void 0),t([C],$F.prototype,"selectionCheckbox",void 0),t([C],$F.prototype,"collapseAllButton",void 0),t([C],$F.prototype,"showCollapseAll",void 0),t([C],$F.prototype,"firstSortedColumn",void 0),t([C],$F.prototype,"visibleColumns",void 0),t([C],$F.prototype,"tableScrollableMinWidth",void 0),t([C],$F.prototype,"documentShiftKeyDown",void 0)
11635
+ const EF=$F.compose({baseName:"table",template:KR,styles:MR})
11636
+ _i.getOrCreate().withPrefix("nimble").register(EF())
11637
+ const DF=Mt`
11629
11638
  ${zs("contents")}
11630
11639
 
11631
11640
  .header-content {
@@ -11633,14 +11642,14 @@ const $F=Mt`
11633
11642
  overflow: hidden;
11634
11643
  text-overflow: ellipsis;
11635
11644
  }
11636
- `,EF=Q`<span
11645
+ `,AF=Q`<span
11637
11646
  ${kg("hasOverflow")}
11638
11647
  class="header-content"
11639
11648
  title=${t=>t.hasOverflow&&t.headerTextContent?t.headerTextContent:null}
11640
11649
  >
11641
11650
  <slot ${Ut("contentSlot")}></slot>
11642
11651
  </span>`
11643
- function DF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.fractionalWidth=this.fractionalWidth??fR}minPixelWidthChanged(){this.columnInternals.minPixelWidth=this.minPixelWidth??pR}}return ft({attribute:"fractional-width",converter:ut})(e.prototype,"fractionalWidth"),ft({attribute:"min-pixel-width",converter:ut})(e.prototype,"minPixelWidth"),e}function AF(t){class e extends t{constructor(){super(...arguments),this.groupingDisabled=!1}groupingDisabledChanged(){this.columnInternals.groupingDisabled=this.groupingDisabled}groupIndexChanged(){this.columnInternals.groupIndex=this.groupIndex??void 0}}return ft({attribute:"grouping-disabled",mode:"boolean"})(e.prototype,"groupingDisabled"),ft({attribute:"group-index",converter:ut})(e.prototype,"groupIndex"),e}function TF(t){class e extends t{}return ft({attribute:"placeholder"})(e.prototype,"placeholder"),e}const OF=Mt`
11652
+ function TF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.fractionalWidth=this.fractionalWidth??gR}minPixelWidthChanged(){this.columnInternals.minPixelWidth=this.minPixelWidth??mR}}return ft({attribute:"fractional-width",converter:ut})(e.prototype,"fractionalWidth"),ft({attribute:"min-pixel-width",converter:ut})(e.prototype,"minPixelWidth"),e}function OF(t){class e extends t{constructor(){super(...arguments),this.groupingDisabled=!1}groupingDisabledChanged(){this.columnInternals.groupingDisabled=this.groupingDisabled}groupIndexChanged(){this.columnInternals.groupIndex=this.groupIndex??void 0}}return ft({attribute:"grouping-disabled",mode:"boolean"})(e.prototype,"groupingDisabled"),ft({attribute:"group-index",converter:ut})(e.prototype,"groupIndex"),e}function RF(t){class e extends t{}return ft({attribute:"placeholder"})(e.prototype,"placeholder"),e}const FF=Mt`
11644
11653
  ${zs("flex")}
11645
11654
 
11646
11655
  :host {
@@ -11669,7 +11678,7 @@ function DF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.f
11669
11678
  font: ${Oc};
11670
11679
  color: ${Rc};
11671
11680
  }
11672
- `,RF=Q`
11681
+ `,NF=Q`
11673
11682
  <template
11674
11683
  @click="${(t,e)=>("string"==typeof t.cellRecord?.href&&e.event.stopPropagation(),!0)}"
11675
11684
  class="${t=>t.isPlaceholder?"placeholder":""}"
@@ -11703,19 +11712,19 @@ function DF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.f
11703
11712
  </span>`)}
11704
11713
  </template>
11705
11714
  `
11706
- class FF extends vR{constructor(){super(...arguments),this.hasOverflow=!1,this.isPlaceholder=!1}get text(){const t=this.cellRecord?.label??this.cellRecord?.href
11707
- return null==t&&this.columnConfig?.placeholder?(this.isPlaceholder=!0,this.columnConfig.placeholder):(this.isPlaceholder=!1,"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:"")}get showAnchor(){return"string"==typeof this.cellRecord?.href}focusedRecycleCallback(){this.anchor?.blur()}get tabbableChildren(){return this.showAnchor?[this.anchor]:[]}}t([C],FF.prototype,"hasOverflow",void 0),t([C],FF.prototype,"isPlaceholder",void 0),t([k],FF.prototype,"text",null),t([k],FF.prototype,"showAnchor",null)
11708
- const NF=FF.compose({baseName:"table-column-anchor-cell-view",template:RF,styles:OF})
11709
- _i.getOrCreate().withPrefix("nimble").register(NF())
11710
- class LF extends mR{constructor(){super(...arguments),this.hasOverflow=!1,this.text=Tv.getValueFor(this),this.noValuePlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}},this.emptyPlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}}}connectedCallback(){super.connectedCallback(),Tv.subscribe(this.noValuePlaceholderLabelSubscriber,this),Ov.subscribe(this.emptyPlaceholderLabelSubscriber,this),this.applyPlaceholderTextIfNeeded()}disconnectedCallback(){super.disconnectedCallback(),Tv.unsubscribe(this.noValuePlaceholderLabelSubscriber),Ov.unsubscribe(this.emptyPlaceholderLabelSubscriber)}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}groupHeaderValueChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){return null===this.groupHeaderValue||void 0===this.groupHeaderValue?(this.text=Tv.getValueFor(this),!0):""===this.groupHeaderValue&&(this.text=Ov.getValueFor(this),!0)}}t([C],LF.prototype,"hasOverflow",void 0),t([C],LF.prototype,"text",void 0)
11711
- const BF=Q`
11715
+ class LF extends yR{constructor(){super(...arguments),this.hasOverflow=!1,this.isPlaceholder=!1}get text(){const t=this.cellRecord?.label??this.cellRecord?.href
11716
+ return null==t&&this.columnConfig?.placeholder?(this.isPlaceholder=!0,this.columnConfig.placeholder):(this.isPlaceholder=!1,"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:"")}get showAnchor(){return"string"==typeof this.cellRecord?.href}focusedRecycleCallback(){this.anchor?.blur()}get tabbableChildren(){return this.showAnchor?[this.anchor]:[]}}t([C],LF.prototype,"hasOverflow",void 0),t([C],LF.prototype,"isPlaceholder",void 0),t([k],LF.prototype,"text",null),t([k],LF.prototype,"showAnchor",null)
11717
+ const BF=LF.compose({baseName:"table-column-anchor-cell-view",template:NF,styles:FF})
11718
+ _i.getOrCreate().withPrefix("nimble").register(BF())
11719
+ class PF extends vR{constructor(){super(...arguments),this.hasOverflow=!1,this.text=Tv.getValueFor(this),this.noValuePlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}},this.emptyPlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}}}connectedCallback(){super.connectedCallback(),Tv.subscribe(this.noValuePlaceholderLabelSubscriber,this),Ov.subscribe(this.emptyPlaceholderLabelSubscriber,this),this.applyPlaceholderTextIfNeeded()}disconnectedCallback(){super.disconnectedCallback(),Tv.unsubscribe(this.noValuePlaceholderLabelSubscriber),Ov.unsubscribe(this.emptyPlaceholderLabelSubscriber)}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}groupHeaderValueChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){return null===this.groupHeaderValue||void 0===this.groupHeaderValue?(this.text=Tv.getValueFor(this),!0):""===this.groupHeaderValue&&(this.text=Ov.getValueFor(this),!0)}}t([C],PF.prototype,"hasOverflow",void 0),t([C],PF.prototype,"text",void 0)
11720
+ const zF=Q`
11712
11721
  <span
11713
11722
  ${kg("hasOverflow")}
11714
11723
  title="${t=>t.hasOverflow&&t.text?t.text:null}"
11715
11724
  >
11716
11725
  ${t=>t.text}
11717
11726
  </span>
11718
- `,PF=Mt`
11727
+ `,VF=Mt`
11719
11728
  ${zs("flex")}
11720
11729
 
11721
11730
  span {
@@ -11726,20 +11735,20 @@ const BF=Q`
11726
11735
  text-overflow: ellipsis;
11727
11736
  }
11728
11737
  `
11729
- const zF=class extends LF{updateText(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:BF,styles:PF})
11730
- _i.getOrCreate().withPrefix("nimble").register(zF())
11731
- const VF="nimble-table-column-text-group-header-view"
11732
- function HF(t){class e extends t{constructor(){super(...arguments),this.sortingDisabled=!1,this.sortDirection=JO.none}sortingDisabledChanged(){this.columnInternals.sortingDisabled=this.sortingDisabled,this.sortingDisabled?(this.columnInternals.currentSortDirection=JO.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex??void 0)}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex??void 0)}}return ft({attribute:"sorting-disabled",mode:"boolean"})(e.prototype,"sortingDisabled"),ft({attribute:"sort-index",converter:ut})(e.prototype,"sortIndex"),ft({attribute:"sort-direction"})(e.prototype,"sortDirection"),e}class UF extends(AF(DF(TF(HF(kR))))){constructor(){super(...arguments),this.underlineHidden=!1}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:VF,delegatedEvents:["click"],sortOperation:uR,validator:new SF([])}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.columnInternals.operandDataRecordFieldName=this.labelFieldName}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}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={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,placeholder:this.placeholder}}}t([ft({attribute:"label-field-name"})],UF.prototype,"labelFieldName",void 0),t([ft({attribute:"href-field-name"})],UF.prototype,"hrefFieldName",void 0),t([ft],UF.prototype,"appearance",void 0),t([ft({attribute:"underline-hidden",mode:"boolean"})],UF.prototype,"underlineHidden",void 0),t([ft],UF.prototype,"hreflang",void 0),t([ft],UF.prototype,"ping",void 0),t([ft],UF.prototype,"referrerpolicy",void 0),t([ft],UF.prototype,"rel",void 0),t([ft],UF.prototype,"target",void 0),t([ft],UF.prototype,"type",void 0),t([ft],UF.prototype,"download",void 0)
11733
- const qF=UF.compose({baseName:"table-column-anchor",template:EF,styles:$F})
11734
- _i.getOrCreate().withPrefix("nimble").register(qF())
11735
- class jF extends kR{fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function WF(t){return AF(DF(TF(HF(t))))}function GF(t,e){if("number"!=typeof e)return""
11736
- try{return t.format(e)}catch(t){return""}}t([ft({attribute:"field-name"})],jF.prototype,"fieldName",void 0)
11737
- const ZF=class extends LF{updateText(){this.columnConfig?this.text=GF(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:BF,styles:PF})
11738
- _i.getOrCreate().withPrefix("nimble").register(ZF())
11739
- const KF="left",YF="right",XF=Q`
11738
+ const HF=class extends PF{updateText(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:zF,styles:VF})
11739
+ _i.getOrCreate().withPrefix("nimble").register(HF())
11740
+ const UF="nimble-table-column-text-group-header-view"
11741
+ function qF(t){class e extends t{constructor(){super(...arguments),this.sortingDisabled=!1,this.sortDirection=JO.none}sortingDisabledChanged(){this.columnInternals.sortingDisabled=this.sortingDisabled,this.sortingDisabled?(this.columnInternals.currentSortDirection=JO.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex??void 0)}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex??void 0)}}return ft({attribute:"sorting-disabled",mode:"boolean"})(e.prototype,"sortingDisabled"),ft({attribute:"sort-index",converter:ut})(e.prototype,"sortIndex"),ft({attribute:"sort-direction"})(e.prototype,"sortDirection"),e}class jF extends(OF(TF(RF(qF(_R))))){constructor(){super(...arguments),this.underlineHidden=!1}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:UF,delegatedEvents:["click"],sortOperation:fR,validator:new IF([])}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.columnInternals.operandDataRecordFieldName=this.labelFieldName}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}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={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,placeholder:this.placeholder}}}t([ft({attribute:"label-field-name"})],jF.prototype,"labelFieldName",void 0),t([ft({attribute:"href-field-name"})],jF.prototype,"hrefFieldName",void 0),t([ft],jF.prototype,"appearance",void 0),t([ft({attribute:"underline-hidden",mode:"boolean"})],jF.prototype,"underlineHidden",void 0),t([ft],jF.prototype,"hreflang",void 0),t([ft],jF.prototype,"ping",void 0),t([ft],jF.prototype,"referrerpolicy",void 0),t([ft],jF.prototype,"rel",void 0),t([ft],jF.prototype,"target",void 0),t([ft],jF.prototype,"type",void 0),t([ft],jF.prototype,"download",void 0)
11742
+ const WF=jF.compose({baseName:"table-column-anchor",template:AF,styles:DF})
11743
+ _i.getOrCreate().withPrefix("nimble").register(WF())
11744
+ class GF extends _R{fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function ZF(t){return OF(TF(RF(qF(t))))}function KF(t,e){if("number"!=typeof e)return""
11745
+ try{return t.format(e)}catch(t){return""}}t([ft({attribute:"field-name"})],GF.prototype,"fieldName",void 0)
11746
+ const YF=class extends PF{updateText(){this.columnConfig?this.text=KF(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:zF,styles:VF})
11747
+ _i.getOrCreate().withPrefix("nimble").register(YF())
11748
+ const XF=Q`
11740
11749
  <template
11741
11750
  class="
11742
- ${t=>t.alignment===YF?"right-align":""}
11751
+ ${t=>t.alignment===sR?"right-align":""}
11743
11752
  ${t=>t.isPlaceholder?"placeholder":""}
11744
11753
  "
11745
11754
  >
@@ -11774,18 +11783,18 @@ const KF="left",YF="right",XF=Q`
11774
11783
  color: ${Rc};
11775
11784
  }
11776
11785
  `
11777
- class QF extends vR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=KF,this.isPlaceholder=!1}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}cellRecordChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){const t=this.cellRecord?.value,e=this.columnConfig?.placeholder
11786
+ class QF extends yR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=iR,this.isPlaceholder=!1}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}cellRecordChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){const t=this.cellRecord?.value,e=this.columnConfig?.placeholder
11778
11787
  return"string"==typeof e&&null==t?(this.text=e,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}t([C],QF.prototype,"hasOverflow",void 0),t([C],QF.prototype,"text",void 0),t([C],QF.prototype,"alignment",void 0),t([C],QF.prototype,"isPlaceholder",void 0)
11779
- const tN=class extends QF{updateText(){this.columnConfig?this.text=GF(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:XF,styles:JF})
11788
+ const tN=class extends QF{updateText(){this.columnConfig?this.text=KF(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:XF,styles:JF})
11780
11789
  _i.getOrCreate().withPrefix("nimble").register(tN())
11781
11790
  const eN=void 0,nN=["invalidCustomOptionsCombination"]
11782
- class iN extends SF{constructor(){super(nN)}setCustomOptionsValidity(t){this.setConditionValue("invalidCustomOptionsCombination",!t)}}const sN={toView:t=>"boolean"==typeof t?t.toString():null,fromView:t=>"true"===t||!0===t||"false"!==t&&!1!==t&&void 0}
11783
- class oN extends(WF(jF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-date-text-cell-view",groupHeaderViewTag:"nimble-table-column-date-text-group-header-view",delegatedEvents:[],sortOperation:hR,validator:new iN}}formatChanged(){this.updateColumnConfig()}customLocaleMatcherChanged(){this.updateColumnConfig()}customWeekdayChanged(){this.updateColumnConfig()}customEraChanged(){this.updateColumnConfig()}customYearChanged(){this.updateColumnConfig()}customMonthChanged(){this.updateColumnConfig()}customDayChanged(){this.updateColumnConfig()}customHourChanged(){this.updateColumnConfig()}customMinuteChanged(){this.updateColumnConfig()}customSecondChanged(){this.updateColumnConfig()}customTimeZoneNameChanged(){this.updateColumnConfig()}customFormatMatcherChanged(){this.updateColumnConfig()}customHour12Changed(){this.updateColumnConfig()}customTimeZoneChanged(){this.updateColumnConfig()}customCalendarChanged(){this.updateColumnConfig()}customDayPeriodChanged(){this.updateColumnConfig()}customNumberingSystemChanged(){this.updateColumnConfig()}customDateStyleChanged(){this.updateColumnConfig()}customTimeStyleChanged(){this.updateColumnConfig()}customHourCycleChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.createFormatter()
11791
+ class iN extends IF{constructor(){super(nN)}setCustomOptionsValidity(t){this.setConditionValue("invalidCustomOptionsCombination",!t)}}const sN={toView:t=>"boolean"==typeof t?t.toString():null,fromView:t=>"true"===t||!0===t||"false"!==t&&!1!==t&&void 0}
11792
+ class oN extends(ZF(GF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-date-text-cell-view",groupHeaderViewTag:"nimble-table-column-date-text-group-header-view",delegatedEvents:[],sortOperation:pR,validator:new iN}}formatChanged(){this.updateColumnConfig()}customLocaleMatcherChanged(){this.updateColumnConfig()}customWeekdayChanged(){this.updateColumnConfig()}customEraChanged(){this.updateColumnConfig()}customYearChanged(){this.updateColumnConfig()}customMonthChanged(){this.updateColumnConfig()}customDayChanged(){this.updateColumnConfig()}customHourChanged(){this.updateColumnConfig()}customMinuteChanged(){this.updateColumnConfig()}customSecondChanged(){this.updateColumnConfig()}customTimeZoneNameChanged(){this.updateColumnConfig()}customFormatMatcherChanged(){this.updateColumnConfig()}customHour12Changed(){this.updateColumnConfig()}customTimeZoneChanged(){this.updateColumnConfig()}customCalendarChanged(){this.updateColumnConfig()}customDayPeriodChanged(){this.updateColumnConfig()}customNumberingSystemChanged(){this.updateColumnConfig()}customDateStyleChanged(){this.updateColumnConfig()}customTimeStyleChanged(){this.updateColumnConfig()}customHourCycleChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.createFormatter()
11784
11793
  if(t){const e={formatter:t,placeholder:this.placeholder}
11785
11794
  this.columnInternals.columnConfig=e,this.columnInternals.validator.setCustomOptionsValidity(!0)}else this.columnInternals.columnConfig=void 0,this.columnInternals.validator.setCustomOptionsValidity(!1)}createFormatter(){let t
11786
11795
  t=this.format===eN?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
11787
11796
  try{return new Intl.DateTimeFormat(Ga.getValueFor(this),t)}catch(t){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}t([ft],oN.prototype,"format",void 0),t([ft({attribute:"custom-locale-matcher"})],oN.prototype,"customLocaleMatcher",void 0),t([ft({attribute:"custom-weekday"})],oN.prototype,"customWeekday",void 0),t([ft({attribute:"custom-era"})],oN.prototype,"customEra",void 0),t([ft({attribute:"custom-year"})],oN.prototype,"customYear",void 0),t([ft({attribute:"custom-month"})],oN.prototype,"customMonth",void 0),t([ft({attribute:"custom-day"})],oN.prototype,"customDay",void 0),t([ft({attribute:"custom-hour"})],oN.prototype,"customHour",void 0),t([ft({attribute:"custom-minute"})],oN.prototype,"customMinute",void 0),t([ft({attribute:"custom-second"})],oN.prototype,"customSecond",void 0),t([ft({attribute:"custom-time-zone-name"})],oN.prototype,"customTimeZoneName",void 0),t([ft({attribute:"custom-format-matcher"})],oN.prototype,"customFormatMatcher",void 0),t([ft({attribute:"custom-hour12",converter:sN})],oN.prototype,"customHour12",void 0),t([ft({attribute:"custom-time-zone"})],oN.prototype,"customTimeZone",void 0),t([ft({attribute:"custom-calendar"})],oN.prototype,"customCalendar",void 0),t([ft({attribute:"custom-day-period"})],oN.prototype,"customDayPeriod",void 0),t([ft({attribute:"custom-numbering-system"})],oN.prototype,"customNumberingSystem",void 0),t([ft({attribute:"custom-date-style"})],oN.prototype,"customDateStyle",void 0),t([ft({attribute:"custom-time-style"})],oN.prototype,"customTimeStyle",void 0),t([ft({attribute:"custom-hour-cycle"})],oN.prototype,"customHourCycle",void 0)
11788
- const rN=oN.compose({baseName:"table-column-date-text",template:EF,styles:$F})
11797
+ const rN=oN.compose({baseName:"table-column-date-text",template:AF,styles:DF})
11789
11798
  _i.getOrCreate().withPrefix("nimble").register(rN())
11790
11799
  const aN=class extends QF{updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:XF,styles:JF})
11791
11800
  _i.getOrCreate().withPrefix("nimble").register(aN())
@@ -11802,14 +11811,14 @@ if(a-=d*i,d){const t=this.minutesFormatter.format(d)
11802
11811
  e.push(t)}const h=a/n,u=0===h?0:h%60
11803
11812
  if(t<1&&0!==h)return this.scientificSecondsFormatter.format(h)
11804
11813
  if(u>=5e-4||0===u&&0===e.length){const t=this.secondsFormatter.format(u)
11805
- e.push(t)}return e.join(", ")}}const cN=class extends LF{updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:BF,styles:PF})
11814
+ e.push(t)}return e.join(", ")}}const cN=class extends PF{updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:zF,styles:VF})
11806
11815
  _i.getOrCreate().withPrefix("nimble").register(cN())
11807
- class dN extends(WF(jF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:hR,validator:new SF([])}}updateColumnConfig(){const t={formatter:new lN(Ga.getValueFor(this)),placeholder:this.placeholder}
11808
- this.columnInternals.columnConfig=t}}const hN=dN.compose({baseName:"table-column-duration-text",template:EF,styles:$F})
11816
+ class dN extends(ZF(GF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:pR,validator:new IF([])}}updateColumnConfig(){const t={formatter:new lN(Ga.getValueFor(this)),placeholder:this.placeholder}
11817
+ this.columnInternals.columnConfig=t}}const hN=dN.compose({baseName:"table-column-duration-text",template:AF,styles:DF})
11809
11818
  _i.getOrCreate().withPrefix("nimble").register(hN())
11810
11819
  const uN=(t,e)=>{if("number"===e){const e=ut.fromView(t)
11811
11820
  return null===e?void 0:e}return"boolean"===e?!1!==t&&"false"!==t&&(!0===t||"true"===t||void 0):t?.toString()??void 0}
11812
- class pN extends kR{constructor(){super(...arguments),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(t,e){t instanceof jv&&"string"==typeof e&&this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.checkValidity()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const t=new Map
11821
+ class pN extends _R{constructor(){super(...arguments),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(t,e){t instanceof jv&&"string"==typeof e&&this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.checkValidity()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const t=new Map
11813
11822
  return this.mappings.forEach((e=>{const n=uN(e.key,this.keyType)
11814
11823
  if(void 0===n)throw Error("Key was invalid for type. Validation should have prevented this.")
11815
11824
  const i=this.createMappingConfig(e)
@@ -11817,13 +11826,13 @@ t.set(n,i)})),t}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[th
11817
11826
  for(const t of this.mappings){const e=x.getNotifier(t)
11818
11827
  e.subscribe(this),this.mappingNotifiers.push(e)}}}t([C],pN.prototype,"mappings",void 0),t([ft({attribute:"field-name"})],pN.prototype,"fieldName",void 0),t([ft({attribute:"key-type"})],pN.prototype,"keyType",void 0)
11819
11828
  const fN=Mt`
11820
- ${$F}
11829
+ ${DF}
11821
11830
 
11822
11831
  slot[name='mapping'] {
11823
11832
  display: none;
11824
11833
  }
11825
- `,mN=Q`${EF}<slot ${ie("mappings")} name="mapping"></slot>`
11826
- class gN extends SF{constructor(t){super(t)}validate(t,e){this.untrackAll()
11834
+ `,mN=Q`${AF}<slot ${ie("mappings")} name="mapping"></slot>`
11835
+ class gN extends IF{constructor(t){super(t)}validate(t,e){this.untrackAll()
11827
11836
  const n=t.map((t=>t.key))
11828
11837
  this.validateKeyValuesForType(n,e),this.validateUniqueKeys(n,e),this.validateNoMissingKeys(t)}validateKeyValuesForType(t,e){const n=t.some((t=>void 0!==t&&void 0===uN(t,e)))
11829
11838
  this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(t,e){const n=t.map((t=>uN(t,e))),i=new Set(n).size!==n.length
@@ -11884,7 +11893,7 @@ super(n),this.severity=e,this.textHidden=i,this.iconTemplate=Q`
11884
11893
  >
11885
11894
  </${OT}>
11886
11895
  `
11887
- class _N extends CN{constructor(t,e){super(t),this.textHidden=e,this.spinnerTemplate=SN}}class IN extends CN{}class MN extends CN{}class $N extends mR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.textHidden=!1}columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig)return
11896
+ class _N extends CN{constructor(t,e){super(t),this.textHidden=e,this.spinnerTemplate=SN}}class IN extends CN{}class MN extends CN{}class $N extends vR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.textHidden=!1}columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig)return
11888
11897
  const t=this.groupHeaderValue,e=this.columnConfig.mappingConfigs.get(t)
11889
11898
  e instanceof kN?(this.severity=e.severity,this.text=e.text??"",this.visualizationTemplate=e.iconTemplate):e instanceof _N?(this.text=e.text??"",this.visualizationTemplate=e.spinnerTemplate):(e instanceof IN||e instanceof MN)&&(this.text=e.text??"")}resetState(){this.text="",this.visualizationTemplate=void 0,this.severity=xN.default}}t([C],$N.prototype,"hasOverflow",void 0),t([C],$N.prototype,"text",void 0),t([C],$N.prototype,"severity",void 0),t([C],$N.prototype,"visualizationTemplate",void 0)
11890
11899
  const EN=$N.compose({baseName:"table-column-mapping-group-header-view",template:wN,styles:yN})
@@ -11927,7 +11936,7 @@ const DN=Mt`
11927
11936
  </span>
11928
11937
  `)}
11929
11938
  `
11930
- class TN extends vR{constructor(){super(...arguments),this.textHidden=!1,this.hasOverflow=!1}columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig||!this.cellRecord)return
11939
+ class TN extends yR{constructor(){super(...arguments),this.textHidden=!1,this.hasOverflow=!1}columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig||!this.cellRecord)return
11931
11940
  const t=this.cellRecord.value
11932
11941
  if(null==t)return
11933
11942
  const e=this.columnConfig.mappingConfigs.get(t)
@@ -11935,16 +11944,16 @@ e instanceof kN?(this.severity=e.severity,this.text=e.text,this.visualizationTem
11935
11944
  const ON=TN.compose({baseName:"table-column-mapping-cell-view",template:AN,styles:DN})
11936
11945
  _i.getOrCreate().withPrefix("nimble").register(ON())
11937
11946
  const RN="icon-size"
11938
- class FN extends(AF(DF(HF(pN)))){minPixelWidthChanged(){this.widthMode!==RN&&(this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-mapping-cell-view",groupHeaderViewTag:"nimble-table-column-mapping-group-header-view",delegatedEvents:[],sortOperation:hR,validator:new bN}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof Xv){if(!t.resolvedIcon)throw Error("Unresolved icon")
11947
+ class FN extends(OF(TF(qF(pN)))){minPixelWidthChanged(){this.widthMode!==RN&&(this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-mapping-cell-view",groupHeaderViewTag:"nimble-table-column-mapping-group-header-view",delegatedEvents:[],sortOperation:pR,validator:new bN}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof Xv){if(!t.resolvedIcon)throw Error("Unresolved icon")
11939
11948
  return new kN(t.resolvedIcon,t.severity,t.text,t.textHidden)}if(t instanceof Qv)return new _N(t.text,t.textHidden)
11940
11949
  if(t instanceof eb)return new IN(t.text)
11941
11950
  if(t instanceof Zv)return new MN(t.text)
11942
- throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===RN?(this.columnInternals.resizingDisabled=!0,this.columnInternals.hideHeaderIndicators=!0,this.columnInternals.pixelWidth=32,this.columnInternals.minPixelWidth=32):(this.columnInternals.resizingDisabled=!1,this.columnInternals.hideHeaderIndicators=!1,this.columnInternals.pixelWidth=void 0,this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getConfiguredMinPixelWidth(){return"number"==typeof this.minPixelWidth?this.minPixelWidth:pR}}t([ft({attribute:"width-mode"})],FN.prototype,"widthMode",void 0)
11951
+ throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===RN?(this.columnInternals.resizingDisabled=!0,this.columnInternals.hideHeaderIndicators=!0,this.columnInternals.pixelWidth=32,this.columnInternals.minPixelWidth=32):(this.columnInternals.resizingDisabled=!1,this.columnInternals.hideHeaderIndicators=!1,this.columnInternals.pixelWidth=void 0,this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getConfiguredMinPixelWidth(){return"number"==typeof this.minPixelWidth?this.minPixelWidth:mR}}t([ft({attribute:"width-mode"})],FN.prototype,"widthMode",void 0)
11943
11952
  const NN=FN.compose({baseName:"table-column-mapping",template:mN,styles:fN})
11944
11953
  _i.getOrCreate().withPrefix("nimble").register(NN())
11945
11954
  const LN=Q`
11946
11955
  <template @delegated-event="${(t,e)=>t.onDelegatedEvent(e.event)}"
11947
- >${EF}</template
11956
+ >${AF}</template
11948
11957
  >
11949
11958
  `,BN="menu-button-menu",PN=Q`
11950
11959
  ${Gt((t=>t.showMenuButton),Q`
@@ -11981,16 +11990,16 @@ const LN=Q`
11981
11990
  white-space: nowrap;
11982
11991
  }
11983
11992
  `
11984
- class VN extends vR{constructor(){super(...arguments),this.hasOverflow=!1}get showMenuButton(){return!!this.cellRecord?.value}get tabbableChildren(){return this.showMenuButton?[this.menuButton]:[]}onMenuButtonBeforeToggle(t){const e=this.columnConfig?.menuSlot
11993
+ class VN extends yR{constructor(){super(...arguments),this.hasOverflow=!1}get showMenuButton(){return!!this.cellRecord?.value}get tabbableChildren(){return this.showMenuButton?[this.menuButton]:[]}onMenuButtonBeforeToggle(t){const e=this.columnConfig?.menuSlot
11985
11994
  if(e&&t.detail.newState){const t={slots:[{name:e,slot:BN}]}
11986
11995
  this.$emit("cell-view-slots-request",t)}return!0}onMenuButtonMouseOver(){this.valueSpan&&(this.hasOverflow=this.valueSpan.offsetWidth<this.valueSpan.scrollWidth)}onMenuButtonMouseOut(){this.hasOverflow=!1}onMenuButtonClick(t){t.stopPropagation()}}t([C],VN.prototype,"hasOverflow",void 0),t([k],VN.prototype,"showMenuButton",null)
11987
11996
  const HN=VN.compose({baseName:"table-column-menu-button-cell-view",template:PN,styles:zN})
11988
11997
  _i.getOrCreate().withPrefix("nimble").register(HN())
11989
- class UN extends(DF(kR)){onDelegatedEvent(t){t.stopImmediatePropagation()
11998
+ class UN extends(TF(_R)){onDelegatedEvent(t){t.stopImmediatePropagation()
11990
11999
  const e=t,n=e.detail.originalEvent
11991
12000
  if("beforetoggle"===n.type||"toggle"===n.type){const t=`menu-button-column-${n.type}`,i={...n.detail,recordId:e.detail.recordId}
11992
- this.$emit(t,i)}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-menu-button-cell-view",delegatedEvents:["beforetoggle","toggle"],slotNames:[BN],validator:new SF([])}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}menuSlotChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={menuSlot:this.menuSlot}}}t([ft({attribute:"field-name"})],UN.prototype,"fieldName",void 0),t([ft({attribute:"menu-slot"})],UN.prototype,"menuSlot",void 0)
11993
- const qN=UN.compose({baseName:"table-column-menu-button",template:LN,styles:$F})
12001
+ this.$emit(t,i)}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-menu-button-cell-view",delegatedEvents:["beforetoggle","toggle"],slotNames:[BN],validator:new IF([])}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}menuSlotChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={menuSlot:this.menuSlot}}}t([ft({attribute:"field-name"})],UN.prototype,"fieldName",void 0),t([ft({attribute:"menu-slot"})],UN.prototype,"menuSlot",void 0)
12002
+ const qN=UN.compose({baseName:"table-column-menu-button",template:LN,styles:DF})
11994
12003
  _i.getOrCreate().withPrefix("nimble").register(qN())
11995
12004
  const jN=Q`<span
11996
12005
  ${kg("hasOverflow")}
@@ -12000,9 +12009,9 @@ const jN=Q`<span
12000
12009
  <slot ${Ut("contentSlot")}></slot>
12001
12010
  <slot ${ie({property:"unitElements",filter:te()})} name="unit"></slot>
12002
12011
  </span>`
12003
- const WN=class extends LF{updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:BF,styles:PF})
12012
+ const WN=class extends PF{updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:zF,styles:VF})
12004
12013
  _i.getOrCreate().withPrefix("nimble").register(WN())
12005
- const GN=class extends QF{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??KF}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:XF,styles:JF})
12014
+ const GN=class extends QF{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??iR}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:XF,styles:JF})
12006
12015
  _i.getOrCreate().withPrefix("nimble").register(GN())
12007
12016
  const ZN={default:void 0,decimal:"decimal"},KN="left",YN="right"
12008
12017
  class XN{format(t){if("number"!=typeof t)return""
@@ -12031,21 +12040,21 @@ const e="number"==typeof t.decimalDigits,n="number"==typeof t.decimalMaximumDigi
12031
12040
  if(e&&n)throw new Error("decimalDigits and decimalMaximumDigits are mutually exclusive. Do not specify both.")
12032
12041
  return e||n?{numberTextFormat:ZN.decimal,decimalDigits:t.decimalDigits,decimalMaximumDigits:t.decimalMaximumDigits,unitScale:t.unitScale??nL}:{numberTextFormat:ZN.decimal,decimalDigits:rL.defaultDecimalDigits,decimalMaximumDigits:void 0,unitScale:t.unitScale??nL}}}rL.defaultDecimalDigits=2
12033
12042
  const aL=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
12034
- class lL extends SF{constructor(){super(aL)}validateDecimalDigits(t,e){const n=!!(t===ZN.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
12043
+ class lL extends IF{constructor(){super(aL)}validateDecimalDigits(t,e){const n=!!(t===ZN.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
12035
12044
  this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(t,e){const n=!!(t===ZN.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
12036
12045
  this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(t,e,n){const i=!!(t===ZN.decimal)&&("number"==typeof e&&"number"==typeof n)
12037
12046
  this.setConditionValue("decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits",i)}validateAtMostOneUnit(t){const e=t.length>1
12038
12047
  this.setConditionValue("moreThanOneUnitSpecified",e)}isInvalidDecimalDigitsValue(t){return t<0||t>20}}class cL extends We{}t([C],cL.prototype,"resolvedUnitScale",void 0)
12039
- class dL extends(WF(jF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:hR,validator:new lL}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const t=x.getNotifier(this.unit)
12048
+ class dL extends(ZF(GF)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:pR,validator:new lL}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const t=x.getNotifier(this.unit)
12040
12049
  t.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=t}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await SE(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof cL))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.columnInternals.validator
12041
12050
  if(t.validateDecimalDigits(this.format,this.decimalDigits),t.validateDecimalMaximumDigits(this.format,this.decimalMaximumDigits),t.validateNoMutuallyExclusiveProperties(this.format,this.decimalDigits,this.decimalMaximumDigits),t.validateAtMostOneUnit(this.unitElements??[]),t.isValid()){const t={formatter:this.createFormatter(),alignment:this.determineCellContentAlignment(),placeholder:this.placeholder}
12042
- this.columnInternals.columnConfig=t}else this.columnInternals.columnConfig=void 0}createFormatter(){const t=this.unit?.resolvedUnitScale
12043
- return new rL(Ga.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:t})}determineCellContentAlignment(){return this.alignment===KN?KF:this.alignment===YN?YF:this.format!==ZN.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?KF:YF}}t([ft],dL.prototype,"format",void 0),t([ft],dL.prototype,"alignment",void 0),t([ft({attribute:"decimal-digits",converter:ut})],dL.prototype,"decimalDigits",void 0),t([ft({attribute:"decimal-maximum-digits",converter:ut})],dL.prototype,"decimalMaximumDigits",void 0),t([C],dL.prototype,"unitElements",void 0),t([C],dL.prototype,"unit",void 0)
12044
- const hL=dL.compose({baseName:"table-column-number-text",template:jN,styles:$F})
12051
+ this.columnInternals.headerAlignment=t.alignment,this.columnInternals.columnConfig=t}else this.columnInternals.columnConfig=void 0}createFormatter(){const t=this.unit?.resolvedUnitScale
12052
+ return new rL(Ga.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:t})}determineCellContentAlignment(){return this.alignment===KN?iR:this.alignment===YN?sR:this.format!==ZN.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?iR:sR}}t([ft],dL.prototype,"format",void 0),t([ft],dL.prototype,"alignment",void 0),t([ft({attribute:"decimal-digits",converter:ut})],dL.prototype,"decimalDigits",void 0),t([ft({attribute:"decimal-maximum-digits",converter:ut})],dL.prototype,"decimalMaximumDigits",void 0),t([C],dL.prototype,"unitElements",void 0),t([C],dL.prototype,"unit",void 0)
12053
+ const hL=dL.compose({baseName:"table-column-number-text",template:jN,styles:DF})
12045
12054
  _i.getOrCreate().withPrefix("nimble").register(hL())
12046
12055
  const uL=class extends QF{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:XF,styles:JF})
12047
12056
  _i.getOrCreate().withPrefix("nimble").register(uL())
12048
- class pL extends(WF(jF)){placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:VF,delegatedEvents:[],sortOperation:uR,validator:new SF([])}}}const fL=pL.compose({baseName:"table-column-text",template:EF,styles:$F})
12057
+ class pL extends(ZF(GF)){placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:UF,delegatedEvents:[],sortOperation:fR,validator:new IF([])}}}const fL=pL.compose({baseName:"table-column-text",template:AF,styles:DF})
12049
12058
  _i.getOrCreate().withPrefix("nimble").register(fL())
12050
12059
  const mL=Mt`
12051
12060
  ${zs("grid")}