@ncino/web-components 16.2.0 → 16.4.0

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.
@@ -1 +1 @@
1
- var e={exports:{}};export{e as __module};
1
+ var e={};export{e as __exports};
@@ -1 +1 @@
1
- var e={};export{e as __exports};
1
+ var e={exports:{}};export{e as __module};
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as u}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as g}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import"../../../tooltip/gator/tooltip.gator.js";import{unsafeCSS as f}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var m=Object.defineProperty,s=(c,t,o,p)=>{for(var e=void 0,r=c.length-1,l;r>=0;r--)(l=c[r])&&(e=l(t,o,e)||e);return e&&m(t,o,e),e};const w=f`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as d}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as m}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import"../../../tooltip/gator/tooltip.gator.js";import{unsafeCSS as g}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var f=Object.defineProperty,s=(p,t,e,a)=>{for(var l=void 0,i=p.length-1,o;i>=0;i--)(o=p[i])&&(l=o(t,e,l)||l);return l&&f(t,e,l),l};const y=g`
2
2
  .gator-table-cell-tooltip-ref { cursor: help; }
3
3
  .gator-table-cell-left { text-align: left; }
4
4
  .gator-table-cell-center { text-align: center; }
@@ -10,7 +10,7 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@
10
10
  text-overflow: ellipsis;
11
11
  white-space: nowrap;
12
12
  }
13
- `,a=class a extends g{constructor(){super(...arguments),this.rowData={},this.column={field:"",name:""},this.rowIndex=0,this.categoryHeaderId=""}getAlignClass(){return`gator-table-cell-${this.column.cellConfig?.align??"left"}`}getCellValue(){return this.rowData[this.column.field]}getDisplayValue(){const t=this.getCellValue();return t!=null?String(t):""}emitCellChange(t){this.dispatchEvent(new CustomEvent("cellchange",{bubbles:!0,composed:!0,detail:{rowIndex:this.rowIndex,field:this.column.field,value:t}}))}emitCellClick(t){this.dispatchEvent(new CustomEvent("cellclick",{bubbles:!0,composed:!0,detail:{rowIndex:this.rowIndex,field:this.column.field,...t!==void 0&&{value:t}}}))}renderWithTooltip(t){const o=this.column.cellConfig,p=this.getAlignClass(),e=o?.truncate?"gator-table-cell-truncate":"",r=[p,e].filter(Boolean).join(" "),l=o?.tooltipText??(o?.truncate?this.getDisplayValue():void 0);if(!l)return u`<span class="${r}">${t}</span>`;const h=typeof l=="function"?l(this.rowData):l,d=`cell-tooltip-${this.column.field}-${this.rowIndex}-${this.categoryHeaderId}-${this.rowData.id??""}`;return u`
14
- <span id="${d}" class="gator-table-cell-tooltip-ref ${r}">${t}</span>
15
- <ngc-tooltip reference-id="${d}" placement="top" hide-tippet>${h}</ngc-tooltip>
16
- `}render(){return this.renderWithTooltip(this.renderCellContent())}};a.styles=[w];let i=a;s([n({type:Object})],i.prototype,"rowData");s([n({type:Object})],i.prototype,"column");s([n({type:Number})],i.prototype,"rowIndex");s([n({type:String})],i.prototype,"categoryHeaderId");export{i as TableCellBase};
13
+ `,c=class c extends m{constructor(){super(...arguments),this.emptyCellValue="—",this.rowData={},this.column={field:"",name:""},this.rowIndex=0,this.categoryHeaderId=""}getAlignClass(){return`gator-table-cell-${this.column.cellConfig?.align??"left"}`}cellIsEmpty(t){return t==null||t===""}getCellValue(){return this.shouldShowEmptyCellValue(this.column,this.rowData[this.column.field])?this.emptyCellValue:this.rowData[this.column.field]}getDisplayValue(){const t=this.getCellValue();return t!=null?String(t):""}emitCellChange(t){this.dispatchEvent(new CustomEvent("cellchange",{bubbles:!0,composed:!0,detail:{rowIndex:this.rowIndex,field:this.column.field,value:t}}))}emitCellClick(t){this.dispatchEvent(new CustomEvent("cellclick",{bubbles:!0,composed:!0,detail:{rowIndex:this.rowIndex,field:this.column.field,...t!==void 0&&{value:t}}}))}renderWithTooltip(t){const e=this.column.cellConfig,a=this.getAlignClass(),l=e?.truncate?"gator-table-cell-truncate":"",i=[a,l].filter(Boolean).join(" "),o=e?.tooltipText??(e?.truncate?this.getDisplayValue():void 0);if(!o)return d`<span class="${i}">${t}</span>`;const h=typeof o=="function"?o(this.rowData):o,u=`cell-tooltip-${this.column.field}-${this.rowIndex}-${this.categoryHeaderId}-${this.rowData.id??""}`;return d`
14
+ <span id="${u}" class="gator-table-cell-tooltip-ref ${i}">${t}</span>
15
+ <ngc-tooltip reference-id="${u}" placement="top" hide-tippet>${h}</ngc-tooltip>
16
+ `}shouldShowEmptyCellValue(t,e){return["chip","text","text-link",""].includes(t?.cellType||"")&&this.cellIsEmpty(e)}render(){return this.renderWithTooltip(this.renderCellContent())}};c.styles=[y];let r=c;s([n({type:Object})],r.prototype,"rowData");s([n({type:Object})],r.prototype,"column");s([n({type:Number})],r.prototype,"rowIndex");s([n({type:String})],r.prototype,"categoryHeaderId");export{r as TableCellBase};
@@ -1,4 +1,4 @@
1
- import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as f,html as o}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as v}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as $}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{customElement as T}from"../../../utils/decorators/custom-element-decorator.js";import{msg as u}from"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as x}from"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{NjcTable as _}from"../table.js";import{formatTableTextValue as P}from"../table-format-utils.js";import R from"../../../packages/web-components/src/components/table/gator/table.gator.scss.js";import O from"../../../packages/styles/dist/tokens/primitive.tokens.css.js";import E from"../../../packages/styles/dist/tokens/semantic.tokens.css.js";import"./table-bulk-controls/table-bulk-controls.gator.js";import"./table-cells/table-cell-chip.gator.js";import"./table-cells/table-cell-avatar.gator.js";import"./table-cells/table-cell-checkbox.gator.js";import"./table-cells/table-cell-text-link.gator.js";import"./table-cells/table-cell-button.gator.js";import"./table-cells/table-cell-icon-button.gator.js";import"./table-cells/table-cell-input-dropdown.gator.js";import"./table-cells/table-cell-input-text.gator.js";import"./table-cells/table-cell-text.gator.js";import"../../checkbox/checkbox.gator.js";import"../../icon/gator/icon.gator.js";import"../../icon/gator/templates/index.js";import"../../icon-button/gator/icon-button.gator.js";import"../../popover/gator/popover.gator.js";import"../../checkbox-group/checkbox-group.gator.js";import"../../radio-group/radio-group.gator.js";import"../../button/gator/button.gator.js";import"../../chip/gator/chip.gator.js";import"../../input/gator/input-search/input-search.gator.js";import"../../skip-link/gator/base/skip-link.gator.js";import"../../illustration/gator/illustration.gator.js";import"../../illustration/gator/templates/index.js";import"../../card/gator/base/card.gator.js";import{unsafeCSS as k}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var A=Object.defineProperty,B=Object.getOwnPropertyDescriptor,g=(e,t,l,i)=>{for(var s=i>1?void 0:i?B(t,l):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(i?a(t,l,s):a(s))||s);return i&&s&&A(t,l,s),s};const y=5,V=60;let h=class extends _{constructor(){super(...arguments),this.elevated=!1,this.includePagination=!1,this.includePageSelection=!1,this.skeleton=!1,this.sortField=null,this.sortDirection=null,this.filterValues={},this.selectedRows=[],this._currentPage=1,this._sortField=null,this._sortDirection=null,this._hoveredHeaderColumnField=null,this._pendingFilterValues={},this._filterSearchQuery={},this._visibleFilterChipCount=y,this.previousFilterOptionsScrollTop=0,this._filterChipResizeObserver=new ResizeObserver(()=>this.calculateFilterChipOverflow()),this.renderHeaderFilterPopover=(e,t,l=!1)=>{const i=e.filterOptions??[],s=(this._filterSearchQuery[e.field]??"").toLowerCase(),r=s?i.filter(p=>p.label.toLowerCase().includes(s)):i,a=this.hasActiveFilter(e),d=e.filterMultiselect===!0,n=this.getEffectivePending(e),c=r.map(p=>({title:p.label,value:String(p.value)})),b=d?n.join(";"):"",m=d?"":n||"";return o`
1
+ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as f,html as o}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as v}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as $}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{customElement as T}from"../../../utils/decorators/custom-element-decorator.js";import{msg as u}from"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as x}from"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{NjcTable as _}from"../table.js";import{formatTableTextValue as P}from"../table-format-utils.js";import R from"../../../packages/web-components/src/components/table/gator/table.gator.scss.js";import E from"../../../packages/styles/dist/tokens/primitive.tokens.css.js";import O from"../../../packages/styles/dist/tokens/semantic.tokens.css.js";import"./table-bulk-controls/table-bulk-controls.gator.js";import"./table-cells/table-cell-chip.gator.js";import"./table-cells/table-cell-avatar.gator.js";import"./table-cells/table-cell-checkbox.gator.js";import"./table-cells/table-cell-text-link.gator.js";import"./table-cells/table-cell-button.gator.js";import"./table-cells/table-cell-icon-button.gator.js";import"./table-cells/table-cell-input-dropdown.gator.js";import"./table-cells/table-cell-input-text.gator.js";import"./table-cells/table-cell-text.gator.js";import"../../checkbox/checkbox.gator.js";import"../../icon/gator/icon.gator.js";import"../../icon/gator/templates/index.js";import"../../icon-button/gator/icon-button.gator.js";import"../../popover/gator/popover.gator.js";import"../../checkbox-group/checkbox-group.gator.js";import"../../radio-group/radio-group.gator.js";import"../../button/gator/button.gator.js";import"../../chip/gator/chip.gator.js";import"../../input/gator/input-search/input-search.gator.js";import"../../skip-link/gator/base/skip-link.gator.js";import"../../illustration/gator/illustration.gator.js";import"../../illustration/gator/templates/index.js";import"../../card/gator/base/card.gator.js";import{unsafeCSS as y}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var A=Object.defineProperty,B=Object.getOwnPropertyDescriptor,g=(e,t,l,i)=>{for(var s=i>1?void 0:i?B(t,l):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(s=(i?a(t,l,s):a(s))||s);return i&&s&&A(t,l,s),s};const k=5,V=60;let h=class extends _{constructor(){super(...arguments),this.elevated=!1,this.includePagination=!1,this.includePageSelection=!1,this.skeleton=!1,this.sortField=null,this.sortDirection=null,this.filterValues={},this.selectedRows=[],this._currentPage=1,this._sortField=null,this._sortDirection=null,this._hoveredHeaderColumnField=null,this._pendingFilterValues={},this._filterSearchQuery={},this._visibleFilterChipCount=k,this.previousFilterOptionsScrollTop=0,this._filterChipResizeObserver=new ResizeObserver(()=>this.calculateFilterChipOverflow()),this.renderHeaderFilterPopover=(e,t,l=!1)=>{const i=e.filterOptions??[],s=(this._filterSearchQuery[e.field]??"").toLowerCase(),r=s?i.filter(p=>p.label.toLowerCase().includes(s)):i,a=this.hasActiveFilter(e),d=e.filterMultiselect===!0,n=this.getEffectivePending(e),c=r.map(p=>({title:p.label,value:String(p.value)})),b=d?n.join(";"):"",m=d?"":n||"";return o`
2
2
  <span class="gator-table-header-filter-trigger-wrap ${t?"gator-table-header-filter-trigger-visible":""}">
3
3
  <ngc-icon-button
4
4
  id="filter-trigger-${e.field}"
@@ -16,7 +16,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
16
16
  @closed="${()=>this.handleFilterPopoverClosed(e)}"
17
17
  >
18
18
  <div slot="content" class="gator-table-filter-popover-content">
19
- ${i.length>10?o`
19
+ ${i.length>10||e.alwaysShowSearchBar?o`
20
20
  <ngc-input-search
21
21
  placeholder="${u("Search")}"
22
22
  .value="${this._filterSearchQuery[e.field]??""}"
@@ -134,7 +134,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
134
134
  @itemsperpagechanged="${this.handleItemsPerPageChanged}"
135
135
  ></ngc-table-pagination>
136
136
  `:f}
137
- `}calculateFilterChipOverflow(){const e=this.renderRoot.querySelector(".gator-table-filter-chips");if(!e)return;const t=[...e.querySelectorAll(".gator-table-filter-chip, .gator-table-filter-chips-popover-content ngc-chip")].slice(0,y),l=parseFloat(getComputedStyle(e).columnGap)||0,i=e.querySelector(".gator-table-filter-chips-clear-all")?.getBoundingClientRect().width??0,s=t.reduce((n,c)=>n+c.getBoundingClientRect().width+l,i);let r=V+i+l*2;const a=t.findIndex(n=>(r+=n.getBoundingClientRect().width+l)>e.clientWidth),d=this.getActiveFilterChips().length<=y&&s<=e.clientWidth?t.length:Math.max(1,a<0?t.length:a);this._visibleFilterChipCount!==d&&(this._visibleFilterChipCount=d)}renderEmptyStateIllustrationActions(e){return e?o`
137
+ `}calculateFilterChipOverflow(){const e=this.renderRoot.querySelector(".gator-table-filter-chips");if(!e)return;const t=[...e.querySelectorAll(".gator-table-filter-chip, .gator-table-filter-chips-popover-content ngc-chip")].slice(0,k),l=parseFloat(getComputedStyle(e).columnGap)||0,i=e.querySelector(".gator-table-filter-chips-clear-all")?.getBoundingClientRect().width??0,s=t.reduce((n,c)=>n+c.getBoundingClientRect().width+l,i);let r=V+i+l*2;const a=t.findIndex(n=>(r+=n.getBoundingClientRect().width+l)>e.clientWidth),d=this.getActiveFilterChips().length<=k&&s<=e.clientWidth?t.length:Math.max(1,a<0?t.length:a);this._visibleFilterChipCount!==d&&(this._visibleFilterChipCount=d)}renderEmptyStateIllustrationActions(e){return e?o`
138
138
  <ngc-button @click="${this.handleClearAllFilters}">${u("Clear filters")}</ngc-button>
139
139
  `:o`<slot name="empty-state-actions"></slot>`}handlePageChanged(e){this._currentPage=e.detail.page}handleItemsPerPageChanged(e){this.itemsPerPage=e.detail.itemsPerPage}getTableHeader(e){const t=e.map((l,i)=>this.getTableHeaderColumn(l,i===0));return!this.skeleton&&this.selectable&&t.unshift(o`
140
140
  <th id="col-select" scope="col">
@@ -187,7 +187,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
187
187
  >
188
188
  ${S}
189
189
  </th>
190
- `}getEffectivePending(e){const t=this._pendingFilterValues[e.field];return t!==void 0?t:this.filterValues[e.field]??(e.filterMultiselect===!0?[]:"")}getFilterPopoverForColumn(e){return this.shadowRoot?.querySelector(`ngc-popover[reference-id="filter-trigger-${e.field}"]`)??null}isFilterPopoverOpen(e){return this.getFilterPopoverForColumn(e)?.isOpen===!0}handleFilterPopoverClosed(e){this.previousFilterOptionsScrollTop=0,this._filterSearchQuery={...this._filterSearchQuery,[e.field]:""}}handleFilterSearchInput(e,t){const l=e.detail?.value??"";this.previousFilterOptionsScrollTop=0,this._filterSearchQuery={...this._filterSearchQuery,[t.field]:l},this.dispatchEvent(new CustomEvent("filteroptionssearch",{bubbles:!0,composed:!0,detail:{field:t.field,value:l}})),this.requestUpdate()}handleFilterCheckboxGroupChange(e,t){const l=e.detail??"",i=l?l.split(";").filter(Boolean):[];this._pendingFilterValues={...this._pendingFilterValues,[t.field]:i},this.requestUpdate()}handleFilterRadioGroupChange(e,t){const l=e.detail??"";this._pendingFilterValues={...this._pendingFilterValues,[t.field]:l},this.requestUpdate()}handleFilterPopoverApply(e){const t=this.getEffectivePending(e);this.dispatchEvent(new CustomEvent("filter",{bubbles:!0,composed:!0,detail:{field:e.field,value:t}}));const l={...this._pendingFilterValues};delete l[e.field],this._pendingFilterValues=l,this.getFilterPopoverForColumn(e)?.hidePopover?.(),this.requestUpdate()}handleFilterPopoverClear(e){const l=e.filterMultiselect===!0?[]:"";this.dispatchEvent(new CustomEvent("filter",{bubbles:!0,composed:!0,detail:{field:e.field,value:l}}));const i={...this._pendingFilterValues};delete i[e.field],this._pendingFilterValues=i,this.getFilterPopoverForColumn(e)?.hidePopover?.(),this.requestUpdate()}hasActiveFilter(e){const t=this.filterValues[e.field];return t==null?!1:e.filterMultiselect===!0?t.length>0:t!==""}getActiveFilterChips(){if(!this.columns?.length||!this.filterValues)return[];const e=[],t=l=>l.filterOptions??[];for(const l of this.columns){if(!l.filterable||t(l).length===0)continue;const i=this.filterValues[l.field];if(i==null)continue;if(l.filterMultiselect===!0){const r=i;for(const a of r){const d=t(l).find(n=>String(n.value)===a);e.push({column:l,value:a,label:d?.label??a})}}else{const r=i;if(r==="")continue;const a=t(l).find(d=>String(d.value)===r);e.push({column:l,value:r,label:a?.label??r})}}return e}handleFilterChipDismiss(e,t){const l=e.filterMultiselect===!0,i=this.filterValues[e.field],s=l?(i||[]).filter(r=>r!==t):"";this.dispatchEvent(new CustomEvent("filter",{bubbles:!0,composed:!0,detail:{field:e.field,value:s}})),this.requestUpdate()}onFilterOptionsScroll(e,t){const l=e.target,i=l.scrollTop>this.previousFilterOptionsScrollTop,s=Math.floor(l.scrollHeight-l.scrollTop)===l.clientHeight;this.previousFilterOptionsScrollTop=l.scrollTop,i&&s&&this.dispatchEvent(new CustomEvent("filteroptionsreachedbottom",{bubbles:!0,composed:!0,detail:{field:t.field}}))}getTableBody(e,t){const l=[];let i={rows:[]};return t.forEach(s=>{s.isTableHeader?((i.rows.length>0||i.header)&&l.push(i),i={header:s,rows:[]}):i.rows.push(s)}),(i.rows.length>0||i.header)&&l.push(i),l.length===0&&t.length>0&&l.push({rows:t}),o`
190
+ `}getEffectivePending(e){const t=this._pendingFilterValues[e.field];return t!==void 0?t:this.filterValues[e.field]??(e.filterMultiselect===!0?[]:"")}getFilterPopoverForColumn(e){return this.shadowRoot?.querySelector(`ngc-popover[reference-id="filter-trigger-${e.field}"]`)??null}isFilterPopoverOpen(e){return this.getFilterPopoverForColumn(e)?.isOpen===!0}handleFilterPopoverClosed(e){this.previousFilterOptionsScrollTop=0,this._filterSearchQuery={...this._filterSearchQuery,[e.field]:""},this.dispatchEvent(new CustomEvent("filteroptionsclosed",{bubbles:!0,composed:!0,detail:{field:e.field}}))}handleFilterSearchInput(e,t){const l=e.detail?.value??"";this.previousFilterOptionsScrollTop=0,this._filterSearchQuery={...this._filterSearchQuery,[t.field]:l},this.dispatchEvent(new CustomEvent("filteroptionssearch",{bubbles:!0,composed:!0,detail:{field:t.field,value:l}})),this.requestUpdate()}handleFilterCheckboxGroupChange(e,t){const l=e.detail??"",i=l?l.split(";").filter(Boolean):[];this._pendingFilterValues={...this._pendingFilterValues,[t.field]:i},this.requestUpdate()}handleFilterRadioGroupChange(e,t){const l=e.detail??"";this._pendingFilterValues={...this._pendingFilterValues,[t.field]:l},this.requestUpdate()}handleFilterPopoverApply(e){const t=this.getEffectivePending(e);this.dispatchEvent(new CustomEvent("filter",{bubbles:!0,composed:!0,detail:{field:e.field,value:t}}));const l={...this._pendingFilterValues};delete l[e.field],this._pendingFilterValues=l,this.getFilterPopoverForColumn(e)?.hidePopover?.(),this.requestUpdate()}handleFilterPopoverClear(e){const l=e.filterMultiselect===!0?[]:"";this.dispatchEvent(new CustomEvent("filter",{bubbles:!0,composed:!0,detail:{field:e.field,value:l}}));const i={...this._pendingFilterValues};delete i[e.field],this._pendingFilterValues=i,this.getFilterPopoverForColumn(e)?.hidePopover?.(),this.requestUpdate()}hasActiveFilter(e){const t=this.filterValues[e.field];return t==null?!1:e.filterMultiselect===!0?t.length>0:t!==""}getActiveFilterChips(){if(!this.columns?.length||!this.filterValues)return[];const e=[],t=l=>l.filterOptions??[];for(const l of this.columns){if(!l.filterable||t(l).length===0)continue;const i=this.filterValues[l.field];if(i==null)continue;if(l.filterMultiselect===!0){const r=i;for(const a of r){const d=t(l).find(n=>String(n.value)===a);e.push({column:l,value:a,label:d?.label??a})}}else{const r=i;if(r==="")continue;const a=t(l).find(d=>String(d.value)===r);e.push({column:l,value:r,label:a?.label??r})}}return e}handleFilterChipDismiss(e,t){const l=e.filterMultiselect===!0,i=this.filterValues[e.field],s=l?(i||[]).filter(r=>r!==t):"";this.dispatchEvent(new CustomEvent("filter",{bubbles:!0,composed:!0,detail:{field:e.field,value:s}})),this.requestUpdate()}onFilterOptionsScroll(e,t){const l=e.target,i=l.scrollTop>this.previousFilterOptionsScrollTop,s=Math.floor(l.scrollHeight-l.scrollTop)===l.clientHeight;this.previousFilterOptionsScrollTop=l.scrollTop,i&&s&&this.dispatchEvent(new CustomEvent("filteroptionsreachedbottom",{bubbles:!0,composed:!0,detail:{field:t.field}}))}getTableBody(e,t){const l=[];let i={rows:[]};return t.forEach(s=>{s.isTableHeader?((i.rows.length>0||i.header)&&l.push(i),i={header:s,rows:[]}):i.rows.push(s)}),(i.rows.length>0||i.header)&&l.push(i),l.length===0&&t.length>0&&l.push({rows:t}),o`
191
191
  ${l.map(s=>this.getCategoryBody(s,e))}
192
192
  `}getCategoryBody(e,t){let l="",i="",s="";e.header&&(l=e.header.headerText||e.header.categoryText||e.header.name||"Category",s=`category-${l.toLowerCase().replace(/\s+/g,"-")}`,i=s);const r=e.header?this.getTableHeaderRow(t,e.header):"",a=e.rows.map(c=>this.getTableBodyRow(c,t,s,this.data.indexOf(c))),d=t.some(c=>c.includedInTotals===!0),n=e.rows.length>0&&d?this.getTotalRow(e.rows,t,s):"";return o`
193
193
  <tbody role="rowgroup" ${i?o`aria-labelledby="${i}"`:""}>
@@ -259,4 +259,4 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
259
259
  >
260
260
  ${c}
261
261
  </td>
262
- `}getCellAlignClass(e){return`gator-table-cell-${e.cellConfig?.align??"left"}`}renderCellByType(e,t,l,i){const s=a=>this.handleCellChange(a),r=a=>this.handleCellClick(a);switch(t.cellType){case"chip":return o`<ngc-table-cell-chip .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-chip>`;case"avatar":return o`<ngc-table-cell-avatar .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-avatar>`;case"checkbox":return o`<ngc-table-cell-checkbox .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-checkbox>`;case"text-link":return o`<ngc-table-cell-text-link .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-text-link>`;case"button":return o`<ngc-table-cell-button .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-button>`;case"icon-button":return o`<ngc-table-cell-icon-button .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-icon-button>`;case"input-dropdown":return o`<ngc-table-cell-input-dropdown .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-input-dropdown>`;case"input-text":return o`<ngc-table-cell-input-text .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-input-text>`;default:return o`<ngc-table-cell-text .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-text>`}}handleCellChange(e){e.stopPropagation();const{rowIndex:t,field:l,value:i}=e.detail??{};this.dispatchEvent(new CustomEvent("cellchange",{bubbles:!0,composed:!0,detail:{rowIndex:t,field:l,value:i}}))}handleCellClick(e){e.stopPropagation();const{rowIndex:t,field:l,value:i}=e.detail??{};this.dispatchEvent(new CustomEvent("cellclick",{bubbles:!0,composed:!0,detail:{rowIndex:t,field:l,...i!==void 0&&{value:i}}}))}};h.styles=[k(E),k(O),k(R)];g([v({type:Boolean})],h.prototype,"elevated",2);g([v({type:Boolean,attribute:"include-pagination"})],h.prototype,"includePagination",2);g([v({type:Boolean,attribute:"include-page-selection"})],h.prototype,"includePageSelection",2);g([v({type:Boolean})],h.prototype,"skeleton",2);g([v({type:String,attribute:"sort-field"})],h.prototype,"sortField",2);g([v({type:String,attribute:"sort-direction"})],h.prototype,"sortDirection",2);g([v({type:Object,attribute:!1})],h.prototype,"filterValues",2);g([$()],h.prototype,"selectedRows",2);g([$()],h.prototype,"_currentPage",2);g([$()],h.prototype,"_sortField",2);g([$()],h.prototype,"_sortDirection",2);g([$()],h.prototype,"_hoveredHeaderColumnField",2);g([$()],h.prototype,"_pendingFilterValues",2);g([$()],h.prototype,"_filterSearchQuery",2);g([$()],h.prototype,"_visibleFilterChipCount",2);h=g([T("ngc-table"),x()],h);export{h as NgcTable};
262
+ `}getCellAlignClass(e){return`gator-table-cell-${e.cellConfig?.align??"left"}`}renderCellByType(e,t,l,i){const s=a=>this.handleCellChange(a),r=a=>this.handleCellClick(a);switch(t.cellType){case"chip":return o`<ngc-table-cell-chip .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-chip>`;case"avatar":return o`<ngc-table-cell-avatar .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-avatar>`;case"checkbox":return o`<ngc-table-cell-checkbox .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-checkbox>`;case"text-link":return o`<ngc-table-cell-text-link .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-text-link>`;case"button":return o`<ngc-table-cell-button .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-button>`;case"icon-button":return o`<ngc-table-cell-icon-button .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-icon-button>`;case"input-dropdown":return o`<ngc-table-cell-input-dropdown .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-input-dropdown>`;case"input-text":return o`<ngc-table-cell-input-text .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-input-text>`;default:return o`<ngc-table-cell-text .rowData="${e}" .column="${t}" .rowIndex="${l}" .categoryHeaderId="${i}" @cellchange="${s}" @cellclick="${r}"></ngc-table-cell-text>`}}handleCellChange(e){e.stopPropagation();const{rowIndex:t,field:l,value:i}=e.detail??{};this.dispatchEvent(new CustomEvent("cellchange",{bubbles:!0,composed:!0,detail:{rowIndex:t,field:l,value:i}}))}handleCellClick(e){e.stopPropagation();const{rowIndex:t,field:l,value:i}=e.detail??{};this.dispatchEvent(new CustomEvent("cellclick",{bubbles:!0,composed:!0,detail:{rowIndex:t,field:l,...i!==void 0&&{value:i}}}))}};h.styles=[y(O),y(E),y(R)];g([v({type:Boolean})],h.prototype,"elevated",2);g([v({type:Boolean,attribute:"include-pagination"})],h.prototype,"includePagination",2);g([v({type:Boolean,attribute:"include-page-selection"})],h.prototype,"includePageSelection",2);g([v({type:Boolean})],h.prototype,"skeleton",2);g([v({type:String,attribute:"sort-field"})],h.prototype,"sortField",2);g([v({type:String,attribute:"sort-direction"})],h.prototype,"sortDirection",2);g([v({type:Object,attribute:!1})],h.prototype,"filterValues",2);g([$()],h.prototype,"selectedRows",2);g([$()],h.prototype,"_currentPage",2);g([$()],h.prototype,"_sortField",2);g([$()],h.prototype,"_sortDirection",2);g([$()],h.prototype,"_hoveredHeaderColumnField",2);g([$()],h.prototype,"_pendingFilterValues",2);g([$()],h.prototype,"_filterSearchQuery",2);g([$()],h.prototype,"_visibleFilterChipCount",2);h=g([T("ngc-table"),x()],h);export{h as NgcTable};
@@ -1 +1 @@
1
- import{__exports as u}from"../../../../../../_virtual/index8.js";var c;function g(){if(c)return u;c=1;var l=Object.prototype.hasOwnProperty;function n(e,t){var r,i;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((i=e.length)===t.length)for(;i--&&n(e[i],t[i]););return i===-1}if(!r||typeof e=="object"){i=0;for(r in e)if(l.call(e,r)&&++i&&!l.call(t,r)||!(r in t)||!n(e[r],t[r]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}return u.dequal=n,u}export{g as __require};
1
+ import{__exports as u}from"../../../../../../_virtual/index7.js";var c;function g(){if(c)return u;c=1;var l=Object.prototype.hasOwnProperty;function n(e,t){var r,i;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((i=e.length)===t.length)for(;i--&&n(e[i],t[i]););return i===-1}if(!r||typeof e=="object"){i=0;for(r in e)if(l.call(e,r)&&++i&&!l.call(t,r)||!(r in t)||!n(e[r],t[r]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}return u.dequal=n,u}export{g as __require};
@@ -1 +1 @@
1
- import{__module as r}from"../../../../../_virtual/index7.js";import{__require as t}from"./cjs/react-is.production.min.js";var e;function s(){return e?r.exports:(e=1,r.exports=t(),r.exports)}export{s as __require};
1
+ import{__module as r}from"../../../../../_virtual/index8.js";import{__require as t}from"./cjs/react-is.production.min.js";var e;function s(){return e?r.exports:(e=1,r.exports=t(),r.exports)}export{s as __require};
@@ -7,11 +7,13 @@ import { RowData } from '../../../../../components/table/table-cell-config.ts';
7
7
  */
8
8
  export declare abstract class TableCellBase extends LitElement {
9
9
  static styles: import('lit').CSSResult[];
10
+ protected readonly emptyCellValue = "\u2014";
10
11
  protected getAlignClass(): string;
11
12
  rowData: RowData;
12
13
  column: ColumnDefinition;
13
14
  rowIndex: number;
14
15
  categoryHeaderId: string;
16
+ protected cellIsEmpty(value: unknown): boolean;
15
17
  protected getCellValue(): unknown;
16
18
  /** The plain-text value shown for this cell. Overridden by cell types whose rendered content differs from the raw value (e.g. formatted text, cellRenderer output). */
17
19
  protected getDisplayValue(): string;
@@ -19,6 +21,7 @@ export declare abstract class TableCellBase extends LitElement {
19
21
  protected emitCellClick(value?: unknown): void;
20
22
  /** Wraps content with alignment and optional tooltip. Truncated cells fall back to the displayed value as tooltip text so clipped content stays reachable. */
21
23
  protected renderWithTooltip(content: TemplateResult): TemplateResult;
24
+ protected shouldShowEmptyCellValue(column: ColumnDefinition, value: unknown): boolean;
22
25
  abstract renderCellContent(): TemplateResult;
23
26
  render(): TemplateResult;
24
27
  }
@@ -15,6 +15,7 @@ interface BaseColumnDefinition {
15
15
  filterOptions?: TableColumnFilterOption[];
16
16
  filterOptionsLoading?: boolean;
17
17
  filterMultiselect?: boolean;
18
+ alwaysShowSearchBar?: boolean;
18
19
  width?: `${number}px` | `${number}%`;
19
20
  minWidth?: `${number}px` | `${number}%`;
20
21
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/web-components",
3
3
  "author": "nCino",
4
- "version": "16.2.0",
4
+ "version": "16.4.0",
5
5
  "license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org/"
@@ -100,10 +100,10 @@
100
100
  "vite-plugin-static-copy": "^3.3.0",
101
101
  "vitest": "^4.1.10",
102
102
  "yaml-eslint-parser": "^2.1.0",
103
- "@ncino/styles": "16.2.0"
103
+ "@ncino/styles": "16.4.0"
104
104
  },
105
105
  "peerDependencies": {
106
- "@ncino/styles": "16.2.0"
106
+ "@ncino/styles": "16.4.0"
107
107
  },
108
108
  "bugs": {
109
109
  "url": "https://github.com/ncino/force-sdk-web-components/issues"
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@ncino/web-components",
4
- "version": "16.1.1",
4
+ "version": "16.3.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -8238,7 +8238,7 @@
8238
8238
  },
8239
8239
  {
8240
8240
  "name": "ngc-table",
8241
- "description": "Gator data table.\n---\n\n\n### **Events:**\n - **selectall**\n- **sort**\n- **filteroptionssearch**\n- **filter**\n- **filteroptionsreachedbottom**\n- **rowselected**\n- **cellchange**\n- **cellclick**\n\n### **Slots:**\n - **bulk-controls** - Actions shown in the bulk selection toolbar when rows are selected.\n- **empty-state-actions** - Action buttons forwarded into `ngc-illustration`'s default actions slot when no filters are active (e.g. a primary \"Add\" CTA). Not rendered when filters are active; the built-in \"Clear filters\" button is shown in that slot instead.",
8241
+ "description": "Gator data table.\n---\n\n\n### **Events:**\n - **selectall**\n- **sort**\n- **filteroptionsclosed**\n- **filteroptionssearch**\n- **filter**\n- **filteroptionsreachedbottom**\n- **rowselected**\n- **cellchange**\n- **cellclick**\n\n### **Slots:**\n - **bulk-controls** - Actions shown in the bulk selection toolbar when rows are selected.\n- **empty-state-actions** - Action buttons forwarded into `ngc-illustration`'s default actions slot when no filters are active (e.g. a primary \"Add\" CTA). Not rendered when filters are active; the built-in \"Clear filters\" button is shown in that slot instead.",
8242
8242
  "doc-url": "",
8243
8243
  "attributes": [
8244
8244
  {
@@ -8338,6 +8338,7 @@
8338
8338
  "events": [
8339
8339
  { "name": "selectall", "type": "CustomEvent" },
8340
8340
  { "name": "sort", "type": "CustomEvent" },
8341
+ { "name": "filteroptionsclosed", "type": "CustomEvent" },
8341
8342
  { "name": "filteroptionssearch", "type": "CustomEvent" },
8342
8343
  { "name": "filter", "type": "CustomEvent" },
8343
8344
  { "name": "filteroptionsreachedbottom", "type": "CustomEvent" },
@@ -8409,6 +8410,7 @@
8409
8410
  "events": [
8410
8411
  { "name": "selectall", "type": "CustomEvent" },
8411
8412
  { "name": "sort", "type": "CustomEvent" },
8413
+ { "name": "filteroptionsclosed", "type": "CustomEvent" },
8412
8414
  { "name": "filteroptionssearch", "type": "CustomEvent" },
8413
8415
  { "name": "filter", "type": "CustomEvent" },
8414
8416
  { "name": "filteroptionsreachedbottom", "type": "CustomEvent" },