@sd-angular/core 1.3.94 → 1.3.96
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/sd-angular-core-grid-material.umd.js +21 -24
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/esm2015/grid-material/src/lib/components/grid-filter/grid-filter.component.js +16 -20
- package/esm2015/grid-material/src/lib/components/popup-filter/popup-filter.component.js +4 -3
- package/esm2015/grid-material/src/lib/grid-material.component.js +7 -6
- package/fesm2015/sd-angular-core-grid-material.js +24 -27
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.3.94.tgz → sd-angular-core-1.3.96.tgz} +0 -0
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
_this.cdRef.markForCheck();
|
|
452
452
|
};
|
|
453
453
|
this.onApply = function () {
|
|
454
|
-
_this.
|
|
454
|
+
__classPrivateFieldGet(_this, _filterRegister).set({
|
|
455
455
|
inlineColumn: _this.inlineColumn,
|
|
456
456
|
columnFilter: _this.columnFilter,
|
|
457
457
|
inlineExternal: _this.inlineExternal,
|
|
@@ -502,13 +502,14 @@
|
|
|
502
502
|
_this.externalFilter = JSON.parse(JSON.stringify(configuration.externalFilter));
|
|
503
503
|
_this.inlineFilterDef = JSON.parse(JSON.stringify(configuration.inlineFilterDef));
|
|
504
504
|
_this.filterDef = JSON.parse(JSON.stringify(configuration.filterDef));
|
|
505
|
+
_this.cdRef.markForCheck();
|
|
505
506
|
}));
|
|
506
507
|
};
|
|
507
508
|
SdPopupFilter.prototype.ngOnDestroy = function () {
|
|
508
509
|
__classPrivateFieldGet(this, _subscription).unsubscribe();
|
|
509
510
|
};
|
|
510
511
|
SdPopupFilter.prototype.onClear = function () {
|
|
511
|
-
this.
|
|
512
|
+
__classPrivateFieldGet(this, _filterRegister).remove();
|
|
512
513
|
this.modal.close();
|
|
513
514
|
this.cdRef.markForCheck();
|
|
514
515
|
};
|
|
@@ -534,13 +535,12 @@
|
|
|
534
535
|
filterDefs: [{ type: core.Input }]
|
|
535
536
|
};
|
|
536
537
|
|
|
537
|
-
var
|
|
538
|
+
var _subscription$1;
|
|
538
539
|
var SdGridFilter = /** @class */ (function () {
|
|
539
540
|
function SdGridFilter(ref, deviceService) {
|
|
540
541
|
var _this = this;
|
|
541
542
|
this.ref = ref;
|
|
542
543
|
this.deviceService = deviceService;
|
|
543
|
-
_filterOptionChanges.set(this, new rxjs.Subject());
|
|
544
544
|
this.columns = [];
|
|
545
545
|
this.filterDefs = [];
|
|
546
546
|
this.filterRegisterChange = new rxjs.BehaviorSubject(null);
|
|
@@ -573,7 +573,6 @@
|
|
|
573
573
|
Object.defineProperty(SdGridFilter.prototype, "_filter", {
|
|
574
574
|
set: function (filter) {
|
|
575
575
|
this.filter = filter;
|
|
576
|
-
__classPrivateFieldGet(this, _filterOptionChanges).next(this.filter);
|
|
577
576
|
},
|
|
578
577
|
enumerable: false,
|
|
579
578
|
configurable: true
|
|
@@ -603,19 +602,16 @@
|
|
|
603
602
|
// this.filterChange.next(true);
|
|
604
603
|
// this.ref.markForCheck();
|
|
605
604
|
// }));
|
|
606
|
-
__classPrivateFieldGet(this, _subscription$1).add(this.filterRegisterChange.subscribe(function () {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
_this.filterDef = configuration.filterDef;
|
|
615
|
-
}));
|
|
605
|
+
__classPrivateFieldGet(this, _subscription$1).add(this.filterRegisterChange.pipe(operators.startWith(this.filterRegister)).subscribe(function () {
|
|
606
|
+
__classPrivateFieldGet(_this, _subscription$1).add(_this.filterRegister.observer.subscribe(function (configuration) {
|
|
607
|
+
_this.inlineColumn = configuration.inlineColumn;
|
|
608
|
+
_this.columnFilter = configuration.columnFilter;
|
|
609
|
+
_this.inlineExternal = configuration.inlineExternal;
|
|
610
|
+
_this.externalFilter = configuration.externalFilter;
|
|
611
|
+
_this.inlineFilterDef = configuration.inlineFilterDef;
|
|
612
|
+
_this.filterDef = configuration.filterDef;
|
|
616
613
|
_this.ref.markForCheck();
|
|
617
|
-
}
|
|
618
|
-
;
|
|
614
|
+
}));
|
|
619
615
|
}));
|
|
620
616
|
};
|
|
621
617
|
// #loadDefault = () => {
|
|
@@ -644,13 +640,13 @@
|
|
|
644
640
|
};
|
|
645
641
|
return SdGridFilter;
|
|
646
642
|
}());
|
|
647
|
-
|
|
643
|
+
_subscription$1 = new WeakMap();
|
|
648
644
|
SdGridFilter.decorators = [
|
|
649
645
|
{ type: core.Component, args: [{
|
|
650
646
|
selector: 'sd-grid-filter',
|
|
651
|
-
template: "<ng-container *ngIf=\"!filter?.disabled\">\r\n <ng-container *ngIf=\"filter?.enableCollapse;else noCollapse\">\r\n <sd-group class=\"p-12\" [isExpanded]=\"false\" title=\"T\u00ECm ki\u1EBFm\" expandable>\r\n <div sdGroupBody>\r\n <ng-container *ngTemplateOutlet=\"noCollapse\"></ng-container>\r\n </div>\r\n </sd-group>\r\n </ng-container>\r\n <ng-template #noCollapse>\r\n <div\r\n *ngIf=\"!isMobileOrTablet && ((columns?.length && !filter?.inlineColumn) || externalFilters?.length || filterDefs?.length)\"\r\n class=\"row mx-0
|
|
647
|
+
template: "<ng-container *ngIf=\"!filter?.disabled\">\r\n <ng-container *ngIf=\"filter?.enableCollapse;else noCollapse\">\r\n <sd-group class=\"p-12\" [isExpanded]=\"false\" title=\"T\u00ECm ki\u1EBFm\" expandable>\r\n <div sdGroupBody>\r\n <ng-container *ngTemplateOutlet=\"noCollapse\"></ng-container>\r\n </div>\r\n </sd-group>\r\n </ng-container>\r\n <ng-template #noCollapse>\r\n <div\r\n *ngIf=\"!isMobileOrTablet && ((columns?.length && !filter?.inlineColumn) || externalFilters?.length || filterDefs?.length)\"\r\n class=\"row mx-0\">\r\n <ng-container *ngIf=\"filter?.sorts?.length\">\r\n <ng-container *ngFor=\"let field of filter?.sorts\">\r\n <ng-container *ngIf=\"columns?.length && !filter?.inlineColumn\">\r\n <ng-container *ngFor=\"let item of columns | sdFilterColumn:field\">\r\n <ng-container *ngTemplateOutlet=\"filterColumn; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"externalFilters?.length\">\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal:field\">\r\n <ng-container *ngTemplateOutlet=\"filterExternal; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of filterDefs\">\r\n <div *ngIf=\"inlineFilterDef[item.sdMaterialFilterDef] && item.sdMaterialFilterDef === field\"\r\n class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef;context:{filterDef:filterDef, isInline: true}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!filter?.sorts?.length\">\r\n <ng-container *ngIf=\"columns?.length && !filter?.inlineColumn\">\r\n <ng-container *ngFor=\"let item of columns | sdFilterColumn\">\r\n <ng-container *ngTemplateOutlet=\"filterColumn; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"externalFilters?.length\">\r\n <ng-container *ngFor=\"let item of externalFilters | sdFilterExternal\">\r\n <ng-container *ngTemplateOutlet=\"filterExternal; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngFor=\"let item of filterDefs\">\r\n <div *ngIf=\"inlineFilterDef[item.sdMaterialFilterDef]\" class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef;context:{filterDef:filterDef, isInline: true}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <ng-template #filterColumn let-item=\"item\">\r\n <div *ngIf=\"inlineColumn[item.field]\" class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\" [(model)]=\"columnFilter[item.field]\"\r\n (keyupEnter)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"columnFilter[item.field]\"\r\n (keyupEnter)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-input-number>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.option?.displayOnTrue || 'True' },\r\n {value:'0',display:item.option?.displayOnFalse || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"columnFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-select>\r\n <sd-select *ngIf=\"item.type === 'values' && item?.option?.selection !== 'AUTOCOMPLETE'\"\r\n [items]=\"item.option?.items\" [valueField]=\"item.option?.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"columnFilter[item.field]\" (sdChange)=\"onFilter(item)\" [disabled]=\"item.filter?.disabled\"\r\n [multiple]=\"item?.option?.selection === 'MULTIPLE' || item?.item?.selection === 'MULTIPLEAUTOCOMPLETE'\"\r\n [filtered]=\"item?.option?.selection === 'MULTIPLEAUTOCOMPLETE'\" appearance=\"outline\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.type === 'values' && item?.option?.selection === 'AUTOCOMPLETE'\"\r\n [items]=\"item.option?.items\" [valueField]=\"item.option?.valueField\" [displayField]=\"item.option?.displayField\"\r\n [(model)]=\"columnFilter[item.field]\" (sdChange)=\"onFilter(item)\" [disabled]=\"item.filter?.disabled\"\r\n appearance=\"outline\">\r\n </sd-autocomplete>\r\n <sd-date-time *ngIf=\"item.type === 'date' || item.type === 'datetime' || item.type === 'time'\"\r\n [label]=\"item.title\" [(model)]=\"columnFilter[item.field]\" [type]=\"item.type\" (sdChange)=\"onFilter(item)\"\r\n appearance=\"outline\">\r\n </sd-date-time>\r\n </div>\r\n </ng-template>\r\n <ng-template #filterExternal let-item=\"item\">\r\n <div *ngIf=\"inlineExternal[item.field]\" class=\"col-lg-2 col-md-3 col-sm-6 px-8\">\r\n <sd-input [label]=\"item.title\" *ngIf=\"item.type === 'string'\" type=\"text\" [(model)]=\"externalFilter[item.field]\"\r\n (keyupEnter)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-input>\r\n <sd-input-number [label]=\"item.title\" *ngIf=\"item.type === 'number'\" [(model)]=\"externalFilter[item.field]\"\r\n (keyupEnter)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-input-number>\r\n <sd-select [label]=\"item.title\" *ngIf=\"item.type === 'bool'\" [items]=\"[{value:'1',display:item.option?.displayOnTrue || 'True' },\r\n {value:'0',display:item.option?.displayOnFalse || 'False' }]\" valueField=\"value\" displayField=\"display\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-select>\r\n <ng-container *ngIf=\"item.type === 'values' && item.option\">\r\n <sd-select *ngIf=\"item.option?.selection === 'MULTIPLE'\" [label]=\"item.title\" [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" [selectAll]=\"item.option.selectAll\"\r\n appearance=\"outline\" multiple>\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"item.option?.selection === 'AUTOCOMPLETE'\" [label]=\"item.title\"\r\n [items]=\"item.option.items\" [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-autocomplete>\r\n <sd-select *ngIf=\"item.option?.selection === 'MULTIPLEAUTOCOMPLETE'\" [label]=\"item.title\"\r\n [items]=\"item.option.items\" [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" filtered=\"true\" appearance=\"outline\"\r\n multiple>\r\n </sd-select>\r\n <sd-select *ngIf=\"!item.option?.selection\" [label]=\"item.title\" [items]=\"item.option.items\"\r\n [valueField]=\"item.option.valueField\" [displayField]=\"item.option.displayField\"\r\n [(model)]=\"externalFilter[item.field]\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-select>\r\n </ng-container>\r\n <sd-date-time [label]=\"item.title\" *ngIf=\"item.type ==='date' || item.type ==='datetime'\"\r\n [(model)]=\"externalFilter[item.field]\" [type]=\"item.type\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-date-time>\r\n <sd-date-range [label]=\"item.title\" *ngIf=\"item.type ==='daterange' && externalFilter[item.field]\"\r\n [(from)]=\"externalFilter[item.field].from\" [(to)]=\"externalFilter[item.field].to\" [min]=\"item.minDate\"\r\n [max]=\"item.maxDate\" (sdChange)=\"onFilter(item)\" appearance=\"outline\">\r\n </sd-date-range>\r\n </div>\r\n </ng-template>\r\n <sd-popup-filter [filterRegister]=\"filterRegister\" [columns]=\"columns\"\r\n [externalFilters]=\"externalFilters\" [filterDefs]=\"filterDefs\">\r\n </sd-popup-filter>\r\n </ng-template>\r\n</ng-container>",
|
|
652
648
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
653
|
-
styles: [":host{display:block;padding-left:0;padding-right:0}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:0}"]
|
|
649
|
+
styles: [":host{display:block;padding-bottom:10px;padding-left:0;padding-right:0}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:0}"]
|
|
654
650
|
},] }
|
|
655
651
|
];
|
|
656
652
|
SdGridFilter.ctorParameters = function () { return [
|
|
@@ -1917,9 +1913,7 @@
|
|
|
1917
1913
|
this.columnFilter = {};
|
|
1918
1914
|
// Subcription
|
|
1919
1915
|
_subscription$2.set(this, new rxjs.Subscription());
|
|
1920
|
-
_reload.set(this, new rxjs.
|
|
1921
|
-
force: true
|
|
1922
|
-
}));
|
|
1916
|
+
_reload.set(this, new rxjs.Subject());
|
|
1923
1917
|
this.isExporting = false;
|
|
1924
1918
|
this.isSelectAll = false;
|
|
1925
1919
|
this.exportTitle = 'Export';
|
|
@@ -1945,6 +1939,7 @@
|
|
|
1945
1939
|
});
|
|
1946
1940
|
_initFilterDef.set(this, function () {
|
|
1947
1941
|
var e_2, _3;
|
|
1942
|
+
var _a;
|
|
1948
1943
|
_this.filterDefs = [];
|
|
1949
1944
|
try {
|
|
1950
1945
|
for (var _4 = __values(_this.sdFilterDefs), _5 = _4.next(); !_5.done; _5 = _4.next()) {
|
|
@@ -1959,7 +1954,9 @@
|
|
|
1959
1954
|
}
|
|
1960
1955
|
finally { if (e_2) throw e_2.error; }
|
|
1961
1956
|
}
|
|
1962
|
-
|
|
1957
|
+
if ((_a = _this.filterDefs) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1958
|
+
__classPrivateFieldGet(_this, _loadFilterRegister).call(_this);
|
|
1959
|
+
}
|
|
1963
1960
|
});
|
|
1964
1961
|
_initFooterDef.set(this, function () {
|
|
1965
1962
|
var e_3, _3;
|