@memberjunction/ng-entity-viewer 5.10.1 → 5.12.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/dist/lib/aggregate-panel/aggregate-panel.component.js +2 -2
- package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.js +2 -2
- package/dist/lib/confirm-dialog/confirm-dialog.component.js +2 -2
- package/dist/lib/duplicate-view-dialog/duplicate-view-dialog.component.js +2 -2
- package/dist/lib/entity-cards/entity-cards.component.js +4 -4
- package/dist/lib/entity-cards/entity-cards.component.js.map +1 -1
- package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts +26 -3
- package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
- package/dist/lib/entity-data-grid/entity-data-grid.component.js +196 -137
- package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
- package/dist/lib/entity-data-grid/models/grid-types.js +4 -4
- package/dist/lib/entity-data-grid/models/grid-types.js.map +1 -1
- package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js +2 -2
- package/dist/lib/entity-viewer/entity-viewer.component.d.ts +5 -4
- package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -1
- package/dist/lib/entity-viewer/entity-viewer.component.js +46 -69
- package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -1
- package/dist/lib/pill/pill.component.js +2 -2
- package/dist/lib/pill/pill.component.js.map +1 -1
- package/dist/lib/quick-save-dialog/quick-save-dialog.component.d.ts +5 -4
- package/dist/lib/quick-save-dialog/quick-save-dialog.component.d.ts.map +1 -1
- package/dist/lib/quick-save-dialog/quick-save-dialog.component.js +10 -5
- package/dist/lib/quick-save-dialog/quick-save-dialog.component.js.map +1 -1
- package/dist/lib/shared-view-warning-dialog/shared-view-warning-dialog.component.js +2 -2
- package/dist/lib/types.d.ts +12 -0
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/view-config-panel/view-config-panel.component.d.ts +15 -2
- package/dist/lib/view-config-panel/view-config-panel.component.d.ts.map +1 -1
- package/dist/lib/view-config-panel/view-config-panel.component.js +65 -22
- package/dist/lib/view-config-panel/view-config-panel.component.js.map +1 -1
- package/dist/lib/view-header/view-header.component.js +2 -2
- package/dist/module.d.ts +15 -16
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +4 -6
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +0 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +0 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +10 -9
- package/dist/lib/pagination/pagination.component.d.ts +0 -60
- package/dist/lib/pagination/pagination.component.d.ts.map +0 -1
- package/dist/lib/pagination/pagination.component.js +0 -201
- package/dist/lib/pagination/pagination.component.js.map +0 -1
|
@@ -188,11 +188,11 @@ export class ViewHeaderComponent {
|
|
|
188
188
|
i0.ɵɵconditional(ctx.IsModified ? 5 : -1);
|
|
189
189
|
i0.ɵɵadvance();
|
|
190
190
|
i0.ɵɵconditional(ctx.IsModified && ctx.CanEdit ? 6 : -1);
|
|
191
|
-
} }, dependencies: [i1.DefaultValueAccessor, i1.NgControlStatus, i1.NgModel], styles: [".view-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.view-name-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n\n\n.view-name[_ngcontent-%COMP%] {\n font-size: 15px;\n font-weight: 500;\n color:
|
|
191
|
+
} }, dependencies: [i1.DefaultValueAccessor, i1.NgControlStatus, i1.NgModel], styles: [".view-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.view-name-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n\n\n.view-name[_ngcontent-%COMP%] {\n font-size: 15px;\n font-weight: 500;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 250px;\n}\n\n.view-name.editable[_ngcontent-%COMP%] {\n cursor: pointer;\n border-bottom: 1px dashed transparent;\n transition: border-color 0.15s ease;\n}\n\n.view-name.editable[_ngcontent-%COMP%]:hover {\n border-bottom-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary-hover);\n}\n\n\n\n.name-input[_ngcontent-%COMP%] {\n font-size: 15px;\n font-weight: 500;\n color: var(--mj-text-primary);\n padding: 2px 8px;\n border: 1px solid var(--mj-brand-primary);\n border-radius: 4px;\n outline: none;\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n max-width: 250px;\n}\n\n\n\n.shared-badge[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n\n.shared-badge[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n}\n\n\n\n.modified-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n border-radius: 10px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n\n\n.view-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.action-btn[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n font-size: 12px;\n}\n\n.action-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.action-btn.save-btn[_ngcontent-%COMP%] {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.action-btn.save-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.action-btn.save-as-btn[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.action-btn.save-as-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-bg-surface-active);\n}\n\n.action-btn.revert-btn[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.action-btn.revert-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error);\n}"] });
|
|
192
192
|
}
|
|
193
193
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ViewHeaderComponent, [{
|
|
194
194
|
type: Component,
|
|
195
|
-
args: [{ standalone: false, selector: 'mj-view-header', template: "<div class=\"view-header\">\n <!-- View Name (click to edit) -->\n <div class=\"view-name-container\">\n @if (IsEditing) {\n <input\n type=\"text\"\n class=\"name-input\"\n [(ngModel)]=\"EditValue\"\n (keydown.enter)=\"ConfirmEdit()\"\n (keydown.escape)=\"CancelEdit()\"\n (blur)=\"ConfirmEdit()\"\n #nameInput\n />\n } @else {\n <span\n class=\"view-name\"\n [class.editable]=\"CanEdit\"\n (click)=\"StartEdit()\"\n [title]=\"CanEdit ? 'Click to rename' : ViewName\">\n {{ ViewName }}\n </span>\n }\n\n <!-- Shared Indicator -->\n @if (IsShared) {\n <span class=\"shared-badge\" title=\"Shared view\">\n <i class=\"fa-solid fa-users\"></i>\n </span>\n }\n\n <!-- Modified Badge -->\n @if (IsModified) {\n <span class=\"modified-badge\">Modified</span>\n }\n </div>\n\n <!-- Actions (shown when modified) -->\n @if (IsModified && CanEdit) {\n <div class=\"view-actions\">\n <button\n class=\"action-btn save-btn\"\n (click)=\"OnSave()\"\n [disabled]=\"IsSaving\"\n title=\"Save changes\">\n @if (IsSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n } @else {\n <i class=\"fa-solid fa-save\"></i>\n }\n </button>\n <button\n class=\"action-btn save-as-btn\"\n (click)=\"OnSaveAsNew()\"\n [disabled]=\"IsSaving\"\n title=\"Save as new view\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n <button\n class=\"action-btn revert-btn\"\n (click)=\"OnRevert()\"\n [disabled]=\"IsSaving\"\n title=\"Revert to saved state\">\n <i class=\"fa-solid fa-undo\"></i>\n </button>\n </div>\n }\n</div>\n", styles: [".view-header {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.view-name-container {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* View Name */\n.view-name {\n font-size: 15px;\n font-weight: 500;\n color:
|
|
195
|
+
args: [{ standalone: false, selector: 'mj-view-header', template: "<div class=\"view-header\">\n <!-- View Name (click to edit) -->\n <div class=\"view-name-container\">\n @if (IsEditing) {\n <input\n type=\"text\"\n class=\"name-input\"\n [(ngModel)]=\"EditValue\"\n (keydown.enter)=\"ConfirmEdit()\"\n (keydown.escape)=\"CancelEdit()\"\n (blur)=\"ConfirmEdit()\"\n #nameInput\n />\n } @else {\n <span\n class=\"view-name\"\n [class.editable]=\"CanEdit\"\n (click)=\"StartEdit()\"\n [title]=\"CanEdit ? 'Click to rename' : ViewName\">\n {{ ViewName }}\n </span>\n }\n\n <!-- Shared Indicator -->\n @if (IsShared) {\n <span class=\"shared-badge\" title=\"Shared view\">\n <i class=\"fa-solid fa-users\"></i>\n </span>\n }\n\n <!-- Modified Badge -->\n @if (IsModified) {\n <span class=\"modified-badge\">Modified</span>\n }\n </div>\n\n <!-- Actions (shown when modified) -->\n @if (IsModified && CanEdit) {\n <div class=\"view-actions\">\n <button\n class=\"action-btn save-btn\"\n (click)=\"OnSave()\"\n [disabled]=\"IsSaving\"\n title=\"Save changes\">\n @if (IsSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n } @else {\n <i class=\"fa-solid fa-save\"></i>\n }\n </button>\n <button\n class=\"action-btn save-as-btn\"\n (click)=\"OnSaveAsNew()\"\n [disabled]=\"IsSaving\"\n title=\"Save as new view\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n <button\n class=\"action-btn revert-btn\"\n (click)=\"OnRevert()\"\n [disabled]=\"IsSaving\"\n title=\"Revert to saved state\">\n <i class=\"fa-solid fa-undo\"></i>\n </button>\n </div>\n }\n</div>\n", styles: [".view-header {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.view-name-container {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* View Name */\n.view-name {\n font-size: 15px;\n font-weight: 500;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 250px;\n}\n\n.view-name.editable {\n cursor: pointer;\n border-bottom: 1px dashed transparent;\n transition: border-color 0.15s ease;\n}\n\n.view-name.editable:hover {\n border-bottom-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary-hover);\n}\n\n/* Name Input (inline edit) */\n.name-input {\n font-size: 15px;\n font-weight: 500;\n color: var(--mj-text-primary);\n padding: 2px 8px;\n border: 1px solid var(--mj-brand-primary);\n border-radius: 4px;\n outline: none;\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n max-width: 250px;\n}\n\n/* Shared Badge */\n.shared-badge {\n display: flex;\n align-items: center;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n\n.shared-badge i {\n font-size: 12px;\n}\n\n/* Modified Badge */\n.modified-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n border-radius: 10px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n/* Action Buttons */\n.view-actions {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.action-btn {\n width: 28px;\n height: 28px;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n font-size: 12px;\n}\n\n.action-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.action-btn.save-btn {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.action-btn.save-btn:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.action-btn.save-as-btn {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.action-btn.save-as-btn:hover:not(:disabled) {\n background: var(--mj-bg-surface-active);\n}\n\n.action-btn.revert-btn {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.action-btn.revert-btn:hover:not(:disabled) {\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error);\n}\n"] }]
|
|
196
196
|
}], () => [{ type: i0.ChangeDetectorRef }], { ViewName: [{
|
|
197
197
|
type: Input
|
|
198
198
|
}], IsModified: [{
|
package/dist/module.d.ts
CHANGED
|
@@ -3,20 +3,20 @@ import * as i1 from "./lib/entity-cards/entity-cards.component";
|
|
|
3
3
|
import * as i2 from "./lib/entity-viewer/entity-viewer.component";
|
|
4
4
|
import * as i3 from "./lib/entity-record-detail-panel/entity-record-detail-panel.component";
|
|
5
5
|
import * as i4 from "./lib/pill/pill.component";
|
|
6
|
-
import * as i5 from "./lib/
|
|
7
|
-
import * as i6 from "./lib/
|
|
8
|
-
import * as i7 from "./lib/
|
|
9
|
-
import * as i8 from "./lib/aggregate-
|
|
10
|
-
import * as i9 from "./lib/
|
|
11
|
-
import * as i10 from "./lib/
|
|
12
|
-
import * as i11 from "./lib/
|
|
13
|
-
import * as i12 from "./lib/view-
|
|
14
|
-
import * as i13 from "./lib/
|
|
15
|
-
import * as i14 from "
|
|
16
|
-
import * as i15 from "@angular/
|
|
17
|
-
import * as i16 from "
|
|
18
|
-
import * as i17 from "
|
|
19
|
-
import * as i18 from "@memberjunction/ng-
|
|
6
|
+
import * as i5 from "./lib/entity-data-grid/entity-data-grid.component";
|
|
7
|
+
import * as i6 from "./lib/view-config-panel/view-config-panel.component";
|
|
8
|
+
import * as i7 from "./lib/aggregate-panel/aggregate-panel.component";
|
|
9
|
+
import * as i8 from "./lib/aggregate-setup-dialog/aggregate-setup-dialog.component";
|
|
10
|
+
import * as i9 from "./lib/confirm-dialog/confirm-dialog.component";
|
|
11
|
+
import * as i10 from "./lib/quick-save-dialog/quick-save-dialog.component";
|
|
12
|
+
import * as i11 from "./lib/view-header/view-header.component";
|
|
13
|
+
import * as i12 from "./lib/duplicate-view-dialog/duplicate-view-dialog.component";
|
|
14
|
+
import * as i13 from "./lib/shared-view-warning-dialog/shared-view-warning-dialog.component";
|
|
15
|
+
import * as i14 from "@angular/common";
|
|
16
|
+
import * as i15 from "@angular/forms";
|
|
17
|
+
import * as i16 from "ag-grid-angular";
|
|
18
|
+
import * as i17 from "@memberjunction/ng-shared-generic";
|
|
19
|
+
import * as i18 from "@memberjunction/ng-pagination";
|
|
20
20
|
import * as i19 from "@memberjunction/ng-timeline";
|
|
21
21
|
import * as i20 from "@memberjunction/ng-export-service";
|
|
22
22
|
/**
|
|
@@ -28,7 +28,6 @@ import * as i20 from "@memberjunction/ng-export-service";
|
|
|
28
28
|
* - EntityCardsComponent: Card-based view with standalone or parent-managed data
|
|
29
29
|
* - EntityRecordDetailPanelComponent: Detail panel for displaying single record information
|
|
30
30
|
* - PillComponent: Semantic color pills for categorical values
|
|
31
|
-
* - PaginationComponent: Beautiful "Load More" pagination with progress indicator
|
|
32
31
|
* - ViewConfigPanelComponent: Sliding panel for configuring view settings (columns, sort, filters)
|
|
33
32
|
*
|
|
34
33
|
* @example
|
|
@@ -43,7 +42,7 @@ import * as i20 from "@memberjunction/ng-export-service";
|
|
|
43
42
|
*/
|
|
44
43
|
export declare class EntityViewerModule {
|
|
45
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<EntityViewerModule, never>;
|
|
46
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EntityViewerModule, [typeof i1.EntityCardsComponent, typeof i2.EntityViewerComponent, typeof i3.EntityRecordDetailPanelComponent, typeof i4.PillComponent, typeof i5.
|
|
45
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EntityViewerModule, [typeof i1.EntityCardsComponent, typeof i2.EntityViewerComponent, typeof i3.EntityRecordDetailPanelComponent, typeof i4.PillComponent, typeof i5.EntityDataGridComponent, typeof i6.ViewConfigPanelComponent, typeof i7.AggregatePanelComponent, typeof i8.AggregateSetupDialogComponent, typeof i9.ConfirmDialogComponent, typeof i10.QuickSaveDialogComponent, typeof i11.ViewHeaderComponent, typeof i12.DuplicateViewDialogComponent, typeof i13.SharedViewWarningDialogComponent], [typeof i14.CommonModule, typeof i15.FormsModule, typeof i16.AgGridModule, typeof i17.SharedGenericModule, typeof i18.PaginationComponent, typeof i19.TimelineModule, typeof i20.ExportServiceModule], [typeof i1.EntityCardsComponent, typeof i2.EntityViewerComponent, typeof i3.EntityRecordDetailPanelComponent, typeof i4.PillComponent, typeof i5.EntityDataGridComponent, typeof i6.ViewConfigPanelComponent, typeof i7.AggregatePanelComponent, typeof i8.AggregateSetupDialogComponent, typeof i9.ConfirmDialogComponent, typeof i10.QuickSaveDialogComponent, typeof i11.ViewHeaderComponent, typeof i12.DuplicateViewDialogComponent, typeof i13.SharedViewWarningDialogComponent]>;
|
|
47
46
|
static ɵinj: i0.ɵɵInjectorDeclaration<EntityViewerModule>;
|
|
48
47
|
}
|
|
49
48
|
//# sourceMappingURL=module.d.ts.map
|
package/dist/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAyCa,kBAAkB;yCAAlB,kBAAkB;0CAAlB,kBAAkB;0CAAlB,kBAAkB;CAAI"}
|
package/dist/module.js
CHANGED
|
@@ -3,13 +3,13 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import { FormsModule } from '@angular/forms';
|
|
4
4
|
import { AgGridModule } from 'ag-grid-angular';
|
|
5
5
|
import { SharedGenericModule } from '@memberjunction/ng-shared-generic';
|
|
6
|
+
import { PaginationComponent } from '@memberjunction/ng-pagination';
|
|
6
7
|
import { TimelineModule } from '@memberjunction/ng-timeline';
|
|
7
8
|
import { ExportServiceModule } from '@memberjunction/ng-export-service';
|
|
8
9
|
import { EntityCardsComponent } from './lib/entity-cards/entity-cards.component';
|
|
9
10
|
import { EntityViewerComponent } from './lib/entity-viewer/entity-viewer.component';
|
|
10
11
|
import { EntityRecordDetailPanelComponent } from './lib/entity-record-detail-panel/entity-record-detail-panel.component';
|
|
11
12
|
import { PillComponent } from './lib/pill/pill.component';
|
|
12
|
-
import { PaginationComponent } from './lib/pagination/pagination.component';
|
|
13
13
|
import { EntityDataGridComponent } from './lib/entity-data-grid/entity-data-grid.component';
|
|
14
14
|
import { ViewConfigPanelComponent } from './lib/view-config-panel/view-config-panel.component';
|
|
15
15
|
import { AggregatePanelComponent } from './lib/aggregate-panel/aggregate-panel.component';
|
|
@@ -29,7 +29,6 @@ import * as i0 from "@angular/core";
|
|
|
29
29
|
* - EntityCardsComponent: Card-based view with standalone or parent-managed data
|
|
30
30
|
* - EntityRecordDetailPanelComponent: Detail panel for displaying single record information
|
|
31
31
|
* - PillComponent: Semantic color pills for categorical values
|
|
32
|
-
* - PaginationComponent: Beautiful "Load More" pagination with progress indicator
|
|
33
32
|
* - ViewConfigPanelComponent: Sliding panel for configuring view settings (columns, sort, filters)
|
|
34
33
|
*
|
|
35
34
|
* @example
|
|
@@ -49,6 +48,7 @@ export class EntityViewerModule {
|
|
|
49
48
|
FormsModule,
|
|
50
49
|
AgGridModule,
|
|
51
50
|
SharedGenericModule,
|
|
51
|
+
PaginationComponent,
|
|
52
52
|
TimelineModule,
|
|
53
53
|
ExportServiceModule] });
|
|
54
54
|
}
|
|
@@ -60,7 +60,6 @@ export class EntityViewerModule {
|
|
|
60
60
|
EntityViewerComponent,
|
|
61
61
|
EntityRecordDetailPanelComponent,
|
|
62
62
|
PillComponent,
|
|
63
|
-
PaginationComponent,
|
|
64
63
|
EntityDataGridComponent,
|
|
65
64
|
ViewConfigPanelComponent,
|
|
66
65
|
AggregatePanelComponent,
|
|
@@ -76,6 +75,7 @@ export class EntityViewerModule {
|
|
|
76
75
|
FormsModule,
|
|
77
76
|
AgGridModule,
|
|
78
77
|
SharedGenericModule,
|
|
78
|
+
PaginationComponent,
|
|
79
79
|
TimelineModule,
|
|
80
80
|
ExportServiceModule
|
|
81
81
|
],
|
|
@@ -84,7 +84,6 @@ export class EntityViewerModule {
|
|
|
84
84
|
EntityViewerComponent,
|
|
85
85
|
EntityRecordDetailPanelComponent,
|
|
86
86
|
PillComponent,
|
|
87
|
-
PaginationComponent,
|
|
88
87
|
EntityDataGridComponent,
|
|
89
88
|
ViewConfigPanelComponent,
|
|
90
89
|
AggregatePanelComponent,
|
|
@@ -101,7 +100,6 @@ export class EntityViewerModule {
|
|
|
101
100
|
EntityViewerComponent,
|
|
102
101
|
EntityRecordDetailPanelComponent,
|
|
103
102
|
PillComponent,
|
|
104
|
-
PaginationComponent,
|
|
105
103
|
EntityDataGridComponent,
|
|
106
104
|
ViewConfigPanelComponent,
|
|
107
105
|
AggregatePanelComponent,
|
|
@@ -114,12 +112,12 @@ export class EntityViewerModule {
|
|
|
114
112
|
FormsModule,
|
|
115
113
|
AgGridModule,
|
|
116
114
|
SharedGenericModule,
|
|
115
|
+
PaginationComponent,
|
|
117
116
|
TimelineModule,
|
|
118
117
|
ExportServiceModule], exports: [EntityCardsComponent,
|
|
119
118
|
EntityViewerComponent,
|
|
120
119
|
EntityRecordDetailPanelComponent,
|
|
121
120
|
PillComponent,
|
|
122
|
-
PaginationComponent,
|
|
123
121
|
EntityDataGridComponent,
|
|
124
122
|
ViewConfigPanelComponent,
|
|
125
123
|
AggregatePanelComponent,
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,gCAAgC,EAAE,MAAM,uEAAuE,CAAC;AACzH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"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","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { AgGridModule } from 'ag-grid-angular';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\nimport { PaginationComponent } from '@memberjunction/ng-pagination';\nimport { TimelineModule } from '@memberjunction/ng-timeline';\nimport { ExportServiceModule } from '@memberjunction/ng-export-service';\n\nimport { EntityCardsComponent } from './lib/entity-cards/entity-cards.component';\nimport { EntityViewerComponent } from './lib/entity-viewer/entity-viewer.component';\nimport { EntityRecordDetailPanelComponent } from './lib/entity-record-detail-panel/entity-record-detail-panel.component';\nimport { PillComponent } from './lib/pill/pill.component';\nimport { EntityDataGridComponent } from './lib/entity-data-grid/entity-data-grid.component';\nimport { ViewConfigPanelComponent } from './lib/view-config-panel/view-config-panel.component';\nimport { AggregatePanelComponent } from './lib/aggregate-panel/aggregate-panel.component';\nimport { AggregateSetupDialogComponent } from './lib/aggregate-setup-dialog/aggregate-setup-dialog.component';\nimport { ConfirmDialogComponent } from './lib/confirm-dialog/confirm-dialog.component';\nimport { QuickSaveDialogComponent } from './lib/quick-save-dialog/quick-save-dialog.component';\nimport { ViewHeaderComponent } from './lib/view-header/view-header.component';\nimport { DuplicateViewDialogComponent } from './lib/duplicate-view-dialog/duplicate-view-dialog.component';\nimport { SharedViewWarningDialogComponent } from './lib/shared-view-warning-dialog/shared-view-warning-dialog.component';\n\n/**\n * EntityViewerModule - Provides components for viewing entity data\n *\n * This module exports:\n * - EntityViewerComponent: Composite component with grid/cards toggle, server-side filtering/sorting/pagination\n * - EntityDataGridComponent: Modern AG Grid-based grid with Before/After cancelable events\n * - EntityCardsComponent: Card-based view with standalone or parent-managed data\n * - EntityRecordDetailPanelComponent: Detail panel for displaying single record information\n * - PillComponent: Semantic color pills for categorical values\n * - ViewConfigPanelComponent: Sliding panel for configuring view settings (columns, sort, filters)\n *\n * @example\n * ```typescript\n * import { EntityViewerModule } from '@memberjunction/ng-entity-viewer';\n *\n * @NgModule({\n * imports: [EntityViewerModule]\n * })\n * export class MyModule { }\n * ```\n */\n@NgModule({\n declarations: [\n EntityCardsComponent,\n EntityViewerComponent,\n EntityRecordDetailPanelComponent,\n PillComponent,\n EntityDataGridComponent,\n ViewConfigPanelComponent,\n AggregatePanelComponent,\n AggregateSetupDialogComponent,\n ConfirmDialogComponent,\n QuickSaveDialogComponent,\n ViewHeaderComponent,\n DuplicateViewDialogComponent,\n SharedViewWarningDialogComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n AgGridModule,\n SharedGenericModule,\n PaginationComponent,\n TimelineModule,\n ExportServiceModule\n ],\n exports: [\n EntityCardsComponent,\n EntityViewerComponent,\n EntityRecordDetailPanelComponent,\n PillComponent,\n EntityDataGridComponent,\n ViewConfigPanelComponent,\n AggregatePanelComponent,\n AggregateSetupDialogComponent,\n ConfirmDialogComponent,\n QuickSaveDialogComponent,\n ViewHeaderComponent,\n DuplicateViewDialogComponent,\n SharedViewWarningDialogComponent\n ]\n})\nexport class EntityViewerModule { }\n"]}
|
package/dist/public-api.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export * from './lib/entity-cards/entity-cards.component';
|
|
|
10
10
|
export * from './lib/entity-viewer/entity-viewer.component';
|
|
11
11
|
export * from './lib/entity-record-detail-panel/entity-record-detail-panel.component';
|
|
12
12
|
export * from './lib/pill/pill.component';
|
|
13
|
-
export * from './lib/pagination/pagination.component';
|
|
14
13
|
export * from './lib/entity-data-grid/entity-data-grid.component';
|
|
15
14
|
export * from './lib/entity-data-grid/models/grid-types';
|
|
16
15
|
export * from './lib/entity-data-grid/events/grid-events';
|
package/dist/public-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,UAAU,CAAC;AAGzB,cAAc,aAAa,CAAC;AAG5B,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uEAAuE,CAAC;AACtF,cAAc,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,UAAU,CAAC;AAGzB,cAAc,aAAa,CAAC;AAG5B,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uEAAuE,CAAC;AACtF,cAAc,2BAA2B,CAAC;AAG1C,cAAc,mDAAmD,CAAC;AAClE,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAG1D,cAAc,qDAAqD,CAAC;AAGpE,cAAc,iDAAiD,CAAC;AAGhE,cAAc,+DAA+D,CAAC;AAG9E,cAAc,+CAA+C,CAAC;AAG9D,cAAc,qDAAqD,CAAC;AAGpE,cAAc,yCAAyC,CAAC;AAGxD,cAAc,6DAA6D,CAAC;AAG5E,cAAc,uEAAuE,CAAC;AAGtF,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC"}
|
package/dist/public-api.js
CHANGED
|
@@ -13,7 +13,6 @@ export * from './lib/entity-cards/entity-cards.component';
|
|
|
13
13
|
export * from './lib/entity-viewer/entity-viewer.component';
|
|
14
14
|
export * from './lib/entity-record-detail-panel/entity-record-detail-panel.component';
|
|
15
15
|
export * from './lib/pill/pill.component';
|
|
16
|
-
export * from './lib/pagination/pagination.component';
|
|
17
16
|
// Entity Data Grid (modern AG Grid component with Before/After events)
|
|
18
17
|
export * from './lib/entity-data-grid/entity-data-grid.component';
|
|
19
18
|
export * from './lib/entity-data-grid/models/grid-types';
|
package/dist/public-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,SAAS;AACT,cAAc,UAAU,CAAC;AAEzB,uBAAuB;AACvB,cAAc,aAAa,CAAC;AAE5B,aAAa;AACb,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uEAAuE,CAAC;AACtF,cAAc,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,SAAS;AACT,cAAc,UAAU,CAAC;AAEzB,uBAAuB;AACvB,cAAc,aAAa,CAAC;AAE5B,aAAa;AACb,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uEAAuE,CAAC;AACtF,cAAc,2BAA2B,CAAC;AAE1C,uEAAuE;AACvE,cAAc,mDAAmD,CAAC;AAClE,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAE1D,2DAA2D;AAC3D,cAAc,qDAAqD,CAAC;AAEpE,iDAAiD;AACjD,cAAc,iDAAiD,CAAC;AAEhE,oEAAoE;AACpE,cAAc,+DAA+D,CAAC;AAE9E,wDAAwD;AACxD,cAAc,+CAA+C,CAAC;AAE9D,8CAA8C;AAC9C,cAAc,qDAAqD,CAAC;AAEpE,sEAAsE;AACtE,cAAc,yCAAyC,CAAC;AAExD,uEAAuE;AACvE,cAAc,6DAA6D,CAAC;AAE5E,gEAAgE;AAChE,cAAc,uEAAuE,CAAC;AAEtF,YAAY;AACZ,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["/**\n * @memberjunction/ng-entity-viewer\n *\n * Angular components for viewing entity data in multiple formats.\n * Provides grid (AG Grid) and card views with filtering, selection, and shared data management.\n */\n\n// Module\nexport * from './module';\n\n// Types and Interfaces\nexport * from './lib/types';\n\n// Components\nexport * from './lib/entity-cards/entity-cards.component';\nexport * from './lib/entity-viewer/entity-viewer.component';\nexport * from './lib/entity-record-detail-panel/entity-record-detail-panel.component';\nexport * from './lib/pill/pill.component';\n\n// Entity Data Grid (modern AG Grid component with Before/After events)\nexport * from './lib/entity-data-grid/entity-data-grid.component';\nexport * from './lib/entity-data-grid/models/grid-types';\nexport * from './lib/entity-data-grid/events/grid-events';\n\n// View Config Panel (sliding panel for view configuration)\nexport * from './lib/view-config-panel/view-config-panel.component';\n\n// Aggregate Panel (card-based aggregate display)\nexport * from './lib/aggregate-panel/aggregate-panel.component';\n\n// Aggregate Setup Dialog (3-mode dialog for configuring aggregates)\nexport * from './lib/aggregate-setup-dialog/aggregate-setup-dialog.component';\n\n// Confirm Dialog (generic reusable confirmation dialog)\nexport * from './lib/confirm-dialog/confirm-dialog.component';\n\n// Quick Save Dialog (focused view save modal)\nexport * from './lib/quick-save-dialog/quick-save-dialog.component';\n\n// View Header (inline name edit, modified badge, save/revert actions)\nexport * from './lib/view-header/view-header.component';\n\n// Duplicate View Dialog (modal for duplicating views with custom name)\nexport * from './lib/duplicate-view-dialog/duplicate-view-dialog.component';\n\n// Shared View Warning Dialog (warning when saving shared views)\nexport * from './lib/shared-view-warning-dialog/shared-view-warning-dialog.component';\n\n// Utilities\nexport * from './lib/utils/highlight.util';\nexport * from './lib/utils/record.util';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-entity-viewer",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.0",
|
|
4
4
|
"description": "MemberJunction: Angular components for viewing entity data in multiple formats (grid, cards) with filtering, selection, and shared data management",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -37,14 +37,15 @@
|
|
|
37
37
|
"ag-grid-community": "^35.0.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@memberjunction/core-entities": "5.
|
|
41
|
-
"@memberjunction/export-engine": "5.
|
|
42
|
-
"@memberjunction/global": "5.
|
|
43
|
-
"@memberjunction/core": "5.
|
|
44
|
-
"@memberjunction/ng-
|
|
45
|
-
"@memberjunction/ng-
|
|
46
|
-
"@memberjunction/ng-
|
|
47
|
-
"@memberjunction/ng-
|
|
40
|
+
"@memberjunction/core-entities": "5.12.0",
|
|
41
|
+
"@memberjunction/export-engine": "5.12.0",
|
|
42
|
+
"@memberjunction/global": "5.12.0",
|
|
43
|
+
"@memberjunction/core": "5.12.0",
|
|
44
|
+
"@memberjunction/ng-pagination": "5.12.0",
|
|
45
|
+
"@memberjunction/ng-shared-generic": "5.12.0",
|
|
46
|
+
"@memberjunction/ng-timeline": "5.12.0",
|
|
47
|
+
"@memberjunction/ng-filter-builder": "5.12.0",
|
|
48
|
+
"@memberjunction/ng-export-service": "5.12.0",
|
|
48
49
|
"rxjs": "^7.8.2",
|
|
49
50
|
"tslib": "^2.8.1"
|
|
50
51
|
},
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { PaginationState } from '../types';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* PaginationComponent - Beautiful pagination controls for entity data
|
|
6
|
-
*
|
|
7
|
-
* Provides a modern, responsive pagination UI with:
|
|
8
|
-
* - Current page / total pages display
|
|
9
|
-
* - Records count with range display
|
|
10
|
-
* - Load more button for progressive loading
|
|
11
|
-
* - Visual loading state
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```html
|
|
15
|
-
* <mj-pagination
|
|
16
|
-
* [pagination]="paginationState"
|
|
17
|
-
* (loadMore)="onLoadMore()">
|
|
18
|
-
* </mj-pagination>
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare class PaginationComponent implements OnChanges {
|
|
22
|
-
/**
|
|
23
|
-
* Current pagination state
|
|
24
|
-
*/
|
|
25
|
-
pagination: PaginationState;
|
|
26
|
-
/**
|
|
27
|
-
* Number of records currently displayed
|
|
28
|
-
*/
|
|
29
|
-
loadedRecordCount: number;
|
|
30
|
-
/**
|
|
31
|
-
* Emitted when user requests more data
|
|
32
|
-
*/
|
|
33
|
-
loadMore: EventEmitter<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Emitted when user requests to go to a specific page
|
|
36
|
-
*/
|
|
37
|
-
goToPage: EventEmitter<number>;
|
|
38
|
-
displayedFrom: number;
|
|
39
|
-
displayedTo: number;
|
|
40
|
-
totalPages: number;
|
|
41
|
-
currentPageDisplay: number;
|
|
42
|
-
remainingRecords: number;
|
|
43
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
44
|
-
private updateDisplayValues;
|
|
45
|
-
/**
|
|
46
|
-
* Handle load more button click
|
|
47
|
-
*/
|
|
48
|
-
onLoadMore(): void;
|
|
49
|
-
/**
|
|
50
|
-
* Get the progress percentage for the progress bar
|
|
51
|
-
*/
|
|
52
|
-
get progressPercent(): number;
|
|
53
|
-
/**
|
|
54
|
-
* Get the number of records that will load on next click
|
|
55
|
-
*/
|
|
56
|
-
get nextLoadCount(): number;
|
|
57
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
|
|
58
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "mj-pagination", never, { "pagination": { "alias": "pagination"; "required": false; }; "loadedRecordCount": { "alias": "loadedRecordCount"; "required": false; }; }, { "loadMore": "loadMore"; "goToPage": "goToPage"; }, never, never, false, never>;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=pagination.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.component.d.ts","sourceRoot":"","sources":["../../../src/lib/pagination/pagination.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;;AAE3C;;;;;;;;;;;;;;;;GAgBG;AACH,qBAMa,mBAAoB,YAAW,SAAS;IACnD;;OAEG;IACM,UAAU,EAAE,eAAe,CAMlC;IAEF;;OAEG;IACM,iBAAiB,EAAE,MAAM,CAAK;IAEvC;;OAEG;IACO,QAAQ,qBAA4B;IAE9C;;OAEG;IACO,QAAQ,uBAA8B;IAGzC,aAAa,EAAE,MAAM,CAAK;IAC1B,WAAW,EAAE,MAAM,CAAK;IACxB,UAAU,EAAE,MAAM,CAAK;IACvB,kBAAkB,EAAE,MAAM,CAAK;IAC/B,gBAAgB,EAAE,MAAM,CAAK;IAEpC,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMzC,OAAO,CAAC,mBAAmB;IAe3B;;OAEG;IACH,UAAU,IAAI,IAAI;IAMlB;;OAEG;IACH,IAAI,eAAe,IAAI,MAAM,CAG5B;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;yCA7EU,mBAAmB;2CAAnB,mBAAmB;CA8E/B"}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
function PaginationComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
5
|
-
i0.ɵɵelementStart(0, "span", 7);
|
|
6
|
-
i0.ɵɵtext(1);
|
|
7
|
-
i0.ɵɵpipe(2, "number");
|
|
8
|
-
i0.ɵɵelementEnd();
|
|
9
|
-
i0.ɵɵelementStart(3, "span", 8);
|
|
10
|
-
i0.ɵɵtext(4, "of");
|
|
11
|
-
i0.ɵɵelementEnd();
|
|
12
|
-
i0.ɵɵelementStart(5, "span", 9);
|
|
13
|
-
i0.ɵɵtext(6);
|
|
14
|
-
i0.ɵɵpipe(7, "number");
|
|
15
|
-
i0.ɵɵelementEnd();
|
|
16
|
-
i0.ɵɵelementStart(8, "span", 10);
|
|
17
|
-
i0.ɵɵtext(9, "records");
|
|
18
|
-
i0.ɵɵelementEnd();
|
|
19
|
-
} if (rf & 2) {
|
|
20
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
21
|
-
i0.ɵɵadvance();
|
|
22
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, ctx_r0.displayedTo));
|
|
23
|
-
i0.ɵɵadvance(5);
|
|
24
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 4, ctx_r0.pagination.totalRecords));
|
|
25
|
-
} }
|
|
26
|
-
function PaginationComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
-
i0.ɵɵelementStart(0, "span", 3);
|
|
28
|
-
i0.ɵɵtext(1, "No records");
|
|
29
|
-
i0.ɵɵelementEnd();
|
|
30
|
-
} }
|
|
31
|
-
function PaginationComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
-
i0.ɵɵelementStart(0, "div", 4)(1, "div", 11);
|
|
33
|
-
i0.ɵɵelement(2, "div", 12);
|
|
34
|
-
i0.ɵɵelementEnd()();
|
|
35
|
-
} if (rf & 2) {
|
|
36
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
37
|
-
i0.ɵɵadvance(2);
|
|
38
|
-
i0.ɵɵstyleProp("width", ctx_r0.progressPercent, "%");
|
|
39
|
-
i0.ɵɵclassProp("complete", !ctx_r0.pagination.hasMore);
|
|
40
|
-
} }
|
|
41
|
-
function PaginationComponent_Conditional_6_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
42
|
-
i0.ɵɵelement(0, "i", 14);
|
|
43
|
-
i0.ɵɵelementStart(1, "span");
|
|
44
|
-
i0.ɵɵtext(2, "Loading...");
|
|
45
|
-
i0.ɵɵelementEnd();
|
|
46
|
-
} }
|
|
47
|
-
function PaginationComponent_Conditional_6_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
48
|
-
i0.ɵɵelement(0, "i", 15);
|
|
49
|
-
i0.ɵɵelementStart(1, "span");
|
|
50
|
-
i0.ɵɵtext(2);
|
|
51
|
-
i0.ɵɵpipe(3, "number");
|
|
52
|
-
i0.ɵɵelementEnd();
|
|
53
|
-
i0.ɵɵelementStart(4, "span", 16);
|
|
54
|
-
i0.ɵɵtext(5);
|
|
55
|
-
i0.ɵɵpipe(6, "number");
|
|
56
|
-
i0.ɵɵelementEnd();
|
|
57
|
-
} if (rf & 2) {
|
|
58
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
59
|
-
i0.ɵɵadvance(2);
|
|
60
|
-
i0.ɵɵtextInterpolate1("Load ", i0.ɵɵpipeBind1(3, 2, ctx_r0.nextLoadCount), " more");
|
|
61
|
-
i0.ɵɵadvance(3);
|
|
62
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(6, 4, ctx_r0.remainingRecords), " remaining");
|
|
63
|
-
} }
|
|
64
|
-
function PaginationComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
65
|
-
const _r2 = i0.ɵɵgetCurrentView();
|
|
66
|
-
i0.ɵɵelementStart(0, "div", 5)(1, "button", 13);
|
|
67
|
-
i0.ɵɵlistener("click", function PaginationComponent_Conditional_6_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onLoadMore()); });
|
|
68
|
-
i0.ɵɵconditionalCreate(2, PaginationComponent_Conditional_6_Conditional_2_Template, 3, 0)(3, PaginationComponent_Conditional_6_Conditional_3_Template, 7, 6);
|
|
69
|
-
i0.ɵɵelementEnd()();
|
|
70
|
-
} if (rf & 2) {
|
|
71
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
72
|
-
i0.ɵɵadvance();
|
|
73
|
-
i0.ɵɵproperty("disabled", ctx_r0.pagination.isLoading);
|
|
74
|
-
i0.ɵɵadvance();
|
|
75
|
-
i0.ɵɵconditional(ctx_r0.pagination.isLoading ? 2 : 3);
|
|
76
|
-
} }
|
|
77
|
-
function PaginationComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
-
i0.ɵɵelementStart(0, "div", 6);
|
|
79
|
-
i0.ɵɵelement(1, "i", 17);
|
|
80
|
-
i0.ɵɵelementStart(2, "span");
|
|
81
|
-
i0.ɵɵtext(3, "All records loaded");
|
|
82
|
-
i0.ɵɵelementEnd()();
|
|
83
|
-
} }
|
|
84
|
-
/**
|
|
85
|
-
* PaginationComponent - Beautiful pagination controls for entity data
|
|
86
|
-
*
|
|
87
|
-
* Provides a modern, responsive pagination UI with:
|
|
88
|
-
* - Current page / total pages display
|
|
89
|
-
* - Records count with range display
|
|
90
|
-
* - Load more button for progressive loading
|
|
91
|
-
* - Visual loading state
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* ```html
|
|
95
|
-
* <mj-pagination
|
|
96
|
-
* [pagination]="paginationState"
|
|
97
|
-
* (loadMore)="onLoadMore()">
|
|
98
|
-
* </mj-pagination>
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
export class PaginationComponent {
|
|
102
|
-
/**
|
|
103
|
-
* Current pagination state
|
|
104
|
-
*/
|
|
105
|
-
pagination = {
|
|
106
|
-
currentPage: 0,
|
|
107
|
-
pageSize: 100,
|
|
108
|
-
totalRecords: 0,
|
|
109
|
-
hasMore: false,
|
|
110
|
-
isLoading: false
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Number of records currently displayed
|
|
114
|
-
*/
|
|
115
|
-
loadedRecordCount = 0;
|
|
116
|
-
/**
|
|
117
|
-
* Emitted when user requests more data
|
|
118
|
-
*/
|
|
119
|
-
loadMore = new EventEmitter();
|
|
120
|
-
/**
|
|
121
|
-
* Emitted when user requests to go to a specific page
|
|
122
|
-
*/
|
|
123
|
-
goToPage = new EventEmitter();
|
|
124
|
-
// Computed display values
|
|
125
|
-
displayedFrom = 0;
|
|
126
|
-
displayedTo = 0;
|
|
127
|
-
totalPages = 0;
|
|
128
|
-
currentPageDisplay = 0;
|
|
129
|
-
remainingRecords = 0;
|
|
130
|
-
ngOnChanges(changes) {
|
|
131
|
-
if (changes['pagination'] || changes['loadedRecordCount']) {
|
|
132
|
-
this.updateDisplayValues();
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
updateDisplayValues() {
|
|
136
|
-
const { currentPage, pageSize, totalRecords, hasMore } = this.pagination;
|
|
137
|
-
// Calculate display range
|
|
138
|
-
this.displayedFrom = totalRecords > 0 ? 1 : 0;
|
|
139
|
-
this.displayedTo = this.loadedRecordCount;
|
|
140
|
-
// Calculate total pages
|
|
141
|
-
this.totalPages = Math.ceil(totalRecords / pageSize);
|
|
142
|
-
this.currentPageDisplay = currentPage + 1;
|
|
143
|
-
// Calculate remaining records
|
|
144
|
-
this.remainingRecords = Math.max(0, totalRecords - this.loadedRecordCount);
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Handle load more button click
|
|
148
|
-
*/
|
|
149
|
-
onLoadMore() {
|
|
150
|
-
if (!this.pagination.isLoading && this.pagination.hasMore) {
|
|
151
|
-
this.loadMore.emit();
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Get the progress percentage for the progress bar
|
|
156
|
-
*/
|
|
157
|
-
get progressPercent() {
|
|
158
|
-
if (this.pagination.totalRecords === 0)
|
|
159
|
-
return 100;
|
|
160
|
-
return Math.min(100, (this.loadedRecordCount / this.pagination.totalRecords) * 100);
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Get the number of records that will load on next click
|
|
164
|
-
*/
|
|
165
|
-
get nextLoadCount() {
|
|
166
|
-
return Math.min(this.pagination.pageSize, this.remainingRecords);
|
|
167
|
-
}
|
|
168
|
-
static ɵfac = function PaginationComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationComponent)(); };
|
|
169
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["mj-pagination"]], inputs: { pagination: "pagination", loadedRecordCount: "loadedRecordCount" }, outputs: { loadMore: "loadMore", goToPage: "goToPage" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 8, vars: 4, consts: [[1, "pagination-container"], [1, "pagination-info"], [1, "records-display"], [1, "no-records"], [1, "progress-section"], [1, "load-more-section"], [1, "all-loaded"], [1, "records-shown"], [1, "records-separator"], [1, "records-total"], [1, "records-label"], [1, "progress-bar-container"], [1, "progress-bar-fill"], [1, "load-more-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-spinner", "fa-spin", "loading-icon"], [1, "fa-solid", "fa-arrow-down", "load-icon"], [1, "remaining-badge"], [1, "fa-solid", "fa-check-circle"]], template: function PaginationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
170
|
-
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "span", 2);
|
|
171
|
-
i0.ɵɵconditionalCreate(3, PaginationComponent_Conditional_3_Template, 10, 6)(4, PaginationComponent_Conditional_4_Template, 2, 0, "span", 3);
|
|
172
|
-
i0.ɵɵelementEnd()();
|
|
173
|
-
i0.ɵɵconditionalCreate(5, PaginationComponent_Conditional_5_Template, 3, 4, "div", 4);
|
|
174
|
-
i0.ɵɵconditionalCreate(6, PaginationComponent_Conditional_6_Template, 4, 2, "div", 5);
|
|
175
|
-
i0.ɵɵconditionalCreate(7, PaginationComponent_Conditional_7_Template, 4, 0, "div", 6);
|
|
176
|
-
i0.ɵɵelementEnd();
|
|
177
|
-
} if (rf & 2) {
|
|
178
|
-
i0.ɵɵadvance(3);
|
|
179
|
-
i0.ɵɵconditional(ctx.pagination.totalRecords > 0 ? 3 : 4);
|
|
180
|
-
i0.ɵɵadvance(2);
|
|
181
|
-
i0.ɵɵconditional(ctx.pagination.totalRecords > 0 ? 5 : -1);
|
|
182
|
-
i0.ɵɵadvance();
|
|
183
|
-
i0.ɵɵconditional(ctx.pagination.hasMore ? 6 : -1);
|
|
184
|
-
i0.ɵɵadvance();
|
|
185
|
-
i0.ɵɵconditional(!ctx.pagination.hasMore && ctx.pagination.totalRecords > 0 ? 7 : -1);
|
|
186
|
-
} }, dependencies: [i1.DecimalPipe], styles: [".pagination-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 20px;\n padding: 16px 24px;\n background: linear-gradient(to top, rgba(248, 249, 250, 0.95), rgba(255, 255, 255, 0.9));\n border-top: 1px solid #e8e8e8;\n backdrop-filter: blur(8px);\n flex-shrink: 0;\n}\n\n\n\n.pagination-info[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n}\n\n.records-display[_ngcontent-%COMP%] {\n display: flex;\n align-items: baseline;\n gap: 6px;\n font-size: 14px;\n color: #666;\n}\n\n.records-shown[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 16px;\n color: #1976d2;\n}\n\n.records-separator[_ngcontent-%COMP%] {\n color: #999;\n}\n\n.records-total[_ngcontent-%COMP%] {\n font-weight: 500;\n color: #333;\n}\n\n.records-label[_ngcontent-%COMP%] {\n color: #999;\n}\n\n.no-records[_ngcontent-%COMP%] {\n color: #999;\n font-style: italic;\n}\n\n\n\n.progress-section[_ngcontent-%COMP%] {\n flex: 1;\n max-width: 300px;\n min-width: 100px;\n}\n\n.progress-bar-container[_ngcontent-%COMP%] {\n height: 6px;\n background: #e8e8e8;\n border-radius: 3px;\n overflow: hidden;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);\n}\n\n.progress-bar-fill[_ngcontent-%COMP%] {\n height: 100%;\n background: linear-gradient(90deg, #42a5f5, #1976d2);\n border-radius: 3px;\n transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n position: relative;\n}\n\n.progress-bar-fill[_ngcontent-%COMP%]::after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(\n 90deg,\n transparent 0%,\n rgba(255, 255, 255, 0.3) 50%,\n transparent 100%\n );\n animation: _ngcontent-%COMP%_shimmer 2s infinite;\n}\n\n.progress-bar-fill.complete[_ngcontent-%COMP%] {\n background: linear-gradient(90deg, #66bb6a, #43a047);\n}\n\n.progress-bar-fill.complete[_ngcontent-%COMP%]::after {\n display: none;\n}\n\n@keyframes _ngcontent-%COMP%_shimmer {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(100%); }\n}\n\n\n\n.load-more-section[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n}\n\n.load-more-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 20px;\n background: linear-gradient(135deg, #1976d2, #1565c0);\n color: white;\n border: none;\n border-radius: 24px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n box-shadow: 0 2px 8px rgba(25, 118, 210, 0.25);\n}\n\n.load-more-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: linear-gradient(135deg, #1565c0, #0d47a1);\n box-shadow: 0 4px 12px rgba(25, 118, 210, 0.35);\n transform: translateY(-1px);\n}\n\n.load-more-btn[_ngcontent-%COMP%]:active:not(:disabled) {\n transform: translateY(0);\n box-shadow: 0 2px 6px rgba(25, 118, 210, 0.25);\n}\n\n.load-more-btn[_ngcontent-%COMP%]:disabled {\n background: #bdbdbd;\n cursor: not-allowed;\n box-shadow: none;\n}\n\n.load-icon[_ngcontent-%COMP%] {\n font-size: 12px;\n}\n\n.loading-icon[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n.remaining-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 12px;\n font-size: 12px;\n font-weight: 400;\n}\n\n\n\n.all-loaded[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n background: rgba(76, 175, 80, 0.1);\n border-radius: 20px;\n color: #2e7d32;\n font-size: 13px;\n font-weight: 500;\n}\n\n.all-loaded[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n\n\n@media (max-width: 600px) {\n .pagination-container[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n gap: 12px;\n padding: 12px 16px;\n }\n\n .progress-section[_ngcontent-%COMP%] {\n order: 3;\n flex-basis: 100%;\n max-width: none;\n }\n\n .remaining-badge[_ngcontent-%COMP%] {\n display: none;\n }\n}"] });
|
|
187
|
-
}
|
|
188
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationComponent, [{
|
|
189
|
-
type: Component,
|
|
190
|
-
args: [{ standalone: false, selector: 'mj-pagination', template: "<div class=\"pagination-container\">\n <!-- Records summary -->\n <div class=\"pagination-info\">\n <span class=\"records-display\">\n @if (pagination.totalRecords > 0) {\n <span class=\"records-shown\">{{ displayedTo | number }}</span>\n <span class=\"records-separator\">of</span>\n <span class=\"records-total\">{{ pagination.totalRecords | number }}</span>\n <span class=\"records-label\">records</span>\n } @else {\n <span class=\"no-records\">No records</span>\n }\n </span>\n </div>\n\n <!-- Progress bar -->\n @if (pagination.totalRecords > 0) {\n <div class=\"progress-section\">\n <div class=\"progress-bar-container\">\n <div\n class=\"progress-bar-fill\"\n [style.width.%]=\"progressPercent\"\n [class.complete]=\"!pagination.hasMore\">\n </div>\n </div>\n </div>\n }\n\n <!-- Load more button -->\n @if (pagination.hasMore) {\n <div class=\"load-more-section\">\n <button\n class=\"load-more-btn\"\n [disabled]=\"pagination.isLoading\"\n (click)=\"onLoadMore()\">\n @if (pagination.isLoading) {\n <i class=\"fa-solid fa-spinner fa-spin loading-icon\"></i>\n <span>Loading...</span>\n } @else {\n <i class=\"fa-solid fa-arrow-down load-icon\"></i>\n <span>Load {{ nextLoadCount | number }} more</span>\n <span class=\"remaining-badge\">{{ remainingRecords | number }} remaining</span>\n }\n </button>\n </div>\n }\n\n <!-- All loaded indicator -->\n @if (!pagination.hasMore && pagination.totalRecords > 0) {\n <div class=\"all-loaded\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>All records loaded</span>\n </div>\n }\n</div>\n", styles: [".pagination-container {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 20px;\n padding: 16px 24px;\n background: linear-gradient(to top, rgba(248, 249, 250, 0.95), rgba(255, 255, 255, 0.9));\n border-top: 1px solid #e8e8e8;\n backdrop-filter: blur(8px);\n flex-shrink: 0;\n}\n\n/* Records Info Section */\n.pagination-info {\n display: flex;\n align-items: center;\n}\n\n.records-display {\n display: flex;\n align-items: baseline;\n gap: 6px;\n font-size: 14px;\n color: #666;\n}\n\n.records-shown {\n font-weight: 600;\n font-size: 16px;\n color: #1976d2;\n}\n\n.records-separator {\n color: #999;\n}\n\n.records-total {\n font-weight: 500;\n color: #333;\n}\n\n.records-label {\n color: #999;\n}\n\n.no-records {\n color: #999;\n font-style: italic;\n}\n\n/* Progress Bar Section */\n.progress-section {\n flex: 1;\n max-width: 300px;\n min-width: 100px;\n}\n\n.progress-bar-container {\n height: 6px;\n background: #e8e8e8;\n border-radius: 3px;\n overflow: hidden;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);\n}\n\n.progress-bar-fill {\n height: 100%;\n background: linear-gradient(90deg, #42a5f5, #1976d2);\n border-radius: 3px;\n transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n position: relative;\n}\n\n.progress-bar-fill::after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(\n 90deg,\n transparent 0%,\n rgba(255, 255, 255, 0.3) 50%,\n transparent 100%\n );\n animation: shimmer 2s infinite;\n}\n\n.progress-bar-fill.complete {\n background: linear-gradient(90deg, #66bb6a, #43a047);\n}\n\n.progress-bar-fill.complete::after {\n display: none;\n}\n\n@keyframes shimmer {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(100%); }\n}\n\n/* Load More Button */\n.load-more-section {\n display: flex;\n align-items: center;\n}\n\n.load-more-btn {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 20px;\n background: linear-gradient(135deg, #1976d2, #1565c0);\n color: white;\n border: none;\n border-radius: 24px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n box-shadow: 0 2px 8px rgba(25, 118, 210, 0.25);\n}\n\n.load-more-btn:hover:not(:disabled) {\n background: linear-gradient(135deg, #1565c0, #0d47a1);\n box-shadow: 0 4px 12px rgba(25, 118, 210, 0.35);\n transform: translateY(-1px);\n}\n\n.load-more-btn:active:not(:disabled) {\n transform: translateY(0);\n box-shadow: 0 2px 6px rgba(25, 118, 210, 0.25);\n}\n\n.load-more-btn:disabled {\n background: #bdbdbd;\n cursor: not-allowed;\n box-shadow: none;\n}\n\n.load-icon {\n font-size: 12px;\n}\n\n.loading-icon {\n font-size: 14px;\n}\n\n.remaining-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 12px;\n font-size: 12px;\n font-weight: 400;\n}\n\n/* All Loaded Indicator */\n.all-loaded {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n background: rgba(76, 175, 80, 0.1);\n border-radius: 20px;\n color: #2e7d32;\n font-size: 13px;\n font-weight: 500;\n}\n\n.all-loaded i {\n font-size: 14px;\n}\n\n/* Responsive adjustments */\n@media (max-width: 600px) {\n .pagination-container {\n flex-wrap: wrap;\n gap: 12px;\n padding: 12px 16px;\n }\n\n .progress-section {\n order: 3;\n flex-basis: 100%;\n max-width: none;\n }\n\n .remaining-badge {\n display: none;\n }\n}\n"] }]
|
|
191
|
-
}], null, { pagination: [{
|
|
192
|
-
type: Input
|
|
193
|
-
}], loadedRecordCount: [{
|
|
194
|
-
type: Input
|
|
195
|
-
}], loadMore: [{
|
|
196
|
-
type: Output
|
|
197
|
-
}], goToPage: [{
|
|
198
|
-
type: Output
|
|
199
|
-
}] }); })();
|
|
200
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PaginationComponent, { className: "PaginationComponent", filePath: "src/lib/pagination/pagination.component.ts", lineNumber: 27 }); })();
|
|
201
|
-
//# sourceMappingURL=pagination.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.component.js","sourceRoot":"","sources":["../../../src/lib/pagination/pagination.component.ts","../../../src/lib/pagination/pagination.component.html"],"names":[],"mappings":"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","sourcesContent":["import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';\nimport { PaginationState } from '../types';\n\n/**\n * PaginationComponent - Beautiful pagination controls for entity data\n *\n * Provides a modern, responsive pagination UI with:\n * - Current page / total pages display\n * - Records count with range display\n * - Load more button for progressive loading\n * - Visual loading state\n *\n * @example\n * ```html\n * <mj-pagination\n * [pagination]=\"paginationState\"\n * (loadMore)=\"onLoadMore()\">\n * </mj-pagination>\n * ```\n */\n@Component({\n standalone: false,\n selector: 'mj-pagination',\n templateUrl: './pagination.component.html',\n styleUrls: ['./pagination.component.css']\n})\nexport class PaginationComponent implements OnChanges {\n /**\n * Current pagination state\n */\n @Input() pagination: PaginationState = {\n currentPage: 0,\n pageSize: 100,\n totalRecords: 0,\n hasMore: false,\n isLoading: false\n };\n\n /**\n * Number of records currently displayed\n */\n @Input() loadedRecordCount: number = 0;\n\n /**\n * Emitted when user requests more data\n */\n @Output() loadMore = new EventEmitter<void>();\n\n /**\n * Emitted when user requests to go to a specific page\n */\n @Output() goToPage = new EventEmitter<number>();\n\n // Computed display values\n public displayedFrom: number = 0;\n public displayedTo: number = 0;\n public totalPages: number = 0;\n public currentPageDisplay: number = 0;\n public remainingRecords: number = 0;\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['pagination'] || changes['loadedRecordCount']) {\n this.updateDisplayValues();\n }\n }\n\n private updateDisplayValues(): void {\n const { currentPage, pageSize, totalRecords, hasMore } = this.pagination;\n\n // Calculate display range\n this.displayedFrom = totalRecords > 0 ? 1 : 0;\n this.displayedTo = this.loadedRecordCount;\n\n // Calculate total pages\n this.totalPages = Math.ceil(totalRecords / pageSize);\n this.currentPageDisplay = currentPage + 1;\n\n // Calculate remaining records\n this.remainingRecords = Math.max(0, totalRecords - this.loadedRecordCount);\n }\n\n /**\n * Handle load more button click\n */\n onLoadMore(): void {\n if (!this.pagination.isLoading && this.pagination.hasMore) {\n this.loadMore.emit();\n }\n }\n\n /**\n * Get the progress percentage for the progress bar\n */\n get progressPercent(): number {\n if (this.pagination.totalRecords === 0) return 100;\n return Math.min(100, (this.loadedRecordCount / this.pagination.totalRecords) * 100);\n }\n\n /**\n * Get the number of records that will load on next click\n */\n get nextLoadCount(): number {\n return Math.min(this.pagination.pageSize, this.remainingRecords);\n }\n}\n","<div class=\"pagination-container\">\n <!-- Records summary -->\n <div class=\"pagination-info\">\n <span class=\"records-display\">\n @if (pagination.totalRecords > 0) {\n <span class=\"records-shown\">{{ displayedTo | number }}</span>\n <span class=\"records-separator\">of</span>\n <span class=\"records-total\">{{ pagination.totalRecords | number }}</span>\n <span class=\"records-label\">records</span>\n } @else {\n <span class=\"no-records\">No records</span>\n }\n </span>\n </div>\n\n <!-- Progress bar -->\n @if (pagination.totalRecords > 0) {\n <div class=\"progress-section\">\n <div class=\"progress-bar-container\">\n <div\n class=\"progress-bar-fill\"\n [style.width.%]=\"progressPercent\"\n [class.complete]=\"!pagination.hasMore\">\n </div>\n </div>\n </div>\n }\n\n <!-- Load more button -->\n @if (pagination.hasMore) {\n <div class=\"load-more-section\">\n <button\n class=\"load-more-btn\"\n [disabled]=\"pagination.isLoading\"\n (click)=\"onLoadMore()\">\n @if (pagination.isLoading) {\n <i class=\"fa-solid fa-spinner fa-spin loading-icon\"></i>\n <span>Loading...</span>\n } @else {\n <i class=\"fa-solid fa-arrow-down load-icon\"></i>\n <span>Load {{ nextLoadCount | number }} more</span>\n <span class=\"remaining-badge\">{{ remainingRecords | number }} remaining</span>\n }\n </button>\n </div>\n }\n\n <!-- All loaded indicator -->\n @if (!pagination.hasMore && pagination.totalRecords > 0) {\n <div class=\"all-loaded\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>All records loaded</span>\n </div>\n }\n</div>\n"]}
|