@gettrx/core-components-angular 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9365,10 +9365,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.22", ngImpo
|
|
|
9365
9365
|
}] } });
|
|
9366
9366
|
|
|
9367
9367
|
class GtrTableResponsiveComponent {
|
|
9368
|
+
onExpandDone(ev) {
|
|
9369
|
+
this.onExpand.emit(ev);
|
|
9370
|
+
}
|
|
9368
9371
|
constructor(cdRef, attributesPipe) {
|
|
9369
9372
|
this.cdRef = cdRef;
|
|
9370
9373
|
this.attributesPipe = attributesPipe;
|
|
9371
9374
|
this.isLoading = false;
|
|
9375
|
+
this.onExpand = new EventEmitter();
|
|
9372
9376
|
/** Row whose expand detail is currently shown in the shared modal (modal displayMode only). */
|
|
9373
9377
|
this.modalRow = null;
|
|
9374
9378
|
/**
|
|
@@ -9521,6 +9525,13 @@ class GtrTableResponsiveComponent {
|
|
|
9521
9525
|
}
|
|
9522
9526
|
if (row?.expand && Object.keys(row.expand).length) {
|
|
9523
9527
|
row.expand.isExpanded = !row.expand.isExpanded;
|
|
9528
|
+
const expandedIds = this.data.filter((r) => r?.expand?.isExpanded).map((r) => r.id);
|
|
9529
|
+
this.onExpandDone({
|
|
9530
|
+
isExpanded: row.expand.isExpanded,
|
|
9531
|
+
row,
|
|
9532
|
+
expandedIds,
|
|
9533
|
+
expandedRows: this.data.filter((r) => r?.expand?.isExpanded),
|
|
9534
|
+
});
|
|
9524
9535
|
}
|
|
9525
9536
|
}
|
|
9526
9537
|
resolveExpandConfig(row) {
|
|
@@ -9654,11 +9665,22 @@ class GtrTableResponsiveComponent {
|
|
|
9654
9665
|
if (row.expand) {
|
|
9655
9666
|
row.expand.isExpanded = expanded;
|
|
9656
9667
|
}
|
|
9668
|
+
const expandedIds = [...this.expandedIds];
|
|
9657
9669
|
this.expandedChange.emit({
|
|
9658
9670
|
row,
|
|
9659
9671
|
expanded,
|
|
9660
|
-
expandedIds
|
|
9672
|
+
expandedIds,
|
|
9661
9673
|
});
|
|
9674
|
+
this.onExpandDone({
|
|
9675
|
+
isExpanded: expanded,
|
|
9676
|
+
row,
|
|
9677
|
+
expandedIds,
|
|
9678
|
+
expandedRows: this.getExpandedRows(),
|
|
9679
|
+
});
|
|
9680
|
+
}
|
|
9681
|
+
/** Rows currently open, in table data order. */
|
|
9682
|
+
getExpandedRows() {
|
|
9683
|
+
return this.data.filter((r) => this.expandedIds.has(r.id));
|
|
9662
9684
|
}
|
|
9663
9685
|
onExpandDetailEvent(event) {
|
|
9664
9686
|
this.expandDetailEvent.emit(event);
|
|
@@ -9669,7 +9691,7 @@ class GtrTableResponsiveComponent {
|
|
|
9669
9691
|
}
|
|
9670
9692
|
ngOnDestroy() { }
|
|
9671
9693
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.22", ngImport: i0, type: GtrTableResponsiveComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: GtrFetchAttributePipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9672
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.22", type: GtrTableResponsiveComponent, isStandalone: true, selector: "gtr-table-responsive", inputs: { isLoading: "isLoading", enableSelection: "enableSelection", columns: "columns", data: "data", expandable: "expandable", expandMode: "expandMode", expandIconPosition: "expandIconPosition", expandConfig: "expandConfig", rowExpandable: "rowExpandable", tableResponsiveId: "tableResponsiveId", dataTransactionName: "dataTransactionName" }, outputs: { onSelection: "onSelection", onAction: "onAction", handleEvent: "handleEvent", onSort: "onSort", expandedChange: "expandedChange", expandDetailEvent: "expandDetailEvent" }, host: { listeners: { "window:resize": "onResize($event)" } }, providers: [
|
|
9694
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.22", type: GtrTableResponsiveComponent, isStandalone: true, selector: "gtr-table-responsive", inputs: { isLoading: "isLoading", enableSelection: "enableSelection", columns: "columns", data: "data", expandable: "expandable", expandMode: "expandMode", expandIconPosition: "expandIconPosition", expandConfig: "expandConfig", rowExpandable: "rowExpandable", tableResponsiveId: "tableResponsiveId", dataTransactionName: "dataTransactionName" }, outputs: { onExpand: "onExpand", onSelection: "onSelection", onAction: "onAction", handleEvent: "handleEvent", onSort: "onSort", expandedChange: "expandedChange", expandDetailEvent: "expandDetailEvent" }, host: { listeners: { "window:resize": "onResize($event)" } }, providers: [
|
|
9673
9695
|
GtrFetchAttributePipe,
|
|
9674
9696
|
GtrSkeletonDirective,
|
|
9675
9697
|
{
|
|
@@ -9709,6 +9731,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.22", ngImpo
|
|
|
9709
9731
|
args: [DynamicHostDirective]
|
|
9710
9732
|
}], isLoading: [{
|
|
9711
9733
|
type: Input
|
|
9734
|
+
}], onExpand: [{
|
|
9735
|
+
type: Output
|
|
9712
9736
|
}], enableSelection: [{
|
|
9713
9737
|
type: Input
|
|
9714
9738
|
}], columns: [{
|
|
@@ -9819,6 +9843,10 @@ class GtrTableMainComponent {
|
|
|
9819
9843
|
* Typed events from expanded detail component outputs.
|
|
9820
9844
|
*/
|
|
9821
9845
|
this.expandDetailEvent = new EventEmitter();
|
|
9846
|
+
/**
|
|
9847
|
+
* Typed events from expanded detail component outputs.
|
|
9848
|
+
*/
|
|
9849
|
+
this.onExpand = new EventEmitter();
|
|
9822
9850
|
this.expandedIds = new Set();
|
|
9823
9851
|
}
|
|
9824
9852
|
ngAfterViewChecked() {
|
|
@@ -9920,12 +9948,24 @@ class GtrTableMainComponent {
|
|
|
9920
9948
|
}
|
|
9921
9949
|
this.expandedIds.add(id);
|
|
9922
9950
|
}
|
|
9951
|
+
const expanded = this.expandedIds.has(id);
|
|
9952
|
+
const expandedIds = [...this.expandedIds];
|
|
9923
9953
|
this.expandedChange.emit({
|
|
9924
9954
|
row,
|
|
9925
|
-
expanded
|
|
9926
|
-
expandedIds
|
|
9955
|
+
expanded,
|
|
9956
|
+
expandedIds,
|
|
9957
|
+
});
|
|
9958
|
+
this.onExpand.emit({
|
|
9959
|
+
isExpanded: expanded,
|
|
9960
|
+
row,
|
|
9961
|
+
expandedIds,
|
|
9962
|
+
expandedRows: this.getExpandedRows(),
|
|
9927
9963
|
});
|
|
9928
9964
|
}
|
|
9965
|
+
/** Rows currently open, in table data order. */
|
|
9966
|
+
getExpandedRows() {
|
|
9967
|
+
return this.data.filter((r) => this.expandedIds.has(r.id));
|
|
9968
|
+
}
|
|
9929
9969
|
onExpandDetailEvent(event) {
|
|
9930
9970
|
this.expandDetailEvent.emit(event);
|
|
9931
9971
|
this.handleEvent.emit({
|
|
@@ -9982,7 +10022,7 @@ class GtrTableMainComponent {
|
|
|
9982
10022
|
this.onSelection.emit(dataToEmit);
|
|
9983
10023
|
}
|
|
9984
10024
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.22", ngImport: i0, type: GtrTableMainComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9985
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.22", type: GtrTableMainComponent, isStandalone: true, selector: "gtr-table-main", inputs: { dataTransactionName: "dataTransactionName", enableSelection: "enableSelection", isLoading: "isLoading", columns: "columns", tableMainId: "tableMainId", data: "data", expandable: "expandable", expandMode: "expandMode", expandIconPosition: "expandIconPosition", expandConfig: "expandConfig", rowExpandable: "rowExpandable" }, outputs: { onSelection: "onSelection", onAction: "onAction", handleEvent: "handleEvent", onSort: "onSort", expandedChange: "expandedChange", expandDetailEvent: "expandDetailEvent" }, providers: [
|
|
10025
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.22", type: GtrTableMainComponent, isStandalone: true, selector: "gtr-table-main", inputs: { dataTransactionName: "dataTransactionName", enableSelection: "enableSelection", isLoading: "isLoading", columns: "columns", tableMainId: "tableMainId", data: "data", expandable: "expandable", expandMode: "expandMode", expandIconPosition: "expandIconPosition", expandConfig: "expandConfig", rowExpandable: "rowExpandable" }, outputs: { onSelection: "onSelection", onAction: "onAction", handleEvent: "handleEvent", onSort: "onSort", expandedChange: "expandedChange", expandDetailEvent: "expandDetailEvent", onExpand: "onExpand" }, providers: [
|
|
9986
10026
|
GtrSkeletonDirective,
|
|
9987
10027
|
{
|
|
9988
10028
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -10058,6 +10098,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.22", ngImpo
|
|
|
10058
10098
|
type: Output
|
|
10059
10099
|
}], expandDetailEvent: [{
|
|
10060
10100
|
type: Output
|
|
10101
|
+
}], onExpand: [{
|
|
10102
|
+
type: Output
|
|
10061
10103
|
}] } });
|
|
10062
10104
|
|
|
10063
10105
|
class GtrTableComponent {
|
|
@@ -10140,6 +10182,11 @@ class GtrTableComponent {
|
|
|
10140
10182
|
* Typed events from expanded detail component outputs.
|
|
10141
10183
|
*/
|
|
10142
10184
|
this.expandDetailEvent = new EventEmitter();
|
|
10185
|
+
/**
|
|
10186
|
+
* Emitted when a row is expanded or collapsed.
|
|
10187
|
+
* Includes the toggled row and all currently open rows.
|
|
10188
|
+
*/
|
|
10189
|
+
this.onExpand = new EventEmitter();
|
|
10143
10190
|
}
|
|
10144
10191
|
/**
|
|
10145
10192
|
* To check screen size
|
|
@@ -10162,6 +10209,9 @@ class GtrTableComponent {
|
|
|
10162
10209
|
actionDone(ev) {
|
|
10163
10210
|
this.onAction.emit(ev);
|
|
10164
10211
|
}
|
|
10212
|
+
onExpandDone(ev) {
|
|
10213
|
+
this.onExpand.emit(ev);
|
|
10214
|
+
}
|
|
10165
10215
|
fetchEvent(ev) {
|
|
10166
10216
|
this.handleEvent.emit(ev);
|
|
10167
10217
|
}
|
|
@@ -10176,13 +10226,13 @@ class GtrTableComponent {
|
|
|
10176
10226
|
}
|
|
10177
10227
|
ngOnDestroy() { }
|
|
10178
10228
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.22", ngImport: i0, type: GtrTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10179
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.22", type: GtrTableComponent, isStandalone: true, selector: "gtr-table", inputs: { dataTransactionName: "dataTransactionName", isResponsive: "isResponsive", loading: "loading", enableSelection: "enableSelection", tableMainId: "tableMainId", tableResponsiveId: "tableResponsiveId", columns: "columns", data: "data", expandable: "expandable", expandMode: "expandMode", expandIconPosition: "expandIconPosition", expandConfig: "expandConfig", rowExpandable: "rowExpandable" }, outputs: { onSelection: "onSelection", onAction: "onAction", handleEvent: "handleEvent", onSort: "onSort", expandedChange: "expandedChange", expandDetailEvent: "expandDetailEvent" }, host: { listeners: { "window:resize": "onResize($event)" } }, providers: [
|
|
10229
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.22", type: GtrTableComponent, isStandalone: true, selector: "gtr-table", inputs: { dataTransactionName: "dataTransactionName", isResponsive: "isResponsive", loading: "loading", enableSelection: "enableSelection", tableMainId: "tableMainId", tableResponsiveId: "tableResponsiveId", columns: "columns", data: "data", expandable: "expandable", expandMode: "expandMode", expandIconPosition: "expandIconPosition", expandConfig: "expandConfig", rowExpandable: "rowExpandable" }, outputs: { onSelection: "onSelection", onAction: "onAction", handleEvent: "handleEvent", onSort: "onSort", expandedChange: "expandedChange", expandDetailEvent: "expandDetailEvent", onExpand: "onExpand" }, host: { listeners: { "window:resize": "onResize($event)" } }, providers: [
|
|
10180
10230
|
{
|
|
10181
10231
|
provide: NG_VALUE_ACCESSOR,
|
|
10182
10232
|
useExisting: forwardRef((() => GtrTableComponent)),
|
|
10183
10233
|
multi: true,
|
|
10184
10234
|
},
|
|
10185
|
-
], exportAs: ["gtrTable"], ngImport: i0, template: "@if (switchState) {\n <gtr-table-responsive\n [id]=\"tableResponsiveId\"\n [attr.data-testid]=\"tableResponsiveId\"\n [isLoading]=\"loading\"\n (handleEvent)=\"fetchEvent($event)\"\n (onSelection)=\"
|
|
10235
|
+
], exportAs: ["gtrTable"], ngImport: i0, template: "@if (switchState) {\n <gtr-table-responsive\n [id]=\"tableResponsiveId\"\n [attr.data-testid]=\"tableResponsiveId\"\n [isLoading]=\"loading\"\n (handleEvent)=\"fetchEvent($event)\"\n (onSelection)=\"selectionChange($event)\"\n (onAction)=\"actionDone($event)\"\n (expandedChange)=\"onExpandedChange($event)\"\n (expandDetailEvent)=\"onExpandDetailEvent($event)\"\n (onExpand)=\"onExpandDone($event)\"\n [data]=\"data\"\n [columns]=\"columns\"\n [enableSelection]=\"enableSelection\"\n [expandable]=\"expandable\"\n [expandMode]=\"expandMode\"\n [expandIconPosition]=\"expandIconPosition\"\n [expandConfig]=\"expandConfig\"\n [rowExpandable]=\"rowExpandable\"\n [dataTransactionName]=\"dataTransactionName + '-table'\"\n />\n}\n@if (!switchState) {\n <gtr-table-main\n [id]=\"tableMainId\"\n [attr.data-testid]=\"tableMainId\"\n [isLoading]=\"loading\"\n (handleEvent)=\"fetchEvent($event)\"\n (onSelection)=\"this.selectionChange($event)\"\n (onAction)=\"this.actionDone($event)\"\n (onSort)=\"this.sorting($event)\"\n (expandedChange)=\"onExpandedChange($event)\"\n (expandDetailEvent)=\"onExpandDetailEvent($event)\"\n [data]=\"this.data\"\n [columns]=\"this.columns\"\n [dataTransactionName]=\"dataTransactionName + '-table'\"\n [enableSelection]=\"this.enableSelection\"\n [expandable]=\"expandable\"\n (onExpand)=\"onExpandDone($event)\"\n [expandMode]=\"expandMode\"\n [expandIconPosition]=\"expandIconPosition\"\n [expandConfig]=\"expandConfig\"\n [rowExpandable]=\"rowExpandable\"\n />\n}\n", styles: [":host{background:#fff;padding:10px;display:block;overflow:auto;overflow-y:auto}:host::-webkit-scrollbar{height:7px;background-color:transparent!important;border-radius:15px!important}:host::-webkit-scrollbar-track{-webkit-box-shadow:none;border-radius:15px}:host::-webkit-scrollbar-thumb{border-radius:15px;-webkit-box-shadow:none;background:#eee}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: GtrTableResponsiveComponent, selector: "gtr-table-responsive", inputs: ["isLoading", "enableSelection", "columns", "data", "expandable", "expandMode", "expandIconPosition", "expandConfig", "rowExpandable", "tableResponsiveId", "dataTransactionName"], outputs: ["onExpand", "onSelection", "onAction", "handleEvent", "onSort", "expandedChange", "expandDetailEvent"], exportAs: ["gtrTableResponsive"] }, { kind: "component", type: GtrTableMainComponent, selector: "gtr-table-main", inputs: ["dataTransactionName", "enableSelection", "isLoading", "columns", "tableMainId", "data", "expandable", "expandMode", "expandIconPosition", "expandConfig", "rowExpandable"], outputs: ["onSelection", "onAction", "handleEvent", "onSort", "expandedChange", "expandDetailEvent", "onExpand"], exportAs: ["gtrTableMain"] }] }); }
|
|
10186
10236
|
}
|
|
10187
10237
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.22", ngImport: i0, type: GtrTableComponent, decorators: [{
|
|
10188
10238
|
type: Component,
|
|
@@ -10192,7 +10242,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.22", ngImpo
|
|
|
10192
10242
|
useExisting: forwardRef((() => GtrTableComponent)),
|
|
10193
10243
|
multi: true,
|
|
10194
10244
|
},
|
|
10195
|
-
], template: "@if (switchState) {\n <gtr-table-responsive\n [id]=\"tableResponsiveId\"\n [attr.data-testid]=\"tableResponsiveId\"\n [isLoading]=\"loading\"\n (handleEvent)=\"fetchEvent($event)\"\n (onSelection)=\"
|
|
10245
|
+
], template: "@if (switchState) {\n <gtr-table-responsive\n [id]=\"tableResponsiveId\"\n [attr.data-testid]=\"tableResponsiveId\"\n [isLoading]=\"loading\"\n (handleEvent)=\"fetchEvent($event)\"\n (onSelection)=\"selectionChange($event)\"\n (onAction)=\"actionDone($event)\"\n (expandedChange)=\"onExpandedChange($event)\"\n (expandDetailEvent)=\"onExpandDetailEvent($event)\"\n (onExpand)=\"onExpandDone($event)\"\n [data]=\"data\"\n [columns]=\"columns\"\n [enableSelection]=\"enableSelection\"\n [expandable]=\"expandable\"\n [expandMode]=\"expandMode\"\n [expandIconPosition]=\"expandIconPosition\"\n [expandConfig]=\"expandConfig\"\n [rowExpandable]=\"rowExpandable\"\n [dataTransactionName]=\"dataTransactionName + '-table'\"\n />\n}\n@if (!switchState) {\n <gtr-table-main\n [id]=\"tableMainId\"\n [attr.data-testid]=\"tableMainId\"\n [isLoading]=\"loading\"\n (handleEvent)=\"fetchEvent($event)\"\n (onSelection)=\"this.selectionChange($event)\"\n (onAction)=\"this.actionDone($event)\"\n (onSort)=\"this.sorting($event)\"\n (expandedChange)=\"onExpandedChange($event)\"\n (expandDetailEvent)=\"onExpandDetailEvent($event)\"\n [data]=\"this.data\"\n [columns]=\"this.columns\"\n [dataTransactionName]=\"dataTransactionName + '-table'\"\n [enableSelection]=\"this.enableSelection\"\n [expandable]=\"expandable\"\n (onExpand)=\"onExpandDone($event)\"\n [expandMode]=\"expandMode\"\n [expandIconPosition]=\"expandIconPosition\"\n [expandConfig]=\"expandConfig\"\n [rowExpandable]=\"rowExpandable\"\n />\n}\n", styles: [":host{background:#fff;padding:10px;display:block;overflow:auto;overflow-y:auto}:host::-webkit-scrollbar{height:7px;background-color:transparent!important;border-radius:15px!important}:host::-webkit-scrollbar-track{-webkit-box-shadow:none;border-radius:15px}:host::-webkit-scrollbar-thumb{border-radius:15px;-webkit-box-shadow:none;background:#eee}\n"] }]
|
|
10196
10246
|
}], ctorParameters: () => [], propDecorators: { dataTransactionName: [{
|
|
10197
10247
|
type: Input
|
|
10198
10248
|
}], isResponsive: [{
|
|
@@ -10231,6 +10281,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.22", ngImpo
|
|
|
10231
10281
|
type: Output
|
|
10232
10282
|
}], expandDetailEvent: [{
|
|
10233
10283
|
type: Output
|
|
10284
|
+
}], onExpand: [{
|
|
10285
|
+
type: Output
|
|
10234
10286
|
}], onResize: [{
|
|
10235
10287
|
type: HostListener,
|
|
10236
10288
|
args: ['window:resize', ['$event']]
|