@ni/spright-components 4.1.0 → 4.1.2
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.
|
@@ -22107,7 +22107,12 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
22107
22107
|
|
|
22108
22108
|
@keyframes ni-private-drawer-slide-in-right-keyframes {
|
|
22109
22109
|
0% {
|
|
22110
|
-
|
|
22110
|
+
${
|
|
22111
|
+
/*
|
|
22112
|
+
Why 95% instead of 100%? See the following Safari bug:
|
|
22113
|
+
https://bugs.webkit.org/show_bug.cgi?id=279148
|
|
22114
|
+
*/ ''}
|
|
22115
|
+
transform: translate(95%);
|
|
22111
22116
|
}
|
|
22112
22117
|
100% {
|
|
22113
22118
|
transform: translate(0%);
|
|
@@ -67913,10 +67918,6 @@ focus outline in that case.
|
|
|
67913
67918
|
get pageSize() {
|
|
67914
67919
|
return this._pageSize;
|
|
67915
67920
|
}
|
|
67916
|
-
get rowHeight() {
|
|
67917
|
-
return (parseFloat(controlHeight.getValueFor(this.table))
|
|
67918
|
-
+ 2 * parseFloat(borderWidth.getValueFor(this.table)));
|
|
67919
|
-
}
|
|
67920
67921
|
constructor(table, tanStackTable) {
|
|
67921
67922
|
this.visibleItems = [];
|
|
67922
67923
|
this.scrollHeight = 0;
|
|
@@ -67957,6 +67958,13 @@ focus outline in that case.
|
|
|
67957
67958
|
scrollToIndex(index, options) {
|
|
67958
67959
|
this.virtualizer?.scrollToIndex(index, options);
|
|
67959
67960
|
}
|
|
67961
|
+
updateRowHeight() {
|
|
67962
|
+
this.updatePageSize();
|
|
67963
|
+
if (this.virtualizer) {
|
|
67964
|
+
this.updateVirtualizer();
|
|
67965
|
+
this.virtualizer.measure();
|
|
67966
|
+
}
|
|
67967
|
+
}
|
|
67960
67968
|
updateVirtualizer() {
|
|
67961
67969
|
const options = this.createVirtualizerOptions();
|
|
67962
67970
|
if (this.virtualizer) {
|
|
@@ -67969,7 +67977,7 @@ focus outline in that case.
|
|
|
67969
67977
|
this.handleVirtualizerChange();
|
|
67970
67978
|
}
|
|
67971
67979
|
createVirtualizerOptions() {
|
|
67972
|
-
const rowHeight = this.rowHeight;
|
|
67980
|
+
const rowHeight = this.table.rowHeight;
|
|
67973
67981
|
return {
|
|
67974
67982
|
count: this.tanStackTable.getRowModel().rows.length,
|
|
67975
67983
|
getScrollElement: () => {
|
|
@@ -68011,7 +68019,7 @@ focus outline in that case.
|
|
|
68011
68019
|
this.rowContainerYOffset = rowContainerYOffset;
|
|
68012
68020
|
}
|
|
68013
68021
|
updatePageSize() {
|
|
68014
|
-
this._pageSize = Math.round(this.table.viewport.clientHeight / this.rowHeight);
|
|
68022
|
+
this._pageSize = Math.round(this.table.viewport.clientHeight / this.table.rowHeight);
|
|
68015
68023
|
}
|
|
68016
68024
|
}
|
|
68017
68025
|
__decorate$1([
|
|
@@ -70125,6 +70133,12 @@ focus outline in that case.
|
|
|
70125
70133
|
}
|
|
70126
70134
|
return '';
|
|
70127
70135
|
}
|
|
70136
|
+
/**
|
|
70137
|
+
* @internal
|
|
70138
|
+
*/
|
|
70139
|
+
get rowHeight() {
|
|
70140
|
+
return this._rowHeight;
|
|
70141
|
+
}
|
|
70128
70142
|
constructor() {
|
|
70129
70143
|
super();
|
|
70130
70144
|
this.selectionMode = TableRowSelectionMode.none;
|
|
@@ -70178,6 +70192,7 @@ focus outline in that case.
|
|
|
70178
70192
|
this.tableValidator = new TableValidator();
|
|
70179
70193
|
this.tableUpdateTracker = new TableUpdateTracker(this);
|
|
70180
70194
|
this.columnNotifiers = [];
|
|
70195
|
+
this._rowHeight = 0;
|
|
70181
70196
|
this.isInitialized = false;
|
|
70182
70197
|
// Programmatically updating the selection state of a checkbox fires the 'change' event.
|
|
70183
70198
|
// Therefore, selection change events that occur due to programmatically updating
|
|
@@ -70187,6 +70202,16 @@ focus outline in that case.
|
|
|
70187
70202
|
// Map from the external slot name to the record ID of the row that should have the slot
|
|
70188
70203
|
// and the unique slot name that the slot should be slotted into.
|
|
70189
70204
|
this.requestedSlots = new Map();
|
|
70205
|
+
this.borderWidthSubscriber = {
|
|
70206
|
+
handleChange: () => {
|
|
70207
|
+
this.updateRowHeight();
|
|
70208
|
+
}
|
|
70209
|
+
};
|
|
70210
|
+
this.controlHeightSubscriber = {
|
|
70211
|
+
handleChange: () => {
|
|
70212
|
+
this.updateRowHeight();
|
|
70213
|
+
}
|
|
70214
|
+
};
|
|
70190
70215
|
this.actionMenuSlots = [];
|
|
70191
70216
|
this.onViewPortScroll = (event) => {
|
|
70192
70217
|
this.scrollX = event.target.scrollLeft;
|
|
@@ -70294,6 +70319,7 @@ focus outline in that case.
|
|
|
70294
70319
|
connectedCallback() {
|
|
70295
70320
|
super.connectedCallback();
|
|
70296
70321
|
this.initialize();
|
|
70322
|
+
this.updateRowHeight();
|
|
70297
70323
|
this.virtualizer.connect();
|
|
70298
70324
|
this.viewport.addEventListener('scroll', this.onViewPortScroll, {
|
|
70299
70325
|
passive: true
|
|
@@ -70302,6 +70328,8 @@ focus outline in that case.
|
|
|
70302
70328
|
window.addEventListener('keydown', this.onKeyDown);
|
|
70303
70329
|
window.addEventListener('keyup', this.onKeyUp);
|
|
70304
70330
|
window.addEventListener('blur', this.onBlur);
|
|
70331
|
+
borderWidth.subscribe(this.borderWidthSubscriber, this);
|
|
70332
|
+
controlHeight.subscribe(this.controlHeightSubscriber, this);
|
|
70305
70333
|
}
|
|
70306
70334
|
disconnectedCallback() {
|
|
70307
70335
|
super.disconnectedCallback();
|
|
@@ -70311,6 +70339,8 @@ focus outline in that case.
|
|
|
70311
70339
|
window.removeEventListener('keydown', this.onKeyDown);
|
|
70312
70340
|
window.removeEventListener('keyup', this.onKeyUp);
|
|
70313
70341
|
window.removeEventListener('blur', this.onBlur);
|
|
70342
|
+
borderWidth.unsubscribe(this.borderWidthSubscriber);
|
|
70343
|
+
controlHeight.unsubscribe(this.controlHeightSubscriber);
|
|
70314
70344
|
}
|
|
70315
70345
|
checkValidity() {
|
|
70316
70346
|
return this.tableValidator.isValid();
|
|
@@ -70954,6 +70984,11 @@ focus outline in that case.
|
|
|
70954
70984
|
}
|
|
70955
70985
|
return tanstackSelectionState;
|
|
70956
70986
|
}
|
|
70987
|
+
updateRowHeight() {
|
|
70988
|
+
this._rowHeight = parseFloat(controlHeight.getValueFor(this))
|
|
70989
|
+
+ 2 * parseFloat(borderWidth.getValueFor(this));
|
|
70990
|
+
this.virtualizer?.updateRowHeight();
|
|
70991
|
+
}
|
|
70957
70992
|
};
|
|
70958
70993
|
__decorate$1([
|
|
70959
70994
|
attr({ attribute: 'id-field-name' })
|