@ncino/web-components 14.0.0 → 14.0.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.
@@ -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 p}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{customElement as c}from"../../../../utils/decorators/custom-element-decorator.js";import{autoUpdate as m,computePosition as f}from"../../../../node_modules/.pnpm/@floating-ui_dom@1.7.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.js";import{ref as l}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/ref.js";import{handleDataTestid as u}from"../../../../utils/datatestid-utils.js";import{NjcMenu as g}from"../menu.js";import w from"../../../../packages/styles/dist/tokens/primitive.tokens.css.js";import _ from"../../../../packages/styles/dist/tokens/semantic.tokens.css.js";import b from"../../../../packages/web-components/src/components/menu/base/gator/menu.gator.scss.js";import"../../menu-item/gator/menu-item.gator.js";import{unsafeCSS as d}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var v=Object.getOwnPropertyDescriptor,A=(t,e,n,i)=>{for(var o=i>1?void 0:i?v(e,n):e,s=t.length-1,r;s>=0;s--)(r=t[s])&&(o=r(o)||o);return o};let h=class extends g{constructor(){super(...arguments),this._dropdownRef=l(),this._wasOpenAtPointerDown=!1,this._handlePopoverToggle=t=>{const e=t.newState==="open";this.open=e,this._button?.setAttribute("aria-expanded",e?"true":"false"),e?this.assignPosition():(this._cleanupAutoUpdate?.(),this._cleanupAutoUpdate=void 0,this._dropdownRef.value?.removeAttribute("data-positioned"))}}render(){return p`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as p}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{customElement as c}from"../../../../utils/decorators/custom-element-decorator.js";import{autoUpdate as m,computePosition as f,flip as _,shift as g}from"../../../../node_modules/.pnpm/@floating-ui_dom@1.7.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.js";import{ref as l}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/ref.js";import{handleDataTestid as h}from"../../../../utils/datatestid-utils.js";import{NjcMenu as w}from"../menu.js";import b from"../../../../packages/styles/dist/tokens/primitive.tokens.css.js";import v from"../../../../packages/styles/dist/tokens/semantic.tokens.css.js";import A from"../../../../packages/web-components/src/components/menu/base/gator/menu.gator.scss.js";import"../../menu-item/gator/menu-item.gator.js";import{unsafeCSS as d}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var y=Object.getOwnPropertyDescriptor,I=(t,e,n,i)=>{for(var o=i>1?void 0:i?y(e,n):e,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(o)||o);return o};let r=class extends w{constructor(){super(...arguments),this._dropdownRef=l(),this._wasOpenAtPointerDown=!1,this._handlePopoverToggle=t=>{const e=t.newState==="open";this.open=e,this._button?.setAttribute("aria-expanded",e?"true":"false"),e?this.assignPosition():(this._cleanupAutoUpdate?.(),this._cleanupAutoUpdate=void 0,this._dropdownRef.value?.removeAttribute("data-positioned"))}}render(){return p`
2
2
  <div class="gator-dropdown-trigger">
3
3
  <slot @slotchange="${this.handleTriggerSlotChange}" name="trigger"></slot>
4
4
  <div
@@ -12,4 +12,4 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@
12
12
  </ul>
13
13
  </div>
14
14
  </div>
15
- `}updated(){const t=this.shadowRoot?.querySelector("[role=menu]");u(t,this.dataTestid,"dropdown");const e=this._dropdownRef.value;if(!e)return;const n=e.matches(":popover-open");this.open&&!n?e.showPopover():!this.open&&n&&e.hidePopover()}disconnectedCallback(){super.disconnectedCallback(),this._cleanupAutoUpdate?.(),this._cleanupAutoUpdate=void 0}_openPopover(){const t=this._dropdownRef.value;!t||t.matches(":popover-open")||(t.showPopover(),this.focusFirstMenuItem())}handleTriggerSlotChange(t){const n=t.target.assignedElements(),i='button, [role="button"]';n.forEach(o=>{const s=o.shadowRoot??o;this._button=s.querySelector(i),this._button||(o.matches(i)?this._button=o:(this._button=s.firstElementChild,this._button||(this._button=o),this._button.role="button")),this._button?.getAttribute("tabindex")||this._button?.setAttribute("tabindex","0"),this._button?.setAttribute("aria-haspopup","true"),this._button?.setAttribute("aria-expanded",this.open?"true":"false"),u(this._button,this.dataTestid,"button"),this._button?.addEventListener("pointerdown",()=>{this._wasOpenAtPointerDown=!!this._dropdownRef.value?.matches(":popover-open")}),this._button?.addEventListener("click",()=>{this._wasOpenAtPointerDown||this._openPopover()});const r=this._button.tagName.toLowerCase()==="button";this._button?.addEventListener("keydown",a=>{(a.key==="ArrowDown"||!r&&(a.key==="Enter"||a.key===" "))&&this._openPopover()})})}focusFirstMenuItem(){setTimeout(()=>{this.menuItems[0]?.focus()})}focusTriggerButton(){requestAnimationFrame(()=>{this._button?.focus()})}handleItemSlotChange(t){const n=t.target.assignedElements();for(let[i,o]of n.entries()){const s=o.tagName.toLowerCase();(s==="ngc-menu-item"||s==="ngc-submenu")&&(o.addEventListener("menuitemclick",()=>{this.handleClose()}),i===0?o.setAttribute("tabindex","0"):o.setAttribute("tabindex","-1"),u(o,this.dataTestid,`menu-item-${i}`))}}handleMenuKeydown(t){t.key==="ArrowDown"||t.key==="ArrowRight"?this.handleArrowDown(t):t.key==="ArrowUp"||t.key==="ArrowLeft"?this.handleArrowUp(t):t.key==="Tab"?this.handleClose():t.key==="Escape"&&(this.handleClose(),this._button?.focus())}handleArrowDown(t){t.preventDefault();const e=this.menuItems;let n=this.activeMenuItemIndex+1;n>e.length-1&&(n=0),e[n].focus()}handleArrowUp(t){t.preventDefault();const e=this.menuItems;let n=this.activeMenuItemIndex-1;n<0&&(n=e.length-1),e[n].focus()}get activeMenuItemIndex(){const t=this.querySelector(":focus-within");return Array.from(this.menuItems).indexOf(t)}get menuItems(){return this.querySelectorAll("ngc-menu-item")}handleClose(){this._dropdownRef.value?.matches(":popover-open")&&this._dropdownRef.value.hidePopover(),this.focusTriggerButton()}assignPosition(){const t=this._button,e=this._dropdownRef.value;!e||!t||(this._cleanupAutoUpdate?.(),this._cleanupAutoUpdate=m(t,e,async()=>{const{x:n,y:i,placement:o}=await f(t,e,{placement:this.placement,strategy:"fixed"}),s=4,r=o.startsWith("bottom")?s:o.startsWith("top")?-s:0;Object.assign(e.style,{left:`${n}px`,top:`${i+r}px`}),e.setAttribute("data-positioned","")}))}};h.styles=[d(b),d(w),d(_)];h=A([c("ngc-menu")],h);export{h as NgcMenu};
15
+ `}updated(){const t=this.shadowRoot?.querySelector("[role=menu]");h(t,this.dataTestid,"dropdown");const e=this._dropdownRef.value;if(!e)return;const n=e.matches(":popover-open");this.open&&!n?(this._closeOtherMenus(),e.showPopover()):!this.open&&n&&e.hidePopover()}connectedCallback(){super.connectedCallback(),r._instances.add(this)}disconnectedCallback(){r._instances.delete(this),super.disconnectedCallback(),this._cleanupAutoUpdate?.(),this._cleanupAutoUpdate=void 0}_openPopover(){const t=this._dropdownRef.value;!t||t.matches(":popover-open")||(this._closeOtherMenus(),t.showPopover(),this.focusFirstMenuItem())}_closeOtherMenus(){for(const t of r._instances)t!==this&&t._hidePopover()}_hidePopover(){this._dropdownRef.value?.matches(":popover-open")&&this._dropdownRef.value.hidePopover()}handleTriggerSlotChange(t){const n=t.target.assignedElements(),i='button, [role="button"]';n.forEach(o=>{const s=o.shadowRoot??o;this._button=s.querySelector(i),this._button||(o.matches(i)?this._button=o:(this._button=s.firstElementChild,this._button||(this._button=o),this._button.role="button")),this._button?.getAttribute("tabindex")||this._button?.setAttribute("tabindex","0"),this._button?.setAttribute("aria-haspopup","true"),this._button?.setAttribute("aria-expanded",this.open?"true":"false"),h(this._button,this.dataTestid,"button"),this._button?.addEventListener("pointerdown",()=>{this._wasOpenAtPointerDown=!!this._dropdownRef.value?.matches(":popover-open")}),this._button?.addEventListener("click",()=>{this._wasOpenAtPointerDown||this._openPopover()});const a=this._button.tagName.toLowerCase()==="button";this._button?.addEventListener("keydown",u=>{(u.key==="ArrowDown"||!a&&(u.key==="Enter"||u.key===" "))&&this._openPopover()})})}focusMenuItem(t){t?.focus({preventScroll:!0})}focusFirstMenuItem(){setTimeout(()=>{this.focusMenuItem(this.menuItems[0])})}focusTriggerButton(){requestAnimationFrame(()=>{this._button?.focus({preventScroll:!0})})}handleItemSlotChange(t){const n=t.target.assignedElements();for(let[i,o]of n.entries()){const s=o.tagName.toLowerCase();(s==="ngc-menu-item"||s==="ngc-submenu")&&(o.addEventListener("menuitemclick",()=>{this.handleClose()}),i===0?o.setAttribute("tabindex","0"):o.setAttribute("tabindex","-1"),h(o,this.dataTestid,`menu-item-${i}`))}}handleMenuKeydown(t){t.key==="ArrowDown"||t.key==="ArrowRight"?this.handleArrowDown(t):t.key==="ArrowUp"||t.key==="ArrowLeft"?this.handleArrowUp(t):t.key==="Tab"?this.handleClose():t.key==="Escape"&&(this.handleClose(),this._button?.focus())}handleArrowDown(t){t.preventDefault();const e=this.menuItems;let n=this.activeMenuItemIndex+1;n>e.length-1&&(n=0),this.focusMenuItem(e[n])}handleArrowUp(t){t.preventDefault();const e=this.menuItems;let n=this.activeMenuItemIndex-1;n<0&&(n=e.length-1),this.focusMenuItem(e[n])}get activeMenuItemIndex(){const t=this.querySelector(":focus-within");return Array.from(this.menuItems).indexOf(t)}get menuItems(){return this.querySelectorAll("ngc-menu-item")}handleClose(){this._hidePopover(),this.focusTriggerButton()}assignPosition(){const t=this._button,e=this._dropdownRef.value;!e||!t||(this._cleanupAutoUpdate?.(),this._cleanupAutoUpdate=m(t,e,async()=>{const{x:n,y:i,placement:o}=await f(t,e,{placement:this.placement,strategy:"fixed",middleware:[_({padding:8}),g({padding:8})]}),s=4,a=o.startsWith("bottom")?s:o.startsWith("top")?-s:0;Object.assign(e.style,{left:`${n}px`,top:`${i+a}px`}),e.setAttribute("data-positioned","")}))}};r._instances=new Set;r.styles=[d(A),d(b),d(v)];r=I([c("ngc-menu")],r);export{r as NgcMenu};
@@ -9,4 +9,4 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@
9
9
  role="presentation"
10
10
  faux-focus
11
11
  ></ngc-list-item>
12
- `}focus(){this.shadowRoot?.querySelector("ngc-list-item")?.focus()}click(){this.shadowRoot?.querySelector("ngc-list-item")?.click()}handleKeydown(e){(e.key===n.SPACE||e.key===n.ENTER)&&(this.handleItemKeydown(e),this.shadowRoot?.querySelector("ngc-list-item")?.click())}};s=d([a("ngc-menu-item")],s);export{s as NgcMenuItem};
12
+ `}focus(e){this.shadowRoot?.querySelector("ngc-list-item")?.focus(e)}click(){this.shadowRoot?.querySelector("ngc-list-item")?.click()}handleKeydown(e){(e.key===n.SPACE||e.key===n.ENTER)&&(this.handleItemKeydown(e),this.shadowRoot?.querySelector("ngc-list-item")?.click())}};s=d([a("ngc-menu-item")],s);export{s as NgcMenuItem};
@@ -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 g,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 m}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 F}from"../../../utils/decorators/custom-element-decorator.js";import{msg as h}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 T}from"../table.js";import{formatTableTextValue as P}from"../table-format-utils.js";import _ from"../../../packages/web-components/src/components/table/gator/table.gator.scss.js";import R from"../../../packages/styles/dist/tokens/primitive.tokens.css.js";import A 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 E=Object.defineProperty,V=Object.getOwnPropertyDescriptor,p=(e,t,l,i)=>{for(var s=i>1?void 0:i?V(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&&E(t,l,s),s};let u=class extends T{constructor(){super(...arguments),this.elevated=!1,this.includePagination=!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.renderHeaderFilterPopover=(e,t,l=!1)=>{const i=e.filterOptions??[],s=(this._filterSearchQuery[e.field]??"").toLowerCase(),r=s?i.filter(f=>f.label.toLowerCase().includes(s)):i,a=this.hasActiveFilter(e),c=e.filterMultiselect===!0,n=this.getEffectivePending(e),d=r.map(f=>({title:f.label,value:String(f.value)})),b=c?n.join(";"):"",v=c?"":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 g,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 m}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 F}from"../../../utils/decorators/custom-element-decorator.js";import{msg as h}from"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as T}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 x}from"../table.js";import{formatTableTextValue as P}from"../table-format-utils.js";import _ from"../../../packages/web-components/src/components/table/gator/table.gator.scss.js";import R from"../../../packages/styles/dist/tokens/primitive.tokens.css.js";import A 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 B=Object.defineProperty,E=Object.getOwnPropertyDescriptor,u=(e,t,l,i)=>{for(var s=i>1?void 0:i?E(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&&B(t,l,s),s};let p=class extends x{constructor(){super(...arguments),this.elevated=!1,this.includePagination=!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.renderHeaderFilterPopover=(e,t,l=!1)=>{const i=e.filterOptions??[],s=(this._filterSearchQuery[e.field]??"").toLowerCase(),r=s?i.filter(f=>f.label.toLowerCase().includes(s)):i,a=this.hasActiveFilter(e),c=e.filterMultiselect===!0,n=this.getEffectivePending(e),d=r.map(f=>({title:f.label,value:String(f.value)})),b=c?n.join(";"):"",v=c?"":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}"
@@ -46,7 +46,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
46
46
  </div>
47
47
  </ngc-popover>
48
48
  </span>
49
- `},this.handleClearAllFilters=()=>{if(!this.columns?.length||!this.filterValues)return;const e=t=>t.filterOptions??[];for(const t of this.columns){if(!t.filterable||e(t).length===0)continue;const l=this.filterValues[t.field];if(l==null)continue;if(t.filterMultiselect===!0?l.length>0:l!==""){const s=t.filterMultiselect===!0?[]:"";this.dispatchEvent(new CustomEvent("filter",{bubbles:!0,composed:!0,detail:{field:t.field,value:s}}))}}this.requestUpdate()}}updated(e){super.updated(e),e.has("data")&&queueMicrotask(()=>{this.selectedRows=this.data.filter(t=>t.selected&&!t.isTableHeader)})}render(){if(!this.skeleton&&!this.columns)return null;const e=this.skeleton?this._skeletonLoaderColumns:this.columns;return this.renderWrapper(this.getTableHeader(e),this.getTableBody(e,this.displayedRowData))}getColumnCellStyle(e){const t=e.width??(e.cellType==="icon-button"?"5%":void 0);return t?`width: ${t}; box-sizing: border-box`:""}get _skeletonLoaderColumns(){const e=this.columns?.length||6;let t=[];for(let l=0;l<e;l++)t=t.concat({field:`skeleton-loader-${l}`,name:`skeleton-loader-${l}`});return t}get tableElevatedClass(){return this.elevated?"gator-table-elevated":""}get showBulkControls(){return this.selectable&&this.selectedRows.length>0}renderWrapper(e,t){const l=this.getActiveFilterChips(),i=l.length>0,s=i?h("No data matches the current filters."):h("Start by adding some data.");return o`
49
+ `},this.handleClearAllFilters=()=>{if(!this.columns?.length||!this.filterValues)return;const e=t=>t.filterOptions??[];for(const t of this.columns){if(!t.filterable||e(t).length===0)continue;const l=this.filterValues[t.field];if(l==null)continue;if(t.filterMultiselect===!0?l.length>0:l!==""){const s=t.filterMultiselect===!0?[]:"";this.dispatchEvent(new CustomEvent("filter",{bubbles:!0,composed:!0,detail:{field:t.field,value:s}}))}}this.requestUpdate()}}updated(e){super.updated(e),e.has("data")&&queueMicrotask(()=>{this.selectedRows=this.data.filter(t=>t.selected&&!t.isTableHeader)})}render(){if(!this.skeleton&&!this.columns)return null;const e=this.skeleton?this._skeletonLoaderColumns:this.columns;return this.renderWrapper(this.getTableHeader(e),this.getTableBody(e,this.displayedRowData))}getColumnCellStyle(e){const t=e.width??(e.cellType==="icon-button"?"5%":void 0);return t?`width: ${t}; box-sizing: border-box`:""}get _skeletonLoaderColumns(){const e=this.columns?.length||6;let t=[];for(let l=0;l<e;l++)t=t.concat({field:`skeleton-loader-${l}`,name:`skeleton-loader-${l}`});return t}get tableElevatedClass(){return this.elevated?"gator-table-elevated":""}get showBulkControls(){return this.selectable&&this.selectedRows.length>0}renderWrapper(e,t){const l=this.getActiveFilterChips(),i=l.length>0,s=this.emptyStateTitle||h("No results found"),r=i?this.emptyStateBodyFiltered||h("No data matches the current filters."):this.emptyStateBody||h("Start by adding some data."),a=this.emptyStateIllustration||"empty-box";return o`
50
50
  <ngc-table-bulk-controls
51
51
  ?visible="${this.showBulkControls}"
52
52
  .selectedRows="${this.selectedRows.length}"
@@ -56,12 +56,12 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
56
56
  </ngc-table-bulk-controls>
57
57
  ${!this.skeleton&&i?o`
58
58
  <div class="gator-table-filter-chips" role="region" aria-label="${h("Active filters")}">
59
- ${l.map(({column:r,value:a,label:c})=>o`
59
+ ${l.map(({column:c,value:n,label:d})=>o`
60
60
  <ngc-chip
61
61
  dismissible
62
62
  size="small"
63
- @dismiss="${()=>this.handleFilterChipDismiss(r,a)}"
64
- >${r.name}: ${c}</ngc-chip>
63
+ @dismiss="${()=>this.handleFilterChipDismiss(c,n)}"
64
+ >${c.name}: ${d}</ngc-chip>
65
65
  `)}
66
66
  ${l.length>1?o`
67
67
  <button
@@ -76,9 +76,9 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
76
76
  <ngc-card class="gator-table-empty-state-card">
77
77
  <div class="gator-table-empty-state">
78
78
  <ngc-illustration
79
- name="empty-box"
80
- title-text="${h("No results found")}"
81
- .bodyText="${s}"
79
+ name="${a}"
80
+ title-text="${s}"
81
+ .bodyText="${r}"
82
82
  size="medium"
83
83
  >
84
84
  ${i?o`<ngc-button @click="${this.handleClearAllFilters}">${h("Clear filters")}</ngc-button>`:g}
@@ -143,13 +143,13 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
143
143
  ${v}
144
144
  ${a?this.renderHeaderFilterPopover(e,f,t):g}
145
145
  </div>
146
- `,w=[n?"gator-table-header-cell-sort-active":"",d?"gator-table-header-cell-filter-active":"",b?"gator-table-header-cell-interactive":""].filter(Boolean).join(" "),S=this.getColumnCellStyle(e);return o`
146
+ `,S=[n?"gator-table-header-cell-sort-active":"",d?"gator-table-header-cell-filter-active":"",b?"gator-table-header-cell-interactive":""].filter(Boolean).join(" "),w=this.getColumnCellStyle(e);return o`
147
147
  <th
148
148
  id="${s}"
149
149
  scope="col"
150
150
  aria-sort="${c??g}"
151
- class="${w}"
152
- style="${S||g}"
151
+ class="${S}"
152
+ style="${w||g}"
153
153
  @mouseenter="${a||r?()=>this._hoveredHeaderColumnField=e.field:g}"
154
154
  @mouseleave="${a||r?()=>this._hoveredHeaderColumnField=null:g}"
155
155
  >
@@ -227,4 +227,4 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
227
227
  >
228
228
  ${d}
229
229
  </td>
230
- `}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}}}))}};u.styles=[k(A),k(R),k(_)];p([m({type:Boolean})],u.prototype,"elevated",2);p([m({type:Boolean,attribute:"include-pagination"})],u.prototype,"includePagination",2);p([m({type:Boolean})],u.prototype,"skeleton",2);p([m({type:String,attribute:"sort-field"})],u.prototype,"sortField",2);p([m({type:String,attribute:"sort-direction"})],u.prototype,"sortDirection",2);p([m({type:Object,attribute:!1})],u.prototype,"filterValues",2);p([$()],u.prototype,"selectedRows",2);p([$()],u.prototype,"_currentPage",2);p([$()],u.prototype,"_sortField",2);p([$()],u.prototype,"_sortDirection",2);p([$()],u.prototype,"_hoveredHeaderColumnField",2);p([$()],u.prototype,"_pendingFilterValues",2);p([$()],u.prototype,"_filterSearchQuery",2);u=p([F("ngc-table"),x()],u);export{u as NgcTable};
230
+ `}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}}}))}};p.styles=[k(A),k(R),k(_)];u([m({type:Boolean})],p.prototype,"elevated",2);u([m({type:Boolean,attribute:"include-pagination"})],p.prototype,"includePagination",2);u([m({type:Boolean})],p.prototype,"skeleton",2);u([m({type:String,attribute:"sort-field"})],p.prototype,"sortField",2);u([m({type:String,attribute:"sort-direction"})],p.prototype,"sortDirection",2);u([m({type:Object,attribute:!1})],p.prototype,"filterValues",2);u([$()],p.prototype,"selectedRows",2);u([$()],p.prototype,"_currentPage",2);u([$()],p.prototype,"_sortField",2);u([$()],p.prototype,"_sortDirection",2);u([$()],p.prototype,"_hoveredHeaderColumnField",2);u([$()],p.prototype,"_pendingFilterValues",2);u([$()],p.prototype,"_filterSearchQuery",2);p=u([F("ngc-table"),T()],p);export{p as NgcTable};
@@ -1 +1 @@
1
- import{property as t}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{msg as m}from"../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import"../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{TestableLitElement as b}from"../../utils/components/testable-lit-element/testable-lit-element.js";var y=Object.defineProperty,e=(p,s,i,n)=>{for(var a=void 0,o=p.length-1,l;o>=0;o--)(l=p[o])&&(a=l(s,i,a)||a);return a&&y(s,i,a),a};class r extends b{constructor(){super(...arguments),this.columns=[],this.data=[],this.tableAriaLabelledBy=null,this.selectable=!1,this.currentPage=1,this.totalItems=0,this.itemsPerPage=10,this.itemsPerPageOptions=["10","15","20","50","100",m("All")]}}e([t({type:Object})],r.prototype,"columns");e([t({type:Object})],r.prototype,"data");e([t({type:String,attribute:"table-aria-labelledby"})],r.prototype,"tableAriaLabelledBy");e([t({type:Boolean})],r.prototype,"selectable");e([t({type:Number,attribute:"current-page"})],r.prototype,"currentPage");e([t({type:Number,attribute:"total-items"})],r.prototype,"totalItems");e([t({type:Number,attribute:"items-per-page"})],r.prototype,"itemsPerPage");e([t({type:Array,attribute:"items-per-page-options"})],r.prototype,"itemsPerPageOptions");export{r as NjcTable};
1
+ import{property as t}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{msg as l}from"../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import"../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{TestableLitElement as m}from"../../utils/components/testable-lit-element/testable-lit-element.js";var b=Object.defineProperty,e=(a,o,s,n)=>{for(var p=void 0,i=a.length-1,y;i>=0;i--)(y=a[i])&&(p=y(o,s,p)||p);return p&&b(o,s,p),p};class r extends m{constructor(){super(...arguments),this.columns=[],this.data=[],this.tableAriaLabelledBy=null,this.selectable=!1,this.currentPage=1,this.totalItems=0,this.itemsPerPage=10,this.itemsPerPageOptions=["10","15","20","50","100",l("All")],this.emptyStateTitle="",this.emptyStateBody="",this.emptyStateBodyFiltered="",this.emptyStateIllustration=""}}e([t({type:Object})],r.prototype,"columns");e([t({type:Object})],r.prototype,"data");e([t({type:String,attribute:"table-aria-labelledby"})],r.prototype,"tableAriaLabelledBy");e([t({type:Boolean})],r.prototype,"selectable");e([t({type:Number,attribute:"current-page"})],r.prototype,"currentPage");e([t({type:Number,attribute:"total-items"})],r.prototype,"totalItems");e([t({type:Number,attribute:"items-per-page"})],r.prototype,"itemsPerPage");e([t({type:Array,attribute:"items-per-page-options"})],r.prototype,"itemsPerPageOptions");e([t({type:String,attribute:"empty-state-title"})],r.prototype,"emptyStateTitle");e([t({type:String,attribute:"empty-state-body"})],r.prototype,"emptyStateBody");e([t({type:String,attribute:"empty-state-body-filtered"})],r.prototype,"emptyStateBodyFiltered");e([t({type:String,attribute:"empty-state-illustration"})],r.prototype,"emptyStateIllustration");export{r as NjcTable};
@@ -1 +1 @@
1
- import{getSideAxis as L,getAlignmentAxis as G,getSide as F,getAlignment as T,evaluate as I,getPaddingObject as H,rectToClientRect as X,getAxisLength as J,getOppositePlacement as K,getExpandedPlacements as N,getOppositeAxisPlacements as Q,getAlignmentSides as q,placements as Y,getOppositeAlignmentPlacement as U}from"../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";function _(n,l,r){let{reference:t,floating:e}=n;const i=L(l),s=G(l),a=J(s),d=F(l),p=i==="y",u=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2,m=t[a]/2-e[a]/2;let o;switch(d){case"top":o={x:u,y:t.y-e.height};break;case"bottom":o={x:u,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:c};break;case"left":o={x:t.x-e.width,y:c};break;default:o={x:t.x,y:t.y}}switch(T(l)){case"start":o[s]-=m*(r&&p?-1:1);break;case"end":o[s]+=m*(r&&p?-1:1);break}return o}async function W(n,l){var r;l===void 0&&(l={});const{x:t,y:e,platform:i,rects:s,elements:a,strategy:d}=n,{boundary:p="clippingAncestors",rootBoundary:u="viewport",elementContext:c="floating",altBoundary:m=!1,padding:o=0}=I(l,n),y=H(o),g=a[m?c==="floating"?"reference":"floating":c],w=X(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(g)))==null||r?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:p,rootBoundary:u,strategy:d})),v=c==="floating"?{x:t,y:e,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),P=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},x=X(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:d}):v);return{top:(w.top-x.top+y.top)/P.y,bottom:(x.bottom-w.bottom+y.bottom)/P.y,left:(w.left-x.left+y.left)/P.x,right:(x.right-w.right+y.right)/P.x}}const te=async(n,l,r)=>{const{placement:t="bottom",strategy:e="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(l));let p=await s.getElementRects({reference:n,floating:l,strategy:e}),{x:u,y:c}=_(p,t,d),m=t,o={},y=0;for(let g=0;g<a.length;g++){var O;const{name:w,fn:v}=a[g],{x:b,y:P,data:x,reset:h}=await v({x:u,y:c,initialPlacement:t,placement:m,strategy:e,middlewareData:o,rects:p,platform:{...s,detectOverflow:(O=s.detectOverflow)!=null?O:W},elements:{reference:n,floating:l}});u=b??u,c=P??c,o={...o,[w]:{...o[w],...x}},h&&y<=50&&(y++,typeof h=="object"&&(h.placement&&(m=h.placement),h.rects&&(p=h.rects===!0?await s.getElementRects({reference:n,floating:l,strategy:e}):h.rects),{x:u,y:c}=_(p,m,d)),g=-1)}return{x:u,y:c,placement:m,strategy:e,middlewareData:o}};function Z(n,l,r){return(n?[...r.filter(e=>T(e)===n),...r.filter(e=>T(e)!==n)]:r.filter(e=>F(e)===e)).filter(e=>n?T(e)===n||(l?U(e)!==e:!1):!0)}const ne=function(n){return n===void 0&&(n={}),{name:"autoPlacement",options:n,async fn(l){var r,t,e;const{rects:i,middlewareData:s,placement:a,platform:d,elements:p}=l,{crossAxis:u=!1,alignment:c,allowedPlacements:m=Y,autoAlignment:o=!0,...y}=I(n,l),O=c!==void 0||m===Y?Z(c||null,o,m):m,g=await d.detectOverflow(l,y),w=((r=s.autoPlacement)==null?void 0:r.index)||0,v=O[w];if(v==null)return{};const b=q(v,i,await(d.isRTL==null?void 0:d.isRTL(p.floating)));if(a!==v)return{reset:{placement:O[0]}};const P=[g[F(v)],g[b[0]],g[b[1]]],x=[...((t=s.autoPlacement)==null?void 0:t.overflows)||[],{placement:v,overflows:P}],h=O[w+1];if(h)return{data:{index:w+1,overflows:x},reset:{placement:h}};const B=x.map(f=>{const R=T(f.placement);return[f.placement,R&&u?f.overflows.slice(0,2).reduce((M,V)=>M+V,0):f.overflows[0],f.overflows]}).sort((f,R)=>f[1]-R[1]),k=((e=B.filter(f=>f[2].slice(0,T(f[0])?2:3).every(R=>R<=0))[0])==null?void 0:e[0])||B[0][0];return k!==a?{data:{index:w+1,overflows:x},reset:{placement:k}}:{}}}},le=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var r,t;const{placement:e,middlewareData:i,rects:s,initialPlacement:a,platform:d,elements:p}=l,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:m,fallbackStrategy:o="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:O=!0,...g}=I(n,l);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const w=F(e),v=L(a),b=F(a)===a,P=await(d.isRTL==null?void 0:d.isRTL(p.floating)),x=m||(b||!O?[K(a)]:N(a)),h=y!=="none";!m&&h&&x.push(...Q(a,O,y,P));const B=[a,...x],j=await d.detectOverflow(l,g),k=[];let f=((t=i.flip)==null?void 0:t.overflows)||[];if(u&&k.push(j[w]),c){const E=q(e,s,P);k.push(j[E[0]],j[E[1]])}if(f=[...f,{placement:e,overflows:k}],!k.every(E=>E<=0)){var R,M;const E=(((R=i.flip)==null?void 0:R.index)||0)+1,$=B[E];if($&&(!(c==="alignment"?v!==L($):!1)||f.every(A=>L(A.placement)===v?A.overflows[0]>0:!0)))return{data:{index:E,overflows:f},reset:{placement:$}};let D=(M=f.filter(C=>C.overflows[0]<=0).sort((C,A)=>C.overflows[1]-A.overflows[1])[0])==null?void 0:M.placement;if(!D)switch(o){case"bestFit":{var V;const C=(V=f.filter(A=>{if(h){const S=L(A.placement);return S===v||S==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(S=>S>0).reduce((S,z)=>S+z,0)]).sort((A,S)=>A[1]-S[1])[0])==null?void 0:V[0];C&&(D=C);break}case"initialPlacement":D=a;break}if(e!==D)return{reset:{placement:D}}}return{}}}};export{ne as autoPlacement,te as computePosition,W as detectOverflow,le as flip,X as rectToClientRect};
1
+ import{getSideAxis as T,getAlignmentAxis as H,getSide as L,getAlignment as D,evaluate as $,getPaddingObject as J,rectToClientRect as X,getOppositePlacement as K,getExpandedPlacements as N,getOppositeAxisPlacements as Q,getAlignmentSides as z,clamp as Y,getAxisLength as U,getOppositeAxis as W,placements as _,getOppositeAlignmentPlacement as Z}from"../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";function q(t,l,f){let{reference:n,floating:e}=t;const o=T(l),r=H(l),a=U(r),g=L(l),A=o==="y",x=n.x+n.width/2-e.width/2,s=n.y+n.height/2-e.height/2,c=n[a]/2-e[a]/2;let i;switch(g){case"top":i={x,y:n.y-e.height};break;case"bottom":i={x,y:n.y+n.height};break;case"right":i={x:n.x+n.width,y:s};break;case"left":i={x:n.x-e.width,y:s};break;default:i={x:n.x,y:n.y}}switch(D(l)){case"start":i[r]-=c*(f&&A?-1:1);break;case"end":i[r]+=c*(f&&A?-1:1);break}return i}async function ee(t,l){var f;l===void 0&&(l={});const{x:n,y:e,platform:o,rects:r,elements:a,strategy:g}=t,{boundary:A="clippingAncestors",rootBoundary:x="viewport",elementContext:s="floating",altBoundary:c=!1,padding:i=0}=$(l,t),u=J(i),w=a[c?s==="floating"?"reference":"floating":s],m=X(await o.getClippingRect({element:(f=await(o.isElement==null?void 0:o.isElement(w)))==null||f?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:A,rootBoundary:x,strategy:g})),d=s==="floating"?{x:n,y:e,width:r.floating.width,height:r.floating.height}:r.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),y=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},P=X(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:d,offsetParent:v,strategy:g}):d);return{top:(m.top-P.top+u.top)/y.y,bottom:(P.bottom-m.bottom+u.bottom)/y.y,left:(m.left-P.left+u.left)/y.x,right:(P.right-m.right+u.right)/y.x}}const le=async(t,l,f)=>{const{placement:n="bottom",strategy:e="absolute",middleware:o=[],platform:r}=f,a=o.filter(Boolean),g=await(r.isRTL==null?void 0:r.isRTL(l));let A=await r.getElementRects({reference:t,floating:l,strategy:e}),{x,y:s}=q(A,n,g),c=n,i={},u=0;for(let w=0;w<a.length;w++){var h;const{name:m,fn:d}=a[w],{x:v,y,data:P,reset:b}=await d({x,y:s,initialPlacement:n,placement:c,strategy:e,middlewareData:i,rects:A,platform:{...r,detectOverflow:(h=r.detectOverflow)!=null?h:ee},elements:{reference:t,floating:l}});x=v??x,s=y??s,i={...i,[m]:{...i[m],...P}},b&&u<=50&&(u++,typeof b=="object"&&(b.placement&&(c=b.placement),b.rects&&(A=b.rects===!0?await r.getElementRects({reference:t,floating:l,strategy:e}):b.rects),{x,y:s}=q(A,c,g)),w=-1)}return{x,y:s,placement:c,strategy:e,middlewareData:i}};function te(t,l,f){return(t?[...f.filter(e=>D(e)===t),...f.filter(e=>D(e)!==t)]:f.filter(e=>L(e)===e)).filter(e=>t?D(e)===t||(l?Z(e)!==e:!1):!0)}const ie=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(l){var f,n,e;const{rects:o,middlewareData:r,placement:a,platform:g,elements:A}=l,{crossAxis:x=!1,alignment:s,allowedPlacements:c=_,autoAlignment:i=!0,...u}=$(t,l),h=s!==void 0||c===_?te(s||null,i,c):c,w=await g.detectOverflow(l,u),m=((f=r.autoPlacement)==null?void 0:f.index)||0,d=h[m];if(d==null)return{};const v=z(d,o,await(g.isRTL==null?void 0:g.isRTL(A.floating)));if(a!==d)return{reset:{placement:h[0]}};const y=[w[L(d)],w[v[0]],w[v[1]]],P=[...((n=r.autoPlacement)==null?void 0:n.overflows)||[],{placement:d,overflows:y}],b=h[m+1];if(b)return{data:{index:m+1,overflows:P},reset:{placement:b}};const B=P.map(p=>{const S=D(p.placement);return[p.placement,S&&x?p.overflows.slice(0,2).reduce((j,V)=>j+V,0):p.overflows[0],p.overflows]}).sort((p,S)=>p[1]-S[1]),k=((e=B.filter(p=>p[2].slice(0,D(p[0])?2:3).every(S=>S<=0))[0])==null?void 0:e[0])||B[0][0];return k!==a?{data:{index:m+1,overflows:P},reset:{placement:k}}:{}}}},oe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(l){var f,n;const{placement:e,middlewareData:o,rects:r,initialPlacement:a,platform:g,elements:A}=l,{mainAxis:x=!0,crossAxis:s=!0,fallbackPlacements:c,fallbackStrategy:i="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:h=!0,...w}=$(t,l);if((f=o.arrow)!=null&&f.alignmentOffset)return{};const m=L(e),d=T(a),v=L(a)===a,y=await(g.isRTL==null?void 0:g.isRTL(A.floating)),P=c||(v||!h?[K(a)]:N(a)),b=u!=="none";!c&&b&&P.push(...Q(a,h,u,y));const B=[a,...P],M=await g.detectOverflow(l,w),k=[];let p=((n=o.flip)==null?void 0:n.overflows)||[];if(x&&k.push(M[m]),s){const C=z(e,r,y);k.push(M[C[0]],M[C[1]])}if(p=[...p,{placement:e,overflows:k}],!k.every(C=>C<=0)){var S,j;const C=(((S=o.flip)==null?void 0:S.index)||0)+1,I=B[C];if(I&&(!(s==="alignment"?d!==T(I):!1)||p.every(O=>T(O.placement)===d?O.overflows[0]>0:!0)))return{data:{index:C,overflows:p},reset:{placement:I}};let F=(j=p.filter(E=>E.overflows[0]<=0).sort((E,O)=>E.overflows[1]-O.overflows[1])[0])==null?void 0:j.placement;if(!F)switch(i){case"bestFit":{var V;const E=(V=p.filter(O=>{if(b){const R=T(O.placement);return R===d||R==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(R=>R>0).reduce((R,G)=>R+G,0)]).sort((O,R)=>O[1]-R[1])[0])==null?void 0:V[0];E&&(F=E);break}case"initialPlacement":F=a;break}if(e!==F)return{reset:{placement:F}}}return{}}}},ae=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(l){const{x:f,y:n,placement:e,platform:o}=l,{mainAxis:r=!0,crossAxis:a=!1,limiter:g={fn:m=>{let{x:d,y:v}=m;return{x:d,y:v}}},...A}=$(t,l),x={x:f,y:n},s=await o.detectOverflow(l,A),c=T(L(e)),i=W(c);let u=x[i],h=x[c];if(r){const m=i==="y"?"top":"left",d=i==="y"?"bottom":"right",v=u+s[m],y=u-s[d];u=Y(v,u,y)}if(a){const m=c==="y"?"top":"left",d=c==="y"?"bottom":"right",v=h+s[m],y=h-s[d];h=Y(v,h,y)}const w=g.fn({...l,[i]:u,[c]:h});return{...w,data:{x:w.x-f,y:w.y-n,enabled:{[i]:r,[c]:a}}}}}};export{ie as autoPlacement,le as computePosition,ee as detectOverflow,oe as flip,X as rectToClientRect,ae as shift};
@@ -1 +1 @@
1
- import{computePosition as st,flip as rt,autoPlacement as ct}from"../../../../../@floating-ui_core@1.7.4/node_modules/@floating-ui/core/dist/floating-ui.core.js";import{createCoords as w,rectToClientRect as J,floor as A,round as D,max as E,min as V}from"../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";import{getOverflowAncestors as z,isElement as v,getDocumentElement as R,getWindow as L,getFrameElement as U,getComputedStyle as b,isHTMLElement as C,isWebKit as Q,isTopLayer as _,getParentNode as W,isLastTraversableNode as H,isTableElement as lt,isContainingBlock as Y,getContainingBlock as ft,getNodeName as $,isOverflowElement as P,getNodeScroll as I}from"../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js";function Z(t){const e=b(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=C(t),r=i?t.offsetWidth:o,s=i?t.offsetHeight:n,c=D(o)!==r||D(n)!==s;return c&&(o=r,n=s),{width:o,height:n,$:c}}function q(t){return v(t)?t:t.contextElement}function F(t){const e=q(t);if(!C(e))return w(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=Z(e);let s=(r?D(o.width):o.width)/n,c=(r?D(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const ut=w(0);function tt(t){const e=L(t);return!Q()||!e.visualViewport?ut:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function at(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==L(t)?!1:e}function T(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=q(t);let s=w(1);e&&(n?v(n)&&(s=F(n)):s=F(t));const c=at(r,o,n)?tt(r):w(0);let f=(i.left+c.x)/s.x,l=(i.top+c.y)/s.y,u=i.width/s.x,a=i.height/s.y;if(r){const d=L(r),h=n&&v(n)?L(n):n;let m=d,p=U(m);for(;p&&n&&h!==m;){const y=F(p),g=p.getBoundingClientRect(),x=b(p),O=g.left+(p.clientLeft+parseFloat(x.paddingLeft))*y.x,S=g.top+(p.clientTop+parseFloat(x.paddingTop))*y.y;f*=y.x,l*=y.y,u*=y.x,a*=y.y,f+=O,l+=S,m=L(p),p=U(m)}}return J({width:u,height:a,x:f,y:l})}function M(t,e){const o=I(t).scrollLeft;return e?e.left+o:T(R(t)).left+o}function et(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-M(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function ht(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",s=R(n),c=e?_(e.floating):!1;if(n===s||c&&r)return o;let f={scrollLeft:0,scrollTop:0},l=w(1);const u=w(0),a=C(n);if((a||!a&&!r)&&(($(n)!=="body"||P(s))&&(f=I(n)),C(n))){const h=T(n);l=F(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}const d=s&&!a&&!r?et(s,f):w(0);return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-f.scrollLeft*l.x+u.x+d.x,y:o.y*l.y-f.scrollTop*l.y+u.y+d.y}}function dt(t){return Array.from(t.getClientRects())}function gt(t){const e=R(t),o=I(t),n=t.ownerDocument.body,i=E(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=E(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+M(t);const c=-o.scrollTop;return b(n).direction==="rtl"&&(s+=E(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:c}}const K=25;function pt(t,e){const o=L(t),n=R(t),i=o.visualViewport;let r=n.clientWidth,s=n.clientHeight,c=0,f=0;if(i){r=i.width,s=i.height;const u=Q();(!u||u&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const l=M(n);if(l<=0){const u=n.ownerDocument,a=u.body,d=getComputedStyle(a),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(n.clientWidth-a.clientWidth-h);m<=K&&(r-=m)}else l<=K&&(r+=l);return{width:r,height:s,x:c,y:f}}const mt=new Set(["absolute","fixed"]);function yt(t,e){const o=T(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=C(t)?F(t):w(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,f=i*r.x,l=n*r.y;return{width:s,height:c,x:f,y:l}}function j(t,e,o){let n;if(e==="viewport")n=pt(t,o);else if(e==="document")n=gt(R(t));else if(v(e))n=yt(e,o);else{const i=tt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return J(n)}function nt(t,e){const o=W(t);return o===e||!v(o)||H(o)?!1:b(o).position==="fixed"||nt(o,e)}function wt(t,e){const o=e.get(t);if(o)return o;let n=z(t,[],!1).filter(c=>v(c)&&$(c)!=="body"),i=null;const r=b(t).position==="fixed";let s=r?W(t):t;for(;v(s)&&!H(s);){const c=b(s),f=Y(s);!f&&c.position==="fixed"&&(i=null),(r?!f&&!i:!f&&c.position==="static"&&!!i&&mt.has(i.position)||P(s)&&!f&&nt(t,s))?n=n.filter(u=>u!==s):i=c,s=W(s)}return e.set(t,n),n}function xt(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?_(e)?[]:wt(e,this._c):[].concat(o),n],c=s[0],f=s.reduce((l,u)=>{const a=j(e,u,i);return l.top=E(a.top,l.top),l.right=V(a.right,l.right),l.bottom=V(a.bottom,l.bottom),l.left=E(a.left,l.left),l},j(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function vt(t){const{width:e,height:o}=Z(t);return{width:e,height:o}}function bt(t,e,o){const n=C(e),i=R(e),r=o==="fixed",s=T(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const f=w(0);function l(){f.x=M(i)}if(n||!n&&!r)if(($(e)!=="body"||P(i))&&(c=I(e)),n){const h=T(e,!0,r,e);f.x=h.x+e.clientLeft,f.y=h.y+e.clientTop}else i&&l();r&&!n&&i&&l();const u=i&&!n&&!r?et(i,c):w(0),a=s.left+c.scrollLeft-f.x-u.x,d=s.top+c.scrollTop-f.y-u.y;return{x:a,y:d,width:s.width,height:s.height}}function N(t){return b(t).position==="static"}function G(t,e){if(!C(t)||b(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return R(t)===o&&(o=o.ownerDocument.body),o}function ot(t,e){const o=L(t);if(_(t))return o;if(!C(t)){let i=W(t);for(;i&&!H(i);){if(v(i)&&!N(i))return i;i=W(i)}return o}let n=G(t,e);for(;n&&lt(n)&&N(n);)n=G(n,e);return n&&H(n)&&N(n)&&!Y(n)?o:n||ft(t)||o}const Rt=async function(t){const e=this.getOffsetParent||ot,o=this.getDimensions,n=await o(t.floating);return{reference:bt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ct(t){return b(t).direction==="rtl"}const Ot={convertOffsetParentRelativeRectToViewportRelativeRect:ht,getDocumentElement:R,getClippingRect:xt,getOffsetParent:ot,getElementRects:Rt,getClientRects:dt,getDimensions:vt,getScale:F,isElement:v,isRTL:Ct};function it(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Lt(t,e){let o=null,n;const i=R(t);function r(){var c;clearTimeout(n),(c=o)==null||c.disconnect(),o=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();const l=t.getBoundingClientRect(),{left:u,top:a,width:d,height:h}=l;if(c||e(),!d||!h)return;const m=A(a),p=A(i.clientWidth-(u+d)),y=A(i.clientHeight-(a+h)),g=A(u),O={rootMargin:-m+"px "+-p+"px "+-y+"px "+-g+"px",threshold:E(0,V(1,f))||1};let S=!0;function X(k){const B=k[0].intersectionRatio;if(B!==f){if(!S)return s();B?s(!1,B):n=setTimeout(()=>{s(!1,1e-7)},1e3)}B===1&&!it(l,t.getBoundingClientRect())&&s(),S=!1}try{o=new IntersectionObserver(X,{...O,root:i.ownerDocument})}catch{o=new IntersectionObserver(X,O)}o.observe(t)}return s(!0),r}function Wt(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,l=q(t),u=i||r?[...l?z(l):[],...z(e)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",o,{passive:!0}),r&&g.addEventListener("resize",o)});const a=l&&c?Lt(l,o):null;let d=-1,h=null;s&&(h=new ResizeObserver(g=>{let[x]=g;x&&x.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var O;(O=h)==null||O.observe(e)})),o()}),l&&!f&&h.observe(l),h.observe(e));let m,p=f?T(t):null;f&&y();function y(){const g=T(t);p&&!it(p,g)&&o(),p=g,m=requestAnimationFrame(y)}return o(),()=>{var g;u.forEach(x=>{i&&x.removeEventListener("scroll",o),r&&x.removeEventListener("resize",o)}),a?.(),(g=h)==null||g.disconnect(),h=null,f&&cancelAnimationFrame(m)}}const St=ct,Bt=rt,At=(t,e,o)=>{const n=new Map,i={platform:Ot,...o},r={...i.platform,_c:n};return st(t,e,{...i,platform:r})};export{St as autoPlacement,Wt as autoUpdate,At as computePosition,Bt as flip,z as getOverflowAncestors,Ot as platform};
1
+ import{computePosition as st,flip as rt,shift as ct,autoPlacement as lt}from"../../../../../@floating-ui_core@1.7.4/node_modules/@floating-ui/core/dist/floating-ui.core.js";import{createCoords as w,rectToClientRect as J,floor as A,round as D,max as E,min as V}from"../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";import{getOverflowAncestors as z,isElement as v,getDocumentElement as R,getWindow as L,getFrameElement as U,getComputedStyle as b,isHTMLElement as C,isWebKit as Q,isTopLayer as _,getParentNode as W,isLastTraversableNode as H,isTableElement as ft,isContainingBlock as Y,getContainingBlock as ut,getNodeName as $,isOverflowElement as P,getNodeScroll as I}from"../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js";function Z(t){const e=b(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=C(t),r=i?t.offsetWidth:o,s=i?t.offsetHeight:n,c=D(o)!==r||D(n)!==s;return c&&(o=r,n=s),{width:o,height:n,$:c}}function q(t){return v(t)?t:t.contextElement}function F(t){const e=q(t);if(!C(e))return w(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=Z(e);let s=(r?D(o.width):o.width)/n,c=(r?D(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const ht=w(0);function tt(t){const e=L(t);return!Q()||!e.visualViewport?ht:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function at(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==L(t)?!1:e}function T(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=q(t);let s=w(1);e&&(n?v(n)&&(s=F(n)):s=F(t));const c=at(r,o,n)?tt(r):w(0);let f=(i.left+c.x)/s.x,l=(i.top+c.y)/s.y,u=i.width/s.x,h=i.height/s.y;if(r){const d=L(r),a=n&&v(n)?L(n):n;let m=d,p=U(m);for(;p&&n&&a!==m;){const y=F(p),g=p.getBoundingClientRect(),x=b(p),O=g.left+(p.clientLeft+parseFloat(x.paddingLeft))*y.x,S=g.top+(p.clientTop+parseFloat(x.paddingTop))*y.y;f*=y.x,l*=y.y,u*=y.x,h*=y.y,f+=O,l+=S,m=L(p),p=U(m)}}return J({width:u,height:h,x:f,y:l})}function M(t,e){const o=I(t).scrollLeft;return e?e.left+o:T(R(t)).left+o}function et(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-M(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function dt(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",s=R(n),c=e?_(e.floating):!1;if(n===s||c&&r)return o;let f={scrollLeft:0,scrollTop:0},l=w(1);const u=w(0),h=C(n);if((h||!h&&!r)&&(($(n)!=="body"||P(s))&&(f=I(n)),C(n))){const a=T(n);l=F(n),u.x=a.x+n.clientLeft,u.y=a.y+n.clientTop}const d=s&&!h&&!r?et(s,f):w(0);return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-f.scrollLeft*l.x+u.x+d.x,y:o.y*l.y-f.scrollTop*l.y+u.y+d.y}}function gt(t){return Array.from(t.getClientRects())}function pt(t){const e=R(t),o=I(t),n=t.ownerDocument.body,i=E(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=E(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+M(t);const c=-o.scrollTop;return b(n).direction==="rtl"&&(s+=E(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:c}}const K=25;function mt(t,e){const o=L(t),n=R(t),i=o.visualViewport;let r=n.clientWidth,s=n.clientHeight,c=0,f=0;if(i){r=i.width,s=i.height;const u=Q();(!u||u&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const l=M(n);if(l<=0){const u=n.ownerDocument,h=u.body,d=getComputedStyle(h),a=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(n.clientWidth-h.clientWidth-a);m<=K&&(r-=m)}else l<=K&&(r+=l);return{width:r,height:s,x:c,y:f}}const yt=new Set(["absolute","fixed"]);function wt(t,e){const o=T(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=C(t)?F(t):w(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,f=i*r.x,l=n*r.y;return{width:s,height:c,x:f,y:l}}function j(t,e,o){let n;if(e==="viewport")n=mt(t,o);else if(e==="document")n=pt(R(t));else if(v(e))n=wt(e,o);else{const i=tt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return J(n)}function nt(t,e){const o=W(t);return o===e||!v(o)||H(o)?!1:b(o).position==="fixed"||nt(o,e)}function xt(t,e){const o=e.get(t);if(o)return o;let n=z(t,[],!1).filter(c=>v(c)&&$(c)!=="body"),i=null;const r=b(t).position==="fixed";let s=r?W(t):t;for(;v(s)&&!H(s);){const c=b(s),f=Y(s);!f&&c.position==="fixed"&&(i=null),(r?!f&&!i:!f&&c.position==="static"&&!!i&&yt.has(i.position)||P(s)&&!f&&nt(t,s))?n=n.filter(u=>u!==s):i=c,s=W(s)}return e.set(t,n),n}function vt(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?_(e)?[]:xt(e,this._c):[].concat(o),n],c=s[0],f=s.reduce((l,u)=>{const h=j(e,u,i);return l.top=E(h.top,l.top),l.right=V(h.right,l.right),l.bottom=V(h.bottom,l.bottom),l.left=E(h.left,l.left),l},j(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function bt(t){const{width:e,height:o}=Z(t);return{width:e,height:o}}function Rt(t,e,o){const n=C(e),i=R(e),r=o==="fixed",s=T(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const f=w(0);function l(){f.x=M(i)}if(n||!n&&!r)if(($(e)!=="body"||P(i))&&(c=I(e)),n){const a=T(e,!0,r,e);f.x=a.x+e.clientLeft,f.y=a.y+e.clientTop}else i&&l();r&&!n&&i&&l();const u=i&&!n&&!r?et(i,c):w(0),h=s.left+c.scrollLeft-f.x-u.x,d=s.top+c.scrollTop-f.y-u.y;return{x:h,y:d,width:s.width,height:s.height}}function N(t){return b(t).position==="static"}function G(t,e){if(!C(t)||b(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return R(t)===o&&(o=o.ownerDocument.body),o}function ot(t,e){const o=L(t);if(_(t))return o;if(!C(t)){let i=W(t);for(;i&&!H(i);){if(v(i)&&!N(i))return i;i=W(i)}return o}let n=G(t,e);for(;n&&ft(n)&&N(n);)n=G(n,e);return n&&H(n)&&N(n)&&!Y(n)?o:n||ut(t)||o}const Ct=async function(t){const e=this.getOffsetParent||ot,o=this.getDimensions,n=await o(t.floating);return{reference:Rt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ot(t){return b(t).direction==="rtl"}const Lt={convertOffsetParentRelativeRectToViewportRelativeRect:dt,getDocumentElement:R,getClippingRect:vt,getOffsetParent:ot,getElementRects:Ct,getClientRects:gt,getDimensions:bt,getScale:F,isElement:v,isRTL:Ot};function it(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Tt(t,e){let o=null,n;const i=R(t);function r(){var c;clearTimeout(n),(c=o)==null||c.disconnect(),o=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();const l=t.getBoundingClientRect(),{left:u,top:h,width:d,height:a}=l;if(c||e(),!d||!a)return;const m=A(h),p=A(i.clientWidth-(u+d)),y=A(i.clientHeight-(h+a)),g=A(u),O={rootMargin:-m+"px "+-p+"px "+-y+"px "+-g+"px",threshold:E(0,V(1,f))||1};let S=!0;function X(k){const B=k[0].intersectionRatio;if(B!==f){if(!S)return s();B?s(!1,B):n=setTimeout(()=>{s(!1,1e-7)},1e3)}B===1&&!it(l,t.getBoundingClientRect())&&s(),S=!1}try{o=new IntersectionObserver(X,{...O,root:i.ownerDocument})}catch{o=new IntersectionObserver(X,O)}o.observe(t)}return s(!0),r}function St(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,l=q(t),u=i||r?[...l?z(l):[],...z(e)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",o,{passive:!0}),r&&g.addEventListener("resize",o)});const h=l&&c?Tt(l,o):null;let d=-1,a=null;s&&(a=new ResizeObserver(g=>{let[x]=g;x&&x.target===l&&a&&(a.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var O;(O=a)==null||O.observe(e)})),o()}),l&&!f&&a.observe(l),a.observe(e));let m,p=f?T(t):null;f&&y();function y(){const g=T(t);p&&!it(p,g)&&o(),p=g,m=requestAnimationFrame(y)}return o(),()=>{var g;u.forEach(x=>{i&&x.removeEventListener("scroll",o),r&&x.removeEventListener("resize",o)}),h?.(),(g=a)==null||g.disconnect(),a=null,f&&cancelAnimationFrame(m)}}const Bt=lt,At=ct,Dt=rt,Ht=(t,e,o)=>{const n=new Map,i={platform:Lt,...o},r={...i.platform,_c:n};return st(t,e,{...i,platform:r})};export{Bt as autoPlacement,St as autoUpdate,Ht as computePosition,Dt as flip,z as getOverflowAncestors,Lt as platform,At as shift};
@@ -1 +1 @@
1
- const p=["top","right","bottom","left"],l=["start","end"],j=p.reduce((t,e)=>t.concat(e,e+"-"+l[0],e+"-"+l[1]),[]),C=Math.min,L=Math.max,E=Math.round,R=Math.floor,T=t=>({x:t,y:t}),h={left:"right",right:"left",bottom:"top",top:"bottom"},x={start:"end",end:"start"};function k(t,e){return typeof t=="function"?t(e):t}function g(t){return t.split("-")[0]}function m(t){return t.split("-")[1]}function b(t){return t==="x"?"y":"x"}function d(t){return t==="y"?"height":"width"}const A=new Set(["top","bottom"]);function P(t){return A.has(g(t))?"y":"x"}function y(t){return b(P(t))}function q(t,e,n){n===void 0&&(n=!1);const r=m(t),i=y(t),o=d(i);let c=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(c=f(c)),[c,f(c)]}function z(t){const e=f(t);return[s(t),e,s(e)]}function s(t){return t.replace(/start|end/g,e=>x[e])}const u=["left","right"],a=["right","left"],M=["top","bottom"],O=["bottom","top"];function S(t,e,n){switch(t){case"top":case"bottom":return n?e?a:u:e?u:a;case"left":case"right":return e?M:O;default:return[]}}function B(t,e,n,r){const i=m(t);let o=S(g(t),n==="start",r);return i&&(o=o.map(c=>c+"-"+i),e&&(o=o.concat(o.map(s)))),o}function f(t){return t.replace(/left|right|bottom|top/g,e=>h[e])}function w(t){return{top:0,right:0,bottom:0,left:0,...t}}function D(t){return typeof t!="number"?w(t):{top:t,right:t,bottom:t,left:t}}function F(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}export{l as alignments,T as createCoords,k as evaluate,w as expandPaddingObject,R as floor,m as getAlignment,y as getAlignmentAxis,q as getAlignmentSides,d as getAxisLength,z as getExpandedPlacements,s as getOppositeAlignmentPlacement,b as getOppositeAxis,B as getOppositeAxisPlacements,f as getOppositePlacement,D as getPaddingObject,g as getSide,P as getSideAxis,L as max,C as min,j as placements,F as rectToClientRect,E as round,p as sides};
1
+ const p=["top","right","bottom","left"],l=["start","end"],L=p.reduce((t,e)=>t.concat(e,e+"-"+l[0],e+"-"+l[1]),[]),h=Math.min,x=Math.max,E=Math.round,R=Math.floor,T=t=>({x:t,y:t}),b={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function k(t,e,n){return x(t,h(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function g(t){return t.split("-")[0]}function m(t){return t.split("-")[1]}function A(t){return t==="x"?"y":"x"}function P(t){return t==="y"?"height":"width"}const y=new Set(["top","bottom"]);function M(t){return y.has(g(t))?"y":"x"}function O(t){return A(M(t))}function z(t,e,n){n===void 0&&(n=!1);const r=m(t),i=O(t),o=P(i);let c=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(c=f(c)),[c,f(c)]}function B(t){const e=f(t);return[s(t),e,s(e)]}function s(t){return t.replace(/start|end/g,e=>d[e])}const u=["left","right"],a=["right","left"],S=["top","bottom"],w=["bottom","top"];function j(t,e,n){switch(t){case"top":case"bottom":return n?e?a:u:e?u:a;case"left":case"right":return e?S:w;default:return[]}}function D(t,e,n,r){const i=m(t);let o=j(g(t),n==="start",r);return i&&(o=o.map(c=>c+"-"+i),e&&(o=o.concat(o.map(s)))),o}function f(t){return t.replace(/left|right|bottom|top/g,e=>b[e])}function C(t){return{top:0,right:0,bottom:0,left:0,...t}}function F(t){return typeof t!="number"?C(t):{top:t,right:t,bottom:t,left:t}}function G(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}export{l as alignments,k as clamp,T as createCoords,q as evaluate,C as expandPaddingObject,R as floor,m as getAlignment,O as getAlignmentAxis,z as getAlignmentSides,P as getAxisLength,B as getExpandedPlacements,s as getOppositeAlignmentPlacement,A as getOppositeAxis,D as getOppositeAxisPlacements,f as getOppositePlacement,F as getPaddingObject,g as getSide,M as getSideAxis,x as max,h as min,L as placements,G as rectToClientRect,E as round,p as sides};
@@ -1,17 +1,22 @@
1
1
  import { NjcMenu } from '../menu.ts';
2
2
  import { NgcMenuItem } from '../../menu-item/gator/menu-item.gator.ts';
3
3
  export declare class NgcMenu extends NjcMenu {
4
+ private static readonly _instances;
4
5
  static styles: import('lit').CSSResult[];
5
6
  private _button;
6
7
  private _dropdownRef;
7
8
  private _cleanupAutoUpdate;
8
9
  render(): import('lit').TemplateResult<1>;
9
10
  updated(): void;
11
+ connectedCallback(): void;
10
12
  disconnectedCallback(): void;
11
13
  private _wasOpenAtPointerDown;
12
14
  private _handlePopoverToggle;
13
15
  private _openPopover;
16
+ private _closeOtherMenus;
17
+ private _hidePopover;
14
18
  handleTriggerSlotChange(e: Event): void;
19
+ private focusMenuItem;
15
20
  focusFirstMenuItem(): void;
16
21
  focusTriggerButton(): void;
17
22
  handleItemSlotChange(e: Event): void;
@@ -3,7 +3,7 @@ export declare class NgcMenuItem extends NjcMenuItem {
3
3
  constructor();
4
4
  connectedCallback(): void;
5
5
  render(): import('lit').TemplateResult<1>;
6
- focus(): void;
6
+ focus(options?: FocusOptions): void;
7
7
  click(): void;
8
8
  handleKeydown(e: KeyboardEvent): void;
9
9
  }
@@ -10,4 +10,23 @@ export declare class NjcTable extends TestableLitElement {
10
10
  totalItems: number;
11
11
  itemsPerPage: number;
12
12
  itemsPerPageOptions: string[];
13
+ /**
14
+ * Title for the empty-state illustration when `data` is empty.
15
+ * Defaults to "No results found".
16
+ */
17
+ emptyStateTitle: string;
18
+ /**
19
+ * Body text for the empty-state illustration when `data` is empty and no filters are active.
20
+ * Defaults to "Start by adding some data."
21
+ */
22
+ emptyStateBody: string;
23
+ /**
24
+ * Body text for the empty-state illustration when `data` is empty and filters are active.
25
+ * Defaults to "No data matches the current filters."
26
+ */
27
+ emptyStateBodyFiltered: string;
28
+ /**
29
+ * Illustration name for the empty state. Defaults to `empty-box`.
30
+ */
31
+ emptyStateIllustration: string;
13
32
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/web-components",
3
3
  "author": "nCino",
4
- "version": "14.0.0",
4
+ "version": "14.0.1",
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.0",
102
102
  "yaml-eslint-parser": "^2.0.0",
103
- "@ncino/styles": "14.0.0"
103
+ "@ncino/styles": "14.0.1"
104
104
  },
105
105
  "peerDependencies": {
106
- "@ncino/styles": "14.0.0"
106
+ "@ncino/styles": "14.0.1"
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": "13.12.2",
4
+ "version": "14.0.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -8147,6 +8147,26 @@
8147
8147
  "default": "['10', '15', '20', '50', '100', msg('All')]"
8148
8148
  }
8149
8149
  },
8150
+ {
8151
+ "name": "empty-state-title",
8152
+ "description": "Title for the empty-state illustration when `data` is empty.\nDefaults to \"No results found\".",
8153
+ "value": { "type": "string", "default": "''" }
8154
+ },
8155
+ {
8156
+ "name": "empty-state-body",
8157
+ "description": "Body text for the empty-state illustration when `data` is empty and no filters are active.\nDefaults to \"Start by adding some data.\"",
8158
+ "value": { "type": "string", "default": "''" }
8159
+ },
8160
+ {
8161
+ "name": "empty-state-body-filtered",
8162
+ "description": "Body text for the empty-state illustration when `data` is empty and filters are active.\nDefaults to \"No data matches the current filters.\"",
8163
+ "value": { "type": "string", "default": "''" }
8164
+ },
8165
+ {
8166
+ "name": "empty-state-illustration",
8167
+ "description": "Illustration name for the empty state. Defaults to `empty-box`.",
8168
+ "value": { "type": "string", "default": "''" }
8169
+ },
8150
8170
  {
8151
8171
  "name": "data-testid",
8152
8172
  "value": { "type": "string | undefined", "default": "undefined" }
@@ -8195,6 +8215,26 @@
8195
8215
  { "name": "totalItems", "type": "number" },
8196
8216
  { "name": "itemsPerPage", "type": "number" },
8197
8217
  { "name": "itemsPerPageOptions", "type": "string[]" },
8218
+ {
8219
+ "name": "emptyStateTitle",
8220
+ "description": "Title for the empty-state illustration when `data` is empty.\nDefaults to \"No results found\".",
8221
+ "type": "string"
8222
+ },
8223
+ {
8224
+ "name": "emptyStateBody",
8225
+ "description": "Body text for the empty-state illustration when `data` is empty and no filters are active.\nDefaults to \"Start by adding some data.\"",
8226
+ "type": "string"
8227
+ },
8228
+ {
8229
+ "name": "emptyStateBodyFiltered",
8230
+ "description": "Body text for the empty-state illustration when `data` is empty and filters are active.\nDefaults to \"No data matches the current filters.\"",
8231
+ "type": "string"
8232
+ },
8233
+ {
8234
+ "name": "emptyStateIllustration",
8235
+ "description": "Illustration name for the empty state. Defaults to `empty-box`.",
8236
+ "type": "string"
8237
+ },
8198
8238
  { "name": "dataTestid", "type": "string | undefined" },
8199
8239
  { "name": "labelDataTestid" },
8200
8240
  { "name": "helpTextDataTestid" },