ngx-core-components 0.1.0 → 0.1.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.
- package/README.md +193 -13
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# ngx-core-components
|
|
2
2
|
|
|
3
|
-
Angular 19 / 20 / 21 component library
|
|
3
|
+
Angular 19 / 20 / 21 standalone component library with enterprise-ready UI building blocks including a full-featured **SVG Gantt Chart**, inputs, data grid, dialogs, charts, navigation, layout, feedback, and barcode components.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/ngx-core-components)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
## Features
|
|
9
9
|
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
10
|
+
- **Gantt chart** with task bars, dependencies, milestones, drag/resize, zoom, and hierarchy
|
|
11
|
+
- **Input controls** including text, dropdown, multi-select, autocomplete, date/time, slider, switch, rating, and color picker
|
|
12
|
+
- **Charts** including bar, line, pie, donut, and sparkline
|
|
13
|
+
- **Data presentation** with grid, tree view, and list view
|
|
14
|
+
- **Dialogs, tooltips, and popovers** for overlays and contextual UI
|
|
15
|
+
- **Buttons, chips, menus, breadcrumbs, tabs, cards, accordions, steppers, and splitters**
|
|
16
|
+
- **Feedback components** including badge, progress bar, skeleton, and notifications
|
|
17
|
+
- **Barcode and QR code generation** with no external runtime dependency
|
|
18
18
|
- **Fully themeable** via CSS custom properties
|
|
19
|
-
- **Zero runtime dependencies** — only Angular peer
|
|
19
|
+
- **Zero runtime dependencies** — only Angular peer dependencies
|
|
20
20
|
- **OnPush change detection** + Angular Signals
|
|
21
21
|
- **Standalone components** (no NgModules)
|
|
22
22
|
|
|
@@ -26,8 +26,110 @@ Angular 19 / 20 / 21 component library featuring a full-featured **SVG Gantt Cha
|
|
|
26
26
|
npm install ngx-core-components
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
## Entry Points
|
|
30
|
+
|
|
31
|
+
You can import from the primary package for convenience:
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { GanttChartComponent, TextBoxComponent, DataGridComponent } from 'ngx-core-components';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Or use secondary entry points for more focused imports:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { TextBoxComponent, DropdownComponent } from 'ngx-core-components/inputs';
|
|
41
|
+
import { BarChartComponent, GanttChartComponent } from 'ngx-core-components/charts';
|
|
42
|
+
import { DataGridComponent } from 'ngx-core-components/grid';
|
|
43
|
+
import { DialogService } from 'ngx-core-components/dialog';
|
|
44
|
+
import { ButtonComponent } from 'ngx-core-components/buttons';
|
|
45
|
+
import { CardComponent } from 'ngx-core-components/layout';
|
|
46
|
+
import { BadgeComponent } from 'ngx-core-components/feedback';
|
|
47
|
+
import { BreadcrumbComponent } from 'ngx-core-components/navigation';
|
|
48
|
+
import { TreeViewComponent, ListViewComponent } from 'ngx-core-components/views';
|
|
49
|
+
import { QrCodeComponent, BarcodeComponent } from 'ngx-core-components/barcodes';
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Included Components
|
|
53
|
+
|
|
54
|
+
### Charts
|
|
55
|
+
|
|
56
|
+
- `GanttChartComponent`
|
|
57
|
+
- `BarChartComponent`
|
|
58
|
+
- `LineChartComponent`
|
|
59
|
+
- `PieChartComponent`
|
|
60
|
+
- `SparklineComponent`
|
|
61
|
+
|
|
62
|
+
### Inputs
|
|
63
|
+
|
|
64
|
+
- `TextBoxComponent`
|
|
65
|
+
- `CheckboxComponent`
|
|
66
|
+
- `RadioGroupComponent`
|
|
67
|
+
- `DropdownComponent`
|
|
68
|
+
- `MultiSelectComponent`
|
|
69
|
+
- `AutocompleteComponent`
|
|
70
|
+
- `DatePickerComponent`
|
|
71
|
+
- `SliderComponent`
|
|
72
|
+
- `SwitchComponent`
|
|
73
|
+
- `RatingComponent`
|
|
74
|
+
- `NumericTextBoxComponent`
|
|
75
|
+
- `TextareaComponent`
|
|
76
|
+
- `ColorPickerComponent`
|
|
77
|
+
- `TimePickerComponent`
|
|
78
|
+
- `DateRangePickerComponent`
|
|
79
|
+
|
|
80
|
+
### Data Views
|
|
81
|
+
|
|
82
|
+
- `DataGridComponent`
|
|
83
|
+
- `TreeViewComponent`
|
|
84
|
+
- `ListViewComponent`
|
|
85
|
+
|
|
86
|
+
### Dialog and Overlay
|
|
87
|
+
|
|
88
|
+
- `DialogService`
|
|
89
|
+
- `DialogContainerComponent`
|
|
90
|
+
- `TooltipDirective`
|
|
91
|
+
- `PopoverComponent`
|
|
92
|
+
|
|
93
|
+
### Buttons and Actions
|
|
94
|
+
|
|
95
|
+
- `ButtonComponent`
|
|
96
|
+
- `ButtonGroupComponent`
|
|
97
|
+
- `ChipComponent`
|
|
98
|
+
- `ChipListComponent`
|
|
99
|
+
- `SplitButtonComponent`
|
|
100
|
+
- `DropDownButtonComponent`
|
|
101
|
+
|
|
102
|
+
### Layout
|
|
103
|
+
|
|
104
|
+
- `CardComponent`
|
|
105
|
+
- `TabStripComponent`
|
|
106
|
+
- `TabComponent`
|
|
107
|
+
- `AccordionComponent`
|
|
108
|
+
- `StepperComponent`
|
|
109
|
+
- `SplitterComponent`
|
|
110
|
+
|
|
111
|
+
### Feedback
|
|
112
|
+
|
|
113
|
+
- `BadgeComponent`
|
|
114
|
+
- `ProgressBarComponent`
|
|
115
|
+
- `SkeletonComponent`
|
|
116
|
+
- `NotificationService`
|
|
117
|
+
- `NotificationContainerComponent`
|
|
118
|
+
|
|
119
|
+
### Navigation
|
|
120
|
+
|
|
121
|
+
- `BreadcrumbComponent`
|
|
122
|
+
- `MenuComponent`
|
|
123
|
+
|
|
124
|
+
### Barcodes
|
|
125
|
+
|
|
126
|
+
- `QrCodeComponent`
|
|
127
|
+
- `BarcodeComponent`
|
|
128
|
+
|
|
29
129
|
## Quick Start
|
|
30
130
|
|
|
131
|
+
### Gantt Chart
|
|
132
|
+
|
|
31
133
|
```typescript
|
|
32
134
|
import { Component } from '@angular/core';
|
|
33
135
|
import { GanttChartComponent, GanttTask, GanttDependency, DependencyType } from 'ngx-core-components';
|
|
@@ -71,8 +173,73 @@ export class MyComponent {
|
|
|
71
173
|
}
|
|
72
174
|
```
|
|
73
175
|
|
|
176
|
+
### Form Controls
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
import { Component, signal } from '@angular/core';
|
|
180
|
+
import { TextBoxComponent, DropdownComponent, type DropdownOption } from 'ngx-core-components';
|
|
181
|
+
|
|
182
|
+
@Component({
|
|
183
|
+
standalone: true,
|
|
184
|
+
imports: [TextBoxComponent, DropdownComponent],
|
|
185
|
+
template: `
|
|
186
|
+
<ngx-textbox
|
|
187
|
+
[value]="name()"
|
|
188
|
+
label="Full Name"
|
|
189
|
+
placeholder="Enter your name"
|
|
190
|
+
(valueChange)="name.set($event)"
|
|
191
|
+
/>
|
|
192
|
+
|
|
193
|
+
<ngx-dropdown
|
|
194
|
+
[options]="countries"
|
|
195
|
+
[value]="country()"
|
|
196
|
+
label="Country"
|
|
197
|
+
placeholder="Select country"
|
|
198
|
+
(valueChange)="country.set($event)"
|
|
199
|
+
/>
|
|
200
|
+
`,
|
|
201
|
+
})
|
|
202
|
+
export class MyFormComponent {
|
|
203
|
+
name = signal('');
|
|
204
|
+
country = signal<unknown>(null);
|
|
205
|
+
|
|
206
|
+
countries: DropdownOption[] = [
|
|
207
|
+
{ label: 'United States', value: 'us' },
|
|
208
|
+
{ label: 'Germany', value: 'de' },
|
|
209
|
+
{ label: 'Japan', value: 'jp' },
|
|
210
|
+
];
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Data Grid
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
import { Component } from '@angular/core';
|
|
218
|
+
import { DataGridComponent, type GridColumnDef } from 'ngx-core-components';
|
|
219
|
+
|
|
220
|
+
@Component({
|
|
221
|
+
standalone: true,
|
|
222
|
+
imports: [DataGridComponent],
|
|
223
|
+
template: `<ngx-data-grid [data]="rows" [columns]="columns" [pageSize]="5" />`,
|
|
224
|
+
})
|
|
225
|
+
export class MyGridComponent {
|
|
226
|
+
columns: GridColumnDef[] = [
|
|
227
|
+
{ field: 'id', title: 'ID', width: 80 },
|
|
228
|
+
{ field: 'name', title: 'Name', sortable: true },
|
|
229
|
+
{ field: 'status', title: 'Status' },
|
|
230
|
+
];
|
|
231
|
+
|
|
232
|
+
rows = [
|
|
233
|
+
{ id: 1, name: 'Alpha', status: 'Active' },
|
|
234
|
+
{ id: 2, name: 'Beta', status: 'Paused' },
|
|
235
|
+
];
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
74
239
|
## API
|
|
75
240
|
|
|
241
|
+
This README focuses on the primary Gantt API because it is the largest surface in the package. The demo application under `projects/demo` shows usage and API reference coverage for the other components.
|
|
242
|
+
|
|
76
243
|
### Inputs
|
|
77
244
|
|
|
78
245
|
| Input | Type | Default | Description |
|
|
@@ -104,7 +271,7 @@ export class MyComponent {
|
|
|
104
271
|
| `showTodayMarker` | `boolean` | `true` | Show today indicator line |
|
|
105
272
|
| `showGrid` | `boolean` | `true` | Show grid lines |
|
|
106
273
|
| `collapsible` | `boolean` | `true` | Allow tree collapse/expand |
|
|
107
|
-
| `snapTo` | `'
|
|
274
|
+
| `snapTo` | `'day' \| 'week' \| 'month'` | `'day'` | Snap granularity for drag and resize |
|
|
108
275
|
| `locale` | `string` | `'en-US'` | Locale for date formatting |
|
|
109
276
|
|
|
110
277
|
### GanttTask
|
|
@@ -134,11 +301,20 @@ ngx-gantt-chart {
|
|
|
134
301
|
--ngx-gantt-bar-progress-bg: #1e8449;
|
|
135
302
|
--ngx-gantt-today-color: #e74c3c;
|
|
136
303
|
--ngx-gantt-header-bg: #2c3e50;
|
|
137
|
-
--ngx-gantt-
|
|
304
|
+
--ngx-gantt-text: #ecf0f1;
|
|
138
305
|
}
|
|
139
306
|
```
|
|
140
307
|
|
|
141
|
-
|
|
308
|
+
Common Gantt custom properties include `--ngx-gantt-bg`, `--ngx-gantt-border`, `--ngx-gantt-grid-line`, `--ngx-gantt-header-bg`, `--ngx-gantt-text`, `--ngx-gantt-bar-bg`, `--ngx-gantt-bar-progress-bg`, and `--ngx-gantt-today-color`.
|
|
309
|
+
|
|
310
|
+
Other component groups expose their own CSS variable namespaces as well:
|
|
311
|
+
|
|
312
|
+
- Inputs: `--ngx-input-*`
|
|
313
|
+
- Charts: `--ngx-chart-*`
|
|
314
|
+
- Grid: `--ngx-grid-*`
|
|
315
|
+
- Tree/List: `--ngx-tree-*`, `--ngx-list-*`
|
|
316
|
+
- Tooltip/Popover: `--ngx-tooltip-*`, `--ngx-popover-*`
|
|
317
|
+
- Buttons and chips: `--ngx-btn-*`, `--ngx-chip-*`
|
|
142
318
|
|
|
143
319
|
## Public Methods
|
|
144
320
|
|
|
@@ -153,6 +329,10 @@ this.gantt.expandAll();
|
|
|
153
329
|
this.gantt.collapseAll();
|
|
154
330
|
```
|
|
155
331
|
|
|
332
|
+
## Demo Application
|
|
333
|
+
|
|
334
|
+
The repository includes a demo app under `projects/demo` covering live examples, how-to snippets, and API reference tables for the library components.
|
|
335
|
+
|
|
156
336
|
## License
|
|
157
337
|
|
|
158
338
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-core-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Angular component library featuring a full-featured SVG Gantt Chart with drag/resize, dependencies, zoom, tree hierarchy, and theming.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"types": "./grid/index.d.ts",
|
|
67
67
|
"default": "./fesm2022/ngx-core-components-grid.mjs"
|
|
68
68
|
},
|
|
69
|
-
"./layout": {
|
|
70
|
-
"types": "./layout/index.d.ts",
|
|
71
|
-
"default": "./fesm2022/ngx-core-components-layout.mjs"
|
|
72
|
-
},
|
|
73
69
|
"./inputs": {
|
|
74
70
|
"types": "./inputs/index.d.ts",
|
|
75
71
|
"default": "./fesm2022/ngx-core-components-inputs.mjs"
|
|
76
72
|
},
|
|
73
|
+
"./layout": {
|
|
74
|
+
"types": "./layout/index.d.ts",
|
|
75
|
+
"default": "./fesm2022/ngx-core-components-layout.mjs"
|
|
76
|
+
},
|
|
77
77
|
"./navigation": {
|
|
78
78
|
"types": "./navigation/index.d.ts",
|
|
79
79
|
"default": "./fesm2022/ngx-core-components-navigation.mjs"
|