ngx-core-components 0.1.0 → 0.1.2
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 +338 -13
- package/fesm2022/ngx-core-components-grid.mjs +740 -107
- package/fesm2022/ngx-core-components-grid.mjs.map +1 -1
- package/fesm2022/ngx-core-components-inputs.mjs +203 -60
- package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
- package/fesm2022/ngx-core-components-layout.mjs +48 -13
- package/fesm2022/ngx-core-components-layout.mjs.map +1 -1
- package/fesm2022/ngx-core-components-views.mjs +87 -15
- package/fesm2022/ngx-core-components-views.mjs.map +1 -1
- package/fesm2022/ngx-core-components.mjs.map +1 -1
- package/grid/data-grid/data-grid.component.d.ts +132 -14
- package/grid/public-api.d.ts +1 -1
- package/inputs/numeric-textbox/numeric-textbox.component.d.ts +6 -2
- package/inputs/time-picker/time-picker.component.d.ts +17 -7
- package/layout/splitter/splitter.component.d.ts +9 -2
- package/package.json +5 -5
- package/public-api.d.ts +2 -2
- package/views/list-view/list-view.component.d.ts +19 -1
- package/views/public-api.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-core-components.mjs","sources":["../../../projects/ngx-core-components/src/lib/tooltip/tooltip.directive.ts","../../../projects/ngx-core-components/src/lib/tooltip/popover.component.ts","../../../projects/ngx-core-components/src/public-api.ts","../../../projects/ngx-core-components/src/ngx-core-components.ts"],"sourcesContent":["import {\n Directive, input, signal, ElementRef, HostListener, inject,\n computed, effect, Renderer2\n} from '@angular/core';\n\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';\n\n@Directive({\n selector: '[ngxTooltip]',\n standalone: true,\n})\nexport class TooltipDirective {\n ngxTooltip = input<string>('');\n tooltipPosition = input<TooltipPosition>('top');\n\n private el = inject(ElementRef);\n private renderer = inject(Renderer2);\n private tooltipEl: HTMLElement | null = null;\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n const text = this.ngxTooltip();\n if (!text) return;\n this.showTooltip(text);\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.hideTooltip();\n }\n\n private showTooltip(text: string): void {\n this.hideTooltip();\n const tip = this.renderer.createElement('div') as HTMLElement;\n tip.className = 'ngx-tooltip';\n tip.setAttribute('role', 'tooltip');\n tip.textContent = text;\n document.body.appendChild(tip);\n this.tooltipEl = tip;\n\n const rect = this.el.nativeElement.getBoundingClientRect();\n const tipRect = tip.getBoundingClientRect();\n const pos = this.tooltipPosition();\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n const OFFSET = 8;\n let top = 0, left = 0;\n\n switch (pos) {\n case 'top':\n top = rect.top + scrollY - tipRect.height - OFFSET;\n left = rect.left + scrollX + rect.width / 2 - tipRect.width / 2;\n break;\n case 'bottom':\n top = rect.bottom + scrollY + OFFSET;\n left = rect.left + scrollX + rect.width / 2 - tipRect.width / 2;\n break;\n case 'left':\n top = rect.top + scrollY + rect.height / 2 - tipRect.height / 2;\n left = rect.left + scrollX - tipRect.width - OFFSET;\n break;\n case 'right':\n top = rect.top + scrollY + rect.height / 2 - tipRect.height / 2;\n left = rect.right + scrollX + OFFSET;\n break;\n }\n\n // Auto-flip if outside viewport\n if (top < 0) top = rect.bottom + scrollY + OFFSET;\n if (left < 0) left = 4;\n if (left + tipRect.width > window.innerWidth) left = window.innerWidth - tipRect.width - 4;\n\n tip.style.top = top + 'px';\n tip.style.left = left + 'px';\n tip.style.setProperty('--pos', pos);\n requestAnimationFrame(() => { if (tip) tip.classList.add('visible'); });\n }\n\n private hideTooltip(): void {\n if (this.tooltipEl) {\n this.tooltipEl.remove();\n this.tooltipEl = null;\n }\n }\n}\n","import {\n Component, ChangeDetectionStrategy, input, output, signal,\n HostListener, ElementRef, inject\n} from '@angular/core';\n\n@Component({\n selector: 'ngx-popover',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ngx-popover-wrapper\">\n <!-- Trigger slot -->\n <div class=\"popover-trigger\" (click)=\"toggle()\">\n <ng-content select=\"[popoverTrigger]\"/>\n </div>\n\n <!-- Popup -->\n @if (isOpen()) {\n <div class=\"popover-panel\" [class]=\"'popover-' + position()\">\n @if (title()) {\n <div class=\"popover-header\">\n <span class=\"popover-title\">{{ title() }}</span>\n <button class=\"popover-close\" (click)=\"close()\">✕</button>\n </div>\n }\n <div class=\"popover-body\">\n <ng-content select=\"[popoverBody]\"/>\n </div>\n </div>\n }\n </div>\n `,\n styles: [`\n :host {\n display: inline-block;\n }\n .ngx-popover-wrapper { position: relative; display: inline-block; }\n .popover-trigger { cursor: pointer; }\n .popover-panel {\n position: absolute; z-index: 1000; min-width: 200px; max-width: 320px;\n background: var(--ngx-popover-bg, #fff); border: 1px solid var(--ngx-popover-border, #dee2e6);\n border-radius: var(--ngx-popover-radius, 6px); box-shadow: var(--ngx-popover-shadow, 0 4px 16px rgba(0,0,0,0.12));\n animation: fadeIn 0.12s ease;\n }\n @keyframes fadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }\n .popover-bottom { top: calc(100% + 8px); left: 50%; transform: translateX(-50%); }\n .popover-top { bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); }\n .popover-right { left: calc(100% + 8px); top: 50%; transform: translateY(-50%); }\n .popover-left { right: calc(100% + 8px); top: 50%; transform: translateY(-50%); }\n .popover-header {\n display: flex; align-items: center; justify-content: space-between;\n padding: 10px 14px 8px; border-bottom: 1px solid var(--ngx-popover-border, #dee2e6);\n }\n .popover-title { font-size: 14px; font-weight: 600; color: #212529; }\n .popover-close {\n background: none; border: none; cursor: pointer; font-size: 12px;\n color: #6c757d; padding: 2px 4px; border-radius: 3px;\n }\n .popover-close:hover { background: #f1f3f5; }\n .popover-body { padding: 12px 14px; font-size: 13px; color: #495057; }\n `]\n})\nexport class PopoverComponent {\n title = input<string>('');\n position = input<'top' | 'bottom' | 'left' | 'right'>('bottom');\n\n isOpen = signal(false);\n toggle(): void { this.isOpen.update(v => !v); }\n close(): void { this.isOpen.set(false); }\n\n private el = inject(ElementRef);\n\n @HostListener('document:click', ['$event'])\n onDocClick(e: MouseEvent): void {\n if (!this.el.nativeElement.contains(e.target)) this.isOpen.set(false);\n }\n}\n","/*\n * Public API Surface of ngx-core-components\n *\n * Components are organized into secondary entry points.\n * All exports are re-exported here for convenience/backward compatibility.\n */\n\n// ===== Tooltip & Popover (primary entry only) =====\nexport { TooltipDirective } from './lib/tooltip/tooltip.directive';\nexport type { TooltipPosition } from './lib/tooltip/tooltip.directive';\nexport { PopoverComponent } from './lib/tooltip/popover.component';\n\n// ===== Input Components (also available via ngx-core-components/inputs) =====\nexport { TextBoxComponent } from 'ngx-core-components/inputs';\nexport { CheckboxComponent } from 'ngx-core-components/inputs';\nexport { RadioGroupComponent } from 'ngx-core-components/inputs';\nexport type { RadioOption } from 'ngx-core-components/inputs';\nexport { DropdownComponent } from 'ngx-core-components/inputs';\nexport type { DropdownOption } from 'ngx-core-components/inputs';\nexport { MultiSelectComponent } from 'ngx-core-components/inputs';\nexport { AutocompleteComponent } from 'ngx-core-components/inputs';\nexport { DatePickerComponent } from 'ngx-core-components/inputs';\n\n// ===== Charts & Gantt (also available via ngx-core-components/charts) =====\nexport { BarChartComponent } from 'ngx-core-components/charts';\nexport { LineChartComponent } from 'ngx-core-components/charts';\nexport { PieChartComponent } from 'ngx-core-components/charts';\nexport { SparklineComponent } from 'ngx-core-components/charts';\nexport type { ChartSeries, ChartDataPoint } from 'ngx-core-components/charts';\nexport { CHART_COLORS } from 'ngx-core-components/charts';\nexport { GanttChartComponent } from 'ngx-core-components/charts';\nexport type { FlatRow } from 'ngx-core-components/charts';\nexport { GanttScaleService } from 'ngx-core-components/charts';\n// Gantt model types\nexport type {\n GanttTask,\n GanttDependency,\n GanttConfig,\n GanttColumnDef,\n GanttTaskChangeEvent,\n GanttTaskClickEvent,\n GanttDependencyClickEvent,\n GanttScrollEvent,\n} from 'ngx-core-components/charts';\nexport { ZoomLevel, DependencyType } from 'ngx-core-components/charts';\n\n// ===== Data Grid (also available via ngx-core-components/grid) =====\nexport { DataGridComponent } from 'ngx-core-components/grid';\nexport type {\n GridColumnDef,\n GridSortState,\n GridPageChangeEvent,\n GridSortChangeEvent,\n GridRowClickEvent,\n} from 'ngx-core-components/grid';\n\n// ===== Hierarchical Views (also available via ngx-core-components/views) =====\nexport { TreeViewComponent } from 'ngx-core-components/views';\nexport type { TreeNode, TreeNodeEvent } from 'ngx-core-components/views';\nexport { ListViewComponent } from 'ngx-core-components/views';\nexport type {\n ListViewItemClickEvent,\n ListViewSelectionEvent,\n} from 'ngx-core-components/views';\n\n// ===== Dialog (also available via ngx-core-components/dialog) =====\nexport { DialogService } from 'ngx-core-components/dialog';\nexport type { DialogRef, DialogConfig } from 'ngx-core-components/dialog';\nexport { DialogContainerComponent } from 'ngx-core-components/dialog';\n\n// ===== Buttons (also available via ngx-core-components/buttons) =====\nexport { ButtonComponent, ButtonGroupComponent, ChipComponent, ChipListComponent, SplitButtonComponent, DropDownButtonComponent } from 'ngx-core-components/buttons';\nexport type { ButtonVariant, ButtonSize, ButtonShape, ChipVariant, SplitButtonItem, DropDownButtonItem } from 'ngx-core-components/buttons';\n\n// ===== Layout (also available via ngx-core-components/layout) =====\nexport { CardComponent, TabStripComponent, TabComponent, AccordionComponent, StepperComponent, SplitterComponent } from 'ngx-core-components/layout';\nexport type { CardVariant, AccordionItem, StepperStep } from 'ngx-core-components/layout';\n\n// ===== Feedback (also available via ngx-core-components/feedback) =====\nexport { BadgeComponent, ProgressBarComponent, SkeletonComponent, NotificationService, NotificationContainerComponent } from 'ngx-core-components/feedback';\nexport type { BadgeVariant, BadgePosition, ProgressVariant, SkeletonShape, NotificationOptions, NotificationType, NotificationPosition } from 'ngx-core-components/feedback';\n\n// ===== Navigation (also available via ngx-core-components/navigation) =====\nexport { BreadcrumbComponent, MenuComponent } from 'ngx-core-components/navigation';\nexport type { BreadcrumbItem, MenuItem } from 'ngx-core-components/navigation';\n\n// ===== Additional Inputs (also available via ngx-core-components/inputs) =====\nexport { SliderComponent, SwitchComponent, RatingComponent, NumericTextBoxComponent, TextareaComponent, ColorPickerComponent, TimePickerComponent, DateRangePickerComponent } from 'ngx-core-components/inputs';\n\n// ===== Barcodes (also available via ngx-core-components/barcodes) =====\nexport { QrCodeComponent, BarcodeComponent } from 'ngx-core-components/barcodes';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAWa,gBAAgB,CAAA;AAC3B,IAAA,UAAU,GAAG,KAAK,CAAS,EAAE,CAAC;AAC9B,IAAA,eAAe,GAAG,KAAK,CAAkB,KAAK,CAAC;AAEvC,IAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AACvB,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;IAC5B,SAAS,GAAuB,IAAI;IAG5C,YAAY,GAAA;AACV,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE;AAC9B,QAAA,IAAI,CAAC,IAAI;YAAE;AACX,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACxB;IAGA,YAAY,GAAA;QACV,IAAI,CAAC,WAAW,EAAE;IACpB;AAEQ,IAAA,WAAW,CAAC,IAAY,EAAA;QAC9B,IAAI,CAAC,WAAW,EAAE;QAClB,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAgB;AAC7D,QAAA,GAAG,CAAC,SAAS,GAAG,aAAa;AAC7B,QAAA,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC;AACnC,QAAA,GAAG,CAAC,WAAW,GAAG,IAAI;AACtB,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG;QAEpB,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,qB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AAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,gBAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EArDjB;;;;;;;;;;;;;;;;;;;;;;AAsBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2tCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FA+BU,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAzD5B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,cACX,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;AAsBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2tCAAA,CAAA,EAAA;8BA0CD,UAAU,EAAA,CAAA;sBADT,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;;ACxE5C;;;;;AAKG;AAEH;;ACPA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-core-components.mjs","sources":["../../../projects/ngx-core-components/src/lib/tooltip/tooltip.directive.ts","../../../projects/ngx-core-components/src/lib/tooltip/popover.component.ts","../../../projects/ngx-core-components/src/public-api.ts","../../../projects/ngx-core-components/src/ngx-core-components.ts"],"sourcesContent":["import {\n Directive, input, signal, ElementRef, HostListener, inject,\n computed, effect, Renderer2\n} from '@angular/core';\n\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';\n\n@Directive({\n selector: '[ngxTooltip]',\n standalone: true,\n})\nexport class TooltipDirective {\n ngxTooltip = input<string>('');\n tooltipPosition = input<TooltipPosition>('top');\n\n private el = inject(ElementRef);\n private renderer = inject(Renderer2);\n private tooltipEl: HTMLElement | null = null;\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n const text = this.ngxTooltip();\n if (!text) return;\n this.showTooltip(text);\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n this.hideTooltip();\n }\n\n private showTooltip(text: string): void {\n this.hideTooltip();\n const tip = this.renderer.createElement('div') as HTMLElement;\n tip.className = 'ngx-tooltip';\n tip.setAttribute('role', 'tooltip');\n tip.textContent = text;\n document.body.appendChild(tip);\n this.tooltipEl = tip;\n\n const rect = this.el.nativeElement.getBoundingClientRect();\n const tipRect = tip.getBoundingClientRect();\n const pos = this.tooltipPosition();\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n const OFFSET = 8;\n let top = 0, left = 0;\n\n switch (pos) {\n case 'top':\n top = rect.top + scrollY - tipRect.height - OFFSET;\n left = rect.left + scrollX + rect.width / 2 - tipRect.width / 2;\n break;\n case 'bottom':\n top = rect.bottom + scrollY + OFFSET;\n left = rect.left + scrollX + rect.width / 2 - tipRect.width / 2;\n break;\n case 'left':\n top = rect.top + scrollY + rect.height / 2 - tipRect.height / 2;\n left = rect.left + scrollX - tipRect.width - OFFSET;\n break;\n case 'right':\n top = rect.top + scrollY + rect.height / 2 - tipRect.height / 2;\n left = rect.right + scrollX + OFFSET;\n break;\n }\n\n // Auto-flip if outside viewport\n if (top < 0) top = rect.bottom + scrollY + OFFSET;\n if (left < 0) left = 4;\n if (left + tipRect.width > window.innerWidth) left = window.innerWidth - tipRect.width - 4;\n\n tip.style.top = top + 'px';\n tip.style.left = left + 'px';\n tip.style.setProperty('--pos', pos);\n requestAnimationFrame(() => { if (tip) tip.classList.add('visible'); });\n }\n\n private hideTooltip(): void {\n if (this.tooltipEl) {\n this.tooltipEl.remove();\n this.tooltipEl = null;\n }\n }\n}\n","import {\n Component, ChangeDetectionStrategy, input, output, signal,\n HostListener, ElementRef, inject\n} from '@angular/core';\n\n@Component({\n selector: 'ngx-popover',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ngx-popover-wrapper\">\n <!-- Trigger slot -->\n <div class=\"popover-trigger\" (click)=\"toggle()\">\n <ng-content select=\"[popoverTrigger]\"/>\n </div>\n\n <!-- Popup -->\n @if (isOpen()) {\n <div class=\"popover-panel\" [class]=\"'popover-' + position()\">\n @if (title()) {\n <div class=\"popover-header\">\n <span class=\"popover-title\">{{ title() }}</span>\n <button class=\"popover-close\" (click)=\"close()\">✕</button>\n </div>\n }\n <div class=\"popover-body\">\n <ng-content select=\"[popoverBody]\"/>\n </div>\n </div>\n }\n </div>\n `,\n styles: [`\n :host {\n display: inline-block;\n }\n .ngx-popover-wrapper { position: relative; display: inline-block; }\n .popover-trigger { cursor: pointer; }\n .popover-panel {\n position: absolute; z-index: 1000; min-width: 200px; max-width: 320px;\n background: var(--ngx-popover-bg, #fff); border: 1px solid var(--ngx-popover-border, #dee2e6);\n border-radius: var(--ngx-popover-radius, 6px); box-shadow: var(--ngx-popover-shadow, 0 4px 16px rgba(0,0,0,0.12));\n animation: fadeIn 0.12s ease;\n }\n @keyframes fadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }\n .popover-bottom { top: calc(100% + 8px); left: 50%; transform: translateX(-50%); }\n .popover-top { bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); }\n .popover-right { left: calc(100% + 8px); top: 50%; transform: translateY(-50%); }\n .popover-left { right: calc(100% + 8px); top: 50%; transform: translateY(-50%); }\n .popover-header {\n display: flex; align-items: center; justify-content: space-between;\n padding: 10px 14px 8px; border-bottom: 1px solid var(--ngx-popover-border, #dee2e6);\n }\n .popover-title { font-size: 14px; font-weight: 600; color: #212529; }\n .popover-close {\n background: none; border: none; cursor: pointer; font-size: 12px;\n color: #6c757d; padding: 2px 4px; border-radius: 3px;\n }\n .popover-close:hover { background: #f1f3f5; }\n .popover-body { padding: 12px 14px; font-size: 13px; color: #495057; }\n `]\n})\nexport class PopoverComponent {\n title = input<string>('');\n position = input<'top' | 'bottom' | 'left' | 'right'>('bottom');\n\n isOpen = signal(false);\n toggle(): void { this.isOpen.update(v => !v); }\n close(): void { this.isOpen.set(false); }\n\n private el = inject(ElementRef);\n\n @HostListener('document:click', ['$event'])\n onDocClick(e: MouseEvent): void {\n if (!this.el.nativeElement.contains(e.target)) this.isOpen.set(false);\n }\n}\n","/*\n * Public API Surface of ngx-core-components\n *\n * Components are organized into secondary entry points.\n * All exports are re-exported here for convenience/backward compatibility.\n */\n\n// ===== Tooltip & Popover (primary entry only) =====\nexport { TooltipDirective } from './lib/tooltip/tooltip.directive';\nexport type { TooltipPosition } from './lib/tooltip/tooltip.directive';\nexport { PopoverComponent } from './lib/tooltip/popover.component';\n\n// ===== Input Components (also available via ngx-core-components/inputs) =====\nexport { TextBoxComponent } from 'ngx-core-components/inputs';\nexport { CheckboxComponent } from 'ngx-core-components/inputs';\nexport { RadioGroupComponent } from 'ngx-core-components/inputs';\nexport type { RadioOption } from 'ngx-core-components/inputs';\nexport { DropdownComponent } from 'ngx-core-components/inputs';\nexport type { DropdownOption } from 'ngx-core-components/inputs';\nexport { MultiSelectComponent } from 'ngx-core-components/inputs';\nexport { AutocompleteComponent } from 'ngx-core-components/inputs';\nexport { DatePickerComponent } from 'ngx-core-components/inputs';\n\n// ===== Charts & Gantt (also available via ngx-core-components/charts) =====\nexport { BarChartComponent } from 'ngx-core-components/charts';\nexport { LineChartComponent } from 'ngx-core-components/charts';\nexport { PieChartComponent } from 'ngx-core-components/charts';\nexport { SparklineComponent } from 'ngx-core-components/charts';\nexport type { ChartSeries, ChartDataPoint } from 'ngx-core-components/charts';\nexport { CHART_COLORS } from 'ngx-core-components/charts';\nexport { GanttChartComponent } from 'ngx-core-components/charts';\nexport type { FlatRow } from 'ngx-core-components/charts';\nexport { GanttScaleService } from 'ngx-core-components/charts';\n// Gantt model types\nexport type {\n GanttTask,\n GanttDependency,\n GanttConfig,\n GanttColumnDef,\n GanttTaskChangeEvent,\n GanttTaskClickEvent,\n GanttDependencyClickEvent,\n GanttScrollEvent,\n} from 'ngx-core-components/charts';\nexport { ZoomLevel, DependencyType } from 'ngx-core-components/charts';\n\n// ===== Data Grid (also available via ngx-core-components/grid) =====\nexport { DataGridComponent } from 'ngx-core-components/grid';\nexport type {\n GridColumnDef,\n GridFilterState,\n GridGroupState,\n GridGroupResult,\n GridSortState,\n GridPageChangeEvent,\n GridSortChangeEvent,\n GridFilterChangeEvent,\n GridGroupChangeEvent,\n GridDataStateChangeEvent,\n GridRowClickEvent,\n GridRowUpdateEvent,\n GridHeaderTemplateContext,\n GridCellTemplateContext,\n GridRowTemplateContext,\n GridDetailTemplateContext,\n} from 'ngx-core-components/grid';\n\n// ===== Hierarchical Views (also available via ngx-core-components/views) =====\nexport { TreeViewComponent } from 'ngx-core-components/views';\nexport type { TreeNode, TreeNodeEvent } from 'ngx-core-components/views';\nexport { ListViewComponent } from 'ngx-core-components/views';\nexport type {\n ListViewItemClickEvent,\n ListViewSelectionEvent,\n ListViewPageChangeEvent,\n} from 'ngx-core-components/views';\n\n// ===== Dialog (also available via ngx-core-components/dialog) =====\nexport { DialogService } from 'ngx-core-components/dialog';\nexport type { DialogRef, DialogConfig } from 'ngx-core-components/dialog';\nexport { DialogContainerComponent } from 'ngx-core-components/dialog';\n\n// ===== Buttons (also available via ngx-core-components/buttons) =====\nexport { ButtonComponent, ButtonGroupComponent, ChipComponent, ChipListComponent, SplitButtonComponent, DropDownButtonComponent } from 'ngx-core-components/buttons';\nexport type { ButtonVariant, ButtonSize, ButtonShape, ChipVariant, SplitButtonItem, DropDownButtonItem } from 'ngx-core-components/buttons';\n\n// ===== Layout (also available via ngx-core-components/layout) =====\nexport { CardComponent, TabStripComponent, TabComponent, AccordionComponent, StepperComponent, SplitterComponent } from 'ngx-core-components/layout';\nexport type { CardVariant, AccordionItem, StepperStep } from 'ngx-core-components/layout';\n\n// ===== Feedback (also available via ngx-core-components/feedback) =====\nexport { BadgeComponent, ProgressBarComponent, SkeletonComponent, NotificationService, NotificationContainerComponent } from 'ngx-core-components/feedback';\nexport type { BadgeVariant, BadgePosition, ProgressVariant, SkeletonShape, NotificationOptions, NotificationType, NotificationPosition } from 'ngx-core-components/feedback';\n\n// ===== Navigation (also available via ngx-core-components/navigation) =====\nexport { BreadcrumbComponent, MenuComponent } from 'ngx-core-components/navigation';\nexport type { BreadcrumbItem, MenuItem } from 'ngx-core-components/navigation';\n\n// ===== Additional Inputs (also available via ngx-core-components/inputs) =====\nexport { SliderComponent, SwitchComponent, RatingComponent, NumericTextBoxComponent, TextareaComponent, ColorPickerComponent, TimePickerComponent, DateRangePickerComponent } from 'ngx-core-components/inputs';\n\n// ===== Barcodes (also available via ngx-core-components/barcodes) =====\nexport { QrCodeComponent, BarcodeComponent } from 'ngx-core-components/barcodes';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAWa,gBAAgB,CAAA;AAC3B,IAAA,UAAU,GAAG,KAAK,CAAS,EAAE,CAAC;AAC9B,IAAA,eAAe,GAAG,KAAK,CAAkB,KAAK,CAAC;AAEvC,IAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AACvB,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;IAC5B,SAAS,GAAuB,IAAI;IAG5C,YAAY,GAAA;AACV,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE;AAC9B,Q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AAA,EAAA,CAAA,2tCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FA+BU,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAzD5B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,cACX,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;AAsBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2tCAAA,CAAA,EAAA;8BA0CD,UAAU,EAAA,CAAA;sBADT,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;;ACxE5C;;;;;AAKG;AAEH;;ACPA;;AAEG;;;;"}
|
|
@@ -1,16 +1,30 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
|
-
export interface GridColumnDef {
|
|
3
|
+
export interface GridColumnDef<T = Record<string, unknown>> {
|
|
3
4
|
field: string;
|
|
4
5
|
title: string;
|
|
5
6
|
width?: number;
|
|
6
7
|
sortable?: boolean;
|
|
7
8
|
filterable?: boolean;
|
|
9
|
+
groupable?: boolean;
|
|
10
|
+
editable?: boolean;
|
|
8
11
|
align?: 'left' | 'center' | 'right';
|
|
12
|
+
headerTemplate?: TemplateRef<GridHeaderTemplateContext<T>>;
|
|
13
|
+
cellTemplate?: TemplateRef<GridCellTemplateContext<T>>;
|
|
9
14
|
}
|
|
10
15
|
export interface GridSortState {
|
|
11
16
|
field: string;
|
|
12
17
|
dir: 'asc' | 'desc';
|
|
13
18
|
}
|
|
19
|
+
export interface GridFilterState {
|
|
20
|
+
field: string;
|
|
21
|
+
value: string;
|
|
22
|
+
operator?: 'contains' | 'startsWith' | 'endsWith' | 'eq';
|
|
23
|
+
}
|
|
24
|
+
export interface GridGroupState {
|
|
25
|
+
field: string;
|
|
26
|
+
dir?: 'asc' | 'desc';
|
|
27
|
+
}
|
|
14
28
|
export interface GridPageChangeEvent {
|
|
15
29
|
page: number;
|
|
16
30
|
pageSize: number;
|
|
@@ -18,44 +32,148 @@ export interface GridPageChangeEvent {
|
|
|
18
32
|
export interface GridSortChangeEvent {
|
|
19
33
|
sort: GridSortState | null;
|
|
20
34
|
}
|
|
35
|
+
export interface GridFilterChangeEvent {
|
|
36
|
+
filters: GridFilterState[];
|
|
37
|
+
}
|
|
38
|
+
export interface GridGroupChangeEvent {
|
|
39
|
+
group: GridGroupState | null;
|
|
40
|
+
}
|
|
41
|
+
export interface GridDataStateChangeEvent {
|
|
42
|
+
page: number;
|
|
43
|
+
pageSize: number;
|
|
44
|
+
sort: GridSortState | null;
|
|
45
|
+
filters: GridFilterState[];
|
|
46
|
+
group: GridGroupState | null;
|
|
47
|
+
}
|
|
21
48
|
export interface GridRowClickEvent<T = Record<string, unknown>> {
|
|
22
49
|
row: T;
|
|
23
50
|
index: number;
|
|
24
51
|
}
|
|
52
|
+
export interface GridRowUpdateEvent<T = Record<string, unknown>> {
|
|
53
|
+
previous: T;
|
|
54
|
+
updated: T;
|
|
55
|
+
index: number;
|
|
56
|
+
}
|
|
57
|
+
export interface GridGroupResult<T = Record<string, unknown>> {
|
|
58
|
+
key: string;
|
|
59
|
+
value: unknown;
|
|
60
|
+
field: string;
|
|
61
|
+
count: number;
|
|
62
|
+
items: T[];
|
|
63
|
+
}
|
|
64
|
+
export interface GridHeaderTemplateContext<T = Record<string, unknown>> {
|
|
65
|
+
$implicit: GridColumnDef<T>;
|
|
66
|
+
column: GridColumnDef<T>;
|
|
67
|
+
sort: GridSortState | null;
|
|
68
|
+
filters: GridFilterState[];
|
|
69
|
+
isServerMode: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface GridCellTemplateContext<T = Record<string, unknown>> {
|
|
72
|
+
$implicit: unknown;
|
|
73
|
+
value: unknown;
|
|
74
|
+
row: T;
|
|
75
|
+
column: GridColumnDef<T>;
|
|
76
|
+
index: number;
|
|
77
|
+
editing: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface GridRowTemplateContext<T = Record<string, unknown>> {
|
|
80
|
+
$implicit: T;
|
|
81
|
+
row: T;
|
|
82
|
+
index: number;
|
|
83
|
+
editing: boolean;
|
|
84
|
+
expanded: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface GridDetailTemplateContext<T = Record<string, unknown>> {
|
|
87
|
+
$implicit: T;
|
|
88
|
+
row: T;
|
|
89
|
+
index: number;
|
|
90
|
+
}
|
|
25
91
|
export declare class DataGridComponent<T extends object = Record<string, unknown>> {
|
|
26
92
|
data: import("@angular/core").InputSignal<T[]>;
|
|
27
|
-
columns: import("@angular/core").InputSignal<GridColumnDef[]>;
|
|
93
|
+
columns: import("@angular/core").InputSignal<GridColumnDef<T>[]>;
|
|
28
94
|
pageSize: import("@angular/core").InputSignal<number>;
|
|
95
|
+
page: import("@angular/core").InputSignal<number>;
|
|
96
|
+
total: import("@angular/core").InputSignal<number>;
|
|
29
97
|
selectable: import("@angular/core").InputSignal<boolean>;
|
|
30
98
|
striped: import("@angular/core").InputSignal<boolean>;
|
|
31
99
|
loading: import("@angular/core").InputSignal<boolean>;
|
|
100
|
+
editable: import("@angular/core").InputSignal<boolean>;
|
|
101
|
+
sortMode: import("@angular/core").InputSignal<"client" | "server">;
|
|
102
|
+
filterMode: import("@angular/core").InputSignal<"client" | "server">;
|
|
103
|
+
groupMode: import("@angular/core").InputSignal<"client" | "server">;
|
|
104
|
+
pagingMode: import("@angular/core").InputSignal<"client" | "server">;
|
|
105
|
+
groupBy: import("@angular/core").InputSignal<GridGroupState | null>;
|
|
106
|
+
groupedData: import("@angular/core").InputSignal<GridGroupResult<T>[]>;
|
|
107
|
+
headerTemplate: import("@angular/core").InputSignal<TemplateRef<GridHeaderTemplateContext<T>> | null>;
|
|
108
|
+
cellTemplate: import("@angular/core").InputSignal<TemplateRef<GridCellTemplateContext<T>> | null>;
|
|
109
|
+
rowTemplate: import("@angular/core").InputSignal<TemplateRef<GridRowTemplateContext<T>> | null>;
|
|
110
|
+
detailRowTemplate: import("@angular/core").InputSignal<TemplateRef<GridDetailTemplateContext<T>> | null>;
|
|
32
111
|
rowClick: import("@angular/core").OutputEmitterRef<GridRowClickEvent<T>>;
|
|
33
112
|
selectionChange: import("@angular/core").OutputEmitterRef<T[]>;
|
|
34
113
|
sortChange: import("@angular/core").OutputEmitterRef<GridSortChangeEvent>;
|
|
114
|
+
filterChange: import("@angular/core").OutputEmitterRef<GridFilterChangeEvent>;
|
|
115
|
+
groupChange: import("@angular/core").OutputEmitterRef<GridGroupChangeEvent>;
|
|
35
116
|
pageChange: import("@angular/core").OutputEmitterRef<GridPageChangeEvent>;
|
|
117
|
+
dataStateChange: import("@angular/core").OutputEmitterRef<GridDataStateChangeEvent>;
|
|
118
|
+
rowUpdate: import("@angular/core").OutputEmitterRef<GridRowUpdateEvent<T>>;
|
|
36
119
|
sortState: import("@angular/core").WritableSignal<GridSortState | null>;
|
|
37
120
|
currentPage: import("@angular/core").WritableSignal<number>;
|
|
38
|
-
selectedRows: import("@angular/core").WritableSignal<Set<
|
|
121
|
+
selectedRows: import("@angular/core").WritableSignal<Set<string>>;
|
|
122
|
+
expandedRows: import("@angular/core").WritableSignal<Set<string>>;
|
|
123
|
+
collapsedGroups: import("@angular/core").WritableSignal<Set<string>>;
|
|
124
|
+
editingRowKey: import("@angular/core").WritableSignal<string | null>;
|
|
125
|
+
editingDraft: import("@angular/core").WritableSignal<Record<string, unknown>>;
|
|
39
126
|
private filters;
|
|
40
|
-
|
|
127
|
+
constructor();
|
|
41
128
|
hasFilterableColumns: import("@angular/core").Signal<boolean>;
|
|
42
|
-
|
|
43
|
-
|
|
129
|
+
isAnyServerMode: import("@angular/core").Signal<boolean>;
|
|
130
|
+
showDetailToggle: import("@angular/core").Signal<boolean>;
|
|
131
|
+
activeFilters: import("@angular/core").Signal<GridFilterState[]>;
|
|
132
|
+
private clientFilteredData;
|
|
133
|
+
private clientSortedData;
|
|
134
|
+
private baseFlatData;
|
|
135
|
+
totalItems: import("@angular/core").Signal<number>;
|
|
44
136
|
totalPages: import("@angular/core").Signal<number>;
|
|
45
|
-
|
|
46
|
-
|
|
137
|
+
flatRenderedRows: import("@angular/core").Signal<T[]>;
|
|
138
|
+
groupedRows: import("@angular/core").Signal<GridGroupResult<T>[]>;
|
|
47
139
|
allSelected: import("@angular/core").Signal<boolean>;
|
|
48
140
|
someSelected: import("@angular/core").Signal<boolean>;
|
|
141
|
+
pagerRangeStart: import("@angular/core").Signal<number>;
|
|
142
|
+
pagerRangeEnd: import("@angular/core").Signal<number>;
|
|
143
|
+
pageNumbers: import("@angular/core").Signal<number[]>;
|
|
144
|
+
renderColumnCount: import("@angular/core").Signal<number>;
|
|
145
|
+
showPager: import("@angular/core").Signal<boolean>;
|
|
49
146
|
getFilter(field: string): string;
|
|
50
|
-
setFilter(field: string,
|
|
51
|
-
onSort(
|
|
52
|
-
|
|
147
|
+
setFilter(field: string, value: string): void;
|
|
148
|
+
onSort(column: GridColumnDef<T>): void;
|
|
149
|
+
setGroup(state: GridGroupState | null): void;
|
|
150
|
+
toggleGroup(key: string): void;
|
|
151
|
+
isGroupCollapsed(key: string): boolean;
|
|
152
|
+
goPage(page: number): void;
|
|
53
153
|
onRowClick(row: T, index: number): void;
|
|
54
154
|
isRowSelected(row: T): boolean;
|
|
55
155
|
toggleRow(row: T): void;
|
|
56
156
|
toggleAll(): void;
|
|
57
|
-
|
|
58
|
-
|
|
157
|
+
toggleDetail(row: T): void;
|
|
158
|
+
isExpanded(row: T): boolean;
|
|
159
|
+
beginEdit(row: T, _index: number): void;
|
|
160
|
+
isEditing(row: T): boolean;
|
|
161
|
+
updateDraft(field: string, value: unknown): void;
|
|
162
|
+
getDraftValue(row: T, field: string): unknown;
|
|
163
|
+
saveEdit(row: T, index: number): void;
|
|
164
|
+
cancelEdit(): void;
|
|
165
|
+
getCellValue(row: T, field: string): unknown;
|
|
166
|
+
resolveHeaderTemplate(column: GridColumnDef<T>): TemplateRef<GridHeaderTemplateContext<T>> | null;
|
|
167
|
+
resolveCellTemplate(column: GridColumnDef<T>): TemplateRef<GridCellTemplateContext<T>> | null;
|
|
168
|
+
toStringSafe(value: unknown): string;
|
|
169
|
+
getKey(row: T, index: number): string;
|
|
170
|
+
private hasGrouping;
|
|
171
|
+
private paginateRows;
|
|
172
|
+
private compareValues;
|
|
173
|
+
private visibleSelectionRows;
|
|
174
|
+
private resolveSelectedRows;
|
|
175
|
+
private keyOf;
|
|
176
|
+
private emitDataState;
|
|
59
177
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataGridComponent<any>, never>;
|
|
60
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DataGridComponent<any>, "ngx-data-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "striped": { "alias": "striped"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "rowClick": "rowClick"; "selectionChange": "selectionChange"; "sortChange": "sortChange"; "pageChange": "pageChange"; }, never, never, true, never>;
|
|
178
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataGridComponent<any>, "ngx-data-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "striped": { "alias": "striped"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "sortMode": { "alias": "sortMode"; "required": false; "isSignal": true; }; "filterMode": { "alias": "filterMode"; "required": false; "isSignal": true; }; "groupMode": { "alias": "groupMode"; "required": false; "isSignal": true; }; "pagingMode": { "alias": "pagingMode"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "groupedData": { "alias": "groupedData"; "required": false; "isSignal": true; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; "isSignal": true; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; "isSignal": true; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; "isSignal": true; }; "detailRowTemplate": { "alias": "detailRowTemplate"; "required": false; "isSignal": true; }; }, { "rowClick": "rowClick"; "selectionChange": "selectionChange"; "sortChange": "sortChange"; "filterChange": "filterChange"; "groupChange": "groupChange"; "pageChange": "pageChange"; "dataStateChange": "dataStateChange"; "rowUpdate": "rowUpdate"; }, never, never, true, never>;
|
|
61
179
|
}
|
package/grid/public-api.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { DataGridComponent } from './data-grid/data-grid.component';
|
|
2
|
-
export type { GridColumnDef, GridSortState, GridPageChangeEvent, GridSortChangeEvent, GridRowClickEvent, } from './data-grid/data-grid.component';
|
|
2
|
+
export type { GridColumnDef, GridFilterState, GridGroupState, GridGroupResult, GridSortState, GridPageChangeEvent, GridSortChangeEvent, GridFilterChangeEvent, GridGroupChangeEvent, GridDataStateChangeEvent, GridRowClickEvent, GridRowUpdateEvent, GridHeaderTemplateContext, GridCellTemplateContext, GridRowTemplateContext, GridDetailTemplateContext, } from './data-grid/data-grid.component';
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class NumericTextBoxComponent {
|
|
3
3
|
label: import("@angular/core").InputSignal<string>;
|
|
4
|
+
value: import("@angular/core").InputSignal<number>;
|
|
4
5
|
min: import("@angular/core").InputSignal<number>;
|
|
5
6
|
max: import("@angular/core").InputSignal<number>;
|
|
6
7
|
step: import("@angular/core").InputSignal<number>;
|
|
7
|
-
|
|
8
|
+
currentValue: import("@angular/core").WritableSignal<number>;
|
|
8
9
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
9
10
|
placeholder: import("@angular/core").InputSignal<string>;
|
|
10
11
|
prefix: import("@angular/core").InputSignal<string>;
|
|
11
12
|
suffix: import("@angular/core").InputSignal<string>;
|
|
12
13
|
focused: import("@angular/core").WritableSignal<boolean>;
|
|
13
14
|
valueChange: import("@angular/core").OutputEmitterRef<number>;
|
|
15
|
+
constructor();
|
|
14
16
|
onChange(e: Event): void;
|
|
17
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
15
18
|
spin(dir: 1 | -1): void;
|
|
16
19
|
setValue(v: number): void;
|
|
20
|
+
private clamp;
|
|
17
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumericTextBoxComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NumericTextBoxComponent, "ngx-numeric-textbox", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "prefix": { "alias": "prefix"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NumericTextBoxComponent, "ngx-numeric-textbox", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "prefix": { "alias": "prefix"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
19
23
|
}
|
|
@@ -2,19 +2,29 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export declare class TimePickerComponent {
|
|
3
3
|
label: import("@angular/core").InputSignal<string>;
|
|
4
4
|
use12h: import("@angular/core").InputSignal<boolean>;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
value: import("@angular/core").InputSignal<string>;
|
|
6
|
+
hour24: import("@angular/core").WritableSignal<number>;
|
|
7
|
+
minute: import("@angular/core").WritableSignal<number>;
|
|
8
8
|
focused: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
+
textValue: import("@angular/core").WritableSignal<string>;
|
|
9
10
|
timeChange: import("@angular/core").OutputEmitterRef<string>;
|
|
10
|
-
hours: number[]
|
|
11
|
+
hours: import("@angular/core").Signal<number[]>;
|
|
12
|
+
period: import("@angular/core").Signal<"AM" | "PM">;
|
|
13
|
+
displayHour: import("@angular/core").Signal<number>;
|
|
14
|
+
inputPlaceholder: import("@angular/core").Signal<"hh:mm AM" | "HH:mm">;
|
|
11
15
|
minutes: number[];
|
|
12
|
-
displayHour: () => number;
|
|
13
16
|
pad: (n: number) => string;
|
|
17
|
+
constructor();
|
|
14
18
|
onHour(e: Event): void;
|
|
15
19
|
onMin(e: Event): void;
|
|
16
20
|
onAmPm(e: Event): void;
|
|
17
|
-
|
|
21
|
+
onTextInput(e: Event): void;
|
|
22
|
+
onFocusOut(event: FocusEvent): void;
|
|
23
|
+
private applyTime;
|
|
24
|
+
private syncTextValue;
|
|
25
|
+
private parseTime;
|
|
26
|
+
private to24Hour;
|
|
27
|
+
private formatOutput;
|
|
18
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerComponent, "ngx-time-picker", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "use12h": { "alias": "use12h"; "required": false; "isSignal": true; }; }, { "timeChange": "timeChange"; }, never, never, true, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerComponent, "ngx-time-picker", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "use12h": { "alias": "use12h"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "timeChange": "timeChange"; }, never, never, true, never>;
|
|
20
30
|
}
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class SplitterComponent {
|
|
3
3
|
orientation: import("@angular/core").InputSignal<"horizontal" | "vertical">;
|
|
4
|
-
|
|
4
|
+
size: import("@angular/core").InputSignal<string | number | null>;
|
|
5
|
+
initialSize: import("@angular/core").InputSignal<string | number>;
|
|
6
|
+
min: import("@angular/core").InputSignal<number>;
|
|
5
7
|
firstSize: import("@angular/core").WritableSignal<string>;
|
|
6
8
|
dragging: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
+
sizeChange: import("@angular/core").OutputEmitterRef<string>;
|
|
7
10
|
private startX;
|
|
8
11
|
private startSize;
|
|
9
12
|
private containerSize;
|
|
13
|
+
private configuredSize;
|
|
14
|
+
constructor();
|
|
10
15
|
hostStyle(): "width:100%;height:100%" | "width:100%;height:100%;flex-direction:column";
|
|
11
16
|
startDrag(e: MouseEvent): void;
|
|
17
|
+
private normalizeSize;
|
|
18
|
+
private toPixels;
|
|
12
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<SplitterComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SplitterComponent, "ngx-splitter", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "initialSize": { "alias": "initialSize"; "required": false; "isSignal": true; }; }, {}, never, ["[pane1]", "[pane2]"], true, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SplitterComponent, "ngx-splitter", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "initialSize": { "alias": "initialSize"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; }, { "sizeChange": "sizeChange"; }, never, ["[pane1]", "[pane2]"], true, never>;
|
|
14
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-core-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
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"
|
package/public-api.d.ts
CHANGED
|
@@ -22,11 +22,11 @@ export { GanttScaleService } from 'ngx-core-components/charts';
|
|
|
22
22
|
export type { GanttTask, GanttDependency, GanttConfig, GanttColumnDef, GanttTaskChangeEvent, GanttTaskClickEvent, GanttDependencyClickEvent, GanttScrollEvent, } from 'ngx-core-components/charts';
|
|
23
23
|
export { ZoomLevel, DependencyType } from 'ngx-core-components/charts';
|
|
24
24
|
export { DataGridComponent } from 'ngx-core-components/grid';
|
|
25
|
-
export type { GridColumnDef, GridSortState, GridPageChangeEvent, GridSortChangeEvent, GridRowClickEvent, } from 'ngx-core-components/grid';
|
|
25
|
+
export type { GridColumnDef, GridFilterState, GridGroupState, GridGroupResult, GridSortState, GridPageChangeEvent, GridSortChangeEvent, GridFilterChangeEvent, GridGroupChangeEvent, GridDataStateChangeEvent, GridRowClickEvent, GridRowUpdateEvent, GridHeaderTemplateContext, GridCellTemplateContext, GridRowTemplateContext, GridDetailTemplateContext, } from 'ngx-core-components/grid';
|
|
26
26
|
export { TreeViewComponent } from 'ngx-core-components/views';
|
|
27
27
|
export type { TreeNode, TreeNodeEvent } from 'ngx-core-components/views';
|
|
28
28
|
export { ListViewComponent } from 'ngx-core-components/views';
|
|
29
|
-
export type { ListViewItemClickEvent, ListViewSelectionEvent, } from 'ngx-core-components/views';
|
|
29
|
+
export type { ListViewItemClickEvent, ListViewSelectionEvent, ListViewPageChangeEvent, } from 'ngx-core-components/views';
|
|
30
30
|
export { DialogService } from 'ngx-core-components/dialog';
|
|
31
31
|
export type { DialogRef, DialogConfig } from 'ngx-core-components/dialog';
|
|
32
32
|
export { DialogContainerComponent } from 'ngx-core-components/dialog';
|
|
@@ -7,23 +7,41 @@ export interface ListViewItemClickEvent<T = unknown> {
|
|
|
7
7
|
export interface ListViewSelectionEvent<T = unknown> {
|
|
8
8
|
selectedItems: T[];
|
|
9
9
|
}
|
|
10
|
+
export interface ListViewPageChangeEvent {
|
|
11
|
+
page: number;
|
|
12
|
+
pageSize: number;
|
|
13
|
+
totalItems: number;
|
|
14
|
+
totalPages: number;
|
|
15
|
+
}
|
|
10
16
|
export declare class ListViewComponent<T = unknown> {
|
|
11
17
|
items: import("@angular/core").InputSignal<T[]>;
|
|
12
18
|
selectable: import("@angular/core").InputSignal<boolean>;
|
|
13
19
|
multiselect: import("@angular/core").InputSignal<boolean>;
|
|
14
20
|
loading: import("@angular/core").InputSignal<boolean>;
|
|
15
21
|
labelField: import("@angular/core").InputSignal<string>;
|
|
22
|
+
pageSize: import("@angular/core").InputSignal<number>;
|
|
16
23
|
itemClick: import("@angular/core").OutputEmitterRef<ListViewItemClickEvent<T>>;
|
|
17
24
|
selectionChange: import("@angular/core").OutputEmitterRef<ListViewSelectionEvent<T>>;
|
|
25
|
+
pageChange: import("@angular/core").OutputEmitterRef<ListViewPageChangeEvent>;
|
|
18
26
|
itemTemplate?: TemplateRef<{
|
|
19
27
|
$implicit: T;
|
|
20
28
|
index: number;
|
|
21
29
|
}>;
|
|
22
30
|
selectedItems: import("@angular/core").WritableSignal<Set<T>>;
|
|
31
|
+
currentPage: import("@angular/core").WritableSignal<number>;
|
|
32
|
+
totalItems: import("@angular/core").Signal<number>;
|
|
33
|
+
totalPages: import("@angular/core").Signal<number>;
|
|
34
|
+
pageStartIndex: import("@angular/core").Signal<number>;
|
|
35
|
+
visibleItems: import("@angular/core").Signal<T[]>;
|
|
36
|
+
constructor();
|
|
23
37
|
isSelected(item: T): boolean;
|
|
24
38
|
onItemClick(item: T, index: number): void;
|
|
39
|
+
goToPreviousPage(): void;
|
|
40
|
+
goToNextPage(): void;
|
|
41
|
+
private setPage;
|
|
42
|
+
private emitPageChange;
|
|
25
43
|
getLabel(item: T): string;
|
|
26
44
|
trackFn(item: T, index: number): string;
|
|
27
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListViewComponent<any>, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent<any>, "ngx-list-view", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "labelField": { "alias": "labelField"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; "selectionChange": "selectionChange"; }, ["itemTemplate"], ["[listHeader]", "[listFooter]"], true, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent<any>, "ngx-list-view", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "labelField": { "alias": "labelField"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; "selectionChange": "selectionChange"; "pageChange": "pageChange"; }, ["itemTemplate"], ["[listHeader]", "[listFooter]"], true, never>;
|
|
29
47
|
}
|
package/views/public-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { TreeViewComponent } from './tree-view/tree-view.component';
|
|
2
2
|
export type { TreeNode, TreeNodeEvent } from './tree-view/tree-view.component';
|
|
3
3
|
export { ListViewComponent } from './list-view/list-view.component';
|
|
4
|
-
export type { ListViewItemClickEvent, ListViewSelectionEvent, } from './list-view/list-view.component';
|
|
4
|
+
export type { ListViewItemClickEvent, ListViewSelectionEvent, ListViewPageChangeEvent, } from './list-view/list-view.component';
|