@ncino/web-components 13.1.2 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/accordion.js +1 -1
- package/dist/components/accordion/gator/base/accordion.gator.js +4 -4
- package/dist/components/button-card/gator/button-card.gator.js +2 -2
- package/dist/components/card/card.js +1 -1
- package/dist/components/card/gator/base/card.gator.js +1 -1
- package/dist/components/display-card/gator/display-card.gator.js +2 -2
- package/dist/components/headline-card/gator/headline-card.gator.js +2 -2
- package/dist/components/image-card/gator/image-card.gator.js +18 -18
- package/dist/components/input/gator/dropdown/input-dropdown.gator.js +17 -17
- package/dist/components/list/gator/list/list.gator.js +2 -3
- package/dist/components/modal/gator/modal.gator.js +12 -12
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/page-header/gator/page-header.gator.js +3 -3
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/table/gator/table.gator.js +8 -7
- package/dist/components/text-detail/text-detail.js +1 -1
- package/dist/components/toast/toast.js +1 -1
- package/dist/components/toast-container/gator/toast-container.gator.js +7 -7
- package/dist/types/components/accordion/accordion.d.ts +3 -1
- package/dist/types/components/accordion/gator/base/accordion.gator.d.ts +2 -1
- package/dist/types/components/card/card.d.ts +3 -1
- package/dist/types/components/image-card/gator/image-card.gator.d.ts +2 -0
- package/dist/types/components/input/gator/dropdown/input-dropdown.gator.d.ts +5 -1
- package/dist/types/components/list/gator/list/list.gator.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +3 -1
- package/dist/types/components/page-header/gator/page-header.gator.d.ts +5 -2
- package/dist/types/components/popover/popover.d.ts +3 -1
- package/dist/types/components/table/table-cell-config.d.ts +1 -0
- package/dist/types/components/text-detail/text-detail.d.ts +3 -1
- package/dist/types/components/toast/toast.d.ts +3 -1
- package/dist/types/utils/mixins/strip-title-from-host-mixin.d.ts +14 -0
- package/dist/types/utils/vitest-utils.d.ts +5 -0
- package/dist/utils/mixins/strip-title-from-host-mixin.js +1 -0
- package/dist/utils/vitest-utils.js +1 -1
- package/package.json +3 -3
- package/web-types.json +1 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
import{property as a}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as u}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{createRef as m}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/ref.js";import{generateRandomId as E}from"../../utils/string-utils.js";import{TestableLitElement as _}from"../../utils/components/testable-lit-element/testable-lit-element.js";import{handleDataTestid as f}from"../../utils/datatestid-utils.js";import{getFirstFocusableElement as
|
|
1
|
+
import{property as a}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as u}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{createRef as m}from"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/ref.js";import{generateRandomId as E}from"../../utils/string-utils.js";import{TestableLitElement as _}from"../../utils/components/testable-lit-element/testable-lit-element.js";import{handleDataTestid as f}from"../../utils/datatestid-utils.js";import{StripTitleFromHostMixin as b}from"../../utils/mixins/strip-title-from-host-mixin.js";import{getFirstFocusableElement as y,getFocusableElements as v}from"../../utils/accessibility-utils.js";var w=Object.defineProperty,r=(d,e,t,s)=>{for(var o=void 0,i=d.length-1,h;i>=0;i--)(h=d[i])&&(o=h(e,t,o)||o);return o&&w(e,t,o),o};class n extends b(_){constructor(){super(...arguments),this.referenceId="",this.title="",this.xOffset=0,this.yOffset=0,this.iconName=void 0,this.errorText=void 0,this.size="medium",this.showOnHover=!1,this._popoverRef=m(),this._forceOpen=!1,this._open=!1,this._mousedInsidePopover=!1,this._placement="top",this.popoverId=E(),this.elementListeners=new WeakMap}get isOpen(){return this._open}firstUpdated(){if(this._popoverRef.value&&(this._popoverRef.value.style.visibility="hidden",this._popoverRef.value.style.opacity="0"),!this.referenceId)return;const e=this.referenceElement,t=this._popoverRef.value;if(!e||!t)return;let s;e.shadowRoot?.delegatesFocus?s=y(e):s=e,s&&(s.ariaDescribedByElements=[this]),f(e,this.dataTestid,"trigger"),f(t,this.dataTestid,"popover"),e.shadowRoot?.firstElementChild?.setAttribute("aria-expanded","false"),this.showOnHover?this._addShowOnHoverEvents(e,t):this._addShowOnClickEvents(e,t)}updated(e){if(super.updated(e),e.has("showOnHover")&&e.get("showOnHover")!==void 0){const t=this.referenceElement,s=this._popoverRef.value;s&&(this.removeAllTrackedEventListeners(t),this.removeAllTrackedEventListeners(s),this.removeAllTrackedEventListeners(document),this.showOnHover?this._addShowOnHoverEvents(t,s):this._addShowOnClickEvents(t,s))}}get referenceElement(){let e=document.querySelector(`#${this.referenceId}`);return e||(e=document.querySelector(`[data-id="${this.referenceId}"]`)?.shadowRoot?.querySelector(`#${this.referenceId}`)),!e&&this.previousElementSibling&&this.previousElementSibling.id===this.referenceId&&(e=this.previousElementSibling),e}_addShowOnHoverEvents(e,t){this.addTrackedEventListener(e,"mouseenter",()=>this.showPopover()),this.addTrackedEventListener(e,"mouseleave",s=>this._handleMouseLeave(s,e,t)),this.addTrackedEventListener(e,"click",()=>this.showPopover(!0)),this.addTrackedEventListener(t,"mouseenter",()=>this.showPopover()),this.addTrackedEventListener(t,"mouseleave",s=>{if(this._mousedInsidePopover){this.hidePopover();return}this._handleMouseLeave(s,e,t)})}_addShowOnClickEvents(e,t){this.addTrackedEventListener(e,"click",()=>this.showPopover()),this.addTrackedEventListener(document,"click",s=>{const o=t.getBoundingClientRect(),h=s.composedPath().includes(e);!(this._isMouseInside(s,o,25)||this._hasPopoverAsParent(s.target))&&!h&&this.hidePopover()})}_hasPopoverAsParent(e){let t=e?.parentElement;for(;t&&t.tagName.toLowerCase()!=="ngc-popover";)t=t?.parentElement;return!!t}addTrackedEventListener(e,t,s,o={}){this.elementListeners.has(e)||this.elementListeners.set(e,[]),this.elementListeners.get(e).push({eventType:t,listener:s,options:o}),e.addEventListener(t,s,o)}removeAllTrackedEventListeners(e){if(!this.elementListeners.has(e))return;const t=this.elementListeners.get(e);for(const{eventType:s,listener:o,options:i}of t)e.removeEventListener(s,o,i);this.elementListeners.delete(e)}_handleMouseLeave(e,t,s){const o=t.getBoundingClientRect(),i=s.getBoundingClientRect(),h=this._isMouseInside(e,o,-5),l=this._isMouseInside(e,i,25);!h&&!l&&this.hidePopover(),l&&(this._mousedInsidePopover=!0)}_isMouseInside(e,t,s=0){const{left:o,right:i,top:h,bottom:l}=t,c=e.clientX,p=e.clientY;return c>=o-s&&c<=i+s&&p>=h-s&&p<=l+s}showPopover(e=!1){this.assignPosition();const t=this.referenceElement,s=this._popoverRef.value;s&&(s.style.visibility="visible",s.style.opacity="1"),t&&t.shadowRoot?.firstElementChild?.setAttribute("aria-expanded","true"),this._open=!0,this._focusFirstElement(e)}hidePopover(){this._forceOpen||(this._popoverRef.value&&(this._popoverRef.value.style.visibility="hidden",this._popoverRef.value.style.opacity="0"),this.referenceElement&&this.referenceElement.shadowRoot?.firstElementChild?.setAttribute("aria-expanded","false"),this._open=!1,this.dispatchEvent(new CustomEvent("closed",{bubbles:!0})))}_getKeyboardFocusableElements(){let e=[];const t=this.shadowRoot?.querySelector('slot[name="footer"]');if(this.shadowRoot&&(e=e.concat(v(this.shadowRoot))),t){const s=Array.from(t.assignedElements());for(const o of s)e=e.concat(v(o))}return e.filter(s=>!s.hasAttribute("disabled")&&!s.hasAttribute("aria-hidden"))}_focusFirstElement(e=!1){const t=this._getKeyboardFocusableElements();if(t.length>0){const s=t[0];requestAnimationFrame(()=>{let o;e?o=s:(o=s.shadowRoot?.firstElementChild,o?.classList.add("no-focus-visible")),o?.focus()})}}assignPosition(){}disconnectedCallback(){this._cleanup&&this._cleanup(),super.disconnectedCallback()}}r([a({attribute:"reference-id"})],n.prototype,"referenceId");r([a({type:String,attribute:!1})],n.prototype,"title");r([a()],n.prototype,"placement");r([a({type:Number,attribute:"x-offset"})],n.prototype,"xOffset");r([a({type:Number,attribute:"y-offset"})],n.prototype,"yOffset");r([a({type:String,attribute:"icon-name"})],n.prototype,"iconName");r([a({type:String,attribute:"error-text"})],n.prototype,"errorText");r([a()],n.prototype,"size");r([a({type:Boolean,attribute:"show-on-hover"})],n.prototype,"showOnHover");r([u()],n.prototype,"_open");export{n as NjcPopover};
|
|
@@ -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 b,html as o}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as v}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as $}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{customElement as y}from"../../../utils/decorators/custom-element-decorator.js";import{msg as g}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{NjcTable as F}from"../table.js";import{formatTableTextValue as S}from"../table-format-utils.js";import
|
|
1
|
+
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as b,html as o}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as v}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as $}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{customElement as y}from"../../../utils/decorators/custom-element-decorator.js";import{msg as g}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{NjcTable as F}from"../table.js";import{formatTableTextValue as S}from"../table-format-utils.js";import T from"../../../packages/web-components/src/components/table/gator/table.gator.scss.js";import x from"../../../packages/styles/dist/tokens/primitive.tokens.css.js";import P 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{unsafeCSS as C}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var _=Object.defineProperty,R=Object.getOwnPropertyDescriptor,p=(e,t,l,i)=>{for(var s=i>1?void 0:i?R(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&&_(t,l,s),s};let c=class extends F{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)=>{const l=e.filterOptions??[],i=(this._filterSearchQuery[e.field]??"").toLowerCase(),s=i?l.filter(u=>u.label.toLowerCase().includes(i)):l,r=this.hasActiveFilter(e),a=e.filterMultiselect===!0,d=this.getEffectivePending(e),n=s.map(u=>({title:u.label,value:String(u.value)})),h=a?d.join(";"):"",f=a?"":d||"";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}"
|
|
@@ -9,7 +9,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
9
9
|
></ngc-icon-button>
|
|
10
10
|
<ngc-popover
|
|
11
11
|
reference-id="filter-trigger-${e.field}"
|
|
12
|
-
title
|
|
12
|
+
.title=${g("Filter")}
|
|
13
13
|
size="small"
|
|
14
14
|
@closed="${()=>this.handleFilterPopoverClosed(e)}"
|
|
15
15
|
>
|
|
@@ -49,7 +49,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
49
49
|
?visible="${this.showBulkControls}"
|
|
50
50
|
.selectedRows="${this.selectedRows.length}"
|
|
51
51
|
.totalRows="${this.data.length}"
|
|
52
|
-
?allSelected="${this.selectedRows.length===this.data.length}"
|
|
52
|
+
?allSelected="${this.selectedRows.length===this.data.filter(i=>!i.isTableHeader&&!i.disabled).length}"
|
|
53
53
|
@selectall="${this.handleSelectAll}"
|
|
54
54
|
>
|
|
55
55
|
<slot name="bulk-controls"></slot>
|
|
@@ -93,7 +93,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
93
93
|
<ngc-checkbox
|
|
94
94
|
title-text="${g("Select All")}"
|
|
95
95
|
hide-label
|
|
96
|
-
?selected="${this.selectedRows.length===this.data.length}"
|
|
96
|
+
?selected="${this.selectedRows.length===this.data.filter(l=>!l.isTableHeader&&!l.disabled).length}"
|
|
97
97
|
@change="${l=>this.handleSelectAll(l)}"
|
|
98
98
|
></ngc-checkbox>
|
|
99
99
|
</th>`),o`
|
|
@@ -102,7 +102,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
102
102
|
${t}
|
|
103
103
|
</tr>
|
|
104
104
|
</thead>
|
|
105
|
-
`}handleSelectAll(e){const t=e.detail.selected;t?(this.data.forEach(l=>{l.isTableHeader
|
|
105
|
+
`}handleSelectAll(e){const t=e.detail.selected;t?(this.data.forEach(l=>{!l.isTableHeader&&!l.disabled&&(l.selected=!0)}),this.selectedRows=this.data.filter(l=>!l.isTableHeader&&!l.disabled)):(this.data.forEach(l=>{l.disabled||(l.selected=!1)}),this.selectedRows=[]),this.dispatchEvent(new CustomEvent("selectall",{bubbles:!0,composed:!0,detail:{selectedRows:this.selectedRows,selected:t}})),this.requestUpdate()}get effectiveSortField(){return this.sortField??this._sortField}get effectiveSortDirection(){return this.sortField!=null?this.sortDirection??"asc":this._sortDirection}getSortIcon(e){return this.effectiveSortField===e.field?this.effectiveSortDirection==="asc"?"arrow-up":"arrow-down":"arrows-down-up"}getSortAriaSort(e){return this.effectiveSortField!==e.field?"none":this.effectiveSortDirection==="asc"?"ascending":"descending"}handleSortColumn(e){const t=this.effectiveSortField===e.field&&this.effectiveSortDirection==="asc"?"desc":"asc";this.sortField==null&&(this._sortField=e.field,this._sortDirection=t),this.dispatchEvent(new CustomEvent("sort",{bubbles:!0,composed:!0,detail:{field:e.field,direction:t}})),this.requestUpdate()}getTableHeaderColumn(e){const t=e.field.startsWith("skeleton-loader"),l=o`
|
|
106
106
|
<ngc-skeleton-loader
|
|
107
107
|
full-width
|
|
108
108
|
height="24"
|
|
@@ -177,6 +177,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
177
177
|
<td role="gridcell" class="gator-table-checkbox-column" headers="${r}">
|
|
178
178
|
<ngc-checkbox
|
|
179
179
|
label="test"
|
|
180
|
+
?disabled="${e.disabled}"
|
|
180
181
|
?selected="${e.selected}"
|
|
181
182
|
@change="${a=>this.handleTableBodyRowSelected(a,e)}"
|
|
182
183
|
id="checkbox-${e.id||Math.random().toString(36).substring(2,11)}"
|
|
@@ -192,7 +193,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
192
193
|
${i}
|
|
193
194
|
</th>
|
|
194
195
|
</tr>
|
|
195
|
-
`}handleTableBodyRowSelected(e,t){e.detail.selected?(t.selected=!0,this.selectedRows.push(t),this.addSkipLinkToBulkActions(e.target)):(t.selected=!1,this.selectedRows=this.selectedRows.filter(l=>l!==t),this.removeSkipLinkToBulkActions(e.target)),this.dispatchEvent(new CustomEvent("rowselected",{bubbles:!0,composed:!0,detail:{data:t,selectedRows:this.selectedRows}})),this.requestUpdate()}addSkipLinkToBulkActions(e){e.parentNode?.querySelector("ngc-skip-link")||e.parentNode?.insertBefore(this.getSkipToBulkActionsMarkup(e),e)}getSkipToBulkActionsMarkup(e){const t=document.createElement("ngc-skip-link");return t.target=this.shadowRoot?.querySelector("ngc-table-bulk-controls")||"",t.text=g("Jump to table actions"),t.referenceElement=e,t.placement="top-start",t.xOffset=4,t.yOffset=-12,t.onblur=this.removeSkipLinkToBulkActions.bind(this,e),t}removeSkipLinkToBulkActions(e){e.parentNode?.querySelector("ngc-skip-link")?.remove()}get displayedRowData(){if(this.skeleton){let i=[];for(let s=0;s<5;s++)i=i.concat({skeleton:!0});return i}if(!this.includePagination)return this.data;const e=(this._currentPage-1)*this.itemsPerPage,t=e+this.itemsPerPage;return this.data.slice(e,t)}getTableBodyCell(e,t,l,i=0){const s=!!e.skeleton,r=o`
|
|
196
|
+
`}handleTableBodyRowSelected(e,t){t.disabled||(e.detail.selected?(t.selected=!0,this.selectedRows.push(t),this.addSkipLinkToBulkActions(e.target)):(t.selected=!1,this.selectedRows=this.selectedRows.filter(l=>l!==t),this.removeSkipLinkToBulkActions(e.target)),this.dispatchEvent(new CustomEvent("rowselected",{bubbles:!0,composed:!0,detail:{data:t,selectedRows:this.selectedRows}}))),this.requestUpdate()}addSkipLinkToBulkActions(e){e.parentNode?.querySelector("ngc-skip-link")||e.parentNode?.insertBefore(this.getSkipToBulkActionsMarkup(e),e)}getSkipToBulkActionsMarkup(e){const t=document.createElement("ngc-skip-link");return t.target=this.shadowRoot?.querySelector("ngc-table-bulk-controls")||"",t.text=g("Jump to table actions"),t.referenceElement=e,t.placement="top-start",t.xOffset=4,t.yOffset=-12,t.onblur=this.removeSkipLinkToBulkActions.bind(this,e),t}removeSkipLinkToBulkActions(e){e.parentNode?.querySelector("ngc-skip-link")?.remove()}get displayedRowData(){if(this.skeleton){let i=[];for(let s=0;s<5;s++)i=i.concat({skeleton:!0});return i}if(!this.includePagination)return this.data;const e=(this._currentPage-1)*this.itemsPerPage,t=e+this.itemsPerPage;return this.data.slice(e,t)}getTableBodyCell(e,t,l,i=0){const s=!!e.skeleton,r=o`
|
|
196
197
|
<ngc-skeleton-loader
|
|
197
198
|
full-width
|
|
198
199
|
height="24"
|
|
@@ -202,4 +203,4 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
202
203
|
<td role="gridcell" headers="${d}" class="${n}">
|
|
203
204
|
${h}
|
|
204
205
|
</td>
|
|
205
|
-
`}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}}}))}};c.styles=[C(
|
|
206
|
+
`}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}}}))}};c.styles=[C(P),C(x),C(T)];p([v({type:Boolean})],c.prototype,"elevated",2);p([v({type:Boolean,attribute:"include-pagination"})],c.prototype,"includePagination",2);p([v({type:Boolean})],c.prototype,"skeleton",2);p([v({type:String,attribute:"sort-field"})],c.prototype,"sortField",2);p([v({type:String,attribute:"sort-direction"})],c.prototype,"sortDirection",2);p([v({type:Object,attribute:!1})],c.prototype,"filterValues",2);p([$()],c.prototype,"selectedRows",2);p([$()],c.prototype,"_currentPage",2);p([$()],c.prototype,"_sortField",2);p([$()],c.prototype,"_sortDirection",2);p([$()],c.prototype,"_hoveredHeaderColumnField",2);p([$()],c.prototype,"_pendingFilterValues",2);p([$()],c.prototype,"_filterSearchQuery",2);c=p([y("ngc-table")],c);export{c 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{TestableLitElement as a}from"../../utils/components/testable-lit-element/testable-lit-element.js";var y=Object.defineProperty,e=(o,p,l,
|
|
1
|
+
import{property as t}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{TestableLitElement as a}from"../../utils/components/testable-lit-element/testable-lit-element.js";import{StripTitleFromHostMixin as u}from"../../utils/mixins/strip-title-from-host-mixin.js";var y=Object.defineProperty,e=(o,p,l,f)=>{for(var r=void 0,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=n(p,l,r)||r);return r&&y(p,l,r),r};class i extends u(a){constructor(){super(...arguments),this.title="",this.subtitle="",this.size="medium",this.subtitleIcon="",this.skeleton=!1,this.vertical=!1,this.invertTitle=!1}}e([t({type:String,attribute:!1})],i.prototype,"title");e([t({type:String})],i.prototype,"subtitle");e([t()],i.prototype,"size");e([t({attribute:"subtitle-icon",type:String})],i.prototype,"subtitleIcon");e([t({type:Boolean})],i.prototype,"skeleton");e([t({type:Boolean})],i.prototype,"vertical");e([t({attribute:"invert-title",type:Boolean})],i.prototype,"invertTitle");export{i as NjcTextDetail};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as
|
|
1
|
+
import"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as m}from"../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as i}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{msg as y}from"../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as c}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{StripTitleFromHostMixin as b}from"../../utils/mixins/strip-title-from-host-mixin.js";var f=Object.defineProperty,u=Object.getOwnPropertyDescriptor,e=(n,r,p,s)=>{for(var o=s>1?void 0:s?u(r,p):r,a=n.length-1,l;a>=0;a--)(l=n[a])&&(o=(s?l(r,p,o):l(o))||o);return s&&o&&f(r,p,o),o};let t=class extends b(m){constructor(){super(...arguments),this.id="",this.variant="info",this.dismissible=!1,this.sticky=!1,this.exitIconLabel=y("Close Notification"),this.statusIconLabel="",this.title="",this.subtitle=""}};e([i({type:String})],t.prototype,"id",2);e([i()],t.prototype,"variant",2);e([i({type:Boolean})],t.prototype,"dismissible",2);e([i({type:Boolean})],t.prototype,"sticky",2);e([i({type:String,attribute:"exit-icon-label"})],t.prototype,"exitIconLabel",2);e([i({type:String,attribute:"status-icon-label"})],t.prototype,"statusIconLabel",2);e([i({type:String,attribute:!1})],t.prototype,"title",2);e([i({type:String})],t.prototype,"subtitle",2);t=e([c()],t);export{t as NjcToast};
|
|
@@ -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 l}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as c}from"../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as f}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as u}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{customElement as h}from"../../../utils/decorators/custom-element-decorator.js";import _ from"../../../packages/web-components/src/components/toast-container/gator/toast-container.gator.scss.js";import T from"../../../packages/styles/dist/tokens/primitive.tokens.css.js";import $ from"../../../packages/styles/dist/tokens/semantic.tokens.css.js";import{repeat as b}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.js";import{ifDefined as
|
|
1
|
+
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as l}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as c}from"../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{property as f}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as u}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{customElement as h}from"../../../utils/decorators/custom-element-decorator.js";import _ from"../../../packages/web-components/src/components/toast-container/gator/toast-container.gator.scss.js";import T from"../../../packages/styles/dist/tokens/primitive.tokens.css.js";import $ from"../../../packages/styles/dist/tokens/semantic.tokens.css.js";import{repeat as b}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/repeat.js";import{ifDefined as n}from"../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/if-defined.js";import{TOAST_ANIMATION_DURATION_MS as g}from"../../toast/gator/toast-constants.js";import"../../toast/gator/base/toast.gator.js";import{unsafeCSS as m}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";var v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,p=(t,i,o,s)=>{for(var r=s>1?void 0:s?y(i,o):i,e=t.length-1,d;e>=0;e--)(d=t[e])&&(r=(s?d(i,o,r):d(r))||r);return s&&r&&v(i,o,r),r};let a=class extends c{constructor(){super(...arguments),this.toasts=[],this._renderedToasts=[]}updated(t){if(t.has("toasts")){const i=this.toasts.filter(e=>e.id?!0:(console.warn("[ngc-toast-container] A toast was provided without a required `id` property and will be ignored.",e),!1)),o=new Set(i.map(e=>e.id)),s=[];this._renderedToasts.forEach(e=>{o.has(e.id)?s.push(e):s.push({...e,initiateRemoval:!0})});const r=new Set(this._renderedToasts.map(e=>e.id));i.forEach(e=>{r.has(e.id)||s.push(e)}),this._renderedToasts=s}}handleAnimationEnd(t){if(t.animationName==="toast-fade-out"){const o=t.target.getAttribute("id");o&&(this._renderedToasts=this._renderedToasts.filter(s=>s.id!==o))}}render(){return l`
|
|
2
2
|
<section
|
|
3
3
|
class="gator-toast-container"
|
|
4
4
|
aria-live="polite"
|
|
@@ -8,15 +8,15 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit
|
|
|
8
8
|
<ngc-toast
|
|
9
9
|
class="${t.initiateRemoval?"toast-fade-out":""}"
|
|
10
10
|
id="${t.id}"
|
|
11
|
-
variant="${
|
|
12
|
-
title
|
|
13
|
-
subtitle="${
|
|
14
|
-
exit-icon-label="${
|
|
15
|
-
status-icon-label="${
|
|
11
|
+
variant="${n(t.variant)}"
|
|
12
|
+
.title=${t.title??""}
|
|
13
|
+
subtitle="${n(t.subtitle)}"
|
|
14
|
+
exit-icon-label="${n(t.exitIconLabel)}"
|
|
15
|
+
status-icon-label="${n(t.statusIconLabel)}"
|
|
16
16
|
?sticky="${t.sticky}"
|
|
17
17
|
?dismissible="${t.dismissible}"
|
|
18
18
|
@animationend=${this.handleAnimationEnd}
|
|
19
19
|
></ngc-toast>
|
|
20
20
|
`)}
|
|
21
21
|
</section>
|
|
22
|
-
`}};
|
|
22
|
+
`}};a.styles=[m(_),m(T),m($)];p([f({type:Array})],a.prototype,"toasts",2);p([u()],a.prototype,"_renderedToasts",2);a=p([h("ngc-toast-container")],a);export{a as NgcToastContainer};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TestableLitElement } from '../../utils/components/testable-lit-element/testable-lit-element';
|
|
2
|
-
|
|
2
|
+
declare const NjcAccordion_base: typeof TestableLitElement;
|
|
3
|
+
export declare class NjcAccordion extends NjcAccordion_base {
|
|
3
4
|
/**
|
|
4
5
|
@property isExpanded - Expanded state of the accordion
|
|
5
6
|
@type {boolean}
|
|
@@ -21,3 +22,4 @@ export declare class NjcAccordion extends TestableLitElement {
|
|
|
21
22
|
headingLevel: string;
|
|
22
23
|
toggleAccordion(): void;
|
|
23
24
|
}
|
|
25
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NjcAccordion } from '../../accordion.ts';
|
|
2
|
+
import { PropertyValues } from 'lit';
|
|
2
3
|
/**
|
|
3
4
|
* @slot - The content within the expandable body of the accordion
|
|
4
5
|
*/
|
|
@@ -31,7 +32,7 @@ export declare class NgcAccordion extends NjcAccordion {
|
|
|
31
32
|
borderBottomRightRadius: string;
|
|
32
33
|
borderBottomLeftRadius: string;
|
|
33
34
|
} | undefined;
|
|
34
|
-
updated(): void;
|
|
35
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
35
36
|
}
|
|
36
37
|
declare global {
|
|
37
38
|
interface HTMLElementTagNameMap {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TestableLitElement } from '../../utils/components/testable-lit-element/testable-lit-element';
|
|
2
|
-
|
|
2
|
+
declare const NjcCard_base: typeof TestableLitElement;
|
|
3
|
+
export declare class NjcCard extends NjcCard_base {
|
|
3
4
|
static styles: import('lit').CSSResult[];
|
|
4
5
|
/**
|
|
5
6
|
* @description The title for the card
|
|
@@ -32,3 +33,4 @@ export declare class NjcCard extends TestableLitElement {
|
|
|
32
33
|
*/
|
|
33
34
|
disabled: boolean;
|
|
34
35
|
}
|
|
36
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
1
2
|
import { Ref } from 'lit/directives/ref.js';
|
|
2
3
|
import { NjcImageCard } from '../image-card.ts';
|
|
3
4
|
export declare class NgcImageCard extends NjcImageCard {
|
|
@@ -5,6 +6,7 @@ export declare class NgcImageCard extends NjcImageCard {
|
|
|
5
6
|
containerRef: Ref<HTMLInputElement>;
|
|
6
7
|
private _onImageMouseEnter;
|
|
7
8
|
private _onImageMouseLeave;
|
|
9
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
8
10
|
render(): import('lit').TemplateResult<1>;
|
|
9
11
|
get contentClass(): {
|
|
10
12
|
'gator-image-card-content': boolean;
|
|
@@ -116,7 +116,11 @@ export declare class NgcInputDropdown extends NgcInputBase {
|
|
|
116
116
|
removeSelection(value: string | number): void;
|
|
117
117
|
get fauxInputMarkup(): import('lit').TemplateResult<1>;
|
|
118
118
|
get displayedValue(): string;
|
|
119
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Combobox text: multiselect autocomplete uses `_searchValue` only.
|
|
121
|
+
* Single-select autocomplete: while expanded, show `displayedValue` until the user types
|
|
122
|
+
* (`_searchValue` empty) so the list is not filtered by the committed selection on open.
|
|
123
|
+
*/
|
|
120
124
|
private get autocompleteEditorValue();
|
|
121
125
|
get showPlaceholder(): boolean | "";
|
|
122
126
|
get listboxMarkup(): import('lit').TemplateResult<1>;
|
|
@@ -63,7 +63,7 @@ export declare class NgcList extends NgcComponent {
|
|
|
63
63
|
get listRole(): 'listbox' | 'list' | 'group';
|
|
64
64
|
handleSlotChanged(): void;
|
|
65
65
|
updateSlottedItems(): void;
|
|
66
|
-
setFalseFocusToValue(value: string | number | File | File[] | Date):
|
|
66
|
+
setFalseFocusToValue(value: string | number | File | File[] | Date): Element | undefined;
|
|
67
67
|
setCurrentListItem(): Element | undefined;
|
|
68
68
|
_setFauxFocusToCurrentItem(): void;
|
|
69
69
|
falseFocusFirstItem(): Element | undefined;
|
|
@@ -2,7 +2,8 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
export type NJC_MODAL_DIALOG_ROLES = 'dialog' | 'alertdialog';
|
|
3
3
|
export type NJC_MODAL_VARIANTS = 'decide' | 'destructive' | 'confirmation' | 'dismiss';
|
|
4
4
|
export type NJC_MODAL_SIZES = 'small' | 'standard' | 'fullscreen';
|
|
5
|
-
|
|
5
|
+
declare const NjcModal_base: typeof LitElement;
|
|
6
|
+
export declare class NjcModal extends NjcModal_base {
|
|
6
7
|
/**
|
|
7
8
|
* @property {NJC_MODAL_DIALOG_ROLES} dialogRole - The aria-role of the modal.
|
|
8
9
|
*/
|
|
@@ -44,3 +45,4 @@ export declare class NjcModal extends LitElement {
|
|
|
44
45
|
*/
|
|
45
46
|
loading: boolean;
|
|
46
47
|
}
|
|
48
|
+
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
1
2
|
import { TestableLitElement } from '../../../utils/components/testable-lit-element/testable-lit-element.ts';
|
|
2
|
-
|
|
3
|
+
declare const NgcPageHeader_base: typeof TestableLitElement;
|
|
4
|
+
export declare class NgcPageHeader extends NgcPageHeader_base {
|
|
3
5
|
static styles: import('lit').CSSResult[];
|
|
4
6
|
title: string;
|
|
5
7
|
subtitle: string;
|
|
6
8
|
skeleton: boolean;
|
|
7
9
|
_showBreadcrumbs: boolean;
|
|
8
10
|
private _showTabs;
|
|
9
|
-
updated(): void;
|
|
11
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
10
12
|
render(): import('lit').TemplateResult<1>;
|
|
11
13
|
private get _breadcrumbSkeletonMarkup();
|
|
12
14
|
private get _actionsSkeletonMarkup();
|
|
@@ -17,3 +19,4 @@ declare global {
|
|
|
17
19
|
'ngc-page-header': NgcPageHeader;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
22
|
+
export {};
|
|
@@ -3,7 +3,8 @@ import { Ref } from 'lit/directives/ref.js';
|
|
|
3
3
|
import { TestableLitElement } from '../../utils/components/testable-lit-element/testable-lit-element.ts';
|
|
4
4
|
import { PropertyValues } from 'lit';
|
|
5
5
|
export type NJC_POPOVER_SIZE = 'small' | 'medium' | 'large';
|
|
6
|
-
|
|
6
|
+
declare const NjcPopover_base: typeof TestableLitElement;
|
|
7
|
+
export declare class NjcPopover extends NjcPopover_base {
|
|
7
8
|
/**
|
|
8
9
|
* @property {string} referenceId
|
|
9
10
|
* @description The id of the reference element that is used to trigger the popover
|
|
@@ -79,3 +80,4 @@ export declare class NjcPopover extends TestableLitElement {
|
|
|
79
80
|
protected assignPosition(): void;
|
|
80
81
|
disconnectedCallback(): void;
|
|
81
82
|
}
|
|
83
|
+
export {};
|
|
@@ -22,6 +22,7 @@ export interface TableAvatarCellConfig extends TableCellConfigBase {
|
|
|
22
22
|
avatarInitialsField?: string;
|
|
23
23
|
}
|
|
24
24
|
export interface TableCheckboxCellConfig extends TableCellConfigBase {
|
|
25
|
+
disabled?: boolean;
|
|
25
26
|
}
|
|
26
27
|
export interface TableTextLinkCellConfig extends TableCellConfigBase {
|
|
27
28
|
href?: string | ((row: RowData) => string);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TestableLitElement } from '../../utils/components/testable-lit-element/testable-lit-element';
|
|
2
2
|
export type NJC_TEXT_DETAIL_SIZES = null | 'small' | 'medium' | 'large';
|
|
3
|
-
|
|
3
|
+
declare const NjcTextDetail_base: typeof TestableLitElement;
|
|
4
|
+
export declare class NjcTextDetail extends NjcTextDetail_base {
|
|
4
5
|
/**
|
|
5
6
|
* @description The text detail title
|
|
6
7
|
* @property {string} title
|
|
@@ -37,3 +38,4 @@ export declare class NjcTextDetail extends TestableLitElement {
|
|
|
37
38
|
*/
|
|
38
39
|
invertTitle: boolean;
|
|
39
40
|
}
|
|
41
|
+
export {};
|
|
@@ -10,7 +10,8 @@ export type NJC_TOAST_OPTIONS = {
|
|
|
10
10
|
exitIconLabel?: string;
|
|
11
11
|
statusIconLabel?: string;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
declare const NjcToast_base: typeof LitElement;
|
|
14
|
+
export declare class NjcToast extends NjcToast_base {
|
|
14
15
|
/**
|
|
15
16
|
* Unique identifier for the toast.
|
|
16
17
|
*/
|
|
@@ -51,3 +52,4 @@ export declare class NjcToast extends LitElement {
|
|
|
51
52
|
*/
|
|
52
53
|
subtitle: string;
|
|
53
54
|
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
type Constructor<T extends object = object> = abstract new (...args: any[]) => T;
|
|
3
|
+
/** Components with a Lit `title` used as visible heading text (not the HTML tooltip). */
|
|
4
|
+
export interface TitleHost {
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Copies host `title="..."` into the Lit `title` property and removes the attribute so the
|
|
9
|
+
* browser does not show a native tooltip. Use with `@property({ type: String, attribute: false }) title`.
|
|
10
|
+
*
|
|
11
|
+
* A `MutationObserver` covers Storybook and other cases that only touch the attribute.
|
|
12
|
+
*/
|
|
13
|
+
export declare function StripTitleFromHostMixin<T extends Constructor<LitElement & TitleHost>>(superClass: T): T;
|
|
14
|
+
export {};
|
|
@@ -13,6 +13,11 @@ export declare function getNamedSlotTextContent(element: HTMLElement | null, nam
|
|
|
13
13
|
export declare function getSlottedElements(element: HTMLElement | null, elementFilter?: string | null): Element[] | undefined;
|
|
14
14
|
export declare function getNamedSlottedElements(element: HTMLElement | null, name: string): Element[] | undefined;
|
|
15
15
|
export declare function flushPromises(time?: number): Promise<unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* For components whose Lit `title` is heading text (not the HTML tooltip): the host must
|
|
18
|
+
* not keep a `title` attribute, while `HTMLElement#title` reflects the Lit property value.
|
|
19
|
+
*/
|
|
20
|
+
export declare function expectLitHeadingTitle(element: Element | null | undefined, expected: string): void;
|
|
16
21
|
/**
|
|
17
22
|
* Removes Lit-related comments from a given innerHTML string and normalizes whitespace.
|
|
18
23
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function l(t){class e extends t{_pullHostTitleAttribute(){this.hasAttribute("title")&&(this.title=this.getAttribute("title")??"",this.removeAttribute("title"))}connectedCallback(){super.connectedCallback(),this._hostTitleObserver=new MutationObserver(()=>this._pullHostTitleAttribute()),this._hostTitleObserver.observe(this,{attributes:!0,attributeFilter:["title"]}),this._pullHostTitleAttribute()}disconnectedCallback(){this._hostTitleObserver?.disconnect(),this._hostTitleObserver=void 0,super.disconnectedCallback()}updated(i){super.updated(i),this.title?this.dataset.title=this.title:delete this.dataset.title}}return e}export{l as StripTitleFromHostMixin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
async function
|
|
1
|
+
import{g as r}from"../node_modules/.pnpm/vitest@4.1.1_@types_node@25.5.0_@vitest_browser-playwright@4.1.1_@vitest_ui@4.1.0_jsdom_6987228cf79758f3d05c697357fc8c5a/node_modules/vitest/dist/chunks/test.CBQUpOM3.js";async function u(e){document.body.innerHTML=e,await new Promise(t=>setTimeout(t,0))}function a(e){return document.body.querySelector(e)}function c(e,t){return e?.querySelector(t)}function d(e,t){return e?.querySelectorAll(t)}function i(e){return document.body.querySelectorAll(e)}function m(e,t){return e?.shadowRoot?.querySelectorAll(t)}function f(e,t){return e?.shadowRoot?.querySelector(t)}function g(e,t){return e?.shadowRoot?.querySelector(`[data-testid="${t}"]`)}function E(e,t){return e?.shadowRoot?.querySelector(t)}function S(e,t){return e?.shadowRoot?.querySelectorAll(t)}function y(e){const t=e?.shadowRoot?.querySelectorAll("slot"),n=Array.from(t).find(l=>l.name==="")?.assignedNodes({flatten:!0}).filter(l=>l.textContent?.trim()!=="");return n&&n.length>0?n[0].textContent:null}function h(e,t){const o=e?.shadowRoot?.querySelector(`slot[name="${t}"]`);return(o?.assignedNodes().length?o?.assignedNodes({flatten:!0})[0]:o?.assignedElements({flatten:!0})[0])?.textContent}function w(e,t=null){let n=e?.shadowRoot?.querySelector("slot")?.assignedElements({flatten:!0});return t&&(n=n?.filter(l=>l.tagName.toLowerCase()===t)),n}function R(e,t){return e?.shadowRoot?.querySelector(`slot[name=${t}]`)?.assignedElements({flatten:!0})}function T(e=0){return new Promise(t=>setTimeout(t,e))}function q(e,t){r(e).toBeTruthy();const o=e;r(o.getAttribute("title")).toBeNull(),r(o.title).toBe(t)}function x(e){const t=/<!--\?lit\$[^\$]*\$-->/g;return e.replace(t,"").replace(/\s+/g," ").trim()}export{u as addTestableElement,x as cleanInnerHTML,q as expectLitHeadingTitle,T as flushPromises,a as getElement,c as getElementInsideElement,i as getElements,d as getElementsInsideElement,h as getNamedSlotTextContent,R as getNamedSlottedElements,E as getShadowRootElement,g as getShadowRootElementByDataTestId,S as getShadowRootElements,f as getShadowRootHTMLElement,m as getShadowRootHTMLElements,y as getSlotTextContent,w as getSlottedElements};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ncino/web-components",
|
|
3
3
|
"author": "nCino",
|
|
4
|
-
"version": "13.
|
|
4
|
+
"version": "13.2.0",
|
|
5
5
|
"license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -100,10 +100,10 @@
|
|
|
100
100
|
"vite-plugin-static-copy": "^3.3.0",
|
|
101
101
|
"vitest": "^4.1.0",
|
|
102
102
|
"yaml-eslint-parser": "^2.0.0",
|
|
103
|
-
"@ncino/styles": "13.
|
|
103
|
+
"@ncino/styles": "13.2.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@ncino/styles": "13.
|
|
106
|
+
"@ncino/styles": "13.2.0"
|
|
107
107
|
},
|
|
108
108
|
"bugs": {
|
|
109
109
|
"url": "https://github.com/ncino/force-sdk-web-components/issues"
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@ncino/web-components",
|
|
4
|
-
"version": "13.1.
|
|
4
|
+
"version": "13.1.3",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -232,7 +232,6 @@
|
|
|
232
232
|
"description": "\n---\n",
|
|
233
233
|
"doc-url": "",
|
|
234
234
|
"attributes": [
|
|
235
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
236
235
|
{
|
|
237
236
|
"name": "subtitle",
|
|
238
237
|
"value": { "type": "string", "default": "''" }
|
|
@@ -300,7 +299,6 @@
|
|
|
300
299
|
"description": "\n---\n",
|
|
301
300
|
"doc-url": "",
|
|
302
301
|
"attributes": [
|
|
303
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
304
302
|
{
|
|
305
303
|
"name": "subtitle",
|
|
306
304
|
"value": { "type": "string", "default": "''" }
|
|
@@ -369,7 +367,6 @@
|
|
|
369
367
|
"name": "is-expanded",
|
|
370
368
|
"value": { "type": "boolean", "default": "false" }
|
|
371
369
|
},
|
|
372
|
-
{ "name": "title", "value": { "type": "String", "default": "''" } },
|
|
373
370
|
{
|
|
374
371
|
"name": "subtitle",
|
|
375
372
|
"value": { "type": "String", "default": "''" }
|
|
@@ -438,7 +435,6 @@
|
|
|
438
435
|
"name": "is-expanded",
|
|
439
436
|
"value": { "type": "boolean", "default": "false" }
|
|
440
437
|
},
|
|
441
|
-
{ "name": "title", "value": { "type": "String", "default": "''" } },
|
|
442
438
|
{
|
|
443
439
|
"name": "subtitle",
|
|
444
440
|
"value": { "type": "String", "default": "''" }
|
|
@@ -1946,7 +1942,6 @@
|
|
|
1946
1942
|
"name": "selected",
|
|
1947
1943
|
"value": { "type": "boolean", "default": "false" }
|
|
1948
1944
|
},
|
|
1949
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
1950
1945
|
{
|
|
1951
1946
|
"name": "subtitle",
|
|
1952
1947
|
"value": { "type": "string", "default": "''" }
|
|
@@ -2884,7 +2879,6 @@
|
|
|
2884
2879
|
"name": "hide-footer",
|
|
2885
2880
|
"value": { "type": "boolean", "default": "false" }
|
|
2886
2881
|
},
|
|
2887
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
2888
2882
|
{
|
|
2889
2883
|
"name": "subtitle",
|
|
2890
2884
|
"value": { "type": "string", "default": "''" }
|
|
@@ -3368,7 +3362,6 @@
|
|
|
3368
3362
|
"name": "status-icon-label",
|
|
3369
3363
|
"value": { "type": "string", "default": "''" }
|
|
3370
3364
|
},
|
|
3371
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
3372
3365
|
{
|
|
3373
3366
|
"name": "subtitle",
|
|
3374
3367
|
"value": { "type": "string", "default": "''" }
|
|
@@ -3427,7 +3420,6 @@
|
|
|
3427
3420
|
"name": "status-icon-label",
|
|
3428
3421
|
"value": { "type": "string", "default": "''" }
|
|
3429
3422
|
},
|
|
3430
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
3431
3423
|
{
|
|
3432
3424
|
"name": "subtitle",
|
|
3433
3425
|
"value": { "type": "string", "default": "''" }
|
|
@@ -3486,7 +3478,6 @@
|
|
|
3486
3478
|
"name": "status-icon-label",
|
|
3487
3479
|
"value": { "type": "string", "default": "''" }
|
|
3488
3480
|
},
|
|
3489
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
3490
3481
|
{
|
|
3491
3482
|
"name": "subtitle",
|
|
3492
3483
|
"value": { "type": "string", "default": "''" }
|
|
@@ -3701,7 +3692,6 @@
|
|
|
3701
3692
|
"name": "illustration-name",
|
|
3702
3693
|
"value": { "type": "string", "default": "'balloons'" }
|
|
3703
3694
|
},
|
|
3704
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
3705
3695
|
{
|
|
3706
3696
|
"name": "subtitle",
|
|
3707
3697
|
"value": { "type": "string", "default": "''" }
|
|
@@ -6129,7 +6119,6 @@
|
|
|
6129
6119
|
"name": "image-alt",
|
|
6130
6120
|
"value": { "type": "string", "default": "''" }
|
|
6131
6121
|
},
|
|
6132
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
6133
6122
|
{
|
|
6134
6123
|
"name": "subtitle",
|
|
6135
6124
|
"value": { "type": "string", "default": "''" }
|
|
@@ -6347,7 +6336,6 @@
|
|
|
6347
6336
|
"default": "'standard'"
|
|
6348
6337
|
}
|
|
6349
6338
|
},
|
|
6350
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
6351
6339
|
{
|
|
6352
6340
|
"name": "subtitle",
|
|
6353
6341
|
"value": { "type": "string", "default": "''" }
|
|
@@ -6487,7 +6475,6 @@
|
|
|
6487
6475
|
"description": "\n---\n",
|
|
6488
6476
|
"doc-url": "",
|
|
6489
6477
|
"attributes": [
|
|
6490
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
6491
6478
|
{
|
|
6492
6479
|
"name": "subtitle",
|
|
6493
6480
|
"value": { "type": "string", "default": "''" }
|
|
@@ -6624,7 +6611,6 @@
|
|
|
6624
6611
|
"name": "reference-id",
|
|
6625
6612
|
"value": { "type": "string", "default": "''" }
|
|
6626
6613
|
},
|
|
6627
|
-
{ "name": "title", "value": { "type": "string", "default": "''" } },
|
|
6628
6614
|
{
|
|
6629
6615
|
"name": "placement",
|
|
6630
6616
|
"value": { "type": "Placement | undefined" }
|