@sd-angular/core 1.3.152 → 1.3.154
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-table.umd.js +8 -6
- package/bundles/sd-angular-core-table.umd.js.map +1 -1
- package/bundles/sd-angular-core-table.umd.min.js +1 -1
- package/bundles/sd-angular-core-table.umd.min.js.map +1 -1
- package/esm2015/table/src/lib/components/column-inline-filter/column-inline-filter.component.js +2 -2
- package/esm2015/table/src/lib/components/table-filter/table-filter.component.js +3 -3
- package/esm2015/table/src/lib/models/table-column.model.js +1 -1
- package/esm2015/table/src/lib/table.component.js +6 -4
- package/fesm2015/sd-angular-core-table.js +8 -6
- package/fesm2015/sd-angular-core-table.js.map +1 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.3.152.tgz → sd-angular-core-1.3.154.tgz} +0 -0
- package/table/sd-angular-core-table.metadata.json +1 -1
- package/table/src/lib/models/table-column.model.d.ts +1 -1
|
@@ -215,9 +215,9 @@ _subscription = new WeakMap();
|
|
|
215
215
|
SdTableFilter.decorators = [
|
|
216
216
|
{ type: Component, args: [{
|
|
217
217
|
selector: 'sd-table-filter',
|
|
218
|
-
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
|
|
218
|
+
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 *ngIf=\"!isMobileOrTablet && (externalFilters?.length || filterDefs?.length)\" class=\"row mx-0 mb-8\">\r\n <ng-container *ngIf=\"filter?.sorts?.length\">\r\n <ng-container *ngFor=\"let field of filter?.sorts\">\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=\"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 #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.type === 'lazy-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\" [externalFilters]=\"externalFilters\"\r\n [filterDefs]=\"filterDefs\">\r\n </sd-popup-filter>\r\n </ng-template>\r\n</ng-container>",
|
|
219
219
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
220
|
-
styles: [":host{display:block;padding-
|
|
220
|
+
styles: [":host{display:block;padding-left:0;padding-right:0}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:0}"]
|
|
221
221
|
},] }
|
|
222
222
|
];
|
|
223
223
|
SdTableFilter.ctorParameters = () => [
|
|
@@ -846,7 +846,9 @@ class SdTable {
|
|
|
846
846
|
this.columnOperator = columnOperator || {};
|
|
847
847
|
this.columnFilter = columnFilter;
|
|
848
848
|
if (!notReload) {
|
|
849
|
-
__classPrivateFieldGet(this, _paginator)
|
|
849
|
+
if (__classPrivateFieldGet(this, _paginator)) {
|
|
850
|
+
__classPrivateFieldGet(this, _paginator).pageIndex = 0;
|
|
851
|
+
}
|
|
850
852
|
__classPrivateFieldGet(this, _reload).next({
|
|
851
853
|
force: false,
|
|
852
854
|
});
|
|
@@ -1438,7 +1440,7 @@ class SdTable {
|
|
|
1438
1440
|
objValues = __classPrivateFieldGet(this, _cacheObjValues)[field] || {};
|
|
1439
1441
|
}
|
|
1440
1442
|
if (column.type === 'lazy-values') {
|
|
1441
|
-
const values = items.map(e => { var _a; return (_a = e.data) === null || _a === void 0 ? void 0 : _a[
|
|
1443
|
+
const values = items.map(e => { var _a; return (_a = e.data) === null || _a === void 0 ? void 0 : _a[column.option.valueField]; }).filter(val => !!val || val === 0).union();
|
|
1442
1444
|
const { option: { views }, } = column;
|
|
1443
1445
|
if (views && values.length) {
|
|
1444
1446
|
objValues = Array.toObject(yield views(values).catch((err) => {
|
|
@@ -1452,7 +1454,7 @@ class SdTable {
|
|
|
1452
1454
|
const value = rowData === null || rowData === void 0 ? void 0 : rowData[field];
|
|
1453
1455
|
item.meta.display[field] = {
|
|
1454
1456
|
badge: undefined,
|
|
1455
|
-
cellStyle: column.type === 'number'
|
|
1457
|
+
cellStyle: column.type === 'number' ? { 'text-align': 'right!important' } : undefined,
|
|
1456
1458
|
data: value,
|
|
1457
1459
|
isHtml: false,
|
|
1458
1460
|
tooltip: typeof tooltip === 'function' ? tooltip(value, rowData) : undefined,
|
|
@@ -2200,7 +2202,7 @@ _inlineOperator_1 = new WeakMap(), _valueChanges = new WeakMap(), _subcription =
|
|
|
2200
2202
|
SdColumnInlineFilter.decorators = [
|
|
2201
2203
|
{ type: Component, args: [{
|
|
2202
2204
|
selector: 'sd-column-inline-filter',
|
|
2203
|
-
template: "<div class=\"d-flex c-inline-column align-items-end\">\r\n <ng-container
|
|
2205
|
+
template: "<div class=\"d-flex c-inline-column align-items-end\">\r\n <ng-container *ngIf=\"\r\n column.type === 'string' ||\r\n column.type === 'number' ||\r\n column.type === 'bool' ||\r\n column.type === 'values' ||\r\n column.type === 'lazy-values' ||\r\n column.type === 'date' ||\r\n column.type === 'datetime' ||\r\n column.type === 'time';\r\n else noFilter\r\n \">\r\n <div class=\"d-flex align-items-center\" *ngIf=\"operators.length\">\r\n <!-- Only number column icon broken. add mb when not default symbol -->\r\n <sd-button class=\"{{ (column.type === 'number' && inlineSymbol !== 'filter_alt') ? 'mb-4 mr-2 ' :'mr-2 '}}\"\r\n fontSet=\"material-symbols-outlined\" [icon]=\"inlineSymbol\" size=\"sm\" [matMenuTriggerFor]=\"menu\" type=\"link\">\r\n </sd-button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngFor=\"let operator of operators\" (click)=\"onChangeOperator(operator)\" mat-menu-item type=\"button\">\r\n <mat-icon fontSet=\"material-symbols-outlined\" class=\"{{column.type === 'number' ? 'mb-8 ':''}}\">{{\r\n operator.symbol }}</mat-icon>\r\n <span> {{ operator.display }}</span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <sd-input *ngIf=\"column.type === 'string'\" style=\"flex: 1\" size=\"sm\" type=\"text\"\r\n [(model)]=\"columnFilter[column.field]\" (keyupEnter)=\"onFilterChange()\" [disabled]=\"column.filter?.disabled\">\r\n </sd-input>\r\n <sd-input-number *ngIf=\"column.type === 'number'\" style=\"flex: 1\" size=\"sm\" [(model)]=\"columnFilter[column.field]\"\r\n (keyupEnter)=\"onFilterChange()\" [disabled]=\"column.filter?.disabled\">\r\n </sd-input-number>\r\n <sd-select *ngIf=\"column.type === 'bool'\" style=\"flex: 1\" size=\"sm\" [items]=\"[\r\n { value: '1', display: column.option?.displayOnTrue || 'True' },\r\n { value: '0', display: column.option?.displayOnFalse || 'False' }\r\n ]\" valueField=\"value\" displayField=\"display\" [(model)]=\"columnFilter[column.field]\" (sdChange)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n <ng-template sdSelectDisplayDef let-item=\"item\">\r\n <sd-badge *ngIf=\"item.value === '1'\" color=\"success\" [title]=\"column.option?.displayOnTrue || 'True'\">\r\n </sd-badge>\r\n <sd-badge *ngIf=\"item.value === '0'\" color=\"danger\" [title]=\"column.option?.displayOnFalse || 'False'\">\r\n </sd-badge>\r\n </ng-template>\r\n </sd-select>\r\n <ng-container *ngIf=\"column.type === 'values'\">\r\n <sd-select *ngIf=\"column?.option?.selection !== 'AUTOCOMPLETE'\" style=\"flex: 1\" size=\"sm\" [items]=\"items\"\r\n [valueField]=\"column.option.valueField\" [displayField]=\"column.option.displayField\"\r\n [(model)]=\"columnFilter[column.field]\" (sdChange)=\"onFilterChange()\" [disabled]=\"column.filter?.disabled\"\r\n [multiple]=\"column?.option?.selection === 'MULTIPLE' || column?.option?.selection === 'MULTIPLEAUTOCOMPLETE'\"\r\n [filtered]=\"column?.option?.selection === 'MULTIPLEAUTOCOMPLETE'\">\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"column?.option?.selection === 'AUTOCOMPLETE'\" style=\"flex: 1\" size=\"sm\" [items]=\"items\"\r\n [valueField]=\"column.option.valueField\" [displayField]=\"column.option.displayField\"\r\n [(model)]=\"columnFilter[column.field]\" (sdChange)=\"onFilterChange()\" [disabled]=\"column.filter?.disabled\">\r\n </sd-autocomplete>\r\n </ng-container>\r\n <ng-container *ngIf=\"column.type === 'lazy-values'\">\r\n <sd-select *ngIf=\"column.option?.selection === 'MULTIPLE'\" style=\"flex: 1\" size=\"sm\" [items]=\"items\"\r\n [valueField]=\"column.option.valueField\" [displayField]=\"column.option.displayField\"\r\n [(model)]=\"columnFilter[column.field]\" (sdChange)=\"onFilterChange()\" [disabled]=\"column.filter?.disabled\"\r\n multiple filtered>\r\n </sd-select>\r\n <sd-autocomplete *ngIf=\"!column.option?.selection\" style=\"flex: 1\" size=\"sm\" [items]=\"items\"\r\n [valueField]=\"column.option.valueField\" [displayField]=\"column.option.displayField\"\r\n [(model)]=\"columnFilter[column.field]\" (sdChange)=\"onFilterChange()\" [disabled]=\"column.filter?.disabled\">\r\n </sd-autocomplete>\r\n </ng-container>\r\n <ng-container *ngIf=\"column.type === 'date' || column.type === 'datetime' || column.type === 'time'\">\r\n <sd-date-range *ngIf=\"!column.filter?.useFilterDate\" style=\"flex: 1\" size=\"sm\"\r\n [(from)]=\"columnFilter[column.field].from\" [(to)]=\"columnFilter[column.field].to\" (sdChange)=\"onFilterChange()\"\r\n [disabled]=\"column.filter?.disabled\">\r\n </sd-date-range>\r\n <sd-date-time *ngIf=\"column.filter?.useFilterDate\" style=\"flex: 1\" type=\"date\" size=\"sm\"\r\n [(model)]=\"columnFilter[column.field]\" (sdChange)=\"onFilterChange()\" [disabled]=\"column.filter?.disabled\">\r\n </sd-date-time>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #noFilter>\r\n <sd-input type=\"text\" size=\"sm\" disabled> </sd-input>\r\n </ng-template>\r\n</div>",
|
|
2204
2206
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2205
2207
|
styles: [":host ::ng-deep .c-inline-column .mat-form-field-wrapper{background-color:#fff;border-radius:8px;margin:8px 0 0!important;padding:0!important}"]
|
|
2206
2208
|
},] }
|