@toolbox-web/grid-angular 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -341,11 +341,23 @@ function getFormArrayContext(gridElement) {
|
|
|
341
341
|
class GridFormArray {
|
|
342
342
|
elementRef = inject((ElementRef));
|
|
343
343
|
cellCommitListener = null;
|
|
344
|
+
rowCommitListener = null;
|
|
344
345
|
touchListener = null;
|
|
345
346
|
/**
|
|
346
347
|
* The FormArray to bind to the grid.
|
|
347
348
|
*/
|
|
348
349
|
formArray = input.required(...(ngDevMode ? [{ debugName: "formArray" }] : []));
|
|
350
|
+
/**
|
|
351
|
+
* Whether to automatically sync Angular validation state to grid's visual invalid styling.
|
|
352
|
+
*
|
|
353
|
+
* When enabled:
|
|
354
|
+
* - After a cell commit, if the FormControl is invalid, the cell is marked with `setInvalid()`
|
|
355
|
+
* - When a FormControl becomes valid, `clearInvalid()` is called
|
|
356
|
+
* - On `row-commit`, if the row's FormGroup has invalid controls, the commit is prevented
|
|
357
|
+
*
|
|
358
|
+
* @default true
|
|
359
|
+
*/
|
|
360
|
+
syncValidation = input(true, ...(ngDevMode ? [{ debugName: "syncValidation" }] : []));
|
|
349
361
|
/**
|
|
350
362
|
* Effect that syncs the FormArray value to the grid rows.
|
|
351
363
|
*/
|
|
@@ -369,6 +381,14 @@ class GridFormArray {
|
|
|
369
381
|
this.#handleCellCommit(detail);
|
|
370
382
|
};
|
|
371
383
|
grid.addEventListener('cell-commit', this.cellCommitListener);
|
|
384
|
+
// Intercept row-commit events to prevent if FormGroup is invalid
|
|
385
|
+
this.rowCommitListener = (e) => {
|
|
386
|
+
if (!this.syncValidation())
|
|
387
|
+
return;
|
|
388
|
+
const detail = e.detail;
|
|
389
|
+
this.#handleRowCommit(e, detail);
|
|
390
|
+
};
|
|
391
|
+
grid.addEventListener('row-commit', this.rowCommitListener);
|
|
372
392
|
// Mark FormArray as touched on first interaction
|
|
373
393
|
this.touchListener = () => {
|
|
374
394
|
this.formArray().markAsTouched();
|
|
@@ -387,6 +407,9 @@ class GridFormArray {
|
|
|
387
407
|
if (this.cellCommitListener) {
|
|
388
408
|
grid.removeEventListener('cell-commit', this.cellCommitListener);
|
|
389
409
|
}
|
|
410
|
+
if (this.rowCommitListener) {
|
|
411
|
+
grid.removeEventListener('row-commit', this.rowCommitListener);
|
|
412
|
+
}
|
|
390
413
|
if (this.touchListener) {
|
|
391
414
|
grid.removeEventListener('click', this.touchListener);
|
|
392
415
|
}
|
|
@@ -491,7 +514,7 @@ class GridFormArray {
|
|
|
491
514
|
* Handles cell-commit events by updating the FormControl in the FormGroup.
|
|
492
515
|
*/
|
|
493
516
|
#handleCellCommit(detail) {
|
|
494
|
-
const { rowIndex, field, value } = detail;
|
|
517
|
+
const { rowIndex, field, value, rowId } = detail;
|
|
495
518
|
const rowFormGroup = this.#getRowFormGroup(rowIndex);
|
|
496
519
|
if (rowFormGroup) {
|
|
497
520
|
const control = rowFormGroup.get(field);
|
|
@@ -499,18 +522,83 @@ class GridFormArray {
|
|
|
499
522
|
control.setValue(value);
|
|
500
523
|
control.markAsDirty();
|
|
501
524
|
control.markAsTouched();
|
|
525
|
+
// Sync Angular validation state to grid's visual invalid styling
|
|
526
|
+
if (this.syncValidation() && rowId) {
|
|
527
|
+
this.#syncControlValidationToGrid(rowId, field, control);
|
|
528
|
+
}
|
|
502
529
|
}
|
|
503
530
|
}
|
|
504
531
|
}
|
|
532
|
+
/**
|
|
533
|
+
* Handles row-commit events - prevents commit if FormGroup has invalid controls.
|
|
534
|
+
*/
|
|
535
|
+
#handleRowCommit(event, detail) {
|
|
536
|
+
const { rowIndex } = detail;
|
|
537
|
+
const rowFormGroup = this.#getRowFormGroup(rowIndex);
|
|
538
|
+
if (rowFormGroup && rowFormGroup.invalid) {
|
|
539
|
+
// Prevent row commit if the FormGroup is invalid
|
|
540
|
+
event.preventDefault();
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Syncs a FormControl's validation state to the grid's visual invalid styling.
|
|
545
|
+
*/
|
|
546
|
+
#syncControlValidationToGrid(rowId, field, control) {
|
|
547
|
+
const grid = this.elementRef.nativeElement;
|
|
548
|
+
if (!grid)
|
|
549
|
+
return;
|
|
550
|
+
// Get EditingPlugin via getPluginByName
|
|
551
|
+
const editingPlugin = grid.getPluginByName?.('editing');
|
|
552
|
+
if (!editingPlugin)
|
|
553
|
+
return;
|
|
554
|
+
if (control.invalid) {
|
|
555
|
+
// Get first error message to display
|
|
556
|
+
const errorMessage = this.#getFirstErrorMessage(control);
|
|
557
|
+
editingPlugin.setInvalid(rowId, field, errorMessage);
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
editingPlugin.clearInvalid(rowId, field);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Gets a human-readable error message from the first validation error.
|
|
565
|
+
*/
|
|
566
|
+
#getFirstErrorMessage(control) {
|
|
567
|
+
const errors = control.errors;
|
|
568
|
+
if (!errors)
|
|
569
|
+
return '';
|
|
570
|
+
const firstKey = Object.keys(errors)[0];
|
|
571
|
+
const error = errors[firstKey];
|
|
572
|
+
// Common Angular validators
|
|
573
|
+
switch (firstKey) {
|
|
574
|
+
case 'required':
|
|
575
|
+
return 'This field is required';
|
|
576
|
+
case 'minlength':
|
|
577
|
+
return `Minimum length is ${error.requiredLength}`;
|
|
578
|
+
case 'maxlength':
|
|
579
|
+
return `Maximum length is ${error.requiredLength}`;
|
|
580
|
+
case 'min':
|
|
581
|
+
return `Minimum value is ${error.min}`;
|
|
582
|
+
case 'max':
|
|
583
|
+
return `Maximum value is ${error.max}`;
|
|
584
|
+
case 'email':
|
|
585
|
+
return 'Invalid email address';
|
|
586
|
+
case 'pattern':
|
|
587
|
+
return 'Invalid format';
|
|
588
|
+
default:
|
|
589
|
+
// Custom validators may provide a message property
|
|
590
|
+
return typeof error === 'string' ? error : (error?.message ?? `Validation error: ${firstKey}`);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
505
593
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: GridFormArray, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
506
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: GridFormArray, isStandalone: true, selector: "tbw-grid[formArray]", inputs: { formArray: { classPropertyName: "formArray", publicName: "formArray", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
594
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: GridFormArray, isStandalone: true, selector: "tbw-grid[formArray]", inputs: { formArray: { classPropertyName: "formArray", publicName: "formArray", isSignal: true, isRequired: true, transformFunction: null }, syncValidation: { classPropertyName: "syncValidation", publicName: "syncValidation", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
507
595
|
}
|
|
508
596
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: GridFormArray, decorators: [{
|
|
509
597
|
type: Directive,
|
|
510
598
|
args: [{
|
|
511
599
|
selector: 'tbw-grid[formArray]',
|
|
512
600
|
}]
|
|
513
|
-
}], propDecorators: { formArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "formArray", required: true }] }] } });
|
|
601
|
+
}], propDecorators: { formArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "formArray", required: true }] }], syncValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "syncValidation", required: false }] }] } });
|
|
514
602
|
|
|
515
603
|
/**
|
|
516
604
|
* Registry to store responsive card templates by grid element.
|
|
@@ -2335,16 +2423,12 @@ class Grid {
|
|
|
2335
2423
|
// Effect to process angularConfig and apply to grid
|
|
2336
2424
|
// This merges feature input plugins with the user's config plugins
|
|
2337
2425
|
effect(() => {
|
|
2338
|
-
const
|
|
2426
|
+
const angularCfg = this.angularConfig();
|
|
2427
|
+
const userGridConfig = this.gridConfig();
|
|
2339
2428
|
if (!this.adapter)
|
|
2340
2429
|
return;
|
|
2341
|
-
//
|
|
2342
|
-
const processedConfig = config ? this.adapter.processGridConfig(config) : {};
|
|
2343
|
-
// Create plugins from feature inputs and merge with config plugins
|
|
2430
|
+
// Create plugins from feature inputs
|
|
2344
2431
|
const featurePlugins = this.createFeaturePlugins();
|
|
2345
|
-
const configPlugins = processedConfig.plugins || [];
|
|
2346
|
-
// Merge: feature plugins first, then config plugins
|
|
2347
|
-
const mergedPlugins = [...featurePlugins, ...configPlugins];
|
|
2348
2432
|
// Build core config overrides from individual inputs
|
|
2349
2433
|
const sortableValue = this.sortable();
|
|
2350
2434
|
const filterableValue = this.filterable();
|
|
@@ -2359,19 +2443,39 @@ class Grid {
|
|
|
2359
2443
|
if (selectableValue !== undefined) {
|
|
2360
2444
|
coreConfigOverrides['selectable'] = selectableValue;
|
|
2361
2445
|
}
|
|
2362
|
-
|
|
2446
|
+
const grid = this.elementRef.nativeElement;
|
|
2447
|
+
// Merge icon overrides from registry with any existing icons
|
|
2363
2448
|
// Registry icons are base, config.icons override them
|
|
2364
2449
|
const registryIcons = this.iconRegistry?.getAll();
|
|
2365
2450
|
if (registryIcons && Object.keys(registryIcons).length > 0) {
|
|
2366
|
-
const existingIcons =
|
|
2451
|
+
const existingIcons = angularCfg?.icons || userGridConfig?.icons || {};
|
|
2367
2452
|
coreConfigOverrides['icons'] = { ...registryIcons, ...existingIcons };
|
|
2368
2453
|
}
|
|
2369
|
-
//
|
|
2370
|
-
const
|
|
2454
|
+
// If angularConfig is provided, process it (converts component classes to renderer functions)
|
|
2455
|
+
const processedConfig = angularCfg ? this.adapter.processGridConfig(angularCfg) : null;
|
|
2456
|
+
// IMPORTANT: If user is NOT using angularConfig input, and there are no feature plugins
|
|
2457
|
+
// or config overrides to merge, do NOT overwrite grid.gridConfig.
|
|
2458
|
+
// This allows [gridConfig]="myConfig" binding to work correctly without the directive
|
|
2459
|
+
// creating a new object that strips properties like typeDefaults.
|
|
2460
|
+
const hasFeaturePlugins = featurePlugins.length > 0;
|
|
2461
|
+
const hasConfigOverrides = Object.keys(coreConfigOverrides).length > 0;
|
|
2462
|
+
// Use the gridConfig input signal (preferred) or fallback to what's on the grid element
|
|
2463
|
+
// The input signal gives us reactive tracking of the user's config
|
|
2464
|
+
const existingConfig = userGridConfig || {};
|
|
2465
|
+
if (!processedConfig && !hasFeaturePlugins && !hasConfigOverrides && !userGridConfig) {
|
|
2466
|
+
// Nothing to merge and no config input - let the user's DOM binding work directly
|
|
2467
|
+
return;
|
|
2468
|
+
}
|
|
2469
|
+
// Merge: existing config (from [gridConfig] input) < processed angularConfig < feature plugins
|
|
2470
|
+
const configPlugins = processedConfig?.plugins || existingConfig.plugins || [];
|
|
2471
|
+
const mergedPlugins = [...featurePlugins, ...configPlugins];
|
|
2472
|
+
// Build the final config, preserving ALL existing properties (including typeDefaults)
|
|
2473
|
+
const baseConfig = processedConfig || existingConfig;
|
|
2371
2474
|
grid.gridConfig = {
|
|
2372
|
-
...
|
|
2475
|
+
...existingConfig, // Start with existing config to preserve all properties (including typeDefaults)
|
|
2476
|
+
...baseConfig, // Then apply processed/angular config
|
|
2373
2477
|
...coreConfigOverrides,
|
|
2374
|
-
plugins: mergedPlugins.length > 0 ? mergedPlugins :
|
|
2478
|
+
plugins: mergedPlugins.length > 0 ? mergedPlugins : baseConfig.plugins,
|
|
2375
2479
|
};
|
|
2376
2480
|
});
|
|
2377
2481
|
// Effect to sync loading state to the grid element
|
|
@@ -2490,6 +2594,33 @@ class Grid {
|
|
|
2490
2594
|
* ```
|
|
2491
2595
|
*/
|
|
2492
2596
|
loading = input(...(ngDevMode ? [undefined, { debugName: "loading" }] : []));
|
|
2597
|
+
/**
|
|
2598
|
+
* Core grid configuration object.
|
|
2599
|
+
*
|
|
2600
|
+
* Use this input for the base GridConfig (typeDefaults, getRowId, etc.).
|
|
2601
|
+
* This is the same as binding directly to the web component's gridConfig property,
|
|
2602
|
+
* but allows the directive to properly merge feature plugins and config overrides.
|
|
2603
|
+
*
|
|
2604
|
+
* For Angular-specific features (component class renderers/editors), use `angularConfig` instead.
|
|
2605
|
+
*
|
|
2606
|
+
* @example
|
|
2607
|
+
* ```typescript
|
|
2608
|
+
* config: GridConfig = {
|
|
2609
|
+
* typeDefaults: {
|
|
2610
|
+
* boolean: { renderer: (ctx) => ctx.value ? '✓' : '✗' }
|
|
2611
|
+
* }
|
|
2612
|
+
* };
|
|
2613
|
+
* columns = [
|
|
2614
|
+
* { field: 'active', type: 'boolean' }
|
|
2615
|
+
* ];
|
|
2616
|
+
* ```
|
|
2617
|
+
*
|
|
2618
|
+
* ```html
|
|
2619
|
+
* <tbw-grid [gridConfig]="config" [columns]="columns" />
|
|
2620
|
+
* ```
|
|
2621
|
+
*/
|
|
2622
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2623
|
+
gridConfig = input(...(ngDevMode ? [undefined, { debugName: "gridConfig" }] : []));
|
|
2493
2624
|
/**
|
|
2494
2625
|
* Angular-specific grid configuration that supports component classes for renderers/editors.
|
|
2495
2626
|
*
|
|
@@ -3354,12 +3485,12 @@ class Grid {
|
|
|
3354
3485
|
}
|
|
3355
3486
|
}
|
|
3356
3487
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: Grid, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3357
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: Grid, isStandalone: true, selector: "tbw-grid", inputs: { customStyles: { classPropertyName: "customStyles", publicName: "customStyles", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, angularConfig: { classPropertyName: "angularConfig", publicName: "angularConfig", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, editing: { classPropertyName: "editing", publicName: "editing", isSignal: true, isRequired: false, transformFunction: null }, clipboard: { classPropertyName: "clipboard", publicName: "clipboard", isSignal: true, isRequired: false, transformFunction: null }, contextMenu: { classPropertyName: "contextMenu", publicName: "contextMenu", isSignal: true, isRequired: false, transformFunction: null }, multiSort: { classPropertyName: "multiSort", publicName: "multiSort", isSignal: true, isRequired: false, transformFunction: null }, sorting: { classPropertyName: "sorting", publicName: "sorting", isSignal: true, isRequired: false, transformFunction: null }, filtering: { classPropertyName: "filtering", publicName: "filtering", isSignal: true, isRequired: false, transformFunction: null }, reorder: { classPropertyName: "reorder", publicName: "reorder", isSignal: true, isRequired: false, transformFunction: null }, visibility: { classPropertyName: "visibility", publicName: "visibility", isSignal: true, isRequired: false, transformFunction: null }, pinnedColumns: { classPropertyName: "pinnedColumns", publicName: "pinnedColumns", isSignal: true, isRequired: false, transformFunction: null }, groupingColumns: { classPropertyName: "groupingColumns", publicName: "groupingColumns", isSignal: true, isRequired: false, transformFunction: null }, columnVirtualization: { classPropertyName: "columnVirtualization", publicName: "columnVirtualization", isSignal: true, isRequired: false, transformFunction: null }, rowReorder: { classPropertyName: "rowReorder", publicName: "rowReorder", isSignal: true, isRequired: false, transformFunction: null }, groupingRows: { classPropertyName: "groupingRows", publicName: "groupingRows", isSignal: true, isRequired: false, transformFunction: null }, pinnedRows: { classPropertyName: "pinnedRows", publicName: "pinnedRows", isSignal: true, isRequired: false, transformFunction: null }, tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null }, masterDetail: { classPropertyName: "masterDetail", publicName: "masterDetail", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, undoRedo: { classPropertyName: "undoRedo", publicName: "undoRedo", isSignal: true, isRequired: false, transformFunction: null }, exportFeature: { classPropertyName: "exportFeature", publicName: "exportFeature", isSignal: true, isRequired: false, transformFunction: null }, print: { classPropertyName: "print", publicName: "print", isSignal: true, isRequired: false, transformFunction: null }, pivot: { classPropertyName: "pivot", publicName: "pivot", isSignal: true, isRequired: false, transformFunction: null }, serverSide: { classPropertyName: "serverSide", publicName: "serverSide", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cellClick: "cellClick", rowClick: "rowClick", cellActivate: "cellActivate", cellChange: "cellChange", cellCommit: "cellCommit", rowCommit: "rowCommit", changedRowsReset: "changedRowsReset", sortChange: "sortChange", filterChange: "filterChange", columnResize: "columnResize", columnMove: "columnMove", columnVisibility: "columnVisibility", columnStateChange: "columnStateChange", selectionChange: "selectionChange", rowMove: "rowMove", groupToggle: "groupToggle", treeExpand: "treeExpand", detailExpand: "detailExpand", responsiveChange: "responsiveChange", copy: "copy", paste: "paste", undoRedoAction: "undoRedoAction", exportComplete: "exportComplete", printStart: "printStart", printComplete: "printComplete" }, ngImport: i0 });
|
|
3488
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: Grid, isStandalone: true, selector: "tbw-grid", inputs: { customStyles: { classPropertyName: "customStyles", publicName: "customStyles", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, gridConfig: { classPropertyName: "gridConfig", publicName: "gridConfig", isSignal: true, isRequired: false, transformFunction: null }, angularConfig: { classPropertyName: "angularConfig", publicName: "angularConfig", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, editing: { classPropertyName: "editing", publicName: "editing", isSignal: true, isRequired: false, transformFunction: null }, clipboard: { classPropertyName: "clipboard", publicName: "clipboard", isSignal: true, isRequired: false, transformFunction: null }, contextMenu: { classPropertyName: "contextMenu", publicName: "contextMenu", isSignal: true, isRequired: false, transformFunction: null }, multiSort: { classPropertyName: "multiSort", publicName: "multiSort", isSignal: true, isRequired: false, transformFunction: null }, sorting: { classPropertyName: "sorting", publicName: "sorting", isSignal: true, isRequired: false, transformFunction: null }, filtering: { classPropertyName: "filtering", publicName: "filtering", isSignal: true, isRequired: false, transformFunction: null }, reorder: { classPropertyName: "reorder", publicName: "reorder", isSignal: true, isRequired: false, transformFunction: null }, visibility: { classPropertyName: "visibility", publicName: "visibility", isSignal: true, isRequired: false, transformFunction: null }, pinnedColumns: { classPropertyName: "pinnedColumns", publicName: "pinnedColumns", isSignal: true, isRequired: false, transformFunction: null }, groupingColumns: { classPropertyName: "groupingColumns", publicName: "groupingColumns", isSignal: true, isRequired: false, transformFunction: null }, columnVirtualization: { classPropertyName: "columnVirtualization", publicName: "columnVirtualization", isSignal: true, isRequired: false, transformFunction: null }, rowReorder: { classPropertyName: "rowReorder", publicName: "rowReorder", isSignal: true, isRequired: false, transformFunction: null }, groupingRows: { classPropertyName: "groupingRows", publicName: "groupingRows", isSignal: true, isRequired: false, transformFunction: null }, pinnedRows: { classPropertyName: "pinnedRows", publicName: "pinnedRows", isSignal: true, isRequired: false, transformFunction: null }, tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null }, masterDetail: { classPropertyName: "masterDetail", publicName: "masterDetail", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, undoRedo: { classPropertyName: "undoRedo", publicName: "undoRedo", isSignal: true, isRequired: false, transformFunction: null }, exportFeature: { classPropertyName: "exportFeature", publicName: "exportFeature", isSignal: true, isRequired: false, transformFunction: null }, print: { classPropertyName: "print", publicName: "print", isSignal: true, isRequired: false, transformFunction: null }, pivot: { classPropertyName: "pivot", publicName: "pivot", isSignal: true, isRequired: false, transformFunction: null }, serverSide: { classPropertyName: "serverSide", publicName: "serverSide", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cellClick: "cellClick", rowClick: "rowClick", cellActivate: "cellActivate", cellChange: "cellChange", cellCommit: "cellCommit", rowCommit: "rowCommit", changedRowsReset: "changedRowsReset", sortChange: "sortChange", filterChange: "filterChange", columnResize: "columnResize", columnMove: "columnMove", columnVisibility: "columnVisibility", columnStateChange: "columnStateChange", selectionChange: "selectionChange", rowMove: "rowMove", groupToggle: "groupToggle", treeExpand: "treeExpand", detailExpand: "detailExpand", responsiveChange: "responsiveChange", copy: "copy", paste: "paste", undoRedoAction: "undoRedoAction", exportComplete: "exportComplete", printStart: "printStart", printComplete: "printComplete" }, ngImport: i0 });
|
|
3358
3489
|
}
|
|
3359
3490
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: Grid, decorators: [{
|
|
3360
3491
|
type: Directive,
|
|
3361
3492
|
args: [{ selector: 'tbw-grid' }]
|
|
3362
|
-
}], ctorParameters: () => [], propDecorators: { customStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "customStyles", required: false }] }], sortable: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortable", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], angularConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "angularConfig", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], editing: [{ type: i0.Input, args: [{ isSignal: true, alias: "editing", required: false }] }], clipboard: [{ type: i0.Input, args: [{ isSignal: true, alias: "clipboard", required: false }] }], contextMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenu", required: false }] }], multiSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSort", required: false }] }], sorting: [{ type: i0.Input, args: [{ isSignal: true, alias: "sorting", required: false }] }], filtering: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtering", required: false }] }], reorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorder", required: false }] }], visibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibility", required: false }] }], pinnedColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinnedColumns", required: false }] }], groupingColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupingColumns", required: false }] }], columnVirtualization: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnVirtualization", required: false }] }], rowReorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowReorder", required: false }] }], groupingRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupingRows", required: false }] }], pinnedRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinnedRows", required: false }] }], tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], masterDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "masterDetail", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }], undoRedo: [{ type: i0.Input, args: [{ isSignal: true, alias: "undoRedo", required: false }] }], exportFeature: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportFeature", required: false }] }], print: [{ type: i0.Input, args: [{ isSignal: true, alias: "print", required: false }] }], pivot: [{ type: i0.Input, args: [{ isSignal: true, alias: "pivot", required: false }] }], serverSide: [{ type: i0.Input, args: [{ isSignal: true, alias: "serverSide", required: false }] }], cellClick: [{ type: i0.Output, args: ["cellClick"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], cellActivate: [{ type: i0.Output, args: ["cellActivate"] }], cellChange: [{ type: i0.Output, args: ["cellChange"] }], cellCommit: [{ type: i0.Output, args: ["cellCommit"] }], rowCommit: [{ type: i0.Output, args: ["rowCommit"] }], changedRowsReset: [{ type: i0.Output, args: ["changedRowsReset"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], columnResize: [{ type: i0.Output, args: ["columnResize"] }], columnMove: [{ type: i0.Output, args: ["columnMove"] }], columnVisibility: [{ type: i0.Output, args: ["columnVisibility"] }], columnStateChange: [{ type: i0.Output, args: ["columnStateChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], rowMove: [{ type: i0.Output, args: ["rowMove"] }], groupToggle: [{ type: i0.Output, args: ["groupToggle"] }], treeExpand: [{ type: i0.Output, args: ["treeExpand"] }], detailExpand: [{ type: i0.Output, args: ["detailExpand"] }], responsiveChange: [{ type: i0.Output, args: ["responsiveChange"] }], copy: [{ type: i0.Output, args: ["copy"] }], paste: [{ type: i0.Output, args: ["paste"] }], undoRedoAction: [{ type: i0.Output, args: ["undoRedoAction"] }], exportComplete: [{ type: i0.Output, args: ["exportComplete"] }], printStart: [{ type: i0.Output, args: ["printStart"] }], printComplete: [{ type: i0.Output, args: ["printComplete"] }] } });
|
|
3493
|
+
}], ctorParameters: () => [], propDecorators: { customStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "customStyles", required: false }] }], sortable: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortable", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], gridConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridConfig", required: false }] }], angularConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "angularConfig", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], editing: [{ type: i0.Input, args: [{ isSignal: true, alias: "editing", required: false }] }], clipboard: [{ type: i0.Input, args: [{ isSignal: true, alias: "clipboard", required: false }] }], contextMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenu", required: false }] }], multiSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSort", required: false }] }], sorting: [{ type: i0.Input, args: [{ isSignal: true, alias: "sorting", required: false }] }], filtering: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtering", required: false }] }], reorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorder", required: false }] }], visibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibility", required: false }] }], pinnedColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinnedColumns", required: false }] }], groupingColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupingColumns", required: false }] }], columnVirtualization: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnVirtualization", required: false }] }], rowReorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowReorder", required: false }] }], groupingRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupingRows", required: false }] }], pinnedRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinnedRows", required: false }] }], tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], masterDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "masterDetail", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }], undoRedo: [{ type: i0.Input, args: [{ isSignal: true, alias: "undoRedo", required: false }] }], exportFeature: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportFeature", required: false }] }], print: [{ type: i0.Input, args: [{ isSignal: true, alias: "print", required: false }] }], pivot: [{ type: i0.Input, args: [{ isSignal: true, alias: "pivot", required: false }] }], serverSide: [{ type: i0.Input, args: [{ isSignal: true, alias: "serverSide", required: false }] }], cellClick: [{ type: i0.Output, args: ["cellClick"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], cellActivate: [{ type: i0.Output, args: ["cellActivate"] }], cellChange: [{ type: i0.Output, args: ["cellChange"] }], cellCommit: [{ type: i0.Output, args: ["cellCommit"] }], rowCommit: [{ type: i0.Output, args: ["rowCommit"] }], changedRowsReset: [{ type: i0.Output, args: ["changedRowsReset"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], columnResize: [{ type: i0.Output, args: ["columnResize"] }], columnMove: [{ type: i0.Output, args: ["columnMove"] }], columnVisibility: [{ type: i0.Output, args: ["columnVisibility"] }], columnStateChange: [{ type: i0.Output, args: ["columnStateChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], rowMove: [{ type: i0.Output, args: ["rowMove"] }], groupToggle: [{ type: i0.Output, args: ["groupToggle"] }], treeExpand: [{ type: i0.Output, args: ["treeExpand"] }], detailExpand: [{ type: i0.Output, args: ["detailExpand"] }], responsiveChange: [{ type: i0.Output, args: ["responsiveChange"] }], copy: [{ type: i0.Output, args: ["copy"] }], paste: [{ type: i0.Output, args: ["paste"] }], undoRedoAction: [{ type: i0.Output, args: ["undoRedoAction"] }], exportComplete: [{ type: i0.Output, args: ["exportComplete"] }], printStart: [{ type: i0.Output, args: ["printStart"] }], printComplete: [{ type: i0.Output, args: ["printComplete"] }] } });
|
|
3363
3494
|
|
|
3364
3495
|
/**
|
|
3365
3496
|
* @packageDocumentation
|