@rxap/material-table-system 12.4.1-next.1 → 12.5.2
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 +91 -10
- 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-row-actions/table-row-action.directive.js +21 -6
- package/esm2015/lib/table-row-actions/table-row-action.directive.js.map +1 -1
- package/fesm2015/rxap-material-table-system.js +81 -7
- 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/lib/table-row-actions/table-row-action.directive.d.ts +16 -0
- package/package.json +9 -9
|
@@ -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) {
|
|
@@ -2416,6 +2480,7 @@
|
|
|
2416
2480
|
this.matButton = matButton;
|
|
2417
2481
|
this._hasConfirmDirective = false;
|
|
2418
2482
|
this._currentStatus = exports.TableRowActionStatus.DONE;
|
|
2483
|
+
this._actionDisabled = false;
|
|
2419
2484
|
this.actionMethodList = utilities.coerceArray(actionMethodList);
|
|
2420
2485
|
}
|
|
2421
2486
|
Object.defineProperty(TableRowActionDirective.prototype, "hasConfirmDirective", {
|
|
@@ -2447,6 +2512,9 @@
|
|
|
2447
2512
|
return __generator(this, function (_c) {
|
|
2448
2513
|
switch (_c.label) {
|
|
2449
2514
|
case 0:
|
|
2515
|
+
if (this._actionDisabled) {
|
|
2516
|
+
return [2 /*return*/, Promise.resolve()];
|
|
2517
|
+
}
|
|
2450
2518
|
this.setStatus(exports.TableRowActionStatus.EXECUTING);
|
|
2451
2519
|
_c.label = 1;
|
|
2452
2520
|
case 1:
|
|
@@ -2490,15 +2558,26 @@
|
|
|
2490
2558
|
TableRowActionDirective.prototype.findTypedActionMethod = function () {
|
|
2491
2559
|
return this.actionMethodList.filter(IsTableRowActionTypeMethod(this.type));
|
|
2492
2560
|
};
|
|
2561
|
+
/**
|
|
2562
|
+
* Disables the action. If the button is pressed the action is NOT executed
|
|
2563
|
+
*
|
|
2564
|
+
* Hint: the button is set to disabled = true to prevent any conflict with
|
|
2565
|
+
* extern button enable features linke : rxapHasEnablePermission
|
|
2566
|
+
* @protected
|
|
2567
|
+
*/
|
|
2493
2568
|
TableRowActionDirective.prototype.setButtonDisabled = function () {
|
|
2494
|
-
|
|
2495
|
-
this.matButton.disabled = true;
|
|
2496
|
-
}
|
|
2569
|
+
this._actionDisabled = true;
|
|
2497
2570
|
};
|
|
2571
|
+
/**
|
|
2572
|
+
* Enables the action. If the button is pressed the action is executed
|
|
2573
|
+
*
|
|
2574
|
+
* TODO : find a way to communicate the disabled state between the features
|
|
2575
|
+
* Hint: the button is set to disabled = false to prevent any conflict with
|
|
2576
|
+
* extern button enable features linke : rxapHasEnablePermission
|
|
2577
|
+
* @protected
|
|
2578
|
+
*/
|
|
2498
2579
|
TableRowActionDirective.prototype.setButtonEnabled = function () {
|
|
2499
|
-
|
|
2500
|
-
this.matButton.disabled = false;
|
|
2501
|
-
}
|
|
2580
|
+
this._actionDisabled = false;
|
|
2502
2581
|
};
|
|
2503
2582
|
TableRowActionDirective.prototype.setStatus = function (status) {
|
|
2504
2583
|
var _a, _b;
|
|
@@ -2757,6 +2836,8 @@
|
|
|
2757
2836
|
exports.LinkCellComponentModule = LinkCellComponentModule;
|
|
2758
2837
|
exports.OptionsCellComponent = OptionsCellComponent;
|
|
2759
2838
|
exports.OptionsCellComponentModule = OptionsCellComponentModule;
|
|
2839
|
+
exports.PersistentPaginatorDirective = PersistentPaginatorDirective;
|
|
2840
|
+
exports.PersistentPaginatorDirectiveModule = PersistentPaginatorDirectiveModule;
|
|
2760
2841
|
exports.ROW_ARCHIVE_METHOD = ROW_ARCHIVE_METHOD;
|
|
2761
2842
|
exports.ROW_DELETE_METHOD = ROW_DELETE_METHOD;
|
|
2762
2843
|
exports.ROW_EDIT_LOADER_METHOD = ROW_EDIT_LOADER_METHOD;
|