ngx-core-components 0.3.12 → 0.3.13
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/README.md +1070 -89
- package/fesm2022/ngx-core-components-grid.mjs +351 -122
- package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
- package/fesm2022/ngx-core-components-views.mjs +752 -86
- package/fesm2022/ngx-core-components-views.mjs.map +1 -1
- package/grid/data-grid/data-grid.component.d.ts +14 -1
- package/package.json +5 -5
- package/views/public-api.d.ts +1 -1
- package/views/scheduler/models.d.ts +16 -0
- package/views/scheduler/scheduler.component.d.ts +75 -7
package/README.md
CHANGED
|
@@ -329,112 +329,1100 @@ export class MyGridComponent {
|
|
|
329
329
|
}
|
|
330
330
|
```
|
|
331
331
|
|
|
332
|
-
## API
|
|
332
|
+
## Component API Reference & Guides
|
|
333
333
|
|
|
334
|
-
This
|
|
334
|
+
This section provides complete documentation, detailed API reference tables (Inputs, Outputs, and Public Methods), and "How to Use" guidelines for all components in the library. All component inputs and outputs are signal-based.
|
|
335
335
|
|
|
336
|
-
|
|
336
|
+
---
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
### Charts
|
|
339
|
+
|
|
340
|
+
#### How to Use Charts
|
|
341
|
+
```typescript
|
|
342
|
+
import { Component } from '@angular/core';
|
|
343
|
+
import { BarChartComponent, LineChartComponent, PieChartComponent, SparklineComponent, GanttChartComponent } from 'ngx-core-components/charts';
|
|
344
|
+
|
|
345
|
+
@Component({
|
|
346
|
+
standalone: true,
|
|
347
|
+
imports: [BarChartComponent, LineChartComponent, PieChartComponent, SparklineComponent, GanttChartComponent],
|
|
348
|
+
template: `
|
|
349
|
+
<!-- Bar Chart -->
|
|
350
|
+
<ngx-bar-chart [series]="barSeries" [categories]="categories" title="Monthly Sales" />
|
|
351
|
+
|
|
352
|
+
<!-- Line Chart -->
|
|
353
|
+
<ngx-line-chart [series]="lineSeries" [categories]="categories" [showArea]="true" />
|
|
339
354
|
|
|
355
|
+
<!-- Pie Chart -->
|
|
356
|
+
<ngx-pie-chart [data]="pieData" mode="donut" centerTitle="Visits" />
|
|
357
|
+
|
|
358
|
+
<!-- Sparkline -->
|
|
359
|
+
<ngx-sparkline [data]="[10, 15, 8, 22, 14, 25]" type="area" color="#2ecc71" />
|
|
360
|
+
`
|
|
361
|
+
})
|
|
362
|
+
export class ChartsExampleComponent {
|
|
363
|
+
categories = ['Q1', 'Q2', 'Q3', 'Q4'];
|
|
364
|
+
barSeries = [{ name: 'Online', data: [120, 180, 240, 300] }];
|
|
365
|
+
lineSeries = [{ name: 'Active Users', data: [450, 620, 810, 950] }];
|
|
366
|
+
pieData = [
|
|
367
|
+
{ label: 'Search', value: 55 },
|
|
368
|
+
{ label: 'Direct', value: 30 },
|
|
369
|
+
{ label: 'Social', value: 15 }
|
|
370
|
+
];
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
#### GanttChartComponent (`ngx-gantt-chart`)
|
|
375
|
+
##### Inputs
|
|
340
376
|
| Input | Type | Default | Description |
|
|
341
|
-
|
|
342
|
-
| `
|
|
343
|
-
| `
|
|
344
|
-
| `
|
|
345
|
-
| `
|
|
346
|
-
| `
|
|
347
|
-
| `
|
|
377
|
+
|---|---|---|---|
|
|
378
|
+
| `tasks` | `GanttTask[]` | **required** | Array of tasks to display |
|
|
379
|
+
| `dependencies` | `GanttDependency[]` | `[]` | Predecessor/successor dependencies |
|
|
380
|
+
| `config` | `Partial<GanttConfig>` | `{}` | Config settings (zoom level, column/row sizes) |
|
|
381
|
+
| `groups` | `GanttGroup[]` | `[]` | Group tasks by category or assignee |
|
|
382
|
+
| `baselineItems` | `GanttBaselineItem[]` | `[]` | Baseline bars for progress comparisons |
|
|
383
|
+
| `tooltipTemplate` | `TemplateRef<...>` | `null` | Custom tooltip template reference |
|
|
384
|
+
| `enableDragToZoom` | `boolean` | `false` | Enable drag-to-zoom timeline selection |
|
|
385
|
+
|
|
386
|
+
##### Outputs
|
|
387
|
+
| Output | Type | Description |
|
|
388
|
+
|---|---|---|
|
|
389
|
+
| `taskChange` | `GanttTaskChangeEvent` | Emitted when task dates or progress are changed via dragging/resizing |
|
|
390
|
+
| `taskClick` | `GanttTaskClickEvent` | Emitted when a task bar is clicked |
|
|
391
|
+
| `taskDblClick` | `GanttTaskClickEvent` | Emitted when a task bar is double clicked |
|
|
392
|
+
| `dependencyClick` | `GanttDependencyClickEvent` | Emitted when a dependency connector line is clicked |
|
|
393
|
+
| `zoomChange` | `ZoomLevel` | Emitted when the active zoom level shifts |
|
|
394
|
+
| `zoomRangeChange` | `{ start: Date; end: Date }` | Emitted when a drag-zoom range is selected |
|
|
395
|
+
| `selectedChange` | `GanttSelectedEvent` | Emitted when selected tasks change |
|
|
396
|
+
| `expandChange` | `GanttExpandChangeEvent` | Emitted when a task or group node collapses/expands |
|
|
397
|
+
| `loadOnScroll` | `GanttLoadOnScrollEvent` | Emitted when horizontal scroll reaches close to ends (lazy loading) |
|
|
398
|
+
|
|
399
|
+
##### Public Methods
|
|
400
|
+
| Method | Signature | Description |
|
|
401
|
+
|---|---|---|
|
|
402
|
+
| `scrollToToday` | `(): void` | Scroll view to current date |
|
|
403
|
+
| `scrollToDate` | `(date: Date): void` | Scroll view to a specific date |
|
|
404
|
+
| `scrollToTask` | `(taskId: string): void` | Scroll vertically to focus a specific task row |
|
|
405
|
+
| `expandAll` | `(): void` | Expand all collapsed rows |
|
|
406
|
+
| `collapseAll` | `(): void` | Collapse all expandable rows |
|
|
407
|
+
| `toggleCriticalPath` | `(): void` | Toggle visibility of critical path tasks |
|
|
408
|
+
| `toggleAreaZoomMode` | `(): void` | Toggle crosshair area-zoom selector |
|
|
409
|
+
| `resetZoom` | `(): void` | Reset zoom to standard scale |
|
|
410
|
+
| `exportAsImage` | `(filename?: string): Promise<void>` | Export Gantt view to PNG download |
|
|
411
|
+
|
|
412
|
+
##### GanttConfig Interface
|
|
413
|
+
```typescript
|
|
414
|
+
interface GanttConfig {
|
|
415
|
+
zoomLevel: 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
416
|
+
rowHeight: number;
|
|
417
|
+
columnWidth: number;
|
|
418
|
+
sidebarWidth: number;
|
|
419
|
+
headerHeight: number;
|
|
420
|
+
showTodayMarker: boolean;
|
|
421
|
+
showGrid: boolean;
|
|
422
|
+
collapsible: boolean;
|
|
423
|
+
snapTo: 'hour' | 'day' | 'week' | 'month';
|
|
424
|
+
locale: string;
|
|
425
|
+
}
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
##### GanttTask Interface
|
|
429
|
+
```typescript
|
|
430
|
+
interface GanttTask {
|
|
431
|
+
id: string;
|
|
432
|
+
name: string;
|
|
433
|
+
start: Date;
|
|
434
|
+
end: Date;
|
|
435
|
+
progress: number;
|
|
436
|
+
parentId: string | null;
|
|
437
|
+
collapsed?: boolean;
|
|
438
|
+
isMilestone?: boolean;
|
|
439
|
+
color?: string;
|
|
440
|
+
draggable?: boolean;
|
|
441
|
+
cssClass?: string;
|
|
442
|
+
meta?: Record<string, unknown>;
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
#### BarChartComponent (`ngx-bar-chart`)
|
|
447
|
+
##### Inputs
|
|
448
|
+
| Input | Type | Default | Description |
|
|
449
|
+
|---|---|---|---|
|
|
450
|
+
| `series` | `ChartSeries[]` | `[]` | Array of series data objects |
|
|
451
|
+
| `categories` | `string[]` | `[]` | X-axis labels |
|
|
452
|
+
| `height` | `number` | `260` | SVG height in pixels |
|
|
453
|
+
| `showGrid` | `boolean` | `true` | Show horizontal grid lines |
|
|
454
|
+
| `showLabels` | `boolean` | `false` | Show value label above bars |
|
|
455
|
+
| `showLegend` | `boolean` | `true` | Show color legend indicators |
|
|
456
|
+
| `colors` | `string[]` | _theme_ | Custom color palette overrides |
|
|
457
|
+
|
|
458
|
+
#### LineChartComponent (`ngx-line-chart`)
|
|
459
|
+
##### Inputs
|
|
460
|
+
| Input | Type | Default | Description |
|
|
461
|
+
|---|---|---|---|
|
|
462
|
+
| `series` | `ChartSeries[]` | `[]` | Array of line series data |
|
|
463
|
+
| `categories` | `string[]` | `[]` | X-axis labels |
|
|
464
|
+
| `height` | `number` | `260` | SVG height |
|
|
465
|
+
| `showGrid` | `boolean` | `true` | Show horizontal grid lines |
|
|
466
|
+
| `showArea` | `boolean` | `false` | Show area fill gradients below lines |
|
|
467
|
+
| `showMarkers` | `boolean` | `true` | Show circles on data points |
|
|
468
|
+
| `showLegend` | `boolean` | `true` | Show color legends |
|
|
469
|
+
| `colors` | `string[]` | _theme_ | Custom color palette |
|
|
470
|
+
|
|
471
|
+
#### PieChartComponent (`ngx-pie-chart`)
|
|
472
|
+
##### Inputs
|
|
473
|
+
| Input | Type | Default | Description |
|
|
474
|
+
|---|---|---|---|
|
|
475
|
+
| `data` | `ChartDataPoint[]` | `[]` | Array of slice data objects |
|
|
476
|
+
| `mode` | `'pie' \| 'donut'` | `'pie'` | Chart layout variant |
|
|
477
|
+
| `donutHoleSize` | `number` | `0.55` | Inner circle size ratio for donut charts |
|
|
478
|
+
| `height` | `number` | `240` | SVG size (width & height) |
|
|
479
|
+
| `showLegend` | `boolean` | `true` | Show Legend beside chart |
|
|
480
|
+
| `showLabels` | `boolean` | `true` | Show percentage label on slices |
|
|
481
|
+
| `centerTitle` | `string` | `'Total'` | Donut center placeholder text |
|
|
482
|
+
| `colors` | `string[]` | _theme_ | Color palette overrides |
|
|
483
|
+
|
|
484
|
+
#### SparklineComponent (`ngx-sparkline`)
|
|
485
|
+
##### Inputs
|
|
486
|
+
| Input | Type | Default | Description |
|
|
487
|
+
|---|---|---|---|
|
|
488
|
+
| `data` | `number[]` | `[]` | Numeric trend values |
|
|
489
|
+
| `type` | `'line' \| 'bar' \| 'area'` | `'line'` | Display style |
|
|
490
|
+
| `color` | `string` | `'#4a90d9'` | Stroke or fill color |
|
|
491
|
+
| `width` | `number` | `120` | SVG width |
|
|
492
|
+
| `height` | `number` | `36` | SVG height |
|
|
348
493
|
|
|
349
|
-
|
|
494
|
+
---
|
|
350
495
|
|
|
496
|
+
### Inputs
|
|
497
|
+
|
|
498
|
+
#### How to Use Inputs (with Reactive Forms)
|
|
499
|
+
```typescript
|
|
500
|
+
import { Component } from '@angular/core';
|
|
501
|
+
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
|
502
|
+
import { TextBoxComponent, DropdownComponent, DatePickerComponent, NumericTextBoxComponent } from 'ngx-core-components/inputs';
|
|
503
|
+
|
|
504
|
+
@Component({
|
|
505
|
+
standalone: true,
|
|
506
|
+
imports: [ReactiveFormsModule, TextBoxComponent, DropdownComponent, DatePickerComponent, NumericTextBoxComponent],
|
|
507
|
+
template: `
|
|
508
|
+
<form [formGroup]="form">
|
|
509
|
+
<ngx-textbox formControlName="username" label="Username" placeholder="Enter username" [clearable]="true" />
|
|
510
|
+
<ngx-dropdown formControlName="role" label="Role" [options]="roles" />
|
|
511
|
+
<ngx-date-picker formControlName="birthDate" label="Birth Date" />
|
|
512
|
+
<ngx-numeric-textbox formControlName="age" label="Age" [min]="18" [max]="99" />
|
|
513
|
+
</form>
|
|
514
|
+
`
|
|
515
|
+
})
|
|
516
|
+
export class FormComponent {
|
|
517
|
+
roles = [{ label: 'Admin', value: 'admin' }, { label: 'User', value: 'user' }];
|
|
518
|
+
form = new FormGroup({
|
|
519
|
+
username: new FormControl(''),
|
|
520
|
+
role: new FormControl('user'),
|
|
521
|
+
birthDate: new FormControl<Date | null>(null),
|
|
522
|
+
age: new FormControl(18)
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
#### TextBoxComponent (`ngx-textbox`)
|
|
528
|
+
##### Inputs
|
|
529
|
+
| Input | Type | Default | Description |
|
|
530
|
+
|---|---|---|---|
|
|
531
|
+
| `value` | `string` | `''` | Current string value |
|
|
532
|
+
| `label` | `string` | `''` | Floating/static label |
|
|
533
|
+
| `placeholder` | `string` | `''` | Placeholder text |
|
|
534
|
+
| `type` | `string` | `'text'` | HTML input type attribute |
|
|
535
|
+
| `disabled` | `boolean` | `false` | Disabled state |
|
|
536
|
+
| `readonly` | `boolean` | `false` | Read-only mode |
|
|
537
|
+
| `error` | `string` | `''` | Error message displayed below input |
|
|
538
|
+
| `hint` | `string` | `''` | Hint text displayed below input |
|
|
539
|
+
| `maxlength` | `number` | `0` | Max characters allowed |
|
|
540
|
+
| `clearable` | `boolean` | `false` | Show clear button |
|
|
541
|
+
| `showCharCount` | `boolean` | `false` | Display character counter |
|
|
542
|
+
| `prefixIcon` | `string` | `''` | Text/icon shown before text |
|
|
543
|
+
| `suffixIcon` | `string` | `''` | Text/icon shown after text |
|
|
544
|
+
| `passwordToggle` | `boolean` | `false` | Show password visibility eye icon |
|
|
545
|
+
|
|
546
|
+
##### Outputs
|
|
547
|
+
| Output | Type | Description |
|
|
548
|
+
|---|---|---|
|
|
549
|
+
| `valueChange` | `string` | Emitted when value is changed |
|
|
550
|
+
| `focusChange` | `boolean` | Emitted on focus (`true`) and blur (`false`) |
|
|
551
|
+
|
|
552
|
+
#### CheckboxComponent (`ngx-checkbox`)
|
|
553
|
+
##### Inputs
|
|
554
|
+
| Input | Type | Default | Description |
|
|
555
|
+
|---|---|---|---|
|
|
556
|
+
| `label` | `string` | `''` | Label next to checkbox |
|
|
557
|
+
| `checked` | `boolean` | `false` | Checked state |
|
|
558
|
+
| `disabled` | `boolean` | `false` | Disabled state |
|
|
559
|
+
| `indeterminate` | `boolean` | `false` | Indeterminate line state |
|
|
560
|
+
|
|
561
|
+
##### Outputs
|
|
562
|
+
| Output | Type | Description |
|
|
563
|
+
|---|---|---|
|
|
564
|
+
| `checkedChange` | `boolean` | Checked state changed |
|
|
565
|
+
|
|
566
|
+
#### RadioGroupComponent (`ngx-radio-group`)
|
|
567
|
+
##### Inputs
|
|
568
|
+
| Input | Type | Default | Description |
|
|
569
|
+
|---|---|---|---|
|
|
570
|
+
| `options` | `RadioOption[]` | `[]` | Array of radio options |
|
|
571
|
+
| `label` | `string` | `''` | Radio group header label |
|
|
572
|
+
| `value` | `unknown` | `null` | Selected option value |
|
|
573
|
+
| `disabled` | `boolean` | `false` | Disable all controls |
|
|
574
|
+
| `inline` | `boolean` | `false` | Render horizontally |
|
|
575
|
+
|
|
576
|
+
##### Outputs
|
|
351
577
|
| Output | Type | Description |
|
|
352
|
-
|
|
353
|
-
| `
|
|
354
|
-
| `selectionChange` | `ListViewSelectionEvent<T>` | Fired when selected items change. |
|
|
355
|
-
| `pageChange` | `ListViewPageChangeEvent` | Fired when the built-in pager changes pages. |
|
|
578
|
+
|---|---|---|
|
|
579
|
+
| `valueChange` | `unknown` | Value changed |
|
|
356
580
|
|
|
357
|
-
####
|
|
581
|
+
#### DropdownComponent (`ngx-dropdown`)
|
|
582
|
+
##### Inputs
|
|
583
|
+
| Input | Type | Default | Description |
|
|
584
|
+
|---|---|---|---|
|
|
585
|
+
| `options` | `DropdownOption[]` | `[]` | Selectable options list |
|
|
586
|
+
| `value` | `unknown` | `null` | Selected item value |
|
|
587
|
+
| `label` | `string` | `''` | Header label |
|
|
588
|
+
| `placeholder` | `string` | `'Select...'` | Empty selection placeholder |
|
|
589
|
+
| `disabled` | `boolean` | `false` | Disabled state |
|
|
590
|
+
| `filterable` | `boolean` | `false` | Add filter search box |
|
|
591
|
+
| `required` | `boolean` | `false` | Show required red asterisk |
|
|
592
|
+
| `error` | `string` | `''` | Error message |
|
|
593
|
+
| `hint` | `string` | `''` | Hint text |
|
|
594
|
+
|
|
595
|
+
##### Outputs
|
|
596
|
+
| Output | Type | Description |
|
|
597
|
+
|---|---|---|
|
|
598
|
+
| `valueChange` | `unknown` | Emitted when selection changes |
|
|
358
599
|
|
|
600
|
+
#### MultiSelectComponent (`ngx-multi-select`)
|
|
601
|
+
##### Inputs
|
|
359
602
|
| Input | Type | Default | Description |
|
|
360
|
-
|
|
361
|
-
| `
|
|
362
|
-
| `
|
|
363
|
-
| `
|
|
364
|
-
| `
|
|
603
|
+
|---|---|---|---|
|
|
604
|
+
| `options` | `DropdownOption[]` | `[]` | Selectable options |
|
|
605
|
+
| `values` | `unknown[]` | `[]` | Array of selected values |
|
|
606
|
+
| `label` | `string` | `''` | Header label |
|
|
607
|
+
| `placeholder` | `string` | `'Select...'` | Input placeholder |
|
|
608
|
+
| `disabled` | `boolean` | `false` | Disable component |
|
|
609
|
+
| `filterable` | `boolean` | `false` | Show input filter search |
|
|
610
|
+
| `maxTags` | `number` | `Infinity` | Max tag chips visible before overflow indicator |
|
|
611
|
+
|
|
612
|
+
##### Outputs
|
|
613
|
+
| Output | Type | Description |
|
|
614
|
+
|---|---|---|
|
|
615
|
+
| `valuesChange` | `unknown[]` | Selected items changed |
|
|
365
616
|
|
|
366
|
-
####
|
|
617
|
+
#### AutocompleteComponent (`ngx-autocomplete`)
|
|
618
|
+
##### Inputs
|
|
619
|
+
| Input | Type | Default | Description |
|
|
620
|
+
|---|---|---|---|
|
|
621
|
+
| `options` | `DropdownOption[]` | `[]` | Search recommendation list |
|
|
622
|
+
| `label` | `string` | `''` | Header label |
|
|
623
|
+
| `placeholder` | `string` | `'Type to search...'` | Input placeholder |
|
|
624
|
+
| `disabled` | `boolean` | `false` | Disable autocomplete |
|
|
625
|
+
| `error` | `string` | `''` | Error text |
|
|
626
|
+
| `minLength` | `number` | `1` | Min characters typed before suggesting options |
|
|
627
|
+
|
|
628
|
+
##### Outputs
|
|
629
|
+
| Output | Type | Description |
|
|
630
|
+
|---|---|---|
|
|
631
|
+
| `valueChange` | `unknown` | Suggestion selected or cleared |
|
|
367
632
|
|
|
633
|
+
#### DatePickerComponent (`ngx-date-picker`)
|
|
634
|
+
##### Inputs
|
|
368
635
|
| Input | Type | Default | Description |
|
|
369
|
-
|
|
370
|
-
| `value` | `
|
|
371
|
-
| `
|
|
636
|
+
|---|---|---|---|
|
|
637
|
+
| `value` | `Date \| null` | `null` | Selected Date |
|
|
638
|
+
| `label` | `string` | `''` | Input label |
|
|
639
|
+
| `placeholder` | `string` | `'Select date...'` | Input placeholder |
|
|
640
|
+
| `disabled` | `boolean` | `false` | Disable datepicker |
|
|
641
|
+
| `min` | `Date \| null` | `null` | Earliest selection limit |
|
|
642
|
+
| `max` | `Date \| null` | `null` | Latest selection limit |
|
|
643
|
+
| `format` | `string` | `'MM/dd/yyyy'` | Format layout |
|
|
644
|
+
|
|
645
|
+
##### Outputs
|
|
646
|
+
| Output | Type | Description |
|
|
647
|
+
|---|---|---|
|
|
648
|
+
| `valueChange` | `Date \| null` | Date selection changed |
|
|
372
649
|
|
|
373
|
-
####
|
|
650
|
+
#### DateRangePickerComponent (`ngx-date-range-picker`)
|
|
651
|
+
##### Inputs
|
|
652
|
+
| Input | Type | Default | Description |
|
|
653
|
+
|---|---|---|---|
|
|
654
|
+
| `label` | `string` | `''` | Input label |
|
|
655
|
+
| `start` | `Date \| string \| null` | `null` | Selection start date |
|
|
656
|
+
| `end` | `Date \| string \| null` | `null` | Selection end date |
|
|
657
|
+
| `min` | `Date \| string \| null` | `null` | Min limits |
|
|
658
|
+
| `max` | `Date \| string \| null` | `null` | Max limits |
|
|
659
|
+
| `disabledDates` | `(Date \| string)[]` | `[]` | Disabled date values |
|
|
660
|
+
| `presets` | `DateRangePreset[]` | _defaults_ | Fast presets (Today, Last 7 days, This Month) |
|
|
661
|
+
| `weekStartsOn` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6` | `0` | First day of week (0=Sunday) |
|
|
662
|
+
| `disabled` | `boolean` | `false` | Disabled state |
|
|
663
|
+
|
|
664
|
+
##### Outputs
|
|
665
|
+
| Output | Type | Description |
|
|
666
|
+
|---|---|---|
|
|
667
|
+
| `rangeChange` | `{ start: string; end: string }` | Date range selection completed (YYYY-MM-DD format) |
|
|
668
|
+
| `openChange` | `boolean` | Emitted when calendar overlay is opened/closed |
|
|
374
669
|
|
|
670
|
+
#### SliderComponent (`ngx-slider`)
|
|
671
|
+
##### Inputs
|
|
375
672
|
| Input | Type | Default | Description |
|
|
376
|
-
|
|
377
|
-
| `
|
|
378
|
-
| `
|
|
379
|
-
| `
|
|
380
|
-
| `
|
|
673
|
+
|---|---|---|---|
|
|
674
|
+
| `label` | `string` | `''` | Slider label |
|
|
675
|
+
| `min` | `number` | `0` | Min slider limit |
|
|
676
|
+
| `max` | `number` | `100` | Max slider limit |
|
|
677
|
+
| `step` | `number` | `1` | Drag interval size |
|
|
678
|
+
| `range` | `boolean` | `false` | Enable double-handle range mode |
|
|
679
|
+
| `disabled` | `boolean` | `false` | Disable component |
|
|
680
|
+
| `showValue` | `boolean` | `true` | Display active values |
|
|
681
|
+
| `showTicks` | `boolean` | `false` | Show min/max value indicators |
|
|
682
|
+
| `initialValue` | `number` | `0` | Initial single value |
|
|
683
|
+
| `initialLow` | `number` | `20` | Initial low value in range mode |
|
|
684
|
+
| `initialHigh` | `number` | `80` | Initial high value in range mode |
|
|
685
|
+
|
|
686
|
+
##### Outputs
|
|
687
|
+
| Output | Type | Description |
|
|
688
|
+
|---|---|---|
|
|
689
|
+
| `valueChange` | `number` | Value changed (single handle) |
|
|
690
|
+
| `rangeChange` | `[number, number]` | Emitted when range bounds change |
|
|
381
691
|
|
|
382
|
-
####
|
|
692
|
+
#### SwitchComponent (`ngx-switch`)
|
|
693
|
+
##### Inputs
|
|
694
|
+
| Input | Type | Default | Description |
|
|
695
|
+
|---|---|---|---|
|
|
696
|
+
| `onLabel` | `string` | `'On'` | Label when active |
|
|
697
|
+
| `offLabel` | `string` | `'Off'` | Label when inactive |
|
|
698
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Toggle size |
|
|
699
|
+
| `disabled` | `boolean` | `false` | Disabled state |
|
|
383
700
|
|
|
701
|
+
##### Outputs
|
|
384
702
|
| Output | Type | Description |
|
|
385
|
-
|
|
386
|
-
| `
|
|
703
|
+
|---|---|---|
|
|
704
|
+
| `checkedChange` | `boolean` | State toggled |
|
|
387
705
|
|
|
388
|
-
|
|
706
|
+
#### RatingComponent (`ngx-rating`)
|
|
707
|
+
##### Inputs
|
|
708
|
+
| Input | Type | Default | Description |
|
|
709
|
+
|---|---|---|---|
|
|
710
|
+
| `max` | `number` | `5` | Total stars to display |
|
|
711
|
+
| `label` | `string` | `''` | Header label |
|
|
712
|
+
| `readonly` | `boolean` | `false` | Disabled interactive selection |
|
|
713
|
+
| `showValue` | `boolean` | `false` | Show text scale (e.g. "4/5") |
|
|
389
714
|
|
|
715
|
+
##### Outputs
|
|
716
|
+
| Output | Type | Description |
|
|
717
|
+
|---|---|---|
|
|
718
|
+
| `ratingChange` | `number` | Star selection changed |
|
|
719
|
+
|
|
720
|
+
#### NumericTextBoxComponent (`ngx-numeric-textbox`)
|
|
721
|
+
##### Inputs
|
|
390
722
|
| Input | Type | Default | Description |
|
|
391
|
-
|
|
392
|
-
| `
|
|
393
|
-
| `
|
|
394
|
-
| `
|
|
723
|
+
|---|---|---|---|
|
|
724
|
+
| `label` | `string` | `''` | Label text |
|
|
725
|
+
| `value` | `number` | `0` | Current value |
|
|
726
|
+
| `min` | `number` | `-Infinity` | Lower bound |
|
|
727
|
+
| `max` | `number` | `Infinity` | Upper bound |
|
|
728
|
+
| `step` | `number` | `1` | Increment value on step up/down |
|
|
729
|
+
| `disabled` | `boolean` | `false` | Disabled state |
|
|
730
|
+
| `placeholder` | `string` | `''` | Input placeholder |
|
|
731
|
+
| `prefix` | `string` | `''` | Prepend character (e.g., "$") |
|
|
732
|
+
| `suffix` | `string` | `''` | Append character (e.g., "kg") |
|
|
733
|
+
|
|
734
|
+
##### Outputs
|
|
735
|
+
| Output | Type | Description |
|
|
736
|
+
|---|---|---|
|
|
737
|
+
| `valueChange` | `number` | Value changed |
|
|
395
738
|
|
|
396
|
-
|
|
739
|
+
##### Public Methods
|
|
740
|
+
| Method | Signature | Description |
|
|
741
|
+
|---|---|---|
|
|
742
|
+
| `spin` | `(dir: 1 \| -1): void` | Step value up or down |
|
|
743
|
+
| `setValue` | `(v: number): void` | Set clamped numeric value |
|
|
397
744
|
|
|
745
|
+
#### TextareaComponent (`ngx-textarea`)
|
|
746
|
+
##### Inputs
|
|
747
|
+
| Input | Type | Default | Description |
|
|
748
|
+
|---|---|---|---|
|
|
749
|
+
| `label` | `string` | `''` | Label text |
|
|
750
|
+
| `placeholder` | `string` | `''` | Textarea placeholder |
|
|
751
|
+
| `rows` | `number` | `4` | Rows high |
|
|
752
|
+
| `maxlength` | `number` | `0` | Max character length limits |
|
|
753
|
+
| `disabled` | `boolean` | `false` | Disabled state |
|
|
754
|
+
| `autoResize` | `boolean` | `false` | Automatically adjust size with lines |
|
|
755
|
+
| `hint` | `string` | `''` | Instruction note below input |
|
|
756
|
+
| `error` | `string` | `''` | Error alert below input |
|
|
757
|
+
|
|
758
|
+
##### Outputs
|
|
759
|
+
| Output | Type | Description |
|
|
760
|
+
|---|---|---|
|
|
761
|
+
| `valueChange` | `string` | Character value changed |
|
|
762
|
+
|
|
763
|
+
#### ColorPickerComponent (`ngx-color-picker`)
|
|
764
|
+
##### Inputs
|
|
765
|
+
| Input | Type | Default | Description |
|
|
766
|
+
|---|---|---|---|
|
|
767
|
+
| `label` | `string` | `''` | Input label |
|
|
768
|
+
|
|
769
|
+
##### Outputs
|
|
770
|
+
| Output | Type | Description |
|
|
771
|
+
|---|---|---|
|
|
772
|
+
| `colorChange` | `string` | Emitted with hex color code when picked |
|
|
773
|
+
|
|
774
|
+
#### TimePickerComponent (`ngx-time-picker`)
|
|
775
|
+
##### Inputs
|
|
776
|
+
| Input | Type | Default | Description |
|
|
777
|
+
|---|---|---|---|
|
|
778
|
+
| `label` | `string` | `''` | Label text |
|
|
779
|
+
| `use12h` | `boolean` | `false` | Enable 12h clock mode |
|
|
780
|
+
| `value` | `string` | `'09:00'` | Selected time (HH:mm format) |
|
|
781
|
+
|
|
782
|
+
##### Outputs
|
|
398
783
|
| Output | Type | Description |
|
|
399
|
-
|
|
400
|
-
| `
|
|
401
|
-
| `taskClick` | `GanttTaskClickEvent` | Task bar clicked |
|
|
402
|
-
| `taskDblClick` | `GanttTaskClickEvent` | Task bar double-clicked |
|
|
403
|
-
| `dependencyClick` | `GanttDependencyClickEvent` | Dependency arrow clicked |
|
|
404
|
-
| `scroll` | `GanttScrollEvent` | Chart scrolled |
|
|
405
|
-
| `zoomChange` | `ZoomLevel` | Zoom level changed |
|
|
784
|
+
|---|---|---|
|
|
785
|
+
| `timeChange` | `string` | Emitted when time changes (HH:mm format) |
|
|
406
786
|
|
|
407
|
-
|
|
787
|
+
---
|
|
788
|
+
|
|
789
|
+
### Data Grid & Views
|
|
790
|
+
|
|
791
|
+
#### How to Use Grid & Views
|
|
792
|
+
```typescript
|
|
793
|
+
import { Component } from '@angular/core';
|
|
794
|
+
import { DataGridComponent, GridColumnDef } from 'ngx-core-components/grid';
|
|
795
|
+
import { TreeViewComponent, ListViewComponent, TreeNode } from 'ngx-core-components/views';
|
|
796
|
+
|
|
797
|
+
@Component({
|
|
798
|
+
standalone: true,
|
|
799
|
+
imports: [DataGridComponent, TreeViewComponent, ListViewComponent],
|
|
800
|
+
template: `
|
|
801
|
+
<!-- Data Grid -->
|
|
802
|
+
<ngx-data-grid [data]="gridData" [columns]="columns" [pageSize]="5" />
|
|
408
803
|
|
|
804
|
+
<!-- Tree View -->
|
|
805
|
+
<ngx-tree-view [nodes]="treeNodes" [checkable]="true" />
|
|
806
|
+
`
|
|
807
|
+
})
|
|
808
|
+
export class GridViewsExampleComponent {
|
|
809
|
+
columns: GridColumnDef<any>[] = [
|
|
810
|
+
{ field: 'id', title: 'ID', width: 80 },
|
|
811
|
+
{ field: 'name', title: 'Name', sortable: true },
|
|
812
|
+
{ field: 'role', title: 'Role' }
|
|
813
|
+
];
|
|
814
|
+
gridData = [
|
|
815
|
+
{ id: 1, name: 'Alice Smith', role: 'Developer' },
|
|
816
|
+
{ id: 2, name: 'Bob Jones', role: 'Designer' }
|
|
817
|
+
];
|
|
818
|
+
|
|
819
|
+
treeNodes: TreeNode[] = [
|
|
820
|
+
{
|
|
821
|
+
id: 'root',
|
|
822
|
+
label: 'My Project',
|
|
823
|
+
children: [
|
|
824
|
+
{ id: 'src', label: 'src' },
|
|
825
|
+
{ id: 'tests', label: 'tests' }
|
|
826
|
+
]
|
|
827
|
+
}
|
|
828
|
+
];
|
|
829
|
+
}
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
#### DataGridComponent (`ngx-data-grid`)
|
|
833
|
+
##### Inputs
|
|
834
|
+
| Input | Type | Default | Description |
|
|
835
|
+
|---|---|---|---|
|
|
836
|
+
| `data` | `T[]` | `[]` | Table row data |
|
|
837
|
+
| `columns` | `GridColumnDef<T>[]` | `[]` | Columns configuration |
|
|
838
|
+
| `stateKey` | `string` | `''` | LocalStorage key to save grid column preferences |
|
|
839
|
+
| `reorderable` | `boolean` | `false` | Enable column drag reordering |
|
|
840
|
+
| `rowReorderable`| `boolean` | `false` | Enable row drag reordering |
|
|
841
|
+
| `multiSort` | `boolean` | `false` | Support multi-column sorting (Ctrl+Click) |
|
|
842
|
+
| `showGlobalSearch` | `boolean` | `false` | Show global search input |
|
|
843
|
+
| `pageSize` | `number` | `10` | Rows per page |
|
|
844
|
+
| `page` | `number` | `1` | Active page index |
|
|
845
|
+
| `total` | `number` | `0` | Total records (server paging) |
|
|
846
|
+
| `selectable` | `boolean` | `false` | Render checkbox column for selections |
|
|
847
|
+
| `striped` | `boolean` | `true` | Alternating row backgrounds |
|
|
848
|
+
| `loading` | `boolean` | `false` | Show loading blur spinner |
|
|
849
|
+
| `editable` | `boolean` | `false` | Enable double-click inline editor |
|
|
850
|
+
| `sortMode` | `'client' \| 'server'` | `'client'` | Sorting location |
|
|
851
|
+
| `filterMode` | `'client' \| 'server'` | `'client'` | Filtering location |
|
|
852
|
+
| `groupMode` | `'client' \| 'server'` | `'client'` | Grouping location |
|
|
853
|
+
| `pagingMode` | `'client' \| 'server'` | `'client'` | Pagination calculations |
|
|
854
|
+
| `groupBy` | `GridGroupState \| null` | `null` | Column to group by |
|
|
855
|
+
| `groupedData` | `GridGroupResult<T>[]` | `[]` | Grouped items (server mode) |
|
|
856
|
+
| `showColumnChooser` | `boolean` | `false` | Show column hiding menu |
|
|
857
|
+
| `cellSelection` | `boolean` | `false` | Enable grid cell click selection ranges |
|
|
858
|
+
| `enableContextMenu` | `boolean` | `false` | Right-click context menus |
|
|
859
|
+
| `keyboardNavigation` | `boolean` | `false` | Arrow key cell navigation |
|
|
860
|
+
| `groupAggregations` | `boolean` | `false` | Calculate aggregate footers on groups |
|
|
861
|
+
|
|
862
|
+
##### Outputs
|
|
863
|
+
| Output | Type | Description |
|
|
864
|
+
|---|---|---|
|
|
865
|
+
| `columnReorder` | `{ columns: GridColumnDef<T>[] }` | Emitted when column positions change |
|
|
866
|
+
| `rowReorder` | `{ previousIndex: number; currentIndex: number; data: T[] }` | Emitted when rows are dragged and dropped |
|
|
867
|
+
| `rowClick` | `GridRowClickEvent<T>` | Emitted when a row is clicked |
|
|
868
|
+
| `selectionChange` | `T[]` | Emitted with list of selected row items |
|
|
869
|
+
| `sortChange` | `GridSortChangeEvent` | Emitted on sort changes |
|
|
870
|
+
| `filterChange` | `GridFilterChangeEvent` | Emitted on filter changes |
|
|
871
|
+
| `groupChange` | `GridGroupChangeEvent` | Emitted on grouping changes |
|
|
872
|
+
| `pageChange` | `GridPageChangeEvent` | Emitted on page navigations |
|
|
873
|
+
| `rowUpdate` | `GridRowUpdateEvent<T>` | Emitted when inline row changes are saved |
|
|
874
|
+
| `cellSelectionChange`| `{ start, end }` | Emitted when range selection changes |
|
|
875
|
+
|
|
876
|
+
##### Public Methods
|
|
877
|
+
| Method | Signature | Description |
|
|
878
|
+
|---|---|---|
|
|
879
|
+
| `goPage` | `(page: number): void` | Navigate to specific page |
|
|
880
|
+
| `exportToJson` | `(): void` | Trigger JSON data export download |
|
|
881
|
+
| `exportToCsv` | `(): void` | Trigger CSV format export download |
|
|
882
|
+
| `beginEdit` | `(row: T, index: number): void` | Open inline row editor |
|
|
883
|
+
| `saveEdit` | `(row: T, index: number): void` | Commit inline row editing changes |
|
|
884
|
+
| `cancelEdit` | `(): void` | Discard inline editing draft changes |
|
|
885
|
+
|
|
886
|
+
#### TreeViewComponent (`ngx-tree-view`)
|
|
887
|
+
##### Inputs
|
|
888
|
+
| Input | Type | Default | Description |
|
|
889
|
+
|---|---|---|---|
|
|
890
|
+
| `nodes` | `TreeNode[]` | `[]` | Hierarchical nodes list |
|
|
891
|
+
| `selectable` | `boolean` | `true` | Click selection active |
|
|
892
|
+
| `checkable` | `boolean` | `false` | Show checkbox selectors next to titles |
|
|
893
|
+
| `selectedId` | `string \| null` | `null` | Highlighted node ID |
|
|
894
|
+
| `expandedIds` | `string[]` | `[]` | Initially expanded node IDs |
|
|
895
|
+
|
|
896
|
+
##### Outputs
|
|
897
|
+
| Output | Type | Description |
|
|
898
|
+
|---|---|---|
|
|
899
|
+
| `nodeSelect` | `TreeNodeEvent` | Emitted on node click |
|
|
900
|
+
| `nodeExpand` | `TreeNodeEvent` | Emitted on node expansion |
|
|
901
|
+
| `nodeCollapse` | `TreeNodeEvent` | Emitted on node collapse |
|
|
902
|
+
| `checkChange` | `{ node, checked }` | Emitted when check state changes |
|
|
903
|
+
|
|
904
|
+
##### Public Methods
|
|
905
|
+
| Method | Signature | Description |
|
|
906
|
+
|---|---|---|
|
|
907
|
+
| `expandAll` | `(): void` | Expand all expandable tree branches |
|
|
908
|
+
| `collapseAll` | `(): void` | Collapse all open tree branches |
|
|
909
|
+
|
|
910
|
+
#### ListViewComponent (`ngx-list-view`)
|
|
911
|
+
##### Inputs
|
|
912
|
+
| Input | Type | Default | Description |
|
|
913
|
+
|---|---|---|---|
|
|
914
|
+
| `items` | `T[]` | `[]` | Items array |
|
|
915
|
+
| `selectable` | `boolean` | `true` | Row selection active |
|
|
916
|
+
| `multiselect` | `boolean` | `false` | Support multi-item selections |
|
|
917
|
+
| `loading` | `boolean` | `false` | Show loading overlay |
|
|
918
|
+
| `labelField` | `string` | `'label'` | Object key property for item labels |
|
|
919
|
+
| `pageSize` | `number` | `0` | Enable pagination when > 0 |
|
|
920
|
+
|
|
921
|
+
##### Outputs
|
|
922
|
+
| Output | Type | Description |
|
|
923
|
+
|---|---|---|
|
|
924
|
+
| `itemClick` | `ListViewItemClickEvent<T>` | Emitted when item clicked |
|
|
925
|
+
| `selectionChange` | `ListViewSelectionEvent<T>` | Emitted on selection toggles |
|
|
926
|
+
| `pageChange` | `ListViewPageChangeEvent` | Emitted on page navigations |
|
|
927
|
+
|
|
928
|
+
---
|
|
929
|
+
|
|
930
|
+
### Dialog and Overlay
|
|
931
|
+
|
|
932
|
+
#### How to Use Dialog and Overlay
|
|
933
|
+
```typescript
|
|
934
|
+
import { Component } from '@angular/core';
|
|
935
|
+
import { DialogService } from 'ngx-core-components/dialog';
|
|
936
|
+
import { TooltipDirective, PopoverComponent } from 'ngx-core-components/dialog';
|
|
937
|
+
|
|
938
|
+
@Component({
|
|
939
|
+
standalone: true,
|
|
940
|
+
imports: [TooltipDirective, PopoverComponent],
|
|
941
|
+
template: `
|
|
942
|
+
<!-- Tooltip -->
|
|
943
|
+
<button ngxTooltip="Save Changes" tooltipPosition="bottom">Hover</button>
|
|
944
|
+
|
|
945
|
+
<!-- Popover -->
|
|
946
|
+
<button #btn>Click Me</button>
|
|
947
|
+
<ngx-popover [anchor]="btn" title="Information">
|
|
948
|
+
<p>This is a popover overlay.</p>
|
|
949
|
+
</ngx-popover>
|
|
950
|
+
`
|
|
951
|
+
})
|
|
952
|
+
export class OverlayExampleComponent {
|
|
953
|
+
constructor(private dialogService: DialogService) {}
|
|
954
|
+
|
|
955
|
+
openModal() {
|
|
956
|
+
const ref = this.dialogService.open(MyDialogContent, {
|
|
957
|
+
data: { name: 'Admin' }
|
|
958
|
+
});
|
|
959
|
+
ref.closed.subscribe(result => console.log('Closed:', result));
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
@Component({
|
|
964
|
+
standalone: true,
|
|
965
|
+
template: `<h3>Hello {{ dialogData.name }}</h3>`
|
|
966
|
+
})
|
|
967
|
+
export class MyDialogContent {
|
|
968
|
+
// Inject properties inside standalone dialog components using standard inputs
|
|
969
|
+
dialogData: any;
|
|
970
|
+
dialogRef: any;
|
|
971
|
+
}
|
|
972
|
+
```
|
|
973
|
+
|
|
974
|
+
#### DialogService (Injectable)
|
|
975
|
+
##### Methods
|
|
976
|
+
| Method | Signature | Description |
|
|
977
|
+
|---|---|---|
|
|
978
|
+
| `open` | `open<C, D, R>(component: Type<C>, config?: DialogConfig<D>): DialogRef<R>` | Open floating overlay window |
|
|
979
|
+
|
|
980
|
+
##### DialogConfig Interface
|
|
409
981
|
| Property | Type | Default | Description |
|
|
410
|
-
|
|
411
|
-
| `
|
|
412
|
-
| `
|
|
413
|
-
| `
|
|
414
|
-
| `
|
|
415
|
-
| `
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
|
429
|
-
|
|
430
|
-
| `
|
|
431
|
-
| `
|
|
432
|
-
| `
|
|
433
|
-
| `
|
|
434
|
-
| `
|
|
435
|
-
| `
|
|
436
|
-
|
|
437
|
-
|
|
982
|
+
|---|---|---|---|
|
|
983
|
+
| `data` | `D` | `undefined` | Custom data inputs passed to dialog component |
|
|
984
|
+
| `closeOnBackdrop` | `boolean` | `true` | Close modal on background mouse click |
|
|
985
|
+
| `panelClass` | `string \| string[]` | `[]` | Dialog container class customizations |
|
|
986
|
+
| `maxWidth` | `string` | `'560px'` | Max CSS size limits |
|
|
987
|
+
| `ariaLabel` | `string` | `'Dialog'` | Screen reader description |
|
|
988
|
+
|
|
989
|
+
#### TooltipDirective (`ngxTooltip`)
|
|
990
|
+
##### Inputs
|
|
991
|
+
| Input | Type | Default | Description |
|
|
992
|
+
|---|---|---|---|
|
|
993
|
+
| `ngxTooltip` | `string` | `''` | Text contents of the popup tooltip box |
|
|
994
|
+
| `tooltipPosition` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Placement side |
|
|
995
|
+
| `tooltipDelay` | `number` | `300` | Delay in milliseconds before showing tooltip |
|
|
996
|
+
| `tooltipDisabled` | `boolean` | `false` | Disable hover behavior |
|
|
997
|
+
|
|
998
|
+
#### PopoverComponent (`ngx-popover`)
|
|
999
|
+
##### Inputs
|
|
1000
|
+
| Input | Type | Default | Description |
|
|
1001
|
+
|---|---|---|---|
|
|
1002
|
+
| `anchor` | `ElementRef \| HTMLElement` | **required** | Relative positioning anchor element |
|
|
1003
|
+
| `title` | `string` | `''` | Popover header header text |
|
|
1004
|
+
| `position` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'bottom'` | Alignment layout |
|
|
1005
|
+
| `width` | `string` | `'250px'` | CSS popup width limits |
|
|
1006
|
+
| `closable` | `boolean` | `true` | Show close X button |
|
|
1007
|
+
| `showOn` | `'click' \| 'hover'` | `'click'` | Trigger event action |
|
|
1008
|
+
|
|
1009
|
+
##### Outputs
|
|
1010
|
+
| Output | Type | Description |
|
|
1011
|
+
|---|---|---|
|
|
1012
|
+
| `open` | `void` | Emitted when popup opens |
|
|
1013
|
+
| `close` | `void` | Emitted when popup closes |
|
|
1014
|
+
|
|
1015
|
+
---
|
|
1016
|
+
|
|
1017
|
+
### Buttons and Actions
|
|
1018
|
+
|
|
1019
|
+
#### How to Use Buttons & Actions
|
|
1020
|
+
```typescript
|
|
1021
|
+
import { Component, signal } from '@angular/core';
|
|
1022
|
+
import { ButtonComponent, ChipComponent, ChipListComponent, DropDownButtonComponent, SpeedDialComponent } from 'ngx-core-components/buttons';
|
|
1023
|
+
|
|
1024
|
+
@Component({
|
|
1025
|
+
standalone: true,
|
|
1026
|
+
imports: [ButtonComponent, ChipComponent, ChipListComponent, DropDownButtonComponent, SpeedDialComponent],
|
|
1027
|
+
template: `
|
|
1028
|
+
<!-- Button -->
|
|
1029
|
+
<button ngx-button variant="primary" size="lg" [loading]="loading()">Click</button>
|
|
1030
|
+
|
|
1031
|
+
<!-- Speed Dial FAB -->
|
|
1032
|
+
<ngx-speed-dial [items]="actions" direction="top" (itemClick)="onFabClick($event)" />
|
|
1033
|
+
`
|
|
1034
|
+
})
|
|
1035
|
+
export class ButtonExampleComponent {
|
|
1036
|
+
loading = signal(false);
|
|
1037
|
+
actions = [
|
|
1038
|
+
{ id: 'pdf', icon: '📄', label: 'Export PDF' },
|
|
1039
|
+
{ id: 'email', icon: '✉️', label: 'Send Email' }
|
|
1040
|
+
];
|
|
1041
|
+
onFabClick(ev: any) { console.log('FAB Clicked:', ev.id); }
|
|
1042
|
+
}
|
|
1043
|
+
```
|
|
1044
|
+
|
|
1045
|
+
#### ButtonComponent (`ngx-button` / Attribute selector)
|
|
1046
|
+
##### Inputs
|
|
1047
|
+
| Input | Type | Default | Description |
|
|
1048
|
+
|---|---|---|---|
|
|
1049
|
+
| `variant` | `ButtonVariant` | `'primary'` | Visual style variant (primary, danger, ghost, link, success) |
|
|
1050
|
+
| `size` | `ButtonSize` | `'md'` | Button height size (sm, md, lg) |
|
|
1051
|
+
| `shape` | `ButtonShape` | `'rectangle'` | Button curves (rectangle, rounded, pill, square) |
|
|
1052
|
+
| `type` | `'button' \| 'submit' \| 'reset'` | `'button'` | Button type |
|
|
1053
|
+
| `disabled` | `boolean` | `false` | Disabled status |
|
|
1054
|
+
| `loading` | `boolean` | `false` | Loading status (replaces text/icon with spinner) |
|
|
1055
|
+
| `prefixIcon` | `string` | `''` | Icon identifier displayed before label |
|
|
1056
|
+
| `suffixIcon` | `string` | `''` | Icon identifier displayed after label |
|
|
1057
|
+
| `ariaLabel` | `string` | `''` | Accessibility label description |
|
|
1058
|
+
|
|
1059
|
+
##### Outputs
|
|
1060
|
+
| Output | Type | Description |
|
|
1061
|
+
|---|---|---|
|
|
1062
|
+
| `clicked` | `MouseEvent` | Native click event emissions |
|
|
1063
|
+
|
|
1064
|
+
#### ButtonGroupComponent (`ngx-button-group`)
|
|
1065
|
+
##### Inputs
|
|
1066
|
+
| Input | Type | Default | Description |
|
|
1067
|
+
|---|---|---|---|
|
|
1068
|
+
| `vertical` | `boolean` | `false` | Stack buttons vertically |
|
|
1069
|
+
| `ariaLabel` | `string` | `'Button group'` | Group accessibility labels |
|
|
1070
|
+
|
|
1071
|
+
#### ChipComponent (`ngx-chip`)
|
|
1072
|
+
##### Inputs
|
|
1073
|
+
| Input | Type | Default | Description |
|
|
1074
|
+
|---|---|---|---|
|
|
1075
|
+
| `variant` | `ChipVariant` | `'default'` | Visual style variant (success, error, warning, outlined) |
|
|
1076
|
+
| `icon` | `string` | `''` | Lead icon |
|
|
1077
|
+
| `selected` | `boolean` | `false` | Highlighted selection state |
|
|
1078
|
+
| `removable` | `boolean` | `false` | Render ✕ icon on right |
|
|
1079
|
+
| `disabled` | `boolean` | `false` | Disable interactions |
|
|
1080
|
+
| `selectable` | `boolean` | `false` | Enable selection click behaviors |
|
|
1081
|
+
| `label` | `string` | `''` | Chip display text |
|
|
1082
|
+
|
|
1083
|
+
##### Outputs
|
|
1084
|
+
| Output | Type | Description |
|
|
1085
|
+
|---|---|---|
|
|
1086
|
+
| `removed` | `void` | Emitted when ✕ is clicked |
|
|
1087
|
+
| `selectedChange` | `boolean` | Toggled selection state change |
|
|
1088
|
+
|
|
1089
|
+
#### SpeedDialComponent (`ngx-speed-dial`)
|
|
1090
|
+
##### Inputs
|
|
1091
|
+
| Input | Type | Default | Description |
|
|
1092
|
+
|---|---|---|---|
|
|
1093
|
+
| `items` | `SpeedDialItem[]` | **required** | Float actions list |
|
|
1094
|
+
| `icon` | `string` | `'+'` | FAB closed icon |
|
|
1095
|
+
| `activeIcon` | `string` | `'✕'` | FAB opened icon |
|
|
1096
|
+
| `direction` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Direction of menu flyouts |
|
|
1097
|
+
| `theme` | `'primary' \| 'secondary' \| 'accent' \| 'dark'` | `'primary'` | Main FAB color theme |
|
|
1098
|
+
| `showLabels` | `boolean` | `true` | Show button labels |
|
|
1099
|
+
| `closeOnSelect` | `boolean` | `true` | Auto collapse after clicking a subaction item |
|
|
1100
|
+
| `collapseOnLeaveMouse`| `boolean` | `true` | Auto collapse when mouse pointer leaves scope |
|
|
1101
|
+
|
|
1102
|
+
##### Outputs
|
|
1103
|
+
| Output | Type | Description |
|
|
1104
|
+
|---|---|---|
|
|
1105
|
+
| `itemClick` | `SpeedDialItem` | Action item selected |
|
|
1106
|
+
|
|
1107
|
+
---
|
|
1108
|
+
|
|
1109
|
+
### Layout
|
|
1110
|
+
|
|
1111
|
+
#### How to Use Layout Components
|
|
1112
|
+
```typescript
|
|
1113
|
+
import { Component } from '@angular/core';
|
|
1114
|
+
import { CardComponent, TabStripComponent, TabComponent, AccordionComponent, SplitterComponent } from 'ngx-core-components/layout';
|
|
1115
|
+
|
|
1116
|
+
@Component({
|
|
1117
|
+
standalone: true,
|
|
1118
|
+
imports: [CardComponent, TabStripComponent, TabComponent, AccordionComponent, SplitterComponent],
|
|
1119
|
+
template: `
|
|
1120
|
+
<!-- Splitter -->
|
|
1121
|
+
<div style="height: 300px; border: 1px solid #ddd;">
|
|
1122
|
+
<ngx-splitter initialSize="30%" [min]="100">
|
|
1123
|
+
<div pane1>Sidebar Navigator</div>
|
|
1124
|
+
<div pane2>
|
|
1125
|
+
<!-- TabStrip -->
|
|
1126
|
+
<ngx-tab-strip>
|
|
1127
|
+
<ngx-tab title="Project Info">
|
|
1128
|
+
<!-- Card Component -->
|
|
1129
|
+
<ngx-card title="Dashboard Details" variant="outlined">
|
|
1130
|
+
Welcome to layout dashboard.
|
|
1131
|
+
</ngx-card>
|
|
1132
|
+
</ngx-tab>
|
|
1133
|
+
<ngx-tab title="Settings">Settings Area</ngx-tab>
|
|
1134
|
+
</ngx-tab-strip>
|
|
1135
|
+
</div>
|
|
1136
|
+
</ngx-splitter>
|
|
1137
|
+
</div>
|
|
1138
|
+
`
|
|
1139
|
+
})
|
|
1140
|
+
export class LayoutExampleComponent {}
|
|
1141
|
+
```
|
|
1142
|
+
|
|
1143
|
+
#### CardComponent (`ngx-card`)
|
|
1144
|
+
##### Inputs
|
|
1145
|
+
| Input | Type | Default | Description |
|
|
1146
|
+
|---|---|---|---|
|
|
1147
|
+
| `title` | `string` | `''` | Header title |
|
|
1148
|
+
| `subtitle` | `string` | `''` | Header subtitle |
|
|
1149
|
+
| `headerIcon` | `string` | `''` | Header title icon |
|
|
1150
|
+
| `imageUrl` | `string` | `''` | Large hero image URL |
|
|
1151
|
+
| `imageAlt` | `string` | `''` | Alt tag description |
|
|
1152
|
+
| `variant` | `CardVariant` | `'default'` | Visual outline style (elevated, outlined, filled) |
|
|
1153
|
+
| `hoverable` | `boolean` | `false` | Shadow hover/lift interactive behaviors |
|
|
1154
|
+
| `selectable` | `boolean` | `false` | Card selection active click behaviors |
|
|
1155
|
+
| `selected` | `boolean` | `false` | Highlighted selection state |
|
|
1156
|
+
|
|
1157
|
+
##### Outputs
|
|
1158
|
+
| Output | Type | Description |
|
|
1159
|
+
|---|---|---|
|
|
1160
|
+
| `cardClick` | `MouseEvent` | Click events (only if hoverable or selectable is active) |
|
|
1161
|
+
|
|
1162
|
+
#### TabStripComponent (`ngx-tab-strip`)
|
|
1163
|
+
##### Inputs
|
|
1164
|
+
| Input | Type | Default | Description |
|
|
1165
|
+
|---|---|---|---|
|
|
1166
|
+
| `position` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'top'` | Side position alignment of strip labels |
|
|
1167
|
+
|
|
1168
|
+
##### Outputs
|
|
1169
|
+
| Output | Type | Description |
|
|
1170
|
+
|---|---|---|
|
|
1171
|
+
| `tabChange` | `number` | Active tab index changed |
|
|
1172
|
+
|
|
1173
|
+
#### TabComponent (`ngx-tab`)
|
|
1174
|
+
##### Inputs
|
|
1175
|
+
| Input | Type | Default | Description |
|
|
1176
|
+
|---|---|---|---|
|
|
1177
|
+
| `title` | `string` | **required** | Tab selection title text |
|
|
1178
|
+
| `icon` | `string` | `''` | Title prefix icon |
|
|
1179
|
+
| `disabled` | `boolean` | `false` | Disables selecting tab |
|
|
1180
|
+
| `badge` | `string \| number` | `''` | Text/counter badge after label |
|
|
1181
|
+
|
|
1182
|
+
#### AccordionComponent (`ngx-accordion`)
|
|
1183
|
+
##### Inputs
|
|
1184
|
+
| Input | Type | Default | Description |
|
|
1185
|
+
|---|---|---|---|
|
|
1186
|
+
| `items` | `AccordionItem[]` | `[]` | Content details |
|
|
1187
|
+
| `multi` | `boolean` | `false` | Expand multiple panels simultaneously |
|
|
1188
|
+
|
|
1189
|
+
#### StepperComponent (`ngx-stepper`)
|
|
1190
|
+
##### Inputs
|
|
1191
|
+
| Input | Type | Default | Description |
|
|
1192
|
+
|---|---|---|---|
|
|
1193
|
+
| `steps` | `StepperStep[]` | `[]` | Workflow stage labels |
|
|
1194
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Stepper header alignment layout |
|
|
1195
|
+
| `showContent` | `boolean` | `true` | Render inner projected content block |
|
|
1196
|
+
| `showActions` | `boolean` | `true` | Show default Back/Next buttons |
|
|
1197
|
+
|
|
1198
|
+
##### Outputs
|
|
1199
|
+
| Output | Type | Description |
|
|
1200
|
+
|---|---|---|
|
|
1201
|
+
| `stepChange` | `number` | Emitted when active step changes |
|
|
1202
|
+
|
|
1203
|
+
#### SplitterComponent (`ngx-splitter`)
|
|
1204
|
+
##### Inputs
|
|
1205
|
+
| Input | Type | Default | Description |
|
|
1206
|
+
|---|---|---|---|
|
|
1207
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Resizing splitter direction |
|
|
1208
|
+
| `size` | `string \| number \| null` | `null` | Hardcoded programmatic size width/height of pane1 |
|
|
1209
|
+
| `initialSize` | `string \| number` | `'50%'` | First load default split percentage |
|
|
1210
|
+
| `min` | `number` | `60` | Min bounds constraint in pixels |
|
|
1211
|
+
|
|
1212
|
+
##### Outputs
|
|
1213
|
+
| Output | Type | Description |
|
|
1214
|
+
|---|---|---|
|
|
1215
|
+
| `sizeChange` | `string` | Emitted during partition drag movements |
|
|
1216
|
+
|
|
1217
|
+
---
|
|
1218
|
+
|
|
1219
|
+
### Feedback
|
|
1220
|
+
|
|
1221
|
+
#### How to Use Feedback Components
|
|
1222
|
+
```typescript
|
|
1223
|
+
import { Component } from '@angular/core';
|
|
1224
|
+
import { BadgeComponent, ProgressBarComponent, SkeletonComponent, AlertComponent, StatCardComponent } from 'ngx-core-components/feedback';
|
|
1225
|
+
import { NotificationService } from 'ngx-core-components/feedback';
|
|
1226
|
+
|
|
1227
|
+
@Component({
|
|
1228
|
+
standalone: true,
|
|
1229
|
+
imports: [BadgeComponent, ProgressBarComponent, SkeletonComponent, AlertComponent, StatCardComponent],
|
|
1230
|
+
template: `
|
|
1231
|
+
<!-- Stat Card -->
|
|
1232
|
+
<ngx-stat-card label="Users Active" value="12,450" trend="up" trendValue="+14%" icon="👥" />
|
|
1233
|
+
|
|
1234
|
+
<!-- Progress Bar -->
|
|
1235
|
+
<ngx-progress-bar [value]="progress" [showValue]="true" variant="success" />
|
|
1236
|
+
|
|
1237
|
+
<!-- Alert -->
|
|
1238
|
+
<ngx-alert variant="warning" title="Warning Action" message="Process takes longer than expected." />
|
|
1239
|
+
`
|
|
1240
|
+
})
|
|
1241
|
+
export class FeedbackExampleComponent {
|
|
1242
|
+
progress = 75;
|
|
1243
|
+
constructor(private toast: NotificationService) {}
|
|
1244
|
+
|
|
1245
|
+
showToast() {
|
|
1246
|
+
this.toast.success('Project was saved successfully!', 'Saved');
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
```
|
|
1250
|
+
|
|
1251
|
+
#### BadgeComponent (`ngx-badge`)
|
|
1252
|
+
##### Inputs
|
|
1253
|
+
| Input | Type | Default | Description |
|
|
1254
|
+
|---|---|---|---|
|
|
1255
|
+
| `content` | `string \| number` | `''` | Label contents |
|
|
1256
|
+
| `variant` | `BadgeVariant` | `'primary'` | Color state variants (success, danger, info, warning, dark) |
|
|
1257
|
+
| `dot` | `boolean` | `false` | Small indicator dot mode (hides content labels) |
|
|
1258
|
+
| `positioned` | `boolean` | `false` | Absolute corner positioning relative to parent context |
|
|
1259
|
+
| `position` | `BadgePosition` | `'top-right'` | Corner alignments |
|
|
1260
|
+
|
|
1261
|
+
#### ProgressBarComponent (`ngx-progress-bar`)
|
|
1262
|
+
##### Inputs
|
|
1263
|
+
| Input | Type | Default | Description |
|
|
1264
|
+
|---|---|---|---|
|
|
1265
|
+
| `value` | `number` | `0` | Current scale |
|
|
1266
|
+
| `min` | `number` | `0` | Min bounds |
|
|
1267
|
+
| `max` | `number` | `100` | Max bounds |
|
|
1268
|
+
| `label` | `string` | `''` | Descriptive header text |
|
|
1269
|
+
| `variant` | `ProgressVariant` | `'primary'` | Theme color |
|
|
1270
|
+
| `height` | `number` | `8` | Height height in pixels |
|
|
1271
|
+
| `showValue` | `boolean` | `false` | Display percentage layout text |
|
|
1272
|
+
| `indeterminate` | `boolean` | `false` | Continuous sliding animations mode (ignores values) |
|
|
1273
|
+
|
|
1274
|
+
#### AlertComponent (`ngx-alert`)
|
|
1275
|
+
##### Inputs
|
|
1276
|
+
| Input | Type | Default | Description |
|
|
1277
|
+
|---|---|---|---|
|
|
1278
|
+
| `variant` | `AlertVariant` | `'info'` | Theme variations (info, success, warning, error) |
|
|
1279
|
+
| `title` | `string` | `''` | Large bold header text |
|
|
1280
|
+
| `message` | `string` | `''` | Paragraph text |
|
|
1281
|
+
| `dismissible` | `boolean` | `true` | Render closing ✕ button |
|
|
1282
|
+
| `actionLabel` | `string` | `''` | CTA button label |
|
|
1283
|
+
| `theme` | `'light' \| 'dark'` | `'light'` | Dark mode options |
|
|
1284
|
+
|
|
1285
|
+
##### Outputs
|
|
1286
|
+
| Output | Type | Description |
|
|
1287
|
+
|---|---|---|
|
|
1288
|
+
| `dismissed` | `void` | Alert closed after transition completed |
|
|
1289
|
+
| `actionClick` | `void` | Action button clicked |
|
|
1290
|
+
|
|
1291
|
+
#### NotificationService (Injectable)
|
|
1292
|
+
##### Methods
|
|
1293
|
+
| Method | Signature | Description |
|
|
1294
|
+
|---|---|---|
|
|
1295
|
+
| `success` | `(msg: string, title?: string, opts?: options): number` | Success toast |
|
|
1296
|
+
| `error` | `(msg: string, title?: string, opts?: options): number` | Error toast |
|
|
1297
|
+
| `info` | `(msg: string, title?: string, opts?: options): number` | Informational toast |
|
|
1298
|
+
| `warning` | `(msg: string, title?: string, opts?: options): number` | Warning toast |
|
|
1299
|
+
|
|
1300
|
+
---
|
|
1301
|
+
|
|
1302
|
+
### Navigation
|
|
1303
|
+
|
|
1304
|
+
#### How to Use Navigation Components
|
|
1305
|
+
```typescript
|
|
1306
|
+
import { Component } from '@angular/core';
|
|
1307
|
+
import { BreadcrumbComponent, MenuComponent, CommandPaletteComponent, ContextMenuComponent } from 'ngx-core-components/navigation';
|
|
1308
|
+
|
|
1309
|
+
@Component({
|
|
1310
|
+
standalone: true,
|
|
1311
|
+
imports: [BreadcrumbComponent, MenuComponent, CommandPaletteComponent, ContextMenuComponent],
|
|
1312
|
+
template: `
|
|
1313
|
+
<!-- Breadcrumb -->
|
|
1314
|
+
<ngx-breadcrumb [items]="breadcrumbItems" />
|
|
1315
|
+
|
|
1316
|
+
<!-- Menu -->
|
|
1317
|
+
<ngx-menu [items]="menuItems" activeItem="Profile" />
|
|
1318
|
+
`
|
|
1319
|
+
})
|
|
1320
|
+
export class NavExampleComponent {
|
|
1321
|
+
breadcrumbItems = [
|
|
1322
|
+
{ label: 'Home', url: '/' },
|
|
1323
|
+
{ label: 'Admin', url: '/admin' },
|
|
1324
|
+
{ label: 'System Settings' }
|
|
1325
|
+
];
|
|
1326
|
+
|
|
1327
|
+
menuItems = [
|
|
1328
|
+
{ label: 'Dashboard', icon: '📊', url: '/dashboard' },
|
|
1329
|
+
{ label: 'Settings', icon: '⚙️', children: [
|
|
1330
|
+
{ label: 'Profile', url: '/profile' },
|
|
1331
|
+
{ label: 'Security', url: '/security' }
|
|
1332
|
+
]
|
|
1333
|
+
}
|
|
1334
|
+
];
|
|
1335
|
+
}
|
|
1336
|
+
```
|
|
1337
|
+
|
|
1338
|
+
#### BreadcrumbComponent (`ngx-breadcrumb`)
|
|
1339
|
+
##### Inputs
|
|
1340
|
+
| Input | Type | Default | Description |
|
|
1341
|
+
|---|---|---|---|
|
|
1342
|
+
| `items` | `BreadcrumbItem[]` | `[]` | Navigation steps |
|
|
1343
|
+
| `separator` | `string` | `'/'` | Character division indicator |
|
|
1344
|
+
|
|
1345
|
+
##### Outputs
|
|
1346
|
+
| Output | Type | Description |
|
|
1347
|
+
|---|---|---|
|
|
1348
|
+
| `itemClick` | `BreadcrumbItem` | Emitted when link clicks are selected |
|
|
1349
|
+
|
|
1350
|
+
#### MenuComponent (`ngx-menu`)
|
|
1351
|
+
##### Inputs
|
|
1352
|
+
| Input | Type | Default | Description |
|
|
1353
|
+
|---|---|---|---|
|
|
1354
|
+
| `items` | `MenuItem[]` | `[]` | Multilevel navigation links |
|
|
1355
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Alignment layout |
|
|
1356
|
+
| `activeItem` | `string` | `''` | Matching labels to highlight active link |
|
|
1357
|
+
|
|
1358
|
+
##### Outputs
|
|
1359
|
+
| Output | Type | Description |
|
|
1360
|
+
|---|---|---|
|
|
1361
|
+
| `itemClick` | `MenuItem` | Emitted when leaf link item is clicked |
|
|
1362
|
+
|
|
1363
|
+
#### CommandPaletteComponent (`ngx-command-palette`)
|
|
1364
|
+
##### Inputs
|
|
1365
|
+
| Input | Type | Default | Description |
|
|
1366
|
+
|---|---|---|---|
|
|
1367
|
+
| `commands` | `CommandItem[]` | **required** | Selectable actions list |
|
|
1368
|
+
| `placeholder` | `string` | `'Type a command or search...'` | Search input placeholder |
|
|
1369
|
+
|
|
1370
|
+
##### Outputs
|
|
1371
|
+
| Output | Type | Description |
|
|
1372
|
+
|---|---|---|
|
|
1373
|
+
| `commandSelected` | `CommandItem` | Emitted when command action is chosen |
|
|
1374
|
+
|
|
1375
|
+
##### Public Methods
|
|
1376
|
+
| Method | Signature | Description |
|
|
1377
|
+
|---|---|---|
|
|
1378
|
+
| `openPalette` | `(): void` | Trigger modal popup display |
|
|
1379
|
+
| `closePalette` | `(): void` | Dismiss modal popup display |
|
|
1380
|
+
|
|
1381
|
+
---
|
|
1382
|
+
|
|
1383
|
+
### Barcodes
|
|
1384
|
+
|
|
1385
|
+
#### How to Use Barcodes
|
|
1386
|
+
```typescript
|
|
1387
|
+
import { Component } from '@angular/core';
|
|
1388
|
+
import { BarcodeComponent, QrCodeComponent } from 'ngx-core-components/barcodes';
|
|
1389
|
+
|
|
1390
|
+
@Component({
|
|
1391
|
+
standalone: true,
|
|
1392
|
+
imports: [BarcodeComponent, QrCodeComponent],
|
|
1393
|
+
template: `
|
|
1394
|
+
<!-- Barcode EAN-13 -->
|
|
1395
|
+
<ngx-barcode value="9780201379624" label="Book Barcode" [height]="80" />
|
|
1396
|
+
|
|
1397
|
+
<!-- QR Code -->
|
|
1398
|
+
<ngx-qrcode value="https://example.com" [size]="150" label="Scan to Visit Site" />
|
|
1399
|
+
`
|
|
1400
|
+
})
|
|
1401
|
+
export class BarcodesExampleComponent {}
|
|
1402
|
+
```
|
|
1403
|
+
|
|
1404
|
+
#### BarcodeComponent (`ngx-barcode`)
|
|
1405
|
+
##### Inputs
|
|
1406
|
+
| Input | Type | Default | Description |
|
|
1407
|
+
|---|---|---|---|
|
|
1408
|
+
| `value` | `string` | `''` | Numeric/String value encoding |
|
|
1409
|
+
| `label` | `string` | `''` | Text displayed above |
|
|
1410
|
+
| `height` | `number` | `60` | Height dimensions in pixels |
|
|
1411
|
+
| `barWidth` | `number` | `2` | Single bar width in pixels |
|
|
1412
|
+
| `foreground` | `string` | `'#000000'` | Stroke fill colors |
|
|
1413
|
+
| `background` | `string` | `'#ffffff'` | Canvas background |
|
|
1414
|
+
|
|
1415
|
+
#### QrCodeComponent (`ngx-qr-code`)
|
|
1416
|
+
##### Inputs
|
|
1417
|
+
| Input | Type | Default | Description |
|
|
1418
|
+
|---|---|---|---|
|
|
1419
|
+
| `value` | `string` | `''` | Text URL/String encoding |
|
|
1420
|
+
| `size` | `number` | `160` | Width & height sizes in pixels |
|
|
1421
|
+
| `label` | `string` | `''` | Header description text |
|
|
1422
|
+
| `foreground` | `string` | `'#000000'` | Code grid point color |
|
|
1423
|
+
| `background` | `string` | `'#ffffff'` | Grid canvas background |
|
|
1424
|
+
|
|
1425
|
+
---
|
|
438
1426
|
|
|
439
1427
|
## Advanced Features
|
|
440
1428
|
|
|
@@ -453,6 +1441,8 @@ Tasks can be adjusted using only the keyboard:
|
|
|
453
1441
|
- **Rescheduling**: Focus a task bar and use the `ArrowLeft` or `ArrowRight` keys to shift the task start and end dates by 1 unit (1 hour in Hour view, otherwise 1 day).
|
|
454
1442
|
- **Resizing**: Focus a task bar and hold `Alt` or `Shift` alongside `ArrowLeft` or `ArrowRight` to extend or shrink the task's duration from the right boundary.
|
|
455
1443
|
|
|
1444
|
+
---
|
|
1445
|
+
|
|
456
1446
|
## Theming
|
|
457
1447
|
|
|
458
1448
|
Override CSS custom properties on the `ngx-gantt-chart` element:
|
|
@@ -478,23 +1468,14 @@ Other component groups expose their own CSS variable namespaces as well:
|
|
|
478
1468
|
- Tooltip/Popover: `--ngx-tooltip-*`, `--ngx-popover-*`
|
|
479
1469
|
- Buttons and chips: `--ngx-btn-*`, `--ngx-chip-*`
|
|
480
1470
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
Access via `ViewChild`:
|
|
484
|
-
|
|
485
|
-
```typescript
|
|
486
|
-
@ViewChild(GanttChartComponent) gantt!: GanttChartComponent;
|
|
487
|
-
|
|
488
|
-
this.gantt.scrollToDate(new Date('2026-04-15'));
|
|
489
|
-
this.gantt.scrollToTask('task-42');
|
|
490
|
-
this.gantt.expandAll();
|
|
491
|
-
this.gantt.collapseAll();
|
|
492
|
-
```
|
|
1471
|
+
---
|
|
493
1472
|
|
|
494
1473
|
## Demo Application
|
|
495
1474
|
|
|
496
1475
|
The repository includes a demo app under `projects/demo` covering live examples, how-to snippets, and API reference tables for the library components.
|
|
497
1476
|
|
|
1477
|
+
---
|
|
1478
|
+
|
|
498
1479
|
## License
|
|
499
1480
|
|
|
500
1481
|
MIT
|