@nova-design-system/nova-angular-19 3.18.0 → 3.20.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/nova-components/fesm2022/nova-components.mjs +60 -20
- package/dist/nova-components/fesm2022/nova-components.mjs.map +1 -1
- package/dist/nova-components/lib/components/nv-datatable-cell.directive.d.ts +7 -7
- package/dist/nova-components/lib/components/nv-datatable.component.d.ts +107 -59
- package/dist/nova-components/lib/stencil-generated/components.d.ts +13 -4
- package/package.json +1 -1
|
@@ -561,15 +561,15 @@ let NvFielddropdown = class NvFielddropdown {
|
|
|
561
561
|
this.z = z;
|
|
562
562
|
c.detach();
|
|
563
563
|
this.el = r.nativeElement;
|
|
564
|
-
proxyOutputs(this, this.el, ['valueChanged', 'dropdownItemSelected']);
|
|
564
|
+
proxyOutputs(this, this.el, ['valueChanged', 'filterTextChanged', 'openChanged', 'dropdownItemSelected']);
|
|
565
565
|
}
|
|
566
566
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: NvFielddropdown, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
567
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: NvFielddropdown, isStandalone: false, selector: "nv-fielddropdown", inputs: { autocomplete: "autocomplete", autofocus: "autofocus", debounceDelay: "debounceDelay", description: "description", disabled: "disabled", emptyResult: "emptyResult", error: "error", errorDescription: "errorDescription", filterable: "filterable", fluid: "fluid", inputId: "inputId", label: "label", maxHeight: "maxHeight", name: "name",
|
|
567
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: NvFielddropdown, isStandalone: false, selector: "nv-fielddropdown", inputs: { autocomplete: "autocomplete", autofocus: "autofocus", controlledFilter: "controlledFilter", debounceDelay: "debounceDelay", description: "description", disabled: "disabled", emptyResult: "emptyResult", error: "error", errorDescription: "errorDescription", filterable: "filterable", fluid: "fluid", inputId: "inputId", label: "label", maxHeight: "maxHeight", name: "name", openOnSelect: "openOnSelect", options: "options", placeholder: "placeholder", readonly: "readonly", required: "required", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
568
568
|
};
|
|
569
569
|
NvFielddropdown = __decorate([
|
|
570
570
|
ProxyCmp({
|
|
571
|
-
inputs: ['autocomplete', 'autofocus', 'debounceDelay', 'description', 'disabled', 'emptyResult', 'error', 'errorDescription', 'filterable', 'fluid', 'inputId', 'label', 'maxHeight', 'name', '
|
|
572
|
-
methods: ['
|
|
571
|
+
inputs: ['autocomplete', 'autofocus', 'controlledFilter', 'debounceDelay', 'description', 'disabled', 'emptyResult', 'error', 'errorDescription', 'filterable', 'fluid', 'inputId', 'label', 'maxHeight', 'name', 'openOnSelect', 'options', 'placeholder', 'readonly', 'required', 'value'],
|
|
572
|
+
methods: ['clearFilter', 'toggleDropdown']
|
|
573
573
|
})
|
|
574
574
|
], NvFielddropdown);
|
|
575
575
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: NvFielddropdown, decorators: [{
|
|
@@ -579,7 +579,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
579
579
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
580
580
|
template: '<ng-content></ng-content>',
|
|
581
581
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
582
|
-
inputs: ['autocomplete', 'autofocus', 'debounceDelay', 'description', 'disabled', 'emptyResult', 'error', 'errorDescription', 'filterable', 'fluid', 'inputId', 'label', 'maxHeight', 'name', '
|
|
582
|
+
inputs: ['autocomplete', 'autofocus', 'controlledFilter', 'debounceDelay', 'description', 'disabled', 'emptyResult', 'error', 'errorDescription', 'filterable', 'fluid', 'inputId', 'label', 'maxHeight', 'name', 'openOnSelect', 'options', 'placeholder', 'readonly', 'required', 'value'],
|
|
583
583
|
standalone: false
|
|
584
584
|
}]
|
|
585
585
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
@@ -591,11 +591,11 @@ let NvFielddropdownitem = class NvFielddropdownitem {
|
|
|
591
591
|
proxyOutputs(this, this.el, ['dropdownItemSelected']);
|
|
592
592
|
}
|
|
593
593
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: NvFielddropdownitem, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
594
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: NvFielddropdownitem, isStandalone: false, selector: "nv-fielddropdownitem", inputs: { disabled: "disabled", label: "label", selected: "selected", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
594
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: NvFielddropdownitem, isStandalone: false, selector: "nv-fielddropdownitem", inputs: { detached: "detached", disabled: "disabled", label: "label", selected: "selected", value: "value" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
595
595
|
};
|
|
596
596
|
NvFielddropdownitem = __decorate([
|
|
597
597
|
ProxyCmp({
|
|
598
|
-
inputs: ['disabled', 'label', 'selected', 'value']
|
|
598
|
+
inputs: ['detached', 'disabled', 'label', 'selected', 'value']
|
|
599
599
|
})
|
|
600
600
|
], NvFielddropdownitem);
|
|
601
601
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: NvFielddropdownitem, decorators: [{
|
|
@@ -605,7 +605,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
605
605
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
606
606
|
template: '<ng-content></ng-content>',
|
|
607
607
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
608
|
-
inputs: ['disabled', 'label', 'selected', 'value'],
|
|
608
|
+
inputs: ['detached', 'disabled', 'label', 'selected', 'value'],
|
|
609
609
|
standalone: false
|
|
610
610
|
}]
|
|
611
611
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
@@ -2093,7 +2093,8 @@ function createAngularTable(options) {
|
|
|
2093
2093
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
2094
2094
|
/* eslint-disable jsdoc/require-returns */
|
|
2095
2095
|
/**
|
|
2096
|
-
*
|
|
2096
|
+
* A powerful, flexible datatable component built on TanStack Table.
|
|
2097
|
+
* Supports custom cell rendering, column configuration, pagination, and full TypeScript typing.
|
|
2097
2098
|
*/
|
|
2098
2099
|
class NvDatatable {
|
|
2099
2100
|
/** Public getter for table instance. */
|
|
@@ -2135,27 +2136,41 @@ class NvDatatable {
|
|
|
2135
2136
|
const templateMap = this.cellTemplateMap();
|
|
2136
2137
|
return this.columns()
|
|
2137
2138
|
.filter((col) => !col.hidden)
|
|
2138
|
-
.map((col) =>
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
size: col.width,
|
|
2142
|
-
enableResizing: col.resizable ?? true,
|
|
2143
|
-
cell: (context) => {
|
|
2139
|
+
.map((col) => {
|
|
2140
|
+
// Shared cell renderer
|
|
2141
|
+
const cellRenderer = (context) => {
|
|
2144
2142
|
const fieldName = String(col.field);
|
|
2145
2143
|
const cellTemplate = templateMap.get(fieldName);
|
|
2146
2144
|
// Priority: template > renderCell > default
|
|
2147
2145
|
if (cellTemplate) {
|
|
2148
|
-
// Return TemplateRef directly -
|
|
2146
|
+
// Return TemplateRef directly - getValue() returns formatted value
|
|
2149
2147
|
return cellTemplate;
|
|
2150
2148
|
}
|
|
2151
2149
|
// Fall back to renderCell if provided
|
|
2152
2150
|
if (col.renderCell) {
|
|
2153
2151
|
return col.renderCell(context);
|
|
2154
2152
|
}
|
|
2155
|
-
// Default: just return the value
|
|
2153
|
+
// Default: just return the value (formatted if valueFormatter was used)
|
|
2156
2154
|
return context.getValue();
|
|
2157
|
-
}
|
|
2158
|
-
|
|
2155
|
+
};
|
|
2156
|
+
return {
|
|
2157
|
+
accessorKey: col.field,
|
|
2158
|
+
accessorFn: col.valueFormatter
|
|
2159
|
+
? (row) => {
|
|
2160
|
+
const rawValue = row[col.field];
|
|
2161
|
+
return col.valueFormatter({
|
|
2162
|
+
value: rawValue,
|
|
2163
|
+
row,
|
|
2164
|
+
field: col.field,
|
|
2165
|
+
});
|
|
2166
|
+
}
|
|
2167
|
+
: undefined,
|
|
2168
|
+
header: col.headerName || String(col.field),
|
|
2169
|
+
size: col.width,
|
|
2170
|
+
enableResizing: col.resizable ?? true,
|
|
2171
|
+
cell: cellRenderer,
|
|
2172
|
+
};
|
|
2173
|
+
});
|
|
2159
2174
|
});
|
|
2160
2175
|
/** TanStack table instance with Signals */
|
|
2161
2176
|
this.tableInstance = createAngularTable(() => {
|
|
@@ -2467,6 +2482,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
2467
2482
|
type: ContentChildren,
|
|
2468
2483
|
args: [NvDatatableCellDirective]
|
|
2469
2484
|
}] } });
|
|
2485
|
+
/********************************* UTILS **************************************/
|
|
2486
|
+
/**
|
|
2487
|
+
* Creates a strongly-typed column factory for a given row type.
|
|
2488
|
+
*
|
|
2489
|
+
* @template Row The row data type (e.g., `Product`)
|
|
2490
|
+
*
|
|
2491
|
+
* @returns {function} A function that accepts a column definition and infers:
|
|
2492
|
+
* - `K` as the field key (`keyof Row`)
|
|
2493
|
+
* - `F` as the return type of `valueFormatter` (defaults to `Row[K]`)
|
|
2494
|
+
*
|
|
2495
|
+
* @example
|
|
2496
|
+
* ```ts
|
|
2497
|
+
* // Define your row type
|
|
2498
|
+
* interface Product {
|
|
2499
|
+
* name: string;
|
|
2500
|
+
* price: number;
|
|
2501
|
+
* }
|
|
2502
|
+
*
|
|
2503
|
+
* const col = makeColumn<Product>();
|
|
2504
|
+
*/
|
|
2505
|
+
function makeColumn() {
|
|
2506
|
+
return function define(col) {
|
|
2507
|
+
return col;
|
|
2508
|
+
};
|
|
2509
|
+
}
|
|
2470
2510
|
|
|
2471
2511
|
class ValueAccessor {
|
|
2472
2512
|
constructor(el) {
|
|
@@ -3681,5 +3721,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
3681
3721
|
* Generated bundle index. Do not edit.
|
|
3682
3722
|
*/
|
|
3683
3723
|
|
|
3684
|
-
export { NotificationService, NotificationServiceComponent, NovaComponentsModule, NovaComponentsValueAccessorModule, NvAccordion, NvAccordionItem, NvAccordionValueAccessor, NvAlert, NvAlertValueAccessor, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCalendarValueAccessor, NvCol, NvDatagrid, NvDatagridValueAccessor, NvDatagridcolumn, NvDatatable, NvDatatableCellDirective, NvDialog, NvDialogValueAccessor, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFieldcheckboxValueAccessor, NvFielddate, NvFielddateValueAccessor, NvFielddaterange, NvFielddaterangeValueAccessor, NvFielddropdown, NvFielddropdownValueAccessor, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldmultiselectValueAccessor, NvFieldnumber, NvFieldnumberValueAccessor, NvFieldpassword, NvFieldpasswordValueAccessor, NvFieldradio, NvFieldradioValueAccessor, NvFieldselect, NvFieldselectValueAccessor, NvFieldslider, NvFieldsliderValueAccessor, NvFieldtext, NvFieldtextValueAccessor, NvFieldtextarea, NvFieldtextareaValueAccessor, NvFieldtime, NvFieldtimeValueAccessor, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvNotificationValueAccessor, NvNotificationcontainer, NvPopover, NvPopoverValueAccessor, NvRow, NvSplit, NvSplitValueAccessor, NvStack, NvTable, NvToggle, NvToggleValueAccessor, NvTogglebutton, NvTogglebuttongroup, NvTogglebuttongroupValueAccessor, NvTooltip, VALUE_ACCESSORS, flexRenderComponent as nvDatatableRenderComponent };
|
|
3724
|
+
export { NotificationService, NotificationServiceComponent, NovaComponentsModule, NovaComponentsValueAccessorModule, NvAccordion, NvAccordionItem, NvAccordionValueAccessor, NvAlert, NvAlertValueAccessor, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCalendarValueAccessor, NvCol, NvDatagrid, NvDatagridValueAccessor, NvDatagridcolumn, NvDatatable, NvDatatableCellDirective, NvDialog, NvDialogValueAccessor, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFieldcheckboxValueAccessor, NvFielddate, NvFielddateValueAccessor, NvFielddaterange, NvFielddaterangeValueAccessor, NvFielddropdown, NvFielddropdownValueAccessor, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldmultiselectValueAccessor, NvFieldnumber, NvFieldnumberValueAccessor, NvFieldpassword, NvFieldpasswordValueAccessor, NvFieldradio, NvFieldradioValueAccessor, NvFieldselect, NvFieldselectValueAccessor, NvFieldslider, NvFieldsliderValueAccessor, NvFieldtext, NvFieldtextValueAccessor, NvFieldtextarea, NvFieldtextareaValueAccessor, NvFieldtime, NvFieldtimeValueAccessor, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvNotificationValueAccessor, NvNotificationcontainer, NvPopover, NvPopoverValueAccessor, NvRow, NvSplit, NvSplitValueAccessor, NvStack, NvTable, NvToggle, NvToggleValueAccessor, NvTogglebutton, NvTogglebuttongroup, NvTogglebuttongroupValueAccessor, NvTooltip, VALUE_ACCESSORS, makeColumn, flexRenderComponent as nvDatatableRenderComponent };
|
|
3685
3725
|
//# sourceMappingURL=nova-components.mjs.map
|