@rxap/material-table-system 12.4.1-next.0 → 12.5.1
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 +79 -11
- 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 +63 -0
- package/esm2015/lib/persistent-paginator.directive.js.map +1 -0
- package/esm2015/lib/table-create-button/table-create-button.directive.js +1 -1
- package/esm2015/lib/table-create-button/table-create-button.directive.js.map +1 -1
- package/fesm2015/rxap-material-table-system.js +61 -2
- package/fesm2015/rxap-material-table-system.js.map +1 -1
- package/index.d.ts +1 -0
- package/lib/persistent-paginator.directive.d.ts +23 -0
- package/package.json +8 -8
|
@@ -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,69 @@
|
|
|
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 _this = this;
|
|
1099
|
+
var config = this.restoreConfig();
|
|
1100
|
+
if (config) {
|
|
1101
|
+
this.matPaginator.pageSize = config.pageSize;
|
|
1102
|
+
}
|
|
1103
|
+
this._subscription = this.matPaginator.page.pipe(operators.tap(function () { return _this.storeConfig(); })).subscribe();
|
|
1104
|
+
};
|
|
1105
|
+
PersistentPaginatorDirective.prototype.ngOnDestroy = function () {
|
|
1106
|
+
var _a;
|
|
1107
|
+
(_a = this._subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1108
|
+
};
|
|
1109
|
+
PersistentPaginatorDirective.prototype.getKey = function () {
|
|
1110
|
+
return 'rxap_mat-paginator-persistent' + this.id;
|
|
1111
|
+
};
|
|
1112
|
+
PersistentPaginatorDirective.prototype.storeConfig = function () {
|
|
1113
|
+
var pageSize = this.matPaginator.pageSize;
|
|
1114
|
+
localStorage.setItem(this.getKey(), JSON.stringify({ pageSize: pageSize }));
|
|
1115
|
+
};
|
|
1116
|
+
PersistentPaginatorDirective.prototype.restoreConfig = function () {
|
|
1117
|
+
var configStorage = localStorage.getItem(this.getKey());
|
|
1118
|
+
if (configStorage) {
|
|
1119
|
+
try {
|
|
1120
|
+
return JSON.parse(configStorage);
|
|
1121
|
+
}
|
|
1122
|
+
catch (e) {
|
|
1123
|
+
console.warn("Could not parse mat paginator persistent config: " + e.message);
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
return null;
|
|
1127
|
+
};
|
|
1128
|
+
return PersistentPaginatorDirective;
|
|
1129
|
+
}());
|
|
1130
|
+
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 });
|
|
1131
|
+
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 });
|
|
1132
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirective, decorators: [{
|
|
1133
|
+
type: i0.Directive,
|
|
1134
|
+
args: [{
|
|
1135
|
+
selector: 'mat-paginator[rxapPersistent]'
|
|
1136
|
+
}]
|
|
1137
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$3.MatPaginator }]; }, propDecorators: { id: [{
|
|
1138
|
+
type: i0.Input
|
|
1139
|
+
}] } });
|
|
1140
|
+
var PersistentPaginatorDirectiveModule = /** @class */ (function () {
|
|
1141
|
+
function PersistentPaginatorDirectiveModule() {
|
|
1142
|
+
}
|
|
1143
|
+
return PersistentPaginatorDirectiveModule;
|
|
1144
|
+
}());
|
|
1145
|
+
PersistentPaginatorDirectiveModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirectiveModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1146
|
+
PersistentPaginatorDirectiveModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirectiveModule, declarations: [PersistentPaginatorDirective], exports: [PersistentPaginatorDirective] });
|
|
1147
|
+
PersistentPaginatorDirectiveModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirectiveModule });
|
|
1148
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PersistentPaginatorDirectiveModule, decorators: [{
|
|
1149
|
+
type: i0.NgModule,
|
|
1150
|
+
args: [{
|
|
1151
|
+
exports: [PersistentPaginatorDirective],
|
|
1152
|
+
declarations: [PersistentPaginatorDirective]
|
|
1153
|
+
}]
|
|
1154
|
+
}] });
|
|
1155
|
+
|
|
1092
1156
|
var RXAP_TABLE_FILTER_FORM_DEFINITION = new i0.InjectionToken('rxap/form-table-system/filter-form-definition');
|
|
1093
1157
|
|
|
1094
1158
|
var FilterHeaderRowDirective = /** @class */ (function (_super) {
|
|
@@ -1440,17 +1504,19 @@
|
|
|
1440
1504
|
};
|
|
1441
1505
|
TableCreateButtonDirective.prototype.onClick = function () {
|
|
1442
1506
|
return __awaiter(this, void 0, void 0, function () {
|
|
1443
|
-
var result;
|
|
1444
|
-
return __generator(this, function (
|
|
1445
|
-
switch (
|
|
1446
|
-
case 0:
|
|
1507
|
+
var result, _a;
|
|
1508
|
+
return __generator(this, function (_b) {
|
|
1509
|
+
switch (_b.label) {
|
|
1510
|
+
case 0:
|
|
1511
|
+
_a = this;
|
|
1512
|
+
return [4 /*yield*/, this.remoteMethod.call()];
|
|
1447
1513
|
case 1:
|
|
1448
|
-
result = _a.sent();
|
|
1514
|
+
result = _a._createObservable = _b.sent();
|
|
1449
1515
|
if (!rxjs.isObservable(result)) return [3 /*break*/, 3];
|
|
1450
1516
|
return [4 /*yield*/, result.toPromise()];
|
|
1451
1517
|
case 2:
|
|
1452
|
-
|
|
1453
|
-
|
|
1518
|
+
_b.sent();
|
|
1519
|
+
_b.label = 3;
|
|
1454
1520
|
case 3:
|
|
1455
1521
|
this.dataSource.refresh();
|
|
1456
1522
|
return [2 /*return*/];
|
|
@@ -2755,6 +2821,8 @@
|
|
|
2755
2821
|
exports.LinkCellComponentModule = LinkCellComponentModule;
|
|
2756
2822
|
exports.OptionsCellComponent = OptionsCellComponent;
|
|
2757
2823
|
exports.OptionsCellComponentModule = OptionsCellComponentModule;
|
|
2824
|
+
exports.PersistentPaginatorDirective = PersistentPaginatorDirective;
|
|
2825
|
+
exports.PersistentPaginatorDirectiveModule = PersistentPaginatorDirectiveModule;
|
|
2758
2826
|
exports.ROW_ARCHIVE_METHOD = ROW_ARCHIVE_METHOD;
|
|
2759
2827
|
exports.ROW_DELETE_METHOD = ROW_DELETE_METHOD;
|
|
2760
2828
|
exports.ROW_EDIT_LOADER_METHOD = ROW_EDIT_LOADER_METHOD;
|