@rxap/material-table-system 12.5.4 → 12.5.7
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 +19 -6
- package/bundles/rxap-material-table-system.umd.js.map +1 -1
- package/esm2015/lib/cells/options-cell/options-cell.component.js +13 -1
- package/esm2015/lib/cells/options-cell/options-cell.component.js.map +1 -1
- package/esm2015/lib/table-column-menu/table-column-option/table-column-option.component.js +6 -6
- package/esm2015/lib/table-column-menu/table-column-option/table-column-option.component.js.map +1 -1
- package/fesm2015/rxap-material-table-system.js +18 -6
- package/fesm2015/rxap-material-table-system.js.map +1 -1
- package/lib/cells/options-cell/options-cell.component.d.ts +5 -2
- package/lib/table-column-menu/table-column-option/table-column-option.component.d.ts +3 -3
- package/package.json +4 -4
|
@@ -1261,9 +1261,9 @@
|
|
|
1261
1261
|
}] });
|
|
1262
1262
|
|
|
1263
1263
|
var TableColumnOptionComponent = /** @class */ (function () {
|
|
1264
|
-
function TableColumnOptionComponent(_element,
|
|
1264
|
+
function TableColumnOptionComponent(_element, router) {
|
|
1265
1265
|
this._element = _element;
|
|
1266
|
-
this.
|
|
1266
|
+
this.router = router;
|
|
1267
1267
|
this.active = true;
|
|
1268
1268
|
this._hidden = false;
|
|
1269
1269
|
}
|
|
@@ -1304,7 +1304,7 @@
|
|
|
1304
1304
|
});
|
|
1305
1305
|
Object.defineProperty(TableColumnOptionComponent.prototype, "cacheId", {
|
|
1306
1306
|
get: function () {
|
|
1307
|
-
return this.
|
|
1307
|
+
return this.router.url + '--' + this.name;
|
|
1308
1308
|
},
|
|
1309
1309
|
enumerable: false,
|
|
1310
1310
|
configurable: true
|
|
@@ -1332,7 +1332,7 @@
|
|
|
1332
1332
|
};
|
|
1333
1333
|
return TableColumnOptionComponent;
|
|
1334
1334
|
}());
|
|
1335
|
-
TableColumnOptionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TableColumnOptionComponent, deps: [{ token: i0.ElementRef }, { token: i1__namespace$4.
|
|
1335
|
+
TableColumnOptionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TableColumnOptionComponent, deps: [{ token: i0.ElementRef }, { token: i1__namespace$4.Router }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1336
1336
|
TableColumnOptionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TableColumnOptionComponent, selector: "rxap-table-column-option", inputs: { name: "name", active: "active", inactive: "inactive", hidden: "hidden", show: "show" }, ngImport: i0__namespace, template: "<ng-content></ng-content>\n", styles: [""] });
|
|
1337
1337
|
__decorate([
|
|
1338
1338
|
utilities.Required,
|
|
@@ -1349,7 +1349,7 @@
|
|
|
1349
1349
|
return [{ type: i0__namespace.ElementRef, decorators: [{
|
|
1350
1350
|
type: i0.Inject,
|
|
1351
1351
|
args: [i0.ElementRef]
|
|
1352
|
-
}] }, { type: i1__namespace$4.
|
|
1352
|
+
}] }, { type: i1__namespace$4.Router }];
|
|
1353
1353
|
}, propDecorators: { name: [{
|
|
1354
1354
|
type: i0.Input
|
|
1355
1355
|
}], active: [{
|
|
@@ -2328,6 +2328,7 @@
|
|
|
2328
2328
|
function OptionsCellComponent(renderer) {
|
|
2329
2329
|
this.renderer = renderer;
|
|
2330
2330
|
this._subscription = new rxjs.Subscription();
|
|
2331
|
+
this._initialised = false;
|
|
2331
2332
|
this.defaultViewValue = ''; // $localize`:@@rxap-material.table-system.options-cell.unknown:unknown`;
|
|
2332
2333
|
this.emptyViewValue = ''; // $localize`:@@rxap-material.table-system.options-cell.empty:empty`;
|
|
2333
2334
|
}
|
|
@@ -2335,6 +2336,11 @@
|
|
|
2335
2336
|
var _this = this;
|
|
2336
2337
|
// Hide the mat-option elements
|
|
2337
2338
|
this._subscription.add(this.options.changes.pipe(operators.startWith(null), operators.tap(function () { return _this.options.forEach(function (option) { return _this.renderer.setStyle(option._getHostElement(), 'display', 'none'); }); })).subscribe());
|
|
2339
|
+
this.setViewValue();
|
|
2340
|
+
this._initialised = true;
|
|
2341
|
+
};
|
|
2342
|
+
OptionsCellComponent.prototype.setViewValue = function () {
|
|
2343
|
+
var _this = this;
|
|
2338
2344
|
if (this.value === undefined || this.value === null) {
|
|
2339
2345
|
this.viewValue = this.emptyViewValue;
|
|
2340
2346
|
}
|
|
@@ -2349,6 +2355,13 @@
|
|
|
2349
2355
|
}
|
|
2350
2356
|
}
|
|
2351
2357
|
};
|
|
2358
|
+
OptionsCellComponent.prototype.ngOnChanges = function (changes) {
|
|
2359
|
+
if (this._initialised) {
|
|
2360
|
+
if (changes['value']) {
|
|
2361
|
+
this.setViewValue();
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
};
|
|
2352
2365
|
OptionsCellComponent.prototype.getViewValue = function () {
|
|
2353
2366
|
var _this = this;
|
|
2354
2367
|
var _a, _b;
|
|
@@ -2361,7 +2374,7 @@
|
|
|
2361
2374
|
return OptionsCellComponent;
|
|
2362
2375
|
}());
|
|
2363
2376
|
OptionsCellComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OptionsCellComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2364
|
-
OptionsCellComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: OptionsCellComponent, selector: "td[rxap-options-cell]", inputs: { value: ["rxap-options-cell", "value"], defaultViewValue: ["default", "defaultViewValue"], emptyViewValue: ["empty", "emptyViewValue"] }, host: { classAttribute: "rxap-options-cell" }, queries: [{ propertyName: "options", predicate: core.MatOption, descendants: true }], ngImport: i0__namespace, template: "{{viewValue}}\n<ng-content></ng-content>\n", styles: [""], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2377
|
+
OptionsCellComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: OptionsCellComponent, selector: "td[rxap-options-cell]", inputs: { value: ["rxap-options-cell", "value"], defaultViewValue: ["default", "defaultViewValue"], emptyViewValue: ["empty", "emptyViewValue"] }, host: { classAttribute: "rxap-options-cell" }, queries: [{ propertyName: "options", predicate: core.MatOption, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "{{viewValue}}\n<ng-content></ng-content>\n", styles: [""], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2365
2378
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OptionsCellComponent, decorators: [{
|
|
2366
2379
|
type: i0.Component,
|
|
2367
2380
|
args: [{
|