@nova-design-system/nova-angular 3.14.0 → 3.16.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.
Files changed (41) hide show
  1. package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render/context.mjs +6 -0
  2. package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render/flags.mjs +42 -0
  3. package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render/flex-render-component-ref.mjs +171 -0
  4. package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render/flex-render-component.mjs +39 -0
  5. package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render/view.mjs +101 -0
  6. package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render.mjs +211 -0
  7. package/dist/nova-components/esm2022/lib/components/datatable.utils/index.mjs +49 -0
  8. package/dist/nova-components/esm2022/lib/components/datatable.utils/lazy-signal-initializer.mjs +43 -0
  9. package/dist/nova-components/esm2022/lib/components/datatable.utils/proxy.mjs +87 -0
  10. package/dist/nova-components/esm2022/lib/components/index.mjs +2 -0
  11. package/dist/nova-components/esm2022/lib/components/nv-datatable.component.mjs +158 -0
  12. package/dist/nova-components/esm2022/lib/nova-components.module.mjs +20 -5
  13. package/dist/nova-components/esm2022/lib/providers/index.mjs +3 -0
  14. package/dist/nova-components/esm2022/lib/providers/notification-service.component.mjs +183 -0
  15. package/dist/nova-components/esm2022/lib/providers/notification.service.mjs +134 -0
  16. package/dist/nova-components/esm2022/lib/stencil-generated/component-value-accessors.mjs +37 -1
  17. package/dist/nova-components/esm2022/lib/stencil-generated/components.mjs +35 -38
  18. package/dist/nova-components/esm2022/lib/stencil-generated/index.mjs +2 -2
  19. package/dist/nova-components/esm2022/public-api.mjs +3 -1
  20. package/dist/nova-components/fesm2022/nova-components.mjs +1280 -44
  21. package/dist/nova-components/fesm2022/nova-components.mjs.map +1 -1
  22. package/dist/nova-components/lib/components/datatable.utils/flex-render/context.d.ts +3 -0
  23. package/dist/nova-components/lib/components/datatable.utils/flex-render/flags.d.ts +40 -0
  24. package/dist/nova-components/lib/components/datatable.utils/flex-render/flex-render-component-ref.d.ts +39 -0
  25. package/dist/nova-components/lib/components/datatable.utils/flex-render/flex-render-component.d.ts +60 -0
  26. package/dist/nova-components/lib/components/datatable.utils/flex-render/view.d.ts +49 -0
  27. package/dist/nova-components/lib/components/datatable.utils/flex-render.d.ts +26 -0
  28. package/dist/nova-components/lib/components/datatable.utils/index.d.ts +6 -0
  29. package/dist/nova-components/lib/components/datatable.utils/lazy-signal-initializer.d.ts +5 -0
  30. package/dist/nova-components/lib/components/datatable.utils/proxy.d.ts +3 -0
  31. package/dist/nova-components/lib/components/index.d.ts +1 -0
  32. package/dist/nova-components/lib/components/nv-datatable.component.d.ts +46 -0
  33. package/dist/nova-components/lib/nova-components.module.d.ts +10 -3
  34. package/dist/nova-components/lib/providers/index.d.ts +2 -0
  35. package/dist/nova-components/lib/providers/notification-service.component.d.ts +56 -0
  36. package/dist/nova-components/lib/providers/notification.service.d.ts +116 -0
  37. package/dist/nova-components/lib/stencil-generated/component-value-accessors.d.ts +8 -1
  38. package/dist/nova-components/lib/stencil-generated/components.d.ts +13 -22
  39. package/dist/nova-components/lib/stencil-generated/index.d.ts +1 -1
  40. package/dist/nova-components/public-api.d.ts +2 -0
  41. package/package.json +2 -1
@@ -1,8 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Directive, HostListener, APP_INITIALIZER, NgModule } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component, untracked, computed, InjectionToken, inject, reflectComponentType, ViewContainerRef, Injectable, KeyValueDiffers, ChangeDetectorRef, OutputEmitterRef, TemplateRef, Type, Injector, runInInjectionContext, effect, Input, Inject, Directive, signal, input, CUSTOM_ELEMENTS_SCHEMA, HostListener, ElementRef, ViewChildren, APP_INITIALIZER, NgModule } from '@angular/core';
3
3
  import { defineCustomElements } from '@nova-design-system/nova-webcomponents/loader';
4
4
  import { __decorate } from 'tslib';
5
- import { fromEvent } from 'rxjs';
5
+ import { fromEvent, BehaviorSubject } from 'rxjs';
6
+ import * as i2 from '@angular/common';
7
+ import { CommonModule } from '@angular/common';
8
+ import { memo, createTable, getCoreRowModel } from '@tanstack/table-core';
6
9
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
10
  export * from '@nova-design-system/nova-webcomponents/constants';
8
11
 
@@ -69,7 +72,7 @@ let NvAccordion = class NvAccordion {
69
72
  this.z = z;
70
73
  c.detach();
71
74
  this.el = r.nativeElement;
72
- proxyOutputs(this, this.el, ['openChanged']);
75
+ proxyOutputs(this, this.el, ['openIndexesChanged']);
73
76
  }
74
77
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvAccordion, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
75
78
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: NvAccordion, selector: "nv-accordion", inputs: { data: "data", mode: "mode", openIndexes: "openIndexes" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -1004,12 +1007,12 @@ let NvNotification = class NvNotification {
1004
1007
  proxyOutputs(this, this.el, ['hiddenChanged']);
1005
1008
  }
1006
1009
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvNotification, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
1007
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: NvNotification, selector: "nv-notification", inputs: { dismissible: "dismissible", emphasis: "emphasis", feedback: "feedback", heading: "heading", hidden: "hidden", icon: "icon", message: "message", uid: "uid" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1010
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: NvNotification, selector: "nv-notification", inputs: { dismissible: "dismissible", emphasis: "emphasis", feedback: "feedback", heading: "heading", hidden: "hidden", icon: "icon", initiallyHidden: "initiallyHidden", message: "message", uid: "uid" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1008
1011
  };
1009
1012
  NvNotification = __decorate([
1010
1013
  ProxyCmp({
1011
- inputs: ['dismissible', 'emphasis', 'feedback', 'heading', 'hidden', 'icon', 'message', 'uid'],
1012
- methods: ['dismiss']
1014
+ inputs: ['dismissible', 'emphasis', 'feedback', 'heading', 'hidden', 'icon', 'initiallyHidden', 'message', 'uid'],
1015
+ methods: ['dismiss', 'show']
1013
1016
  })
1014
1017
  ], NvNotification);
1015
1018
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvNotification, decorators: [{
@@ -1019,7 +1022,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
1019
1022
  changeDetection: ChangeDetectionStrategy.OnPush,
1020
1023
  template: '<ng-content></ng-content>',
1021
1024
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1022
- inputs: ['dismissible', 'emphasis', 'feedback', 'heading', 'hidden', 'icon', 'message', 'uid'],
1025
+ inputs: ['dismissible', 'emphasis', 'feedback', 'heading', 'hidden', 'icon', 'initiallyHidden', 'message', 'uid'],
1026
+ standalone: false
1027
+ }]
1028
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
1029
+ let NvNotificationcontainer = class NvNotificationcontainer {
1030
+ constructor(c, r, z) {
1031
+ this.z = z;
1032
+ c.detach();
1033
+ this.el = r.nativeElement;
1034
+ }
1035
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvNotificationcontainer, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
1036
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: NvNotificationcontainer, selector: "nv-notificationcontainer", inputs: { position: "position" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1037
+ };
1038
+ NvNotificationcontainer = __decorate([
1039
+ ProxyCmp({
1040
+ inputs: ['position']
1041
+ })
1042
+ ], NvNotificationcontainer);
1043
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvNotificationcontainer, decorators: [{
1044
+ type: Component,
1045
+ args: [{
1046
+ selector: 'nv-notificationcontainer',
1047
+ changeDetection: ChangeDetectionStrategy.OnPush,
1048
+ template: '<ng-content></ng-content>',
1049
+ // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1050
+ inputs: ['position'],
1023
1051
  standalone: false
1024
1052
  }]
1025
1053
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
@@ -1103,15 +1131,12 @@ let NvTable = class NvTable {
1103
1131
  this.z = z;
1104
1132
  c.detach();
1105
1133
  this.el = r.nativeElement;
1106
- proxyOutputs(this, this.el, ['action']);
1107
1134
  }
1108
1135
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvTable, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
1109
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: NvTable, selector: "nv-table", inputs: { columnsConfig: "columnsConfig", columnsConfigJson: "columnsConfigJson", data: "data", dataJson: "dataJson", fallbackValue: "fallbackValue", noColumnsNoDataMessage: "noColumnsNoDataMessage", noDataMessage: "noDataMessage" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1136
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: NvTable, selector: "nv-table", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1110
1137
  };
1111
1138
  NvTable = __decorate([
1112
- ProxyCmp({
1113
- inputs: ['columnsConfig', 'columnsConfigJson', 'data', 'dataJson', 'fallbackValue', 'noColumnsNoDataMessage', 'noDataMessage']
1114
- })
1139
+ ProxyCmp({})
1115
1140
  ], NvTable);
1116
1141
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvTable, decorators: [{
1117
1142
  type: Component,
@@ -1120,32 +1145,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
1120
1145
  changeDetection: ChangeDetectionStrategy.OnPush,
1121
1146
  template: '<ng-content></ng-content>',
1122
1147
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1123
- inputs: ['columnsConfig', 'columnsConfigJson', 'data', 'dataJson', 'fallbackValue', 'noColumnsNoDataMessage', 'noDataMessage'],
1124
- standalone: false
1125
- }]
1126
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
1127
- let NvTablecolumn = class NvTablecolumn {
1128
- constructor(c, r, z) {
1129
- this.z = z;
1130
- c.detach();
1131
- this.el = r.nativeElement;
1132
- }
1133
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvTablecolumn, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
1134
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: NvTablecolumn, selector: "nv-tablecolumn", inputs: { header: "header", name: "name" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1135
- };
1136
- NvTablecolumn = __decorate([
1137
- ProxyCmp({
1138
- inputs: ['header', 'name']
1139
- })
1140
- ], NvTablecolumn);
1141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvTablecolumn, decorators: [{
1142
- type: Component,
1143
- args: [{
1144
- selector: 'nv-tablecolumn',
1145
- changeDetection: ChangeDetectionStrategy.OnPush,
1146
- template: '<ng-content></ng-content>',
1147
- // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1148
- inputs: ['header', { name: 'name', required: true }],
1148
+ inputs: [],
1149
1149
  standalone: false
1150
1150
  }]
1151
1151
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
@@ -1292,17 +1292,895 @@ const DIRECTIVES = [
1292
1292
  NvMenu,
1293
1293
  NvMenuitem,
1294
1294
  NvNotification,
1295
+ NvNotificationcontainer,
1295
1296
  NvPopover,
1296
1297
  NvRow,
1297
1298
  NvStack,
1298
1299
  NvTable,
1299
- NvTablecolumn,
1300
1300
  NvToggle,
1301
1301
  NvTogglebutton,
1302
1302
  NvTogglebuttongroup,
1303
1303
  NvTooltip
1304
1304
  ];
1305
1305
 
1306
+ /**
1307
+ * Implementation from @tanstack/angular-query
1308
+ * {@link https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/util/lazy-init/lazy-init.ts}
1309
+ */
1310
+ function lazyInit(initializer) {
1311
+ let object = null;
1312
+ const initializeObject = () => {
1313
+ if (!object) {
1314
+ object = untracked(() => initializer());
1315
+ }
1316
+ };
1317
+ queueMicrotask(() => initializeObject());
1318
+ const table = () => { };
1319
+ return new Proxy(table, {
1320
+ apply(target, thisArg, argArray) {
1321
+ initializeObject();
1322
+ if (typeof object === 'function') {
1323
+ return Reflect.apply(object, thisArg, argArray);
1324
+ }
1325
+ return Reflect.apply(target, thisArg, argArray);
1326
+ },
1327
+ get(_, prop, receiver) {
1328
+ initializeObject();
1329
+ return Reflect.get(object, prop, receiver);
1330
+ },
1331
+ has(_, prop) {
1332
+ initializeObject();
1333
+ return Reflect.has(object, prop);
1334
+ },
1335
+ ownKeys() {
1336
+ initializeObject();
1337
+ return Reflect.ownKeys(object);
1338
+ },
1339
+ getOwnPropertyDescriptor() {
1340
+ return {
1341
+ enumerable: true,
1342
+ configurable: true,
1343
+ };
1344
+ },
1345
+ });
1346
+ }
1347
+
1348
+ function proxifyTable(tableSignal) {
1349
+ const internalState = tableSignal;
1350
+ return new Proxy(internalState, {
1351
+ apply() {
1352
+ return tableSignal();
1353
+ },
1354
+ get(target, property) {
1355
+ if (target[property]) {
1356
+ return target[property];
1357
+ }
1358
+ const table = untracked(tableSignal);
1359
+ /**
1360
+ * Attempt to convert all accessors into computed ones,
1361
+ * excluding handlers as they do not retain any reactive value
1362
+ */
1363
+ if (property.startsWith('get') &&
1364
+ !property.endsWith('Handler')
1365
+ // e.g. getCoreRowModel, getSelectedRowModel etc.
1366
+ // We need that after a signal change even `rowModel` may mark the view as dirty.
1367
+ // This allows to always get the latest `getContext` value while using flexRender
1368
+ // && !property.endsWith('Model')
1369
+ ) {
1370
+ const maybeFn = table[property];
1371
+ if (typeof maybeFn === 'function') {
1372
+ Object.defineProperty(target, property, {
1373
+ value: toComputed(tableSignal, maybeFn),
1374
+ configurable: true,
1375
+ enumerable: true,
1376
+ });
1377
+ return target[property];
1378
+ }
1379
+ }
1380
+ // @ts-expect-error
1381
+ return (target[property] = table[property]);
1382
+ },
1383
+ has(_, prop) {
1384
+ return !!untracked(tableSignal)[prop];
1385
+ },
1386
+ ownKeys() {
1387
+ return Reflect.ownKeys(untracked(tableSignal));
1388
+ },
1389
+ getOwnPropertyDescriptor() {
1390
+ return {
1391
+ enumerable: true,
1392
+ configurable: true,
1393
+ };
1394
+ },
1395
+ });
1396
+ }
1397
+ /**
1398
+ * Here we'll handle all type of accessors:
1399
+ * - 0 argument -> e.g. table.getCanNextPage())
1400
+ * - 0~1 arguments -> e.g. table.getIsSomeRowsPinned(position?)
1401
+ * - 1 required argument -> e.g. table.getColumn(columnId)
1402
+ * - 1+ argument -> e.g. table.getRow(id, searchAll?)
1403
+ *
1404
+ * Since we are not able to detect automatically the accessors parameters,
1405
+ * we'll wrap all accessors into a cached function wrapping a computed
1406
+ * that return it's value based on the given parameters
1407
+ */
1408
+ function toComputed(signal, fn) {
1409
+ const hasArgs = fn.length > 0;
1410
+ if (!hasArgs) {
1411
+ return computed(() => {
1412
+ void signal();
1413
+ return fn();
1414
+ });
1415
+ }
1416
+ const computedCache = {};
1417
+ return (...argsArray) => {
1418
+ const serializedArgs = serializeArgs(...argsArray);
1419
+ if (computedCache.hasOwnProperty(serializedArgs)) {
1420
+ return computedCache[serializedArgs]?.();
1421
+ }
1422
+ const computedSignal = computed(() => {
1423
+ void signal();
1424
+ return fn(...argsArray);
1425
+ });
1426
+ computedCache[serializedArgs] = computedSignal;
1427
+ return computedSignal();
1428
+ };
1429
+ }
1430
+ function serializeArgs(...args) {
1431
+ return JSON.stringify(args);
1432
+ }
1433
+
1434
+ const FlexRenderComponentProps = new InjectionToken('[@tanstack/angular-table] Flex render component context props');
1435
+ function injectFlexRenderContext() {
1436
+ return inject(FlexRenderComponentProps);
1437
+ }
1438
+
1439
+ /**
1440
+ * Flags used to manage and optimize the rendering lifecycle of content of the cell,
1441
+ * while using FlexRenderDirective.
1442
+ */
1443
+ var FlexRenderFlags;
1444
+ (function (FlexRenderFlags) {
1445
+ /**
1446
+ * Indicates that the view is being created for the first time or will be cleared during the next update phase.
1447
+ * This is the initial state and will transition after the first ngDoCheck.
1448
+ */
1449
+ FlexRenderFlags[FlexRenderFlags["ViewFirstRender"] = 1] = "ViewFirstRender";
1450
+ /**
1451
+ * Represents a state where the view is not dirty, meaning no changes require rendering updates.
1452
+ */
1453
+ FlexRenderFlags[FlexRenderFlags["Pristine"] = 2] = "Pristine";
1454
+ /**
1455
+ * Indicates the `content` property has been modified or the view requires a complete re-render.
1456
+ * When this flag is enabled, the view will be cleared and recreated from scratch.
1457
+ */
1458
+ FlexRenderFlags[FlexRenderFlags["ContentChanged"] = 4] = "ContentChanged";
1459
+ /**
1460
+ * Indicates that the `props` property reference has changed.
1461
+ * When this flag is enabled, the view context is updated based on the type of the content.
1462
+ *
1463
+ * For Component view, inputs will be updated and view will be marked as dirty.
1464
+ * For TemplateRef and primitive values, view will be marked as dirty
1465
+ */
1466
+ FlexRenderFlags[FlexRenderFlags["PropsReferenceChanged"] = 8] = "PropsReferenceChanged";
1467
+ /**
1468
+ * Indicates that the current rendered view needs to be checked for changes.
1469
+ */
1470
+ FlexRenderFlags[FlexRenderFlags["DirtyCheck"] = 16] = "DirtyCheck";
1471
+ /**
1472
+ * Indicates that a signal within the `content(props)` result has changed
1473
+ */
1474
+ FlexRenderFlags[FlexRenderFlags["DirtySignal"] = 32] = "DirtySignal";
1475
+ /**
1476
+ * Indicates that the first render effect has been checked at least one time.
1477
+ */
1478
+ FlexRenderFlags[FlexRenderFlags["RenderEffectChecked"] = 64] = "RenderEffectChecked";
1479
+ })(FlexRenderFlags || (FlexRenderFlags = {}));
1480
+
1481
+ /**
1482
+ * Helper function to create a [@link FlexRenderComponent] instance, with better type-safety.
1483
+ *
1484
+ * - options object must be passed when the given component instance contains at least one required signal input.
1485
+ * - options/inputs is typed with the given component inputs
1486
+ * - options/outputs is typed with the given component outputs
1487
+ */
1488
+ function flexRenderComponent(component, ...options) {
1489
+ const { inputs, injector, outputs } = options?.[0] ?? {};
1490
+ return new FlexRenderComponent(component, inputs, injector, outputs);
1491
+ }
1492
+ /**
1493
+ * Wrapper class for a component that will be used as content for {@link FlexRenderDirective}
1494
+ *
1495
+ * Prefer {@link flexRenderComponent} helper for better type-safety
1496
+ */
1497
+ class FlexRenderComponent {
1498
+ constructor(component, inputs, injector, outputs) {
1499
+ this.component = component;
1500
+ this.inputs = inputs;
1501
+ this.injector = injector;
1502
+ this.outputs = outputs;
1503
+ this.allowedInputNames = [];
1504
+ this.allowedOutputNames = [];
1505
+ const mirror = reflectComponentType(component);
1506
+ if (!mirror) {
1507
+ throw new Error(`[@tanstack-table/angular] The provided symbol is not a component`);
1508
+ }
1509
+ this.mirror = mirror;
1510
+ for (const input of this.mirror.inputs) {
1511
+ this.allowedInputNames.push(input.propName);
1512
+ }
1513
+ for (const output of this.mirror.outputs) {
1514
+ this.allowedOutputNames.push(output.propName);
1515
+ }
1516
+ }
1517
+ }
1518
+
1519
+ class FlexRenderComponentFactory {
1520
+ #viewContainerRef = inject(ViewContainerRef);
1521
+ createComponent(flexRenderComponent, componentInjector) {
1522
+ const componentRef = this.#viewContainerRef.createComponent(flexRenderComponent.component, {
1523
+ injector: componentInjector,
1524
+ });
1525
+ const view = new FlexRenderComponentRef(componentRef, flexRenderComponent, componentInjector);
1526
+ const { inputs, outputs } = flexRenderComponent;
1527
+ if (inputs)
1528
+ view.setInputs(inputs);
1529
+ if (outputs)
1530
+ view.setOutputs(outputs);
1531
+ return view;
1532
+ }
1533
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: FlexRenderComponentFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1534
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: FlexRenderComponentFactory }); }
1535
+ }
1536
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: FlexRenderComponentFactory, decorators: [{
1537
+ type: Injectable
1538
+ }] });
1539
+ class FlexRenderComponentRef {
1540
+ #keyValueDiffersFactory;
1541
+ #componentData;
1542
+ #inputValueDiffer;
1543
+ #outputRegistry;
1544
+ constructor(componentRef, componentData, componentInjector) {
1545
+ this.componentRef = componentRef;
1546
+ this.componentInjector = componentInjector;
1547
+ this.#componentData = componentData;
1548
+ this.#keyValueDiffersFactory = componentInjector.get(KeyValueDiffers);
1549
+ this.#outputRegistry = new FlexRenderComponentOutputManager(this.#keyValueDiffersFactory, this.outputs);
1550
+ this.#inputValueDiffer = this.#keyValueDiffersFactory
1551
+ .find(this.inputs)
1552
+ .create();
1553
+ this.#inputValueDiffer.diff(this.inputs);
1554
+ this.componentRef.onDestroy(() => this.#outputRegistry.unsubscribeAll());
1555
+ }
1556
+ get component() {
1557
+ return this.#componentData.component;
1558
+ }
1559
+ get inputs() {
1560
+ return this.#componentData.inputs ?? {};
1561
+ }
1562
+ get outputs() {
1563
+ return this.#componentData.outputs ?? {};
1564
+ }
1565
+ /**
1566
+ * Get component input and output diff by the given item
1567
+ */
1568
+ diff(item) {
1569
+ return {
1570
+ inputDiff: this.#inputValueDiffer.diff(item.inputs ?? {}),
1571
+ outputDiff: this.#outputRegistry.diff(item.outputs ?? {}),
1572
+ };
1573
+ }
1574
+ /**
1575
+ *
1576
+ * @param compare Whether the current ref component instance is the same as the given one
1577
+ */
1578
+ eqType(compare) {
1579
+ return compare.component === this.component;
1580
+ }
1581
+ /**
1582
+ * Tries to update current component refs input by the new given content component.
1583
+ */
1584
+ update(content) {
1585
+ const eq = this.eqType(content);
1586
+ if (!eq)
1587
+ return;
1588
+ const { inputDiff, outputDiff } = this.diff(content);
1589
+ if (inputDiff) {
1590
+ inputDiff.forEachAddedItem(item => this.setInput(item.key, item.currentValue));
1591
+ inputDiff.forEachChangedItem(item => this.setInput(item.key, item.currentValue));
1592
+ inputDiff.forEachRemovedItem(item => this.setInput(item.key, undefined));
1593
+ }
1594
+ if (outputDiff) {
1595
+ outputDiff.forEachAddedItem(item => {
1596
+ this.setOutput(item.key, item.currentValue);
1597
+ });
1598
+ outputDiff.forEachChangedItem(item => {
1599
+ if (item.currentValue) {
1600
+ this.#outputRegistry.setListener(item.key, item.currentValue);
1601
+ }
1602
+ else {
1603
+ this.#outputRegistry.unsubscribe(item.key);
1604
+ }
1605
+ });
1606
+ outputDiff.forEachRemovedItem(item => {
1607
+ this.#outputRegistry.unsubscribe(item.key);
1608
+ });
1609
+ }
1610
+ this.#componentData = content;
1611
+ }
1612
+ markAsDirty() {
1613
+ this.componentRef.injector.get(ChangeDetectorRef).markForCheck();
1614
+ }
1615
+ setInputs(inputs) {
1616
+ for (const prop in inputs) {
1617
+ this.setInput(prop, inputs[prop]);
1618
+ }
1619
+ }
1620
+ setInput(key, value) {
1621
+ if (this.#componentData.allowedInputNames.includes(key)) {
1622
+ this.componentRef.setInput(key, value);
1623
+ }
1624
+ }
1625
+ setOutputs(outputs) {
1626
+ this.#outputRegistry.unsubscribeAll();
1627
+ for (const prop in outputs) {
1628
+ this.setOutput(prop, outputs[prop]);
1629
+ }
1630
+ }
1631
+ setOutput(outputName, emit) {
1632
+ if (!this.#componentData.allowedOutputNames.includes(outputName))
1633
+ return;
1634
+ if (!emit) {
1635
+ this.#outputRegistry.unsubscribe(outputName);
1636
+ return;
1637
+ }
1638
+ const hasListener = this.#outputRegistry.hasListener(outputName);
1639
+ this.#outputRegistry.setListener(outputName, emit);
1640
+ if (hasListener) {
1641
+ return;
1642
+ }
1643
+ const instance = this.componentRef.instance;
1644
+ const output = instance[outputName];
1645
+ if (output && output instanceof OutputEmitterRef) {
1646
+ output.subscribe(value => {
1647
+ this.#outputRegistry.getListener(outputName)?.(value);
1648
+ });
1649
+ }
1650
+ }
1651
+ }
1652
+ class FlexRenderComponentOutputManager {
1653
+ #outputSubscribers = {};
1654
+ #outputListeners = {};
1655
+ #valueDiffer;
1656
+ constructor(keyValueDiffers, initialOutputs) {
1657
+ this.#valueDiffer = keyValueDiffers.find(initialOutputs).create();
1658
+ if (initialOutputs) {
1659
+ this.#valueDiffer.diff(initialOutputs);
1660
+ }
1661
+ }
1662
+ hasListener(outputName) {
1663
+ return outputName in this.#outputListeners;
1664
+ }
1665
+ setListener(outputName, callback) {
1666
+ this.#outputListeners[outputName] = callback;
1667
+ }
1668
+ getListener(outputName) {
1669
+ return this.#outputListeners[outputName];
1670
+ }
1671
+ unsubscribeAll() {
1672
+ for (const prop in this.#outputSubscribers) {
1673
+ this.unsubscribe(prop);
1674
+ }
1675
+ }
1676
+ unsubscribe(outputName) {
1677
+ if (outputName in this.#outputSubscribers) {
1678
+ this.#outputSubscribers[outputName]?.unsubscribe();
1679
+ delete this.#outputSubscribers[outputName];
1680
+ delete this.#outputListeners[outputName];
1681
+ }
1682
+ }
1683
+ diff(outputs) {
1684
+ return this.#valueDiffer.diff(outputs ?? {});
1685
+ }
1686
+ }
1687
+
1688
+ function mapToFlexRenderTypedContent(content) {
1689
+ if (content === null || content === undefined) {
1690
+ return { kind: 'null' };
1691
+ }
1692
+ if (typeof content === 'string' || typeof content === 'number') {
1693
+ return { kind: 'primitive', content };
1694
+ }
1695
+ if (content instanceof FlexRenderComponent) {
1696
+ return { kind: 'flexRenderComponent', content };
1697
+ }
1698
+ else if (content instanceof TemplateRef) {
1699
+ return { kind: 'templateRef', content };
1700
+ }
1701
+ else if (content instanceof Type) {
1702
+ return { kind: 'component', content };
1703
+ }
1704
+ else {
1705
+ return { kind: 'primitive', content };
1706
+ }
1707
+ }
1708
+ class FlexRenderView {
1709
+ #previousContent;
1710
+ #content;
1711
+ constructor(initialContent, view) {
1712
+ this.#content = initialContent;
1713
+ this.view = view;
1714
+ }
1715
+ get previousContent() {
1716
+ return this.#previousContent ?? { kind: 'null' };
1717
+ }
1718
+ get content() {
1719
+ return this.#content;
1720
+ }
1721
+ set content(content) {
1722
+ this.#previousContent = this.#content;
1723
+ this.#content = content;
1724
+ }
1725
+ }
1726
+ class FlexRenderTemplateView extends FlexRenderView {
1727
+ constructor(initialContent, view) {
1728
+ super(initialContent, view);
1729
+ }
1730
+ updateProps(props) {
1731
+ this.view.markForCheck();
1732
+ }
1733
+ dirtyCheck() {
1734
+ // Basically a no-op. When the view is created via EmbeddedViewRef, we don't need to do any manual update
1735
+ // since this type of content has a proxy as a context, then every time the root component is checked for changes,
1736
+ // the property getter will be re-evaluated.
1737
+ //
1738
+ // If in a future we need to manually mark the view as dirty, just uncomment next line
1739
+ // this.view.markForCheck()
1740
+ }
1741
+ onDestroy(callback) {
1742
+ this.view.onDestroy(callback);
1743
+ }
1744
+ }
1745
+ class FlexRenderComponentView extends FlexRenderView {
1746
+ constructor(initialContent, view) {
1747
+ super(initialContent, view);
1748
+ }
1749
+ updateProps(props) {
1750
+ switch (this.content.kind) {
1751
+ case 'component': {
1752
+ this.view.setInputs(props);
1753
+ break;
1754
+ }
1755
+ case 'flexRenderComponent': {
1756
+ // No-op. When FlexRenderFlags.PropsReferenceChanged is set,
1757
+ // FlexRenderComponent will be updated into `dirtyCheck`.
1758
+ break;
1759
+ }
1760
+ }
1761
+ }
1762
+ dirtyCheck() {
1763
+ switch (this.content.kind) {
1764
+ case 'component': {
1765
+ // Component context is currently valuated with the cell context. Since it's reference
1766
+ // shouldn't change, we force mark the component as dirty in order to re-evaluate function invocation in view.
1767
+ // NOTE: this should behave like having a component with ChangeDetectionStrategy.Default
1768
+ this.view.markAsDirty();
1769
+ break;
1770
+ }
1771
+ case 'flexRenderComponent': {
1772
+ // Given context instance will always have a different reference than the previous one,
1773
+ // so instead of recreating the entire view, we will only update the current view
1774
+ if (this.view.eqType(this.content.content)) {
1775
+ this.view.update(this.content.content);
1776
+ }
1777
+ this.view.markAsDirty();
1778
+ break;
1779
+ }
1780
+ }
1781
+ }
1782
+ onDestroy(callback) {
1783
+ this.view.componentRef.onDestroy(callback);
1784
+ }
1785
+ }
1786
+
1787
+ class FlexRenderDirective {
1788
+ #flexRenderComponentFactory;
1789
+ #changeDetectorRef;
1790
+ #latestContent;
1791
+ #getContentValue;
1792
+ constructor(viewContainerRef, templateRef) {
1793
+ this.viewContainerRef = viewContainerRef;
1794
+ this.templateRef = templateRef;
1795
+ this.#flexRenderComponentFactory = inject(FlexRenderComponentFactory);
1796
+ this.#changeDetectorRef = inject(ChangeDetectorRef);
1797
+ this.content = undefined;
1798
+ this.props = {};
1799
+ this.injector = inject(Injector);
1800
+ this.renderFlags = FlexRenderFlags.ViewFirstRender;
1801
+ this.renderView = null;
1802
+ this.#latestContent = () => {
1803
+ const { content, props } = this;
1804
+ return typeof content !== 'function'
1805
+ ? content
1806
+ : runInInjectionContext(this.injector, () => content(props));
1807
+ };
1808
+ this.#getContentValue = memo(() => [this.#latestContent(), this.props, this.content], latestContent => {
1809
+ return mapToFlexRenderTypedContent(latestContent);
1810
+ }, { key: 'flexRenderContentValue', debug: () => false });
1811
+ this.#currentEffectRef = null;
1812
+ }
1813
+ ngOnChanges(changes) {
1814
+ if (changes['props']) {
1815
+ this.renderFlags |= FlexRenderFlags.PropsReferenceChanged;
1816
+ }
1817
+ if (changes['content']) {
1818
+ this.renderFlags |=
1819
+ FlexRenderFlags.ContentChanged | FlexRenderFlags.ViewFirstRender;
1820
+ this.update();
1821
+ }
1822
+ }
1823
+ ngDoCheck() {
1824
+ if (this.renderFlags & FlexRenderFlags.ViewFirstRender) {
1825
+ // On the initial render, the view is created during the `ngOnChanges` hook.
1826
+ // Since `ngDoCheck` is called immediately afterward, there's no need to check for changes in this phase.
1827
+ this.renderFlags &= ~FlexRenderFlags.ViewFirstRender;
1828
+ return;
1829
+ }
1830
+ this.renderFlags |= FlexRenderFlags.DirtyCheck;
1831
+ const latestContent = this.#getContentValue();
1832
+ if (latestContent.kind === 'null' || !this.renderView) {
1833
+ this.renderFlags |= FlexRenderFlags.ContentChanged;
1834
+ }
1835
+ else {
1836
+ this.renderView.content = latestContent;
1837
+ const { kind: previousKind } = this.renderView.previousContent;
1838
+ if (latestContent.kind !== previousKind) {
1839
+ this.renderFlags |= FlexRenderFlags.ContentChanged;
1840
+ }
1841
+ }
1842
+ this.update();
1843
+ }
1844
+ update() {
1845
+ if (this.renderFlags &
1846
+ (FlexRenderFlags.ContentChanged | FlexRenderFlags.ViewFirstRender)) {
1847
+ this.render();
1848
+ return;
1849
+ }
1850
+ if (this.renderFlags & FlexRenderFlags.PropsReferenceChanged) {
1851
+ if (this.renderView)
1852
+ this.renderView.updateProps(this.props);
1853
+ this.renderFlags &= ~FlexRenderFlags.PropsReferenceChanged;
1854
+ }
1855
+ if (this.renderFlags &
1856
+ (FlexRenderFlags.DirtyCheck | FlexRenderFlags.DirtySignal)) {
1857
+ if (this.renderView)
1858
+ this.renderView.dirtyCheck();
1859
+ this.renderFlags &= ~(FlexRenderFlags.DirtyCheck | FlexRenderFlags.DirtySignal);
1860
+ }
1861
+ }
1862
+ #currentEffectRef;
1863
+ render() {
1864
+ if (this.#shouldRecreateEntireView() && this.#currentEffectRef) {
1865
+ this.#currentEffectRef.destroy();
1866
+ this.#currentEffectRef = null;
1867
+ this.renderFlags &= ~FlexRenderFlags.RenderEffectChecked;
1868
+ }
1869
+ this.viewContainerRef.clear();
1870
+ this.renderFlags =
1871
+ FlexRenderFlags.Pristine |
1872
+ (this.renderFlags & FlexRenderFlags.ViewFirstRender) |
1873
+ (this.renderFlags & FlexRenderFlags.RenderEffectChecked);
1874
+ const resolvedContent = this.#getContentValue();
1875
+ if (resolvedContent.kind === 'null') {
1876
+ this.renderView = null;
1877
+ }
1878
+ else {
1879
+ this.renderView = this.#renderViewByContent(resolvedContent);
1880
+ }
1881
+ // If the content is a function `content(props)`, we initialize an effect
1882
+ // in order to react to changes if the given definition use signals.
1883
+ if (!this.#currentEffectRef && typeof this.content === 'function') {
1884
+ this.#currentEffectRef = effect(() => {
1885
+ this.#latestContent();
1886
+ if (!(this.renderFlags & FlexRenderFlags.RenderEffectChecked)) {
1887
+ this.renderFlags |= FlexRenderFlags.RenderEffectChecked;
1888
+ return;
1889
+ }
1890
+ this.renderFlags |= FlexRenderFlags.DirtySignal;
1891
+ // This will mark the view as changed,
1892
+ // so we'll try to check for updates into ngDoCheck
1893
+ this.#changeDetectorRef.markForCheck();
1894
+ }, { injector: this.viewContainerRef.injector });
1895
+ }
1896
+ }
1897
+ #shouldRecreateEntireView() {
1898
+ return (this.renderFlags &
1899
+ FlexRenderFlags.ContentChanged &
1900
+ FlexRenderFlags.ViewFirstRender);
1901
+ }
1902
+ #renderViewByContent(content) {
1903
+ if (content.kind === 'primitive') {
1904
+ return this.#renderStringContent(content);
1905
+ }
1906
+ else if (content.kind === 'templateRef') {
1907
+ return this.#renderTemplateRefContent(content);
1908
+ }
1909
+ else if (content.kind === 'flexRenderComponent') {
1910
+ return this.#renderComponent(content);
1911
+ }
1912
+ else if (content.kind === 'component') {
1913
+ return this.#renderCustomComponent(content);
1914
+ }
1915
+ else {
1916
+ return null;
1917
+ }
1918
+ }
1919
+ #renderStringContent(template) {
1920
+ const context = () => {
1921
+ return typeof this.content === 'string' ||
1922
+ typeof this.content === 'number'
1923
+ ? this.content
1924
+ : this.content?.(this.props);
1925
+ };
1926
+ const ref = this.viewContainerRef.createEmbeddedView(this.templateRef, {
1927
+ get $implicit() {
1928
+ return context();
1929
+ },
1930
+ });
1931
+ return new FlexRenderTemplateView(template, ref);
1932
+ }
1933
+ #renderTemplateRefContent(template) {
1934
+ const latestContext = () => this.props;
1935
+ const view = this.viewContainerRef.createEmbeddedView(template.content, {
1936
+ get $implicit() {
1937
+ return latestContext();
1938
+ },
1939
+ });
1940
+ return new FlexRenderTemplateView(template, view);
1941
+ }
1942
+ #renderComponent(flexRenderComponent) {
1943
+ const { inputs, outputs, injector } = flexRenderComponent.content;
1944
+ const getContext = () => this.props;
1945
+ const proxy = new Proxy(this.props, {
1946
+ get: (_, key) => getContext()[key],
1947
+ });
1948
+ const componentInjector = Injector.create({
1949
+ parent: injector ?? this.injector,
1950
+ providers: [{ provide: FlexRenderComponentProps, useValue: proxy }],
1951
+ });
1952
+ const view = this.#flexRenderComponentFactory.createComponent(flexRenderComponent.content, componentInjector);
1953
+ return new FlexRenderComponentView(flexRenderComponent, view);
1954
+ }
1955
+ #renderCustomComponent(component) {
1956
+ const view = this.#flexRenderComponentFactory.createComponent(flexRenderComponent(component.content, {
1957
+ inputs: this.props,
1958
+ injector: this.injector,
1959
+ }), this.injector);
1960
+ return new FlexRenderComponentView(component, view);
1961
+ }
1962
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: FlexRenderDirective, deps: [{ token: ViewContainerRef }, { token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1963
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.9", type: FlexRenderDirective, isStandalone: true, selector: "[flexRender]", inputs: { content: ["flexRender", "content"], props: ["flexRenderProps", "props"], injector: ["flexRenderInjector", "injector"] }, providers: [FlexRenderComponentFactory], usesOnChanges: true, ngImport: i0 }); }
1964
+ }
1965
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: FlexRenderDirective, decorators: [{
1966
+ type: Directive,
1967
+ args: [{
1968
+ selector: '[flexRender]',
1969
+ standalone: true,
1970
+ providers: [FlexRenderComponentFactory],
1971
+ }]
1972
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef, decorators: [{
1973
+ type: Inject,
1974
+ args: [ViewContainerRef]
1975
+ }] }, { type: i0.TemplateRef, decorators: [{
1976
+ type: Inject,
1977
+ args: [TemplateRef]
1978
+ }] }], propDecorators: { content: [{
1979
+ type: Input,
1980
+ args: [{ required: true, alias: 'flexRender' }]
1981
+ }], props: [{
1982
+ type: Input,
1983
+ args: [{ required: true, alias: 'flexRenderProps' }]
1984
+ }], injector: [{
1985
+ type: Input,
1986
+ args: [{ required: false, alias: 'flexRenderInjector' }]
1987
+ }] } });
1988
+
1989
+ function createAngularTable(options) {
1990
+ return lazyInit(() => {
1991
+ const resolvedOptions = {
1992
+ state: {},
1993
+ onStateChange: () => { },
1994
+ renderFallbackValue: null,
1995
+ ...options(),
1996
+ };
1997
+ const table = createTable(resolvedOptions);
1998
+ // By default, manage table state here using the table's initial state
1999
+ const state = signal(table.initialState);
2000
+ // Compose table options using computed.
2001
+ // This is to allow `tableSignal` to listen and set table option
2002
+ const updatedOptions = computed(() => {
2003
+ // listen to table state changed
2004
+ const tableState = state();
2005
+ // listen to input options changed
2006
+ const tableOptions = options();
2007
+ return {
2008
+ ...table.options,
2009
+ ...resolvedOptions,
2010
+ ...tableOptions,
2011
+ state: { ...tableState, ...tableOptions.state },
2012
+ onStateChange: updater => {
2013
+ const value = updater instanceof Function ? updater(tableState) : updater;
2014
+ state.set(value);
2015
+ resolvedOptions.onStateChange?.(updater);
2016
+ },
2017
+ };
2018
+ });
2019
+ // convert table instance to signal for proxify to listen to any table state and options changes
2020
+ const tableSignal = computed(() => {
2021
+ table.setOptions(updatedOptions());
2022
+ return table;
2023
+ }, {
2024
+ equal: () => false,
2025
+ });
2026
+ // proxify Table instance to provide ability for consumer to listen to any table state changes
2027
+ return proxifyTable(tableSignal);
2028
+ });
2029
+ }
2030
+
2031
+ /* eslint-disable jsdoc/require-jsdoc */
2032
+ /* eslint-disable jsdoc/require-returns */
2033
+ /**
2034
+ * Nova Datatable built on TanStack Table (Angular).
2035
+ */
2036
+ class NvDatatable {
2037
+ constructor() {
2038
+ /** Column definitions */
2039
+ this.columns = input([]);
2040
+ /** Row data */
2041
+ this.rows = input([]);
2042
+ /** Computed table columns with proper typing and filtering. */
2043
+ this.tableColumns = computed(() => this.columns()
2044
+ .filter((col) => !col.hidden)
2045
+ .map((col) => ({
2046
+ accessorKey: col.field,
2047
+ header: col.headerName || String(col.field),
2048
+ size: col.width,
2049
+ enableResizing: col.resizable ?? true,
2050
+ cell: col.renderCell ??
2051
+ ((context) => context.getValue()),
2052
+ })));
2053
+ /** TanStack table instance with Signals */
2054
+ this.tableInstance = createAngularTable(() => ({
2055
+ data: this.rows(),
2056
+ columns: this.tableColumns(),
2057
+ getCoreRowModel: getCoreRowModel(),
2058
+ }));
2059
+ }
2060
+ /** Public getter for table instance. */
2061
+ table() {
2062
+ return this.tableInstance();
2063
+ }
2064
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvDatatable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2065
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: NvDatatable, isStandalone: true, selector: "nv-datatable", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
2066
+ <nv-table>
2067
+ <table>
2068
+ <thead>
2069
+ @for (headerGroup of table().getHeaderGroups(); track headerGroup.id)
2070
+ {
2071
+ <tr>
2072
+ @for (header of headerGroup.headers; track header.id) {
2073
+ <th
2074
+ [attr.data-testid]="'datatable-header-' + header.id"
2075
+ [style.width]="
2076
+ header.column.columnDef.size
2077
+ ? header.column.columnDef.size + 'px'
2078
+ : null
2079
+ "
2080
+ [attr.data-no-resize]="
2081
+ !header.column.columnDef.enableResizing ? 'true' : null
2082
+ "
2083
+ >
2084
+ @if (!header.isPlaceholder) {
2085
+ {{ header.column.columnDef.header }}
2086
+ }
2087
+ </th>
2088
+ }
2089
+ </tr>
2090
+ }
2091
+ </thead>
2092
+
2093
+ <tbody>
2094
+ @for (row of table().getRowModel().rows; track row.id) {
2095
+ <tr [attr.data-testid]="'datatable-row-' + row.id">
2096
+ @for (cell of row.getVisibleCells(); track cell.id) {
2097
+ <td
2098
+ [attr.data-testid]="'datatable-cell-' + cell.id"
2099
+ style="padding: 8px; border-bottom: 1px solid #eee;"
2100
+ >
2101
+ <!-- Let FlexRender handle strings vs TemplateRef -->
2102
+ <ng-container
2103
+ *flexRender="
2104
+ cell.column.columnDef.cell;
2105
+ props: cell.getContext();
2106
+ let cellContent
2107
+ "
2108
+ >
2109
+ {{ cellContent }}
2110
+ </ng-container>
2111
+ </td>
2112
+ }
2113
+ </tr>
2114
+ }
2115
+ </tbody>
2116
+ </table>
2117
+ </nv-table>
2118
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: FlexRenderDirective, selector: "[flexRender]", inputs: ["flexRender", "flexRenderProps", "flexRenderInjector"] }] }); }
2119
+ }
2120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvDatatable, decorators: [{
2121
+ type: Component,
2122
+ args: [{
2123
+ selector: 'nv-datatable',
2124
+ standalone: true,
2125
+ imports: [CommonModule, FlexRenderDirective],
2126
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
2127
+ template: `
2128
+ <nv-table>
2129
+ <table>
2130
+ <thead>
2131
+ @for (headerGroup of table().getHeaderGroups(); track headerGroup.id)
2132
+ {
2133
+ <tr>
2134
+ @for (header of headerGroup.headers; track header.id) {
2135
+ <th
2136
+ [attr.data-testid]="'datatable-header-' + header.id"
2137
+ [style.width]="
2138
+ header.column.columnDef.size
2139
+ ? header.column.columnDef.size + 'px'
2140
+ : null
2141
+ "
2142
+ [attr.data-no-resize]="
2143
+ !header.column.columnDef.enableResizing ? 'true' : null
2144
+ "
2145
+ >
2146
+ @if (!header.isPlaceholder) {
2147
+ {{ header.column.columnDef.header }}
2148
+ }
2149
+ </th>
2150
+ }
2151
+ </tr>
2152
+ }
2153
+ </thead>
2154
+
2155
+ <tbody>
2156
+ @for (row of table().getRowModel().rows; track row.id) {
2157
+ <tr [attr.data-testid]="'datatable-row-' + row.id">
2158
+ @for (cell of row.getVisibleCells(); track cell.id) {
2159
+ <td
2160
+ [attr.data-testid]="'datatable-cell-' + cell.id"
2161
+ style="padding: 8px; border-bottom: 1px solid #eee;"
2162
+ >
2163
+ <!-- Let FlexRender handle strings vs TemplateRef -->
2164
+ <ng-container
2165
+ *flexRender="
2166
+ cell.column.columnDef.cell;
2167
+ props: cell.getContext();
2168
+ let cellContent
2169
+ "
2170
+ >
2171
+ {{ cellContent }}
2172
+ </ng-container>
2173
+ </td>
2174
+ }
2175
+ </tr>
2176
+ }
2177
+ </tbody>
2178
+ </table>
2179
+ </nv-table>
2180
+ `,
2181
+ }]
2182
+ }] });
2183
+
1306
2184
  class ValueAccessor {
1307
2185
  constructor(el) {
1308
2186
  this.el = el;
@@ -1342,6 +2220,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
1342
2220
  args: ['focusout']
1343
2221
  }] } });
1344
2222
 
2223
+ class NvAccordionValueAccessor extends ValueAccessor {
2224
+ constructor(el) {
2225
+ super(el);
2226
+ }
2227
+ handleOpenIndexesChanged(event) {
2228
+ this.handleChangeEvent(event.target.openIndexes);
2229
+ }
2230
+ writeValue(value) {
2231
+ this.el.nativeElement.openIndexes = this.lastValue = value;
2232
+ }
2233
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvAccordionValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2234
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.9", type: NvAccordionValueAccessor, selector: "nv-accordion", host: { listeners: { "openIndexesChanged": "handleOpenIndexesChanged($event)" } }, providers: [
2235
+ {
2236
+ provide: NG_VALUE_ACCESSOR,
2237
+ useExisting: NvAccordionValueAccessor,
2238
+ multi: true,
2239
+ },
2240
+ ], usesInheritance: true, ngImport: i0 }); }
2241
+ }
2242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NvAccordionValueAccessor, decorators: [{
2243
+ type: Directive,
2244
+ args: [{
2245
+ selector: 'nv-accordion',
2246
+ providers: [
2247
+ {
2248
+ provide: NG_VALUE_ACCESSOR,
2249
+ useExisting: NvAccordionValueAccessor,
2250
+ multi: true,
2251
+ },
2252
+ ],
2253
+ }]
2254
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { handleOpenIndexesChanged: [{
2255
+ type: HostListener,
2256
+ args: ['openIndexesChanged', ['$event']]
2257
+ }] } });
1345
2258
  class NvAlertValueAccessor extends ValueAccessor {
1346
2259
  constructor(el) {
1347
2260
  super(el);
@@ -2043,6 +2956,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
2043
2956
  args: ['valueChanged', ['$event']]
2044
2957
  }] } });
2045
2958
  const VALUE_ACCESSORS = [
2959
+ NvAccordionValueAccessor,
2046
2960
  NvAlertValueAccessor,
2047
2961
  NvCalendarValueAccessor,
2048
2962
  NvDatagridValueAccessor,
@@ -2065,6 +2979,315 @@ const VALUE_ACCESSORS = [
2065
2979
  NvTogglebuttongroupValueAccessor,
2066
2980
  ];
2067
2981
 
2982
+ /**
2983
+ * Utility function to generate unique IDs.
2984
+ *
2985
+ * @returns {string} A unique identifier string
2986
+ */
2987
+ const generateId = () => {
2988
+ return `notification-${Date.now()}-${Math.random()
2989
+ .toString(36)
2990
+ .substr(2, 9)}`;
2991
+ };
2992
+ /**
2993
+ * Angular service for managing notifications.
2994
+ */
2995
+ class NotificationService {
2996
+ /**
2997
+ * Current array of notifications.
2998
+ *
2999
+ * @returns {Notification[]} Array of active notifications
3000
+ */
3001
+ get notifications() {
3002
+ return this._notifications.value;
3003
+ }
3004
+ constructor() {
3005
+ this._notifications = new BehaviorSubject([]);
3006
+ /**
3007
+ * Observable stream of active notifications.
3008
+ */
3009
+ this.notifications$ = this._notifications.asObservable();
3010
+ // keep track of all notification refs
3011
+ this.elRefs = new Map();
3012
+ this._config = {
3013
+ position: 'top-right',
3014
+ maxNotifications: 50,
3015
+ className: '',
3016
+ };
3017
+ }
3018
+ /**
3019
+ * Configure the notification service.
3020
+ *
3021
+ * @param {NotificationServiceConfig} config Configuration options
3022
+ */
3023
+ configure(config) {
3024
+ Object.assign(this._config, config);
3025
+ }
3026
+ /**
3027
+ * Get the current configuration.
3028
+ *
3029
+ * @returns {Required<NotificationServiceConfig>} Current configuration
3030
+ */
3031
+ get config() {
3032
+ return { ...this._config };
3033
+ }
3034
+ registerRef(id, el) {
3035
+ this.elRefs.set(id, el);
3036
+ }
3037
+ unregisterRef(id) {
3038
+ this.elRefs.delete(id);
3039
+ }
3040
+ clearRefs() {
3041
+ this.elRefs.clear();
3042
+ }
3043
+ /**
3044
+ * Show a new notification.
3045
+ *
3046
+ * @param {NotificationOptions} options The notification options
3047
+ * @returns {string} The notification ID
3048
+ */
3049
+ show(options) {
3050
+ const id = options.id || generateId();
3051
+ const notification = {
3052
+ id,
3053
+ heading: options.heading,
3054
+ message: options.message,
3055
+ dismissible: options.dismissible ?? true,
3056
+ emphasis: options.emphasis ?? 'medium',
3057
+ feedback: options.feedback ?? 'information',
3058
+ icon: options.icon,
3059
+ actions: options.actions ?? [],
3060
+ actionSlot: options.actionSlot,
3061
+ createdAt: Date.now(),
3062
+ };
3063
+ const currentNotifications = this._notifications.value;
3064
+ // Remove oldest notifications if we exceed max
3065
+ const newNotifications = [notification, ...currentNotifications];
3066
+ if (newNotifications.length > this._config.maxNotifications) {
3067
+ this._notifications.next(newNotifications.slice(0, this._config.maxNotifications));
3068
+ }
3069
+ else {
3070
+ this._notifications.next(newNotifications);
3071
+ }
3072
+ setTimeout(() => {
3073
+ const ref = this.elRefs.get(id);
3074
+ ref?.show();
3075
+ }, 0);
3076
+ return id;
3077
+ }
3078
+ /**
3079
+ * Dismiss a specific notification by ID. This will remove the notification
3080
+ * after the animation completes.
3081
+ *
3082
+ * @param {string} id The notification ID to dismiss
3083
+ */
3084
+ dismiss(id) {
3085
+ this.elRefs.get(id)?.dismiss?.();
3086
+ }
3087
+ /**
3088
+ * Immediately remove a specific notification by ID.
3089
+ *
3090
+ * @param {string} id The notification ID to dismiss
3091
+ */
3092
+ remove(id) {
3093
+ const currentNotifications = this._notifications.value;
3094
+ const filteredNotifications = currentNotifications.filter((notification) => notification.id !== id);
3095
+ this._notifications.next(filteredNotifications);
3096
+ }
3097
+ /**
3098
+ * Immediately remove all active notifications.
3099
+ */
3100
+ removeAll() {
3101
+ this._notifications.next([]);
3102
+ }
3103
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3104
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NotificationService, providedIn: 'root' }); }
3105
+ }
3106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NotificationService, decorators: [{
3107
+ type: Injectable,
3108
+ args: [{
3109
+ providedIn: 'root',
3110
+ }]
3111
+ }], ctorParameters: () => [] });
3112
+
3113
+ /**
3114
+ * Angular component that renders the notification container with active notifications.
3115
+ */
3116
+ class NotificationServiceComponent {
3117
+ constructor(notificationService) {
3118
+ this.notificationService = notificationService;
3119
+ /**
3120
+ * Array of active notifications.
3121
+ */
3122
+ this.notifications = [];
3123
+ }
3124
+ /**
3125
+ * Component initialization.
3126
+ */
3127
+ ngOnInit() {
3128
+ // Use service config if no input provided
3129
+ this.position ??= this.notificationService.config.position;
3130
+ this.className ??= this.notificationService.config.className;
3131
+ // Subscribe to notification changes
3132
+ this.subscription = this.notificationService.notifications$.subscribe((list) => (this.notifications = list));
3133
+ }
3134
+ /**
3135
+ * Synchronize notification elements/refs with the service.
3136
+ */
3137
+ ngAfterViewInit() {
3138
+ const sync = () => {
3139
+ this.notificationService.clearRefs();
3140
+ for (const elRef of this.notificationEls.toArray()) {
3141
+ const el = elRef.nativeElement;
3142
+ const id = el.getAttribute('data-id');
3143
+ if (id)
3144
+ this.notificationService.registerRef(id, el);
3145
+ }
3146
+ };
3147
+ sync();
3148
+ this.notificationEls.changes.subscribe(sync);
3149
+ }
3150
+ /**
3151
+ * Component cleanup.
3152
+ */
3153
+ ngOnDestroy() {
3154
+ this.subscription?.unsubscribe();
3155
+ this.notificationService.clearRefs();
3156
+ }
3157
+ /**
3158
+ * Track function for ngFor to optimize rendering.
3159
+ *
3160
+ * @param {number} index The index of the item
3161
+ * @param {Notification} notification The notification item
3162
+ * @returns {string} The notification ID
3163
+ */
3164
+ trackByNotificationId(index, notification) {
3165
+ return notification.id;
3166
+ }
3167
+ /**
3168
+ * Handle notification hidden state change.
3169
+ *
3170
+ * @param {CustomEvent<boolean>} event The hidden changed event
3171
+ * @param {string} id The notification ID
3172
+ */
3173
+ handleHiddenChanged(event, id) {
3174
+ if (event.detail && id) {
3175
+ this.notificationService.remove(id);
3176
+ }
3177
+ }
3178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NotificationServiceComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
3179
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.9", type: NotificationServiceComponent, isStandalone: true, selector: "nv-notification-service", inputs: { position: "position", className: "className" }, viewQueries: [{ propertyName: "notificationEls", predicate: ["notificationEl"], descendants: true, read: ElementRef }], ngImport: i0, template: `
3180
+ <nv-notificationcontainer
3181
+ [position]="position"
3182
+ [class]="className"
3183
+ data-testid="notification-container"
3184
+ >
3185
+ <nv-notification
3186
+ *ngFor="
3187
+ let notification of notifications;
3188
+ trackBy: trackByNotificationId
3189
+ "
3190
+ #notificationEl
3191
+ [attr.data-id]="notification.id"
3192
+ [heading]="notification.heading"
3193
+ [message]="notification.message"
3194
+ [dismissible]="notification.dismissible"
3195
+ [emphasis]="notification.emphasis"
3196
+ [feedback]="notification.feedback"
3197
+ [icon]="notification.icon"
3198
+ [initiallyHidden]="true"
3199
+ (hiddenChanged)="handleHiddenChanged($event, notification.id)"
3200
+ >
3201
+ <!-- Actions slot content for the custom element -->
3202
+ <div
3203
+ slot="actions"
3204
+ class="flex gap-2"
3205
+ *ngIf="notification.actions?.length || notification.actionSlot"
3206
+ >
3207
+ <!-- Config-driven actions -->
3208
+ <nv-button
3209
+ *ngFor="let action of notification.actions"
3210
+ emphasis="low"
3211
+ size="sm"
3212
+ (click)="action.onClick()"
3213
+ >
3214
+ {{ action.label }}
3215
+ </nv-button>
3216
+
3217
+ <!-- Component-driven actions -->
3218
+ <ng-container
3219
+ *ngIf="notification.actionSlot"
3220
+ [ngComponentOutlet]="notification.actionSlot"
3221
+ ></ng-container>
3222
+ </div>
3223
+ </nv-notification>
3224
+ </nv-notificationcontainer>
3225
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
3226
+ }
3227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NotificationServiceComponent, decorators: [{
3228
+ type: Component,
3229
+ args: [{
3230
+ selector: 'nv-notification-service',
3231
+ standalone: true,
3232
+ imports: [CommonModule],
3233
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
3234
+ template: `
3235
+ <nv-notificationcontainer
3236
+ [position]="position"
3237
+ [class]="className"
3238
+ data-testid="notification-container"
3239
+ >
3240
+ <nv-notification
3241
+ *ngFor="
3242
+ let notification of notifications;
3243
+ trackBy: trackByNotificationId
3244
+ "
3245
+ #notificationEl
3246
+ [attr.data-id]="notification.id"
3247
+ [heading]="notification.heading"
3248
+ [message]="notification.message"
3249
+ [dismissible]="notification.dismissible"
3250
+ [emphasis]="notification.emphasis"
3251
+ [feedback]="notification.feedback"
3252
+ [icon]="notification.icon"
3253
+ [initiallyHidden]="true"
3254
+ (hiddenChanged)="handleHiddenChanged($event, notification.id)"
3255
+ >
3256
+ <!-- Actions slot content for the custom element -->
3257
+ <div
3258
+ slot="actions"
3259
+ class="flex gap-2"
3260
+ *ngIf="notification.actions?.length || notification.actionSlot"
3261
+ >
3262
+ <!-- Config-driven actions -->
3263
+ <nv-button
3264
+ *ngFor="let action of notification.actions"
3265
+ emphasis="low"
3266
+ size="sm"
3267
+ (click)="action.onClick()"
3268
+ >
3269
+ {{ action.label }}
3270
+ </nv-button>
3271
+
3272
+ <!-- Component-driven actions -->
3273
+ <ng-container
3274
+ *ngIf="notification.actionSlot"
3275
+ [ngComponentOutlet]="notification.actionSlot"
3276
+ ></ng-container>
3277
+ </div>
3278
+ </nv-notification>
3279
+ </nv-notificationcontainer>
3280
+ `,
3281
+ }]
3282
+ }], ctorParameters: () => [{ type: NotificationService }], propDecorators: { position: [{
3283
+ type: Input
3284
+ }], className: [{
3285
+ type: Input
3286
+ }], notificationEls: [{
3287
+ type: ViewChildren,
3288
+ args: ['notificationEl', { read: ElementRef }]
3289
+ }] } });
3290
+
2068
3291
  /**
2069
3292
  * Initialize the Nova Components
2070
3293
  *
@@ -2079,19 +3302,20 @@ function provideNovaComponents() {
2079
3302
  }
2080
3303
  class NovaComponentsModule {
2081
3304
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2082
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsModule, declarations: [NvAccordion, NvAccordionItem, NvAlert, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCol, NvDatagrid, NvDatagridcolumn, NvDialog, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFielddate, NvFielddaterange, NvFielddropdown, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldnumber, NvFieldpassword, NvFieldradio, NvFieldselect, NvFieldslider, NvFieldtext, NvFieldtextarea, NvFieldtime, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvPopover, NvRow, NvStack, NvTable, NvTablecolumn, NvToggle, NvTogglebutton, NvTogglebuttongroup, NvTooltip], exports: [NvAccordion, NvAccordionItem, NvAlert, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCol, NvDatagrid, NvDatagridcolumn, NvDialog, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFielddate, NvFielddaterange, NvFielddropdown, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldnumber, NvFieldpassword, NvFieldradio, NvFieldselect, NvFieldslider, NvFieldtext, NvFieldtextarea, NvFieldtime, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvPopover, NvRow, NvStack, NvTable, NvTablecolumn, NvToggle, NvTogglebutton, NvTogglebuttongroup, NvTooltip] }); }
2083
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsModule }); }
3305
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsModule, declarations: [NvAccordion, NvAccordionItem, NvAlert, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCol, NvDatagrid, NvDatagridcolumn, NvDialog, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFielddate, NvFielddaterange, NvFielddropdown, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldnumber, NvFieldpassword, NvFieldradio, NvFieldselect, NvFieldslider, NvFieldtext, NvFieldtextarea, NvFieldtime, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvNotificationcontainer, NvPopover, NvRow, NvStack, NvTable, NvToggle, NvTogglebutton, NvTogglebuttongroup, NvTooltip], imports: [NvDatatable], exports: [NvAccordion, NvAccordionItem, NvAlert, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCol, NvDatagrid, NvDatagridcolumn, NvDialog, NvDialogfooter, NvDialogheader, NvFieldcheckbox, NvFielddate, NvFielddaterange, NvFielddropdown, NvFielddropdownitem, NvFielddropdownitemcheck, NvFieldmultiselect, NvFieldnumber, NvFieldpassword, NvFieldradio, NvFieldselect, NvFieldslider, NvFieldtext, NvFieldtextarea, NvFieldtime, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvNotificationcontainer, NvPopover, NvRow, NvStack, NvTable, NvToggle, NvTogglebutton, NvTogglebuttongroup, NvTooltip, NvDatatable] }); }
3306
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsModule, imports: [NvDatatable] }); }
2084
3307
  }
2085
3308
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsModule, decorators: [{
2086
3309
  type: NgModule,
2087
3310
  args: [{
3311
+ imports: [NvDatatable],
2088
3312
  declarations: [...DIRECTIVES],
2089
- exports: [...DIRECTIVES],
3313
+ exports: [...DIRECTIVES, NvDatatable],
2090
3314
  }]
2091
3315
  }] });
2092
3316
  class NovaComponentsValueAccessorModule {
2093
3317
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsValueAccessorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2094
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsValueAccessorModule, declarations: [NvAlertValueAccessor, NvCalendarValueAccessor, NvDatagridValueAccessor, NvDialogValueAccessor, NvFieldcheckboxValueAccessor, NvFielddateValueAccessor, NvFielddaterangeValueAccessor, NvFielddropdownValueAccessor, NvFieldmultiselectValueAccessor, NvFieldnumberValueAccessor, NvFieldpasswordValueAccessor, NvFieldradioValueAccessor, NvFieldselectValueAccessor, NvFieldsliderValueAccessor, NvFieldtextValueAccessor, NvFieldtextareaValueAccessor, NvNotificationValueAccessor, NvPopoverValueAccessor, NvToggleValueAccessor, NvTogglebuttongroupValueAccessor], exports: [NvAlertValueAccessor, NvCalendarValueAccessor, NvDatagridValueAccessor, NvDialogValueAccessor, NvFieldcheckboxValueAccessor, NvFielddateValueAccessor, NvFielddaterangeValueAccessor, NvFielddropdownValueAccessor, NvFieldmultiselectValueAccessor, NvFieldnumberValueAccessor, NvFieldpasswordValueAccessor, NvFieldradioValueAccessor, NvFieldselectValueAccessor, NvFieldsliderValueAccessor, NvFieldtextValueAccessor, NvFieldtextareaValueAccessor, NvNotificationValueAccessor, NvPopoverValueAccessor, NvToggleValueAccessor, NvTogglebuttongroupValueAccessor] }); }
3318
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsValueAccessorModule, declarations: [NvAccordionValueAccessor, NvAlertValueAccessor, NvCalendarValueAccessor, NvDatagridValueAccessor, NvDialogValueAccessor, NvFieldcheckboxValueAccessor, NvFielddateValueAccessor, NvFielddaterangeValueAccessor, NvFielddropdownValueAccessor, NvFieldmultiselectValueAccessor, NvFieldnumberValueAccessor, NvFieldpasswordValueAccessor, NvFieldradioValueAccessor, NvFieldselectValueAccessor, NvFieldsliderValueAccessor, NvFieldtextValueAccessor, NvFieldtextareaValueAccessor, NvNotificationValueAccessor, NvPopoverValueAccessor, NvToggleValueAccessor, NvTogglebuttongroupValueAccessor], exports: [NvAccordionValueAccessor, NvAlertValueAccessor, NvCalendarValueAccessor, NvDatagridValueAccessor, NvDialogValueAccessor, NvFieldcheckboxValueAccessor, NvFielddateValueAccessor, NvFielddaterangeValueAccessor, NvFielddropdownValueAccessor, NvFieldmultiselectValueAccessor, NvFieldnumberValueAccessor, NvFieldpasswordValueAccessor, NvFieldradioValueAccessor, NvFieldselectValueAccessor, NvFieldsliderValueAccessor, NvFieldtextValueAccessor, NvFieldtextareaValueAccessor, NvNotificationValueAccessor, NvPopoverValueAccessor, NvToggleValueAccessor, NvTogglebuttongroupValueAccessor] }); }
2095
3319
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsValueAccessorModule }); }
2096
3320
  }
2097
3321
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsValueAccessorModule, decorators: [{
@@ -2101,6 +3325,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
2101
3325
  exports: [...VALUE_ACCESSORS],
2102
3326
  }]
2103
3327
  }] });
3328
+ class NovaComponentsProvidersModule {
3329
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsProvidersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3330
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsProvidersModule, imports: [NotificationServiceComponent], exports: [NotificationServiceComponent] }); }
3331
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsProvidersModule, imports: [NotificationServiceComponent] }); }
3332
+ }
3333
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: NovaComponentsProvidersModule, decorators: [{
3334
+ type: NgModule,
3335
+ args: [{
3336
+ imports: [NotificationServiceComponent],
3337
+ exports: [NotificationServiceComponent],
3338
+ }]
3339
+ }] });
2104
3340
 
2105
3341
  /*
2106
3342
  * Public API Surface of nova-components
@@ -2110,5 +3346,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImpor
2110
3346
  * Generated bundle index. Do not edit.
2111
3347
  */
2112
3348
 
2113
- export { NovaComponentsModule, NovaComponentsValueAccessorModule, NvAccordion, NvAccordionItem, NvAlert, NvAlertValueAccessor, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCalendarValueAccessor, NvCol, NvDatagrid, NvDatagridValueAccessor, NvDatagridcolumn, 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, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvNotificationValueAccessor, NvPopover, NvPopoverValueAccessor, NvRow, NvStack, NvTable, NvTablecolumn, NvToggle, NvToggleValueAccessor, NvTogglebutton, NvTogglebuttongroup, NvTogglebuttongroupValueAccessor, NvTooltip, VALUE_ACCESSORS, provideNovaComponents };
3349
+ export { NotificationService, NotificationServiceComponent, NovaComponentsModule, NovaComponentsProvidersModule, NovaComponentsValueAccessorModule, NvAccordion, NvAccordionItem, NvAccordionValueAccessor, NvAlert, NvAlertValueAccessor, NvAvatar, NvBadge, NvBreadcrumb, NvBreadcrumbs, NvButton, NvButtongroup, NvCalendar, NvCalendarValueAccessor, NvCol, NvDatagrid, NvDatagridValueAccessor, NvDatagridcolumn, NvDatatable, 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, NvIcon, NvIconbutton, NvLoader, NvMenu, NvMenuitem, NvNotification, NvNotificationValueAccessor, NvNotificationcontainer, NvPopover, NvPopoverValueAccessor, NvRow, NvStack, NvTable, NvToggle, NvToggleValueAccessor, NvTogglebutton, NvTogglebuttongroup, NvTogglebuttongroupValueAccessor, NvTooltip, VALUE_ACCESSORS, flexRenderComponent as nvDatatableRenderComponent, provideNovaComponents };
2114
3350
  //# sourceMappingURL=nova-components.mjs.map