@rxap/material-table-system 12.4.0 → 12.5.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/bundles/rxap-material-table-system.umd.js +82 -12
- package/bundles/rxap-material-table-system.umd.js.map +1 -1
- package/esm2015/index.js +1 -0
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/persistent-paginator.directive.js +60 -0
- package/esm2015/lib/persistent-paginator.directive.js.map +1 -0
- package/esm2015/lib/table-create-button/table-create-button.directive.js +8 -3
- package/esm2015/lib/table-create-button/table-create-button.directive.js.map +1 -1
- package/fesm2015/rxap-material-table-system.js +66 -4
- package/fesm2015/rxap-material-table-system.js.map +1 -1
- package/index.d.ts +1 -0
- package/lib/persistent-paginator.directive.d.ts +22 -0
- package/lib/table-create-button/table-create-button.directive.d.ts +4 -2
- package/package.json +13 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/portal'), require('@rxap/utilities'), require('@angular/animations'), require('rxjs'), require('rxjs/operators'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/icon'), require('@angular/cdk/collections'), require('@angular/material/checkbox'), require('@angular/cdk/table'), require('@angular/material/sort'), require('@rxap/data-source/table'), require('@rxap/utilities/rxjs'), require('@rxap/data-source'), require('@rxap/forms'), require('@angular/forms'), require('@angular/material/menu'), require('@rxap/directives'), require('@angular/flex-layout/extended'), require('@angular/flex-layout'), require('@angular/material/slide-toggle'), require('@angular/flex-layout/flex'), require('@angular/material/tooltip'), require('@rxap/components'), require('@rxap/open-api/remote-method'), require('@rxap/window-system'), require('@rxap/material-directives/icon'), require('@angular/material/core'), require('@rxap/utilities/reflect-metadata'), require('@angular/material/snack-bar'), require('@angular/material/progress-bar')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@rxap/material-table-system', ['exports', '@angular/core', '@angular/cdk/portal', '@rxap/utilities', '@angular/animations', 'rxjs', 'rxjs/operators', '@angular/common', '@angular/material/button', '@angular/material/icon', '@angular/cdk/collections', '@angular/material/checkbox', '@angular/cdk/table', '@angular/material/sort', '@rxap/data-source/table', '@rxap/utilities/rxjs', '@rxap/data-source', '@rxap/forms', '@angular/forms', '@angular/material/menu', '@rxap/directives', '@angular/flex-layout/extended', '@angular/flex-layout', '@angular/material/slide-toggle', '@angular/flex-layout/flex', '@angular/material/tooltip', '@rxap/components', '@rxap/open-api/remote-method', '@rxap/window-system', '@rxap/material-directives/icon', '@angular/material/core', '@rxap/utilities/reflect-metadata', '@angular/material/snack-bar', '@angular/material/progress-bar'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.rxap = global.rxap || {}, global.rxap['material-table-system'] = {}), global.ng.core, global.ng.cdk.portal, global.utilities, global.ng.animations, global.rxjs, global.rxjs.operators, global.ng.common, global.ng.material.button, global.ng.material.icon, global.ng.cdk.collections, global.ng.material.checkbox, global.ng.cdk.table, global.ng.material.sort, global.table, global.rxjs$1, global.dataSource, global.forms, global.ng.forms, global.ng.material.menu, global.i6, global.ng.flexLayout.extended, global.ng.flexLayout, global.ng.material.slideToggle, global.ng.flexLayout.flex, global.ng.material.tooltip, global.i7$1, global.i8, global.windowSystem, global.i3$2, global.ng.material.core, global.reflectMetadata, global.ng.material.snackBar, global.ng.material.progressBar));
|
|
5
|
-
}(this, (function (exports, i0, i1, utilities, animations, rxjs, operators, i2, i2$1, i1$1, collections, i1$2, i4, i2$2, table, rxjs$1, dataSource, forms, forms$1, i3, i6, i7, flexLayout, i3$1, i4$1, i6$1, i7$1, i8, windowSystem, i3$2, core, reflectMetadata, i2$3, progressBar) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/cdk/portal'), require('@rxap/utilities'), require('@angular/animations'), require('rxjs'), require('rxjs/operators'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/icon'), require('@angular/cdk/collections'), require('@angular/material/checkbox'), require('@angular/cdk/table'), require('@angular/material/sort'), require('@rxap/data-source/table'), require('@rxap/utilities/rxjs'), require('@rxap/data-source'), require('@angular/material/paginator'), require('@rxap/forms'), require('@angular/forms'), require('@angular/material/menu'), require('@rxap/directives'), require('@angular/flex-layout/extended'), require('@angular/flex-layout'), require('@angular/material/slide-toggle'), require('@angular/flex-layout/flex'), require('@angular/material/tooltip'), require('@rxap/components'), require('@rxap/open-api/remote-method'), require('@rxap/window-system'), require('@rxap/material-directives/icon'), require('@angular/material/core'), require('@rxap/utilities/reflect-metadata'), require('@angular/material/snack-bar'), require('@angular/material/progress-bar')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@rxap/material-table-system', ['exports', '@angular/core', '@angular/cdk/portal', '@rxap/utilities', '@angular/animations', 'rxjs', 'rxjs/operators', '@angular/common', '@angular/material/button', '@angular/material/icon', '@angular/cdk/collections', '@angular/material/checkbox', '@angular/cdk/table', '@angular/material/sort', '@rxap/data-source/table', '@rxap/utilities/rxjs', '@rxap/data-source', '@angular/material/paginator', '@rxap/forms', '@angular/forms', '@angular/material/menu', '@rxap/directives', '@angular/flex-layout/extended', '@angular/flex-layout', '@angular/material/slide-toggle', '@angular/flex-layout/flex', '@angular/material/tooltip', '@rxap/components', '@rxap/open-api/remote-method', '@rxap/window-system', '@rxap/material-directives/icon', '@angular/material/core', '@rxap/utilities/reflect-metadata', '@angular/material/snack-bar', '@angular/material/progress-bar'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.rxap = global.rxap || {}, global.rxap['material-table-system'] = {}), global.ng.core, global.ng.cdk.portal, global.utilities, global.ng.animations, global.rxjs, global.rxjs.operators, global.ng.common, global.ng.material.button, global.ng.material.icon, global.ng.cdk.collections, global.ng.material.checkbox, global.ng.cdk.table, global.ng.material.sort, global.table, global.rxjs$1, global.dataSource, global.ng.material.paginator, global.forms, global.ng.forms, global.ng.material.menu, global.i6, global.ng.flexLayout.extended, global.ng.flexLayout, global.ng.material.slideToggle, global.ng.flexLayout.flex, global.ng.material.tooltip, global.i7$1, global.i8, global.windowSystem, global.i3$2, global.ng.material.core, global.reflectMetadata, global.ng.material.snackBar, global.ng.material.progressBar));
|
|
5
|
+
}(this, (function (exports, i0, i1, utilities, animations, rxjs, operators, i2, i2$1, i1$1, collections, i1$2, i4, i2$2, table, rxjs$1, dataSource, i1$3, forms, forms$1, i3, i6, i7, flexLayout, i3$1, i4$1, i6$1, i7$1, i8, windowSystem, i3$2, core, reflectMetadata, i2$3, progressBar) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
33
33
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
34
34
|
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
|
|
35
|
+
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
35
36
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
36
37
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
37
38
|
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
@@ -1089,6 +1090,66 @@
|
|
|
1089
1090
|
}]
|
|
1090
1091
|
}] });
|
|
1091
1092
|
|
|
1093
|
+
var PersistentPaginatorDirective = /** @class */ (function () {
|
|
1094
|
+
function PersistentPaginatorDirective(matPaginator) {
|
|
1095
|
+
this.matPaginator = matPaginator;
|
|
1096
|
+
}
|
|
1097
|
+
PersistentPaginatorDirective.prototype.ngOnInit = function () {
|
|
1098
|
+
var config = this.restoreConfig();
|
|
1099
|
+
if (config) {
|
|
1100
|
+
this.matPaginator.pageSize = config.pageSize;
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
PersistentPaginatorDirective.prototype.ngOnDestroy = function () {
|
|
1104
|
+
this.storeConfig();
|
|
1105
|
+
};
|
|
1106
|
+
PersistentPaginatorDirective.prototype.getKey = function () {
|
|
1107
|
+
return 'rxap_mat-paginator-persistent' + this.id;
|
|
1108
|
+
};
|
|
1109
|
+
PersistentPaginatorDirective.prototype.storeConfig = function () {
|
|
1110
|
+
var pageSize = this.matPaginator.pageSize;
|
|
1111
|
+
localStorage.setItem(this.getKey(), JSON.stringify({ pageSize: pageSize }));
|
|
1112
|
+
};
|
|
1113
|
+
PersistentPaginatorDirective.prototype.restoreConfig = function () {
|
|
1114
|
+
var configStorage = localStorage.getItem(this.getKey());
|
|
1115
|
+
if (configStorage) {
|
|
1116
|
+
try {
|
|
1117
|
+
return JSON.parse(configStorage);
|
|
1118
|
+
}
|
|
1119
|
+
catch (e) {
|
|
1120
|
+
console.warn("Could not parse mat paginator persistent config: " + e.message);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
return null;
|
|
1124
|
+
};
|
|
1125
|
+
return PersistentPaginatorDirective;
|
|
1126
|
+
}());
|
|
1127
|
+
PersistentPaginatorDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirective, deps: [{ token: i1__namespace$3.MatPaginator }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1128
|
+
PersistentPaginatorDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: PersistentPaginatorDirective, selector: "mat-paginator[rxapPersistent]", inputs: { id: "id" }, ngImport: i0__namespace });
|
|
1129
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirective, decorators: [{
|
|
1130
|
+
type: i0.Directive,
|
|
1131
|
+
args: [{
|
|
1132
|
+
selector: 'mat-paginator[rxapPersistent]'
|
|
1133
|
+
}]
|
|
1134
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$3.MatPaginator }]; }, propDecorators: { id: [{
|
|
1135
|
+
type: i0.Input
|
|
1136
|
+
}] } });
|
|
1137
|
+
var PersistentPaginatorDirectiveModule = /** @class */ (function () {
|
|
1138
|
+
function PersistentPaginatorDirectiveModule() {
|
|
1139
|
+
}
|
|
1140
|
+
return PersistentPaginatorDirectiveModule;
|
|
1141
|
+
}());
|
|
1142
|
+
PersistentPaginatorDirectiveModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirectiveModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1143
|
+
PersistentPaginatorDirectiveModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirectiveModule, declarations: [PersistentPaginatorDirective], exports: [PersistentPaginatorDirective] });
|
|
1144
|
+
PersistentPaginatorDirectiveModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirectiveModule });
|
|
1145
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirectiveModule, decorators: [{
|
|
1146
|
+
type: i0.NgModule,
|
|
1147
|
+
args: [{
|
|
1148
|
+
exports: [PersistentPaginatorDirective],
|
|
1149
|
+
declarations: [PersistentPaginatorDirective]
|
|
1150
|
+
}]
|
|
1151
|
+
}] });
|
|
1152
|
+
|
|
1092
1153
|
var RXAP_TABLE_FILTER_FORM_DEFINITION = new i0.InjectionToken('rxap/form-table-system/filter-form-definition');
|
|
1093
1154
|
|
|
1094
1155
|
var FilterHeaderRowDirective = /** @class */ (function (_super) {
|
|
@@ -1433,19 +1494,26 @@
|
|
|
1433
1494
|
TableCreateButtonDirective.prototype.ngOnInit = function () {
|
|
1434
1495
|
this.renderer.setStyle(this.elementRef.nativeElement, 'margin-bottom', '6px');
|
|
1435
1496
|
};
|
|
1497
|
+
TableCreateButtonDirective.prototype.ngOnDestroy = function () {
|
|
1498
|
+
if (this._createObservable instanceof rxjs.Subject) {
|
|
1499
|
+
this._createObservable.complete();
|
|
1500
|
+
}
|
|
1501
|
+
};
|
|
1436
1502
|
TableCreateButtonDirective.prototype.onClick = function () {
|
|
1437
1503
|
return __awaiter(this, void 0, void 0, function () {
|
|
1438
|
-
var result;
|
|
1439
|
-
return __generator(this, function (
|
|
1440
|
-
switch (
|
|
1441
|
-
case 0:
|
|
1504
|
+
var result, _a;
|
|
1505
|
+
return __generator(this, function (_b) {
|
|
1506
|
+
switch (_b.label) {
|
|
1507
|
+
case 0:
|
|
1508
|
+
_a = this;
|
|
1509
|
+
return [4 /*yield*/, this.remoteMethod.call()];
|
|
1442
1510
|
case 1:
|
|
1443
|
-
result = _a.sent();
|
|
1511
|
+
result = _a._createObservable = _b.sent();
|
|
1444
1512
|
if (!rxjs.isObservable(result)) return [3 /*break*/, 3];
|
|
1445
1513
|
return [4 /*yield*/, result.toPromise()];
|
|
1446
1514
|
case 2:
|
|
1447
|
-
|
|
1448
|
-
|
|
1515
|
+
_b.sent();
|
|
1516
|
+
_b.label = 3;
|
|
1449
1517
|
case 3:
|
|
1450
1518
|
this.dataSource.refresh();
|
|
1451
1519
|
return [2 /*return*/];
|
|
@@ -1464,7 +1532,7 @@
|
|
|
1464
1532
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TableCreateButtonDirective, decorators: [{
|
|
1465
1533
|
type: i0.Directive,
|
|
1466
1534
|
args: [{
|
|
1467
|
-
selector: 'button[rxapTableCreate]'
|
|
1535
|
+
selector: 'button[rxapTableCreate]'
|
|
1468
1536
|
}]
|
|
1469
1537
|
}], ctorParameters: function () {
|
|
1470
1538
|
return [{ type: undefined, decorators: [{
|
|
@@ -2750,6 +2818,8 @@
|
|
|
2750
2818
|
exports.LinkCellComponentModule = LinkCellComponentModule;
|
|
2751
2819
|
exports.OptionsCellComponent = OptionsCellComponent;
|
|
2752
2820
|
exports.OptionsCellComponentModule = OptionsCellComponentModule;
|
|
2821
|
+
exports.PersistentPaginatorDirective = PersistentPaginatorDirective;
|
|
2822
|
+
exports.PersistentPaginatorDirectiveModule = PersistentPaginatorDirectiveModule;
|
|
2753
2823
|
exports.ROW_ARCHIVE_METHOD = ROW_ARCHIVE_METHOD;
|
|
2754
2824
|
exports.ROW_DELETE_METHOD = ROW_DELETE_METHOD;
|
|
2755
2825
|
exports.ROW_EDIT_LOADER_METHOD = ROW_EDIT_LOADER_METHOD;
|