@nova-design-system/nova-angular-18 3.15.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.
- package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render/context.mjs +6 -0
- package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render/flags.mjs +42 -0
- package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render/flex-render-component-ref.mjs +171 -0
- package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render/flex-render-component.mjs +39 -0
- package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render/view.mjs +101 -0
- package/dist/nova-components/esm2022/lib/components/datatable.utils/flex-render.mjs +211 -0
- package/dist/nova-components/esm2022/lib/components/datatable.utils/index.mjs +49 -0
- package/dist/nova-components/esm2022/lib/components/datatable.utils/lazy-signal-initializer.mjs +43 -0
- package/dist/nova-components/esm2022/lib/components/datatable.utils/proxy.mjs +87 -0
- package/dist/nova-components/esm2022/lib/components/index.mjs +2 -0
- package/dist/nova-components/esm2022/lib/components/nv-datatable.component.mjs +158 -0
- package/dist/nova-components/esm2022/lib/nova-components.module.mjs +7 -5
- package/dist/nova-components/esm2022/lib/stencil-generated/component-value-accessors.mjs +37 -1
- package/dist/nova-components/esm2022/lib/stencil-generated/components.mjs +5 -34
- package/dist/nova-components/esm2022/lib/stencil-generated/index.mjs +1 -2
- package/dist/nova-components/esm2022/public-api.mjs +2 -1
- package/dist/nova-components/fesm2022/nova-components.mjs +927 -40
- package/dist/nova-components/fesm2022/nova-components.mjs.map +1 -1
- package/dist/nova-components/lib/components/datatable.utils/flex-render/context.d.ts +3 -0
- package/dist/nova-components/lib/components/datatable.utils/flex-render/flags.d.ts +40 -0
- package/dist/nova-components/lib/components/datatable.utils/flex-render/flex-render-component-ref.d.ts +39 -0
- package/dist/nova-components/lib/components/datatable.utils/flex-render/flex-render-component.d.ts +60 -0
- package/dist/nova-components/lib/components/datatable.utils/flex-render/view.d.ts +49 -0
- package/dist/nova-components/lib/components/datatable.utils/flex-render.d.ts +26 -0
- package/dist/nova-components/lib/components/datatable.utils/index.d.ts +6 -0
- package/dist/nova-components/lib/components/datatable.utils/lazy-signal-initializer.d.ts +5 -0
- package/dist/nova-components/lib/components/datatable.utils/proxy.d.ts +3 -0
- package/dist/nova-components/lib/components/index.d.ts +1 -0
- package/dist/nova-components/lib/components/nv-datatable.component.d.ts +46 -0
- package/dist/nova-components/lib/nova-components.module.d.ts +4 -3
- package/dist/nova-components/lib/stencil-generated/component-value-accessors.d.ts +8 -1
- package/dist/nova-components/lib/stencil-generated/components.d.ts +3 -21
- package/dist/nova-components/lib/stencil-generated/index.d.ts +1 -1
- package/dist/nova-components/public-api.d.ts +1 -0
- package/package.json +5 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, Component,
|
|
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, APP_INITIALIZER, NgModule, ElementRef, ViewChildren } from '@angular/core';
|
|
3
3
|
import { defineCustomElements } from '@nova-design-system/nova-webcomponents/loader';
|
|
4
4
|
import { __decorate } from 'tslib';
|
|
5
5
|
import { fromEvent, BehaviorSubject } from 'rxjs';
|
|
6
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
6
|
import * as i2 from '@angular/common';
|
|
8
7
|
import { CommonModule } from '@angular/common';
|
|
8
|
+
import { memo, createTable, getCoreRowModel } from '@tanstack/table-core';
|
|
9
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
10
|
export * from '@nova-design-system/nova-webcomponents/constants';
|
|
10
11
|
|
|
11
12
|
/* eslint-disable */
|
|
@@ -71,7 +72,7 @@ let NvAccordion = class NvAccordion {
|
|
|
71
72
|
this.z = z;
|
|
72
73
|
c.detach();
|
|
73
74
|
this.el = r.nativeElement;
|
|
74
|
-
proxyOutputs(this, this.el, ['
|
|
75
|
+
proxyOutputs(this, this.el, ['openIndexesChanged']);
|
|
75
76
|
}
|
|
76
77
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvAccordion, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
77
78
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 }); }
|
|
@@ -1130,15 +1131,12 @@ let NvTable = class NvTable {
|
|
|
1130
1131
|
this.z = z;
|
|
1131
1132
|
c.detach();
|
|
1132
1133
|
this.el = r.nativeElement;
|
|
1133
|
-
proxyOutputs(this, this.el, ['action']);
|
|
1134
1134
|
}
|
|
1135
1135
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvTable, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1136
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NvTable, selector: "nv-table",
|
|
1136
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NvTable, selector: "nv-table", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1137
1137
|
};
|
|
1138
1138
|
NvTable = __decorate([
|
|
1139
|
-
ProxyCmp({
|
|
1140
|
-
inputs: ['columnsConfig', 'columnsConfigJson', 'data', 'dataJson', 'fallbackValue', 'noColumnsNoDataMessage', 'noDataMessage']
|
|
1141
|
-
})
|
|
1139
|
+
ProxyCmp({})
|
|
1142
1140
|
], NvTable);
|
|
1143
1141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvTable, decorators: [{
|
|
1144
1142
|
type: Component,
|
|
@@ -1147,32 +1145,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1147
1145
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1148
1146
|
template: '<ng-content></ng-content>',
|
|
1149
1147
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1150
|
-
inputs: [
|
|
1151
|
-
standalone: false
|
|
1152
|
-
}]
|
|
1153
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
1154
|
-
let NvTablecolumn = class NvTablecolumn {
|
|
1155
|
-
constructor(c, r, z) {
|
|
1156
|
-
this.z = z;
|
|
1157
|
-
c.detach();
|
|
1158
|
-
this.el = r.nativeElement;
|
|
1159
|
-
}
|
|
1160
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvTablecolumn, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1161
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NvTablecolumn, selector: "nv-tablecolumn", inputs: { header: "header", name: "name" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1162
|
-
};
|
|
1163
|
-
NvTablecolumn = __decorate([
|
|
1164
|
-
ProxyCmp({
|
|
1165
|
-
inputs: ['header', 'name']
|
|
1166
|
-
})
|
|
1167
|
-
], NvTablecolumn);
|
|
1168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NvTablecolumn, decorators: [{
|
|
1169
|
-
type: Component,
|
|
1170
|
-
args: [{
|
|
1171
|
-
selector: 'nv-tablecolumn',
|
|
1172
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1173
|
-
template: '<ng-content></ng-content>',
|
|
1174
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1175
|
-
inputs: ['header', { name: 'name', required: true }],
|
|
1148
|
+
inputs: [],
|
|
1176
1149
|
standalone: false
|
|
1177
1150
|
}]
|
|
1178
1151
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
@@ -1324,13 +1297,890 @@ const DIRECTIVES = [
|
|
|
1324
1297
|
NvRow,
|
|
1325
1298
|
NvStack,
|
|
1326
1299
|
NvTable,
|
|
1327
|
-
NvTablecolumn,
|
|
1328
1300
|
NvToggle,
|
|
1329
1301
|
NvTogglebutton,
|
|
1330
1302
|
NvTogglebuttongroup,
|
|
1331
1303
|
NvTooltip
|
|
1332
1304
|
];
|
|
1333
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: "18.2.13", ngImport: i0, type: FlexRenderComponentFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1534
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FlexRenderComponentFactory }); }
|
|
1535
|
+
}
|
|
1536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", 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: "18.2.13", ngImport: i0, type: FlexRenderDirective, deps: [{ token: ViewContainerRef }, { token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1963
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", 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: "18.2.13", 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: "18.2.13", ngImport: i0, type: NvDatatable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2065
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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: "18.2.13", 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
|
+
|
|
1334
2184
|
class ValueAccessor {
|
|
1335
2185
|
constructor(el) {
|
|
1336
2186
|
this.el = el;
|
|
@@ -1370,6 +2220,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1370
2220
|
args: ['focusout']
|
|
1371
2221
|
}] } });
|
|
1372
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: "18.2.13", ngImport: i0, type: NvAccordionValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2234
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", 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: "18.2.13", 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
|
+
}] } });
|
|
1373
2258
|
class NvAlertValueAccessor extends ValueAccessor {
|
|
1374
2259
|
constructor(el) {
|
|
1375
2260
|
super(el);
|
|
@@ -2071,6 +2956,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2071
2956
|
args: ['valueChanged', ['$event']]
|
|
2072
2957
|
}] } });
|
|
2073
2958
|
const VALUE_ACCESSORS = [
|
|
2959
|
+
NvAccordionValueAccessor,
|
|
2074
2960
|
NvAlertValueAccessor,
|
|
2075
2961
|
NvCalendarValueAccessor,
|
|
2076
2962
|
NvDatagridValueAccessor,
|
|
@@ -2107,20 +2993,21 @@ function provideNovaComponents() {
|
|
|
2107
2993
|
}
|
|
2108
2994
|
class NovaComponentsModule {
|
|
2109
2995
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2110
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", 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,
|
|
2111
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsModule, providers: [provideNovaComponents()] }); }
|
|
2996
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", 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] }); }
|
|
2997
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsModule, providers: [provideNovaComponents()], imports: [NvDatatable] }); }
|
|
2112
2998
|
}
|
|
2113
2999
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsModule, decorators: [{
|
|
2114
3000
|
type: NgModule,
|
|
2115
3001
|
args: [{
|
|
3002
|
+
imports: [NvDatatable],
|
|
2116
3003
|
declarations: [...DIRECTIVES],
|
|
2117
|
-
exports: [...DIRECTIVES],
|
|
3004
|
+
exports: [...DIRECTIVES, NvDatatable],
|
|
2118
3005
|
providers: [provideNovaComponents()],
|
|
2119
3006
|
}]
|
|
2120
3007
|
}] });
|
|
2121
3008
|
class NovaComponentsValueAccessorModule {
|
|
2122
3009
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsValueAccessorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2123
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", 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] }); }
|
|
3010
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", 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] }); }
|
|
2124
3011
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsValueAccessorModule }); }
|
|
2125
3012
|
}
|
|
2126
3013
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NovaComponentsValueAccessorModule, decorators: [{
|
|
@@ -2448,5 +3335,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2448
3335
|
* Generated bundle index. Do not edit.
|
|
2449
3336
|
*/
|
|
2450
3337
|
|
|
2451
|
-
export { NotificationService, NotificationServiceComponent, 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, NvNotificationcontainer, NvPopover, NvPopoverValueAccessor, NvRow, NvStack, NvTable,
|
|
3338
|
+
export { NotificationService, NotificationServiceComponent, NovaComponentsModule, 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 };
|
|
2452
3339
|
//# sourceMappingURL=nova-components.mjs.map
|