@webilix/ngx-table-m3 0.0.22 → 0.0.26
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/fesm2022/webilix-ngx-table-m3.mjs +234 -181
- package/fesm2022/webilix-ngx-table-m3.mjs.map +1 -1
- package/index.d.ts +35 -26
- package/package.json +9 -9
|
@@ -17,7 +17,7 @@ import * as i1$1 from '@angular/router';
|
|
|
17
17
|
import { MatDivider } from '@angular/material/divider';
|
|
18
18
|
import * as i1$2 from '@angular/material/menu';
|
|
19
19
|
import { MatMenuModule } from '@angular/material/menu';
|
|
20
|
-
import * as
|
|
20
|
+
import * as i3 from '@angular/cdk/clipboard';
|
|
21
21
|
import { ClipboardModule } from '@angular/cdk/clipboard';
|
|
22
22
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
23
23
|
|
|
@@ -31,10 +31,10 @@ class FilterDateComponent {
|
|
|
31
31
|
data = inject(FILTER_DATA);
|
|
32
32
|
value = inject(FILTER_VALUE);
|
|
33
33
|
onChange = inject(FILTER_CHANGE);
|
|
34
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
35
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: FilterDateComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "filter-date" } }, ngImport: i0, template: "<ngx-calendar-date\n [value]=\"this.value\"\n [minDate]=\"this.data.filter.minDate\"\n [maxDate]=\"this.data.filter.maxDate\"\n (onChange)=\"onChange($event.date)\"\n></ngx-calendar-date>\n", styles: [""], dependencies: [{ kind: "component", type: NgxCalendarDateComponent, selector: "ngx-calendar-date", inputs: ["value", "minDate", "maxDate"], outputs: ["onChange"] }] });
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterDateComponent, decorators: [{
|
|
38
38
|
type: Component,
|
|
39
39
|
args: [{ host: { selector: 'filter-date' }, imports: [NgxCalendarDateComponent], template: "<ngx-calendar-date\n [value]=\"this.value\"\n [minDate]=\"this.data.filter.minDate\"\n [maxDate]=\"this.data.filter.maxDate\"\n (onChange)=\"onChange($event.date)\"\n></ngx-calendar-date>\n" }]
|
|
40
40
|
}] });
|
|
@@ -90,10 +90,10 @@ class FilterMultiSelectComponent {
|
|
|
90
90
|
this.value.push(id);
|
|
91
91
|
this.onChange(this.value.length === 0 ? undefined : this.value);
|
|
92
92
|
}
|
|
93
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
94
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterMultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
94
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: FilterMultiSelectComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "filter-multi-select" }, properties: { "className": "this.className" } }, ngImport: i0, template: "@if (data.filter.options.length > 20) {\n<div class=\"filter-item-search\">\n <input\n type=\"text\"\n [placeholder]=\"'\u062C\u0633\u062A\u062C\u0648'\"\n [class.ngx-table-m3-en]=\"data.filter.english\"\n (input)=\"setOptions(searchInput.value.trim())\"\n #searchInput\n />\n</div>\n}\n\n<div class=\"filter-items\">\n @for (item of options; track $index) {\n <mat-checkbox [checked]=\"(value || []).includes(item.id)\" (change)=\"updateValue(item.id, $event.checked)\">\n <div class=\"title\" [class.ngx-table-m3-en]=\"data.filter.english\">{{ item.title }}</div>\n </mat-checkbox>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }] });
|
|
95
95
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterMultiSelectComponent, decorators: [{
|
|
97
97
|
type: Component,
|
|
98
98
|
args: [{ host: { selector: 'filter-multi-select' }, imports: [MatCheckbox], template: "@if (data.filter.options.length > 20) {\n<div class=\"filter-item-search\">\n <input\n type=\"text\"\n [placeholder]=\"'\u062C\u0633\u062A\u062C\u0648'\"\n [class.ngx-table-m3-en]=\"data.filter.english\"\n (input)=\"setOptions(searchInput.value.trim())\"\n #searchInput\n />\n</div>\n}\n\n<div class=\"filter-items\">\n @for (item of options; track $index) {\n <mat-checkbox [checked]=\"(value || []).includes(item.id)\" (change)=\"updateValue(item.id, $event.checked)\">\n <div class=\"title\" [class.ngx-table-m3-en]=\"data.filter.english\">{{ item.title }}</div>\n </mat-checkbox>\n }\n</div>\n" }]
|
|
99
99
|
}], propDecorators: { className: [{
|
|
@@ -185,10 +185,10 @@ class FilterNumberComponent {
|
|
|
185
185
|
updateQuery() {
|
|
186
186
|
this.onChange(this.query && this.mode ? { query: this.query, mode: this.mode } : undefined);
|
|
187
187
|
}
|
|
188
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
189
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
188
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
189
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: FilterNumberComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "filter-number" }, properties: { "className": "this.className" } }, providers: [provideNgxMask()], viewQueries: [{ propertyName: "fromInput", first: true, predicate: ["fromInput"], descendants: true }, { propertyName: "numberInput", first: true, predicate: ["numberInput"], descendants: true }], ngImport: i0, template: "<div class=\"filter-number\">\n @if (!this.data.filter.mode) {\n <div class=\"modes\">\n @for (item of modes; track $index) {\n <div class=\"mode\" [class.selected]=\"item.type === mode\" (click)=\"setMode(item.type)\">\n {{ item.title }}\n </div>\n }\n </div>\n }\n\n <!-- INPUTS -->\n <div class=\"inputs\" [style.display]=\"mode ? 'flex' : 'none'\">\n <!-- BETWEEN -->\n <input\n type=\"text\"\n [inputMode]=\"'numeric'\"\n [ngModel]=\"fromQuery\"\n [placeholder]=\"'\u062D\u062F\u0627\u0642\u0644'\"\n class=\"ngx-table-m3-en\"\n [mask]=\"'separator.0'\"\n thousandSeparator=\",\"\n decimalMarker=\".\"\n [allowNegativeNumbers]=\"true\"\n [maxLength]=\"15\"\n [inputTransformFn]=\"inputTransformFn\"\n [style.display]=\"mode === 'BETWEEN' ? 'initial' : 'none'\"\n (input)=\"setQuery(fromInput.value, toInput.value)\"\n #fromInput\n />\n <input\n type=\"text\"\n [inputMode]=\"'numeric'\"\n [ngModel]=\"toQuery\"\n [placeholder]=\"'\u062D\u062F\u0627\u06A9\u062A\u0631'\"\n class=\"ngx-table-m3-en\"\n [mask]=\"'separator.0'\"\n thousandSeparator=\",\"\n decimalMarker=\".\"\n [allowNegativeNumbers]=\"true\"\n [maxLength]=\"15\"\n [inputTransformFn]=\"inputTransformFn\"\n [style.display]=\"mode === 'BETWEEN' ? 'initial' : 'none'\"\n (input)=\"setQuery(fromInput.value, toInput.value)\"\n #toInput\n />\n <!-- OTHERS -->\n <input\n type=\"text\"\n [inputMode]=\"'numeric'\"\n [ngModel]=\"numberQuery\"\n [placeholder]=\"'\u0645\u0642\u062F\u0627\u0631'\"\n class=\"ngx-table-m3-en\"\n [mask]=\"'separator.0'\"\n thousandSeparator=\",\"\n decimalMarker=\".\"\n [allowNegativeNumbers]=\"true\"\n [maxLength]=\"15\"\n [inputTransformFn]=\"inputTransformFn\"\n [style.display]=\"mode !== 'BETWEEN' ? 'initial' : 'none'\"\n (input)=\"setQuery(numberInput.value, '')\"\n #numberInput\n />\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }] });
|
|
190
190
|
}
|
|
191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterNumberComponent, decorators: [{
|
|
192
192
|
type: Component,
|
|
193
193
|
args: [{ host: { selector: 'filter-number' }, imports: [FormsModule, NgxMaskDirective], providers: [provideNgxMask()], template: "<div class=\"filter-number\">\n @if (!this.data.filter.mode) {\n <div class=\"modes\">\n @for (item of modes; track $index) {\n <div class=\"mode\" [class.selected]=\"item.type === mode\" (click)=\"setMode(item.type)\">\n {{ item.title }}\n </div>\n }\n </div>\n }\n\n <!-- INPUTS -->\n <div class=\"inputs\" [style.display]=\"mode ? 'flex' : 'none'\">\n <!-- BETWEEN -->\n <input\n type=\"text\"\n [inputMode]=\"'numeric'\"\n [ngModel]=\"fromQuery\"\n [placeholder]=\"'\u062D\u062F\u0627\u0642\u0644'\"\n class=\"ngx-table-m3-en\"\n [mask]=\"'separator.0'\"\n thousandSeparator=\",\"\n decimalMarker=\".\"\n [allowNegativeNumbers]=\"true\"\n [maxLength]=\"15\"\n [inputTransformFn]=\"inputTransformFn\"\n [style.display]=\"mode === 'BETWEEN' ? 'initial' : 'none'\"\n (input)=\"setQuery(fromInput.value, toInput.value)\"\n #fromInput\n />\n <input\n type=\"text\"\n [inputMode]=\"'numeric'\"\n [ngModel]=\"toQuery\"\n [placeholder]=\"'\u062D\u062F\u0627\u06A9\u062A\u0631'\"\n class=\"ngx-table-m3-en\"\n [mask]=\"'separator.0'\"\n thousandSeparator=\",\"\n decimalMarker=\".\"\n [allowNegativeNumbers]=\"true\"\n [maxLength]=\"15\"\n [inputTransformFn]=\"inputTransformFn\"\n [style.display]=\"mode === 'BETWEEN' ? 'initial' : 'none'\"\n (input)=\"setQuery(fromInput.value, toInput.value)\"\n #toInput\n />\n <!-- OTHERS -->\n <input\n type=\"text\"\n [inputMode]=\"'numeric'\"\n [ngModel]=\"numberQuery\"\n [placeholder]=\"'\u0645\u0642\u062F\u0627\u0631'\"\n class=\"ngx-table-m3-en\"\n [mask]=\"'separator.0'\"\n thousandSeparator=\",\"\n decimalMarker=\".\"\n [allowNegativeNumbers]=\"true\"\n [maxLength]=\"15\"\n [inputTransformFn]=\"inputTransformFn\"\n [style.display]=\"mode !== 'BETWEEN' ? 'initial' : 'none'\"\n (input)=\"setQuery(numberInput.value, '')\"\n #numberInput\n />\n </div>\n</div>\n" }]
|
|
194
194
|
}], propDecorators: { className: [{
|
|
@@ -289,10 +289,10 @@ class FilterSearchComponent {
|
|
|
289
289
|
this.mode = mode;
|
|
290
290
|
this.onChange(this.query ? { query: this.query, mode: this.mode || 'PHRASE' } : undefined);
|
|
291
291
|
}
|
|
292
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
293
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
292
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
293
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: FilterSearchComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "filter-search" }, properties: { "className": "this.className" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: "<div class=\"filter-search\">\n <input\n type=\"text\"\n [ngModel]=\"query || ''\"\n [placeholder]=\"'\u062C\u0633\u062A\u062C\u0648'\"\n [class.ngx-table-m3-en]=\"data.filter.english\"\n (input)=\"updateQuery(searchInput.value)\"\n #searchInput\n />\n</div>\n\n@if (!data.filter.mode) {\n<div class=\"filter-items\">\n <mat-radio-group (change)=\"updateMode($event.value)\">\n <mat-radio-button [value]=\"'PHRASE'\" [checked]=\"mode === 'PHRASE'\">\n <div class=\"title\">\u0639\u0628\u0627\u0631\u062A \u06A9\u0627\u0645\u0644</div>\n </mat-radio-button>\n <mat-radio-button [value]=\"'ALL'\" [checked]=\"mode === 'ALL'\">\n <div class=\"title\">\u0647\u0645\u0647 \u06A9\u0644\u0645\u0627\u062A</div>\n </mat-radio-button>\n <mat-radio-button [value]=\"'EACH'\" [checked]=\"mode === 'EACH'\">\n <div class=\"title\">\u0647\u0631 \u06A9\u062F\u0627\u0645 \u0627\u0632 \u06A9\u0644\u0645\u0627\u062A</div>\n </mat-radio-button>\n </mat-radio-group>\n</div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }] });
|
|
294
294
|
}
|
|
295
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterSearchComponent, decorators: [{
|
|
296
296
|
type: Component,
|
|
297
297
|
args: [{ host: { selector: 'filter-search' }, imports: [FormsModule, MatRadioButton, MatRadioGroup], template: "<div class=\"filter-search\">\n <input\n type=\"text\"\n [ngModel]=\"query || ''\"\n [placeholder]=\"'\u062C\u0633\u062A\u062C\u0648'\"\n [class.ngx-table-m3-en]=\"data.filter.english\"\n (input)=\"updateQuery(searchInput.value)\"\n #searchInput\n />\n</div>\n\n@if (!data.filter.mode) {\n<div class=\"filter-items\">\n <mat-radio-group (change)=\"updateMode($event.value)\">\n <mat-radio-button [value]=\"'PHRASE'\" [checked]=\"mode === 'PHRASE'\">\n <div class=\"title\">\u0639\u0628\u0627\u0631\u062A \u06A9\u0627\u0645\u0644</div>\n </mat-radio-button>\n <mat-radio-button [value]=\"'ALL'\" [checked]=\"mode === 'ALL'\">\n <div class=\"title\">\u0647\u0645\u0647 \u06A9\u0644\u0645\u0627\u062A</div>\n </mat-radio-button>\n <mat-radio-button [value]=\"'EACH'\" [checked]=\"mode === 'EACH'\">\n <div class=\"title\">\u0647\u0631 \u06A9\u062F\u0627\u0645 \u0627\u0632 \u06A9\u0644\u0645\u0627\u062A</div>\n </mat-radio-button>\n </mat-radio-group>\n</div>\n}\n" }]
|
|
298
298
|
}], propDecorators: { className: [{
|
|
@@ -353,10 +353,10 @@ class FilterSelectComponent {
|
|
|
353
353
|
this.value = id;
|
|
354
354
|
this.onChange(this.value);
|
|
355
355
|
}
|
|
356
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
357
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
356
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
357
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: FilterSelectComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "filter-select" }, properties: { "className": "this.className" } }, ngImport: i0, template: "@if (data.filter.options.length > 20) {\n<div class=\"filter-item-search\">\n <input\n type=\"text\"\n [placeholder]=\"'\u062C\u0633\u062A\u062C\u0648'\"\n [class.ngx-table-m3-en]=\"data.filter.english\"\n (input)=\"setOptions(searchInput.value.trim())\"\n #searchInput\n />\n</div>\n}\n\n<div class=\"filter-items\">\n <mat-radio-group (change)=\"updateValue($event.value)\">\n @for (item of options; track $index) {\n <mat-radio-button [value]=\"item.id\" [checked]=\"item.id === value\">\n <div class=\"title\" [class.ngx-table-m3-en]=\"data.filter.english\">{{ item.title }}</div>\n </mat-radio-button>\n }\n </mat-radio-group>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }] });
|
|
358
358
|
}
|
|
359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterSelectComponent, decorators: [{
|
|
360
360
|
type: Component,
|
|
361
361
|
args: [{ host: { selector: 'filter-select' }, imports: [MatRadioButton, MatRadioGroup], template: "@if (data.filter.options.length > 20) {\n<div class=\"filter-item-search\">\n <input\n type=\"text\"\n [placeholder]=\"'\u062C\u0633\u062A\u062C\u0648'\"\n [class.ngx-table-m3-en]=\"data.filter.english\"\n (input)=\"setOptions(searchInput.value.trim())\"\n #searchInput\n />\n</div>\n}\n\n<div class=\"filter-items\">\n <mat-radio-group (change)=\"updateValue($event.value)\">\n @for (item of options; track $index) {\n <mat-radio-button [value]=\"item.id\" [checked]=\"item.id === value\">\n <div class=\"title\" [class.ngx-table-m3-en]=\"data.filter.english\">{{ item.title }}</div>\n </mat-radio-button>\n }\n </mat-radio-group>\n</div>\n" }]
|
|
362
362
|
}], propDecorators: { className: [{
|
|
@@ -413,10 +413,10 @@ class FilterComponent {
|
|
|
413
413
|
if (event.code === 'Enter' && this.value)
|
|
414
414
|
this.closeContainer({ value: this.value });
|
|
415
415
|
}
|
|
416
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
417
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
416
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
417
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: FilterComponent, isStandalone: true, selector: "filter", host: { listeners: { "window:keydown": "onKeydown($event)" }, properties: { "className": "this.className" } }, ngImport: i0, template: "<div class=\"filter-content\">\n <ng-container *ngComponentOutlet=\"filterInfo[data.filter.filter.type].component; injector: injector\"></ng-container>\n</div>\n\n<div class=\"filter-footer\">\n <button mat-stroked-button type=\"button\" [disabled]=\"!value\" (click)=\"closeContainer({ value: undefined })\">\n \u0644\u063A\u0648 \u0641\u06CC\u0644\u062A\u0631\n </button>\n <button mat-flat-button type=\"button\" class=\"confirm\" [disabled]=\"!value\" (click)=\"closeContainer({value})\">\n \u062A\u0627\u06CC\u06CC\u062F\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .filter-content{display:block;overflow-x:hidden;overflow-y:auto;max-height:60vh}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }] });
|
|
418
418
|
}
|
|
419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterComponent, decorators: [{
|
|
420
420
|
type: Component,
|
|
421
421
|
args: [{ selector: 'filter', host: { '(window:keydown)': 'onKeydown($event)' }, imports: [MatButton, NgComponentOutlet], template: "<div class=\"filter-content\">\n <ng-container *ngComponentOutlet=\"filterInfo[data.filter.filter.type].component; injector: injector\"></ng-container>\n</div>\n\n<div class=\"filter-footer\">\n <button mat-stroked-button type=\"button\" [disabled]=\"!value\" (click)=\"closeContainer({ value: undefined })\">\n \u0644\u063A\u0648 \u0641\u06CC\u0644\u062A\u0631\n </button>\n <button mat-flat-button type=\"button\" class=\"confirm\" [disabled]=\"!value\" (click)=\"closeContainer({value})\">\n \u062A\u0627\u06CC\u06CC\u062F\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .filter-content{display:block;overflow-x:hidden;overflow-y:auto;max-height:60vh}\n"] }]
|
|
422
422
|
}], propDecorators: { className: [{
|
|
@@ -464,10 +464,10 @@ class FilterService {
|
|
|
464
464
|
.bottomSheet((response) => resolve({ ...filter, value: response.value }), () => resolve(undefined));
|
|
465
465
|
});
|
|
466
466
|
}
|
|
467
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
468
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
467
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterService, deps: [{ token: i1$1.ActivatedRoute }, { token: i2.NgxHelperContainerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
468
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterService });
|
|
469
469
|
}
|
|
470
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FilterService, decorators: [{
|
|
471
471
|
type: Injectable
|
|
472
472
|
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2.NgxHelperContainerService }] });
|
|
473
473
|
|
|
@@ -556,10 +556,10 @@ class ViewActionComponent {
|
|
|
556
556
|
if (result)
|
|
557
557
|
this.router.navigate(result);
|
|
558
558
|
}
|
|
559
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
560
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
559
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewActionComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
560
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: ViewActionComponent, isStandalone: true, selector: "view-action", inputs: { actions: "actions", item: "item", viewConfig: "viewConfig", isMobile: "isMobile" }, host: { properties: { "className": "this.className" } }, usesOnChanges: true, ngImport: i0, template: "<!-- ROW -->\n@for (item of inRow; track $index) {\n<!-- DESKTOP -->\n@if (!isMobile) {\n<button\n mat-button\n type=\"button\"\n class=\"desktop-view\"\n [style.color]=\"item.isDisabled ? '' : item.color\"\n [disabled]=\"item.isDisabled\"\n (click)=\"onClick(item.action)\"\n>\n {{ item.title }}\n</button>\n}\n<!-- MOBILE -->\n@else {\n<button mat-icon-button type=\"button\" [disabled]=\"item.isDisabled\" (click)=\"onClick(item.action)\">\n <mat-icon [style.color]=\"item.isDisabled ? '' : item.color\" [class.disabled]=\"item.isDisabled\">{{ item.icon }}</mat-icon>\n</button>\n} }\n\n<!-- MENU -->\n@if (this.inMenu.length > 0) {\n<!-- DESKTOP -->\n@if (!isMobile) {\n<button mat-button type=\"button\" class=\"desktop-view\" [matMenuTriggerFor]=\"actionMenu\">\n {{ viewConfig.actionMenuTitle }}\n</button>\n}\n<!-- MOBILE -->\n@else {\n<button mat-icon-button type=\"button\" [matMenuTriggerFor]=\"actionMenu\">\n <mat-icon>more_vert</mat-icon>\n</button>\n}\n\n<mat-menu #actionMenu=\"matMenu\" [xPosition]=\"'before'\" class=\"ngx-table-action-menu\">\n @for (item of inMenu; track $index) {\n <!-- DIVIDER -->\n @if (item === 'DIVIDER') {\n <mat-divider></mat-divider>\n }\n\n <!-- MENU ITEM -->\n @else {\n <button\n mat-menu-item\n type=\"button\"\n [class.disabled]=\"item.isDisabled\"\n [style.color]=\"item.isDisabled ? '' : item.color\"\n (click)=\"onClick(item.action)\"\n [disabled]=\"item.isDisabled\"\n >\n <span class=\"title\">{{ item.title }}</span>\n <mat-icon [style.color]=\"item.isDisabled ? '' : item.color\">{{ item.icon }}</mat-icon>\n </button>\n } }\n</mat-menu>\n}\n", styles: ["::ng-deep .ngx-table-action-menu .title{font-size:90%!important}::ng-deep .ngx-table-action-menu mat-icon{font-size:120%;margin:0 0 0 .75rem!important}::ng-deep .ngx-table-action-menu .mat-mdc-menu-content{padding:0}::ng-deep .ngx-table-action-menu .mat-mdc-menu-item{direction:rtl;text-align:right}::ng-deep .ngx-table-action-menu .mat-divider{margin:0;border-top-color:var(--outline-variant)}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] });
|
|
561
561
|
}
|
|
562
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewActionComponent, decorators: [{
|
|
563
563
|
type: Component,
|
|
564
564
|
args: [{ selector: 'view-action', imports: [MatButton, MatDivider, MatIconButton, MatIcon, MatMenuModule], template: "<!-- ROW -->\n@for (item of inRow; track $index) {\n<!-- DESKTOP -->\n@if (!isMobile) {\n<button\n mat-button\n type=\"button\"\n class=\"desktop-view\"\n [style.color]=\"item.isDisabled ? '' : item.color\"\n [disabled]=\"item.isDisabled\"\n (click)=\"onClick(item.action)\"\n>\n {{ item.title }}\n</button>\n}\n<!-- MOBILE -->\n@else {\n<button mat-icon-button type=\"button\" [disabled]=\"item.isDisabled\" (click)=\"onClick(item.action)\">\n <mat-icon [style.color]=\"item.isDisabled ? '' : item.color\" [class.disabled]=\"item.isDisabled\">{{ item.icon }}</mat-icon>\n</button>\n} }\n\n<!-- MENU -->\n@if (this.inMenu.length > 0) {\n<!-- DESKTOP -->\n@if (!isMobile) {\n<button mat-button type=\"button\" class=\"desktop-view\" [matMenuTriggerFor]=\"actionMenu\">\n {{ viewConfig.actionMenuTitle }}\n</button>\n}\n<!-- MOBILE -->\n@else {\n<button mat-icon-button type=\"button\" [matMenuTriggerFor]=\"actionMenu\">\n <mat-icon>more_vert</mat-icon>\n</button>\n}\n\n<mat-menu #actionMenu=\"matMenu\" [xPosition]=\"'before'\" class=\"ngx-table-action-menu\">\n @for (item of inMenu; track $index) {\n <!-- DIVIDER -->\n @if (item === 'DIVIDER') {\n <mat-divider></mat-divider>\n }\n\n <!-- MENU ITEM -->\n @else {\n <button\n mat-menu-item\n type=\"button\"\n [class.disabled]=\"item.isDisabled\"\n [style.color]=\"item.isDisabled ? '' : item.color\"\n (click)=\"onClick(item.action)\"\n [disabled]=\"item.isDisabled\"\n >\n <span class=\"title\">{{ item.title }}</span>\n <mat-icon [style.color]=\"item.isDisabled ? '' : item.color\">{{ item.icon }}</mat-icon>\n </button>\n } }\n</mat-menu>\n}\n", styles: ["::ng-deep .ngx-table-action-menu .title{font-size:90%!important}::ng-deep .ngx-table-action-menu mat-icon{font-size:120%;margin:0 0 0 .75rem!important}::ng-deep .ngx-table-action-menu .mat-mdc-menu-content{padding:0}::ng-deep .ngx-table-action-menu .mat-mdc-menu-item{direction:rtl;text-align:right}::ng-deep .ngx-table-action-menu .mat-divider{margin:0;border-top-color:var(--outline-variant)}\n"] }]
|
|
565
565
|
}], ctorParameters: () => [{ type: i1$1.Router }], propDecorators: { className: [{
|
|
@@ -589,10 +589,10 @@ class ColumnDateComponent {
|
|
|
589
589
|
column = inject(COLUMN_TYPE);
|
|
590
590
|
value = inject(COLUMN_VALUE);
|
|
591
591
|
config = inject(COLUMN_CONFIG);
|
|
592
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
593
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
592
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
593
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColumnDateComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "column-date" } }, ngImport: i0, template: "<div [style.display]=\"'inline-block'\" [class.ngx-table-m3-deactive]=\"config.isDeactive\">\n {{ value | ngxHelperDate : { format: column.format } }}\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: NgxHelperDatePipe, name: "ngxHelperDate" }] });
|
|
594
594
|
}
|
|
595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnDateComponent, decorators: [{
|
|
596
596
|
type: Component,
|
|
597
597
|
args: [{ host: { selector: 'column-date' }, imports: [NgxHelperDatePipe], template: "<div [style.display]=\"'inline-block'\" [class.ngx-table-m3-deactive]=\"config.isDeactive\">\n {{ value | ngxHelperDate : { format: column.format } }}\n</div>\n" }]
|
|
598
598
|
}] });
|
|
@@ -610,10 +610,10 @@ class ColumnDurationComponent {
|
|
|
610
610
|
column = inject(COLUMN_TYPE);
|
|
611
611
|
value = inject(COLUMN_VALUE);
|
|
612
612
|
config = inject(COLUMN_CONFIG);
|
|
613
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
614
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
613
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnDurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
614
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColumnDurationComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "column-duration" } }, ngImport: i0, template: "<div\n [style.display]=\"'inline-block'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value | ngxHelperDuration : { english: config.isEN, format: column.format } }}\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: NgxHelperDurationPipe, name: "ngxHelperDuration" }] });
|
|
615
615
|
}
|
|
616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnDurationComponent, decorators: [{
|
|
617
617
|
type: Component,
|
|
618
618
|
args: [{ host: { selector: 'column-duration' }, imports: [NgxHelperDurationPipe], template: "<div\n [style.display]=\"'inline-block'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value | ngxHelperDuration : { english: config.isEN, format: column.format } }}\n</div>\n" }]
|
|
619
619
|
}] });
|
|
@@ -642,10 +642,10 @@ class ColumnFileSizeComponent {
|
|
|
642
642
|
column = inject(COLUMN_TYPE);
|
|
643
643
|
value = inject(COLUMN_VALUE);
|
|
644
644
|
config = inject(COLUMN_CONFIG);
|
|
645
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
646
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
645
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnFileSizeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
646
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColumnFileSizeComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "column-file-size" } }, ngImport: i0, template: "<div\n [style.display]=\"'inline-block'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value | ngxHelperFileSize : { english: config.isEN } }}\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: NgxHelperFileSizePipe, name: "ngxHelperFileSize" }] });
|
|
647
647
|
}
|
|
648
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnFileSizeComponent, decorators: [{
|
|
649
649
|
type: Component,
|
|
650
650
|
args: [{ host: { selector: 'column-file-size' }, imports: [NgxHelperFileSizePipe], template: "<div\n [style.display]=\"'inline-block'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value | ngxHelperFileSize : { english: config.isEN } }}\n</div>\n" }]
|
|
651
651
|
}] });
|
|
@@ -663,10 +663,10 @@ class ColumnMobileComponent {
|
|
|
663
663
|
column = inject(COLUMN_TYPE);
|
|
664
664
|
value = inject(COLUMN_VALUE);
|
|
665
665
|
config = inject(COLUMN_CONFIG);
|
|
666
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
667
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
666
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
667
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColumnMobileComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "column-mobile" } }, ngImport: i0, template: "<div\n [style.display]=\"'inline-block'\"\n [style.direction]=\"'ltr'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value | ngxHelperMobile }}\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: NgxHelperMobilePipe, name: "ngxHelperMobile" }] });
|
|
668
668
|
}
|
|
669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnMobileComponent, decorators: [{
|
|
670
670
|
type: Component,
|
|
671
671
|
args: [{ host: { selector: 'column-mobile' }, imports: [NgxHelperMobilePipe], template: "<div\n [style.display]=\"'inline-block'\"\n [style.direction]=\"'ltr'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value | ngxHelperMobile }}\n</div>\n" }]
|
|
672
672
|
}] });
|
|
@@ -684,10 +684,10 @@ class ColumnNumberComponent {
|
|
|
684
684
|
column = inject(COLUMN_TYPE);
|
|
685
685
|
value = inject(COLUMN_VALUE);
|
|
686
686
|
config = inject(COLUMN_CONFIG);
|
|
687
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
688
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
687
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
688
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColumnNumberComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "column-number" } }, ngImport: i0, template: "<div\n [style.display]=\"'inline-block'\"\n [style.direction]=\"'ltr'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value | ngxHelperNumber : { english: config.isEN, fractionDigits: column.fractionDigits } }}\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: NgxHelperNumberPipe, name: "ngxHelperNumber" }] });
|
|
689
689
|
}
|
|
690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
690
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnNumberComponent, decorators: [{
|
|
691
691
|
type: Component,
|
|
692
692
|
args: [{ host: { selector: 'column-number' }, imports: [NgxHelperNumberPipe], template: "<div\n [style.display]=\"'inline-block'\"\n [style.direction]=\"'ltr'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value | ngxHelperNumber : { english: config.isEN, fractionDigits: column.fractionDigits } }}\n</div>\n" }]
|
|
693
693
|
}] });
|
|
@@ -705,10 +705,10 @@ class ColumnPeriodComponent {
|
|
|
705
705
|
column = inject(COLUMN_TYPE);
|
|
706
706
|
value = inject(COLUMN_VALUE);
|
|
707
707
|
config = inject(COLUMN_CONFIG);
|
|
708
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
709
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
708
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnPeriodComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
709
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColumnPeriodComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "column-period" } }, ngImport: i0, template: "<div [style.display]=\"'inline-block'\" [class.ngx-table-m3-deactive]=\"config.isDeactive\">\n {{ value | ngxHelperPeriod }}\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: NgxHelperPeriodPipe, name: "ngxHelperPeriod" }] });
|
|
710
710
|
}
|
|
711
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnPeriodComponent, decorators: [{
|
|
712
712
|
type: Component,
|
|
713
713
|
args: [{ host: { selector: 'column-period' }, imports: [NgxHelperPeriodPipe], template: "<div [style.display]=\"'inline-block'\" [class.ngx-table-m3-deactive]=\"config.isDeactive\">\n {{ value | ngxHelperPeriod }}\n</div>\n" }]
|
|
714
714
|
}] });
|
|
@@ -729,14 +729,49 @@ class ColumnPeriodMethods extends ColumnMethods {
|
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
731
|
|
|
732
|
+
class ColumnTagComponent {
|
|
733
|
+
router;
|
|
734
|
+
column = inject(COLUMN_TYPE);
|
|
735
|
+
value = inject(COLUMN_VALUE);
|
|
736
|
+
config = inject(COLUMN_CONFIG);
|
|
737
|
+
constructor(router) {
|
|
738
|
+
this.router = router;
|
|
739
|
+
}
|
|
740
|
+
onTagClick(id) {
|
|
741
|
+
if (!this.column.onTagClick)
|
|
742
|
+
return;
|
|
743
|
+
const action = this.column.onTagClick(id);
|
|
744
|
+
if (action)
|
|
745
|
+
this.router.navigate(action);
|
|
746
|
+
}
|
|
747
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnTagComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
748
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: ColumnTagComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "column-tag" } }, ngImport: i0, template: "<div [style.display]=\"'inline-block'\" [class.ngx-table-m3-deactive]=\"config.isDeactive\">\n @for (item of value; track $index) {\n <div class=\"tag\" [class.tag-action]=\"!!column.onTagClick\" (click)=\"onTagClick(item.id)\">\n @if (column.onTagClick) { <mat-icon>open_in_new</mat-icon> }\n <div class=\"title\">{{ item.title }}</div>\n </div>\n }\n</div>\n", styles: [".tag{display:flex;align-items:center}.tag .title{flex:1;font-size:85%}.tag mat-icon{font-size:85%}.tag-action{cursor:pointer}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
749
|
+
}
|
|
750
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnTagComponent, decorators: [{
|
|
751
|
+
type: Component,
|
|
752
|
+
args: [{ host: { selector: 'column-tag' }, imports: [MatIcon], template: "<div [style.display]=\"'inline-block'\" [class.ngx-table-m3-deactive]=\"config.isDeactive\">\n @for (item of value; track $index) {\n <div class=\"tag\" [class.tag-action]=\"!!column.onTagClick\" (click)=\"onTagClick(item.id)\">\n @if (column.onTagClick) { <mat-icon>open_in_new</mat-icon> }\n <div class=\"title\">{{ item.title }}</div>\n </div>\n }\n</div>\n", styles: [".tag{display:flex;align-items:center}.tag .title{flex:1;font-size:85%}.tag mat-icon{font-size:85%}.tag-action{cursor:pointer}\n"] }]
|
|
753
|
+
}], ctorParameters: () => [{ type: i1$1.Router }] });
|
|
754
|
+
|
|
755
|
+
class ColumnTagMethods extends ColumnMethods {
|
|
756
|
+
column(column) {
|
|
757
|
+
return { ...column, title: column.title || 'تگ' };
|
|
758
|
+
}
|
|
759
|
+
value(value, column) {
|
|
760
|
+
const list = (Helper.IS.array(value) ? value : [])
|
|
761
|
+
.filter((item) => !!item.id && !!item.title)
|
|
762
|
+
.sort((i1, i2) => i1.title.localeCompare(i2.title));
|
|
763
|
+
return list.length > 0 ? list : undefined;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
732
767
|
class ColumnTextComponent {
|
|
733
768
|
column = inject(COLUMN_TYPE);
|
|
734
769
|
value = inject(COLUMN_VALUE);
|
|
735
770
|
config = inject(COLUMN_CONFIG);
|
|
736
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
737
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
771
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
772
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColumnTextComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "column-text" } }, ngImport: i0, template: "<div\n [style.display]=\"'inline-block'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value }}\n</div>\n", styles: [""] });
|
|
738
773
|
}
|
|
739
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnTextComponent, decorators: [{
|
|
740
775
|
type: Component,
|
|
741
776
|
args: [{ host: { selector: 'column-text' }, imports: [], template: "<div\n [style.display]=\"'inline-block'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value }}\n</div>\n" }]
|
|
742
777
|
}] });
|
|
@@ -754,10 +789,10 @@ class ColumnWeightComponent {
|
|
|
754
789
|
column = inject(COLUMN_TYPE);
|
|
755
790
|
value = inject(COLUMN_VALUE);
|
|
756
791
|
config = inject(COLUMN_CONFIG);
|
|
757
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
758
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
792
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnWeightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
793
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColumnWeightComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "selector": "column-weight" } }, ngImport: i0, template: "<div\n [style.display]=\"'inline-block'\"\n [style.direction]=\"config.isEN ? 'ltr' : 'rtl'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value | ngxHelperWeight : { short:column.short, english: config.isEN, } }}\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: NgxHelperWeightPipe, name: "ngxHelperWeight" }] });
|
|
759
794
|
}
|
|
760
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
795
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnWeightComponent, decorators: [{
|
|
761
796
|
type: Component,
|
|
762
797
|
args: [{ host: { selector: 'column-weight' }, imports: [NgxHelperWeightPipe], template: "<div\n [style.display]=\"'inline-block'\"\n [style.direction]=\"config.isEN ? 'ltr' : 'rtl'\"\n [class.ngx-table-m3-en]=\"config.isEN\"\n [class.ngx-table-m3-deactive]=\"config.isDeactive\"\n>\n {{ value | ngxHelperWeight : { short:column.short, english: config.isEN, } }}\n</div>\n" }]
|
|
763
798
|
}] });
|
|
@@ -778,12 +813,119 @@ const ColumnInfo = {
|
|
|
778
813
|
MOBILE: { methods: new ColumnMobileMethods(), component: ColumnMobileComponent },
|
|
779
814
|
NUMBER: { methods: new ColumnNumberMethods(), component: ColumnNumberComponent },
|
|
780
815
|
PERIOD: { methods: new ColumnPeriodMethods(), component: ColumnPeriodComponent },
|
|
816
|
+
TAG: { methods: new ColumnTagMethods(), component: ColumnTagComponent },
|
|
781
817
|
TEXT: { methods: new ColumnTextMethods(), component: ColumnTextComponent },
|
|
782
818
|
WEIGHT: { methods: new ColumnWeightMethods(), component: ColumnWeightComponent },
|
|
783
819
|
};
|
|
784
820
|
|
|
821
|
+
class ViewService {
|
|
822
|
+
activatedRoute;
|
|
823
|
+
constructor(activatedRoute) {
|
|
824
|
+
this.activatedRoute = activatedRoute;
|
|
825
|
+
}
|
|
826
|
+
getTitleIndex(ngxTable) {
|
|
827
|
+
const index = ngxTable.columns.findIndex((l) => 'mode' in l && l.mode === 'TITLE');
|
|
828
|
+
return index === -1 ? 0 : index;
|
|
829
|
+
}
|
|
830
|
+
getSubTitleIndex(ngxTable) {
|
|
831
|
+
const index = ngxTable.columns.findIndex((l) => 'mode' in l && l.mode === 'SUBTITLE');
|
|
832
|
+
return index === -1 ? undefined : index;
|
|
833
|
+
}
|
|
834
|
+
getValue(column, item) {
|
|
835
|
+
const value = typeof column.value === 'function' ? column.value(item) : item[column.value];
|
|
836
|
+
if (Helper.IS.empty(value))
|
|
837
|
+
return undefined;
|
|
838
|
+
return ColumnInfo[column.type].methods.value(value, column);
|
|
839
|
+
}
|
|
840
|
+
getIcons(ngxTable, data) {
|
|
841
|
+
const iconFn = ngxTable.rows?.icon;
|
|
842
|
+
if (!iconFn)
|
|
843
|
+
return [];
|
|
844
|
+
return data.map((item, index) => {
|
|
845
|
+
const icon = iconFn(item, index);
|
|
846
|
+
return typeof icon === 'string'
|
|
847
|
+
? { icon }
|
|
848
|
+
: 'emoji' in icon
|
|
849
|
+
? { icon: '' }
|
|
850
|
+
: { icon: icon.icon, color: icon.color || undefined };
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
getEmojis(ngxTable, data) {
|
|
854
|
+
const iconFn = ngxTable.rows?.icon;
|
|
855
|
+
if (!iconFn)
|
|
856
|
+
return [];
|
|
857
|
+
return data.map((item, index) => {
|
|
858
|
+
const icon = iconFn(item, index);
|
|
859
|
+
return typeof icon === 'string' ? '' : 'emoji' in icon ? icon.emoji : '';
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
getColors(ngxTable, data) {
|
|
863
|
+
const colorFn = ngxTable.rows?.color;
|
|
864
|
+
if (!colorFn)
|
|
865
|
+
return [];
|
|
866
|
+
return data.map((item, index) => colorFn(item, index) || '');
|
|
867
|
+
}
|
|
868
|
+
getDescriptions(ngxTable, data) {
|
|
869
|
+
const descriptionFn = ngxTable.rows?.description;
|
|
870
|
+
if (!descriptionFn)
|
|
871
|
+
return [];
|
|
872
|
+
return data.map((item, index) => descriptionFn(item, index) || undefined);
|
|
873
|
+
}
|
|
874
|
+
getDeactives(ngxTable, data) {
|
|
875
|
+
const deactives = [];
|
|
876
|
+
data.forEach((item, index) => {
|
|
877
|
+
if (ngxTable.rows?.isDeactive?.(item, index))
|
|
878
|
+
deactives.push(index);
|
|
879
|
+
});
|
|
880
|
+
return deactives;
|
|
881
|
+
}
|
|
882
|
+
getOrders(ngxTable) {
|
|
883
|
+
let defaultFound = false;
|
|
884
|
+
const orders = {};
|
|
885
|
+
// CHECK COLUMNS
|
|
886
|
+
ngxTable.columns.forEach((column) => {
|
|
887
|
+
if (!column.tools || !('order' in column.tools) || !column.tools.order)
|
|
888
|
+
return;
|
|
889
|
+
const title = column.title || '';
|
|
890
|
+
const key = column.tools.id;
|
|
891
|
+
const type = column.tools.order.type || 'ORDER';
|
|
892
|
+
const initial = type !== 'ORDER' ? type : column.tools.order.initial || 'ASC';
|
|
893
|
+
const isDefault = !defaultFound && !!column.tools.order.isDefault;
|
|
894
|
+
orders[key] = { title, type, initial, current: isDefault ? initial : undefined };
|
|
895
|
+
if (isDefault)
|
|
896
|
+
defaultFound = true;
|
|
897
|
+
});
|
|
898
|
+
if (Object.keys(orders).length === 0)
|
|
899
|
+
return {};
|
|
900
|
+
// CHECK QUERY PARAMS
|
|
901
|
+
const queryParams = { ...this.activatedRoute.snapshot.queryParams };
|
|
902
|
+
if (!!ngxTable.route && queryParams['ngx-table-order']) {
|
|
903
|
+
const param = queryParams['ngx-table-order'];
|
|
904
|
+
const index = param.lastIndexOf(':');
|
|
905
|
+
if (index !== -1) {
|
|
906
|
+
const id = param.substring(0, index);
|
|
907
|
+
const type = param.substring(index + 1);
|
|
908
|
+
if (orders[id] &&
|
|
909
|
+
(type === 'ASC' || type === 'DESC') &&
|
|
910
|
+
(orders[id].type === 'ORDER' || orders[id].type === type)) {
|
|
911
|
+
Object.keys(orders).forEach((key) => {
|
|
912
|
+
orders[key] = { ...orders[key], current: key === id ? type : undefined };
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
return orders;
|
|
918
|
+
}
|
|
919
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewService, deps: [{ token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
920
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewService });
|
|
921
|
+
}
|
|
922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewService, decorators: [{
|
|
923
|
+
type: Injectable
|
|
924
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }] });
|
|
925
|
+
|
|
785
926
|
class ViewValueComponent {
|
|
786
927
|
router;
|
|
928
|
+
viewService;
|
|
787
929
|
className = 'ngx-table-m3-value';
|
|
788
930
|
textAlign = 'left';
|
|
789
931
|
column;
|
|
@@ -802,20 +944,22 @@ class ViewValueComponent {
|
|
|
802
944
|
copyText;
|
|
803
945
|
isCopied = false;
|
|
804
946
|
copyTimeout;
|
|
805
|
-
constructor(router) {
|
|
947
|
+
constructor(router, viewService) {
|
|
806
948
|
this.router = router;
|
|
949
|
+
this.viewService = viewService;
|
|
807
950
|
}
|
|
808
951
|
ngOnChanges(changes) {
|
|
809
952
|
this.textAlign = this.isCard ? 'right' : (this.column.textAlign || 'RIGHT').toLocaleLowerCase();
|
|
810
|
-
this.value = this.getValue();
|
|
953
|
+
this.value = this.viewService.getValue(this.column, this.item);
|
|
811
954
|
this.subValue = this.getSubValue();
|
|
812
955
|
this.color = this.column.color
|
|
813
956
|
? typeof this.column.color === 'function'
|
|
814
957
|
? this.column.color(this.item) || undefined
|
|
815
958
|
: this.column.color
|
|
816
959
|
: undefined;
|
|
817
|
-
this.hasClick = !!this.column.onClick;
|
|
818
|
-
this.copyText =
|
|
960
|
+
this.hasClick = 'onClick' in this.column && !!this.column.onClick;
|
|
961
|
+
this.copyText =
|
|
962
|
+
!this.hasClick && 'onCopy' in this.column && this.column.onCopy ? this.column.onCopy(this.item) : undefined;
|
|
819
963
|
const columnConfig = {
|
|
820
964
|
isEN: 'english' in this.column && this.column.english
|
|
821
965
|
? typeof this.column.english === 'function'
|
|
@@ -832,14 +976,8 @@ class ViewValueComponent {
|
|
|
832
976
|
],
|
|
833
977
|
});
|
|
834
978
|
}
|
|
835
|
-
getValue() {
|
|
836
|
-
const value = typeof this.column.value === 'function' ? this.column.value(this.item) : this.item[this.column.value];
|
|
837
|
-
if (Helper.IS.empty(value))
|
|
838
|
-
return undefined;
|
|
839
|
-
return ColumnInfo[this.column.type].methods.value(value, this.column);
|
|
840
|
-
}
|
|
841
979
|
getSubValue() {
|
|
842
|
-
if (!this.column.subValue)
|
|
980
|
+
if (!('subValue' in this.column) || !this.column.subValue)
|
|
843
981
|
return undefined;
|
|
844
982
|
if (typeof this.column.subValue === 'function') {
|
|
845
983
|
const subValue = this.column.subValue(this.item);
|
|
@@ -858,7 +996,7 @@ class ViewValueComponent {
|
|
|
858
996
|
}
|
|
859
997
|
}
|
|
860
998
|
onClick() {
|
|
861
|
-
if (!this.column.onClick)
|
|
999
|
+
if (!('onClick' in this.column) || !this.column.onClick)
|
|
862
1000
|
return;
|
|
863
1001
|
const onClick = this.column.onClick(this.item);
|
|
864
1002
|
if (typeof onClick === 'function')
|
|
@@ -877,13 +1015,13 @@ class ViewValueComponent {
|
|
|
877
1015
|
this.copyTimeout = undefined;
|
|
878
1016
|
}, 2000);
|
|
879
1017
|
}
|
|
880
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
881
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1018
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewValueComponent, deps: [{ token: i1$1.Router }, { token: ViewService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1019
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: ViewValueComponent, isStandalone: true, selector: "view-value", inputs: { column: "column", item: "item", viewConfig: "viewConfig", isDeactive: "isDeactive", isCard: "isCard", isCardTitle: "isCardTitle", isCardSubTitle: "isCardSubTitle" }, host: { properties: { "className": "this.className", "style.text-align": "this.textAlign" } }, usesOnChanges: true, ngImport: i0, template: "<!-- EMPTY VALUE -->\n@if (value === undefined) { }\n\n<!-- SHOW VALUE -->\n@else {\n<div class=\"value-container\" [style.color]=\"color\" [class.card-title]=\"isCardTitle\" [class.card-sub-title]=\"isCardSubTitle\">\n <div\n class=\"value\"\n [style.cursor]=\"hasClick || copyText ? 'pointer' : 'default'\"\n (click)=\"hasClick ? onClick() : copyText ? onCopy() : null\"\n [cdkCopyToClipboard]=\"copyText || ''\"\n >\n <ng-container *ngComponentOutlet=\"columnInfo[column.type].component; injector: injector\"></ng-container>\n <!-- CLICK -->\n @if (hasClick) { <mat-icon>open_in_new</mat-icon> }\n <!-- COPY -->\n @if (copyText) { <mat-icon>{{ isCopied ? 'done_all' : 'copy' }}</mat-icon> }\n </div>\n\n <!-- SUB VALUE -->\n @if (subValue) {\n <div class=\"sub-value\" [class.ngx-table-m3-en]=\"subValue.isEN\">{{ subValue.value }}</div>\n }\n</div>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: ClipboardModule }, { kind: "directive", type: i3.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
882
1020
|
}
|
|
883
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1021
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewValueComponent, decorators: [{
|
|
884
1022
|
type: Component,
|
|
885
1023
|
args: [{ selector: 'view-value', imports: [NgComponentOutlet, ClipboardModule, MatIcon], template: "<!-- EMPTY VALUE -->\n@if (value === undefined) { }\n\n<!-- SHOW VALUE -->\n@else {\n<div class=\"value-container\" [style.color]=\"color\" [class.card-title]=\"isCardTitle\" [class.card-sub-title]=\"isCardSubTitle\">\n <div\n class=\"value\"\n [style.cursor]=\"hasClick || copyText ? 'pointer' : 'default'\"\n (click)=\"hasClick ? onClick() : copyText ? onCopy() : null\"\n [cdkCopyToClipboard]=\"copyText || ''\"\n >\n <ng-container *ngComponentOutlet=\"columnInfo[column.type].component; injector: injector\"></ng-container>\n <!-- CLICK -->\n @if (hasClick) { <mat-icon>open_in_new</mat-icon> }\n <!-- COPY -->\n @if (copyText) { <mat-icon>{{ isCopied ? 'done_all' : 'copy' }}</mat-icon> }\n </div>\n\n <!-- SUB VALUE -->\n @if (subValue) {\n <div class=\"sub-value\" [class.ngx-table-m3-en]=\"subValue.isEN\">{{ subValue.value }}</div>\n }\n</div>\n}\n" }]
|
|
886
|
-
}], ctorParameters: () => [{ type: i1$1.Router }], propDecorators: { className: [{
|
|
1024
|
+
}], ctorParameters: () => [{ type: i1$1.Router }, { type: ViewService }], propDecorators: { className: [{
|
|
887
1025
|
type: HostBinding,
|
|
888
1026
|
args: ['className']
|
|
889
1027
|
}], textAlign: [{
|
|
@@ -912,105 +1050,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
912
1050
|
args: [{ required: false }]
|
|
913
1051
|
}] } });
|
|
914
1052
|
|
|
915
|
-
class ViewService {
|
|
916
|
-
activatedRoute;
|
|
917
|
-
constructor(activatedRoute) {
|
|
918
|
-
this.activatedRoute = activatedRoute;
|
|
919
|
-
}
|
|
920
|
-
getTitleIndex(ngxTable) {
|
|
921
|
-
const index = ngxTable.columns.findIndex((l) => l.mode === 'TITLE');
|
|
922
|
-
return index === -1 ? 0 : index;
|
|
923
|
-
}
|
|
924
|
-
getSubTitleIndex(ngxTable) {
|
|
925
|
-
const index = ngxTable.columns.findIndex((l) => l.mode === 'SUBTITLE');
|
|
926
|
-
return index === -1 ? undefined : index;
|
|
927
|
-
}
|
|
928
|
-
getIcons(ngxTable, data) {
|
|
929
|
-
const iconFn = ngxTable.rows?.icon;
|
|
930
|
-
if (!iconFn)
|
|
931
|
-
return [];
|
|
932
|
-
return data.map((item, index) => {
|
|
933
|
-
const icon = iconFn(item, index);
|
|
934
|
-
return typeof icon === 'string'
|
|
935
|
-
? { icon }
|
|
936
|
-
: 'emoji' in icon
|
|
937
|
-
? { icon: '' }
|
|
938
|
-
: { icon: icon.icon, color: icon.color || undefined };
|
|
939
|
-
});
|
|
940
|
-
}
|
|
941
|
-
getEmojis(ngxTable, data) {
|
|
942
|
-
const iconFn = ngxTable.rows?.icon;
|
|
943
|
-
if (!iconFn)
|
|
944
|
-
return [];
|
|
945
|
-
return data.map((item, index) => {
|
|
946
|
-
const icon = iconFn(item, index);
|
|
947
|
-
return typeof icon === 'string' ? '' : 'emoji' in icon ? icon.emoji : '';
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
getColors(ngxTable, data) {
|
|
951
|
-
const colorFn = ngxTable.rows?.color;
|
|
952
|
-
if (!colorFn)
|
|
953
|
-
return [];
|
|
954
|
-
return data.map((item, index) => colorFn(item, index) || '');
|
|
955
|
-
}
|
|
956
|
-
getDescriptions(ngxTable, data) {
|
|
957
|
-
const descriptionFn = ngxTable.rows?.description;
|
|
958
|
-
if (!descriptionFn)
|
|
959
|
-
return [];
|
|
960
|
-
return data.map((item, index) => descriptionFn(item, index) || undefined);
|
|
961
|
-
}
|
|
962
|
-
getDeactives(ngxTable, data) {
|
|
963
|
-
const deactives = [];
|
|
964
|
-
data.forEach((item, index) => {
|
|
965
|
-
if (ngxTable.rows?.isDeactive?.(item, index))
|
|
966
|
-
deactives.push(index);
|
|
967
|
-
});
|
|
968
|
-
return deactives;
|
|
969
|
-
}
|
|
970
|
-
getOrders(ngxTable) {
|
|
971
|
-
let defaultFound = false;
|
|
972
|
-
const orders = {};
|
|
973
|
-
// CHECK COLUMNS
|
|
974
|
-
ngxTable.columns.forEach((column) => {
|
|
975
|
-
if (!column.tools || !('order' in column.tools) || !column.tools.order)
|
|
976
|
-
return;
|
|
977
|
-
const title = column.title || '';
|
|
978
|
-
const key = column.tools.id;
|
|
979
|
-
const type = column.tools.order.type || 'ORDER';
|
|
980
|
-
const initial = type !== 'ORDER' ? type : column.tools.order.initial || 'ASC';
|
|
981
|
-
const isDefault = !defaultFound && !!column.tools.order.isDefault;
|
|
982
|
-
orders[key] = { title, type, initial, current: isDefault ? initial : undefined };
|
|
983
|
-
if (isDefault)
|
|
984
|
-
defaultFound = true;
|
|
985
|
-
});
|
|
986
|
-
if (Object.keys(orders).length === 0)
|
|
987
|
-
return {};
|
|
988
|
-
// CHECK QUERY PARAMS
|
|
989
|
-
const queryParams = { ...this.activatedRoute.snapshot.queryParams };
|
|
990
|
-
if (!!ngxTable.route && queryParams['ngx-table-order']) {
|
|
991
|
-
const param = queryParams['ngx-table-order'];
|
|
992
|
-
const index = param.lastIndexOf(':');
|
|
993
|
-
if (index !== -1) {
|
|
994
|
-
const id = param.substring(0, index);
|
|
995
|
-
const type = param.substring(index + 1);
|
|
996
|
-
if (orders[id] &&
|
|
997
|
-
(type === 'ASC' || type === 'DESC') &&
|
|
998
|
-
(orders[id].type === 'ORDER' || orders[id].type === type)) {
|
|
999
|
-
Object.keys(orders).forEach((key) => {
|
|
1000
|
-
orders[key] = { ...orders[key], current: key === id ? type : undefined };
|
|
1001
|
-
});
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
return orders;
|
|
1006
|
-
}
|
|
1007
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ViewService, deps: [{ token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1008
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ViewService });
|
|
1009
|
-
}
|
|
1010
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: ViewService, decorators: [{
|
|
1011
|
-
type: Injectable
|
|
1012
|
-
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }] });
|
|
1013
|
-
|
|
1014
1053
|
class ViewCardToolbarComponent {
|
|
1015
1054
|
className = 'ngx-table-m3-card-view-toolbar';
|
|
1016
1055
|
orders;
|
|
@@ -1064,10 +1103,10 @@ class ViewCardToolbarComponent {
|
|
|
1064
1103
|
break;
|
|
1065
1104
|
}
|
|
1066
1105
|
}
|
|
1067
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1068
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1106
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewCardToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1107
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: ViewCardToolbarComponent, isStandalone: true, selector: "view-card-toolbar", inputs: { orders: "orders", filters: "filters", viewConfig: "viewConfig" }, outputs: { orderChanged: "orderChanged", updateFilter: "updateFilter", clearFilter: "clearFilter" }, host: { properties: { "className": "this.className" } }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"toolbar-container\"\n [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"viewConfig.stickyView?.top?.mobileView || undefined\"\n (mousedown)=\"swipe($event, 'START', toolbarContainer, toolbarItems)\"\n (mousemove)=\"swipe($event, 'MOVE', toolbarContainer, toolbarItems)\"\n (mouseup)=\"swipe($event, 'END', toolbarContainer, toolbarItems)\"\n (touchstart)=\"swipe($event, 'START', toolbarContainer, toolbarItems)\"\n (touchmove)=\"swipe($event, 'MOVE', toolbarContainer, toolbarItems)\"\n (touchend)=\"swipe($event, 'END', toolbarContainer, toolbarItems)\"\n #toolbarContainer\n>\n <div class=\"toolbar-items\" #toolbarItems>\n <!-- ORDER -->\n @if (orderKeys.length > 0) {\n <div class=\"item\" [matMenuTriggerFor]=\"orderMenu\">\n <mat-icon>swap_vert</mat-icon>\n <span>\u062A\u0631\u062A\u06CC\u0628 \u0646\u0645\u0627\u06CC\u0634</span>\n </div>\n <mat-menu #orderMenu=\"matMenu\" [xPosition]=\"'after'\" class=\"ngx-table-order-menu\">\n @for (item of orderKeys; track $index) {\n <!-- DIVIDER -->\n @if ($index !== 0) {<mat-divider></mat-divider>}\n\n <!-- TYPES -->\n @switch (orders[item].type) {\n <!-- ORDR -->\n @case ('ORDER') {\n <button\n mat-menu-item\n type=\"button\"\n [disabled]=\"orders[item].current === 'ASC'\"\n (click)=\"updateOrder(item, 'ASC')\"\n >\n <mat-icon>north</mat-icon>\n <span>{{ orders[item].title }}</span>\n </button>\n <button\n mat-menu-item\n type=\"button\"\n [disabled]=\"orders[item].current === 'DESC'\"\n (click)=\"updateOrder(item, 'DESC')\"\n >\n <mat-icon>south</mat-icon>\n <span>{{ orders[item].title }}</span>\n </button>\n }\n <!-- ASC, DESC -->\n @default {\n <button\n mat-menu-item\n type=\"button\"\n [disabled]=\"orders[item].current\"\n (click)=\"updateOrder(item, orders[item].type)\"\n >\n <mat-icon>{{ orders[item].type === 'ASC' ? 'north' : 'south' }}</mat-icon>\n <span>{{ orders[item].title }}</span>\n </button>\n } } }\n </mat-menu>\n }\n\n <!-- CLEAR -->\n @if (showClear) {\n <div class=\"item clear\" (click)=\"clearFilter.next()\">\n <span>\u0644\u063A\u0648 \u0641\u06CC\u0644\u062A\u0631\u0647\u0627</span>\n <mat-icon>filter_alt_off</mat-icon>\n </div>\n\n }\n\n <!-- FILTER -->\n @for (item of filterKeys; track $index) {\n <div class=\"item\" [class.active]=\"filters[item].value\" (click)=\"updateFilter.next(item)\">\n <mat-icon>filter_alt</mat-icon>\n <span>{{ filters[item].title }}</span>\n </div>\n }\n </div>\n</div>\n\n<div\n class=\"toolbar-seperator\"\n [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"\n 'calc(' + (viewConfig.stickyView?.top?.mobileView || undefined) + ' + var(--ngx-table-m3-toolbar-height) + 2px)'\n \"\n></div>\n", styles: ["::ng-deep .ngx-table-order-menu mat-icon{font-size:100%;margin:0 0 0 .75rem!important}::ng-deep .ngx-table-order-menu .mat-mdc-menu-content{padding:0}::ng-deep .ngx-table-order-menu .mat-mdc-menu-item{direction:rtl;text-align:right}::ng-deep .ngx-table-order-menu .mat-mdc-menu-item .mat-mdc-menu-item-text{font-size:90%!important}::ng-deep .ngx-table-order-menu .mat-divider{margin:0!important;border-top-color:var(--outline-variant)}\n"], dependencies: [{ kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] });
|
|
1069
1108
|
}
|
|
1070
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewCardToolbarComponent, decorators: [{
|
|
1071
1110
|
type: Component,
|
|
1072
1111
|
args: [{ selector: 'view-card-toolbar', imports: [MatDivider, MatIcon, MatMenuModule], template: "<div\n class=\"toolbar-container\"\n [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"viewConfig.stickyView?.top?.mobileView || undefined\"\n (mousedown)=\"swipe($event, 'START', toolbarContainer, toolbarItems)\"\n (mousemove)=\"swipe($event, 'MOVE', toolbarContainer, toolbarItems)\"\n (mouseup)=\"swipe($event, 'END', toolbarContainer, toolbarItems)\"\n (touchstart)=\"swipe($event, 'START', toolbarContainer, toolbarItems)\"\n (touchmove)=\"swipe($event, 'MOVE', toolbarContainer, toolbarItems)\"\n (touchend)=\"swipe($event, 'END', toolbarContainer, toolbarItems)\"\n #toolbarContainer\n>\n <div class=\"toolbar-items\" #toolbarItems>\n <!-- ORDER -->\n @if (orderKeys.length > 0) {\n <div class=\"item\" [matMenuTriggerFor]=\"orderMenu\">\n <mat-icon>swap_vert</mat-icon>\n <span>\u062A\u0631\u062A\u06CC\u0628 \u0646\u0645\u0627\u06CC\u0634</span>\n </div>\n <mat-menu #orderMenu=\"matMenu\" [xPosition]=\"'after'\" class=\"ngx-table-order-menu\">\n @for (item of orderKeys; track $index) {\n <!-- DIVIDER -->\n @if ($index !== 0) {<mat-divider></mat-divider>}\n\n <!-- TYPES -->\n @switch (orders[item].type) {\n <!-- ORDR -->\n @case ('ORDER') {\n <button\n mat-menu-item\n type=\"button\"\n [disabled]=\"orders[item].current === 'ASC'\"\n (click)=\"updateOrder(item, 'ASC')\"\n >\n <mat-icon>north</mat-icon>\n <span>{{ orders[item].title }}</span>\n </button>\n <button\n mat-menu-item\n type=\"button\"\n [disabled]=\"orders[item].current === 'DESC'\"\n (click)=\"updateOrder(item, 'DESC')\"\n >\n <mat-icon>south</mat-icon>\n <span>{{ orders[item].title }}</span>\n </button>\n }\n <!-- ASC, DESC -->\n @default {\n <button\n mat-menu-item\n type=\"button\"\n [disabled]=\"orders[item].current\"\n (click)=\"updateOrder(item, orders[item].type)\"\n >\n <mat-icon>{{ orders[item].type === 'ASC' ? 'north' : 'south' }}</mat-icon>\n <span>{{ orders[item].title }}</span>\n </button>\n } } }\n </mat-menu>\n }\n\n <!-- CLEAR -->\n @if (showClear) {\n <div class=\"item clear\" (click)=\"clearFilter.next()\">\n <span>\u0644\u063A\u0648 \u0641\u06CC\u0644\u062A\u0631\u0647\u0627</span>\n <mat-icon>filter_alt_off</mat-icon>\n </div>\n\n }\n\n <!-- FILTER -->\n @for (item of filterKeys; track $index) {\n <div class=\"item\" [class.active]=\"filters[item].value\" (click)=\"updateFilter.next(item)\">\n <mat-icon>filter_alt</mat-icon>\n <span>{{ filters[item].title }}</span>\n </div>\n }\n </div>\n</div>\n\n<div\n class=\"toolbar-seperator\"\n [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"\n 'calc(' + (viewConfig.stickyView?.top?.mobileView || undefined) + ' + var(--ngx-table-m3-toolbar-height) + 2px)'\n \"\n></div>\n", styles: ["::ng-deep .ngx-table-order-menu mat-icon{font-size:100%;margin:0 0 0 .75rem!important}::ng-deep .ngx-table-order-menu .mat-mdc-menu-content{padding:0}::ng-deep .ngx-table-order-menu .mat-mdc-menu-item{direction:rtl;text-align:right}::ng-deep .ngx-table-order-menu .mat-mdc-menu-item .mat-mdc-menu-item-text{font-size:90%!important}::ng-deep .ngx-table-order-menu .mat-divider{margin:0!important;border-top-color:var(--outline-variant)}\n"] }]
|
|
1073
1112
|
}], propDecorators: { className: [{
|
|
@@ -1133,7 +1172,9 @@ class ViewCardComponent {
|
|
|
1133
1172
|
this.hasToolbar = Object.keys(this.orders).length > 0 || Object.keys(this.filters).length > 0;
|
|
1134
1173
|
const top = this.viewConfig.stickyView?.top?.mobileView;
|
|
1135
1174
|
this.top = top ? (this.hasToolbar ? `calc(${top} + var(--ngx-table-m3-toolbar-height) + 1rem + 2px)` : top) : '';
|
|
1136
|
-
this.hasContent =
|
|
1175
|
+
this.hasContent =
|
|
1176
|
+
this.descriptions.some((d) => !!d) ||
|
|
1177
|
+
this.ngxTable.columns.some((_, index) => index != this.titleIndex && index !== this.subTitleIndex);
|
|
1137
1178
|
}
|
|
1138
1179
|
updateFilter(id) {
|
|
1139
1180
|
const filter = this.filters[id];
|
|
@@ -1146,12 +1187,23 @@ class ViewCardComponent {
|
|
|
1146
1187
|
this.filterChanged.next({ id, value: filter.value });
|
|
1147
1188
|
});
|
|
1148
1189
|
}
|
|
1149
|
-
|
|
1150
|
-
|
|
1190
|
+
showContent(dataInndex) {
|
|
1191
|
+
if (!this.viewConfig.minimalCardView)
|
|
1192
|
+
return true;
|
|
1193
|
+
const hasColumn = this.ngxTable.columns.some((column, index) => index != this.titleIndex && index !== this.subTitleIndex && this.showItem(column, this.data[dataInndex]));
|
|
1194
|
+
return !!this.descriptions[dataInndex] || hasColumn;
|
|
1195
|
+
}
|
|
1196
|
+
showItem(column, item) {
|
|
1197
|
+
if (!this.viewConfig.minimalCardView)
|
|
1198
|
+
return true;
|
|
1199
|
+
return !!this.viewService.getValue(column, item);
|
|
1200
|
+
}
|
|
1201
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewCardComponent, deps: [{ token: FilterService }, { token: ViewService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1202
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: ViewCardComponent, isStandalone: true, selector: "view-card", inputs: { ngxTable: "ngxTable", data: "data", viewConfig: "viewConfig" }, outputs: { orderChanged: "orderChanged", filterChanged: "filterChanged", filterCleared: "filterCleared" }, host: { properties: { "className": "this.className" } }, providers: [FilterService, ViewService], usesOnChanges: true, ngImport: i0, template: "<!-- TOOLBAR -->\n@if (hasToolbar) {\n<view-card-toolbar\n [orders]=\"orders\"\n [filters]=\"filters\"\n [viewConfig]=\"viewConfig\"\n (orderChanged)=\"orderChanged.next($event)\"\n (updateFilter)=\"updateFilter($event)\"\n (clearFilter)=\"filterCleared.next()\"\n></view-card-toolbar>\n}\n\n<!-- DATA -->\n<div class=\"card-container\">\n @for (item of data; track $index; let dataIndex = $index) {\n <div class=\"card\">\n <div class=\"card-header\" [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\" [style.top]=\"top\">\n <!-- ICON -->\n @if (hasIcon) {\n <!-- MATERIAL ICON -->\n @if (icons[$index].icon) {\n <mat-icon class=\"icon\" [style.color]=\"icons[$index].color\" [style.font-size]=\"viewConfig.iconSize\">\n {{ icons[$index].icon }}\n </mat-icon>\n }\n <!-- EMOJI -->\n @else {\n <td class=\"emoji\" [style.font-size]=\"viewConfig.emojiSize\">{{ emojis[$index] || '' }}</td>\n } }\n\n <!-- TITLE -->\n <div class=\"title\" [style.color]=\"colors[dataIndex]\">\n <view-value\n [column]=\"ngxTable.columns[this.titleIndex]\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isDeactive]=\"deactives.includes(dataIndex)\"\n [isCard]=\"true\"\n [isCardTitle]=\"true\"\n ></view-value>\n <!-- SUB TITLE -->\n @if (subTitleIndex !== undefined) {\n <view-value\n [column]=\"ngxTable.columns[this.subTitleIndex]\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isCard]=\"true\"\n [isCardSubTitle]=\"true\"\n ></view-value>\n }\n </div>\n\n <!-- ACTION -->\n @if (hasAction) {\n <view-action\n [actions]=\"ngxTable.actions || []\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isMobile]=\"true\"\n ></view-action>\n }\n </div>\n\n <!-- CONTENT -->\n @if (hasContent && showContent(dataIndex)) {\n <div class=\"card-content\" [style.color]=\"colors[dataIndex]\">\n @for (column of ngxTable.columns; track $index; let columnIndex = $index) {\n <!-- CHECK TITLE AND SUBTITLE AND VALUE -->\n @if (columnIndex !== titleIndex && columnIndex !== subTitleIndex && showItem(column, item)) {\n <div class=\"item\">\n <div class=\"title\">{{ column.title }}{{ !!column.title ? ' :' : '' }}</div>\n <div class=\"value\">\n <view-value [column]=\"column\" [item]=\"item\" [viewConfig]=\"viewConfig\" [isCard]=\"true\"></view-value>\n </div>\n </div>\n } }\n\n <!-- DESCRIPTION -->\n @if (descriptions[dataIndex]) {\n <div class=\"description\" [innerHTML]=\"descriptions[dataIndex] || '' | ngxHelperMultiLine\"></div>\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: ViewActionComponent, selector: "view-action", inputs: ["actions", "item", "viewConfig", "isMobile"] }, { kind: "component", type: ViewValueComponent, selector: "view-value", inputs: ["column", "item", "viewConfig", "isDeactive", "isCard", "isCardTitle", "isCardSubTitle"] }, { kind: "component", type: ViewCardToolbarComponent, selector: "view-card-toolbar", inputs: ["orders", "filters", "viewConfig"], outputs: ["orderChanged", "updateFilter", "clearFilter"] }, { kind: "pipe", type: NgxHelperMultiLinePipe, name: "ngxHelperMultiLine" }] });
|
|
1151
1203
|
}
|
|
1152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewCardComponent, decorators: [{
|
|
1153
1205
|
type: Component,
|
|
1154
|
-
args: [{ selector: 'view-card', imports: [MatIcon, NgxHelperMultiLinePipe, ViewActionComponent, ViewValueComponent, ViewCardToolbarComponent], providers: [FilterService, ViewService], template: "<!-- TOOLBAR -->\n@if (hasToolbar) {\n<view-card-toolbar\n [orders]=\"orders\"\n [filters]=\"filters\"\n [viewConfig]=\"viewConfig\"\n (orderChanged)=\"orderChanged.next($event)\"\n (updateFilter)=\"updateFilter($event)\"\n (clearFilter)=\"filterCleared.next()\"\n></view-card-toolbar>\n}\n\n<!-- DATA -->\n<div class=\"card-container\">\n @for (item of data; track $index; let dataIndex = $index) {\n <div class=\"card\">\n <div class=\"card-header\" [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\" [style.top]=\"top\">\n <!-- ICON -->\n @if (hasIcon) {\n <!-- MATERIAL ICON -->\n @if (icons[$index].icon) {\n <mat-icon class=\"icon\" [style.color]=\"icons[$index].color\" [style.font-size]=\"viewConfig.iconSize\">\n {{ icons[$index].icon }}\n </mat-icon>\n }\n <!-- EMOJI -->\n @else {\n <td class=\"emoji\" [style.font-size]=\"viewConfig.emojiSize\">{{ emojis[$index] || '' }}</td>\n } }\n\n <!-- TITLE -->\n <div class=\"title\" [style.color]=\"colors[dataIndex]\">\n <view-value\n [column]=\"ngxTable.columns[this.titleIndex]\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isDeactive]=\"deactives.includes(dataIndex)\"\n [isCard]=\"true\"\n [isCardTitle]=\"true\"\n ></view-value>\n <!-- SUB TITLE -->\n @if (subTitleIndex !== undefined) {\n <view-value\n [column]=\"ngxTable.columns[this.subTitleIndex]\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isCard]=\"true\"\n [isCardSubTitle]=\"true\"\n ></view-value>\n }\n </div>\n\n <!-- ACTION -->\n @if (hasAction) {\n <view-action\n [actions]=\"ngxTable.actions || []\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isMobile]=\"true\"\n ></view-action>\n }\n </div>\n\n <!-- CONTENT -->\n @if (hasContent) {\n <div class=\"card-content\" [style.color]=\"colors[dataIndex]\">\n @for (column of ngxTable.columns; track $index; let columnIndex = $index) {\n <!-- CHECK TITLE AND SUBTITLE -->\n @if (columnIndex !== titleIndex && columnIndex !== subTitleIndex) {\n <div class=\"item\">\n <div class=\"title\">{{ column.title }}{{ !!column.title ? ' :' : '' }}</div>\n <div class=\"value\">\n <view-value [column]=\"column\" [item]=\"item\" [viewConfig]=\"viewConfig\" [isCard]=\"true\"></view-value>\n </div>\n </div>\n } }\n\n <!-- DESCRIPTION -->\n @if (descriptions[dataIndex]) {\n <div class=\"description\" [innerHTML]=\"descriptions[dataIndex] || '' | ngxHelperMultiLine\"></div>\n }\n </div>\n }\n </div>\n }\n</div>\n" }]
|
|
1206
|
+
args: [{ selector: 'view-card', imports: [MatIcon, NgxHelperMultiLinePipe, ViewActionComponent, ViewValueComponent, ViewCardToolbarComponent], providers: [FilterService, ViewService], template: "<!-- TOOLBAR -->\n@if (hasToolbar) {\n<view-card-toolbar\n [orders]=\"orders\"\n [filters]=\"filters\"\n [viewConfig]=\"viewConfig\"\n (orderChanged)=\"orderChanged.next($event)\"\n (updateFilter)=\"updateFilter($event)\"\n (clearFilter)=\"filterCleared.next()\"\n></view-card-toolbar>\n}\n\n<!-- DATA -->\n<div class=\"card-container\">\n @for (item of data; track $index; let dataIndex = $index) {\n <div class=\"card\">\n <div class=\"card-header\" [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\" [style.top]=\"top\">\n <!-- ICON -->\n @if (hasIcon) {\n <!-- MATERIAL ICON -->\n @if (icons[$index].icon) {\n <mat-icon class=\"icon\" [style.color]=\"icons[$index].color\" [style.font-size]=\"viewConfig.iconSize\">\n {{ icons[$index].icon }}\n </mat-icon>\n }\n <!-- EMOJI -->\n @else {\n <td class=\"emoji\" [style.font-size]=\"viewConfig.emojiSize\">{{ emojis[$index] || '' }}</td>\n } }\n\n <!-- TITLE -->\n <div class=\"title\" [style.color]=\"colors[dataIndex]\">\n <view-value\n [column]=\"ngxTable.columns[this.titleIndex]\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isDeactive]=\"deactives.includes(dataIndex)\"\n [isCard]=\"true\"\n [isCardTitle]=\"true\"\n ></view-value>\n <!-- SUB TITLE -->\n @if (subTitleIndex !== undefined) {\n <view-value\n [column]=\"ngxTable.columns[this.subTitleIndex]\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isCard]=\"true\"\n [isCardSubTitle]=\"true\"\n ></view-value>\n }\n </div>\n\n <!-- ACTION -->\n @if (hasAction) {\n <view-action\n [actions]=\"ngxTable.actions || []\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isMobile]=\"true\"\n ></view-action>\n }\n </div>\n\n <!-- CONTENT -->\n @if (hasContent && showContent(dataIndex)) {\n <div class=\"card-content\" [style.color]=\"colors[dataIndex]\">\n @for (column of ngxTable.columns; track $index; let columnIndex = $index) {\n <!-- CHECK TITLE AND SUBTITLE AND VALUE -->\n @if (columnIndex !== titleIndex && columnIndex !== subTitleIndex && showItem(column, item)) {\n <div class=\"item\">\n <div class=\"title\">{{ column.title }}{{ !!column.title ? ' :' : '' }}</div>\n <div class=\"value\">\n <view-value [column]=\"column\" [item]=\"item\" [viewConfig]=\"viewConfig\" [isCard]=\"true\"></view-value>\n </div>\n </div>\n } }\n\n <!-- DESCRIPTION -->\n @if (descriptions[dataIndex]) {\n <div class=\"description\" [innerHTML]=\"descriptions[dataIndex] || '' | ngxHelperMultiLine\"></div>\n }\n </div>\n }\n </div>\n }\n</div>\n" }]
|
|
1155
1207
|
}], ctorParameters: () => [{ type: FilterService }, { type: ViewService }], propDecorators: { className: [{
|
|
1156
1208
|
type: HostBinding,
|
|
1157
1209
|
args: ['className']
|
|
@@ -1216,10 +1268,10 @@ class ViewPaginationComponent {
|
|
|
1216
1268
|
const parentHeight = element.parentElement?.offsetHeight;
|
|
1217
1269
|
this.hasShadow = !!parentHeight && elementPosition < parentHeight;
|
|
1218
1270
|
}
|
|
1219
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1220
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1271
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewPaginationComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1272
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: ViewPaginationComponent, isStandalone: true, selector: "view-pagination", inputs: { type: "type", pagination: "pagination", viewConfig: "viewConfig", isMobile: "isMobile", stickyBottom: "stickyBottom" }, outputs: { pageChanged: "pageChanged" }, host: { listeners: { "window:scroll": "onScroll($event)" }, properties: { "className": "this.className", "style.position": "this.stylePosition", "style.bottom": "this.styleBottom" } }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"pagination-content\"\n [class.desktop-view]=\"!isMobile\"\n [class.mobile-view]=\"isMobile\"\n [class.has-shadow]=\"hasShadow\"\n>\n <div class=\"counts\">\n <div class=\"title\">\u0635\u0641\u062D\u0647 {{ pagination.page.current | number }} \u0627\u0632 {{ pagination.page.total | number }}</div>\n <div class=\"total\">{{ pagination.item.total | number }} {{ type }}</div>\n </div>\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"pagination.page.current === pagination.page.total\"\n (click)=\"pageChanged.next(pagination.page.total)\"\n >\n <mat-icon>keyboard_double_arrow_right</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"pagination.page.current === pagination.page.total\"\n (click)=\"pageChanged.next(pagination.page.current + 1)\"\n >\n <mat-icon>chevron_right</mat-icon>\n </button>\n\n <button mat-icon-button [matMenuTriggerFor]=\"pageMenu\"><mat-icon>tag</mat-icon></button>\n <mat-menu #pageMenu=\"matMenu\" class=\"ngx-table-m3-pagination\">\n @for (page of pages; track $index) {\n <button\n mat-menu-item\n type=\"button\"\n [disabled]=\"page === pagination.page.current\"\n class=\"ngx-table-m3-pagination-item\"\n (click)=\"pageChanged.next(page)\"\n >\n {{ page | number }}\n </button>\n }\n </mat-menu>\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"pagination.page.current === 1\"\n (click)=\"pageChanged.next(pagination.page.current - 1)\"\n >\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"pagination.page.current === 1\" (click)=\"pageChanged.next(1)\">\n <mat-icon>keyboard_double_arrow_left</mat-icon>\n </button>\n</div>\n", styles: ["::ng-deep .ngx-table-m3-pagination .mat-mdc-menu-content{padding:0}::ng-deep .ngx-table-m3-pagination-item{text-align:center!important}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: DecimalPipe, name: "number" }] });
|
|
1221
1273
|
}
|
|
1222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewPaginationComponent, decorators: [{
|
|
1223
1275
|
type: Component,
|
|
1224
1276
|
args: [{ selector: 'view-pagination', host: { '(window:scroll)': 'onScroll($event)' }, imports: [DecimalPipe, MatIconButton, MatIcon, MatMenuModule], template: "<div\n class=\"pagination-content\"\n [class.desktop-view]=\"!isMobile\"\n [class.mobile-view]=\"isMobile\"\n [class.has-shadow]=\"hasShadow\"\n>\n <div class=\"counts\">\n <div class=\"title\">\u0635\u0641\u062D\u0647 {{ pagination.page.current | number }} \u0627\u0632 {{ pagination.page.total | number }}</div>\n <div class=\"total\">{{ pagination.item.total | number }} {{ type }}</div>\n </div>\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"pagination.page.current === pagination.page.total\"\n (click)=\"pageChanged.next(pagination.page.total)\"\n >\n <mat-icon>keyboard_double_arrow_right</mat-icon>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"pagination.page.current === pagination.page.total\"\n (click)=\"pageChanged.next(pagination.page.current + 1)\"\n >\n <mat-icon>chevron_right</mat-icon>\n </button>\n\n <button mat-icon-button [matMenuTriggerFor]=\"pageMenu\"><mat-icon>tag</mat-icon></button>\n <mat-menu #pageMenu=\"matMenu\" class=\"ngx-table-m3-pagination\">\n @for (page of pages; track $index) {\n <button\n mat-menu-item\n type=\"button\"\n [disabled]=\"page === pagination.page.current\"\n class=\"ngx-table-m3-pagination-item\"\n (click)=\"pageChanged.next(page)\"\n >\n {{ page | number }}\n </button>\n }\n </mat-menu>\n\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"pagination.page.current === 1\"\n (click)=\"pageChanged.next(pagination.page.current - 1)\"\n >\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button mat-icon-button type=\"button\" [disabled]=\"pagination.page.current === 1\" (click)=\"pageChanged.next(1)\">\n <mat-icon>keyboard_double_arrow_left</mat-icon>\n </button>\n</div>\n", styles: ["::ng-deep .ngx-table-m3-pagination .mat-mdc-menu-content{padding:0}::ng-deep .ngx-table-m3-pagination-item{text-align:center!important}\n"] }]
|
|
1225
1277
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { className: [{
|
|
@@ -1321,14 +1373,14 @@ class ViewTableComponent {
|
|
|
1321
1373
|
this.filters[id] = { ...this.filters[id], value: undefined };
|
|
1322
1374
|
this.filterChanged.next({ id, value: undefined });
|
|
1323
1375
|
}
|
|
1324
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1325
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1376
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewTableComponent, deps: [{ token: ViewService }, { token: FilterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1377
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: ViewTableComponent, isStandalone: true, selector: "view-table", inputs: { ngxTable: "ngxTable", data: "data", viewConfig: "viewConfig" }, outputs: { orderChanged: "orderChanged", filterChanged: "filterChanged", filterCleared: "filterCleared" }, host: { properties: { "className": "this.className" } }, providers: [FilterService, ViewService], usesOnChanges: true, ngImport: i0, template: "<table [cellPadding]=\"0\" [cellSpacing]=\"0\" [width]=\"'100%'\" [border]=\"0\">\n <!-- HEADER -->\n\n <thead\n [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"viewConfig.stickyView?.top?.desktopView || undefined\"\n >\n <!-- ACTIVE FILTERS -->\n @if (activeFilters.length > 0) {\n <tr>\n <!-- ICON -->\n @if (hasIcon) {\n <th class=\"active-filters\"></th>\n }\n\n <!-- TOOLBAR -->\n <th class=\"active-filters\" [colSpan]=\"ngxTable.columns.length + (this.hasAction ? 1 : 0)\">\n <div class=\"toolbar\" [@toolbar]>\n @for (item of activeFilters; track $index) {\n <div class=\"item\">\n <div class=\"title\" (click)=\"updateFilter(item.id)\">{{ item.title }}:</div>\n <div class=\"value\" (click)=\"updateFilter(item.id)\" [class.ngx-table-m3-en]=\"item.english\">\n {{ item.value }}\n </div>\n <div class=\"icon\" (click)=\"clearFilter(item.id)\">\n <mat-icon>close</mat-icon>\n </div>\n </div>\n }\n\n <!-- CLEAR ALL -->\n @if (activeFilters.length > 2) {\n <div class=\"item clear\" (click)=\"filterCleared.next()\">\n <div class=\"title\">\u0644\u063A\u0648 \u0641\u06CC\u0644\u062A\u0631\u0647\u0627</div>\n <div class=\"icon\"><mat-icon>filter_alt_off</mat-icon></div>\n </div>\n }\n </div>\n </th>\n </tr>\n }\n\n <tr>\n <!-- ICON -->\n @if (hasIcon) {\n <th></th>\n }\n\n <!-- COLUMNS -->\n @for (column of ngxTable.columns; track $index) {\n <th [style.text-align]=\"(column.textAlign || 'RIGHT').toLowerCase()\">\n <div\n class=\"column\"\n [class.flex-end]=\"column.textAlign === 'LEFT'\"\n [class.flex-center]=\"column.textAlign === 'CENTER'\"\n >\n <div class=\"title\">{{ column.title }}</div>\n\n <!-- ORDER -->\n @if (column.tools && orders[column.tools.id]) {\n <mat-icon\n (click)=\"updateOrder(column.tools.id)\"\n [style.cursor]=\"\n orders[column.tools.id].type === 'ORDER' || !orders[column.tools.id].current\n ? 'pointer'\n : 'default'\n \"\n >\n {{\n orders[column.tools.id].current === 'ASC'\n ? 'north'\n : orders[column.tools.id].current === 'DESC'\n ? 'south'\n : 'swap_vert'\n }}\n </mat-icon>\n }\n\n <!-- FILTER -->\n @if (column.tools && filters[column.tools.id]) {\n <mat-icon [style.cursor]=\"'pointer'\" (click)=\"updateFilter(column.tools.id)\">filter_alt</mat-icon>\n }\n </div>\n </th>\n }\n\n <!-- ACTION -->\n @if (hasAction) {\n <th></th>\n }\n </tr>\n </thead>\n\n <!-- BODY -->\n <tbody>\n @for (item of data; track $index; let dataIndex = $index) {\n <tr\n [style.color]=\"colors[dataIndex]\"\n [class.odd-row]=\"viewConfig.alternateRows && dataIndex % 2 === 1\"\n [class.even-row]=\"viewConfig.alternateRows && dataIndex % 2 === 0\"\n >\n <!-- ICON -->\n @if (hasIcon) {\n <!-- MATERIAL ICON -->\n @if (icons[$index].icon) {\n <td class=\"icon\">\n <mat-icon [style.color]=\"icons[$index].color\" [style.font-size]=\"viewConfig.iconSize\">\n {{ icons[$index].icon }}\n </mat-icon>\n </td>\n }\n <!-- EMOJI -->\n @else {\n <td class=\"emoji\" [style.font-size]=\"viewConfig.emojiSize\">{{ emojis[$index] || '' }}</td>\n } }\n\n <!-- DATA -->\n @for (column of ngxTable.columns; track $index; let columnIndex = $index) {\n <td>\n <view-value\n [column]=\"column\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isDeactive]=\"columnIndex === titleIndex && deactives.includes(dataIndex)\"\n ></view-value>\n </td>\n }\n\n <!-- ACTION -->\n @if (hasAction) {\n <td class=\"action\">\n <view-action\n [actions]=\"ngxTable.actions || []\"\n [item]=\"item\"\n [viewConfig]=\"viewConfig\"\n [isMobile]=\"false\"\n ></view-action>\n </td>\n }\n </tr>\n\n <!-- DESCRIPTION -->\n @if (descriptions[dataIndex]) {\n <tr\n [style.color]=\"colors[dataIndex]\"\n [class.odd-row]=\"viewConfig.alternateRows && dataIndex % 2 === 1\"\n [class.even-row]=\"viewConfig.alternateRows && dataIndex % 2 === 0\"\n >\n @if (hasIcon) {\n <td class=\"description\"></td>\n }\n <td\n class=\"description\"\n [colSpan]=\"ngxTable.columns.length + (hasAction ? 1 : 0)\"\n [innerHTML]=\"descriptions[dataIndex] || '' | ngxHelperMultiLine\"\n ></td>\n </tr>\n } }\n </tbody>\n</table>\n", styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: ViewActionComponent, selector: "view-action", inputs: ["actions", "item", "viewConfig", "isMobile"] }, { kind: "component", type: ViewValueComponent, selector: "view-value", inputs: ["column", "item", "viewConfig", "isDeactive", "isCard", "isCardTitle", "isCardSubTitle"] }, { kind: "pipe", type: NgxHelperMultiLinePipe, name: "ngxHelperMultiLine" }], animations: [
|
|
1326
1378
|
trigger('toolbar', [
|
|
1327
1379
|
transition(':enter', [style({ opacity: 0, height: 0 }), animate('150ms', style({ opacity: 1, height: '*' }))]),
|
|
1328
1380
|
]),
|
|
1329
1381
|
] });
|
|
1330
1382
|
}
|
|
1331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ViewTableComponent, decorators: [{
|
|
1332
1384
|
type: Component,
|
|
1333
1385
|
args: [{ selector: 'view-table', imports: [MatIcon, NgxHelperMultiLinePipe, ViewActionComponent, ViewValueComponent], providers: [FilterService, ViewService], animations: [
|
|
1334
1386
|
trigger('toolbar', [
|
|
@@ -1429,6 +1481,7 @@ class NgxTableComponent {
|
|
|
1429
1481
|
iconSize: `${this.config?.iconSize || 24}px`,
|
|
1430
1482
|
emojiSize: `${this.config?.emojiSize || 19}px`,
|
|
1431
1483
|
actionMenuTitle: this.config?.actionMenuTitle || 'امکانات',
|
|
1484
|
+
minimalCardView: !!this.config?.minimalCardView,
|
|
1432
1485
|
stickyView: this.config?.stickyView
|
|
1433
1486
|
? {
|
|
1434
1487
|
top: this.config.stickyView.top ? getStickyView(this.config.stickyView.top) : undefined,
|
|
@@ -1490,10 +1543,10 @@ class NgxTableComponent {
|
|
|
1490
1543
|
this.setQueryParams();
|
|
1491
1544
|
this.filterChanged.next(this.filter);
|
|
1492
1545
|
}
|
|
1493
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1494
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1546
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: NgxTableComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: FilterService }, { token: ViewService }, { token: NGX_TABLE_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
1547
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: NgxTableComponent, isStandalone: true, selector: "ngx-table", inputs: { loading: "loading", ngxTable: "ngxTable", data: "data", pagination: "pagination" }, outputs: { filterChanged: "filterChanged" }, host: { listeners: { "window:resize": "onResize($event)" } }, providers: [FilterService, ViewService], usesOnChanges: true, ngImport: i0, template: "@if (loading) {\n<div class=\"ngx-table-m3-loader\">\n <ngx-helper-loader [mode]=\"'SPINNER'\"></ngx-helper-loader>\n</div>\n}\n\n<!-- EMPTY -->\n@if (!loading && ngxTable.columns.length <= 0 ) {\n<div class=\"ngx-table-m3-empty\">\u0633\u062A\u0648\u0646\u200C\u0647\u0627\u06CC \u062C\u062F\u0648\u0644 \u0628\u0647 \u0635\u0648\u0631\u062A \u0635\u062D\u06CC\u062D \u0645\u0634\u062E\u0635 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A.</div>\n}\n\n<!-- EMPTY -->\n@if (!loading && ngxTable.columns.length > 0 && data.length === 0 && !hasFilter) {\n<div class=\"ngx-table-m3-empty\">{{ ngxTable.type }} \u062B\u0628\u062A \u0646\u0634\u062F\u0647 \u0627\u0633\u062A.</div>\n}\n\n<!-- DATA -->\n@if (!loading && ngxTable.columns.length > 0 && (data.length > 0 || hasFilter)) {\n<content class=\"ngx-table-m3\">\n <!-- DESKTOP -->\n @if (!isMobile) {\n <view-table\n [ngxTable]=\"ngxTable\"\n [data]=\"data\"\n [viewConfig]=\"viewConfig\"\n (orderChanged)=\"orderChanged($event)\"\n (filterChanged)=\"filterItemChanged($event)\"\n (filterCleared)=\"filterCleared()\"\n ></view-table>\n }\n\n <!-- MOBILE -->\n @if (isMobile) {\n <view-card\n [ngxTable]=\"ngxTable\"\n [data]=\"data\"\n [viewConfig]=\"viewConfig\"\n (orderChanged)=\"orderChanged($event)\"\n (filterChanged)=\"filterItemChanged($event)\"\n (filterCleared)=\"filterCleared()\"\n ></view-card>\n }\n\n <!-- PAGINATION -->\n @if (pagination && pagination.page.total> 1) {\n <view-pagination\n [type]=\"ngxTable.type\"\n [pagination]=\"pagination\"\n [viewConfig]=\"viewConfig\"\n [isMobile]=\"isMobile\"\n [stickyBottom]=\"viewConfig.stickyView?.bottom\"\n (pageChanged)=\"pageChanged($event)\"\n ></view-pagination>\n }\n\n <!-- EMPTY -->\n @if ( data.length === 0) {\n <div class=\"ngx-table-m3-empty\">{{ ngxTable.type }} \u062B\u0628\u062A \u0646\u0634\u062F\u0647 \u0627\u0633\u062A.</div>\n }\n</content>\n}\n", styles: ["content{display:block;direction:rtl;position:relative}\n"], dependencies: [{ kind: "component", type: NgxHelperLoaderComponent, selector: "ngx-helper-loader", inputs: ["mode", "size", "color", "padding", "margin"] }, { kind: "component", type: ViewCardComponent, selector: "view-card", inputs: ["ngxTable", "data", "viewConfig"], outputs: ["orderChanged", "filterChanged", "filterCleared"] }, { kind: "component", type: ViewPaginationComponent, selector: "view-pagination", inputs: ["type", "pagination", "viewConfig", "isMobile", "stickyBottom"], outputs: ["pageChanged"] }, { kind: "component", type: ViewTableComponent, selector: "view-table", inputs: ["ngxTable", "data", "viewConfig"], outputs: ["orderChanged", "filterChanged", "filterCleared"] }] });
|
|
1495
1548
|
}
|
|
1496
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: NgxTableComponent, decorators: [{
|
|
1497
1550
|
type: Component,
|
|
1498
1551
|
args: [{ selector: 'ngx-table', host: { '(window:resize)': 'onResize($event)' }, imports: [NgxHelperLoaderComponent, ViewCardComponent, ViewPaginationComponent, ViewTableComponent], providers: [FilterService, ViewService], template: "@if (loading) {\n<div class=\"ngx-table-m3-loader\">\n <ngx-helper-loader [mode]=\"'SPINNER'\"></ngx-helper-loader>\n</div>\n}\n\n<!-- EMPTY -->\n@if (!loading && ngxTable.columns.length <= 0 ) {\n<div class=\"ngx-table-m3-empty\">\u0633\u062A\u0648\u0646\u200C\u0647\u0627\u06CC \u062C\u062F\u0648\u0644 \u0628\u0647 \u0635\u0648\u0631\u062A \u0635\u062D\u06CC\u062D \u0645\u0634\u062E\u0635 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A.</div>\n}\n\n<!-- EMPTY -->\n@if (!loading && ngxTable.columns.length > 0 && data.length === 0 && !hasFilter) {\n<div class=\"ngx-table-m3-empty\">{{ ngxTable.type }} \u062B\u0628\u062A \u0646\u0634\u062F\u0647 \u0627\u0633\u062A.</div>\n}\n\n<!-- DATA -->\n@if (!loading && ngxTable.columns.length > 0 && (data.length > 0 || hasFilter)) {\n<content class=\"ngx-table-m3\">\n <!-- DESKTOP -->\n @if (!isMobile) {\n <view-table\n [ngxTable]=\"ngxTable\"\n [data]=\"data\"\n [viewConfig]=\"viewConfig\"\n (orderChanged)=\"orderChanged($event)\"\n (filterChanged)=\"filterItemChanged($event)\"\n (filterCleared)=\"filterCleared()\"\n ></view-table>\n }\n\n <!-- MOBILE -->\n @if (isMobile) {\n <view-card\n [ngxTable]=\"ngxTable\"\n [data]=\"data\"\n [viewConfig]=\"viewConfig\"\n (orderChanged)=\"orderChanged($event)\"\n (filterChanged)=\"filterItemChanged($event)\"\n (filterCleared)=\"filterCleared()\"\n ></view-card>\n }\n\n <!-- PAGINATION -->\n @if (pagination && pagination.page.total> 1) {\n <view-pagination\n [type]=\"ngxTable.type\"\n [pagination]=\"pagination\"\n [viewConfig]=\"viewConfig\"\n [isMobile]=\"isMobile\"\n [stickyBottom]=\"viewConfig.stickyView?.bottom\"\n (pageChanged)=\"pageChanged($event)\"\n ></view-pagination>\n }\n\n <!-- EMPTY -->\n @if ( data.length === 0) {\n <div class=\"ngx-table-m3-empty\">{{ ngxTable.type }} \u062B\u0628\u062A \u0646\u0634\u062F\u0647 \u0627\u0633\u062A.</div>\n }\n</content>\n}\n", styles: ["content{display:block;direction:rtl;position:relative}\n"] }]
|
|
1499
1552
|
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: FilterService }, { type: ViewService }, { type: undefined, decorators: [{
|