@ni/nimble-components 18.4.1 → 18.5.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/all-components-bundle.js +30 -7
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +139 -138
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/banner/index.js +5 -1
- package/dist/esm/banner/index.js.map +1 -1
- package/dist/esm/banner/types.d.ts +8 -0
- package/dist/esm/table/components/row/index.js +2 -2
- package/dist/esm/table/components/row/index.js.map +1 -1
- package/dist/esm/table-column/base/index.d.ts +23 -11
- package/dist/esm/table-column/base/index.js +20 -1
- package/dist/esm/table-column/base/index.js.map +1 -1
- package/dist/esm/table-column/text/index.d.ts +3 -3
- package/dist/esm/table-column/text/index.js +4 -4
- package/dist/esm/table-column/text/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -19174,7 +19174,11 @@
|
|
|
19174
19174
|
* @internal
|
|
19175
19175
|
*/
|
|
19176
19176
|
openChanged() {
|
|
19177
|
-
|
|
19177
|
+
const eventDetail = {
|
|
19178
|
+
newState: this.open,
|
|
19179
|
+
oldState: !this.open
|
|
19180
|
+
};
|
|
19181
|
+
this.$emit('toggle', eventDetail);
|
|
19178
19182
|
}
|
|
19179
19183
|
/**
|
|
19180
19184
|
* @internal
|
|
@@ -26867,6 +26871,19 @@
|
|
|
26867
26871
|
* The base class for table columns
|
|
26868
26872
|
*/
|
|
26869
26873
|
class TableColumn extends FoundationElement {
|
|
26874
|
+
constructor() {
|
|
26875
|
+
super(...arguments);
|
|
26876
|
+
/**
|
|
26877
|
+
* @internal
|
|
26878
|
+
*
|
|
26879
|
+
* The names of the fields from the row's record that correlate to the data that will be in TCellRecord.
|
|
26880
|
+
* This array is parallel with the field names specified by `cellRecordFieldNames`.
|
|
26881
|
+
*/
|
|
26882
|
+
this.dataRecordFieldNames = [];
|
|
26883
|
+
}
|
|
26884
|
+
/**
|
|
26885
|
+
* @internal
|
|
26886
|
+
*/
|
|
26870
26887
|
connectedCallback() {
|
|
26871
26888
|
super.connectedCallback();
|
|
26872
26889
|
this.setAttribute('slot', uniqueId('table-column-slot'));
|
|
@@ -26881,6 +26898,12 @@
|
|
|
26881
26898
|
__decorate$1([
|
|
26882
26899
|
attr({ attribute: 'action-menu-label' })
|
|
26883
26900
|
], TableColumn.prototype, "actionMenuLabel", void 0);
|
|
26901
|
+
__decorate$1([
|
|
26902
|
+
observable
|
|
26903
|
+
], TableColumn.prototype, "dataRecordFieldNames", void 0);
|
|
26904
|
+
__decorate$1([
|
|
26905
|
+
observable
|
|
26906
|
+
], TableColumn.prototype, "columnConfig", void 0);
|
|
26884
26907
|
|
|
26885
26908
|
/**
|
|
26886
26909
|
* Helper class for the nimble-table to validate that the table's configuration
|
|
@@ -27253,7 +27276,7 @@
|
|
|
27253
27276
|
}
|
|
27254
27277
|
get columnStates() {
|
|
27255
27278
|
return this.columns.map(column => {
|
|
27256
|
-
const fieldNames = column.
|
|
27279
|
+
const fieldNames = column.dataRecordFieldNames;
|
|
27257
27280
|
let cellState;
|
|
27258
27281
|
if (this.hasValidFieldNames(fieldNames) && this.dataRecord) {
|
|
27259
27282
|
const cellDataValues = fieldNames.map(field => this.dataRecord[field]);
|
|
@@ -27261,7 +27284,7 @@
|
|
|
27261
27284
|
k,
|
|
27262
27285
|
cellDataValues[i]
|
|
27263
27286
|
]));
|
|
27264
|
-
const columnConfig = column.
|
|
27287
|
+
const columnConfig = column.columnConfig ?? {};
|
|
27265
27288
|
cellState = {
|
|
27266
27289
|
cellRecord,
|
|
27267
27290
|
columnConfig
|
|
@@ -28345,11 +28368,11 @@
|
|
|
28345
28368
|
this.cellStyles = cellStyles;
|
|
28346
28369
|
this.cellTemplate = cellTemplate;
|
|
28347
28370
|
}
|
|
28348
|
-
|
|
28349
|
-
|
|
28371
|
+
fieldNameChanged() {
|
|
28372
|
+
this.dataRecordFieldNames = [this.fieldName];
|
|
28350
28373
|
}
|
|
28351
|
-
|
|
28352
|
-
|
|
28374
|
+
placeholderChanged() {
|
|
28375
|
+
this.columnConfig = { placeholder: this.placeholder ?? '' };
|
|
28353
28376
|
}
|
|
28354
28377
|
}
|
|
28355
28378
|
__decorate$1([
|