@winexist/ngp 0.4.1 → 0.6.0
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/fesm2022/winexist-ngp.mjs +502 -2
- package/fesm2022/winexist-ngp.mjs.map +1 -1
- package/index.d.ts +236 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Component, output, signal, effect, ViewChild, ContentChild, Input, forwardRef, inject, Injectable } from '@angular/core';
|
|
2
|
+
import { input, Component, output, signal, effect, ViewChild, ContentChild, Input, forwardRef, inject, Injectable, computed, Injector, untracked } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from 'primeng/fileupload';
|
|
@@ -20,6 +20,25 @@ import { InputTextModule } from 'primeng/inputtext';
|
|
|
20
20
|
import * as i2 from 'primeng/inputnumber';
|
|
21
21
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
22
22
|
import { HttpClient } from '@angular/common/http';
|
|
23
|
+
import * as i3$1 from 'primeng/api';
|
|
24
|
+
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
25
|
+
import * as i4$2 from 'primeng/button';
|
|
26
|
+
import { ButtonModule } from 'primeng/button';
|
|
27
|
+
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
28
|
+
import { DialogModule } from 'primeng/dialog';
|
|
29
|
+
import * as i6 from 'primeng/popover';
|
|
30
|
+
import { PopoverModule } from 'primeng/popover';
|
|
31
|
+
import * as i5$1 from 'primeng/skeleton';
|
|
32
|
+
import { SkeletonModule } from 'primeng/skeleton';
|
|
33
|
+
import * as i2$1 from 'primeng/table';
|
|
34
|
+
import { TableModule } from 'primeng/table';
|
|
35
|
+
import { ToastModule } from 'primeng/toast';
|
|
36
|
+
import { ToolbarModule } from 'primeng/toolbar';
|
|
37
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
38
|
+
import { tap } from 'rxjs/operators';
|
|
39
|
+
import { __decorate } from 'tslib';
|
|
40
|
+
import { shareReplay, catchError, of, finalize } from 'rxjs';
|
|
41
|
+
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
23
42
|
|
|
24
43
|
class EmptyComponent {
|
|
25
44
|
title = input('Section is empty.', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
@@ -519,11 +538,492 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
519
538
|
], template: "@if (showHeader()) {\n\t<h2 class=\"text-xl font-semibold mb-4\">Address</h2>\n}\n<form [formGroup]=\"addressForm\">\n\t<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<input pInputText trim=\"blur\" id=\"country\" formControlName=\"country\" class=\"w-full\" />\n\t\t\t\t\t<label for=\"country\" class=\"block mb-2 required-label\">Country</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<ng-select\n\t\t\t\t\t\tformControlName=\"province\"\n\t\t\t\t\t\t[items]=\"provinceOptions\"\n\t\t\t\t\t\t[loading]=\"provHttp$ && !provHttp$.closed\"\n\t\t\t\t\t\tbindLabel=\"name\" />\n\t\t\t\t\t<label for=\"province\" class=\"block mb-2 required-label\">Province</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t</div>\n\n\t<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<ng-select\n\t\t\t\t\t\tformControlName=\"city\"\n\t\t\t\t\t\t[items]=\"cityOptions\"\n\t\t\t\t\t\t[loading]=\"cityHttp$ && !cityHttp$.closed\"\n\t\t\t\t\t\tbindLabel=\"name\" />\n\t\t\t\t\t<label for=\"city\" class=\"block mb-2 required-label\">City/Municipality</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<ng-select\n\t\t\t\t\t\tformControlName=\"barangay\"\n\t\t\t\t\t\t[items]=\"barangayOptions\"\n\t\t\t\t\t\t[loading]=\"barangayHttp$ && !barangayHttp$.closed\"\n\t\t\t\t\t\tbindLabel=\"name\" />\n\n\t\t\t\t\t<label for=\"barangay\" class=\"block mb-2 required-label\">Barangay</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t</div>\n\n\t<div>\n\t\t<ngp-form-field-wrapper>\n\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t<label for=\"line1\" class=\"block mb-2 required-label\">Line 1</label>\n\t\t\t\t<input pInputText trim=\"blur\" id=\"line1\" formControlName=\"line1\" class=\"w-full\" />\n\t\t\t</p-floatlabel>\n\t\t</ngp-form-field-wrapper>\n\t</div>\n\n\t<div>\n\t\t<ngp-form-field-wrapper>\n\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t<label for=\"line2\" class=\"block mb-2\">Line 2</label>\n\t\t\t\t<input pInputText trim=\"blur\" id=\"line2\" formControlName=\"line2\" class=\"w-full\" />\n\t\t\t</p-floatlabel>\n\t\t</ngp-form-field-wrapper>\n\t</div>\n\t<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<p-inputnumber\n\t\t\t\t\t\t[inputId]=\"'zipCode'\"\n\t\t\t\t\t\tformControlName=\"zipCode\"\n\t\t\t\t\t\tstyleClass=\"w-full\"\n\t\t\t\t\t\t[useGrouping]=\"false\" />\n\t\t\t\t\t<label for=\"zipCode\" class=\"block mb-2 required-label\">Zip Code</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<label for=\"landmark\" class=\"block mb-2 required-label\">Nearest Landmark</label>\n\t\t\t\t\t<input pInputText trim=\"blur\" id=\"landmark\" formControlName=\"landmark\" class=\"w-full\" />\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t</div>\n</form>\n" }]
|
|
520
539
|
}], ctorParameters: () => [], propDecorators: { showHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeader", required: false }] }], isCreateMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCreateMode", required: false }] }] } });
|
|
521
540
|
|
|
541
|
+
class DataTableComponent {
|
|
542
|
+
dataSource = input([], ...(ngDevMode ? [{ debugName: "dataSource" }] : []));
|
|
543
|
+
columns = input([], ...(ngDevMode ? [{ debugName: "columns" }] : []));
|
|
544
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
545
|
+
pageSize = input(10, ...(ngDevMode ? [{ debugName: "pageSize" }] : []));
|
|
546
|
+
totalElements = input(0, ...(ngDevMode ? [{ debugName: "totalElements" }] : []));
|
|
547
|
+
currentPage = input(0, ...(ngDevMode ? [{ debugName: "currentPage" }] : []));
|
|
548
|
+
showDefaultActions = input(true, ...(ngDevMode ? [{ debugName: "showDefaultActions" }] : []));
|
|
549
|
+
emptyMessage = input('No data available.', ...(ngDevMode ? [{ debugName: "emptyMessage" }] : []));
|
|
550
|
+
hasDeleteAction = input(true, ...(ngDevMode ? [{ debugName: "hasDeleteAction" }] : []));
|
|
551
|
+
hasEditAction = input(true, ...(ngDevMode ? [{ debugName: "hasEditAction" }] : []));
|
|
552
|
+
canEdit = input(() => true, ...(ngDevMode ? [{ debugName: "canEdit" }] : []));
|
|
553
|
+
hasViewAction = input(true, ...(ngDevMode ? [{ debugName: "hasViewAction" }] : []));
|
|
554
|
+
entityName = input('', ...(ngDevMode ? [{ debugName: "entityName" }] : []));
|
|
555
|
+
isPaginated = input(true, ...(ngDevMode ? [{ debugName: "isPaginated" }] : []));
|
|
556
|
+
showCustomAction = input(false, ...(ngDevMode ? [{ debugName: "showCustomAction" }] : []));
|
|
557
|
+
showRowNumbers = input(false, ...(ngDevMode ? [{ debugName: "showRowNumbers" }] : []));
|
|
558
|
+
rowNumberHeader = input('', ...(ngDevMode ? [{ debugName: "rowNumberHeader" }] : []));
|
|
559
|
+
// Internal signals
|
|
560
|
+
data = signal([], ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
561
|
+
filteredData = signal([], ...(ngDevMode ? [{ debugName: "filteredData" }] : []));
|
|
562
|
+
dialogVisible = signal(false, ...(ngDevMode ? [{ debugName: "dialogVisible" }] : []));
|
|
563
|
+
dialogTitle = signal('Add Item', ...(ngDevMode ? [{ debugName: "dialogTitle" }] : []));
|
|
564
|
+
editingItem = signal(null, ...(ngDevMode ? [{ debugName: "editingItem" }] : []));
|
|
565
|
+
// Custom event emitters
|
|
566
|
+
add = output();
|
|
567
|
+
edit = output();
|
|
568
|
+
deleteAction = output();
|
|
569
|
+
view = output();
|
|
570
|
+
pageChange = output();
|
|
571
|
+
sortChange = output();
|
|
572
|
+
actions = computed(() => [this.hasViewAction(), this.hasEditAction(), this.hasDeleteAction()], ...(ngDevMode ? [{ debugName: "actions" }] : []));
|
|
573
|
+
actionsLength = computed(() => this.actions().filter((action) => !!action).length, ...(ngDevMode ? [{ debugName: "actionsLength" }] : []));
|
|
574
|
+
actionItems = computed(() => {
|
|
575
|
+
return [
|
|
576
|
+
{
|
|
577
|
+
label: 'View ' + this.entityName(),
|
|
578
|
+
visible: this.hasViewAction(),
|
|
579
|
+
icon: 'pi-search'
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
label: 'Update ' + this.entityName(),
|
|
583
|
+
visible: this.hasEditAction(),
|
|
584
|
+
icon: 'pi-pen-to-square',
|
|
585
|
+
shouldShow: (item) => this.canEdit()(item)
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
label: 'Delete ' + this.entityName(),
|
|
589
|
+
visible: this.hasDeleteAction(),
|
|
590
|
+
icon: 'pi-trash'
|
|
591
|
+
}
|
|
592
|
+
];
|
|
593
|
+
}, ...(ngDevMode ? [{ debugName: "actionItems" }] : []));
|
|
594
|
+
// Content children for custom templates
|
|
595
|
+
formTemplate;
|
|
596
|
+
table;
|
|
597
|
+
// Services
|
|
598
|
+
http = inject(HttpClient);
|
|
599
|
+
confirmationService = inject(ConfirmationService);
|
|
600
|
+
messageService = inject(MessageService);
|
|
601
|
+
// Column filters for individual column filtering
|
|
602
|
+
filterValues = {};
|
|
603
|
+
// For custom cell templates
|
|
604
|
+
customTemplates = new Map();
|
|
605
|
+
constructor() {
|
|
606
|
+
// Effect to update filtered data when raw data changes
|
|
607
|
+
effect(() => {
|
|
608
|
+
const sourceData = this.dataSource();
|
|
609
|
+
this.data.set([...sourceData]);
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
// Register a custom template for a specific column
|
|
613
|
+
registerTemplate(field, template) {
|
|
614
|
+
this.customTemplates.set(field, template);
|
|
615
|
+
}
|
|
616
|
+
handlePageChange(event) {
|
|
617
|
+
this.pageChange.emit(event);
|
|
618
|
+
}
|
|
619
|
+
handleSort(event) {
|
|
620
|
+
const column = this.columns().find((col) => col.field === event.field);
|
|
621
|
+
const actualSortField = column?.sortField ?? event.field;
|
|
622
|
+
const order = event.order === 1 ? 'ASC' : 'DESC';
|
|
623
|
+
this.sortChange.emit({
|
|
624
|
+
sort: actualSortField,
|
|
625
|
+
order
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
resetTableSort() {
|
|
629
|
+
if (this.table) {
|
|
630
|
+
this.table.sortOrder = 0;
|
|
631
|
+
this.table.sortField = null;
|
|
632
|
+
this.table.tableService.onSort(null);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
// Helper to safely get nested property values using dot notation
|
|
636
|
+
getItemValue(item, field, column) {
|
|
637
|
+
if (column && typeof column.render === 'function') {
|
|
638
|
+
return column.render(item);
|
|
639
|
+
}
|
|
640
|
+
return field
|
|
641
|
+
.split('.')
|
|
642
|
+
.reduce((obj, key) => obj?.[key] ?? null, item);
|
|
643
|
+
}
|
|
644
|
+
perFormActionFromPopover(item, actionType) {
|
|
645
|
+
if (actionType.includes('View')) {
|
|
646
|
+
this.view.emit(item);
|
|
647
|
+
}
|
|
648
|
+
else if (actionType.includes('Update')) {
|
|
649
|
+
this.edit.emit(item);
|
|
650
|
+
}
|
|
651
|
+
else if (actionType.includes('Delete')) {
|
|
652
|
+
this.deleteAction.emit(item);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
656
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: DataTableComponent, isStandalone: true, selector: "ngp-data-table", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, totalElements: { classPropertyName: "totalElements", publicName: "totalElements", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, showDefaultActions: { classPropertyName: "showDefaultActions", publicName: "showDefaultActions", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, hasDeleteAction: { classPropertyName: "hasDeleteAction", publicName: "hasDeleteAction", isSignal: true, isRequired: false, transformFunction: null }, hasEditAction: { classPropertyName: "hasEditAction", publicName: "hasEditAction", isSignal: true, isRequired: false, transformFunction: null }, canEdit: { classPropertyName: "canEdit", publicName: "canEdit", isSignal: true, isRequired: false, transformFunction: null }, hasViewAction: { classPropertyName: "hasViewAction", publicName: "hasViewAction", isSignal: true, isRequired: false, transformFunction: null }, entityName: { classPropertyName: "entityName", publicName: "entityName", isSignal: true, isRequired: false, transformFunction: null }, isPaginated: { classPropertyName: "isPaginated", publicName: "isPaginated", isSignal: true, isRequired: false, transformFunction: null }, showCustomAction: { classPropertyName: "showCustomAction", publicName: "showCustomAction", isSignal: true, isRequired: false, transformFunction: null }, showRowNumbers: { classPropertyName: "showRowNumbers", publicName: "showRowNumbers", isSignal: true, isRequired: false, transformFunction: null }, rowNumberHeader: { classPropertyName: "rowNumberHeader", publicName: "rowNumberHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { add: "add", edit: "edit", deleteAction: "deleteAction", view: "view", pageChange: "pageChange", sortChange: "sortChange" }, providers: [ConfirmationService, MessageService], queries: [{ propertyName: "formTemplate", first: true, predicate: ["formTemplate"], descendants: true }], viewQueries: [{ propertyName: "table", first: true, predicate: ["dt"], descendants: true }], ngImport: i0, template: "<div class=\"card\">\n\t<p-table\n\t\t#dt\n\t\t[value]=\"data()\"\n\t\t[paginator]=\"isPaginated()\"\n\t\t[rows]=\"pageSize()\"\n\t\t[rowsPerPageOptions]=\"[5, 10, 25, 50]\"\n\t\t[rowHover]=\"true\"\n\t\t[loading]=\"loading()\"\n\t\t[showLoader]=\"false\"\n\t\t[scrollable]=\"true\"\n\t\tstyleClass=\"p-datatable-sm\"\n\t\t[totalRecords]=\"totalElements()\"\n\t\t[lazy]=\"isPaginated()\"\n\t\t[first]=\"currentPage() * pageSize()\"\n\t\tpaginatorDropdownAppendTo=\"body\"\n\t\t(onPage)=\"handlePageChange($event)\"\n\t\t(onSort)=\"handleSort($event)\">\n\t\t<ng-template pTemplate=\"header\">\n\t\t\t<tr>\n\t\t\t\t@if (showRowNumbers()) {\n\t\t\t\t\t<th class=\"text-left !font-bold !text-gray-500 !w-1\" scope=\"col\">{{\n\t\t\t\t\t\trowNumberHeader()\n\t\t\t\t\t}}</th>\n\t\t\t\t}\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<th\n\t\t\t\t\t\t[pSortableColumn]=\"column.sortable ? column.field : undefined\"\n\t\t\t\t\t\tclass=\"text-left !font-bold !text-gray-500\"\n\t\t\t\t\t\t[ngClass]=\"{ '!text-center': column.align === 'center' }\"\n\t\t\t\t\t\tscope=\"col\"\n\t\t\t\t\t\t[style]=\"{ width: column.width || 'auto' }\">\n\t\t\t\t\t\t{{ column.header }}\n\t\t\t\t\t\t@if (column.sortable) {\n\t\t\t\t\t\t\t<p-sortIcon [field]=\"column.field\"></p-sortIcon>\n\t\t\t\t\t\t}\n\t\t\t\t\t</th>\n\t\t\t\t}\n\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<th class=\"!w-32 !text-center !font-bold !text-gray-500\" scope=\"col\">Actions</th>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</ng-template>\n\n\t\t<ng-template pTemplate=\"body\" let-item let-rowIndex=\"rowIndex\">\n\t\t\t<tr>\n\t\t\t\t@if (showRowNumbers()) {\n\t\t\t\t\t<td class=\"!w-1 text-center\">\n\t\t\t\t\t\t{{ rowIndex + 1 }}\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td [ngClass]=\"{ '!text-center': column.align === 'center' }\">\n\t\t\t\t\t\t@if (customTemplates && customTemplates.get(column.field)) {\n\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"customTemplates.get(column.field)!\"\n\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, field: column.field }\">\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t{{ getItemValue(item, column.field, column) }}\n\t\t\t\t\t\t}\n\t\t\t\t\t</td>\n\t\t\t\t}\n\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td class=\"\">\n\t\t\t\t\t\t<div class=\"flex justify-center gap-2\">\n\t\t\t\t\t\t\t@if (showDefaultActions() && actionsLength() < 2 && !showCustomAction()) {\n\t\t\t\t\t\t\t\t<!-- Inline buttons for less than 2 standard actions and no custom action -->\n\t\t\t\t\t\t\t\t@if (hasViewAction()) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\t\tclass=\"!p-0 p-button-primary\"\n\t\t\t\t\t\t\t\t\t\t[label]=\"'View'\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"view.emit(item)\"></button>\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@if (hasEditAction()) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\t\tclass=\"!p-0 p-button-primary\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"edit.emit(item)\"\n\t\t\t\t\t\t\t\t\t\t[label]=\"'Update'\"></button>\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@if (hasDeleteAction()) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\t\tclass=\"!p-0 p-button-danger\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"deleteAction.emit(item)\"\n\t\t\t\t\t\t\t\t\t\t[label]=\"'Delete'\"></button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} @else if (!showDefaultActions() && showCustomAction()) {\n\t\t\t\t\t\t\t\t<!-- Only custom action, no popover needed -->\n\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"customTemplates.get('customAction')!\"\n\t\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, field: 'customAction' }\">\n\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<!-- Popover menu for 2+ standard actions or when combining with custom action -->\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\ticon=\"pi pi-ellipsis-h\"\n\t\t\t\t\t\t\t\t\tclass=\"p-button-outlined p-button-secondary\"\n\t\t\t\t\t\t\t\t\t(click)=\"po.toggle($event)\"></button>\n\t\t\t\t\t\t\t\t<p-popover #po styleClass=\"!min-w-40\">\n\t\t\t\t\t\t\t\t\t<span class=\"!font-semibold !text-gray-500 block mb-2\">Actions</span>\n\t\t\t\t\t\t\t\t\t<ul class=\"list-none p-0 m-0 flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t@if (showDefaultActions()) {\n\t\t\t\t\t\t\t\t\t\t\t@for (actionItem of actionItems(); track $index) {\n\t\t\t\t\t\t\t\t\t\t\t\t@if (\n\t\t\t\t\t\t\t\t\t\t\t\t\tactionItem.visible &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t(!actionItem.shouldShow || actionItem.shouldShow(item))\n\t\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"flex items-center gap-2 px-2 py-3 hover:bg-emphasis cursor-pointer rounded-border\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"perFormActionFromPopover(item, actionItem.label)\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"pi\" [ngClass]=\"actionItem.icon\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"font-medium\">{{ actionItem.label }}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t<!-- Custom action template in popover -->\n\t\t\t\t\t\t\t\t\t\t@if (showCustomAction() && customTemplates.get('customAction')) {\n\t\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"customTemplates.get('customAction')!\"\n\t\t\t\t\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, field: 'customAction' }\">\n\t\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</p-popover>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</ng-template>\n\n\t\t<ng-template #loadingbody>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</ng-template>\n\n\t\t<ng-template pTemplate=\"emptymessage\">\n\t\t\t<tr>\n\t\t\t\t<td [attr.colspan]=\"columns().length + 1\" class=\"text-center p-4\">{{ emptyMessage() }}</td>\n\t\t\t</tr>\n\t\t</ng-template>\n\t</p-table>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4$2.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "ngmodule", type: DialogModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: ToastModule }, { kind: "ngmodule", type: ToolbarModule }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i5$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i6.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }] });
|
|
657
|
+
}
|
|
658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DataTableComponent, decorators: [{
|
|
659
|
+
type: Component,
|
|
660
|
+
args: [{ selector: 'ngp-data-table', imports: [
|
|
661
|
+
CommonModule,
|
|
662
|
+
FormsModule,
|
|
663
|
+
ReactiveFormsModule,
|
|
664
|
+
TableModule,
|
|
665
|
+
ButtonModule,
|
|
666
|
+
InputTextModule,
|
|
667
|
+
ConfirmDialogModule,
|
|
668
|
+
DialogModule,
|
|
669
|
+
TooltipModule,
|
|
670
|
+
ToastModule,
|
|
671
|
+
ToolbarModule,
|
|
672
|
+
SkeletonModule,
|
|
673
|
+
PopoverModule
|
|
674
|
+
], providers: [ConfirmationService, MessageService], template: "<div class=\"card\">\n\t<p-table\n\t\t#dt\n\t\t[value]=\"data()\"\n\t\t[paginator]=\"isPaginated()\"\n\t\t[rows]=\"pageSize()\"\n\t\t[rowsPerPageOptions]=\"[5, 10, 25, 50]\"\n\t\t[rowHover]=\"true\"\n\t\t[loading]=\"loading()\"\n\t\t[showLoader]=\"false\"\n\t\t[scrollable]=\"true\"\n\t\tstyleClass=\"p-datatable-sm\"\n\t\t[totalRecords]=\"totalElements()\"\n\t\t[lazy]=\"isPaginated()\"\n\t\t[first]=\"currentPage() * pageSize()\"\n\t\tpaginatorDropdownAppendTo=\"body\"\n\t\t(onPage)=\"handlePageChange($event)\"\n\t\t(onSort)=\"handleSort($event)\">\n\t\t<ng-template pTemplate=\"header\">\n\t\t\t<tr>\n\t\t\t\t@if (showRowNumbers()) {\n\t\t\t\t\t<th class=\"text-left !font-bold !text-gray-500 !w-1\" scope=\"col\">{{\n\t\t\t\t\t\trowNumberHeader()\n\t\t\t\t\t}}</th>\n\t\t\t\t}\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<th\n\t\t\t\t\t\t[pSortableColumn]=\"column.sortable ? column.field : undefined\"\n\t\t\t\t\t\tclass=\"text-left !font-bold !text-gray-500\"\n\t\t\t\t\t\t[ngClass]=\"{ '!text-center': column.align === 'center' }\"\n\t\t\t\t\t\tscope=\"col\"\n\t\t\t\t\t\t[style]=\"{ width: column.width || 'auto' }\">\n\t\t\t\t\t\t{{ column.header }}\n\t\t\t\t\t\t@if (column.sortable) {\n\t\t\t\t\t\t\t<p-sortIcon [field]=\"column.field\"></p-sortIcon>\n\t\t\t\t\t\t}\n\t\t\t\t\t</th>\n\t\t\t\t}\n\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<th class=\"!w-32 !text-center !font-bold !text-gray-500\" scope=\"col\">Actions</th>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</ng-template>\n\n\t\t<ng-template pTemplate=\"body\" let-item let-rowIndex=\"rowIndex\">\n\t\t\t<tr>\n\t\t\t\t@if (showRowNumbers()) {\n\t\t\t\t\t<td class=\"!w-1 text-center\">\n\t\t\t\t\t\t{{ rowIndex + 1 }}\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td [ngClass]=\"{ '!text-center': column.align === 'center' }\">\n\t\t\t\t\t\t@if (customTemplates && customTemplates.get(column.field)) {\n\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"customTemplates.get(column.field)!\"\n\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, field: column.field }\">\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t{{ getItemValue(item, column.field, column) }}\n\t\t\t\t\t\t}\n\t\t\t\t\t</td>\n\t\t\t\t}\n\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td class=\"\">\n\t\t\t\t\t\t<div class=\"flex justify-center gap-2\">\n\t\t\t\t\t\t\t@if (showDefaultActions() && actionsLength() < 2 && !showCustomAction()) {\n\t\t\t\t\t\t\t\t<!-- Inline buttons for less than 2 standard actions and no custom action -->\n\t\t\t\t\t\t\t\t@if (hasViewAction()) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\t\tclass=\"!p-0 p-button-primary\"\n\t\t\t\t\t\t\t\t\t\t[label]=\"'View'\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"view.emit(item)\"></button>\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@if (hasEditAction()) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\t\tclass=\"!p-0 p-button-primary\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"edit.emit(item)\"\n\t\t\t\t\t\t\t\t\t\t[label]=\"'Update'\"></button>\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@if (hasDeleteAction()) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\t\tclass=\"!p-0 p-button-danger\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"deleteAction.emit(item)\"\n\t\t\t\t\t\t\t\t\t\t[label]=\"'Delete'\"></button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} @else if (!showDefaultActions() && showCustomAction()) {\n\t\t\t\t\t\t\t\t<!-- Only custom action, no popover needed -->\n\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"customTemplates.get('customAction')!\"\n\t\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, field: 'customAction' }\">\n\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<!-- Popover menu for 2+ standard actions or when combining with custom action -->\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\ticon=\"pi pi-ellipsis-h\"\n\t\t\t\t\t\t\t\t\tclass=\"p-button-outlined p-button-secondary\"\n\t\t\t\t\t\t\t\t\t(click)=\"po.toggle($event)\"></button>\n\t\t\t\t\t\t\t\t<p-popover #po styleClass=\"!min-w-40\">\n\t\t\t\t\t\t\t\t\t<span class=\"!font-semibold !text-gray-500 block mb-2\">Actions</span>\n\t\t\t\t\t\t\t\t\t<ul class=\"list-none p-0 m-0 flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t@if (showDefaultActions()) {\n\t\t\t\t\t\t\t\t\t\t\t@for (actionItem of actionItems(); track $index) {\n\t\t\t\t\t\t\t\t\t\t\t\t@if (\n\t\t\t\t\t\t\t\t\t\t\t\t\tactionItem.visible &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t(!actionItem.shouldShow || actionItem.shouldShow(item))\n\t\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"flex items-center gap-2 px-2 py-3 hover:bg-emphasis cursor-pointer rounded-border\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"perFormActionFromPopover(item, actionItem.label)\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"pi\" [ngClass]=\"actionItem.icon\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"font-medium\">{{ actionItem.label }}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t<!-- Custom action template in popover -->\n\t\t\t\t\t\t\t\t\t\t@if (showCustomAction() && customTemplates.get('customAction')) {\n\t\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"customTemplates.get('customAction')!\"\n\t\t\t\t\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, field: 'customAction' }\">\n\t\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</p-popover>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</ng-template>\n\n\t\t<ng-template #loadingbody>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</ng-template>\n\n\t\t<ng-template pTemplate=\"emptymessage\">\n\t\t\t<tr>\n\t\t\t\t<td [attr.colspan]=\"columns().length + 1\" class=\"text-center p-4\">{{ emptyMessage() }}</td>\n\t\t\t</tr>\n\t\t</ng-template>\n\t</p-table>\n</div>\n" }]
|
|
675
|
+
}], ctorParameters: () => [], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], totalElements: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalElements", required: false }] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }], showDefaultActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDefaultActions", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], hasDeleteAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDeleteAction", required: false }] }], hasEditAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasEditAction", required: false }] }], canEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "canEdit", required: false }] }], hasViewAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasViewAction", required: false }] }], entityName: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityName", required: false }] }], isPaginated: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPaginated", required: false }] }], showCustomAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCustomAction", required: false }] }], showRowNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRowNumbers", required: false }] }], rowNumberHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowNumberHeader", required: false }] }], add: [{ type: i0.Output, args: ["add"] }], edit: [{ type: i0.Output, args: ["edit"] }], deleteAction: [{ type: i0.Output, args: ["deleteAction"] }], view: [{ type: i0.Output, args: ["view"] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], formTemplate: [{
|
|
676
|
+
type: ContentChild,
|
|
677
|
+
args: ['formTemplate']
|
|
678
|
+
}], table: [{
|
|
679
|
+
type: ViewChild,
|
|
680
|
+
args: ['dt']
|
|
681
|
+
}] } });
|
|
682
|
+
|
|
683
|
+
class DynamicNgSelectComponent {
|
|
684
|
+
getApiUrl;
|
|
685
|
+
formatOptions;
|
|
686
|
+
bindLabel = 'description';
|
|
687
|
+
bindValue = 'id';
|
|
688
|
+
placeholder = 'Select';
|
|
689
|
+
options = [];
|
|
690
|
+
value;
|
|
691
|
+
disabled = false;
|
|
692
|
+
tableParams = signal({ page: 0, size: 10 }, ...(ngDevMode ? [{ debugName: "tableParams" }] : []));
|
|
693
|
+
onChange = (_) => { }; // eslint-disable-line
|
|
694
|
+
onTouched = () => { }; // eslint-disable-line
|
|
695
|
+
ngOnInit() {
|
|
696
|
+
this.loadOptions();
|
|
697
|
+
}
|
|
698
|
+
loadOptions() {
|
|
699
|
+
if (!this.getApiUrl) {
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
702
|
+
this.getOptions();
|
|
703
|
+
}
|
|
704
|
+
getOptions() {
|
|
705
|
+
this.getApiUrl(this.tableParams())
|
|
706
|
+
.pipe(tap((items) => {
|
|
707
|
+
const values = this.formatOptions ? this.formatOptions(items.results) : items.results;
|
|
708
|
+
this.options = [...this.options, ...values];
|
|
709
|
+
if (items.hasNextPage) {
|
|
710
|
+
this.tableParams.update((param) => ({ ...param, page: param.page + 1 }));
|
|
711
|
+
this.getOptions();
|
|
712
|
+
}
|
|
713
|
+
}))
|
|
714
|
+
.subscribe();
|
|
715
|
+
}
|
|
716
|
+
writeValue(value) {
|
|
717
|
+
this.value = value;
|
|
718
|
+
}
|
|
719
|
+
registerOnChange(fn) {
|
|
720
|
+
this.onChange = fn;
|
|
721
|
+
}
|
|
722
|
+
registerOnTouched(fn) {
|
|
723
|
+
this.onTouched = fn;
|
|
724
|
+
}
|
|
725
|
+
setDisabledState(isDisabled) {
|
|
726
|
+
this.disabled = isDisabled;
|
|
727
|
+
}
|
|
728
|
+
onValueChange(value) {
|
|
729
|
+
this.value = value[this.bindValue];
|
|
730
|
+
this.onChange(value[this.bindValue]);
|
|
731
|
+
this.onTouched();
|
|
732
|
+
}
|
|
733
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DynamicNgSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
734
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: DynamicNgSelectComponent, isStandalone: true, selector: "ngp-dynamic-select", inputs: { getApiUrl: "getApiUrl", formatOptions: "formatOptions", bindLabel: "bindLabel", bindValue: "bindValue", placeholder: "placeholder" }, providers: [
|
|
735
|
+
{
|
|
736
|
+
provide: NG_VALUE_ACCESSOR,
|
|
737
|
+
useExisting: forwardRef(() => DynamicNgSelectComponent),
|
|
738
|
+
multi: true
|
|
739
|
+
}
|
|
740
|
+
], ngImport: i0, template: "<ng-select\n\t[items]=\"options\"\n\t[bindLabel]=\"bindLabel\"\n\t[bindValue]=\"bindValue\"\n\t[placeholder]=\"placeholder\"\n\t[disabled]=\"disabled\"\n\t[(ngModel)]=\"value\"\n\t[clearable]=\"true\"\n\t(change)=\"onValueChange($event)\">\n</ng-select>\n", dependencies: [{ kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i1$2.NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "dropdownPosition", "appendTo", "outsideClickEvent", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "tabFocusOnClearButton", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "deselectOnClick", "clearSearchOnAdd", "compareWith", "keyDownFn", "bindLabel", "bindValue", "appearance", "isOpen", "items"], outputs: ["bindLabelChange", "bindValueChange", "appearanceChange", "isOpenChange", "itemsChange", "blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["ngSelect"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
741
|
+
}
|
|
742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DynamicNgSelectComponent, decorators: [{
|
|
743
|
+
type: Component,
|
|
744
|
+
args: [{ selector: 'ngp-dynamic-select', imports: [NgSelectModule, CommonModule, FormsModule], providers: [
|
|
745
|
+
{
|
|
746
|
+
provide: NG_VALUE_ACCESSOR,
|
|
747
|
+
useExisting: forwardRef(() => DynamicNgSelectComponent),
|
|
748
|
+
multi: true
|
|
749
|
+
}
|
|
750
|
+
], template: "<ng-select\n\t[items]=\"options\"\n\t[bindLabel]=\"bindLabel\"\n\t[bindValue]=\"bindValue\"\n\t[placeholder]=\"placeholder\"\n\t[disabled]=\"disabled\"\n\t[(ngModel)]=\"value\"\n\t[clearable]=\"true\"\n\t(change)=\"onValueChange($event)\">\n</ng-select>\n" }]
|
|
751
|
+
}], propDecorators: { getApiUrl: [{
|
|
752
|
+
type: Input
|
|
753
|
+
}], formatOptions: [{
|
|
754
|
+
type: Input
|
|
755
|
+
}], bindLabel: [{
|
|
756
|
+
type: Input
|
|
757
|
+
}], bindValue: [{
|
|
758
|
+
type: Input
|
|
759
|
+
}], placeholder: [{
|
|
760
|
+
type: Input
|
|
761
|
+
}] } });
|
|
762
|
+
|
|
763
|
+
class PaginatedRequest {
|
|
764
|
+
page;
|
|
765
|
+
size;
|
|
766
|
+
sort;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
let CrudAbstractComponent = class CrudAbstractComponent {
|
|
770
|
+
// State signals
|
|
771
|
+
sourceSignal = signal(null, ...(ngDevMode ? [{ debugName: "sourceSignal" }] : []));
|
|
772
|
+
loadingSignal = signal(false, ...(ngDevMode ? [{ debugName: "loadingSignal" }] : []));
|
|
773
|
+
errorSignal = signal(null, ...(ngDevMode ? [{ debugName: "errorSignal" }] : []));
|
|
774
|
+
actionSignal = signal(null, ...(ngDevMode ? [{ debugName: "actionSignal" }] : []));
|
|
775
|
+
firstLoadSignal = signal(true, ...(ngDevMode ? [{ debugName: "firstLoadSignal" }] : []));
|
|
776
|
+
showFormSignal = signal(false, ...(ngDevMode ? [{ debugName: "showFormSignal" }] : []));
|
|
777
|
+
formActionSignal = signal(null, ...(ngDevMode ? [{ debugName: "formActionSignal" }] : []));
|
|
778
|
+
dataSignal = signal(null, ...(ngDevMode ? [{ debugName: "dataSignal" }] : []));
|
|
779
|
+
filters = signal(null, ...(ngDevMode ? [{ debugName: "filters" }] : []));
|
|
780
|
+
tableParams = signal({ page: 0, size: 10 }, ...(ngDevMode ? [{ debugName: "tableParams" }] : []));
|
|
781
|
+
requestParams = computed(() => ({
|
|
782
|
+
...this.filters(),
|
|
783
|
+
...this.tableParams()
|
|
784
|
+
}), ...(ngDevMode ? [{ debugName: "requestParams" }] : []));
|
|
785
|
+
// Injections
|
|
786
|
+
injector = inject(Injector);
|
|
787
|
+
// Public interface
|
|
788
|
+
data = this.dataSignal.asReadonly();
|
|
789
|
+
isLoading = this.loadingSignal.asReadonly();
|
|
790
|
+
error = this.errorSignal.asReadonly();
|
|
791
|
+
currentAction = this.actionSignal.asReadonly();
|
|
792
|
+
isFirstLoad = this.firstLoadSignal.asReadonly();
|
|
793
|
+
isFormVisible = this.showFormSignal.asReadonly();
|
|
794
|
+
formAction = this.formActionSignal.asReadonly();
|
|
795
|
+
safeDataSource = computed(() => {
|
|
796
|
+
const rawData = this.dataSignal();
|
|
797
|
+
const isLoading = this.loadingSignal();
|
|
798
|
+
// Default empty response
|
|
799
|
+
const defaultResponse = {
|
|
800
|
+
hasNextPage: false,
|
|
801
|
+
totalElements: 0,
|
|
802
|
+
results: [],
|
|
803
|
+
currentPage: 0,
|
|
804
|
+
pageSize: 10
|
|
805
|
+
};
|
|
806
|
+
if (!rawData || isLoading)
|
|
807
|
+
return defaultResponse;
|
|
808
|
+
const isPaginatedResponse = (obj) => {
|
|
809
|
+
return (obj !== null &&
|
|
810
|
+
typeof obj === 'object' &&
|
|
811
|
+
'results' in obj &&
|
|
812
|
+
Array.isArray(obj.results) &&
|
|
813
|
+
'totalElements' in obj &&
|
|
814
|
+
typeof obj.totalElements === 'number');
|
|
815
|
+
};
|
|
816
|
+
// Handler for Paginated Response
|
|
817
|
+
if (typeof rawData === 'object' && isPaginatedResponse(rawData)) {
|
|
818
|
+
return {
|
|
819
|
+
results: [...rawData.results],
|
|
820
|
+
totalElements: rawData.totalElements,
|
|
821
|
+
currentPage: rawData.currentPage,
|
|
822
|
+
pageSize: rawData.pageSize,
|
|
823
|
+
hasNextPage: rawData.hasNextPage
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
// Handle array case
|
|
827
|
+
if (Array.isArray(rawData)) {
|
|
828
|
+
return {
|
|
829
|
+
...defaultResponse,
|
|
830
|
+
totalElements: rawData.length,
|
|
831
|
+
results: [...rawData],
|
|
832
|
+
pageSize: rawData.length // For arrays, we typically return all elements
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
// Handle single object case
|
|
836
|
+
return {
|
|
837
|
+
...defaultResponse,
|
|
838
|
+
totalElements: 1,
|
|
839
|
+
results: [rawData],
|
|
840
|
+
pageSize: 1
|
|
841
|
+
};
|
|
842
|
+
}, ...(ngDevMode ? [{ debugName: "safeDataSource" }] : []));
|
|
843
|
+
/**
|
|
844
|
+
* Provides direct access to raw list data without pagination wrapper
|
|
845
|
+
* Returns an empty array if data is not available or not an array
|
|
846
|
+
*/
|
|
847
|
+
rawList = computed(() => {
|
|
848
|
+
const rawData = this.data();
|
|
849
|
+
if (!rawData || this.isLoading()) {
|
|
850
|
+
return [];
|
|
851
|
+
}
|
|
852
|
+
// If it's already an array, return it
|
|
853
|
+
if (Array.isArray(rawData)) {
|
|
854
|
+
return [...rawData];
|
|
855
|
+
}
|
|
856
|
+
// If it's a paginated response with a results property that's an array
|
|
857
|
+
if (typeof rawData === 'object' && 'results' in rawData && Array.isArray(rawData.results)) {
|
|
858
|
+
return [...rawData.results];
|
|
859
|
+
}
|
|
860
|
+
// If it's a single object, return it as an array with one item
|
|
861
|
+
if (typeof rawData === 'object' && !('results' in rawData)) {
|
|
862
|
+
return [rawData];
|
|
863
|
+
}
|
|
864
|
+
// Default fallback
|
|
865
|
+
return [];
|
|
866
|
+
}, ...(ngDevMode ? [{ debugName: "rawList" }] : []));
|
|
867
|
+
// Usage in your component:
|
|
868
|
+
// const items = this.rawList();
|
|
869
|
+
// Current operations state
|
|
870
|
+
currentOperations;
|
|
871
|
+
currentParams;
|
|
872
|
+
// Effect to handle Observable subscriptions
|
|
873
|
+
dataEffect = effect(() => {
|
|
874
|
+
const obs = this.sourceSignal();
|
|
875
|
+
if (!obs) {
|
|
876
|
+
untracked(() => this.dataSignal.set(null));
|
|
877
|
+
return;
|
|
878
|
+
}
|
|
879
|
+
untracked(() => {
|
|
880
|
+
this.loadingSignal.set(true);
|
|
881
|
+
this.errorSignal.set(null);
|
|
882
|
+
const sub = obs
|
|
883
|
+
.pipe(shareReplay(1), catchError((err) => {
|
|
884
|
+
this.errorSignal.set(err);
|
|
885
|
+
return of(null);
|
|
886
|
+
}), finalize(() => this.loadingSignal.set(false)))
|
|
887
|
+
.subscribe((value) => {
|
|
888
|
+
this.dataSignal.set(value);
|
|
889
|
+
});
|
|
890
|
+
return () => sub.unsubscribe();
|
|
891
|
+
});
|
|
892
|
+
}, ...(ngDevMode ? [{ debugName: "dataEffect", injector: this.injector }] : [{ injector: this.injector }]));
|
|
893
|
+
/**
|
|
894
|
+
* Initialize with dynamic service operations
|
|
895
|
+
*/
|
|
896
|
+
initService(operations) {
|
|
897
|
+
this.currentOperations = operations;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* GET data
|
|
901
|
+
*/
|
|
902
|
+
loadData(params) {
|
|
903
|
+
if (!this.currentOperations?.get)
|
|
904
|
+
return;
|
|
905
|
+
this.executeOperation('get', () => this.currentOperations.get(params), params);
|
|
906
|
+
this.firstLoadSignal.set(false);
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* GET data by ID
|
|
910
|
+
*/
|
|
911
|
+
getById(id, params) {
|
|
912
|
+
if (!this.currentOperations?.getById)
|
|
913
|
+
return of(null);
|
|
914
|
+
return this.executeOperation('get', () => this.currentOperations.getById(id, params));
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* CREATE data
|
|
918
|
+
*/
|
|
919
|
+
createData(data) {
|
|
920
|
+
if (!this.currentOperations?.create)
|
|
921
|
+
return of(null);
|
|
922
|
+
return this.executeOperation('create', () => this.currentOperations.create(data));
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* UPDATE data
|
|
926
|
+
*/
|
|
927
|
+
updateData(data) {
|
|
928
|
+
if (!this.currentOperations?.update)
|
|
929
|
+
return of(null);
|
|
930
|
+
return this.executeOperation('update', () => this.currentOperations.update(data));
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* UPDATE data by ID
|
|
934
|
+
*/
|
|
935
|
+
updateById(id, data) {
|
|
936
|
+
if (!this.currentOperations?.updateById)
|
|
937
|
+
return of(null);
|
|
938
|
+
return this.executeOperation('updateById', () => this.currentOperations.updateById(id, data));
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* DELETE data
|
|
942
|
+
*/
|
|
943
|
+
deleteData(id) {
|
|
944
|
+
if (!this.currentOperations?.delete)
|
|
945
|
+
return of(null);
|
|
946
|
+
return this.executeOperation('delete', () => this.currentOperations.delete(id));
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* UPDATE status
|
|
950
|
+
*/
|
|
951
|
+
updateStatus(id, status) {
|
|
952
|
+
if (!this.currentOperations?.updateStatus)
|
|
953
|
+
return of(null);
|
|
954
|
+
return this.executeOperation('update', // You can reuse 'update' action or add a new one like 'updateStatus'
|
|
955
|
+
() => this.currentOperations.updateStatus(id, status));
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* SHOW/HIDE form
|
|
959
|
+
* @param show Whether to show or hide the form
|
|
960
|
+
*/
|
|
961
|
+
showForm(show) {
|
|
962
|
+
this.showFormSignal.set(show);
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* Update form action (create/edit)
|
|
966
|
+
* @param action The action to set for the form
|
|
967
|
+
*/
|
|
968
|
+
updateFormAction(action) {
|
|
969
|
+
this.formActionSignal.set(action);
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* Shared operation execution logic
|
|
973
|
+
*/
|
|
974
|
+
executeOperation(action, operation, params) {
|
|
975
|
+
this.errorSignal.set(null);
|
|
976
|
+
this.loadingSignal.set(true);
|
|
977
|
+
this.actionSignal.set(action);
|
|
978
|
+
if (action === 'get') {
|
|
979
|
+
this.currentParams = params;
|
|
980
|
+
}
|
|
981
|
+
const operation$ = operation().pipe(untilDestroyed(this), catchError((err) => {
|
|
982
|
+
this.errorSignal.set(err);
|
|
983
|
+
return of(null);
|
|
984
|
+
}), finalize(() => {
|
|
985
|
+
this.loadingSignal.set(false);
|
|
986
|
+
this.actionSignal.set(null);
|
|
987
|
+
}), shareReplay(1));
|
|
988
|
+
if (action === 'get') {
|
|
989
|
+
this.sourceSignal.set(operation$);
|
|
990
|
+
}
|
|
991
|
+
else {
|
|
992
|
+
operation$.subscribe(() => {
|
|
993
|
+
if (this.currentOperations?.get) {
|
|
994
|
+
this.refresh();
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
return operation$;
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* Refresh current data
|
|
1002
|
+
*/
|
|
1003
|
+
refresh() {
|
|
1004
|
+
if (this.currentOperations?.get && this.currentParams) {
|
|
1005
|
+
this.loadData(this.currentParams);
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
get entityName() {
|
|
1009
|
+
return 'Item';
|
|
1010
|
+
}
|
|
1011
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CrudAbstractComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1012
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CrudAbstractComponent });
|
|
1013
|
+
};
|
|
1014
|
+
CrudAbstractComponent = __decorate([
|
|
1015
|
+
UntilDestroy()
|
|
1016
|
+
], CrudAbstractComponent);
|
|
1017
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CrudAbstractComponent, decorators: [{
|
|
1018
|
+
type: Injectable
|
|
1019
|
+
}] });
|
|
1020
|
+
|
|
1021
|
+
// Components
|
|
522
1022
|
// export * from './lib/components/components';
|
|
523
1023
|
|
|
524
1024
|
/**
|
|
525
1025
|
* Generated bundle index. Do not edit.
|
|
526
1026
|
*/
|
|
527
1027
|
|
|
528
|
-
export { BasicNgSelectComponent, EmptyComponent, FgAddressComponent, FileUploadComponent, FormFieldWrapperComponent };
|
|
1028
|
+
export { BasicNgSelectComponent, CrudAbstractComponent, DataTableComponent, DynamicNgSelectComponent, EmptyComponent, FgAddressComponent, FileUploadComponent, FormFieldWrapperComponent, PaginatedRequest };
|
|
529
1029
|
//# sourceMappingURL=winexist-ngp.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"winexist-ngp.mjs","sources":["../../../packages/src/lib/components/empty/empty.component.ts","../../../packages/src/lib/components/empty/empty.component.html","../../../packages/src/lib/components/file-upload/file-upload.component.ts","../../../packages/src/lib/components/file-upload/file-upload.component.html","../../../packages/src/lib/components/form-field-wrapper/form-field-wrapper.component.ts","../../../packages/src/lib/components/form-field-wrapper/form-field-wrapper.component.html","../../../packages/src/lib/components/select/ng-select/basic/basic-ng-select.component.ts","../../../packages/src/lib/components/select/ng-select/basic/basic-ng-select.component.html","../../../packages/src/lib/services/address/address.service.ts","../../../packages/src/lib/components/fg-address/fg-address.component.ts","../../../packages/src/lib/components/fg-address/fg-address.component.html","../../../packages/src/index.ts","../../../packages/src/winexist-ngp.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\n\n@Component({\n\tselector: 'ngp-empty',\n\timports: [],\n\ttemplateUrl: './empty.component.html',\n\tstyleUrl: './empty.component.css'\n})\nexport class EmptyComponent {\n\ttitle = input<string>('Section is empty.');\n\tmessage = input<string>('No data available.');\n\timgSrc = input<string>();\n\n}\n","<div class=\"w-full flex justify-center items-center p-5 h-full\">\n <div class=\"flex items-center gap-3\">\n @if (imgSrc()) {\n <img alt=\"Empty\" [src]=\"imgSrc()\" class=\"w-[80px]\" />\n } @else {\n <div class=\"!rounded-md p-5 !bg-slate-100 mb-6\">\n <span class=\"material-icons !text-gray-400 !text-7xl\"> search_off </span>\n </div>\n }\n\n <div class=\"flex flex-col\">\n <span class=\"!text-gray-900 !text-2xl !font-bold\">{{ title() }}</span>\n @if (message()) {\n <span class=\"!text-gray-400 !text-base\">{{ message() }}</span>\n }\n </div>\n </div>\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, effect, ElementRef, input, output, signal, ViewChild } from '@angular/core';\nimport { FileSelectEvent, FileUploadModule } from 'primeng/fileupload';\n\n// Add interface for typed files\ninterface TypedFile extends File {\n\tfileType?: 'image' | 'pdf' | 'other';\n}\n\n@Component({\n\tselector: 'ngp-file-upload',\n\timports: [FileUploadModule, CommonModule],\n\ttemplateUrl: './file-upload.component.html',\n\tstyleUrl: './file-upload.component.css',\n})\nexport class FileUploadComponent {\n\t@ViewChild('fileUploader') fileUploader!: ElementRef;\n\n\t// Signal-based inputs with defaults\n\tfiles = input<File[]>([]);\n\tmultiple = input(true);\n\taccept = input('.pdf,.png,.jpg,.jpeg,.doc,.docx,.csv,.xls,.xlsx');\n\tmaxFileSize = input(2097152); // 2MB in bytes\n\tplaceholder = input('Drag and drop new files here to upload.');\n\tshowUploadButton = input<boolean>(false);\n\tcancelLabel = input('Clear');\n\n\t// Signal-based outputs\n\tfilesSelected = output<File[]>();\n\tfilesCleared = output<void>();\n\n\t// Internal state\n\tuploadedFiles = signal<TypedFile[]>([]);\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst _files = this.files();\n\t\t\tif (_files.length) {\n\t\t\t\tthis.uploadedFiles.set(_files.map((file) => this.addFileType(file)));\n\t\t\t}\n\t\t});\n\t}\n\n\tonFileSelect(event: FileSelectEvent) {\n\t\tconst validFiles = event.currentFiles.filter(\n\t\t\t(file) => file.size <= this.maxFileSize() && this.isValidFileType(file)\n\t\t);\n\n\t\tif (validFiles.length) {\n\t\t\t// Add type to files before adding to uploadedFiles\n\t\t\tconst typedFiles = validFiles.map((file) => this.addFileType(file));\n\n\t\t\tif (this.multiple()) {\n\t\t\t\tthis.uploadedFiles.update((files) => Array.from(new Set([...files, ...typedFiles])));\n\t\t\t} else {\n\t\t\t\tthis.uploadedFiles.set(typedFiles);\n\t\t\t}\n\t\t\tthis.filesSelected.emit(typedFiles);\n\t\t}\n\t}\n\n\tonClear() {\n\t\tthis.uploadedFiles.set([]);\n\t\tthis.filesCleared.emit();\n\t}\n\n\tremoveFile(index: number) {\n\t\tthis.uploadedFiles.update((files) => files.filter((_, i) => i !== index));\n\t\tthis.filesSelected.emit(this.uploadedFiles());\n\t}\n\n\tisValidFileType(file: File): boolean {\n\t\tconst acceptedTypes = this.accept().split(',');\n\t\treturn acceptedTypes.some((type) =>\n\t\t\tfile.name.toLowerCase().endsWith(type.trim().toLowerCase())\n\t\t);\n\t}\n\n\tformatFileSize(bytes: number): string {\n\t\tif (bytes === 0) return '0 Bytes';\n\t\tconst k = 1024;\n\t\tconst sizes = ['Bytes', 'KB', 'MB', 'GB'];\n\t\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\t\treturn parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n\t}\n\n\tclear() {\n\t\tthis.uploadedFiles.set([]);\n\t\tif (this.fileUploader?.nativeElement?.clear) {\n\t\t\tthis.fileUploader.nativeElement.clear();\n\t\t}\n\t}\n\n\t// Function to determine file type based on extension\n\tgetFileTypeByExtension(file: File): 'image' | 'pdf' | 'other' {\n\t\tconst fileName = file.name.toLowerCase();\n\t\tconst imageExtensions = ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.svg', '.webp'];\n\t\tconst pdfExtension = '.pdf';\n\n\t\tif (imageExtensions.some((ext) => fileName.endsWith(ext))) {\n\t\t\treturn 'image';\n\t\t} else if (fileName.endsWith(pdfExtension)) {\n\t\t\treturn 'pdf';\n\t\t} else {\n\t\t\treturn 'other';\n\t\t}\n\t}\n\n\t// Function to add type property to file\n\taddFileType(file: File): TypedFile {\n\t\tconst typedFile = file as TypedFile;\n\t\ttypedFile.fileType = this.getFileTypeByExtension(file);\n\t\treturn typedFile;\n\t}\n}\n","<p-fileupload #fileUploader [multiple]=\"multiple()\" [showUploadButton]=\"showUploadButton()\"\n [cancelLabel]=\"cancelLabel()\" [accept]=\"accept()\" auto=\"false\" [maxFileSize]=\"maxFileSize()\" mode=\"advanced\"\n [customUpload]=\"true\" styleClass=\"!bg-gray-50\" (onSelect)=\"onFileSelect($event)\" (onClear)=\"onClear()\">\n <ng-template #content>\n @if (uploadedFiles().length) {\n <ul class=\"space-y-2\">\n @for (file of uploadedFiles(); track $index) {\n <li class=\"flex justify-between gap-4 p-2 bg-gray-100 rounded\">\n <div class=\"flex gap-2\">\n <ng-container [ngTemplateOutlet]=\"iconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: file.fileType }\"></ng-container>\n <span class=\"text-sm\"> {{ file.name }} - {{ formatFileSize(file.size) }} </span>\n </div>\n <button type=\"button\" (click)=\"removeFile($index)\" class=\"text-red-500 hover:text-red-700 text-sm\">\n <span class=\"material-icons !text-base\"> cancel </span>\n </button>\n </li>\n }\n </ul>\n } @else {\n <div class=\"flex flex-col items-center gap-3\">\n <img src=\"assets/images/file-upload.svg\" alt=\"File Upload\" class=\"w-28 mx-auto\" />\n <span class=\"font-semibold text-center text-gray-400 text-sm\">\n Drag & drop or<br />\n click the \"Choose\" button to add new files\n </span>\n </div>\n }\n </ng-template>\n <ng-template #file></ng-template>\n</p-fileupload>\n\n<ng-template #iconTemplate let-type>\n @if (type === 'image') {\n <span class=\"material-icons\"> image </span>\n } @else if (type === 'pdf') {\n <span class=\"material-icons\"> picture_as_pdf </span>\n } @else {\n <span class=\"material-icons\"> insert_drive_file </span>\n }\n</ng-template>","// form-field-wrapper.component.ts\nimport { CommonModule } from '@angular/common';\nimport { Component, ContentChild, Input, AfterContentInit, OnDestroy } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { MessageModule } from 'primeng/message';\n\n@Component({\n\tselector: 'ngp-form-field-wrapper',\n\tstandalone: true,\n\timports: [CommonModule, MessageModule],\n\ttemplateUrl: './form-field-wrapper.component.html',\n\tstyleUrls: ['./form-field-wrapper.component.scss']\n})\nexport class FormFieldWrapperComponent implements AfterContentInit, OnDestroy {\n\t@Input() validationMessages: { [key: string]: string } = {\n\t\trequired: 'This field is required',\n\t\temail: 'Please enter a valid email',\n\t\tminlength: 'Input does not meet minimum length',\n\t\tmaxlength: 'Input exceeds maximum length',\n\t\tpattern: 'Input format is invalid',\n\t\tendTimeBeforeStartTime: 'End time must not be before start time',\n\t\tbreakStartBeforeEarliestStart: 'Break start time cannot be before the earliest start time'\n\t};\n\n\t@ContentChild(NgControl) control?: NgControl;\n\n\tprivate subscription?: Subscription;\n\n\tngAfterContentInit(): void {\n\t\tif (this.control) {\n\t\t\tthis.subscription = this.control.statusChanges?.subscribe(() => { });\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.subscription?.unsubscribe();\n\t}\n\n\tshouldShowError(): boolean {\n\t\treturn (\n\t\t\t!!this.control &&\n\t\t\tthis.control.invalid === true &&\n\t\t\t(this.control.dirty === true || this.control.touched === true)\n\t\t);\n\t}\n\n\tgetErrorMessage(): string {\n\t\tif (!this.control?.errors) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst firstErrorKey = Object.keys(this.control.errors)[0];\n\t\tconst error = this.control.errors[firstErrorKey];\n\n\t\tif (this.control.errors['message']) {\n\t\t\treturn this.control.errors['message'];\n\t\t}\n\t\tif (error?.message) {\n\t\t\treturn error.message;\n\t\t}\n\n\t\treturn this.validationMessages[firstErrorKey] || `Invalid input: ${firstErrorKey}`;\n\t}\n}\n","<div class=\"form-field-container\">\n <ng-content></ng-content>\n @if (shouldShowError()) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\" [text]=\"getErrorMessage()\">\n </p-message>\n }\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, forwardRef, input } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NgSelectModule } from '@ng-select/ng-select';\nimport { FormFieldWrapperComponent } from '../../../form-field-wrapper/form-field-wrapper.component';\nimport { FloatLabelModule } from 'primeng/floatlabel'\nimport { ProgressSpinnerModule } from 'primeng/progressspinner'\n\ntype SelectValue<T> = T | T[];\ntype SelectValueOrNull<T> = SelectValue<T> | null;\n\n@Component({\n\tselector: 'ngp-basic-select',\n\timports: [NgSelectModule, FormsModule, CommonModule, FormFieldWrapperComponent, FloatLabelModule, ProgressSpinnerModule],\n\ttemplateUrl: './basic-ng-select.component.html',\n\tstyleUrl: './basic-ng-select.component.scss',\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => BasicNgSelectComponent),\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class BasicNgSelectComponent<T = any> implements ControlValueAccessor {\n\toptions = input<T[]>([]);\n\tbindLabel = input<string>('');\n\tbindValue = input<string>('');\n\tplaceholder = input<string>('Select an option');\n\tclearable = input<boolean>(true);\n\tsearchable = input<boolean>(true);\n\tloading = input<boolean>(false);\n\tlabel = input<string | null>(null);\n\trequired = input<boolean>(true);\n\n\t// Internal state\n\tvalue: SelectValueOrNull<T> = null;\n\tdisabled = false;\n\n\t// ControlValueAccessor callbacks\n\tprivate onChange: (value: SelectValueOrNull<T>) => void = () => { };\n\tonTouched: () => void = () => { };\n\n\t// Handle value changes from ng-select\n\tonValueChange(value: SelectValueOrNull<T>): void {\n\t\tthis.value = value;\n\t\tthis.onChange(value);\n\t}\n\n\twriteValue(val: SelectValueOrNull<T>): void {\n\t\tthis.value = val;\n\t}\n\n\tregisterOnChange(fn: (val: SelectValueOrNull<T>) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState?(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t// Compare function for ng-select\n\tcompareWith = (item: any, selected: any) => {\n\t\tconst bindValueKey = this.bindValue();\n\n\t\t// If no bindValue is set, compare entire objects\n\t\tif (!bindValueKey) {\n\t\t\treturn item === selected;\n\t\t}\n\n\t\t// Handle null/undefined cases\n\t\tif (!item || !selected) {\n\t\t\treturn item === selected;\n\t\t}\n\n\t\t// If selected is a primitive (just the id), compare with item's property\n\t\tif (typeof selected !== 'object') {\n\t\t\treturn item[bindValueKey] === selected;\n\t\t}\n\n\t\t// If both are objects, compare the bindValue property\n\t\treturn item[bindValueKey] === selected[bindValueKey];\n\t};\n}\n","<ngp-form-field-wrapper>\n <p-floatlabel variant=\"in\">\n <ng-select [(ngModel)]=\"value\" [bindLabel]=\"bindLabel()\" [bindValue]=\"bindValue()\" [items]=\"options()\"\n [compareWith]=\"compareWith\" [clearable]=\"clearable()\" (change)=\"onValueChange($event)\">\n <ng-template ng-loadingspinner-tmp>\n <ng-container [ngTemplateOutlet]=\"spinner\" />\n </ng-template>\n </ng-select>\n\n @if (label()) {\n <label class=\"block mb-2\" [ngClass]=\"{'required-label': required() }\">{{ label() }}</label>\n }\n </p-floatlabel>\n</ngp-form-field-wrapper>\n\n<ng-template #spinner>\n <p-progress-spinner ariaLabel=\"loading\" styleClass=\"text-gray-400\" />\n</ng-template>","import { HttpClient } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { IdName } from '../../models/common.model';\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class AddressService {\n\turl = `/api/v1/records/address`;\n\thttp = inject(HttpClient);\n\n\tgetProvinces(): Observable<IdName[]> {\n\t\treturn this.http.get<IdName[]>(`${this.url}/provinces`);\n\t}\n\n\tgetMunicipalities(provinceId: number): Observable<any> {\n\t\treturn this.http.get<any>(`${this.url}/municipalities/${provinceId}`);\n\t}\n\n\tgetBarangays(muncipalityId: any, params?: any): Observable<any> {\n\t\treturn this.http.get<any>(`${this.url}/barangay/${muncipalityId}`, { params });\n\t}\n}\n","import { Component, effect, forwardRef, inject, input, signal } from '@angular/core';\nimport {\n\tAbstractControl,\n\tControlValueAccessor,\n\tFormBuilder,\n\tFormGroup,\n\tNG_VALIDATORS,\n\tNG_VALUE_ACCESSOR,\n\tReactiveFormsModule,\n\tValidationErrors,\n\tValidator\n} from '@angular/forms';\nimport { RxwebValidators } from '@rxweb/reactive-form-validators';\nimport { IdName } from '../../models/common.model';\nimport { Subscription } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { FormFieldWrapperComponent } from '../form-field-wrapper/form-field-wrapper.component';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { InputNumberModule } from 'primeng/inputnumber';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { NgSelectModule } from '@ng-select/ng-select';\nimport { Address, Barangay, City } from '../../models/address.model';\nimport { AddressService } from '../../services/address/address.service';\n\n@Component({\n\tselector: 'ngp-fg-address',\n\timports: [\n\t\tInputTextModule,\n\t\tInputNumberModule,\n\t\tFloatLabelModule,\n\t\tCommonModule,\n\t\tReactiveFormsModule,\n\t\tFormFieldWrapperComponent,\n\t\tNgSelectModule\n\t],\n\ttemplateUrl: './fg-address.component.html',\n\tstyleUrl: './fg-address.component.scss',\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => FgAddressComponent),\n\t\t\tmulti: true\n\t\t},\n\t\t{\n\t\t\tprovide: NG_VALIDATORS,\n\t\t\tuseExisting: forwardRef(() => FgAddressComponent),\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class FgAddressComponent implements ControlValueAccessor, Validator {\n\tshowHeader = input<boolean>(true);\n\tisCreateMode = input<boolean>(true);\n\n\taddressForm!: FormGroup;\n\tprovHttp$!: Subscription;\n\tcityHttp$!: Subscription;\n\tbarangayHttp$!: Subscription;\n\tprovinceOptions: IdName[] = [];\n\tcityOptions: City[] = [];\n\tbarangayOptions: Barangay[] = [];\n\n\tisDisabled = signal<boolean>(false);\n\tprivate pendingAddress: Address | null = null;\n\tprivate isInitializing = false;\n\tprivate detectedEditMode = false;\n\n\tprivate onChange: (value: Address | null) => void = () => {};\n\tprivate onTouched: () => void = () => {};\n\n\tprivate readonly addressService = inject(AddressService);\n\tprivate readonly fb = inject(FormBuilder);\n\n\tconstructor() {\n\t\tthis.addressForm = this.fb.group({\n\t\t\tline1: [null, RxwebValidators.required()],\n\t\t\tline2: [null],\n\t\t\tbarangay: [null, RxwebValidators.required()],\n\t\t\tcity: [null, RxwebValidators.required()],\n\t\t\tprovince: [null, RxwebValidators.required()],\n\t\t\tcountry: ['Philippines', RxwebValidators.required()],\n\t\t\tzipCode: [null, RxwebValidators.required()],\n\t\t\tlandmark: [null, RxwebValidators.required()]\n\t\t});\n\n\t\t// Use effect to watch for form value changes\n\t\teffect(() => {\n\t\t\tif (this.isDisabled()) {\n\t\t\t\tthis.addressForm.disable({ emitEvent: false });\n\t\t\t} else {\n\t\t\t\tthis.addressForm.enable({ emitEvent: false });\n\t\t\t}\n\t\t});\n\n\t\t// Subscribe to form changes\n\t\tthis.addressForm.valueChanges.subscribe((value) => {\n\t\t\tthis.onChange(value);\n\t\t\tthis.onTouched();\n\t\t});\n\n\t\tthis.loadProvince();\n\n\t\t// Handle province changes - works for both create and edit mode\n\t\tthis.addressForm.get('province')?.valueChanges.subscribe((prov) => {\n\t\t\tif (prov && !this.isInitializing) {\n\t\t\t\tthis.clearFieldByName('city');\n\t\t\t\tthis.clearFieldByName('barangay');\n\t\t\t\tthis.cityOptions = [];\n\t\t\t\tthis.barangayOptions = [];\n\t\t\t\tthis.loadCityByProvinceId(prov.id);\n\t\t\t}\n\t\t});\n\n\t\t// Handle city changes - works for both create and edit mode\n\t\tthis.addressForm.get('city')?.valueChanges.subscribe((city) => {\n\t\t\tif (city && !this.isInitializing) {\n\t\t\t\tthis.clearFieldByName('barangay');\n\t\t\t\tthis.barangayOptions = [];\n\t\t\t\tthis.loadBarangayByCityId(city.id);\n\t\t\t}\n\t\t});\n\t}\n\n\tclearFieldByName(fieldName: string): void {\n\t\tthis.addressForm.get(fieldName)?.setValue(null, { emitEvent: false });\n\t}\n\n\tloadProvince(): void {\n\t\tthis.provHttp$ = this.addressService.getProvinces().subscribe((res) => {\n\t\t\tthis.provinceOptions = res;\n\n\t\t\t// If we have a pending address to load, process it now\n\t\t\tif (this.pendingAddress) {\n\t\t\t\tthis.initializeEditMode(this.pendingAddress);\n\t\t\t}\n\t\t});\n\t}\n\n\tloadCityByProvinceId(id: number): void {\n\t\tthis.cityHttp$ = this.addressService.getMunicipalities(id).subscribe((res) => {\n\t\t\tthis.cityOptions = res;\n\n\t\t\t// Continue initialization if needed\n\t\t\tif (this.isInitializing && this.pendingAddress) {\n\t\t\t\tthis.setCityFromPending();\n\t\t\t}\n\t\t});\n\t}\n\n\tloadBarangayByCityId(id: number): void {\n\t\tthis.barangayHttp$ = this.addressService.getBarangays(id).subscribe((res) => {\n\t\t\tthis.barangayOptions = res;\n\n\t\t\t// Continue initialization if needed\n\t\t\tif (this.isInitializing && this.pendingAddress) {\n\t\t\t\tthis.setBarangayFromPending();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Detects if the address contains data that requires edit mode initialization\n\t */\n\tprivate isEditModeAddress(address: Address): boolean {\n\t\t// Check if any cascading field (province, city, barangay) is a string (name)\n\t\t// This indicates data from backend that needs to be matched with dropdown options\n\t\treturn (\n\t\t\t(typeof address.province === 'string' && address.province !== '') ||\n\t\t\t(typeof address.city === 'string' && address.city !== '') ||\n\t\t\t(typeof address.barangay === 'string' && address.barangay !== '')\n\t\t);\n\t}\n\n\tprivate initializeEditMode(address: Address): void {\n\t\tthis.isInitializing = true;\n\n\t\t// Set non-cascading fields first\n\t\tthis.addressForm.patchValue(\n\t\t\t{\n\t\t\t\tline1: address.line1,\n\t\t\t\tline2: address.line2,\n\t\t\t\tcountry: address.country || 'Philippines',\n\t\t\t\tzipCode: address.zipCode,\n\t\t\t\tlandmark: address.landmark\n\t\t\t},\n\t\t\t{ emitEvent: false }\n\t\t);\n\n\t\t// Find and set province\n\t\tif (address.province && typeof address.province === 'string') {\n\t\t\tconst provinceItem = this.provinceOptions.find(\n\t\t\t\t(p) => p.name.toLowerCase() === address.province?.toLowerCase()\n\t\t\t);\n\n\t\t\tif (provinceItem) {\n\t\t\t\tthis.addressForm.get('province')?.setValue(provinceItem, { emitEvent: false });\n\t\t\t\tthis.loadCityByProvinceId(provinceItem.id);\n\t\t\t} else {\n\t\t\t\tthis.completeInitialization();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.completeInitialization();\n\t\t}\n\t}\n\n\tprivate setCityFromPending(): void {\n\t\tif (!this.pendingAddress?.city || typeof this.pendingAddress.city !== 'string') {\n\t\t\tthis.completeInitialization();\n\t\t\treturn;\n\t\t}\n\n\t\tconst cityItem = this.cityOptions.find(\n\t\t\t(c) => c.name.toLowerCase() === this.pendingAddress!.city?.toLowerCase()\n\t\t);\n\n\t\tif (cityItem) {\n\t\t\tthis.addressForm.get('city')?.setValue(cityItem, { emitEvent: false });\n\t\t\tthis.loadBarangayByCityId(cityItem.id);\n\t\t} else {\n\t\t\tthis.completeInitialization();\n\t\t}\n\t}\n\n\tprivate setBarangayFromPending(): void {\n\t\tif (!this.pendingAddress?.barangay || typeof this.pendingAddress.barangay !== 'string') {\n\t\t\tthis.completeInitialization();\n\t\t\treturn;\n\t\t}\n\n\t\tconst barangayItem = this.barangayOptions.find(\n\t\t\t(b) => b.name.toLowerCase() === this.pendingAddress!.barangay?.toLowerCase()\n\t\t);\n\n\t\tif (barangayItem) {\n\t\t\tthis.addressForm.get('barangay')?.setValue(barangayItem, { emitEvent: false });\n\t\t}\n\n\t\tthis.completeInitialization();\n\t}\n\n\tprivate completeInitialization(): void {\n\t\tthis.isInitializing = false;\n\t\tthis.pendingAddress = null;\n\t}\n\n\t// ControlValueAccessor methods\n\twriteValue(value: Address | null): void {\n\t\tif (value) {\n\t\t\t// Auto-detect if this is edit mode based on the address data structure\n\t\t\tthis.detectedEditMode = this.isEditModeAddress(value);\n\n\t\t\tif (this.detectedEditMode) {\n\t\t\t\t// Address contains string values (names) - needs initialization\n\t\t\t\tthis.pendingAddress = value;\n\n\t\t\t\t// If provinces are already loaded, start initialization\n\t\t\t\tif (this.provinceOptions.length > 0) {\n\t\t\t\t\tthis.initializeEditMode(value);\n\t\t\t\t}\n\t\t\t\t// Otherwise, it will be triggered when provinces load\n\t\t\t} else {\n\t\t\t\t// Create mode or already has proper objects\n\t\t\t\tthis.addressForm.patchValue(value, { emitEvent: false });\n\n\t\t\t\t// Load cascading data if IDs are present\n\t\t\t\tconst province = value.province;\n\t\t\t\tif (province && typeof province === 'object' && 'id' in province) {\n\t\t\t\t\tthis.loadCityByProvinceId((province as any).id);\n\t\t\t\t}\n\n\t\t\t\tconst city = value.city;\n\t\t\t\tif (city && typeof city === 'object' && 'id' in city) {\n\t\t\t\t\tthis.loadBarangayByCityId((city as any).id);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.addressForm.reset({ country: 'Philippines' }, { emitEvent: false });\n\t\t}\n\t}\n\n\tregisterOnChange(fn: (value: Address | null) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.isDisabled?.set(isDisabled);\n\t\tif (isDisabled) {\n\t\t\tthis.addressForm.disable();\n\t\t} else {\n\t\t\tthis.addressForm.enable();\n\t\t}\n\t}\n\n\tvalidate(control: AbstractControl): ValidationErrors | null {\n\t\treturn this.addressForm?.valid ? null : { invalidAddress: true };\n\t}\n}\n","@if (showHeader()) {\n\t<h2 class=\"text-xl font-semibold mb-4\">Address</h2>\n}\n<form [formGroup]=\"addressForm\">\n\t<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<input pInputText trim=\"blur\" id=\"country\" formControlName=\"country\" class=\"w-full\" />\n\t\t\t\t\t<label for=\"country\" class=\"block mb-2 required-label\">Country</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<ng-select\n\t\t\t\t\t\tformControlName=\"province\"\n\t\t\t\t\t\t[items]=\"provinceOptions\"\n\t\t\t\t\t\t[loading]=\"provHttp$ && !provHttp$.closed\"\n\t\t\t\t\t\tbindLabel=\"name\" />\n\t\t\t\t\t<label for=\"province\" class=\"block mb-2 required-label\">Province</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t</div>\n\n\t<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<ng-select\n\t\t\t\t\t\tformControlName=\"city\"\n\t\t\t\t\t\t[items]=\"cityOptions\"\n\t\t\t\t\t\t[loading]=\"cityHttp$ && !cityHttp$.closed\"\n\t\t\t\t\t\tbindLabel=\"name\" />\n\t\t\t\t\t<label for=\"city\" class=\"block mb-2 required-label\">City/Municipality</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<ng-select\n\t\t\t\t\t\tformControlName=\"barangay\"\n\t\t\t\t\t\t[items]=\"barangayOptions\"\n\t\t\t\t\t\t[loading]=\"barangayHttp$ && !barangayHttp$.closed\"\n\t\t\t\t\t\tbindLabel=\"name\" />\n\n\t\t\t\t\t<label for=\"barangay\" class=\"block mb-2 required-label\">Barangay</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t</div>\n\n\t<div>\n\t\t<ngp-form-field-wrapper>\n\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t<label for=\"line1\" class=\"block mb-2 required-label\">Line 1</label>\n\t\t\t\t<input pInputText trim=\"blur\" id=\"line1\" formControlName=\"line1\" class=\"w-full\" />\n\t\t\t</p-floatlabel>\n\t\t</ngp-form-field-wrapper>\n\t</div>\n\n\t<div>\n\t\t<ngp-form-field-wrapper>\n\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t<label for=\"line2\" class=\"block mb-2\">Line 2</label>\n\t\t\t\t<input pInputText trim=\"blur\" id=\"line2\" formControlName=\"line2\" class=\"w-full\" />\n\t\t\t</p-floatlabel>\n\t\t</ngp-form-field-wrapper>\n\t</div>\n\t<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<p-inputnumber\n\t\t\t\t\t\t[inputId]=\"'zipCode'\"\n\t\t\t\t\t\tformControlName=\"zipCode\"\n\t\t\t\t\t\tstyleClass=\"w-full\"\n\t\t\t\t\t\t[useGrouping]=\"false\" />\n\t\t\t\t\t<label for=\"zipCode\" class=\"block mb-2 required-label\">Zip Code</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<label for=\"landmark\" class=\"block mb-2 required-label\">Nearest Landmark</label>\n\t\t\t\t\t<input pInputText trim=\"blur\" id=\"landmark\" formControlName=\"landmark\" class=\"w-full\" />\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t</div>\n</form>\n","// export * from './lib/components/components';\nexport * from './lib/components/empty/empty.component'\nexport * from './lib/components/file-upload/file-upload.component'\nexport * from './lib/components/form-field-wrapper/form-field-wrapper.component'\nexport * from './lib/components/select/ng-select/basic/basic-ng-select.component'\nexport * from './lib/components/fg-address/fg-address.component'\n\n// Models\nexport * from './lib/models/common.model'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i1","i4","i3","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MAQa,cAAc,CAAA;AAC1B,IAAA,KAAK,GAAG,KAAK,CAAS,mBAAmB,iDAAC;AAC1C,IAAA,OAAO,GAAG,KAAK,CAAS,oBAAoB,mDAAC;IAC7C,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;wGAHZ,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,kcCR3B,gnBAiBM,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FDTO,cAAc,EAA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AACC,4BAAA,OAAO,EAAE,aAAa;AACtB,4BAAA,WAAW,EAAE,UAAU,CAAC,wBAAwB,CAAC;AACjD,4BAAA,KAAK,EAAE;AACP;AACD,qBAAA,EAAA,QAAA,EAAA,40GAAA,EAAA;;;AEhDF;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"winexist-ngp.mjs","sources":["../../../packages/src/lib/components/empty/empty.component.ts","../../../packages/src/lib/components/empty/empty.component.html","../../../packages/src/lib/components/file-upload/file-upload.component.ts","../../../packages/src/lib/components/file-upload/file-upload.component.html","../../../packages/src/lib/components/form-field-wrapper/form-field-wrapper.component.ts","../../../packages/src/lib/components/form-field-wrapper/form-field-wrapper.component.html","../../../packages/src/lib/components/select/ng-select/basic/basic-ng-select.component.ts","../../../packages/src/lib/components/select/ng-select/basic/basic-ng-select.component.html","../../../packages/src/lib/services/address/address.service.ts","../../../packages/src/lib/components/fg-address/fg-address.component.ts","../../../packages/src/lib/components/fg-address/fg-address.component.html","../../../packages/src/lib/components/dataview/table/data-table.component.ts","../../../packages/src/lib/components/dataview/table/data-table.component.html","../../../packages/src/lib/components/select/ng-select/dynamic/dynamic-select.component.ts","../../../packages/src/lib/components/select/ng-select/dynamic/dynamic-select.component.html","../../../packages/src/lib/models/paginated.model.ts","../../../packages/src/lib/classes/crud-abstract.class.ts","../../../packages/src/index.ts","../../../packages/src/winexist-ngp.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\n\n@Component({\n\tselector: 'ngp-empty',\n\timports: [],\n\ttemplateUrl: './empty.component.html',\n\tstyleUrl: './empty.component.css'\n})\nexport class EmptyComponent {\n\ttitle = input<string>('Section is empty.');\n\tmessage = input<string>('No data available.');\n\timgSrc = input<string>();\n\n}\n","<div class=\"w-full flex justify-center items-center p-5 h-full\">\n <div class=\"flex items-center gap-3\">\n @if (imgSrc()) {\n <img alt=\"Empty\" [src]=\"imgSrc()\" class=\"w-[80px]\" />\n } @else {\n <div class=\"!rounded-md p-5 !bg-slate-100 mb-6\">\n <span class=\"material-icons !text-gray-400 !text-7xl\"> search_off </span>\n </div>\n }\n\n <div class=\"flex flex-col\">\n <span class=\"!text-gray-900 !text-2xl !font-bold\">{{ title() }}</span>\n @if (message()) {\n <span class=\"!text-gray-400 !text-base\">{{ message() }}</span>\n }\n </div>\n </div>\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, effect, ElementRef, input, output, signal, ViewChild } from '@angular/core';\nimport { FileSelectEvent, FileUploadModule } from 'primeng/fileupload';\n\n// Add interface for typed files\ninterface TypedFile extends File {\n\tfileType?: 'image' | 'pdf' | 'other';\n}\n\n@Component({\n\tselector: 'ngp-file-upload',\n\timports: [FileUploadModule, CommonModule],\n\ttemplateUrl: './file-upload.component.html',\n\tstyleUrl: './file-upload.component.css',\n})\nexport class FileUploadComponent {\n\t@ViewChild('fileUploader') fileUploader!: ElementRef;\n\n\t// Signal-based inputs with defaults\n\tfiles = input<File[]>([]);\n\tmultiple = input(true);\n\taccept = input('.pdf,.png,.jpg,.jpeg,.doc,.docx,.csv,.xls,.xlsx');\n\tmaxFileSize = input(2097152); // 2MB in bytes\n\tplaceholder = input('Drag and drop new files here to upload.');\n\tshowUploadButton = input<boolean>(false);\n\tcancelLabel = input('Clear');\n\n\t// Signal-based outputs\n\tfilesSelected = output<File[]>();\n\tfilesCleared = output<void>();\n\n\t// Internal state\n\tuploadedFiles = signal<TypedFile[]>([]);\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst _files = this.files();\n\t\t\tif (_files.length) {\n\t\t\t\tthis.uploadedFiles.set(_files.map((file) => this.addFileType(file)));\n\t\t\t}\n\t\t});\n\t}\n\n\tonFileSelect(event: FileSelectEvent) {\n\t\tconst validFiles = event.currentFiles.filter(\n\t\t\t(file) => file.size <= this.maxFileSize() && this.isValidFileType(file)\n\t\t);\n\n\t\tif (validFiles.length) {\n\t\t\t// Add type to files before adding to uploadedFiles\n\t\t\tconst typedFiles = validFiles.map((file) => this.addFileType(file));\n\n\t\t\tif (this.multiple()) {\n\t\t\t\tthis.uploadedFiles.update((files) => Array.from(new Set([...files, ...typedFiles])));\n\t\t\t} else {\n\t\t\t\tthis.uploadedFiles.set(typedFiles);\n\t\t\t}\n\t\t\tthis.filesSelected.emit(typedFiles);\n\t\t}\n\t}\n\n\tonClear() {\n\t\tthis.uploadedFiles.set([]);\n\t\tthis.filesCleared.emit();\n\t}\n\n\tremoveFile(index: number) {\n\t\tthis.uploadedFiles.update((files) => files.filter((_, i) => i !== index));\n\t\tthis.filesSelected.emit(this.uploadedFiles());\n\t}\n\n\tisValidFileType(file: File): boolean {\n\t\tconst acceptedTypes = this.accept().split(',');\n\t\treturn acceptedTypes.some((type) =>\n\t\t\tfile.name.toLowerCase().endsWith(type.trim().toLowerCase())\n\t\t);\n\t}\n\n\tformatFileSize(bytes: number): string {\n\t\tif (bytes === 0) return '0 Bytes';\n\t\tconst k = 1024;\n\t\tconst sizes = ['Bytes', 'KB', 'MB', 'GB'];\n\t\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\t\treturn parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n\t}\n\n\tclear() {\n\t\tthis.uploadedFiles.set([]);\n\t\tif (this.fileUploader?.nativeElement?.clear) {\n\t\t\tthis.fileUploader.nativeElement.clear();\n\t\t}\n\t}\n\n\t// Function to determine file type based on extension\n\tgetFileTypeByExtension(file: File): 'image' | 'pdf' | 'other' {\n\t\tconst fileName = file.name.toLowerCase();\n\t\tconst imageExtensions = ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.svg', '.webp'];\n\t\tconst pdfExtension = '.pdf';\n\n\t\tif (imageExtensions.some((ext) => fileName.endsWith(ext))) {\n\t\t\treturn 'image';\n\t\t} else if (fileName.endsWith(pdfExtension)) {\n\t\t\treturn 'pdf';\n\t\t} else {\n\t\t\treturn 'other';\n\t\t}\n\t}\n\n\t// Function to add type property to file\n\taddFileType(file: File): TypedFile {\n\t\tconst typedFile = file as TypedFile;\n\t\ttypedFile.fileType = this.getFileTypeByExtension(file);\n\t\treturn typedFile;\n\t}\n}\n","<p-fileupload #fileUploader [multiple]=\"multiple()\" [showUploadButton]=\"showUploadButton()\"\n [cancelLabel]=\"cancelLabel()\" [accept]=\"accept()\" auto=\"false\" [maxFileSize]=\"maxFileSize()\" mode=\"advanced\"\n [customUpload]=\"true\" styleClass=\"!bg-gray-50\" (onSelect)=\"onFileSelect($event)\" (onClear)=\"onClear()\">\n <ng-template #content>\n @if (uploadedFiles().length) {\n <ul class=\"space-y-2\">\n @for (file of uploadedFiles(); track $index) {\n <li class=\"flex justify-between gap-4 p-2 bg-gray-100 rounded\">\n <div class=\"flex gap-2\">\n <ng-container [ngTemplateOutlet]=\"iconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: file.fileType }\"></ng-container>\n <span class=\"text-sm\"> {{ file.name }} - {{ formatFileSize(file.size) }} </span>\n </div>\n <button type=\"button\" (click)=\"removeFile($index)\" class=\"text-red-500 hover:text-red-700 text-sm\">\n <span class=\"material-icons !text-base\"> cancel </span>\n </button>\n </li>\n }\n </ul>\n } @else {\n <div class=\"flex flex-col items-center gap-3\">\n <img src=\"assets/images/file-upload.svg\" alt=\"File Upload\" class=\"w-28 mx-auto\" />\n <span class=\"font-semibold text-center text-gray-400 text-sm\">\n Drag & drop or<br />\n click the \"Choose\" button to add new files\n </span>\n </div>\n }\n </ng-template>\n <ng-template #file></ng-template>\n</p-fileupload>\n\n<ng-template #iconTemplate let-type>\n @if (type === 'image') {\n <span class=\"material-icons\"> image </span>\n } @else if (type === 'pdf') {\n <span class=\"material-icons\"> picture_as_pdf </span>\n } @else {\n <span class=\"material-icons\"> insert_drive_file </span>\n }\n</ng-template>","// form-field-wrapper.component.ts\nimport { CommonModule } from '@angular/common';\nimport { Component, ContentChild, Input, AfterContentInit, OnDestroy } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { MessageModule } from 'primeng/message';\n\n@Component({\n\tselector: 'ngp-form-field-wrapper',\n\tstandalone: true,\n\timports: [CommonModule, MessageModule],\n\ttemplateUrl: './form-field-wrapper.component.html',\n\tstyleUrls: ['./form-field-wrapper.component.scss']\n})\nexport class FormFieldWrapperComponent implements AfterContentInit, OnDestroy {\n\t@Input() validationMessages: { [key: string]: string } = {\n\t\trequired: 'This field is required',\n\t\temail: 'Please enter a valid email',\n\t\tminlength: 'Input does not meet minimum length',\n\t\tmaxlength: 'Input exceeds maximum length',\n\t\tpattern: 'Input format is invalid',\n\t\tendTimeBeforeStartTime: 'End time must not be before start time',\n\t\tbreakStartBeforeEarliestStart: 'Break start time cannot be before the earliest start time'\n\t};\n\n\t@ContentChild(NgControl) control?: NgControl;\n\n\tprivate subscription?: Subscription;\n\n\tngAfterContentInit(): void {\n\t\tif (this.control) {\n\t\t\tthis.subscription = this.control.statusChanges?.subscribe(() => { });\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.subscription?.unsubscribe();\n\t}\n\n\tshouldShowError(): boolean {\n\t\treturn (\n\t\t\t!!this.control &&\n\t\t\tthis.control.invalid === true &&\n\t\t\t(this.control.dirty === true || this.control.touched === true)\n\t\t);\n\t}\n\n\tgetErrorMessage(): string {\n\t\tif (!this.control?.errors) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst firstErrorKey = Object.keys(this.control.errors)[0];\n\t\tconst error = this.control.errors[firstErrorKey];\n\n\t\tif (this.control.errors['message']) {\n\t\t\treturn this.control.errors['message'];\n\t\t}\n\t\tif (error?.message) {\n\t\t\treturn error.message;\n\t\t}\n\n\t\treturn this.validationMessages[firstErrorKey] || `Invalid input: ${firstErrorKey}`;\n\t}\n}\n","<div class=\"form-field-container\">\n <ng-content></ng-content>\n @if (shouldShowError()) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\" [text]=\"getErrorMessage()\">\n </p-message>\n }\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, forwardRef, input } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NgSelectModule } from '@ng-select/ng-select';\nimport { FormFieldWrapperComponent } from '../../../form-field-wrapper/form-field-wrapper.component';\nimport { FloatLabelModule } from 'primeng/floatlabel'\nimport { ProgressSpinnerModule } from 'primeng/progressspinner'\n\ntype SelectValue<T> = T | T[];\ntype SelectValueOrNull<T> = SelectValue<T> | null;\n\n@Component({\n\tselector: 'ngp-basic-select',\n\timports: [NgSelectModule, FormsModule, CommonModule, FormFieldWrapperComponent, FloatLabelModule, ProgressSpinnerModule],\n\ttemplateUrl: './basic-ng-select.component.html',\n\tstyleUrl: './basic-ng-select.component.scss',\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => BasicNgSelectComponent),\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class BasicNgSelectComponent<T = any> implements ControlValueAccessor {\n\toptions = input<T[]>([]);\n\tbindLabel = input<string>('');\n\tbindValue = input<string>('');\n\tplaceholder = input<string>('Select an option');\n\tclearable = input<boolean>(true);\n\tsearchable = input<boolean>(true);\n\tloading = input<boolean>(false);\n\tlabel = input<string | null>(null);\n\trequired = input<boolean>(true);\n\n\t// Internal state\n\tvalue: SelectValueOrNull<T> = null;\n\tdisabled = false;\n\n\t// ControlValueAccessor callbacks\n\tprivate onChange: (value: SelectValueOrNull<T>) => void = () => { };\n\tonTouched: () => void = () => { };\n\n\t// Handle value changes from ng-select\n\tonValueChange(value: SelectValueOrNull<T>): void {\n\t\tthis.value = value;\n\t\tthis.onChange(value);\n\t}\n\n\twriteValue(val: SelectValueOrNull<T>): void {\n\t\tthis.value = val;\n\t}\n\n\tregisterOnChange(fn: (val: SelectValueOrNull<T>) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState?(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t// Compare function for ng-select\n\tcompareWith = (item: any, selected: any) => {\n\t\tconst bindValueKey = this.bindValue();\n\n\t\t// If no bindValue is set, compare entire objects\n\t\tif (!bindValueKey) {\n\t\t\treturn item === selected;\n\t\t}\n\n\t\t// Handle null/undefined cases\n\t\tif (!item || !selected) {\n\t\t\treturn item === selected;\n\t\t}\n\n\t\t// If selected is a primitive (just the id), compare with item's property\n\t\tif (typeof selected !== 'object') {\n\t\t\treturn item[bindValueKey] === selected;\n\t\t}\n\n\t\t// If both are objects, compare the bindValue property\n\t\treturn item[bindValueKey] === selected[bindValueKey];\n\t};\n}\n","<ngp-form-field-wrapper>\n <p-floatlabel variant=\"in\">\n <ng-select [(ngModel)]=\"value\" [bindLabel]=\"bindLabel()\" [bindValue]=\"bindValue()\" [items]=\"options()\"\n [compareWith]=\"compareWith\" [clearable]=\"clearable()\" (change)=\"onValueChange($event)\">\n <ng-template ng-loadingspinner-tmp>\n <ng-container [ngTemplateOutlet]=\"spinner\" />\n </ng-template>\n </ng-select>\n\n @if (label()) {\n <label class=\"block mb-2\" [ngClass]=\"{'required-label': required() }\">{{ label() }}</label>\n }\n </p-floatlabel>\n</ngp-form-field-wrapper>\n\n<ng-template #spinner>\n <p-progress-spinner ariaLabel=\"loading\" styleClass=\"text-gray-400\" />\n</ng-template>","import { HttpClient } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { IdName } from '../../models/common.model';\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class AddressService {\n\turl = `/api/v1/records/address`;\n\thttp = inject(HttpClient);\n\n\tgetProvinces(): Observable<IdName[]> {\n\t\treturn this.http.get<IdName[]>(`${this.url}/provinces`);\n\t}\n\n\tgetMunicipalities(provinceId: number): Observable<any> {\n\t\treturn this.http.get<any>(`${this.url}/municipalities/${provinceId}`);\n\t}\n\n\tgetBarangays(muncipalityId: any, params?: any): Observable<any> {\n\t\treturn this.http.get<any>(`${this.url}/barangay/${muncipalityId}`, { params });\n\t}\n}\n","import { Component, effect, forwardRef, inject, input, signal } from '@angular/core';\nimport {\n\tAbstractControl,\n\tControlValueAccessor,\n\tFormBuilder,\n\tFormGroup,\n\tNG_VALIDATORS,\n\tNG_VALUE_ACCESSOR,\n\tReactiveFormsModule,\n\tValidationErrors,\n\tValidator\n} from '@angular/forms';\nimport { RxwebValidators } from '@rxweb/reactive-form-validators';\nimport { IdName } from '../../models/common.model';\nimport { Subscription } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { FormFieldWrapperComponent } from '../form-field-wrapper/form-field-wrapper.component';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { InputNumberModule } from 'primeng/inputnumber';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { NgSelectModule } from '@ng-select/ng-select';\nimport { Address, Barangay, City } from '../../models/address.model';\nimport { AddressService } from '../../services/address/address.service';\n\n@Component({\n\tselector: 'ngp-fg-address',\n\timports: [\n\t\tInputTextModule,\n\t\tInputNumberModule,\n\t\tFloatLabelModule,\n\t\tCommonModule,\n\t\tReactiveFormsModule,\n\t\tFormFieldWrapperComponent,\n\t\tNgSelectModule\n\t],\n\ttemplateUrl: './fg-address.component.html',\n\tstyleUrl: './fg-address.component.scss',\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => FgAddressComponent),\n\t\t\tmulti: true\n\t\t},\n\t\t{\n\t\t\tprovide: NG_VALIDATORS,\n\t\t\tuseExisting: forwardRef(() => FgAddressComponent),\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class FgAddressComponent implements ControlValueAccessor, Validator {\n\tshowHeader = input<boolean>(true);\n\tisCreateMode = input<boolean>(true);\n\n\taddressForm!: FormGroup;\n\tprovHttp$!: Subscription;\n\tcityHttp$!: Subscription;\n\tbarangayHttp$!: Subscription;\n\tprovinceOptions: IdName[] = [];\n\tcityOptions: City[] = [];\n\tbarangayOptions: Barangay[] = [];\n\n\tisDisabled = signal<boolean>(false);\n\tprivate pendingAddress: Address | null = null;\n\tprivate isInitializing = false;\n\tprivate detectedEditMode = false;\n\n\tprivate onChange: (value: Address | null) => void = () => {};\n\tprivate onTouched: () => void = () => {};\n\n\tprivate readonly addressService = inject(AddressService);\n\tprivate readonly fb = inject(FormBuilder);\n\n\tconstructor() {\n\t\tthis.addressForm = this.fb.group({\n\t\t\tline1: [null, RxwebValidators.required()],\n\t\t\tline2: [null],\n\t\t\tbarangay: [null, RxwebValidators.required()],\n\t\t\tcity: [null, RxwebValidators.required()],\n\t\t\tprovince: [null, RxwebValidators.required()],\n\t\t\tcountry: ['Philippines', RxwebValidators.required()],\n\t\t\tzipCode: [null, RxwebValidators.required()],\n\t\t\tlandmark: [null, RxwebValidators.required()]\n\t\t});\n\n\t\t// Use effect to watch for form value changes\n\t\teffect(() => {\n\t\t\tif (this.isDisabled()) {\n\t\t\t\tthis.addressForm.disable({ emitEvent: false });\n\t\t\t} else {\n\t\t\t\tthis.addressForm.enable({ emitEvent: false });\n\t\t\t}\n\t\t});\n\n\t\t// Subscribe to form changes\n\t\tthis.addressForm.valueChanges.subscribe((value) => {\n\t\t\tthis.onChange(value);\n\t\t\tthis.onTouched();\n\t\t});\n\n\t\tthis.loadProvince();\n\n\t\t// Handle province changes - works for both create and edit mode\n\t\tthis.addressForm.get('province')?.valueChanges.subscribe((prov) => {\n\t\t\tif (prov && !this.isInitializing) {\n\t\t\t\tthis.clearFieldByName('city');\n\t\t\t\tthis.clearFieldByName('barangay');\n\t\t\t\tthis.cityOptions = [];\n\t\t\t\tthis.barangayOptions = [];\n\t\t\t\tthis.loadCityByProvinceId(prov.id);\n\t\t\t}\n\t\t});\n\n\t\t// Handle city changes - works for both create and edit mode\n\t\tthis.addressForm.get('city')?.valueChanges.subscribe((city) => {\n\t\t\tif (city && !this.isInitializing) {\n\t\t\t\tthis.clearFieldByName('barangay');\n\t\t\t\tthis.barangayOptions = [];\n\t\t\t\tthis.loadBarangayByCityId(city.id);\n\t\t\t}\n\t\t});\n\t}\n\n\tclearFieldByName(fieldName: string): void {\n\t\tthis.addressForm.get(fieldName)?.setValue(null, { emitEvent: false });\n\t}\n\n\tloadProvince(): void {\n\t\tthis.provHttp$ = this.addressService.getProvinces().subscribe((res) => {\n\t\t\tthis.provinceOptions = res;\n\n\t\t\t// If we have a pending address to load, process it now\n\t\t\tif (this.pendingAddress) {\n\t\t\t\tthis.initializeEditMode(this.pendingAddress);\n\t\t\t}\n\t\t});\n\t}\n\n\tloadCityByProvinceId(id: number): void {\n\t\tthis.cityHttp$ = this.addressService.getMunicipalities(id).subscribe((res) => {\n\t\t\tthis.cityOptions = res;\n\n\t\t\t// Continue initialization if needed\n\t\t\tif (this.isInitializing && this.pendingAddress) {\n\t\t\t\tthis.setCityFromPending();\n\t\t\t}\n\t\t});\n\t}\n\n\tloadBarangayByCityId(id: number): void {\n\t\tthis.barangayHttp$ = this.addressService.getBarangays(id).subscribe((res) => {\n\t\t\tthis.barangayOptions = res;\n\n\t\t\t// Continue initialization if needed\n\t\t\tif (this.isInitializing && this.pendingAddress) {\n\t\t\t\tthis.setBarangayFromPending();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Detects if the address contains data that requires edit mode initialization\n\t */\n\tprivate isEditModeAddress(address: Address): boolean {\n\t\t// Check if any cascading field (province, city, barangay) is a string (name)\n\t\t// This indicates data from backend that needs to be matched with dropdown options\n\t\treturn (\n\t\t\t(typeof address.province === 'string' && address.province !== '') ||\n\t\t\t(typeof address.city === 'string' && address.city !== '') ||\n\t\t\t(typeof address.barangay === 'string' && address.barangay !== '')\n\t\t);\n\t}\n\n\tprivate initializeEditMode(address: Address): void {\n\t\tthis.isInitializing = true;\n\n\t\t// Set non-cascading fields first\n\t\tthis.addressForm.patchValue(\n\t\t\t{\n\t\t\t\tline1: address.line1,\n\t\t\t\tline2: address.line2,\n\t\t\t\tcountry: address.country || 'Philippines',\n\t\t\t\tzipCode: address.zipCode,\n\t\t\t\tlandmark: address.landmark\n\t\t\t},\n\t\t\t{ emitEvent: false }\n\t\t);\n\n\t\t// Find and set province\n\t\tif (address.province && typeof address.province === 'string') {\n\t\t\tconst provinceItem = this.provinceOptions.find(\n\t\t\t\t(p) => p.name.toLowerCase() === address.province?.toLowerCase()\n\t\t\t);\n\n\t\t\tif (provinceItem) {\n\t\t\t\tthis.addressForm.get('province')?.setValue(provinceItem, { emitEvent: false });\n\t\t\t\tthis.loadCityByProvinceId(provinceItem.id);\n\t\t\t} else {\n\t\t\t\tthis.completeInitialization();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.completeInitialization();\n\t\t}\n\t}\n\n\tprivate setCityFromPending(): void {\n\t\tif (!this.pendingAddress?.city || typeof this.pendingAddress.city !== 'string') {\n\t\t\tthis.completeInitialization();\n\t\t\treturn;\n\t\t}\n\n\t\tconst cityItem = this.cityOptions.find(\n\t\t\t(c) => c.name.toLowerCase() === this.pendingAddress!.city?.toLowerCase()\n\t\t);\n\n\t\tif (cityItem) {\n\t\t\tthis.addressForm.get('city')?.setValue(cityItem, { emitEvent: false });\n\t\t\tthis.loadBarangayByCityId(cityItem.id);\n\t\t} else {\n\t\t\tthis.completeInitialization();\n\t\t}\n\t}\n\n\tprivate setBarangayFromPending(): void {\n\t\tif (!this.pendingAddress?.barangay || typeof this.pendingAddress.barangay !== 'string') {\n\t\t\tthis.completeInitialization();\n\t\t\treturn;\n\t\t}\n\n\t\tconst barangayItem = this.barangayOptions.find(\n\t\t\t(b) => b.name.toLowerCase() === this.pendingAddress!.barangay?.toLowerCase()\n\t\t);\n\n\t\tif (barangayItem) {\n\t\t\tthis.addressForm.get('barangay')?.setValue(barangayItem, { emitEvent: false });\n\t\t}\n\n\t\tthis.completeInitialization();\n\t}\n\n\tprivate completeInitialization(): void {\n\t\tthis.isInitializing = false;\n\t\tthis.pendingAddress = null;\n\t}\n\n\t// ControlValueAccessor methods\n\twriteValue(value: Address | null): void {\n\t\tif (value) {\n\t\t\t// Auto-detect if this is edit mode based on the address data structure\n\t\t\tthis.detectedEditMode = this.isEditModeAddress(value);\n\n\t\t\tif (this.detectedEditMode) {\n\t\t\t\t// Address contains string values (names) - needs initialization\n\t\t\t\tthis.pendingAddress = value;\n\n\t\t\t\t// If provinces are already loaded, start initialization\n\t\t\t\tif (this.provinceOptions.length > 0) {\n\t\t\t\t\tthis.initializeEditMode(value);\n\t\t\t\t}\n\t\t\t\t// Otherwise, it will be triggered when provinces load\n\t\t\t} else {\n\t\t\t\t// Create mode or already has proper objects\n\t\t\t\tthis.addressForm.patchValue(value, { emitEvent: false });\n\n\t\t\t\t// Load cascading data if IDs are present\n\t\t\t\tconst province = value.province;\n\t\t\t\tif (province && typeof province === 'object' && 'id' in province) {\n\t\t\t\t\tthis.loadCityByProvinceId((province as any).id);\n\t\t\t\t}\n\n\t\t\t\tconst city = value.city;\n\t\t\t\tif (city && typeof city === 'object' && 'id' in city) {\n\t\t\t\t\tthis.loadBarangayByCityId((city as any).id);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.addressForm.reset({ country: 'Philippines' }, { emitEvent: false });\n\t\t}\n\t}\n\n\tregisterOnChange(fn: (value: Address | null) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.isDisabled?.set(isDisabled);\n\t\tif (isDisabled) {\n\t\t\tthis.addressForm.disable();\n\t\t} else {\n\t\t\tthis.addressForm.enable();\n\t\t}\n\t}\n\n\tvalidate(control: AbstractControl): ValidationErrors | null {\n\t\treturn this.addressForm?.valid ? null : { invalidAddress: true };\n\t}\n}\n","@if (showHeader()) {\n\t<h2 class=\"text-xl font-semibold mb-4\">Address</h2>\n}\n<form [formGroup]=\"addressForm\">\n\t<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<input pInputText trim=\"blur\" id=\"country\" formControlName=\"country\" class=\"w-full\" />\n\t\t\t\t\t<label for=\"country\" class=\"block mb-2 required-label\">Country</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<ng-select\n\t\t\t\t\t\tformControlName=\"province\"\n\t\t\t\t\t\t[items]=\"provinceOptions\"\n\t\t\t\t\t\t[loading]=\"provHttp$ && !provHttp$.closed\"\n\t\t\t\t\t\tbindLabel=\"name\" />\n\t\t\t\t\t<label for=\"province\" class=\"block mb-2 required-label\">Province</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t</div>\n\n\t<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<ng-select\n\t\t\t\t\t\tformControlName=\"city\"\n\t\t\t\t\t\t[items]=\"cityOptions\"\n\t\t\t\t\t\t[loading]=\"cityHttp$ && !cityHttp$.closed\"\n\t\t\t\t\t\tbindLabel=\"name\" />\n\t\t\t\t\t<label for=\"city\" class=\"block mb-2 required-label\">City/Municipality</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<ng-select\n\t\t\t\t\t\tformControlName=\"barangay\"\n\t\t\t\t\t\t[items]=\"barangayOptions\"\n\t\t\t\t\t\t[loading]=\"barangayHttp$ && !barangayHttp$.closed\"\n\t\t\t\t\t\tbindLabel=\"name\" />\n\n\t\t\t\t\t<label for=\"barangay\" class=\"block mb-2 required-label\">Barangay</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t</div>\n\n\t<div>\n\t\t<ngp-form-field-wrapper>\n\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t<label for=\"line1\" class=\"block mb-2 required-label\">Line 1</label>\n\t\t\t\t<input pInputText trim=\"blur\" id=\"line1\" formControlName=\"line1\" class=\"w-full\" />\n\t\t\t</p-floatlabel>\n\t\t</ngp-form-field-wrapper>\n\t</div>\n\n\t<div>\n\t\t<ngp-form-field-wrapper>\n\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t<label for=\"line2\" class=\"block mb-2\">Line 2</label>\n\t\t\t\t<input pInputText trim=\"blur\" id=\"line2\" formControlName=\"line2\" class=\"w-full\" />\n\t\t\t</p-floatlabel>\n\t\t</ngp-form-field-wrapper>\n\t</div>\n\t<div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<p-inputnumber\n\t\t\t\t\t\t[inputId]=\"'zipCode'\"\n\t\t\t\t\t\tformControlName=\"zipCode\"\n\t\t\t\t\t\tstyleClass=\"w-full\"\n\t\t\t\t\t\t[useGrouping]=\"false\" />\n\t\t\t\t\t<label for=\"zipCode\" class=\"block mb-2 required-label\">Zip Code</label>\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t\t<div>\n\t\t\t<ngp-form-field-wrapper>\n\t\t\t\t<p-floatlabel variant=\"in\">\n\t\t\t\t\t<label for=\"landmark\" class=\"block mb-2 required-label\">Nearest Landmark</label>\n\t\t\t\t\t<input pInputText trim=\"blur\" id=\"landmark\" formControlName=\"landmark\" class=\"w-full\" />\n\t\t\t\t</p-floatlabel>\n\t\t\t</ngp-form-field-wrapper>\n\t\t</div>\n\t</div>\n</form>\n","import { CommonModule } from '@angular/common';\nimport { HttpClient } from '@angular/common/http';\nimport {\n\tComponent,\n\tcomputed,\n\tContentChild,\n\teffect,\n\tinject,\n\tinput,\n\toutput,\n\tsignal,\n\tTemplateRef,\n\tViewChild\n} from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { ConfirmationService, MessageService } from 'primeng/api';\nimport { ButtonModule } from 'primeng/button';\nimport { ConfirmDialogModule } from 'primeng/confirmdialog';\nimport { DialogModule } from 'primeng/dialog';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { PopoverModule } from 'primeng/popover';\nimport { SkeletonModule } from 'primeng/skeleton';\nimport { Table, TableModule, TablePageEvent } from 'primeng/table';\nimport { ToastModule } from 'primeng/toast';\nimport { ToolbarModule } from 'primeng/toolbar';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { TableColumn } from '../../../models/table-column.model';\n\n@Component({\n\tselector: 'ngp-data-table',\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t\tReactiveFormsModule,\n\t\tTableModule,\n\t\tButtonModule,\n\t\tInputTextModule,\n\t\tConfirmDialogModule,\n\t\tDialogModule,\n\t\tTooltipModule,\n\t\tToastModule,\n\t\tToolbarModule,\n\t\tSkeletonModule,\n\t\tPopoverModule\n\t],\n\ttemplateUrl: './data-table.component.html',\n\tstyleUrl: './data-table.component.scss',\n\tproviders: [ConfirmationService, MessageService]\n})\nexport class DataTableComponent<T extends Record<string, any>> {\n\tdataSource = input<T[]>([]);\n\tcolumns = input<TableColumn[]>([]);\n\tloading = input<boolean>(false);\n\tpageSize = input<number>(10);\n\ttotalElements = input<number>(0);\n\tcurrentPage = input<number>(0);\n\tshowDefaultActions = input<boolean>(true);\n\temptyMessage = input<string>('No data available.');\n\thasDeleteAction = input<boolean>(true);\n\thasEditAction = input<boolean>(true);\n\tcanEdit = input<(row: unknown) => boolean>(() => true);\n\thasViewAction = input<boolean>(true);\n\tentityName = input<string>('');\n\tisPaginated = input<boolean>(true);\n\tshowCustomAction = input<boolean>(false);\n\tshowRowNumbers = input<boolean>(false);\n\trowNumberHeader = input<string>('');\n\n\t// Internal signals\n\tdata = signal<T[]>([]);\n\tfilteredData = signal<T[]>([]);\n\tdialogVisible = signal<boolean>(false);\n\tdialogTitle = signal<string>('Add Item');\n\teditingItem = signal<T | null>(null);\n\n\t// Custom event emitters\n\tadd = output<T>();\n\tedit = output<T>();\n\tdeleteAction = output<T>();\n\tview = output<T>();\n\tpageChange = output<TablePageEvent>();\n\tsortChange = output<{ sort: string; order: string }>();\n\n\tactions = computed(() => [this.hasViewAction(), this.hasEditAction(), this.hasDeleteAction()]);\n\tactionsLength = computed(() => this.actions().filter((action) => !!action).length);\n\tactionItems = computed(() => {\n\t\treturn [\n\t\t\t{\n\t\t\t\tlabel: 'View ' + this.entityName(),\n\t\t\t\tvisible: this.hasViewAction(),\n\t\t\t\ticon: 'pi-search'\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Update ' + this.entityName(),\n\t\t\t\tvisible: this.hasEditAction(),\n\t\t\t\ticon: 'pi-pen-to-square',\n\t\t\t\tshouldShow: (item: unknown) => this.canEdit()(item)\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: 'Delete ' + this.entityName(),\n\t\t\t\tvisible: this.hasDeleteAction(),\n\t\t\t\ticon: 'pi-trash'\n\t\t\t}\n\t\t];\n\t});\n\n\t// Content children for custom templates\n\t@ContentChild('formTemplate') formTemplate?: TemplateRef<unknown>;\n\t@ViewChild('dt') table?: Table;\n\n\t// Services\n\tprivate readonly http = inject(HttpClient);\n\tprivate readonly confirmationService = inject(ConfirmationService);\n\tprivate readonly messageService = inject(MessageService);\n\n\t// Column filters for individual column filtering\n\tprivate readonly filterValues: Record<string, string> = {};\n\n\t// For custom cell templates\n\tcustomTemplates = new Map<string, TemplateRef<unknown>>();\n\n\tconstructor() {\n\t\t// Effect to update filtered data when raw data changes\n\t\teffect(() => {\n\t\t\tconst sourceData = this.dataSource();\n\t\t\tthis.data.set([...sourceData]);\n\t\t});\n\t}\n\n\t// Register a custom template for a specific column\n\tregisterTemplate(field: string, template: TemplateRef<unknown>): void {\n\t\tthis.customTemplates.set(field, template);\n\t}\n\n\thandlePageChange(event: TablePageEvent) {\n\t\tthis.pageChange.emit(event);\n\t}\n\n\thandleSort(event: { field: string; order: number }) {\n\t\tconst column = this.columns().find((col) => col.field === event.field);\n\t\tconst actualSortField = column?.sortField ?? event.field;\n\t\tconst order = event.order === 1 ? 'ASC' : 'DESC';\n\n\t\tthis.sortChange.emit({\n\t\t\tsort: actualSortField,\n\t\t\torder\n\t\t});\n\t}\n\n\tresetTableSort(): void {\n\t\tif (this.table) {\n\t\t\tthis.table.sortOrder = 0;\n\t\t\tthis.table.sortField = null;\n\t\t\tthis.table.tableService.onSort(null);\n\t\t}\n\t}\n\n\t// Helper to safely get nested property values using dot notation\n\tgetItemValue(item: T, field: string, column?: TableColumn): unknown {\n\t\tif (column && typeof column.render === 'function') {\n\t\t\treturn column.render(item);\n\t\t}\n\t\treturn field\n\t\t\t.split('.')\n\t\t\t.reduce((obj: unknown, key) => obj?.[key as keyof typeof obj] ?? null, item as unknown);\n\t}\n\n\tperFormActionFromPopover(item: T, actionType: string): void {\n\t\tif (actionType.includes('View')) {\n\t\t\tthis.view.emit(item);\n\t\t} else if (actionType.includes('Update')) {\n\t\t\tthis.edit.emit(item);\n\t\t} else if (actionType.includes('Delete')) {\n\t\t\tthis.deleteAction.emit(item);\n\t\t}\n\t}\n}\n","<div class=\"card\">\n\t<p-table\n\t\t#dt\n\t\t[value]=\"data()\"\n\t\t[paginator]=\"isPaginated()\"\n\t\t[rows]=\"pageSize()\"\n\t\t[rowsPerPageOptions]=\"[5, 10, 25, 50]\"\n\t\t[rowHover]=\"true\"\n\t\t[loading]=\"loading()\"\n\t\t[showLoader]=\"false\"\n\t\t[scrollable]=\"true\"\n\t\tstyleClass=\"p-datatable-sm\"\n\t\t[totalRecords]=\"totalElements()\"\n\t\t[lazy]=\"isPaginated()\"\n\t\t[first]=\"currentPage() * pageSize()\"\n\t\tpaginatorDropdownAppendTo=\"body\"\n\t\t(onPage)=\"handlePageChange($event)\"\n\t\t(onSort)=\"handleSort($event)\">\n\t\t<ng-template pTemplate=\"header\">\n\t\t\t<tr>\n\t\t\t\t@if (showRowNumbers()) {\n\t\t\t\t\t<th class=\"text-left !font-bold !text-gray-500 !w-1\" scope=\"col\">{{\n\t\t\t\t\t\trowNumberHeader()\n\t\t\t\t\t}}</th>\n\t\t\t\t}\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<th\n\t\t\t\t\t\t[pSortableColumn]=\"column.sortable ? column.field : undefined\"\n\t\t\t\t\t\tclass=\"text-left !font-bold !text-gray-500\"\n\t\t\t\t\t\t[ngClass]=\"{ '!text-center': column.align === 'center' }\"\n\t\t\t\t\t\tscope=\"col\"\n\t\t\t\t\t\t[style]=\"{ width: column.width || 'auto' }\">\n\t\t\t\t\t\t{{ column.header }}\n\t\t\t\t\t\t@if (column.sortable) {\n\t\t\t\t\t\t\t<p-sortIcon [field]=\"column.field\"></p-sortIcon>\n\t\t\t\t\t\t}\n\t\t\t\t\t</th>\n\t\t\t\t}\n\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<th class=\"!w-32 !text-center !font-bold !text-gray-500\" scope=\"col\">Actions</th>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</ng-template>\n\n\t\t<ng-template pTemplate=\"body\" let-item let-rowIndex=\"rowIndex\">\n\t\t\t<tr>\n\t\t\t\t@if (showRowNumbers()) {\n\t\t\t\t\t<td class=\"!w-1 text-center\">\n\t\t\t\t\t\t{{ rowIndex + 1 }}\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td [ngClass]=\"{ '!text-center': column.align === 'center' }\">\n\t\t\t\t\t\t@if (customTemplates && customTemplates.get(column.field)) {\n\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"customTemplates.get(column.field)!\"\n\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, field: column.field }\">\n\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t{{ getItemValue(item, column.field, column) }}\n\t\t\t\t\t\t}\n\t\t\t\t\t</td>\n\t\t\t\t}\n\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td class=\"\">\n\t\t\t\t\t\t<div class=\"flex justify-center gap-2\">\n\t\t\t\t\t\t\t@if (showDefaultActions() && actionsLength() < 2 && !showCustomAction()) {\n\t\t\t\t\t\t\t\t<!-- Inline buttons for less than 2 standard actions and no custom action -->\n\t\t\t\t\t\t\t\t@if (hasViewAction()) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\t\tclass=\"!p-0 p-button-primary\"\n\t\t\t\t\t\t\t\t\t\t[label]=\"'View'\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"view.emit(item)\"></button>\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@if (hasEditAction()) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\t\tclass=\"!p-0 p-button-primary\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"edit.emit(item)\"\n\t\t\t\t\t\t\t\t\t\t[label]=\"'Update'\"></button>\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@if (hasDeleteAction()) {\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\t\tclass=\"!p-0 p-button-danger\"\n\t\t\t\t\t\t\t\t\t\t(click)=\"deleteAction.emit(item)\"\n\t\t\t\t\t\t\t\t\t\t[label]=\"'Delete'\"></button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} @else if (!showDefaultActions() && showCustomAction()) {\n\t\t\t\t\t\t\t\t<!-- Only custom action, no popover needed -->\n\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"customTemplates.get('customAction')!\"\n\t\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, field: 'customAction' }\">\n\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<!-- Popover menu for 2+ standard actions or when combining with custom action -->\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t[text]=\"true\"\n\t\t\t\t\t\t\t\t\tpButton\n\t\t\t\t\t\t\t\t\ticon=\"pi pi-ellipsis-h\"\n\t\t\t\t\t\t\t\t\tclass=\"p-button-outlined p-button-secondary\"\n\t\t\t\t\t\t\t\t\t(click)=\"po.toggle($event)\"></button>\n\t\t\t\t\t\t\t\t<p-popover #po styleClass=\"!min-w-40\">\n\t\t\t\t\t\t\t\t\t<span class=\"!font-semibold !text-gray-500 block mb-2\">Actions</span>\n\t\t\t\t\t\t\t\t\t<ul class=\"list-none p-0 m-0 flex flex-col\">\n\t\t\t\t\t\t\t\t\t\t@if (showDefaultActions()) {\n\t\t\t\t\t\t\t\t\t\t\t@for (actionItem of actionItems(); track $index) {\n\t\t\t\t\t\t\t\t\t\t\t\t@if (\n\t\t\t\t\t\t\t\t\t\t\t\t\tactionItem.visible &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t(!actionItem.shouldShow || actionItem.shouldShow(item))\n\t\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"flex items-center gap-2 px-2 py-3 hover:bg-emphasis cursor-pointer rounded-border\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"perFormActionFromPopover(item, actionItem.label)\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"pi\" [ngClass]=\"actionItem.icon\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"font-medium\">{{ actionItem.label }}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t<!-- Custom action template in popover -->\n\t\t\t\t\t\t\t\t\t\t@if (showCustomAction() && customTemplates.get('customAction')) {\n\t\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t\t[ngTemplateOutlet]=\"customTemplates.get('customAction')!\"\n\t\t\t\t\t\t\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: item, field: 'customAction' }\">\n\t\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</p-popover>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</ng-template>\n\n\t\t<ng-template #loadingbody>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns(); track column.field) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t\t@if (showDefaultActions() || showCustomAction()) {\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p-skeleton />\n\t\t\t\t\t</td>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</ng-template>\n\n\t\t<ng-template pTemplate=\"emptymessage\">\n\t\t\t<tr>\n\t\t\t\t<td [attr.colspan]=\"columns().length + 1\" class=\"text-center p-4\">{{ emptyMessage() }}</td>\n\t\t\t</tr>\n\t\t</ng-template>\n\t</p-table>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { Component, Input, forwardRef, OnInit, signal } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NgSelectModule } from '@ng-select/ng-select';\nimport { PaginatedRequest, PaginatedResponse } from '../../../../models/paginated.model';\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\n@Component({\n\tselector: 'ngp-dynamic-select',\n\ttemplateUrl: './dynamic-select.component.html',\n\timports: [NgSelectModule, CommonModule, FormsModule],\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => DynamicNgSelectComponent),\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class DynamicNgSelectComponent implements ControlValueAccessor, OnInit {\n\t@Input() getApiUrl!: (params?: any) => Observable<PaginatedResponse<any>>;\n\t@Input() formatOptions?: (items: any[]) => any[];\n\n\t@Input() bindLabel = 'description';\n\t@Input() bindValue = 'id';\n\t@Input() placeholder = 'Select';\n\n\toptions: any[] = [];\n\tvalue: any;\n\tdisabled = false;\n\n\ttableParams = signal<PaginatedRequest>({ page: 0, size: 10 });\n\n\tprivate onChange = (_: any) => {}; // eslint-disable-line\n\tprivate onTouched = () => {}; // eslint-disable-line\n\n\tngOnInit(): void {\n\t\tthis.loadOptions();\n\t}\n\n\tprivate loadOptions(): void {\n\t\tif (!this.getApiUrl) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.getOptions();\n\t}\n\n\tgetOptions(): void {\n\t\tthis.getApiUrl(this.tableParams())\n\t\t\t.pipe(\n\t\t\t\ttap((items: any) => {\n\t\t\t\t\tconst values = this.formatOptions ? this.formatOptions(items.results) : items.results;\n\t\t\t\t\tthis.options = [...this.options, ...values];\n\n\t\t\t\t\tif (items.hasNextPage) {\n\t\t\t\t\t\tthis.tableParams.update((param) => ({ ...param, page: param.page + 1 }));\n\t\t\t\t\t\tthis.getOptions();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n\n\twriteValue(value: any): void {\n\t\tthis.value = value;\n\t}\n\n\tregisterOnChange(fn: any): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\tonValueChange(value: any): void {\n\t\tthis.value = value[this.bindValue];\n\t\tthis.onChange(value[this.bindValue]);\n\t\tthis.onTouched();\n\t}\n}\n","<ng-select\n\t[items]=\"options\"\n\t[bindLabel]=\"bindLabel\"\n\t[bindValue]=\"bindValue\"\n\t[placeholder]=\"placeholder\"\n\t[disabled]=\"disabled\"\n\t[(ngModel)]=\"value\"\n\t[clearable]=\"true\"\n\t(change)=\"onValueChange($event)\">\n</ng-select>\n","export class PaginatedRequest {\n\tpage!: number;\n\tsize!: number;\n\tsort?: string | null;\n\t[key: string]: any;\n}\n\nexport interface PaginatedResponse<T> {\n\thasNextPage: boolean;\n\ttotalElements: number;\n\tresults: T[];\n\tcurrentPage: number;\n\tpageSize: number;\n}\n","import { computed, effect, inject, Injectable, Injector, signal, untracked } from '@angular/core';\nimport { catchError, finalize, Observable, of, shareReplay } from 'rxjs';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { PaginatedRequest, PaginatedResponse } from '../models/paginated.model';\nimport { ActionType, ApiOperations } from '../types/api-operations.type';\n\n@UntilDestroy()\n@Injectable()\nexport abstract class CrudAbstractComponent<\n\tT,\n\tCreateDto = Partial<T>,\n\tUpdateDto = Partial<T>,\n\tIdType = string | number\n> {\n\t// State signals\n\tprivate readonly sourceSignal = signal<Observable<T | T[]> | null>(null);\n\tprivate readonly loadingSignal = signal<boolean>(false);\n\tprivate readonly errorSignal = signal<Error | null>(null);\n\tprivate readonly actionSignal = signal<ActionType | null>(null);\n\tprivate readonly firstLoadSignal = signal<boolean>(true);\n\tprivate readonly showFormSignal = signal<boolean>(false);\n\tprivate readonly formActionSignal = signal<'Create' | 'Update' | 'View' | null>(null);\n\tprotected readonly dataSignal = signal<T | T[] | null>(null);\n\n\tpublic filters = signal<Record<string, unknown> | null>(null);\n\tpublic tableParams = signal<PaginatedRequest>({ page: 0, size: 10 });\n\tpublic requestParams = computed(() => ({\n\t\t...this.filters(),\n\t\t...this.tableParams()\n\t}));\n\n\t// Injections\n\tprivate readonly injector = inject(Injector);\n\n\t// Public interface\n\tpublic readonly data = this.dataSignal.asReadonly();\n\tpublic readonly isLoading = this.loadingSignal.asReadonly();\n\tpublic readonly error = this.errorSignal.asReadonly();\n\tpublic readonly currentAction = this.actionSignal.asReadonly();\n\tpublic readonly isFirstLoad = this.firstLoadSignal.asReadonly();\n\tpublic readonly isFormVisible = this.showFormSignal.asReadonly();\n\tpublic readonly formAction = this.formActionSignal.asReadonly();\n\n\tpublic readonly safeDataSource = computed(() => {\n\t\tconst rawData = this.dataSignal();\n\t\tconst isLoading = this.loadingSignal();\n\n\t\tinterface Page<T> {\n\t\t\tresults: T[];\n\t\t\thasNextPage: boolean;\n\t\t\ttotalElements: number;\n\t\t\tpageSize: number;\n\t\t\tcurrentPage: number;\n\t\t}\n\n\t\t// Default empty response\n\t\tconst defaultResponse = {\n\t\t\thasNextPage: false,\n\t\t\ttotalElements: 0,\n\t\t\tresults: [] as T[],\n\t\t\tcurrentPage: 0,\n\t\t\tpageSize: 10\n\t\t};\n\n\t\tif (!rawData || isLoading) return defaultResponse;\n\n\t\tconst isPaginatedResponse = (obj: unknown): obj is Page<T> => {\n\t\t\treturn (\n\t\t\t\tobj !== null &&\n\t\t\t\ttypeof obj === 'object' &&\n\t\t\t\t'results' in obj &&\n\t\t\t\tArray.isArray(obj.results) &&\n\t\t\t\t'totalElements' in obj &&\n\t\t\t\ttypeof obj.totalElements === 'number'\n\t\t\t);\n\t\t};\n\n\t\t// Handler for Paginated Response\n\t\tif (typeof rawData === 'object' && isPaginatedResponse(rawData)) {\n\t\t\treturn {\n\t\t\t\tresults: [...rawData.results],\n\t\t\t\ttotalElements: rawData.totalElements,\n\t\t\t\tcurrentPage: rawData.currentPage,\n\t\t\t\tpageSize: rawData.pageSize,\n\t\t\t\thasNextPage: rawData.hasNextPage\n\t\t\t};\n\t\t}\n\n\t\t// Handle array case\n\t\tif (Array.isArray(rawData)) {\n\t\t\treturn {\n\t\t\t\t...defaultResponse,\n\t\t\t\ttotalElements: rawData.length,\n\t\t\t\tresults: [...rawData],\n\t\t\t\tpageSize: rawData.length // For arrays, we typically return all elements\n\t\t\t};\n\t\t}\n\n\t\t// Handle single object case\n\t\treturn {\n\t\t\t...defaultResponse,\n\t\t\ttotalElements: 1,\n\t\t\tresults: [rawData],\n\t\t\tpageSize: 1\n\t\t};\n\t});\n\n\t/**\n\t * Provides direct access to raw list data without pagination wrapper\n\t * Returns an empty array if data is not available or not an array\n\t */\n\tpublic readonly rawList = computed<T[]>(() => {\n\t\tconst rawData = this.data();\n\n\t\tif (!rawData || this.isLoading()) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// If it's already an array, return it\n\t\tif (Array.isArray(rawData)) {\n\t\t\treturn [...rawData];\n\t\t}\n\n\t\t// If it's a paginated response with a results property that's an array\n\t\tif (typeof rawData === 'object' && 'results' in rawData && Array.isArray(rawData.results)) {\n\t\t\treturn [...rawData.results];\n\t\t}\n\n\t\t// If it's a single object, return it as an array with one item\n\t\tif (typeof rawData === 'object' && !('results' in rawData)) {\n\t\t\treturn [rawData as T];\n\t\t}\n\n\t\t// Default fallback\n\t\treturn [];\n\t});\n\n\t// Usage in your component:\n\t// const items = this.rawList();\n\n\t// Current operations state\n\tprivate currentOperations?: ApiOperations<T, CreateDto, UpdateDto, IdType>;\n\tprivate currentParams?: Record<string, unknown>;\n\n\t// Effect to handle Observable subscriptions\n\tprivate readonly dataEffect = effect(\n\t\t() => {\n\t\t\tconst obs = this.sourceSignal();\n\t\t\tif (!obs) {\n\t\t\t\tuntracked(() => this.dataSignal.set(null));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tuntracked(() => {\n\t\t\t\tthis.loadingSignal.set(true);\n\t\t\t\tthis.errorSignal.set(null);\n\n\t\t\t\tconst sub = obs\n\t\t\t\t\t.pipe(\n\t\t\t\t\t\tshareReplay(1),\n\t\t\t\t\t\tcatchError((err) => {\n\t\t\t\t\t\t\tthis.errorSignal.set(err);\n\t\t\t\t\t\t\treturn of(null);\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tfinalize(() => this.loadingSignal.set(false))\n\t\t\t\t\t)\n\t\t\t\t\t.subscribe((value) => {\n\t\t\t\t\t\tthis.dataSignal.set(value);\n\t\t\t\t\t});\n\n\t\t\t\treturn () => sub.unsubscribe();\n\t\t\t});\n\t\t},\n\t\t{ injector: this.injector }\n\t);\n\n\t/**\n\t * Initialize with dynamic service operations\n\t */\n\tprotected initService(operations: ApiOperations<T, CreateDto, UpdateDto, IdType>): void {\n\t\tthis.currentOperations = operations;\n\t}\n\n\t/**\n\t * GET data\n\t */\n\tprotected loadData(params?: Record<string, unknown>): void {\n\t\tif (!this.currentOperations?.get) return;\n\n\t\tthis.executeOperation('get', () => this.currentOperations!.get!(params), params);\n\n\t\tthis.firstLoadSignal.set(false);\n\t}\n\n\t/**\n\t * GET data by ID\n\t */\n\tprotected getById(\n\t\tid: IdType,\n\t\tparams?: Record<string, unknown>\n\t): Observable<T | T[] | PaginatedResponse<T> | null> {\n\t\tif (!this.currentOperations?.getById) return of(null);\n\n\t\treturn this.executeOperation('get', () => this.currentOperations!.getById!(id, params));\n\t}\n\n\t/**\n\t * CREATE data\n\t */\n\tprotected createData(data: CreateDto): Observable<T | null> {\n\t\tif (!this.currentOperations?.create) return of(null);\n\n\t\treturn this.executeOperation('create', () => this.currentOperations!.create!(data));\n\t}\n\n\t/**\n\t * UPDATE data\n\t */\n\tprotected updateData(data: UpdateDto): Observable<T | null> {\n\t\tif (!this.currentOperations?.update) return of(null);\n\n\t\treturn this.executeOperation('update', () => this.currentOperations!.update!(data));\n\t}\n\n\t/**\n\t * UPDATE data by ID\n\t */\n\tprotected updateById(id: IdType, data: Partial<UpdateDto>): Observable<T | null> {\n\t\tif (!this.currentOperations?.updateById) return of(null);\n\n\t\treturn this.executeOperation('updateById', () => this.currentOperations!.updateById!(id, data));\n\t}\n\n\t/**\n\t * DELETE data\n\t */\n\tprotected deleteData(id: IdType): Observable<void | null> {\n\t\tif (!this.currentOperations?.delete) return of(null);\n\n\t\treturn this.executeOperation('delete', () => this.currentOperations!.delete!(id));\n\t}\n\n\t/**\n\t * UPDATE status\n\t */\n\tprotected updateStatus(id: IdType, status: boolean): Observable<T | null> {\n\t\tif (!this.currentOperations?.updateStatus) return of(null);\n\n\t\treturn this.executeOperation(\n\t\t\t'update', // You can reuse 'update' action or add a new one like 'updateStatus'\n\t\t\t() => this.currentOperations!.updateStatus!(id, status)\n\t\t);\n\t}\n\n\t/**\n\t * SHOW/HIDE form\n\t * @param show Whether to show or hide the form\n\t */\n\tprotected showForm(show: boolean): void {\n\t\tthis.showFormSignal.set(show);\n\t}\n\n\t/**\n\t * Update form action (create/edit)\n\t * @param action The action to set for the form\n\t */\n\tprotected updateFormAction(action: string): void {\n\t\tthis.formActionSignal.set(action as 'Create' | 'Update' | null);\n\t}\n\n\t/**\n\t * Shared operation execution logic\n\t */\n\tprivate executeOperation<R>(\n\t\taction: ActionType,\n\t\toperation: () => Observable<R>,\n\t\tparams?: Record<string, unknown>\n\t): Observable<R | null> {\n\t\tthis.errorSignal.set(null);\n\t\tthis.loadingSignal.set(true);\n\t\tthis.actionSignal.set(action);\n\n\t\tif (action === 'get') {\n\t\t\tthis.currentParams = params;\n\t\t}\n\n\t\tconst operation$ = operation().pipe(\n\t\t\tuntilDestroyed(this),\n\t\t\tcatchError((err) => {\n\t\t\t\tthis.errorSignal.set(err);\n\t\t\t\treturn of(null);\n\t\t\t}),\n\t\t\tfinalize(() => {\n\t\t\t\tthis.loadingSignal.set(false);\n\t\t\t\tthis.actionSignal.set(null);\n\t\t\t}),\n\t\t\tshareReplay(1)\n\t\t);\n\n\t\tif (action === 'get') {\n\t\t\tthis.sourceSignal.set(operation$ as Observable<T | T[]>);\n\t\t} else {\n\t\t\toperation$.subscribe(() => {\n\t\t\t\tif (this.currentOperations?.get) {\n\t\t\t\t\tthis.refresh();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn operation$;\n\t}\n\n\t/**\n\t * Refresh current data\n\t */\n\tprotected refresh(): void {\n\t\tif (this.currentOperations?.get && this.currentParams) {\n\t\t\tthis.loadData(this.currentParams);\n\t\t}\n\t}\n\n\tget entityName(): string {\n\t\treturn 'Item';\n\t}\n}\n","// Components\n// export * from './lib/components/components';\nexport * from './lib/components/empty/empty.component';\nexport * from './lib/components/file-upload/file-upload.component';\nexport * from './lib/components/form-field-wrapper/form-field-wrapper.component';\nexport * from './lib/components/select/ng-select/basic/basic-ng-select.component';\nexport * from './lib/components/fg-address/fg-address.component';\nexport * from './lib/components/dataview/table/data-table.component';\nexport * from './lib/components/select/ng-select/dynamic/dynamic-select.component';\n\n// Models\nexport * from './lib/models/common.model';\nexport * from './lib/models/address.model';\nexport * from './lib/models/table-column.model';\nexport * from './lib/models/paginated.model';\n\n// Types\nexport * from './lib/types/api-operations.type';\n\n// Class\nexport * from './lib/classes/crud-abstract.class';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i1","i4","i3","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQa,cAAc,CAAA;AAC1B,IAAA,KAAK,GAAG,KAAK,CAAS,mBAAmB,iDAAC;AAC1C,IAAA,OAAO,GAAG,KAAK,CAAS,oBAAoB,mDAAC;IAC7C,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;wGAHZ,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,kcCR3B,gnBAiBM,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FDTO,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,WACZ,EAAE,EAAA,QAAA,EAAA,gnBAAA,EAAA;;;MEWC,mBAAmB,CAAA;AACJ,IAAA,YAAY;;AAGvC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AACzB,IAAA,QAAQ,GAAG,KAAK,CAAC,IAAI,oDAA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;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { ElementRef, AfterContentInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ElementRef, AfterContentInit, OnDestroy, TemplateRef, OnInit } from '@angular/core';
|
|
3
3
|
import { FileSelectEvent } from 'primeng/fileupload';
|
|
4
4
|
import { NgControl, ControlValueAccessor, Validator, FormGroup, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
5
|
-
import { Subscription } from 'rxjs';
|
|
5
|
+
import { Subscription, Observable } from 'rxjs';
|
|
6
|
+
import { TablePageEvent, Table } from 'primeng/table';
|
|
6
7
|
|
|
7
8
|
declare class EmptyComponent {
|
|
8
9
|
title: _angular_core.InputSignal<string>;
|
|
@@ -95,6 +96,16 @@ interface Address {
|
|
|
95
96
|
zipCode: string | null;
|
|
96
97
|
landmark: string | null;
|
|
97
98
|
}
|
|
99
|
+
interface RawAddress {
|
|
100
|
+
line1: string | null;
|
|
101
|
+
line2: string | null;
|
|
102
|
+
country: string;
|
|
103
|
+
zipCode: string | null;
|
|
104
|
+
landmark: string | null;
|
|
105
|
+
province: IdName;
|
|
106
|
+
city: City;
|
|
107
|
+
barangay: Barangay;
|
|
108
|
+
}
|
|
98
109
|
interface City extends IdName {
|
|
99
110
|
provinceId: number;
|
|
100
111
|
}
|
|
@@ -142,5 +153,226 @@ declare class FgAddressComponent implements ControlValueAccessor, Validator {
|
|
|
142
153
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FgAddressComponent, "ngp-fg-address", never, { "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "isCreateMode": { "alias": "isCreateMode"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
143
154
|
}
|
|
144
155
|
|
|
145
|
-
|
|
146
|
-
|
|
156
|
+
interface TableColumn {
|
|
157
|
+
field: string;
|
|
158
|
+
header: string;
|
|
159
|
+
sortable?: boolean;
|
|
160
|
+
filterable?: boolean;
|
|
161
|
+
sortField?: string;
|
|
162
|
+
width?: string;
|
|
163
|
+
align?: string;
|
|
164
|
+
render?: (row: any) => string;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare class DataTableComponent<T extends Record<string, any>> {
|
|
168
|
+
dataSource: _angular_core.InputSignal<T[]>;
|
|
169
|
+
columns: _angular_core.InputSignal<TableColumn[]>;
|
|
170
|
+
loading: _angular_core.InputSignal<boolean>;
|
|
171
|
+
pageSize: _angular_core.InputSignal<number>;
|
|
172
|
+
totalElements: _angular_core.InputSignal<number>;
|
|
173
|
+
currentPage: _angular_core.InputSignal<number>;
|
|
174
|
+
showDefaultActions: _angular_core.InputSignal<boolean>;
|
|
175
|
+
emptyMessage: _angular_core.InputSignal<string>;
|
|
176
|
+
hasDeleteAction: _angular_core.InputSignal<boolean>;
|
|
177
|
+
hasEditAction: _angular_core.InputSignal<boolean>;
|
|
178
|
+
canEdit: _angular_core.InputSignal<(row: unknown) => boolean>;
|
|
179
|
+
hasViewAction: _angular_core.InputSignal<boolean>;
|
|
180
|
+
entityName: _angular_core.InputSignal<string>;
|
|
181
|
+
isPaginated: _angular_core.InputSignal<boolean>;
|
|
182
|
+
showCustomAction: _angular_core.InputSignal<boolean>;
|
|
183
|
+
showRowNumbers: _angular_core.InputSignal<boolean>;
|
|
184
|
+
rowNumberHeader: _angular_core.InputSignal<string>;
|
|
185
|
+
data: _angular_core.WritableSignal<T[]>;
|
|
186
|
+
filteredData: _angular_core.WritableSignal<T[]>;
|
|
187
|
+
dialogVisible: _angular_core.WritableSignal<boolean>;
|
|
188
|
+
dialogTitle: _angular_core.WritableSignal<string>;
|
|
189
|
+
editingItem: _angular_core.WritableSignal<T | null>;
|
|
190
|
+
add: _angular_core.OutputEmitterRef<T>;
|
|
191
|
+
edit: _angular_core.OutputEmitterRef<T>;
|
|
192
|
+
deleteAction: _angular_core.OutputEmitterRef<T>;
|
|
193
|
+
view: _angular_core.OutputEmitterRef<T>;
|
|
194
|
+
pageChange: _angular_core.OutputEmitterRef<TablePageEvent>;
|
|
195
|
+
sortChange: _angular_core.OutputEmitterRef<{
|
|
196
|
+
sort: string;
|
|
197
|
+
order: string;
|
|
198
|
+
}>;
|
|
199
|
+
actions: _angular_core.Signal<boolean[]>;
|
|
200
|
+
actionsLength: _angular_core.Signal<number>;
|
|
201
|
+
actionItems: _angular_core.Signal<({
|
|
202
|
+
label: string;
|
|
203
|
+
visible: boolean;
|
|
204
|
+
icon: string;
|
|
205
|
+
shouldShow?: undefined;
|
|
206
|
+
} | {
|
|
207
|
+
label: string;
|
|
208
|
+
visible: boolean;
|
|
209
|
+
icon: string;
|
|
210
|
+
shouldShow: (item: unknown) => boolean;
|
|
211
|
+
})[]>;
|
|
212
|
+
formTemplate?: TemplateRef<unknown>;
|
|
213
|
+
table?: Table;
|
|
214
|
+
private readonly http;
|
|
215
|
+
private readonly confirmationService;
|
|
216
|
+
private readonly messageService;
|
|
217
|
+
private readonly filterValues;
|
|
218
|
+
customTemplates: Map<string, TemplateRef<unknown>>;
|
|
219
|
+
constructor();
|
|
220
|
+
registerTemplate(field: string, template: TemplateRef<unknown>): void;
|
|
221
|
+
handlePageChange(event: TablePageEvent): void;
|
|
222
|
+
handleSort(event: {
|
|
223
|
+
field: string;
|
|
224
|
+
order: number;
|
|
225
|
+
}): void;
|
|
226
|
+
resetTableSort(): void;
|
|
227
|
+
getItemValue(item: T, field: string, column?: TableColumn): unknown;
|
|
228
|
+
perFormActionFromPopover(item: T, actionType: string): void;
|
|
229
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataTableComponent<any>, never>;
|
|
230
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataTableComponent<any>, "ngp-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "totalElements": { "alias": "totalElements"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "showDefaultActions": { "alias": "showDefaultActions"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "hasDeleteAction": { "alias": "hasDeleteAction"; "required": false; "isSignal": true; }; "hasEditAction": { "alias": "hasEditAction"; "required": false; "isSignal": true; }; "canEdit": { "alias": "canEdit"; "required": false; "isSignal": true; }; "hasViewAction": { "alias": "hasViewAction"; "required": false; "isSignal": true; }; "entityName": { "alias": "entityName"; "required": false; "isSignal": true; }; "isPaginated": { "alias": "isPaginated"; "required": false; "isSignal": true; }; "showCustomAction": { "alias": "showCustomAction"; "required": false; "isSignal": true; }; "showRowNumbers": { "alias": "showRowNumbers"; "required": false; "isSignal": true; }; "rowNumberHeader": { "alias": "rowNumberHeader"; "required": false; "isSignal": true; }; }, { "add": "add"; "edit": "edit"; "deleteAction": "deleteAction"; "view": "view"; "pageChange": "pageChange"; "sortChange": "sortChange"; }, ["formTemplate"], never, true, never>;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
declare class PaginatedRequest {
|
|
234
|
+
page: number;
|
|
235
|
+
size: number;
|
|
236
|
+
sort?: string | null;
|
|
237
|
+
[key: string]: any;
|
|
238
|
+
}
|
|
239
|
+
interface PaginatedResponse<T> {
|
|
240
|
+
hasNextPage: boolean;
|
|
241
|
+
totalElements: number;
|
|
242
|
+
results: T[];
|
|
243
|
+
currentPage: number;
|
|
244
|
+
pageSize: number;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
declare class DynamicNgSelectComponent implements ControlValueAccessor, OnInit {
|
|
248
|
+
getApiUrl: (params?: any) => Observable<PaginatedResponse<any>>;
|
|
249
|
+
formatOptions?: (items: any[]) => any[];
|
|
250
|
+
bindLabel: string;
|
|
251
|
+
bindValue: string;
|
|
252
|
+
placeholder: string;
|
|
253
|
+
options: any[];
|
|
254
|
+
value: any;
|
|
255
|
+
disabled: boolean;
|
|
256
|
+
tableParams: _angular_core.WritableSignal<PaginatedRequest>;
|
|
257
|
+
private onChange;
|
|
258
|
+
private onTouched;
|
|
259
|
+
ngOnInit(): void;
|
|
260
|
+
private loadOptions;
|
|
261
|
+
getOptions(): void;
|
|
262
|
+
writeValue(value: any): void;
|
|
263
|
+
registerOnChange(fn: any): void;
|
|
264
|
+
registerOnTouched(fn: any): void;
|
|
265
|
+
setDisabledState(isDisabled: boolean): void;
|
|
266
|
+
onValueChange(value: any): void;
|
|
267
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicNgSelectComponent, never>;
|
|
268
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicNgSelectComponent, "ngp-dynamic-select", never, { "getApiUrl": { "alias": "getApiUrl"; "required": false; }; "formatOptions": { "alias": "formatOptions"; "required": false; }; "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, {}, never, never, true, never>;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
type ApiOperations<T, CreateDto = Partial<T>, UpdateDto = Partial<T>, IdType = string | number> = {
|
|
272
|
+
get?: (params?: Record<string, unknown>) => Observable<T | T[] | PaginatedResponse<T>>;
|
|
273
|
+
getById?: (id: IdType, params?: Record<string, unknown>) => Observable<T | T[] | PaginatedResponse<T>>;
|
|
274
|
+
create?: (data: CreateDto) => Observable<T>;
|
|
275
|
+
update?: (data: UpdateDto) => Observable<T>;
|
|
276
|
+
delete?: (id: IdType) => Observable<void>;
|
|
277
|
+
updateStatus?: (id: IdType, status?: boolean) => Observable<T>;
|
|
278
|
+
updateById?: (id: IdType, data: Partial<UpdateDto>) => Observable<T>;
|
|
279
|
+
};
|
|
280
|
+
type ActionType = 'create' | 'update' | 'delete' | 'get' | 'updateStatus' | 'updateById';
|
|
281
|
+
|
|
282
|
+
declare abstract class CrudAbstractComponent<T, CreateDto = Partial<T>, UpdateDto = Partial<T>, IdType = string | number> {
|
|
283
|
+
private readonly sourceSignal;
|
|
284
|
+
private readonly loadingSignal;
|
|
285
|
+
private readonly errorSignal;
|
|
286
|
+
private readonly actionSignal;
|
|
287
|
+
private readonly firstLoadSignal;
|
|
288
|
+
private readonly showFormSignal;
|
|
289
|
+
private readonly formActionSignal;
|
|
290
|
+
protected readonly dataSignal: _angular_core.WritableSignal<T | T[] | null>;
|
|
291
|
+
filters: _angular_core.WritableSignal<Record<string, unknown> | null>;
|
|
292
|
+
tableParams: _angular_core.WritableSignal<PaginatedRequest>;
|
|
293
|
+
requestParams: _angular_core.Signal<{
|
|
294
|
+
[x: string]: any;
|
|
295
|
+
page: number;
|
|
296
|
+
size: number;
|
|
297
|
+
sort?: string | null;
|
|
298
|
+
}>;
|
|
299
|
+
private readonly injector;
|
|
300
|
+
readonly data: _angular_core.Signal<T | T[] | null>;
|
|
301
|
+
readonly isLoading: _angular_core.Signal<boolean>;
|
|
302
|
+
readonly error: _angular_core.Signal<Error | null>;
|
|
303
|
+
readonly currentAction: _angular_core.Signal<ActionType | null>;
|
|
304
|
+
readonly isFirstLoad: _angular_core.Signal<boolean>;
|
|
305
|
+
readonly isFormVisible: _angular_core.Signal<boolean>;
|
|
306
|
+
readonly formAction: _angular_core.Signal<"View" | "Update" | "Create" | null>;
|
|
307
|
+
readonly safeDataSource: _angular_core.Signal<{
|
|
308
|
+
hasNextPage: boolean;
|
|
309
|
+
totalElements: number;
|
|
310
|
+
results: T[];
|
|
311
|
+
currentPage: number;
|
|
312
|
+
pageSize: number;
|
|
313
|
+
}>;
|
|
314
|
+
/**
|
|
315
|
+
* Provides direct access to raw list data without pagination wrapper
|
|
316
|
+
* Returns an empty array if data is not available or not an array
|
|
317
|
+
*/
|
|
318
|
+
readonly rawList: _angular_core.Signal<T[]>;
|
|
319
|
+
private currentOperations?;
|
|
320
|
+
private currentParams?;
|
|
321
|
+
private readonly dataEffect;
|
|
322
|
+
/**
|
|
323
|
+
* Initialize with dynamic service operations
|
|
324
|
+
*/
|
|
325
|
+
protected initService(operations: ApiOperations<T, CreateDto, UpdateDto, IdType>): void;
|
|
326
|
+
/**
|
|
327
|
+
* GET data
|
|
328
|
+
*/
|
|
329
|
+
protected loadData(params?: Record<string, unknown>): void;
|
|
330
|
+
/**
|
|
331
|
+
* GET data by ID
|
|
332
|
+
*/
|
|
333
|
+
protected getById(id: IdType, params?: Record<string, unknown>): Observable<T | T[] | PaginatedResponse<T> | null>;
|
|
334
|
+
/**
|
|
335
|
+
* CREATE data
|
|
336
|
+
*/
|
|
337
|
+
protected createData(data: CreateDto): Observable<T | null>;
|
|
338
|
+
/**
|
|
339
|
+
* UPDATE data
|
|
340
|
+
*/
|
|
341
|
+
protected updateData(data: UpdateDto): Observable<T | null>;
|
|
342
|
+
/**
|
|
343
|
+
* UPDATE data by ID
|
|
344
|
+
*/
|
|
345
|
+
protected updateById(id: IdType, data: Partial<UpdateDto>): Observable<T | null>;
|
|
346
|
+
/**
|
|
347
|
+
* DELETE data
|
|
348
|
+
*/
|
|
349
|
+
protected deleteData(id: IdType): Observable<void | null>;
|
|
350
|
+
/**
|
|
351
|
+
* UPDATE status
|
|
352
|
+
*/
|
|
353
|
+
protected updateStatus(id: IdType, status: boolean): Observable<T | null>;
|
|
354
|
+
/**
|
|
355
|
+
* SHOW/HIDE form
|
|
356
|
+
* @param show Whether to show or hide the form
|
|
357
|
+
*/
|
|
358
|
+
protected showForm(show: boolean): void;
|
|
359
|
+
/**
|
|
360
|
+
* Update form action (create/edit)
|
|
361
|
+
* @param action The action to set for the form
|
|
362
|
+
*/
|
|
363
|
+
protected updateFormAction(action: string): void;
|
|
364
|
+
/**
|
|
365
|
+
* Shared operation execution logic
|
|
366
|
+
*/
|
|
367
|
+
private executeOperation;
|
|
368
|
+
/**
|
|
369
|
+
* Refresh current data
|
|
370
|
+
*/
|
|
371
|
+
protected refresh(): void;
|
|
372
|
+
get entityName(): string;
|
|
373
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CrudAbstractComponent<any, any, any, any>, never>;
|
|
374
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CrudAbstractComponent<any, any, any, any>>;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export { BasicNgSelectComponent, CrudAbstractComponent, DataTableComponent, DynamicNgSelectComponent, EmptyComponent, FgAddressComponent, FileUploadComponent, FormFieldWrapperComponent, PaginatedRequest };
|
|
378
|
+
export type { ActionType, Address, ApiOperations, Barangay, City, IdName, PaginatedResponse, RawAddress, TableColumn };
|