tuain-ng-forms-lib 12.0.22 → 12.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bundles/tuain-ng-forms-lib.umd.js +30 -30
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/components/elements/tables/table.component.js +31 -31
- package/fesm2015/tuain-ng-forms-lib.js +30 -30
- package/fesm2015/tuain-ng-forms-lib.js.map +1 -1
- package/lib/components/elements/tables/table.component.d.ts +1 -1
- package/package.json +1 -1
- package/tuain-ng-forms-lib.metadata.json +1 -1
package/README.md
CHANGED
|
@@ -199,7 +199,7 @@ This component allows to receive the following information
|
|
|
199
199
|
|
|
200
200
|
| Input Name | Description |
|
|
201
201
|
| --- | ----------- |
|
|
202
|
-
|
|
|
202
|
+
| table | |
|
|
203
203
|
| visiblePages | |
|
|
204
204
|
| pagesGroup | |
|
|
205
205
|
|
|
@@ -237,7 +237,7 @@ This component allows to receive the following information
|
|
|
237
237
|
|
|
238
238
|
| Input Name | Description |
|
|
239
239
|
| --- | ----------- |
|
|
240
|
-
|
|
|
240
|
+
| table | |
|
|
241
241
|
| tableRecords | |
|
|
242
242
|
| currentMode | |
|
|
243
243
|
| waiting | |
|
|
@@ -1574,23 +1574,23 @@
|
|
|
1574
1574
|
LibTableComponent.prototype.ngOnInit = function () {
|
|
1575
1575
|
var _this = this;
|
|
1576
1576
|
var _a, _b;
|
|
1577
|
-
if (this.
|
|
1578
|
-
this.formConfig = (_a = this.
|
|
1577
|
+
if (this.table) {
|
|
1578
|
+
this.formConfig = (_a = this.table) === null || _a === void 0 ? void 0 : _a._formConfig;
|
|
1579
1579
|
this.tableFieldStyles = this.formConfig.tableFieldStyles;
|
|
1580
|
-
this.selectable = this.
|
|
1581
|
-
this.hasActions = this.
|
|
1582
|
-
this.
|
|
1583
|
-
this.inlineActions = this.
|
|
1584
|
-
this.globalActions = this.
|
|
1585
|
-
this.selectionActions = this.
|
|
1580
|
+
this.selectable = this.table.selectable;
|
|
1581
|
+
this.hasActions = this.table.hasActions;
|
|
1582
|
+
this.table.widget = this;
|
|
1583
|
+
this.inlineActions = this.table.getActions(this.formConfig.tableActions.inline);
|
|
1584
|
+
this.globalActions = this.table.getActions(this.formConfig.tableActions.global);
|
|
1585
|
+
this.selectionActions = this.table.getActions(this.formConfig.tableActions.selection);
|
|
1586
1586
|
// Inicialización de campos mapeados del objeto
|
|
1587
1587
|
var mapping = Object.entries(this.formConfig.componentTableAttrMap);
|
|
1588
1588
|
for (var index = 0; index < mapping.length; index++) {
|
|
1589
1589
|
var _c = __read(mapping[index], 2), tableAttr = _c[0], compAttr = _c[1];
|
|
1590
|
-
this[compAttr.toString()] = (_b = this.
|
|
1590
|
+
this[compAttr.toString()] = (_b = this.table) === null || _b === void 0 ? void 0 : _b[tableAttr.toString()];
|
|
1591
1591
|
}
|
|
1592
1592
|
// Subscripción a cambios en atributos
|
|
1593
|
-
this.
|
|
1593
|
+
this.table.attributeChange.subscribe(function (event) {
|
|
1594
1594
|
var tableAttr = event.name, value = event.value;
|
|
1595
1595
|
var compAttr = _this.formConfig.componentTableAttrMap[tableAttr];
|
|
1596
1596
|
_this.hasOwnProperty(compAttr) && (_this[compAttr] = value);
|
|
@@ -1600,24 +1600,24 @@
|
|
|
1600
1600
|
};
|
|
1601
1601
|
LibTableComponent.prototype.start = function () { };
|
|
1602
1602
|
LibTableComponent.prototype.tableGlobalAction = function (actionCode) {
|
|
1603
|
-
this.
|
|
1603
|
+
this.table.notifyGlobalAction(actionCode);
|
|
1604
1604
|
};
|
|
1605
1605
|
LibTableComponent.prototype.tableSelectionAction = function (actionCode) {
|
|
1606
|
-
this.
|
|
1606
|
+
this.table.notifySelectionAction(actionCode);
|
|
1607
1607
|
};
|
|
1608
1608
|
LibTableComponent.prototype.tableActionSelected = function (actionEvent) {
|
|
1609
|
-
this.
|
|
1609
|
+
this.table.notifyInlineAction(actionEvent);
|
|
1610
1610
|
};
|
|
1611
1611
|
LibTableComponent.prototype.tableColumnSort = function (columnFieldCode) {
|
|
1612
|
-
this.
|
|
1612
|
+
this.table.setRequiredOrder(columnFieldCode);
|
|
1613
1613
|
if (this.clientPaging) {
|
|
1614
|
-
return this.
|
|
1614
|
+
return this.table.localSortData();
|
|
1615
1615
|
}
|
|
1616
|
-
this.
|
|
1616
|
+
this.table.notifyGetDataAction();
|
|
1617
1617
|
};
|
|
1618
1618
|
LibTableComponent.prototype.changePage = function (requestedPage) {
|
|
1619
1619
|
if (!this.clientPaging) {
|
|
1620
|
-
this.
|
|
1620
|
+
this.table.notifyGetDataAction(requestedPage);
|
|
1621
1621
|
}
|
|
1622
1622
|
};
|
|
1623
1623
|
Object.defineProperty(LibTableComponent.prototype, "records", {
|
|
@@ -1637,50 +1637,50 @@
|
|
|
1637
1637
|
var eventType = tableFilterEvent.eventType;
|
|
1638
1638
|
var triggerDataUpdate = false;
|
|
1639
1639
|
if (eventType === TABLE_FILTER_TYPES.simpleFilterChange || eventType === TABLE_FILTER_TYPES.simpleFilterFinish) {
|
|
1640
|
-
this.
|
|
1640
|
+
this.table.simpleFilterText = tableFilterEvent.simpleFilterString.trim();
|
|
1641
1641
|
if (this.clientPaging) {
|
|
1642
|
-
this.
|
|
1643
|
-
this.
|
|
1642
|
+
this.table.setAttr('currentPage', 1);
|
|
1643
|
+
this.table.updateVisibleRecords();
|
|
1644
1644
|
}
|
|
1645
1645
|
else if (eventType === TABLE_FILTER_TYPES.simpleFilterFinish) {
|
|
1646
1646
|
triggerDataUpdate = true;
|
|
1647
1647
|
}
|
|
1648
1648
|
}
|
|
1649
1649
|
if (eventType === TABLE_FILTER_TYPES.complexFilterAdd) {
|
|
1650
|
-
this.
|
|
1650
|
+
this.table.addFilterRestriction(tableFilterEvent.complexFilterItem);
|
|
1651
1651
|
}
|
|
1652
1652
|
if (eventType === TABLE_FILTER_TYPES.complexFilterRemove) {
|
|
1653
|
-
this.
|
|
1653
|
+
this.table.removeFilterRestriction(tableFilterEvent.itemName);
|
|
1654
1654
|
}
|
|
1655
1655
|
if (triggerDataUpdate) {
|
|
1656
1656
|
var tableGetDataEvent = {
|
|
1657
|
-
tableCode: this.
|
|
1657
|
+
tableCode: this.table.tableCode,
|
|
1658
1658
|
requestedPage: 1,
|
|
1659
1659
|
};
|
|
1660
|
-
this.
|
|
1660
|
+
this.table.notifyGetDataAction(tableGetDataEvent);
|
|
1661
1661
|
}
|
|
1662
1662
|
};
|
|
1663
1663
|
LibTableComponent.prototype.tableSelectionToggle = function (recordId) {
|
|
1664
|
-
this.
|
|
1664
|
+
this.table.notifyRecordSelection(recordId);
|
|
1665
1665
|
};
|
|
1666
1666
|
LibTableComponent.prototype.toggleSelectAll = function () {
|
|
1667
1667
|
if (this.allSelected) {
|
|
1668
|
-
this.
|
|
1668
|
+
this.table.unSelectAll();
|
|
1669
1669
|
}
|
|
1670
1670
|
else {
|
|
1671
|
-
this.
|
|
1671
|
+
this.table.selectAll();
|
|
1672
1672
|
}
|
|
1673
1673
|
};
|
|
1674
1674
|
Object.defineProperty(LibTableComponent.prototype, "availableFilters", {
|
|
1675
1675
|
get: function () {
|
|
1676
|
-
return this.
|
|
1676
|
+
return this.table.availableFilters;
|
|
1677
1677
|
},
|
|
1678
1678
|
enumerable: false,
|
|
1679
1679
|
configurable: true
|
|
1680
1680
|
});
|
|
1681
1681
|
Object.defineProperty(LibTableComponent.prototype, "selectedRecords", {
|
|
1682
1682
|
get: function () {
|
|
1683
|
-
return this.
|
|
1683
|
+
return this.table.selectedRecords;
|
|
1684
1684
|
},
|
|
1685
1685
|
enumerable: false,
|
|
1686
1686
|
configurable: true
|
|
@@ -1695,7 +1695,7 @@
|
|
|
1695
1695
|
},] }
|
|
1696
1696
|
];
|
|
1697
1697
|
LibTableComponent.propDecorators = {
|
|
1698
|
-
|
|
1698
|
+
table: [{ type: core.Input }],
|
|
1699
1699
|
tableRecords: [{ type: core.Input }],
|
|
1700
1700
|
disabled: [{ type: core.Input }],
|
|
1701
1701
|
currentState: [{ type: core.Input }],
|