ngx-core-components 0.1.1 → 0.1.3

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 CHANGED
@@ -211,6 +211,99 @@ export class MyFormComponent {
211
211
  }
212
212
  ```
213
213
 
214
+ ### Structured Inputs
215
+
216
+ ```typescript
217
+ import { Component, signal } from '@angular/core';
218
+ import { NumericTextBoxComponent, TimePickerComponent } from 'ngx-core-components/inputs';
219
+
220
+ @Component({
221
+ standalone: true,
222
+ imports: [NumericTextBoxComponent, TimePickerComponent],
223
+ template: `
224
+ <ngx-numeric-textbox
225
+ [value]="quantity()"
226
+ label="Quantity"
227
+ [min]="0"
228
+ [max]="25"
229
+ [step]="1"
230
+ (valueChange)="quantity.set($event)"
231
+ />
232
+
233
+ <ngx-time-picker
234
+ [value]="meetingTime()"
235
+ label="Meeting Time"
236
+ [use12h]="true"
237
+ (timeChange)="meetingTime.set($event)"
238
+ />
239
+ `,
240
+ })
241
+ export class MyStructuredInputsComponent {
242
+ quantity = signal(3);
243
+ meetingTime = signal('14:30');
244
+ }
245
+ ```
246
+
247
+ `NumericTextBoxComponent` supports controlled values and keyboard stepping with the up and down arrow keys. `TimePickerComponent` accepts typed input such as `14:30` or `2:30 PM` and normalizes emitted values to `HH:mm`.
248
+
249
+ ### List View
250
+
251
+ ```typescript
252
+ import { Component, computed, signal } from '@angular/core';
253
+ import { ListViewComponent, type ListViewPageChangeEvent } from 'ngx-core-components/views';
254
+
255
+ @Component({
256
+ standalone: true,
257
+ imports: [ListViewComponent],
258
+ template: `
259
+ <ngx-list-view
260
+ [items]="filteredPeople()"
261
+ [pageSize]="5"
262
+ [selectable]="true"
263
+ (pageChange)="onPageChange($event)"
264
+ (selectionChange)="selected.set($event.selectedItems)"
265
+ />
266
+ `,
267
+ })
268
+ export class MyListComponent {
269
+ search = signal('');
270
+ selected = signal<unknown[]>([]);
271
+ people = [
272
+ { name: 'Alice', dept: 'Engineering' },
273
+ { name: 'Bob', dept: 'Product' },
274
+ ];
275
+
276
+ filteredPeople = computed(() => this.people);
277
+
278
+ onPageChange(event: ListViewPageChangeEvent): void {
279
+ console.log(event.page, event.totalPages);
280
+ }
281
+ }
282
+ ```
283
+
284
+ ### Splitter
285
+
286
+ ```typescript
287
+ import { Component, signal } from '@angular/core';
288
+ import { SplitterComponent } from 'ngx-core-components/layout';
289
+
290
+ @Component({
291
+ standalone: true,
292
+ imports: [SplitterComponent],
293
+ template: `
294
+ <div style="height: 320px; border: 1px solid #e9ecef; overflow: hidden;">
295
+ <ngx-splitter [size]="paneSize()" [min]="180" (sizeChange)="paneSize.set($event)">
296
+ <div pane1>Navigation</div>
297
+ <div pane2>Content</div>
298
+ </ngx-splitter>
299
+ </div>
300
+ `,
301
+ })
302
+ export class MyLayoutComponent {
303
+ paneSize = signal('35%');
304
+ }
305
+ ```
306
+
214
307
  ### Data Grid
215
308
 
216
309
  ```typescript
@@ -240,6 +333,58 @@ export class MyGridComponent {
240
333
 
241
334
  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
335
 
336
+ ### Notable Secondary APIs
337
+
338
+ #### ListView Inputs
339
+
340
+ | Input | Type | Default | Description |
341
+ |-------|------|---------|-------------|
342
+ | `items` | `T[]` | `[]` | Items rendered in the list. |
343
+ | `labelField` | `string` | `'label'` | Field used by the default item renderer. |
344
+ | `selectable` | `boolean` | `true` | Enables row selection. |
345
+ | `multiselect` | `boolean` | `false` | Allows multi-selection. |
346
+ | `loading` | `boolean` | `false` | Shows the loading state. |
347
+ | `pageSize` | `number` | `0` | Enables built-in pagination when greater than `0`. |
348
+
349
+ #### ListView Outputs
350
+
351
+ | Output | Type | Description |
352
+ |--------|------|-------------|
353
+ | `itemClick` | `ListViewItemClickEvent<T>` | Fired when an item is clicked. |
354
+ | `selectionChange` | `ListViewSelectionEvent<T>` | Fired when selected items change. |
355
+ | `pageChange` | `ListViewPageChangeEvent` | Fired when the built-in pager changes pages. |
356
+
357
+ #### NumericTextBox Inputs
358
+
359
+ | Input | Type | Default | Description |
360
+ |-------|------|---------|-------------|
361
+ | `value` | `number` | `0` | Controlled numeric value displayed in the input. |
362
+ | `min` | `number` | `-Infinity` | Lower bound for allowed values. |
363
+ | `max` | `number` | `Infinity` | Upper bound for allowed values. |
364
+ | `step` | `number` | `1` | Increment and decrement amount. |
365
+
366
+ #### TimePicker Inputs
367
+
368
+ | Input | Type | Default | Description |
369
+ |-------|------|---------|-------------|
370
+ | `value` | `string` | `'09:00'` | Controlled time value. Accepts `HH:mm` or `h:mm AM/PM`. |
371
+ | `use12h` | `boolean` | `false` | Shows AM/PM controls while still emitting `HH:mm`. |
372
+
373
+ #### Splitter Inputs
374
+
375
+ | Input | Type | Default | Description |
376
+ |-------|------|---------|-------------|
377
+ | `size` | `string \| number` | `null` | Controlled size of the first pane in pixels or percent. |
378
+ | `initialSize` | `string \| number` | `'50%'` | Initial pane size when uncontrolled. |
379
+ | `min` | `number` | `60` | Minimum size of the first pane in pixels. |
380
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Split direction. |
381
+
382
+ #### Splitter Outputs
383
+
384
+ | Output | Type | Description |
385
+ |--------|------|-------------|
386
+ | `sizeChange` | `string` | Fired while the divider is dragged. |
387
+
243
388
  ### Inputs
244
389
 
245
390
  | Input | Type | Default | Description |
@@ -1,4 +1,4 @@
1
- import { GanttTask, GanttDependency, GanttConfig, ZoomLevel, GanttTaskChangeEvent, GanttTaskClickEvent, GanttDependencyClickEvent, GanttScrollEvent } from './models';
1
+ import { GanttTask, GanttDependency, GanttConfig, GanttColumnDef, ZoomLevel, GanttTaskChangeEvent, GanttTaskClickEvent, GanttDependencyClickEvent, GanttScrollEvent } from './models';
2
2
  import { FlatRow } from './services/gantt-layout.service';
3
3
  import { GanttKeyboardService } from './services/gantt-keyboard.service';
4
4
  import * as i0 from "@angular/core";
@@ -23,6 +23,7 @@ export declare class GanttChartComponent {
23
23
  scrollLeft: import("@angular/core").WritableSignal<number>;
24
24
  private scrollTop_;
25
25
  private sidebarWidthOverride;
26
+ private lastEmittedZoom;
26
27
  tooltipTask: import("@angular/core").WritableSignal<GanttTask | null>;
27
28
  tooltipX: import("@angular/core").WritableSignal<number>;
28
29
  tooltipY: import("@angular/core").WritableSignal<number>;
@@ -32,6 +33,7 @@ export declare class GanttChartComponent {
32
33
  rowTooltipX: import("@angular/core").WritableSignal<number>;
33
34
  rowTooltipY: import("@angular/core").WritableSignal<number>;
34
35
  mergedConfig: import("@angular/core").Signal<GanttConfig>;
36
+ sidebarColumns: import("@angular/core").Signal<GanttColumnDef[]>;
35
37
  private effectiveTasks;
36
38
  private flatRows;
37
39
  visibleRows: import("@angular/core").Signal<FlatRow[]>;
@@ -68,6 +70,7 @@ export declare class GanttChartComponent {
68
70
  path: string;
69
71
  key: string;
70
72
  }[]>;
73
+ constructor();
71
74
  onTimelineScroll(): void;
72
75
  onSplitBarDown(event: PointerEvent): void;
73
76
  onBarPointerDown(event: PointerEvent, task: GanttTask, mode: 'move' | 'resize-left' | 'resize-right'): void;
@@ -83,6 +86,10 @@ export declare class GanttChartComponent {
83
86
  collapseAll(): void;
84
87
  formatDateShort(date: Date): string;
85
88
  formatDateFull(date: Date): string;
89
+ isNameColumn(column: GanttColumnDef, index: number): boolean;
90
+ isDateColumn(column: GanttColumnDef): boolean;
91
+ isProgressColumn(column: GanttColumnDef): boolean;
92
+ getSidebarCellValue(row: FlatRow, column: GanttColumnDef): string;
86
93
  showTooltip(task: GanttTask, event: MouseEvent): void;
87
94
  hideTooltip(): void;
88
95
  getRowStart(row: FlatRow): Date;