@ncino/web-components 13.12.2 → 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.
- package/dist/components/menu/base/gator/menu.gator.js +2 -2
- package/dist/components/menu/menu-item/gator/menu-item.gator.js +1 -1
- package/dist/components/table/gator/table-bulk-controls/table-bulk-controls.gator.js +3 -9
- package/dist/components/table/gator/table.gator.js +9 -11
- package/dist/components/table/table.js +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.4/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +1 -1
- package/dist/packages/web-components/src/components/table/gator/table-bulk-controls/table-bulk-controls.gator.scss.js +1 -1
- package/dist/types/components/menu/base/gator/menu.gator.d.ts +5 -0
- package/dist/types/components/menu/menu-item/gator/menu-item.gator.d.ts +1 -1
- package/dist/types/components/table/gator/table-bulk-controls/table-bulk-controls.gator.d.ts +0 -5
- package/dist/types/components/table/table.d.ts +19 -0
- package/package.json +3 -3
- package/web-types.json +44 -14
|
@@ -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
|
|
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]");
|
|
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,19 +1,13 @@
|
|
|
1
|
-
import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as
|
|
1
|
+
import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as c,nothing as m}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 p}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{customElement as b}from"../../../../utils/decorators/custom-element-decorator.js";import{msg as v}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 d from"../../../../packages/web-components/src/components/table/gator/table-bulk-controls/table-bulk-controls.gator.scss.js";import{NgcComponent as u}from"../../../../utils/components/ngc-component.js";import{unsafeCSS as f}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var g=Object.defineProperty,h=Object.getOwnPropertyDescriptor,w=Object.getPrototypeOf,_=Reflect.get,a=(r,o,s,l)=>{for(var e=l>1?void 0:l?h(o,s):o,i=r.length-1,n;i>=0;i--)(n=r[i])&&(e=(l?n(o,s,e):n(e))||e);return l&&e&&g(o,s,e),e},y=(r,o,s)=>_(w(r),s,o);let t=class extends u{constructor(){super(...arguments),this.visible=!1,this.selectedRows=0,this.totalRows=0}render(){return c`
|
|
2
2
|
<div>
|
|
3
3
|
<div class="gator-table-bulk-controls-aria-live-container" aria-live="polite" aria-atomic="true">
|
|
4
4
|
${this.selectedRowsMessage}
|
|
5
5
|
</div>
|
|
6
6
|
${this.bulkControlsMarkup}
|
|
7
7
|
</div>
|
|
8
|
-
`}get bulkControlsMarkup(){return this.visible?
|
|
8
|
+
`}get bulkControlsMarkup(){return this.visible?c`
|
|
9
9
|
<div class="gator-table-bulk-controls">
|
|
10
10
|
<div class="gator-table-bulk-controls-selection">
|
|
11
|
-
<ngc-checkbox
|
|
12
|
-
title-text="${u("Select All")}"
|
|
13
|
-
hide-label
|
|
14
|
-
?selected="${this.allSelected}"
|
|
15
|
-
@change="${this.handleSelectAllChange}"
|
|
16
|
-
></ngc-checkbox>
|
|
17
11
|
<span class="gator-table-bulk-controls-count">
|
|
18
12
|
${this.selectedRowsMessage}
|
|
19
13
|
</span>
|
|
@@ -21,4 +15,4 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@
|
|
|
21
15
|
<div class="gator-table-bulk-controls-actions">
|
|
22
16
|
<slot></slot>
|
|
23
17
|
</div>
|
|
24
|
-
</div>`:
|
|
18
|
+
</div>`:m}get selectedRowsMessage(){return`${this.selectedRows} ${v("selected")}`}};t.shadowRootOptions={...u.shadowRootOptions,delegatesFocus:!0};t.styles=[...y(t,t,"styles"),f(d)];a([p({type:Boolean,reflect:!0})],t.prototype,"visible",2);a([p({type:Number})],t.prototype,"selectedRows",2);a([p({type:Number})],t.prototype,"totalRows",2);t=a([b("ngc-table-bulk-controls")],t);export{t as NgcTableBulkControls};
|
|
@@ -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
|
|
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,24 +46,22 @@ 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}"
|
|
53
53
|
.totalRows="${this.data.length}"
|
|
54
|
-
?allSelected="${this.selectedRows.length===this.data.filter(r=>!r.isTableHeader&&!r.disabled).length}"
|
|
55
|
-
@selectall="${this.handleSelectAll}"
|
|
56
54
|
>
|
|
57
55
|
<slot name="bulk-controls"></slot>
|
|
58
56
|
</ngc-table-bulk-controls>
|
|
59
57
|
${!this.skeleton&&i?o`
|
|
60
58
|
<div class="gator-table-filter-chips" role="region" aria-label="${h("Active filters")}">
|
|
61
|
-
${l.map(({column:
|
|
59
|
+
${l.map(({column:c,value:n,label:d})=>o`
|
|
62
60
|
<ngc-chip
|
|
63
61
|
dismissible
|
|
64
62
|
size="small"
|
|
65
|
-
@dismiss="${()=>this.handleFilterChipDismiss(
|
|
66
|
-
>${
|
|
63
|
+
@dismiss="${()=>this.handleFilterChipDismiss(c,n)}"
|
|
64
|
+
>${c.name}: ${d}</ngc-chip>
|
|
67
65
|
`)}
|
|
68
66
|
${l.length>1?o`
|
|
69
67
|
<button
|
|
@@ -78,9 +76,9 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
78
76
|
<ngc-card class="gator-table-empty-state-card">
|
|
79
77
|
<div class="gator-table-empty-state">
|
|
80
78
|
<ngc-illustration
|
|
81
|
-
name="
|
|
82
|
-
title-text="${
|
|
83
|
-
.bodyText="${
|
|
79
|
+
name="${a}"
|
|
80
|
+
title-text="${s}"
|
|
81
|
+
.bodyText="${r}"
|
|
84
82
|
size="medium"
|
|
85
83
|
>
|
|
86
84
|
${i?o`<ngc-button @click="${this.handleClearAllFilters}">${h("Clear filters")}</ngc-button>`:g}
|
|
@@ -229,4 +227,4 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
229
227
|
>
|
|
230
228
|
${d}
|
|
231
229
|
</td>
|
|
232
|
-
`}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}}}))}};
|
|
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
|
|
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
|
|
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
|
|
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"],
|
|
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 +1 @@
|
|
|
1
|
-
const r='.gator-table-bulk-controls{margin-bottom:1rem;display:flex;flex-direction:row;align-items:center;padding:var(--spacing-5) var(--spacing-8);border-radius:var(--ngc-table-bulk-controls-border-radius, var(--border-radius-medium));gap:1rem;background-color:var(--color-surface-brand)}.gator-table-bulk-controls-aria-live-container{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap;border:0;padding:0;margin:0}.gator-table-bulk-controls-selection{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-5);padding-left:.5rem}.gator-table-bulk-controls-count{font-family:var(--font-family-body, "Open Sans"),sans-serif;font-size:var(--font-size-body-2);color:var(--color-text-primary)}.gator-table-bulk-controls-actions{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-5)}
|
|
1
|
+
const r='.gator-table-bulk-controls{margin-bottom:1rem;display:flex;flex-direction:row;align-items:center;padding:var(--spacing-5) var(--spacing-8);border-radius:var(--ngc-table-bulk-controls-border-radius, var(--border-radius-medium));gap:1rem;background-color:var(--color-surface-brand)}.gator-table-bulk-controls-aria-live-container{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap;border:0;padding:0;margin:0}.gator-table-bulk-controls-selection{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-5);padding-left:.5rem}.gator-table-bulk-controls-count{font-family:var(--font-family-body, "Open Sans"),sans-serif;font-size:var(--font-size-body-2);color:var(--color-text-primary)}.gator-table-bulk-controls-actions{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-5)}';export{r as default};
|
|
@@ -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;
|
package/dist/types/components/table/gator/table-bulk-controls/table-bulk-controls.gator.d.ts
CHANGED
|
@@ -22,11 +22,6 @@ export declare class NgcTableBulkControls extends NgcComponent {
|
|
|
22
22
|
* The total number of rows
|
|
23
23
|
*/
|
|
24
24
|
totalRows: number;
|
|
25
|
-
/**
|
|
26
|
-
* Whether all rows are selected
|
|
27
|
-
*/
|
|
28
|
-
allSelected: boolean;
|
|
29
|
-
private handleSelectAllChange;
|
|
30
25
|
render(): import('lit').TemplateResult<1>;
|
|
31
26
|
get bulkControlsMarkup(): import('lit').TemplateResult<1> | typeof nothing;
|
|
32
27
|
get selectedRowsMessage(): string;
|
|
@@ -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": "
|
|
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": "
|
|
103
|
+
"@ncino/styles": "14.0.1"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@ncino/styles": "
|
|
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": "
|
|
4
|
+
"version": "14.0.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -7611,7 +7611,7 @@
|
|
|
7611
7611
|
},
|
|
7612
7612
|
{
|
|
7613
7613
|
"name": "ngc-table-bulk-controls",
|
|
7614
|
-
"description": "\n---\n\n\n### **
|
|
7614
|
+
"description": "\n---\n\n\n### **Methods:**\n - **removeAttributesFromHost(name: _string_, oldValue: _string_, newValue: _string_)** - Removes an attribute from the host element and stores its original value in the map.\nAlso updates the corresponding `dataset` property for the attribute.\n- **restoreAttributesToHost()** - Restores all previously removed attributes to the host element.\nClears the map of removed attributes after restoration.",
|
|
7615
7615
|
"doc-url": "",
|
|
7616
7616
|
"attributes": [
|
|
7617
7617
|
{
|
|
@@ -7629,11 +7629,6 @@
|
|
|
7629
7629
|
"description": "The total number of rows",
|
|
7630
7630
|
"value": { "type": "number", "default": "0" }
|
|
7631
7631
|
},
|
|
7632
|
-
{
|
|
7633
|
-
"name": "allSelected",
|
|
7634
|
-
"description": "Whether all rows are selected",
|
|
7635
|
-
"value": { "type": "boolean", "default": "false" }
|
|
7636
|
-
},
|
|
7637
7632
|
{
|
|
7638
7633
|
"name": "delegatesARIA",
|
|
7639
7634
|
"description": "A boolean property that determines whether ARIA-related attributes\n(e.g., `aria-label`, `aria-labelledby`, `role`, etc.) are managed\nby the host element or delegated to the component.\n\n- When `true` (default), ARIA attributes are removed from the host\n and managed internally by the component.\n- When `false`, previously removed ARIA attributes are restored\n to the host element.",
|
|
@@ -7648,7 +7643,7 @@
|
|
|
7648
7643
|
"value": { "type": "string | undefined", "default": "undefined" }
|
|
7649
7644
|
}
|
|
7650
7645
|
],
|
|
7651
|
-
"events": [
|
|
7646
|
+
"events": [],
|
|
7652
7647
|
"js": {
|
|
7653
7648
|
"properties": [
|
|
7654
7649
|
{
|
|
@@ -7666,11 +7661,6 @@
|
|
|
7666
7661
|
"description": "The total number of rows",
|
|
7667
7662
|
"type": "number"
|
|
7668
7663
|
},
|
|
7669
|
-
{
|
|
7670
|
-
"name": "allSelected",
|
|
7671
|
-
"description": "Whether all rows are selected",
|
|
7672
|
-
"type": "boolean"
|
|
7673
|
-
},
|
|
7674
7664
|
{ "name": "bulkControlsMarkup" },
|
|
7675
7665
|
{ "name": "selectedRowsMessage" },
|
|
7676
7666
|
{
|
|
@@ -7689,7 +7679,7 @@
|
|
|
7689
7679
|
{ "name": "helpTextDataTestid" },
|
|
7690
7680
|
{ "name": "errorMessageDataTestid" }
|
|
7691
7681
|
],
|
|
7692
|
-
"events": [
|
|
7682
|
+
"events": []
|
|
7693
7683
|
}
|
|
7694
7684
|
},
|
|
7695
7685
|
{
|
|
@@ -8157,6 +8147,26 @@
|
|
|
8157
8147
|
"default": "['10', '15', '20', '50', '100', msg('All')]"
|
|
8158
8148
|
}
|
|
8159
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
|
+
},
|
|
8160
8170
|
{
|
|
8161
8171
|
"name": "data-testid",
|
|
8162
8172
|
"value": { "type": "string | undefined", "default": "undefined" }
|
|
@@ -8205,6 +8215,26 @@
|
|
|
8205
8215
|
{ "name": "totalItems", "type": "number" },
|
|
8206
8216
|
{ "name": "itemsPerPage", "type": "number" },
|
|
8207
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
|
+
},
|
|
8208
8238
|
{ "name": "dataTestid", "type": "string | undefined" },
|
|
8209
8239
|
{ "name": "labelDataTestid" },
|
|
8210
8240
|
{ "name": "helpTextDataTestid" },
|