@ncino/web-components 5.0.0-preview.9 → 5.0.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/table/gator/table-bulk-controls/table-bulk-controls.gator.js +16 -0
- package/dist/components/table/gator/table.gator.js +55 -36
- package/dist/packages/web-components/src/components/table/gator/table-bulk-controls/table-bulk-controls.gator.scss.js +1 -0
- package/dist/types/components/table/gator/table-bulk-controls/table-bulk-controls.gator.d.ts +29 -0
- package/dist/types/components/table/gator/table-bulk-controls/table-bulk-controls.gator.test.d.ts +0 -0
- package/dist/types/components/table/gator/table.gator.d.ts +9 -0
- package/package.json +1 -1
- package/web-types.json +81 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as m,html as b}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{customElement as u}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as c}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{NgcComponent as f}from"../../../../utils/components/ngc-component.js";import d from"../../../../packages/web-components/src/components/table/gator/table-bulk-controls/table-bulk-controls.gator.scss.js";import{msg as p}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"../../../checkbox/checkbox.gator.js";import{unsafeCSS as h}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var v=Object.defineProperty,g=Object.getOwnPropertyDescriptor,y=Object.getPrototypeOf,_=Reflect.get,r=(l,o,s,a)=>{for(var t=a>1?void 0:a?g(o,s):o,i=l.length-1,n;i>=0;i--)(n=l[i])&&(t=(a?n(o,s,t):n(t))||t);return a&&t&&v(o,s,t),t},S=(l,o,s)=>_(y(l),s,o);let e=class extends f{constructor(){super(...arguments),this.visible=!1,this.selectedRows=0,this.totalRows=0,this.allSelected=!1}handleSelectAllChange(l){this.dispatchEvent(new CustomEvent("selectall",{bubbles:!0,detail:{selected:l.detail.selected}}))}render(){return this.visible?b`
|
|
2
|
+
<div class="gator-table-bulk-controls" aria-live="polite">
|
|
3
|
+
<div class="gator-table-bulk-controls-selection">
|
|
4
|
+
<ngc-checkbox
|
|
5
|
+
title-text="${p("Select All")}"
|
|
6
|
+
hide-label
|
|
7
|
+
?selected="${this.allSelected}"
|
|
8
|
+
@change="${this.handleSelectAllChange}"
|
|
9
|
+
></ngc-checkbox>
|
|
10
|
+
<span class="gator-table-bulk-controls-count">${this.selectedRows} ${p("selected")}</span>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="gator-table-bulk-controls-actions">
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
`:m}focus(){}};e.styles=[...S(e,e,"styles"),h(d)];r([c({type:Boolean,reflect:!0})],e.prototype,"visible",2);r([c({type:Number})],e.prototype,"selectedRows",2);r([c({type:Number})],e.prototype,"totalRows",2);r([c({type:Boolean,reflect:!0})],e.prototype,"allSelected",2);e=r([u("ngc-table-bulk-controls")],e);export{e as NgcTableBulkControls};
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as
|
|
1
|
+
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as w,html as o}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{customElement as $}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as f}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{state as g}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import T from"../../../packages/web-components/src/components/table/table.tokens.scss.js";import R from"../../../packages/web-components/src/components/table/gator/table.gator.scss.js";import y from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import k from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{NjcTable as C}from"../table.js";import"../../checkbox/checkbox.gator.js";import"./table-bulk-controls/table-bulk-controls.gator.js";import{unsafeHTML as P}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/unsafe-html.js";import{msg as b}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{KEY_CONSTANTS as S}from"../../../consts/key-constants.js";import{unsafeCSS as p}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var v=Object.defineProperty,L=Object.getOwnPropertyDescriptor,c=(e,t,l,s)=>{for(var a=s>1?void 0:s?L(t,l):t,r=e.length-1,i;r>=0;r--)(i=e[r])&&(a=(s?i(t,l,a):i(a))||a);return s&&a&&v(t,l,a),a};let d=class extends C{constructor(){super(...arguments),this.elevated=!1,this.includePagination=!1,this.selectedRows=[],this._currentPage=1,this.justSelectedRow=null,this.showJumpLink=!1,this.handleKeyDown=e=>{e.key===S.TAB&&(e.shiftKey&&(this.showJumpLink=!0,this.requestUpdate()),document.removeEventListener("keydown",this.handleKeyDown,!0))}}updated(e){super.updated(e),e.has("data")&&(this.selectedRows=this.data.filter(t=>t.selected&&!t.isTableHeader))}render(){return this.columns?this.renderWrapper(this.getTableHeader(this.columns),this.getTableBody(this.columns,this.displayedRowData)):null}get tableElevatedClass(){return this.elevated?"gator-table-elevated":""}get showBulkControls(){return this.selectable&&this.selectedRows.length>0}renderWrapper(e,t){return o`
|
|
2
|
+
<ngc-table-bulk-controls
|
|
3
|
+
?visible="${this.showBulkControls}"
|
|
4
|
+
.selectedRows="${this.selectedRows.length}"
|
|
5
|
+
.totalRows="${this.data.length}"
|
|
6
|
+
?allSelected="${this.selectedRows.length===this.data.length}"
|
|
7
|
+
@selectall="${this.handleSelectAll}"
|
|
8
|
+
>
|
|
9
|
+
<slot name="bulk-controls"></slot>
|
|
10
|
+
</ngc-table-bulk-controls>
|
|
2
11
|
<table class="gator-table ${this.tableElevatedClass}" role="grid"
|
|
3
12
|
aria-labelledby="${this.tableAriaLabelledBy}">
|
|
4
|
-
${
|
|
13
|
+
${e} ${t}
|
|
5
14
|
</table>
|
|
6
|
-
${this.includePagination?
|
|
15
|
+
${this.includePagination?o`
|
|
7
16
|
<ngc-table-pagination
|
|
8
17
|
items-per-page="${this.itemsPerPage}"
|
|
9
18
|
total-items="${this.data.length}"
|
|
@@ -11,31 +20,31 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
|
|
|
11
20
|
@pagechanged="${this.handlePageChanged}"
|
|
12
21
|
@itemsperpagechanged="${this.handleItemsPerPageChanged}"
|
|
13
22
|
></ngc-table-pagination>
|
|
14
|
-
`:
|
|
15
|
-
`}handlePageChanged(
|
|
23
|
+
`:w}
|
|
24
|
+
`}handlePageChanged(e){this._currentPage=e.detail.page}handleItemsPerPageChanged(e){this.itemsPerPage=e.detail.itemsPerPage}handleJumpLinkClick(e){const t=this.shadowRoot?.querySelector("ngc-table-bulk-controls");t&&t.focus()}handleJumpLinkBlur(){this.showJumpLink=!1,this.requestUpdate()}handleRowSelectCheckboxBlur(){setTimeout(()=>{const e=this.shadowRoot?.activeElement;(!e||!e.classList.contains("gator-table-jump-link"))&&(this.showJumpLink=!1,document.removeEventListener("keydown",this.handleKeyDown,!0),this.requestUpdate())},0)}getTableHeader(e){const t=e.map(this.getTableHeaderColumn);return this.selectable&&t.unshift(o`
|
|
16
25
|
<th id="col-select" scope="col">
|
|
17
26
|
<ngc-checkbox
|
|
18
|
-
title-text="${
|
|
27
|
+
title-text="${b("Select All")}"
|
|
19
28
|
hide-label
|
|
20
29
|
?selected="${this.selectedRows.length===this.data.length}"
|
|
21
30
|
@change="${l=>this.handleSelectAll(l)}"
|
|
22
31
|
></ngc-checkbox>
|
|
23
|
-
</th>`),
|
|
32
|
+
</th>`),o`
|
|
24
33
|
<thead role="rowgroup">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
<tr role="row">
|
|
35
|
+
${t}
|
|
36
|
+
</tr>
|
|
28
37
|
</thead>
|
|
29
|
-
`}handleSelectAll(
|
|
30
|
-
<th id="${
|
|
31
|
-
${l.map(a=>this.getCategoryBody(a,
|
|
32
|
-
`}getCategoryBody(t
|
|
33
|
-
<tbody role="rowgroup" ${s?
|
|
38
|
+
`}handleSelectAll(e){const t=e.detail.selected;t?(this.data.forEach(l=>{l.isTableHeader||(l.selected=!0)}),this.selectedRows=this.data.filter(l=>!l.isTableHeader)):(this.data.forEach(l=>{l.selected=!1}),this.selectedRows=[]),this.dispatchEvent(new CustomEvent("selectall",{bubbles:!0,detail:{selectedRows:this.selectedRows,selected:t}})),this.requestUpdate()}getTableHeaderColumn(e){const t=`col-${e.field}`;return o`
|
|
39
|
+
<th id="${t}" scope="col">${e.name}</th>`}getTableBody(e,t){const l=[];let s={rows:[]};return t.forEach(a=>{a.isTableHeader?((s.rows.length>0||s.header)&&l.push(s),s={header:a,rows:[]}):s.rows.push(a)}),(s.rows.length>0||s.header)&&l.push(s),l.length===0&&t.length>0&&l.push({rows:t}),o`
|
|
40
|
+
${l.map(a=>this.getCategoryBody(a,e))}
|
|
41
|
+
`}getCategoryBody(e,t){let l="",s="",a="";e.header&&(l=e.header.headerText||e.header.categoryText||e.header.name||"Category",a=`category-${l.toLowerCase().replace(/\s+/g,"-")}`,s=a);const r=e.header?this.getTableHeaderRow(t,e.header):"",i=e.rows.map(h=>this.getTableBodyRow(h,t,a)),m=t.some(h=>h.includedInTotals===!0),n=e.rows.length>0&&m?this.getTotalRow(e.rows,t,a):"";return o`
|
|
42
|
+
<tbody role="rowgroup" ${s?o`aria-labelledby="${s}"`:""}>
|
|
43
|
+
${r}
|
|
34
44
|
${i}
|
|
35
|
-
${
|
|
36
|
-
${o}
|
|
45
|
+
${n}
|
|
37
46
|
</tbody>
|
|
38
|
-
`}getTotalRow(t,
|
|
47
|
+
`}getTotalRow(e,t,l){const s={};t.forEach(n=>{s[n.field]=0,n.includedInTotals&&e.forEach(h=>{const u=this.parseNumericValue(h[n.field]);u!==null&&(s[n.field]+=u)})});const a=l?`${l}-total`:"total-row",r=o`
|
|
39
48
|
<th
|
|
40
49
|
id="${a}"
|
|
41
50
|
scope="row"
|
|
@@ -43,45 +52,55 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
|
|
|
43
52
|
>
|
|
44
53
|
Total
|
|
45
54
|
</th>
|
|
46
|
-
`,
|
|
55
|
+
`,i=t.map(n=>{const h=`col-${n.field}`,u=[a,l,h].filter(Boolean).join(" ");return n.includedInTotals?o`
|
|
47
56
|
<td
|
|
48
57
|
role="gridcell"
|
|
49
|
-
headers="${
|
|
58
|
+
headers="${u}"
|
|
50
59
|
class="gator-table-total-cell"
|
|
51
60
|
>
|
|
52
|
-
${this.formatTotal(s[
|
|
61
|
+
${this.formatTotal(s[n.field],n)}
|
|
53
62
|
</td>
|
|
54
|
-
`:
|
|
63
|
+
`:o`
|
|
55
64
|
<td
|
|
56
65
|
role="gridcell"
|
|
57
66
|
class="gator-table-total-cell"
|
|
58
67
|
>
|
|
59
68
|
|
|
60
69
|
</td>
|
|
61
|
-
`}),
|
|
70
|
+
`}),m=this.selectable?[r,...i]:[r,...i.slice(1)];return o`
|
|
62
71
|
<tr role="row" class="gator-table-total-row">
|
|
63
|
-
${
|
|
72
|
+
${m}
|
|
64
73
|
</tr>
|
|
65
|
-
`}parseNumericValue(
|
|
74
|
+
`}parseNumericValue(e){if(typeof e=="number")return e;if(typeof e=="string"){const t=e.replace(/[^0-9.-]/g,""),l=parseFloat(t);if(!isNaN(l))return l}return null}formatTotal(e,t){const l=typeof t.decimalPlaces=="number"?t.decimalPlaces:2,s=e.toFixed(l);return typeof t.cellRenderer=="function"?t.cellRenderer({[t.field]:s}):s}getTableBodyRow(e,t,l){const s=t.map(a=>this.getTableBodyCell(e,a,l));if(this.selectable){const a=l?`col-select ${l}`:"col-select",r=this.showJumpLink&&this.justSelectedRow===e;s.unshift(o`
|
|
66
75
|
<td role="gridcell" class="gator-table-checkbox-column" headers="${a}">
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
${r?o`
|
|
77
|
+
<ngc-button
|
|
78
|
+
variant="base"
|
|
79
|
+
class="gator-table-jump-link"
|
|
80
|
+
@click="${this.handleJumpLinkClick}"
|
|
81
|
+
@blur="${this.handleJumpLinkBlur}"
|
|
82
|
+
>
|
|
83
|
+
${b("Jump to bulk actions")}
|
|
84
|
+
</ngc-button>`:o`<ngc-checkbox
|
|
85
|
+
label="test"
|
|
86
|
+
?selected="${e.selected}"
|
|
87
|
+
@change="${i=>this.handleTableBodyRowSelected(i,e)}"
|
|
88
|
+
id="checkbox-${e.id||Math.random().toString(36).substring(2,11)}"
|
|
89
|
+
@blur="${this.handleRowSelectCheckboxBlur}"
|
|
90
|
+
></ngc-checkbox>`}
|
|
91
|
+
</td>`),r&&setTimeout(()=>{this.shadowRoot?.querySelector(".gator-table-jump-link")?.focus()},0)}return o`
|
|
92
|
+
<tr role="row" class="${this.selectable&&e.selected?"gator-table-row-selected":""}">
|
|
74
93
|
${s}
|
|
75
94
|
</tr>
|
|
76
|
-
`}getTableHeaderRow(t
|
|
95
|
+
`}getTableHeaderRow(e,t){const l=this.selectable?e.length+1:e.length,s=t.headerText||t.categoryText||t.name||"Category";return o`
|
|
77
96
|
<tr role="row" class="gator-table-category-header">
|
|
78
97
|
<th role="rowheader" colspan="${l}" scope="rowgroup" class="gator-table-header-cell"
|
|
79
98
|
id="${`category-${s.toLowerCase().replace(/\s+/g,"-")}`}">
|
|
80
99
|
${s}
|
|
81
100
|
</th>
|
|
82
101
|
</tr>
|
|
83
|
-
`}handleTableBodyRowSelected(t
|
|
102
|
+
`}handleTableBodyRowSelected(e,t){e.detail.selected?(t.selected=!0,this.selectedRows.push(t),this.justSelectedRow=t,this.showJumpLink=!1,document.addEventListener("keydown",this.handleKeyDown,!0)):(t.selected=!1,this.selectedRows=this.selectedRows.filter(l=>l!==t),this.justSelectedRow===t&&(this.justSelectedRow=null,this.showJumpLink=!1)),this.dispatchEvent(new CustomEvent("rowselected",{bubbles:!0,detail:{data:t,selectedRows:this.selectedRows}})),this.requestUpdate()}get displayedRowData(){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){const s=`col-${t.field}`,a=l?`${s} ${l}`:s;return o`
|
|
84
103
|
<td role="gridcell" headers="${a}">
|
|
85
|
-
${
|
|
104
|
+
${P(this.getValueForCell(e,t))}
|
|
86
105
|
</td>
|
|
87
|
-
`}getValueForCell(t
|
|
106
|
+
`}getValueForCell(e,t){return typeof t.cellRenderer=="function"?t.cellRenderer(e):e[t.field]}};d.styles=[p(k),p(y),p(T),p(R)];c([f({type:Boolean})],d.prototype,"elevated",2);c([f({type:Boolean,attribute:"include-pagination"})],d.prototype,"includePagination",2);c([g()],d.prototype,"selectedRows",2);c([g()],d.prototype,"_currentPage",2);c([g()],d.prototype,"justSelectedRow",2);c([g()],d.prototype,"showJumpLink",2);d=c([$("ngc-table")],d);export{d as NgcTable};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r='.gator-table-bulk-controls{margin-bottom:1rem;display:flex;flex-direction:row;align-items:center;padding:var(--spacing-padding-margin-8, .5rem) var(--spacing-padding-margin-16, 1rem);border-radius:var(--ngc-table-bulk-controls-border-radius, 1rem);gap:1rem;background-color:var(--color-surface-brand, #F3F5F7)}.gator-table-bulk-controls-selection{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-padding-margin-8, .5rem);padding-left:.5rem}.gator-table-bulk-controls-count{font-family:var(--text-family-body),"Open Sans",sans-serif;font-size:var(--text-size-body-2, .875rem);color:var(--text-color-primary-base, #1F1F1F)}.gator-table-bulk-controls-actions{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-padding-margin-8, .5rem)}';export{r as default};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { nothing } from 'lit';
|
|
2
|
+
import { NgcComponent } from '../../../../utils/components/ngc-component.ts';
|
|
3
|
+
export declare class NgcTableBulkControls extends NgcComponent {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the bulk controls should be visible
|
|
6
|
+
*/
|
|
7
|
+
visible: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The number of selected rows
|
|
10
|
+
*/
|
|
11
|
+
selectedRows: number;
|
|
12
|
+
/**
|
|
13
|
+
* The total number of rows
|
|
14
|
+
*/
|
|
15
|
+
totalRows: number;
|
|
16
|
+
/**
|
|
17
|
+
* Whether all rows are selected
|
|
18
|
+
*/
|
|
19
|
+
allSelected: boolean;
|
|
20
|
+
static styles: import('lit').CSSResult[];
|
|
21
|
+
private handleSelectAllChange;
|
|
22
|
+
render(): import('lit').TemplateResult<1> | typeof nothing;
|
|
23
|
+
focus(): void;
|
|
24
|
+
}
|
|
25
|
+
declare global {
|
|
26
|
+
interface HTMLElementTagNameMap {
|
|
27
|
+
'ngc-table-bulk-controls': NgcTableBulkControls;
|
|
28
|
+
}
|
|
29
|
+
}
|
package/dist/types/components/table/gator/table-bulk-controls/table-bulk-controls.gator.test.d.ts
ADDED
|
File without changes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
1
2
|
import { NjcTable, RowData } from '../table.ts';
|
|
2
3
|
export declare class NgcTable extends NjcTable {
|
|
3
4
|
elevated: boolean;
|
|
@@ -5,11 +6,18 @@ export declare class NgcTable extends NjcTable {
|
|
|
5
6
|
static styles: import('lit').CSSResult[];
|
|
6
7
|
selectedRows: RowData[];
|
|
7
8
|
_currentPage: number;
|
|
9
|
+
justSelectedRow: RowData | null;
|
|
10
|
+
showJumpLink: boolean;
|
|
11
|
+
protected updated(_changedProperties: PropertyValues): void;
|
|
8
12
|
render(): import('lit').TemplateResult<1> | null;
|
|
9
13
|
get tableElevatedClass(): "" | "gator-table-elevated";
|
|
14
|
+
get showBulkControls(): boolean;
|
|
10
15
|
renderWrapper(header: unknown, body: unknown): import('lit').TemplateResult<1>;
|
|
11
16
|
handlePageChanged(event: CustomEvent): void;
|
|
12
17
|
handleItemsPerPageChanged(event: CustomEvent): void;
|
|
18
|
+
private handleJumpLinkClick;
|
|
19
|
+
private handleJumpLinkBlur;
|
|
20
|
+
private handleRowSelectCheckboxBlur;
|
|
13
21
|
private getTableHeader;
|
|
14
22
|
handleSelectAll(event: CustomEvent): void;
|
|
15
23
|
private getTableHeaderColumn;
|
|
@@ -20,6 +28,7 @@ export declare class NgcTable extends NjcTable {
|
|
|
20
28
|
private formatTotal;
|
|
21
29
|
private getTableBodyRow;
|
|
22
30
|
private getTableHeaderRow;
|
|
31
|
+
handleKeyDown: (e: KeyboardEvent) => void;
|
|
23
32
|
handleTableBodyRowSelected(event: CustomEvent, rowData: RowData): void;
|
|
24
33
|
get displayedRowData(): RowData[];
|
|
25
34
|
private getTableBodyCell;
|
package/package.json
CHANGED
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": "5.0.0-preview.
|
|
4
|
+
"version": "5.0.0-preview.10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -5312,6 +5312,82 @@
|
|
|
5312
5312
|
"events": []
|
|
5313
5313
|
}
|
|
5314
5314
|
},
|
|
5315
|
+
{
|
|
5316
|
+
"name": "ngc-table-bulk-controls",
|
|
5317
|
+
"description": "\n---\n\n\n### **Events:**\n - **selectall**\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.",
|
|
5318
|
+
"doc-url": "",
|
|
5319
|
+
"attributes": [
|
|
5320
|
+
{
|
|
5321
|
+
"name": "visible",
|
|
5322
|
+
"description": "Whether the bulk controls should be visible",
|
|
5323
|
+
"value": { "type": "boolean", "default": "false" }
|
|
5324
|
+
},
|
|
5325
|
+
{
|
|
5326
|
+
"name": "selectedRows",
|
|
5327
|
+
"description": "The number of selected rows",
|
|
5328
|
+
"value": { "type": "number", "default": "0" }
|
|
5329
|
+
},
|
|
5330
|
+
{
|
|
5331
|
+
"name": "totalRows",
|
|
5332
|
+
"description": "The total number of rows",
|
|
5333
|
+
"value": { "type": "number", "default": "0" }
|
|
5334
|
+
},
|
|
5335
|
+
{
|
|
5336
|
+
"name": "allSelected",
|
|
5337
|
+
"description": "Whether all rows are selected",
|
|
5338
|
+
"value": { "type": "boolean", "default": "false" }
|
|
5339
|
+
},
|
|
5340
|
+
{
|
|
5341
|
+
"name": "delegatesARIA",
|
|
5342
|
+
"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.",
|
|
5343
|
+
"value": { "type": "boolean", "default": "true" }
|
|
5344
|
+
},
|
|
5345
|
+
{
|
|
5346
|
+
"name": "data-testid",
|
|
5347
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
5348
|
+
}
|
|
5349
|
+
],
|
|
5350
|
+
"events": [{ "name": "selectall", "type": "CustomEvent" }],
|
|
5351
|
+
"js": {
|
|
5352
|
+
"properties": [
|
|
5353
|
+
{
|
|
5354
|
+
"name": "visible",
|
|
5355
|
+
"description": "Whether the bulk controls should be visible",
|
|
5356
|
+
"type": "boolean"
|
|
5357
|
+
},
|
|
5358
|
+
{
|
|
5359
|
+
"name": "selectedRows",
|
|
5360
|
+
"description": "The number of selected rows",
|
|
5361
|
+
"type": "number"
|
|
5362
|
+
},
|
|
5363
|
+
{
|
|
5364
|
+
"name": "totalRows",
|
|
5365
|
+
"description": "The total number of rows",
|
|
5366
|
+
"type": "number"
|
|
5367
|
+
},
|
|
5368
|
+
{
|
|
5369
|
+
"name": "allSelected",
|
|
5370
|
+
"description": "Whether all rows are selected",
|
|
5371
|
+
"type": "boolean"
|
|
5372
|
+
},
|
|
5373
|
+
{
|
|
5374
|
+
"name": "shouldApplyAttributeDeletion",
|
|
5375
|
+
"description": "Determines whether attribute deletion should be applied.\nThis is controlled by the `delegatesARIA` property.",
|
|
5376
|
+
"type": "boolean"
|
|
5377
|
+
},
|
|
5378
|
+
{
|
|
5379
|
+
"name": "delegatesARIA",
|
|
5380
|
+
"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.",
|
|
5381
|
+
"type": "boolean"
|
|
5382
|
+
},
|
|
5383
|
+
{ "name": "dataTestid", "type": "string | undefined" },
|
|
5384
|
+
{ "name": "labelDataTestid" },
|
|
5385
|
+
{ "name": "helpTextDataTestid" },
|
|
5386
|
+
{ "name": "errorMessageDataTestid" }
|
|
5387
|
+
],
|
|
5388
|
+
"events": [{ "name": "selectall", "type": "CustomEvent" }]
|
|
5389
|
+
}
|
|
5390
|
+
},
|
|
5315
5391
|
{
|
|
5316
5392
|
"name": "ngc-table",
|
|
5317
5393
|
"description": "\n---\n\n\n### **Events:**\n - **selectall**\n- **rowselected**",
|
|
@@ -5368,7 +5444,11 @@
|
|
|
5368
5444
|
{ "name": "includePagination", "type": "boolean" },
|
|
5369
5445
|
{ "name": "selectedRows", "type": "RowData[]" },
|
|
5370
5446
|
{ "name": "_currentPage", "type": "number" },
|
|
5447
|
+
{ "name": "justSelectedRow", "type": "RowData | null" },
|
|
5448
|
+
{ "name": "showJumpLink", "type": "boolean" },
|
|
5371
5449
|
{ "name": "tableElevatedClass" },
|
|
5450
|
+
{ "name": "showBulkControls" },
|
|
5451
|
+
{ "name": "handleKeyDown" },
|
|
5372
5452
|
{ "name": "displayedRowData" },
|
|
5373
5453
|
{ "name": "columns", "type": "ColumnDefinition[]" },
|
|
5374
5454
|
{ "name": "data", "type": "RowData[]" },
|