@webilix/ngx-table-m3 0.0.1 → 0.0.3
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 +142 -130
- package/fesm2022/webilix-ngx-table-m3.mjs.map +1 -1
- package/lib/columns/column.interface.d.ts +0 -2
- package/lib/filters/filter.component.d.ts +1 -0
- package/lib/filters/multi-select/filter-multi-select.component.d.ts +2 -0
- package/lib/filters/search/filter-search.component.d.ts +1 -0
- package/lib/filters/select/filter-select.component.d.ts +3 -0
- package/lib/ngx-table.component.d.ts +0 -2
- package/lib/ngx-table.config.d.ts +3 -29
- package/lib/views/action/view-action.component.d.ts +2 -1
- package/lib/views/card/toolbar/view-card-toolbar.component.d.ts +1 -0
- package/lib/views/card/view-card.component.d.ts +2 -2
- package/lib/views/pagination/view-pagination.component.d.ts +1 -0
- package/lib/views/table/view-table.component.d.ts +1 -0
- package/lib/views/value/view-value.component.d.ts +1 -0
- package/lib/views/view.interface.d.ts +2 -20
- package/ngx-table-m3.css +470 -0
- package/package.json +6 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Component, ViewChild, Injector, Injectable, Input,
|
|
3
|
-
import { NgClass, NgComponentOutlet, DecimalPipe } from '@angular/common';
|
|
2
|
+
import { InjectionToken, inject, Component, HostBinding, ViewChild, Injector, Injectable, Input, EventEmitter, Output, makeEnvironmentProviders, Optional, Inject } from '@angular/core';
|
|
4
3
|
import { Helper } from '@webilix/helper-library';
|
|
5
|
-
import { MatIcon } from '@angular/material/icon';
|
|
6
4
|
import * as i2 from '@webilix/ngx-helper-m3';
|
|
7
|
-
import { NGX_HELPER_CONTAINER_DATA, NGX_HELPER_CONTAINER_CLOSE, NgxHelperDatePipe, NgxHelperDurationPipe, NgxHelperMobilePipe, NgxHelperNumberPipe, NgxHelperMultiLinePipe } from '@webilix/ngx-helper-m3';
|
|
5
|
+
import { NGX_HELPER_CONTAINER_DATA, NGX_HELPER_CONTAINER_CLOSE, NgxHelperDatePipe, NgxHelperDurationPipe, NgxHelperMobilePipe, NgxHelperNumberPipe, NgxHelperMultiLinePipe, NgxHelperLoaderComponent } from '@webilix/ngx-helper-m3';
|
|
6
|
+
import { MatIcon } from '@angular/material/icon';
|
|
7
|
+
import { NgComponentOutlet, DecimalPipe } from '@angular/common';
|
|
8
8
|
import { MatButton, MatIconButton } from '@angular/material/button';
|
|
9
9
|
import { NgxCalendarDateComponent } from '@webilix/ngx-calendar-m3';
|
|
10
10
|
import { JalaliDateTime } from '@webilix/jalali-date-time';
|
|
@@ -30,10 +30,10 @@ class FilterDateComponent {
|
|
|
30
30
|
data = inject(FILTER_DATA);
|
|
31
31
|
value = inject(FILTER_VALUE);
|
|
32
32
|
onChange = inject(FILTER_CHANGE);
|
|
33
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
34
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.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"] }] });
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterDateComponent, decorators: [{
|
|
37
37
|
type: Component,
|
|
38
38
|
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" }]
|
|
39
39
|
}] });
|
|
@@ -65,9 +65,11 @@ class FilterDateMethods extends FilterMethods {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
class FilterMultiSelectComponent {
|
|
68
|
+
className = 'ngx-table-m3-filter';
|
|
68
69
|
data = inject(FILTER_DATA);
|
|
69
70
|
value = inject(FILTER_VALUE);
|
|
70
71
|
onChange = inject(FILTER_CHANGE);
|
|
72
|
+
searchQuery = '';
|
|
71
73
|
updateValue(id, checked) {
|
|
72
74
|
this.value = this.value || [];
|
|
73
75
|
if (!checked)
|
|
@@ -76,13 +78,16 @@ class FilterMultiSelectComponent {
|
|
|
76
78
|
this.value.push(id);
|
|
77
79
|
this.onChange(this.value.length === 0 ? undefined : this.value);
|
|
78
80
|
}
|
|
79
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
80
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
81
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterMultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.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-items\">\n <input\n type=\"text\"\n [placeholder]=\"'\u062C\u0633\u062A\u062C\u0648'\"\n [class.ngx-table-m3-en]=\"data.filter.english\"\n (input)=\"searchQuery = searchInput.value.trim()\"\n #searchInput\n />\n</div>\n}\n\n<div class=\"items\">\n @for (item of data.filter.options; track $index) {\n <!-- CHECK VIEW -->\n @if ((value || []).includes(item.id) || !searchQuery || item.title.includes(searchQuery)) {\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"] }] });
|
|
81
83
|
}
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterMultiSelectComponent, decorators: [{
|
|
83
85
|
type: Component,
|
|
84
|
-
args: [{ host: { selector: 'filter-multi-select' }, imports: [
|
|
85
|
-
}]
|
|
86
|
+
args: [{ host: { selector: 'filter-multi-select' }, imports: [MatCheckbox], template: "@if (data.filter.options.length > 20) {\n<div class=\"filter-items\">\n <input\n type=\"text\"\n [placeholder]=\"'\u062C\u0633\u062A\u062C\u0648'\"\n [class.ngx-table-m3-en]=\"data.filter.english\"\n (input)=\"searchQuery = searchInput.value.trim()\"\n #searchInput\n />\n</div>\n}\n\n<div class=\"items\">\n @for (item of data.filter.options; track $index) {\n <!-- CHECK VIEW -->\n @if ((value || []).includes(item.id) || !searchQuery || item.title.includes(searchQuery)) {\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" }]
|
|
87
|
+
}], propDecorators: { className: [{
|
|
88
|
+
type: HostBinding,
|
|
89
|
+
args: ['className']
|
|
90
|
+
}] } });
|
|
86
91
|
|
|
87
92
|
class FilterMultiSelectMethods extends FilterMethods {
|
|
88
93
|
toParam(value) {
|
|
@@ -111,6 +116,7 @@ class FilterMultiSelectMethods extends FilterMethods {
|
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
class FilterSearchComponent {
|
|
119
|
+
className = 'ngx-table-m3-filter';
|
|
114
120
|
searchInput;
|
|
115
121
|
data = inject(FILTER_DATA);
|
|
116
122
|
value = inject(FILTER_VALUE);
|
|
@@ -132,13 +138,16 @@ class FilterSearchComponent {
|
|
|
132
138
|
this.mode = mode;
|
|
133
139
|
this.onChange(this.query ? { query: this.query, mode: this.mode || 'PHRASE' } : undefined);
|
|
134
140
|
}
|
|
135
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
136
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
141
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
142
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.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=\"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=\"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"] }] });
|
|
137
143
|
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterSearchComponent, decorators: [{
|
|
139
145
|
type: Component,
|
|
140
|
-
args: [{ host: { selector: 'filter-search' }, imports: [
|
|
141
|
-
}], propDecorators: {
|
|
146
|
+
args: [{ host: { selector: 'filter-search' }, imports: [FormsModule, MatRadioButton, MatRadioGroup], template: "<div class=\"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=\"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" }]
|
|
147
|
+
}], propDecorators: { className: [{
|
|
148
|
+
type: HostBinding,
|
|
149
|
+
args: ['className']
|
|
150
|
+
}], searchInput: [{
|
|
142
151
|
type: ViewChild,
|
|
143
152
|
args: ['searchInput']
|
|
144
153
|
}] } });
|
|
@@ -172,16 +181,25 @@ class FilterSearchMethods extends FilterMethods {
|
|
|
172
181
|
}
|
|
173
182
|
|
|
174
183
|
class FilterSelectComponent {
|
|
184
|
+
className = 'ngx-table-m3-filter';
|
|
175
185
|
data = inject(FILTER_DATA);
|
|
176
186
|
value = inject(FILTER_VALUE);
|
|
177
187
|
onChange = inject(FILTER_CHANGE);
|
|
178
|
-
|
|
179
|
-
|
|
188
|
+
searchQuery = '';
|
|
189
|
+
updateValue(id) {
|
|
190
|
+
this.value = id;
|
|
191
|
+
this.onChange(this.value);
|
|
192
|
+
}
|
|
193
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
194
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.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-items\">\n <input\n type=\"text\"\n [placeholder]=\"'\u062C\u0633\u062A\u062C\u0648'\"\n [class.ngx-table-m3-en]=\"data.filter.english\"\n (input)=\"searchQuery = searchInput.value.trim()\"\n #searchInput\n />\n</div>\n}\n\n<div class=\"items\">\n <mat-radio-group (change)=\"updateValue($event.value)\">\n @for (item of data.filter.options; track $index) {\n <!-- CHECK VIEW -->\n @if (value === item.id || !searchQuery || item.title.includes(searchQuery)) {\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"] }] });
|
|
180
195
|
}
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterSelectComponent, decorators: [{
|
|
182
197
|
type: Component,
|
|
183
|
-
args: [{ host: { selector: 'filter-select' }, imports: [
|
|
184
|
-
}]
|
|
198
|
+
args: [{ host: { selector: 'filter-select' }, imports: [MatRadioButton, MatRadioGroup], template: "@if (data.filter.options.length > 20) {\n<div class=\"filter-items\">\n <input\n type=\"text\"\n [placeholder]=\"'\u062C\u0633\u062A\u062C\u0648'\"\n [class.ngx-table-m3-en]=\"data.filter.english\"\n (input)=\"searchQuery = searchInput.value.trim()\"\n #searchInput\n />\n</div>\n}\n\n<div class=\"items\">\n <mat-radio-group (change)=\"updateValue($event.value)\">\n @for (item of data.filter.options; track $index) {\n <!-- CHECK VIEW -->\n @if (value === item.id || !searchQuery || item.title.includes(searchQuery)) {\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" }]
|
|
199
|
+
}], propDecorators: { className: [{
|
|
200
|
+
type: HostBinding,
|
|
201
|
+
args: ['className']
|
|
202
|
+
}] } });
|
|
185
203
|
|
|
186
204
|
class FilterSelectMethods extends FilterMethods {
|
|
187
205
|
toParam(value) {
|
|
@@ -209,6 +227,7 @@ const FilterInfo = {
|
|
|
209
227
|
};
|
|
210
228
|
|
|
211
229
|
class FilterComponent {
|
|
230
|
+
className = 'ngx-table-m3-filter';
|
|
212
231
|
data = inject(NGX_HELPER_CONTAINER_DATA);
|
|
213
232
|
closeContainer = inject(NGX_HELPER_CONTAINER_CLOSE);
|
|
214
233
|
filterInfo = FilterInfo;
|
|
@@ -230,13 +249,16 @@ class FilterComponent {
|
|
|
230
249
|
if (event.code === 'Enter' && this.value)
|
|
231
250
|
this.closeContainer({ value: this.value });
|
|
232
251
|
}
|
|
233
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
234
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
252
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
253
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: FilterComponent, isStandalone: true, selector: "filter", host: { listeners: { "window:keydown": "onKeydown($event)" }, properties: { "className": "this.className" } }, ngImport: i0, template: "<content>\n <ng-container *ngComponentOutlet=\"filterInfo[data.filter.filter.type].component; injector: injector\"></ng-container>\n</content>\n\n<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</footer>\n", styles: [":host{display:flex;flex-direction:column}:host content{display:block;overflow-x:hidden;overflow-y:auto;max-height:60vh}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }] });
|
|
235
254
|
}
|
|
236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterComponent, decorators: [{
|
|
237
256
|
type: Component,
|
|
238
|
-
args: [{ selector: 'filter', host: { '(window:keydown)': 'onKeydown($event)' }, imports: [MatButton, NgComponentOutlet], template: "<content>\n <ng-container *ngComponentOutlet=\"filterInfo[data.filter.filter.type].component; injector: injector\"></ng-container>\n</content>\n\n<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</footer>\n", styles: [":host{display:flex;flex-direction:column}:host content{display:block;overflow-x:hidden;overflow-y:auto;max-height:60vh}
|
|
239
|
-
}]
|
|
257
|
+
args: [{ selector: 'filter', host: { '(window:keydown)': 'onKeydown($event)' }, imports: [MatButton, NgComponentOutlet], template: "<content>\n <ng-container *ngComponentOutlet=\"filterInfo[data.filter.filter.type].component; injector: injector\"></ng-container>\n</content>\n\n<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</footer>\n", styles: [":host{display:flex;flex-direction:column}:host content{display:block;overflow-x:hidden;overflow-y:auto;max-height:60vh}\n"] }]
|
|
258
|
+
}], propDecorators: { className: [{
|
|
259
|
+
type: HostBinding,
|
|
260
|
+
args: ['className']
|
|
261
|
+
}] } });
|
|
240
262
|
|
|
241
263
|
class FilterService {
|
|
242
264
|
activatedRoute;
|
|
@@ -278,15 +300,16 @@ class FilterService {
|
|
|
278
300
|
.bottomSheet((response) => resolve({ ...filter, value: response.value }), () => resolve(undefined));
|
|
279
301
|
});
|
|
280
302
|
}
|
|
281
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
282
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterService, deps: [{ token: i1$1.ActivatedRoute }, { token: i2.NgxHelperContainerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
304
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterService });
|
|
283
305
|
}
|
|
284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FilterService, decorators: [{
|
|
285
307
|
type: Injectable
|
|
286
308
|
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i2.NgxHelperContainerService }] });
|
|
287
309
|
|
|
288
310
|
class ViewActionComponent {
|
|
289
311
|
router;
|
|
312
|
+
className = 'ngx-table-m3-action';
|
|
290
313
|
actions;
|
|
291
314
|
item;
|
|
292
315
|
viewConfig;
|
|
@@ -312,25 +335,24 @@ class ViewActionComponent {
|
|
|
312
335
|
return;
|
|
313
336
|
let item = undefined;
|
|
314
337
|
const isDisabled = !!action.disableOn && action.disableOn(this.item);
|
|
315
|
-
const color = action.standalone ? this.viewConfig.actionButtonColor : this.viewConfig.actionMenuColor;
|
|
316
338
|
switch (action.type) {
|
|
317
339
|
case 'ACTION':
|
|
318
340
|
item = {
|
|
319
341
|
title: action.title,
|
|
320
342
|
icon: action.icon,
|
|
321
343
|
action: action.action,
|
|
322
|
-
color: action.color
|
|
344
|
+
color: action.color,
|
|
323
345
|
isDisabled,
|
|
324
346
|
};
|
|
325
347
|
break;
|
|
326
348
|
case 'UPDATE':
|
|
327
|
-
item = { title: 'ویرایش', icon: 'edit',
|
|
349
|
+
item = { title: 'ویرایش', icon: 'edit', action: action.action, isDisabled };
|
|
328
350
|
break;
|
|
329
351
|
case 'DELETE':
|
|
330
352
|
item = {
|
|
331
353
|
title: 'حذف',
|
|
332
354
|
icon: 'delete',
|
|
333
|
-
color:
|
|
355
|
+
color: 'var(--error)',
|
|
334
356
|
action: action.action,
|
|
335
357
|
isDisabled,
|
|
336
358
|
};
|
|
@@ -340,7 +362,7 @@ class ViewActionComponent {
|
|
|
340
362
|
item = {
|
|
341
363
|
title: isDeactive ? 'فعال کردن' : 'غیرفعال کردن',
|
|
342
364
|
icon: isDeactive ? 'check_box' : 'disabled_by_default',
|
|
343
|
-
color: isDeactive ?
|
|
365
|
+
color: isDeactive ? undefined : 'var(--error)',
|
|
344
366
|
action: (data) => action.action(data, isDeactive),
|
|
345
367
|
isDisabled,
|
|
346
368
|
};
|
|
@@ -349,7 +371,6 @@ class ViewActionComponent {
|
|
|
349
371
|
item = {
|
|
350
372
|
title: 'گزارش تغییرات',
|
|
351
373
|
icon: 'published_with_changes',
|
|
352
|
-
color,
|
|
353
374
|
action: action.action,
|
|
354
375
|
isDisabled,
|
|
355
376
|
};
|
|
@@ -367,13 +388,16 @@ class ViewActionComponent {
|
|
|
367
388
|
if (result)
|
|
368
389
|
this.router.navigate(result);
|
|
369
390
|
}
|
|
370
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
371
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
391
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewActionComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
392
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.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[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { 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"] }] });
|
|
372
393
|
}
|
|
373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewActionComponent, decorators: [{
|
|
374
395
|
type: Component,
|
|
375
|
-
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 [style.color]=\"item.isDisabled ? '' : item.color\"\n [
|
|
376
|
-
}], ctorParameters: () => [{ type: i1$1.Router }], propDecorators: {
|
|
396
|
+
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"] }]
|
|
397
|
+
}], ctorParameters: () => [{ type: i1$1.Router }], propDecorators: { className: [{
|
|
398
|
+
type: HostBinding,
|
|
399
|
+
args: ['className']
|
|
400
|
+
}], actions: [{
|
|
377
401
|
type: Input,
|
|
378
402
|
args: [{ required: true }]
|
|
379
403
|
}], item: [{
|
|
@@ -397,12 +421,12 @@ class ColumnDateComponent {
|
|
|
397
421
|
column = inject(COLUMN_TYPE);
|
|
398
422
|
value = inject(COLUMN_VALUE);
|
|
399
423
|
config = inject(COLUMN_CONFIG);
|
|
400
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
401
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
424
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColumnDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
425
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.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" }] });
|
|
402
426
|
}
|
|
403
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColumnDateComponent, decorators: [{
|
|
404
428
|
type: Component,
|
|
405
|
-
args: [{ host: { selector: 'column-date' }, imports: [
|
|
429
|
+
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" }]
|
|
406
430
|
}] });
|
|
407
431
|
|
|
408
432
|
class ColumnDateMethods extends ColumnMethods {
|
|
@@ -418,12 +442,12 @@ class ColumnDurationComponent {
|
|
|
418
442
|
column = inject(COLUMN_TYPE);
|
|
419
443
|
value = inject(COLUMN_VALUE);
|
|
420
444
|
config = inject(COLUMN_CONFIG);
|
|
421
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
422
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
445
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColumnDurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
446
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.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" }] });
|
|
423
447
|
}
|
|
424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColumnDurationComponent, decorators: [{
|
|
425
449
|
type: Component,
|
|
426
|
-
args: [{ host: { selector: 'column-duration' }, imports: [
|
|
450
|
+
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" }]
|
|
427
451
|
}] });
|
|
428
452
|
|
|
429
453
|
class ColumnDurationMethods extends ColumnMethods {
|
|
@@ -450,12 +474,12 @@ class ColumnMobileComponent {
|
|
|
450
474
|
column = inject(COLUMN_TYPE);
|
|
451
475
|
value = inject(COLUMN_VALUE);
|
|
452
476
|
config = inject(COLUMN_CONFIG);
|
|
453
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
454
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
477
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColumnMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
478
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.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" }] });
|
|
455
479
|
}
|
|
456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColumnMobileComponent, decorators: [{
|
|
457
481
|
type: Component,
|
|
458
|
-
args: [{ host: { selector: 'column-mobile' }, imports: [
|
|
482
|
+
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" }]
|
|
459
483
|
}] });
|
|
460
484
|
|
|
461
485
|
class ColumnMobileMethods extends ColumnMethods {
|
|
@@ -471,12 +495,12 @@ class ColumnNumberComponent {
|
|
|
471
495
|
column = inject(COLUMN_TYPE);
|
|
472
496
|
value = inject(COLUMN_VALUE);
|
|
473
497
|
config = inject(COLUMN_CONFIG);
|
|
474
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
475
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
498
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColumnNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
499
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.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" }] });
|
|
476
500
|
}
|
|
477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColumnNumberComponent, decorators: [{
|
|
478
502
|
type: Component,
|
|
479
|
-
args: [{ host: { selector: 'column-number' }, imports: [
|
|
503
|
+
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" }]
|
|
480
504
|
}] });
|
|
481
505
|
|
|
482
506
|
class ColumnNumberMethods extends ColumnMethods {
|
|
@@ -492,12 +516,12 @@ class ColumnTextComponent {
|
|
|
492
516
|
column = inject(COLUMN_TYPE);
|
|
493
517
|
value = inject(COLUMN_VALUE);
|
|
494
518
|
config = inject(COLUMN_CONFIG);
|
|
495
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
496
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
519
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColumnTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
520
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.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: [""] });
|
|
497
521
|
}
|
|
498
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ColumnTextComponent, decorators: [{
|
|
499
523
|
type: Component,
|
|
500
|
-
args: [{ host: { selector: 'column-text' }, imports: [
|
|
524
|
+
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" }]
|
|
501
525
|
}] });
|
|
502
526
|
|
|
503
527
|
class ColumnTextMethods extends ColumnMethods {
|
|
@@ -519,6 +543,7 @@ const ColumnInfo = {
|
|
|
519
543
|
|
|
520
544
|
class ViewValueComponent {
|
|
521
545
|
router;
|
|
546
|
+
className = 'ngx-table-m3-value';
|
|
522
547
|
textAlign = 'left';
|
|
523
548
|
column;
|
|
524
549
|
item;
|
|
@@ -556,9 +581,7 @@ class ViewValueComponent {
|
|
|
556
581
|
? this.column.english(this.item)
|
|
557
582
|
: this.column.english
|
|
558
583
|
: false,
|
|
559
|
-
enClass: this.viewConfig.enClass,
|
|
560
584
|
isDeactive: !!this.isDeactive,
|
|
561
|
-
deactiveClass: this.viewConfig.deactiveClass,
|
|
562
585
|
};
|
|
563
586
|
this.injector = Injector.create({
|
|
564
587
|
providers: [
|
|
@@ -613,13 +636,16 @@ class ViewValueComponent {
|
|
|
613
636
|
this.copyTimeout = undefined;
|
|
614
637
|
}, 2000);
|
|
615
638
|
}
|
|
616
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
617
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
639
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewValueComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
640
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.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=\"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", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "ngmodule", type: ClipboardModule }, { kind: "directive", type: i2$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
618
641
|
}
|
|
619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewValueComponent, decorators: [{
|
|
620
643
|
type: Component,
|
|
621
|
-
args: [{ selector: 'view-value', imports: [
|
|
622
|
-
}], ctorParameters: () => [{ type: i1$1.Router }], propDecorators: {
|
|
644
|
+
args: [{ selector: 'view-value', imports: [NgComponentOutlet, ClipboardModule, MatIcon], template: "<!-- EMPTY VALUE -->\n@if (value === undefined) { }\n\n<!-- SHOW VALUE -->\n@else {\n<div class=\"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" }]
|
|
645
|
+
}], ctorParameters: () => [{ type: i1$1.Router }], propDecorators: { className: [{
|
|
646
|
+
type: HostBinding,
|
|
647
|
+
args: ['className']
|
|
648
|
+
}], textAlign: [{
|
|
623
649
|
type: HostBinding,
|
|
624
650
|
args: ['style.text-align']
|
|
625
651
|
}], column: [{
|
|
@@ -724,14 +750,15 @@ class ViewService {
|
|
|
724
750
|
}
|
|
725
751
|
return orders;
|
|
726
752
|
}
|
|
727
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
728
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.
|
|
753
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewService, deps: [{ token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
754
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewService });
|
|
729
755
|
}
|
|
730
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
756
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewService, decorators: [{
|
|
731
757
|
type: Injectable
|
|
732
758
|
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }] });
|
|
733
759
|
|
|
734
760
|
class ViewCardToolbarComponent {
|
|
761
|
+
className = 'ngx-table-m3-card-view-toolbar';
|
|
735
762
|
orders;
|
|
736
763
|
filters;
|
|
737
764
|
viewConfig;
|
|
@@ -783,13 +810,16 @@ class ViewCardToolbarComponent {
|
|
|
783
810
|
break;
|
|
784
811
|
}
|
|
785
812
|
}
|
|
786
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
787
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
813
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewCardToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
814
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.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\"\n [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"viewConfig.stickyView?.top?.mobileView || undefined\"\n (mousedown)=\"swipe($event, 'START', toolbar, toolbarContainer)\"\n (mousemove)=\"swipe($event, 'MOVE', toolbar, toolbarContainer)\"\n (mouseup)=\"swipe($event, 'END', toolbar, toolbarContainer)\"\n (touchstart)=\"swipe($event, 'START', toolbar, toolbarContainer)\"\n (touchmove)=\"swipe($event, 'MOVE', toolbar, toolbarContainer)\"\n (touchend)=\"swipe($event, 'END', toolbar, toolbarContainer)\"\n #toolbar\n>\n <div class=\"toolbar-items\" #toolbarContainer>\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]=\"'before'\" 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=\"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"] }] });
|
|
788
815
|
}
|
|
789
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewCardToolbarComponent, decorators: [{
|
|
790
817
|
type: Component,
|
|
791
|
-
args: [{ selector: 'view-card-toolbar', imports: [MatDivider, MatIcon, MatMenuModule], template: "<div\n class=\"toolbar\"\n [style.
|
|
792
|
-
}], propDecorators: {
|
|
818
|
+
args: [{ selector: 'view-card-toolbar', imports: [MatDivider, MatIcon, MatMenuModule], template: "<div\n class=\"toolbar\"\n [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\"\n [style.top]=\"viewConfig.stickyView?.top?.mobileView || undefined\"\n (mousedown)=\"swipe($event, 'START', toolbar, toolbarContainer)\"\n (mousemove)=\"swipe($event, 'MOVE', toolbar, toolbarContainer)\"\n (mouseup)=\"swipe($event, 'END', toolbar, toolbarContainer)\"\n (touchstart)=\"swipe($event, 'START', toolbar, toolbarContainer)\"\n (touchmove)=\"swipe($event, 'MOVE', toolbar, toolbarContainer)\"\n (touchend)=\"swipe($event, 'END', toolbar, toolbarContainer)\"\n #toolbar\n>\n <div class=\"toolbar-items\" #toolbarContainer>\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]=\"'before'\" 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=\"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"] }]
|
|
819
|
+
}], propDecorators: { className: [{
|
|
820
|
+
type: HostBinding,
|
|
821
|
+
args: ['className']
|
|
822
|
+
}], orders: [{
|
|
793
823
|
type: Input,
|
|
794
824
|
args: [{ required: true }]
|
|
795
825
|
}], filters: [{
|
|
@@ -809,7 +839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
809
839
|
class ViewCardComponent {
|
|
810
840
|
filterService;
|
|
811
841
|
viewService;
|
|
812
|
-
|
|
842
|
+
className = 'ngx-table-m3-card-view';
|
|
813
843
|
ngxTable;
|
|
814
844
|
data;
|
|
815
845
|
viewConfig;
|
|
@@ -827,7 +857,7 @@ class ViewCardComponent {
|
|
|
827
857
|
orders;
|
|
828
858
|
filters;
|
|
829
859
|
hasToolbar = false;
|
|
830
|
-
|
|
860
|
+
top = '';
|
|
831
861
|
hasContent;
|
|
832
862
|
constructor(filterService, viewService) {
|
|
833
863
|
this.filterService = filterService;
|
|
@@ -845,8 +875,8 @@ class ViewCardComponent {
|
|
|
845
875
|
this.orders = this.viewService.getOrders(this.ngxTable);
|
|
846
876
|
this.filters = this.filterService.getFilters(this.ngxTable);
|
|
847
877
|
this.hasToolbar = Object.keys(this.orders).length > 0 || Object.keys(this.filters).length > 0;
|
|
848
|
-
const top = this.viewConfig.stickyView?.
|
|
849
|
-
this.
|
|
878
|
+
const top = this.viewConfig.stickyView?.top?.mobileView;
|
|
879
|
+
this.top = top ? (this.hasToolbar ? `calc(${top} + var(--ngx-table-m3-toolbar-height) + 1rem + 2px)` : top) : '';
|
|
850
880
|
this.hasContent = this.ngxTable.columns.some((_, index) => index != this.titleIndex && index !== this.subTitleIndex);
|
|
851
881
|
}
|
|
852
882
|
updateFilter(id) {
|
|
@@ -860,15 +890,15 @@ class ViewCardComponent {
|
|
|
860
890
|
this.filterChanged.next({ id, value: filter.value });
|
|
861
891
|
});
|
|
862
892
|
}
|
|
863
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
864
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
893
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewCardComponent, deps: [{ token: FilterService }, { token: ViewService }], target: i0.ɵɵFactoryTarget.Component });
|
|
894
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.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=\"data\">\n @for (item of data; track $index; let dataIndex = $index) {\n <div class=\"card\">\n <header [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\" [style.top]=\"top\">\n <!-- ICON -->\n @if (hasIcon) {\n <mat-icon class=\"icon\" [style.color]=\"icons[$index].color\" [style.font-size]=\"viewConfig.iconSize\">\n {{ icons[$index].icon }}\n </mat-icon>\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) {\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 </header>\n\n <!-- CONTENT -->\n @if (hasContent) {\n <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 }}:</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 </content>\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: "pipe", type: NgxHelperMultiLinePipe, name: "ngxHelperMultiLine" }, { 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"] }] });
|
|
865
895
|
}
|
|
866
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewCardComponent, decorators: [{
|
|
867
897
|
type: Component,
|
|
868
|
-
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=\"data\">\n @for (item of data; track $index; let dataIndex = $index) {\n <
|
|
869
|
-
}], ctorParameters: () => [{ type: FilterService }, { type: ViewService }], propDecorators: {
|
|
898
|
+
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=\"data\">\n @for (item of data; track $index; let dataIndex = $index) {\n <div class=\"card\">\n <header [style.position]=\"viewConfig.stickyView?.top ? 'sticky' : 'static'\" [style.top]=\"top\">\n <!-- ICON -->\n @if (hasIcon) {\n <mat-icon class=\"icon\" [style.color]=\"icons[$index].color\" [style.font-size]=\"viewConfig.iconSize\">\n {{ icons[$index].icon }}\n </mat-icon>\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) {\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 </header>\n\n <!-- CONTENT -->\n @if (hasContent) {\n <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 }}:</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 </content>\n }\n </div>\n }\n</div>\n" }]
|
|
899
|
+
}], ctorParameters: () => [{ type: FilterService }, { type: ViewService }], propDecorators: { className: [{
|
|
870
900
|
type: HostBinding,
|
|
871
|
-
args: ['
|
|
901
|
+
args: ['className']
|
|
872
902
|
}], ngxTable: [{
|
|
873
903
|
type: Input,
|
|
874
904
|
args: [{ required: true }]
|
|
@@ -888,6 +918,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
888
918
|
|
|
889
919
|
class ViewPaginationComponent {
|
|
890
920
|
elementRef;
|
|
921
|
+
className = 'ngx-table-m3-pagination';
|
|
891
922
|
stylePosition;
|
|
892
923
|
styleBottom;
|
|
893
924
|
type;
|
|
@@ -929,13 +960,16 @@ class ViewPaginationComponent {
|
|
|
929
960
|
const parentHeight = element.parentElement?.offsetHeight;
|
|
930
961
|
this.hasShadow = !!parentHeight && elementPosition < parentHeight;
|
|
931
962
|
}
|
|
932
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
933
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
963
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewPaginationComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
964
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.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: "<content [class.desktop-view]=\"!isMobile\" [class.mobile-view]=\"isMobile\" [class.has-shadow]=\"hasShadow\">\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</content>\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: "pipe", type: DecimalPipe, name: "number" }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { 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"] }] });
|
|
934
965
|
}
|
|
935
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewPaginationComponent, decorators: [{
|
|
936
967
|
type: Component,
|
|
937
|
-
args: [{ selector: 'view-pagination', host: { '(window:scroll)': 'onScroll($event)' }, imports: [DecimalPipe, MatIconButton, MatIcon, MatMenuModule], template: "<content
|
|
938
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
|
968
|
+
args: [{ selector: 'view-pagination', host: { '(window:scroll)': 'onScroll($event)' }, imports: [DecimalPipe, MatIconButton, MatIcon, MatMenuModule], template: "<content [class.desktop-view]=\"!isMobile\" [class.mobile-view]=\"isMobile\" [class.has-shadow]=\"hasShadow\">\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</content>\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"] }]
|
|
969
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { className: [{
|
|
970
|
+
type: HostBinding,
|
|
971
|
+
args: ['className']
|
|
972
|
+
}], stylePosition: [{
|
|
939
973
|
type: HostBinding,
|
|
940
974
|
args: ['style.position']
|
|
941
975
|
}], styleBottom: [{
|
|
@@ -963,6 +997,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
963
997
|
class ViewTableComponent {
|
|
964
998
|
viewService;
|
|
965
999
|
filterService;
|
|
1000
|
+
className = 'ngx-table-m3-table-view';
|
|
966
1001
|
ngxTable;
|
|
967
1002
|
data;
|
|
968
1003
|
viewConfig;
|
|
@@ -1028,21 +1063,24 @@ class ViewTableComponent {
|
|
|
1028
1063
|
this.filters[id] = { ...this.filters[id], value: undefined };
|
|
1029
1064
|
this.filterChanged.next({ id, value: undefined });
|
|
1030
1065
|
}
|
|
1031
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
1032
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
1066
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewTableComponent, deps: [{ token: ViewService }, { token: FilterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1067
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.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 class=\"column\">\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 <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\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: "pipe", type: NgxHelperMultiLinePipe, name: "ngxHelperMultiLine" }, { 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"] }], animations: [
|
|
1033
1068
|
trigger('toolbar', [
|
|
1034
1069
|
transition(':enter', [style({ opacity: 0, height: 0 }), animate('150ms', style({ opacity: 1, height: '*' }))]),
|
|
1035
1070
|
]),
|
|
1036
1071
|
] });
|
|
1037
1072
|
}
|
|
1038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
1073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ViewTableComponent, decorators: [{
|
|
1039
1074
|
type: Component,
|
|
1040
|
-
args: [{ selector: 'view-table', imports: [
|
|
1075
|
+
args: [{ selector: 'view-table', imports: [MatIcon, NgxHelperMultiLinePipe, ViewActionComponent, ViewValueComponent], providers: [FilterService, ViewService], animations: [
|
|
1041
1076
|
trigger('toolbar', [
|
|
1042
1077
|
transition(':enter', [style({ opacity: 0, height: 0 }), animate('150ms', style({ opacity: 1, height: '*' }))]),
|
|
1043
1078
|
]),
|
|
1044
|
-
], template: "<table [cellPadding]=\"0\" [cellSpacing]=\"0\" [width]=\"'100%'\" [border]=\"0\">\n <!-- HEADER -->\n\n <thead\n [style.
|
|
1045
|
-
}], ctorParameters: () => [{ type: ViewService }, { type: FilterService }], propDecorators: {
|
|
1079
|
+
], 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 class=\"column\">\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 <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\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" }]
|
|
1080
|
+
}], ctorParameters: () => [{ type: ViewService }, { type: FilterService }], propDecorators: { className: [{
|
|
1081
|
+
type: HostBinding,
|
|
1082
|
+
args: ['className']
|
|
1083
|
+
}], ngxTable: [{
|
|
1046
1084
|
type: Input,
|
|
1047
1085
|
args: [{ required: true }]
|
|
1048
1086
|
}], data: [{
|
|
@@ -1077,8 +1115,6 @@ class NgxTableComponent {
|
|
|
1077
1115
|
pagination;
|
|
1078
1116
|
filterChanged = new EventEmitter();
|
|
1079
1117
|
isMobile = false;
|
|
1080
|
-
loaderClass;
|
|
1081
|
-
emptyClass;
|
|
1082
1118
|
viewConfig;
|
|
1083
1119
|
filter;
|
|
1084
1120
|
hasFilter = false;
|
|
@@ -1124,8 +1160,6 @@ class NgxTableComponent {
|
|
|
1124
1160
|
...this.ngxTable,
|
|
1125
1161
|
columns: this.ngxTable.columns.map((column) => ColumnInfo[column.type].methods.column(column)),
|
|
1126
1162
|
};
|
|
1127
|
-
this.loaderClass = this.config?.cssClasses?.loader || 'ngx-table-loader';
|
|
1128
|
-
this.emptyClass = this.config?.cssClasses?.empty || 'ngx-table-empty';
|
|
1129
1163
|
const getStickyView = (config) => {
|
|
1130
1164
|
return {
|
|
1131
1165
|
desktopView: typeof config === 'string' ? config : config.desktopView,
|
|
@@ -1135,33 +1169,11 @@ class NgxTableComponent {
|
|
|
1135
1169
|
this.viewConfig = {
|
|
1136
1170
|
alternateRows: !!this.config?.alternateRows,
|
|
1137
1171
|
iconSize: `${this.config?.iconSize || 24}px`,
|
|
1138
|
-
|
|
1139
|
-
deactiveClass: this.config?.cssClasses?.deactive || 'ngx-table-deactive',
|
|
1140
|
-
borderColor: this.config?.colors?.border || 'var(--outline-variant)',
|
|
1141
|
-
backgroundColor: this.config?.colors?.background || 'var(--background)',
|
|
1142
|
-
headerTextColor: this.config?.colors?.headerText || '',
|
|
1143
|
-
headerBackgroundColor: this.config?.colors?.headerBackground || 'var(--surface-container-highest)',
|
|
1144
|
-
oddRowsBackgroundColor: this.config?.colors?.oddRowsBackground || 'var(--background)',
|
|
1145
|
-
evenRowsBackgroundColor: this.config?.colors?.evenRowsBackground || 'var(--surface-container)',
|
|
1146
|
-
cardBackgroundColor: this.config?.colors?.cardBackground || 'var(--surface-container-high)',
|
|
1147
|
-
paginationBackgroundColor: this.config?.colors?.paginationBackground || 'var(--background)',
|
|
1148
|
-
highlightText: this.config?.colors?.highlightText || 'var(--secondary)',
|
|
1149
|
-
highlightBackground: this.config?.colors?.highlightBackground || 'var(--secondary-container)',
|
|
1150
|
-
inputText: this.config?.colors?.inputText || 'var(--on-surface)',
|
|
1151
|
-
inputBackground: this.config?.colors?.inputBackground || 'var(--surface-container-highest)',
|
|
1152
|
-
actionButtonSize: this.config?.action?.buttonSize || '90%',
|
|
1153
|
-
actionButtonColor: this.config?.action?.buttonColor || 'var(--primary)',
|
|
1154
|
-
actionMenuColor: this.config?.action?.buttonColor || '',
|
|
1155
|
-
actionWarnColor: this.config?.action?.warnColor || 'var(--error)',
|
|
1156
|
-
actionMenuTitle: this.config?.action?.menuTitle || 'امکانات',
|
|
1172
|
+
actionMenuTitle: this.config?.actionMenuTitle || 'امکانات',
|
|
1157
1173
|
stickyView: this.config?.stickyView
|
|
1158
1174
|
? {
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
: undefined,
|
|
1162
|
-
paginationBottom: this.config.stickyView.paginationBottom
|
|
1163
|
-
? getStickyView(this.config.stickyView.paginationBottom)
|
|
1164
|
-
: undefined,
|
|
1175
|
+
top: this.config.stickyView.top ? getStickyView(this.config.stickyView.top) : undefined,
|
|
1176
|
+
bottom: this.config.stickyView.bottom ? getStickyView(this.config.stickyView.bottom) : undefined,
|
|
1165
1177
|
}
|
|
1166
1178
|
: undefined,
|
|
1167
1179
|
};
|
|
@@ -1219,12 +1231,12 @@ class NgxTableComponent {
|
|
|
1219
1231
|
this.setQueryParams();
|
|
1220
1232
|
this.filterChanged.next(this.filter);
|
|
1221
1233
|
}
|
|
1222
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
1223
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
1234
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.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 });
|
|
1235
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.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 && 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 && (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"] }, { 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"] }] });
|
|
1224
1236
|
}
|
|
1225
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
1237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: NgxTableComponent, decorators: [{
|
|
1226
1238
|
type: Component,
|
|
1227
|
-
args: [{ selector: 'ngx-table', host: { '(window:resize)': 'onResize($event)' }, imports: [
|
|
1239
|
+
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 && 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 && (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"] }]
|
|
1228
1240
|
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: FilterService }, { type: ViewService }, { type: undefined, decorators: [{
|
|
1229
1241
|
type: Optional
|
|
1230
1242
|
}, {
|