@evotor-dev/ui-kit 8.3.0 → 8.5.0
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/esm2022/lib/components/evo-radio/evo-radio.component.mjs +7 -4
- package/esm2022/lib/components/evo-table/evo-table/evo-table.component.mjs +8 -3
- package/fesm2022/evotor-dev-ui-kit.mjs +12 -5
- package/fesm2022/evotor-dev-ui-kit.mjs.map +1 -1
- package/lib/components/evo-radio/evo-radio.component.d.ts +2 -1
- package/lib/components/evo-table/evo-table/evo-table.component.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Component, forwardRef, Input } from '@angular/core';
|
|
2
2
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
3
|
import { EvoBaseControl } from '../../common/evo-base-control';
|
|
4
|
+
import { isEqual } from 'lodash-es';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export class EvoRadioComponent extends EvoBaseControl {
|
|
6
7
|
constructor() {
|
|
@@ -9,7 +10,7 @@ export class EvoRadioComponent extends EvoBaseControl {
|
|
|
9
10
|
this.onTouch = () => { };
|
|
10
11
|
}
|
|
11
12
|
get checked() {
|
|
12
|
-
return this.control ? this.control.value
|
|
13
|
+
return this.control ? isEqual(this.control.value, this.value) || this.forceChecked : this.forceChecked;
|
|
13
14
|
}
|
|
14
15
|
handleOnChange() {
|
|
15
16
|
this.onChange(this.value);
|
|
@@ -28,7 +29,7 @@ export class EvoRadioComponent extends EvoBaseControl {
|
|
|
28
29
|
// eslint-disable-next-line
|
|
29
30
|
writeValue(obj) { }
|
|
30
31
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: EvoRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
31
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: EvoRadioComponent, isStandalone: true, selector: "evo-radio", inputs: { value: "value", name: "name" }, providers: [
|
|
32
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: EvoRadioComponent, isStandalone: true, selector: "evo-radio", inputs: { forceChecked: "forceChecked", value: "value", name: "name" }, providers: [
|
|
32
33
|
{
|
|
33
34
|
provide: NG_VALUE_ACCESSOR,
|
|
34
35
|
useExisting: forwardRef(() => EvoRadioComponent),
|
|
@@ -45,9 +46,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImpo
|
|
|
45
46
|
multi: true,
|
|
46
47
|
},
|
|
47
48
|
], standalone: true, template: "<label class=\"evo-radio\">\n <input\n type=\"radio\"\n class=\"evo-radio__input\"\n [name]=\"name\"\n [value]=\"value\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"handleOnChange()\"\n />\n <span class=\"evo-radio__element\"></span>\n <span class=\"evo-radio__content\">\n <ng-content />\n </span>\n</label>\n", styles: [":host{display:inline-block}.evo-radio{display:flex;align-items:center;cursor:pointer}.evo-radio__element{position:relative;display:block;flex:0 0 20px;width:20px;height:20px;margin:2px 8px 2px 2px;padding:4px;background-color:#fff;border:2px solid #C6C6C6;border-radius:50%;transition:background .3s,border-color .3s}.evo-radio__element:before{content:\"\";position:absolute;top:50%;left:50%;display:block;box-sizing:border-box;width:10px;height:10px;margin-top:-5px;margin-left:-5px;background-color:#0986e2;border-radius:50%;transform:scale(0);transform-origin:center;opacity:0;transition:background .3s,transform .3s}.evo-radio__input{display:none}.evo-radio__input[disabled]~.evo-radio__element{background-color:#f4f6f8}.evo-radio__input:checked[disabled]~.evo-radio__element{background-color:#fff}.evo-radio__input:checked[disabled]~.evo-radio__element:before{background-color:#c6c6c6}.evo-radio__input:checked~.evo-radio__element:before{transform:scale(1);opacity:1}.evo-radio__content{color:#212121;font-size:14px;line-height:22px;-webkit-user-select:none;user-select:none}\n"] }]
|
|
48
|
-
}], propDecorators: {
|
|
49
|
+
}], propDecorators: { forceChecked: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], value: [{
|
|
49
52
|
type: Input
|
|
50
53
|
}], name: [{
|
|
51
54
|
type: Input
|
|
52
55
|
}] } });
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZvLXJhZGlvLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2V2by11aS1raXQvc3JjL2xpYi9jb21wb25lbnRzL2V2by1yYWRpby9ldm8tcmFkaW8uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXZvLXVpLWtpdC9zcmMvbGliL2NvbXBvbmVudHMvZXZvLXJhZGlvL2V2by1yYWRpby5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDM0QsT0FBTyxFQUF1QixpQkFBaUIsRUFBQyxNQUFNLGdCQUFnQixDQUFDO0FBQ3ZFLE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSwrQkFBK0IsQ0FBQztBQUM3RCxPQUFPLEVBQUMsT0FBTyxFQUFDLE1BQU0sV0FBVyxDQUFDOztBQWVsQyxNQUFNLE9BQU8saUJBQWtCLFNBQVEsY0FBYztJQWJyRDs7UUFxQkksYUFBUSxHQUFHLENBQUMsQ0FBQyxFQUFFLEVBQUUsR0FBRSxDQUFDLENBQUM7UUFDckIsWUFBTyxHQUFHLEdBQUcsRUFBRSxHQUFFLENBQUMsQ0FBQztLQTBCdEI7SUF4QkcsSUFBSSxPQUFPO1FBQ1AsT0FBTyxJQ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uICAgIDxpbnB1dFxuICAgICAgICB0eXBlPVwicmFkaW9cIlxuICAgICAgICBjbGFzcz1cImV2by1yYWRpb19faW5wdXRcIlxuICAgICAgICBbbmFtZV09XCJuYW1lXCJcbiAgICAgICAgW3ZhbHVlXT1cInZhbHVlXCJcbiAgICAgICAgW2NoZWNrZWRdPVwiY2hlY2tlZFwiXG4gICAgICAgIFtkaXNhYmxlZF09XCJkaXNhYmxlZFwiXG4gICAgICAgIChjaGFuZ2UpPVwiaGFuZGxlT25DaGFuZ2UoKVwiXG4gICAgLz5cbiAgICA8c3BhbiBjbGFzcz1cImV2by1yYWRpb19fZWxlbWVudFwiPjwvc3Bhbj5cbiAgICA8c3BhbiBjbGFzcz1cImV2by1yYWRpb19fY29udGVudFwiPlxuICAgICAgICA8bmctY29udGVudCAvPlxuICAgIDwvc3Bhbj5cbjwvbGFiZWw+XG4iXX0=
|
|
@@ -41,17 +41,20 @@ export class EvoTableComponent {
|
|
|
41
41
|
getClasses(row, item) {
|
|
42
42
|
return typeof this.rowClasses === 'function' ? this.rowClasses(row, item) : this.rowClasses;
|
|
43
43
|
}
|
|
44
|
+
getTitle(row, item) {
|
|
45
|
+
return typeof this.rowTitle === 'function' ? this.rowTitle(row, item) : this.rowTitle;
|
|
46
|
+
}
|
|
44
47
|
filterColumns() {
|
|
45
48
|
if (this.visibleColumns && this.columns) {
|
|
46
49
|
this.filteredColumns = this.columns.filter((col) => this.visibleColumns.includes(col.prop));
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: EvoTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.10", type: EvoTableComponent, isStandalone: true, selector: "evo-table", inputs: { data: "data", showHeader: "showHeader", stripe: "stripe", visibleColumns: "visibleColumns", rowClasses: "rowClasses" }, outputs: { rowClick: "rowClick" }, queries: [{ propertyName: "columns", predicate: EvoTableColumnComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div
|
|
53
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.10", type: EvoTableComponent, isStandalone: true, selector: "evo-table", inputs: { data: "data", showHeader: "showHeader", stripe: "stripe", visibleColumns: "visibleColumns", rowClasses: "rowClasses", rowTitle: "rowTitle" }, outputs: { rowClick: "rowClick" }, queries: [{ propertyName: "columns", predicate: EvoTableColumnComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div\n class=\"evo-table__row\"\n [title]=\"getTitle(row, item) || ''\"\n [ngClass]=\"getClasses(row, item)\"\n (click)=\"onRowClick(row, item, $event)\"\n >\n @for (column of filteredColumns; track column.label; let col = $index) {\n <div class=\"evo-table__cell\" [ngClass]=\"column.className\">\n @if (column.label) {\n <div class=\"evo-table__label mobile-show\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n\n @if (column.content; as content) {\n <div class=\"evo-table__data\">\n <ng-container *ngTemplateOutlet=\"content; context: {row: row, col: col, item: item}\" />\n </div>\n } @else {\n {{ column.formatter(row, col, column.prop !== undefined ? item[column.prop] : item, item) }}\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [".evo-table{color:#212121}@media (min-width: 768px){.evo-table{display:table;width:100%}}.evo-table__row{padding:8px}.evo-table__row:nth-child(2n){background-color:#f4f6f8}@media (min-width: 768px){.evo-table__row{display:table-row}.evo-table__row:hover{background-color:#fff8e6}.evo-table__row_head:hover{background:none}}.evo-table__cell{margin-bottom:20px}.evo-table__cell:last-child{margin-bottom:0}@media (min-width: 768px){.evo-table__cell{display:table-cell;height:48px;padding:0 8px;vertical-align:middle}}.evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap}@media (min-width: 768px){.evo-table__cell.text-right{text-align:right}}@media (min-width: 768px){.evo-table__cell.text-center{text-align:center}}.evo-table__sort{position:relative;display:inline-block;padding-right:20px;vertical-align:top;cursor:pointer}.evo-table__sort_up:after,.evo-table__sort_down:after{content:\"\";position:absolute;right:0;border:5px solid transparent}.evo-table__sort_up:after{top:4px;border-bottom-color:#212121}.evo-table__sort_down:after{top:8px;border-top-color:#212121}.evo-table__label{margin-bottom:4px;font-weight:600}.evo-table_row-clickable .evo-table__row{cursor:pointer}:host(.evo-table_mobile) .evo-table__row{padding:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__row{display:table-row}:host(.evo-table_mobile) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile) .evo-table__row_head:hover{background:none}}:host(.evo-table_mobile) .evo-table__cell{display:flex;margin-bottom:0;padding:13px 8px}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}}:host(.evo-table_mobile) .evo-table__label{width:50%;margin-bottom:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__label{width:auto;margin-bottom:4px}}:host(.evo-table_mobile-align_right) .evo-table__cell{justify-content:space-between}:host(.evo-table_mobile_short) .evo-table{display:table;width:100%}:host(.evo-table_mobile_short) .evo-table__row{display:table-row;padding:16px}:host(.evo-table_mobile_short) .evo-table__row:nth-child(2n){background-color:#f4f6f8}:host(.evo-table_mobile_short) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile_short) .evo-table__row_head:hover{background:none}:host(.evo-table_mobile_short) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}:host(.evo-table_mobile_short) .evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap;border-top:none}:host(.evo-table_with-title) .evo-table__cell{font-weight:400}:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:600}@media (min-width: 768px){:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:400}}:host(.evo-table_with-title) .evo-table__cell:first-child .evo-table__label{display:none}:host(.evo-table_with-title) .evo-table__label{font-weight:400}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
51
54
|
}
|
|
52
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: EvoTableComponent, decorators: [{
|
|
53
56
|
type: Component,
|
|
54
|
-
args: [{ selector: 'evo-table', standalone: true, imports: [NgClass, NgTemplateOutlet], template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div
|
|
57
|
+
args: [{ selector: 'evo-table', standalone: true, imports: [NgClass, NgTemplateOutlet], template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div\n class=\"evo-table__row\"\n [title]=\"getTitle(row, item) || ''\"\n [ngClass]=\"getClasses(row, item)\"\n (click)=\"onRowClick(row, item, $event)\"\n >\n @for (column of filteredColumns; track column.label; let col = $index) {\n <div class=\"evo-table__cell\" [ngClass]=\"column.className\">\n @if (column.label) {\n <div class=\"evo-table__label mobile-show\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n\n @if (column.content; as content) {\n <div class=\"evo-table__data\">\n <ng-container *ngTemplateOutlet=\"content; context: {row: row, col: col, item: item}\" />\n </div>\n } @else {\n {{ column.formatter(row, col, column.prop !== undefined ? item[column.prop] : item, item) }}\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [".evo-table{color:#212121}@media (min-width: 768px){.evo-table{display:table;width:100%}}.evo-table__row{padding:8px}.evo-table__row:nth-child(2n){background-color:#f4f6f8}@media (min-width: 768px){.evo-table__row{display:table-row}.evo-table__row:hover{background-color:#fff8e6}.evo-table__row_head:hover{background:none}}.evo-table__cell{margin-bottom:20px}.evo-table__cell:last-child{margin-bottom:0}@media (min-width: 768px){.evo-table__cell{display:table-cell;height:48px;padding:0 8px;vertical-align:middle}}.evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap}@media (min-width: 768px){.evo-table__cell.text-right{text-align:right}}@media (min-width: 768px){.evo-table__cell.text-center{text-align:center}}.evo-table__sort{position:relative;display:inline-block;padding-right:20px;vertical-align:top;cursor:pointer}.evo-table__sort_up:after,.evo-table__sort_down:after{content:\"\";position:absolute;right:0;border:5px solid transparent}.evo-table__sort_up:after{top:4px;border-bottom-color:#212121}.evo-table__sort_down:after{top:8px;border-top-color:#212121}.evo-table__label{margin-bottom:4px;font-weight:600}.evo-table_row-clickable .evo-table__row{cursor:pointer}:host(.evo-table_mobile) .evo-table__row{padding:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__row{display:table-row}:host(.evo-table_mobile) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile) .evo-table__row_head:hover{background:none}}:host(.evo-table_mobile) .evo-table__cell{display:flex;margin-bottom:0;padding:13px 8px}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}}:host(.evo-table_mobile) .evo-table__label{width:50%;margin-bottom:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__label{width:auto;margin-bottom:4px}}:host(.evo-table_mobile-align_right) .evo-table__cell{justify-content:space-between}:host(.evo-table_mobile_short) .evo-table{display:table;width:100%}:host(.evo-table_mobile_short) .evo-table__row{display:table-row;padding:16px}:host(.evo-table_mobile_short) .evo-table__row:nth-child(2n){background-color:#f4f6f8}:host(.evo-table_mobile_short) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile_short) .evo-table__row_head:hover{background:none}:host(.evo-table_mobile_short) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}:host(.evo-table_mobile_short) .evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap;border-top:none}:host(.evo-table_with-title) .evo-table__cell{font-weight:400}:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:600}@media (min-width: 768px){:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:400}}:host(.evo-table_with-title) .evo-table__cell:first-child .evo-table__label{display:none}:host(.evo-table_with-title) .evo-table__label{font-weight:400}\n"] }]
|
|
55
58
|
}], propDecorators: { data: [{
|
|
56
59
|
type: Input
|
|
57
60
|
}], showHeader: [{
|
|
@@ -62,10 +65,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImpo
|
|
|
62
65
|
type: Input
|
|
63
66
|
}], rowClasses: [{
|
|
64
67
|
type: Input
|
|
68
|
+
}], rowTitle: [{
|
|
69
|
+
type: Input
|
|
65
70
|
}], rowClick: [{
|
|
66
71
|
type: Output
|
|
67
72
|
}], columns: [{
|
|
68
73
|
type: ContentChildren,
|
|
69
74
|
args: [EvoTableColumnComponent]
|
|
70
75
|
}] } });
|
|
71
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
76
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZvLXRhYmxlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2V2by11aS1raXQvc3JjL2xpYi9jb21wb25lbnRzL2V2by10YWJsZS9ldm8tdGFibGUvZXZvLXRhYmxlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2V2by11aS1raXQvc3JjL2xpYi9jb21wb25lbnRzL2V2by10YWJsZS9ldm8tdGFibGUvZXZvLXRhYmxlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFSCxTQUFTLEVBQ1QsZUFBZSxFQUNmLFlBQVksRUFDWixLQUFLLEVBR0wsTUFBTSxHQUVULE1BQU0sZUFBZSxDQUF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biAgICAgICAgICAgICAgICAgICAgQGlmIChjb2x1bW4uaGVhZGVyOyBhcyBoZWFkZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJoZWFkZXI7IGNvbnRleHQ6IHtsYWJlbDogY29sdW1uLmxhYmVsfVwiIC8+XG4gICAgICAgICAgICAgICAgICAgIH0gQGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAge3sgY29sdW1uLmxhYmVsIH19XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIH1cbiAgICAgICAgPC9kaXY+XG4gICAgfVxuXG4gICAgQGZvciAoaXRlbSBvZiBkYXRhOyB0cmFjayBpdGVtOyBsZXQgcm93ID0gJGluZGV4KSB7XG4gICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNsYXNzPVwiZXZvLXRhYmxlX19yb3dcIlxuICAgICAgICAgICAgW3RpdGxlXT1cImdldFRpdGxlKHJvdywgaXRlbSkgfHwgJydcIlxuICAgICAgICAgICAgW25nQ2xhc3NdPVwiZ2V0Q2xhc3Nlcyhyb3csIGl0ZW0pXCJcbiAgICAgICAgICAgIChjbGljayk9XCJvblJvd0NsaWNrKHJvdywgaXRlbSwgJGV2ZW50KVwiXG4gICAgICAgID5cbiAgICAgICAgICAgIEBmb3IgKGNvbHVtbiBvZiBmaWx0ZXJlZENvbHVtbnM7IHRyYWNrIGNvbHVtbi5sYWJlbDsgbGV0IGNvbCA9ICRpbmRleCkge1xuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJldm8tdGFibGVfX2NlbGxcIiBbbmdDbGFzc109XCJjb2x1bW4uY2xhc3NOYW1lXCI+XG4gICAgICAgICAgICAgICAgICAgIEBpZiAoY29sdW1uLmxhYmVsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZXZvLXRhYmxlX19sYWJlbCBtb2JpbGUtc2hvd1wiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBpZiAoY29sdW1uLmhlYWRlcjsgYXMgaGVhZGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJoZWFkZXI7IGNvbnRleHQ6IHtsYWJlbDogY29sdW1uLmxhYmVsfVwiIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBAZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7IGNvbHVtbi5sYWJlbCB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgQGlmIChjb2x1bW4uY29udGVudDsgYXMgY29udGVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImV2by10YWJsZV9fZGF0YVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJjb250ZW50OyBjb250ZXh0OiB7cm93OiByb3csIGNvbDogY29sLCBpdGVtOiBpdGVtfVwiIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgfSBAZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB7eyBjb2x1bW4uZm9ybWF0dGVyKHJvdywgY29sLCBjb2x1bW4ucHJvcCAhPT0gdW5kZWZpbmVkID8gaXRlbVtjb2x1bW4ucHJvcF0gOiBpdGVtLCBpdGVtKSB9fVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICB9XG4gICAgICAgIDwvZGl2PlxuICAgIH1cbjwvZGl2PlxuIl19
|
|
@@ -4011,7 +4011,7 @@ class EvoRadioComponent extends EvoBaseControl {
|
|
|
4011
4011
|
this.onTouch = () => { };
|
|
4012
4012
|
}
|
|
4013
4013
|
get checked() {
|
|
4014
|
-
return this.control ? this.control.value
|
|
4014
|
+
return this.control ? isEqual(this.control.value, this.value) || this.forceChecked : this.forceChecked;
|
|
4015
4015
|
}
|
|
4016
4016
|
handleOnChange() {
|
|
4017
4017
|
this.onChange(this.value);
|
|
@@ -4030,7 +4030,7 @@ class EvoRadioComponent extends EvoBaseControl {
|
|
|
4030
4030
|
// eslint-disable-next-line
|
|
4031
4031
|
writeValue(obj) { }
|
|
4032
4032
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: EvoRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4033
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: EvoRadioComponent, isStandalone: true, selector: "evo-radio", inputs: { value: "value", name: "name" }, providers: [
|
|
4033
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: EvoRadioComponent, isStandalone: true, selector: "evo-radio", inputs: { forceChecked: "forceChecked", value: "value", name: "name" }, providers: [
|
|
4034
4034
|
{
|
|
4035
4035
|
provide: NG_VALUE_ACCESSOR,
|
|
4036
4036
|
useExisting: forwardRef(() => EvoRadioComponent),
|
|
@@ -4047,7 +4047,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImpo
|
|
|
4047
4047
|
multi: true,
|
|
4048
4048
|
},
|
|
4049
4049
|
], standalone: true, template: "<label class=\"evo-radio\">\n <input\n type=\"radio\"\n class=\"evo-radio__input\"\n [name]=\"name\"\n [value]=\"value\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"handleOnChange()\"\n />\n <span class=\"evo-radio__element\"></span>\n <span class=\"evo-radio__content\">\n <ng-content />\n </span>\n</label>\n", styles: [":host{display:inline-block}.evo-radio{display:flex;align-items:center;cursor:pointer}.evo-radio__element{position:relative;display:block;flex:0 0 20px;width:20px;height:20px;margin:2px 8px 2px 2px;padding:4px;background-color:#fff;border:2px solid #C6C6C6;border-radius:50%;transition:background .3s,border-color .3s}.evo-radio__element:before{content:\"\";position:absolute;top:50%;left:50%;display:block;box-sizing:border-box;width:10px;height:10px;margin-top:-5px;margin-left:-5px;background-color:#0986e2;border-radius:50%;transform:scale(0);transform-origin:center;opacity:0;transition:background .3s,transform .3s}.evo-radio__input{display:none}.evo-radio__input[disabled]~.evo-radio__element{background-color:#f4f6f8}.evo-radio__input:checked[disabled]~.evo-radio__element{background-color:#fff}.evo-radio__input:checked[disabled]~.evo-radio__element:before{background-color:#c6c6c6}.evo-radio__input:checked~.evo-radio__element:before{transform:scale(1);opacity:1}.evo-radio__content{color:#212121;font-size:14px;line-height:22px;-webkit-user-select:none;user-select:none}\n"] }]
|
|
4050
|
-
}], propDecorators: {
|
|
4050
|
+
}], propDecorators: { forceChecked: [{
|
|
4051
|
+
type: Input
|
|
4052
|
+
}], value: [{
|
|
4051
4053
|
type: Input
|
|
4052
4054
|
}], name: [{
|
|
4053
4055
|
type: Input
|
|
@@ -4677,17 +4679,20 @@ class EvoTableComponent {
|
|
|
4677
4679
|
getClasses(row, item) {
|
|
4678
4680
|
return typeof this.rowClasses === 'function' ? this.rowClasses(row, item) : this.rowClasses;
|
|
4679
4681
|
}
|
|
4682
|
+
getTitle(row, item) {
|
|
4683
|
+
return typeof this.rowTitle === 'function' ? this.rowTitle(row, item) : this.rowTitle;
|
|
4684
|
+
}
|
|
4680
4685
|
filterColumns() {
|
|
4681
4686
|
if (this.visibleColumns && this.columns) {
|
|
4682
4687
|
this.filteredColumns = this.columns.filter((col) => this.visibleColumns.includes(col.prop));
|
|
4683
4688
|
}
|
|
4684
4689
|
}
|
|
4685
4690
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: EvoTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4686
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.10", type: EvoTableComponent, isStandalone: true, selector: "evo-table", inputs: { data: "data", showHeader: "showHeader", stripe: "stripe", visibleColumns: "visibleColumns", rowClasses: "rowClasses" }, outputs: { rowClick: "rowClick" }, queries: [{ propertyName: "columns", predicate: EvoTableColumnComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div
|
|
4691
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.10", type: EvoTableComponent, isStandalone: true, selector: "evo-table", inputs: { data: "data", showHeader: "showHeader", stripe: "stripe", visibleColumns: "visibleColumns", rowClasses: "rowClasses", rowTitle: "rowTitle" }, outputs: { rowClick: "rowClick" }, queries: [{ propertyName: "columns", predicate: EvoTableColumnComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div\n class=\"evo-table__row\"\n [title]=\"getTitle(row, item) || ''\"\n [ngClass]=\"getClasses(row, item)\"\n (click)=\"onRowClick(row, item, $event)\"\n >\n @for (column of filteredColumns; track column.label; let col = $index) {\n <div class=\"evo-table__cell\" [ngClass]=\"column.className\">\n @if (column.label) {\n <div class=\"evo-table__label mobile-show\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n\n @if (column.content; as content) {\n <div class=\"evo-table__data\">\n <ng-container *ngTemplateOutlet=\"content; context: {row: row, col: col, item: item}\" />\n </div>\n } @else {\n {{ column.formatter(row, col, column.prop !== undefined ? item[column.prop] : item, item) }}\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [".evo-table{color:#212121}@media (min-width: 768px){.evo-table{display:table;width:100%}}.evo-table__row{padding:8px}.evo-table__row:nth-child(2n){background-color:#f4f6f8}@media (min-width: 768px){.evo-table__row{display:table-row}.evo-table__row:hover{background-color:#fff8e6}.evo-table__row_head:hover{background:none}}.evo-table__cell{margin-bottom:20px}.evo-table__cell:last-child{margin-bottom:0}@media (min-width: 768px){.evo-table__cell{display:table-cell;height:48px;padding:0 8px;vertical-align:middle}}.evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap}@media (min-width: 768px){.evo-table__cell.text-right{text-align:right}}@media (min-width: 768px){.evo-table__cell.text-center{text-align:center}}.evo-table__sort{position:relative;display:inline-block;padding-right:20px;vertical-align:top;cursor:pointer}.evo-table__sort_up:after,.evo-table__sort_down:after{content:\"\";position:absolute;right:0;border:5px solid transparent}.evo-table__sort_up:after{top:4px;border-bottom-color:#212121}.evo-table__sort_down:after{top:8px;border-top-color:#212121}.evo-table__label{margin-bottom:4px;font-weight:600}.evo-table_row-clickable .evo-table__row{cursor:pointer}:host(.evo-table_mobile) .evo-table__row{padding:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__row{display:table-row}:host(.evo-table_mobile) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile) .evo-table__row_head:hover{background:none}}:host(.evo-table_mobile) .evo-table__cell{display:flex;margin-bottom:0;padding:13px 8px}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}}:host(.evo-table_mobile) .evo-table__label{width:50%;margin-bottom:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__label{width:auto;margin-bottom:4px}}:host(.evo-table_mobile-align_right) .evo-table__cell{justify-content:space-between}:host(.evo-table_mobile_short) .evo-table{display:table;width:100%}:host(.evo-table_mobile_short) .evo-table__row{display:table-row;padding:16px}:host(.evo-table_mobile_short) .evo-table__row:nth-child(2n){background-color:#f4f6f8}:host(.evo-table_mobile_short) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile_short) .evo-table__row_head:hover{background:none}:host(.evo-table_mobile_short) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}:host(.evo-table_mobile_short) .evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap;border-top:none}:host(.evo-table_with-title) .evo-table__cell{font-weight:400}:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:600}@media (min-width: 768px){:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:400}}:host(.evo-table_with-title) .evo-table__cell:first-child .evo-table__label{display:none}:host(.evo-table_with-title) .evo-table__label{font-weight:400}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
4687
4692
|
}
|
|
4688
4693
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: EvoTableComponent, decorators: [{
|
|
4689
4694
|
type: Component,
|
|
4690
|
-
args: [{ selector: 'evo-table', standalone: true, imports: [NgClass, NgTemplateOutlet], template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div
|
|
4695
|
+
args: [{ selector: 'evo-table', standalone: true, imports: [NgClass, NgTemplateOutlet], template: "<div class=\"evo-table\" [ngClass]=\"{'evo-table_row-clickable': states.isRowClickable}\">\n @if (showHeader) {\n <div class=\"evo-table__row evo-table__row_head mobile-hide\">\n @for (column of filteredColumns; track column.label) {\n <div class=\"evo-table__cell evo-table__cell_head\" [ngClass]=\"column.className\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n </div>\n }\n\n @for (item of data; track item; let row = $index) {\n <div\n class=\"evo-table__row\"\n [title]=\"getTitle(row, item) || ''\"\n [ngClass]=\"getClasses(row, item)\"\n (click)=\"onRowClick(row, item, $event)\"\n >\n @for (column of filteredColumns; track column.label; let col = $index) {\n <div class=\"evo-table__cell\" [ngClass]=\"column.className\">\n @if (column.label) {\n <div class=\"evo-table__label mobile-show\">\n @if (column.header; as header) {\n <ng-container *ngTemplateOutlet=\"header; context: {label: column.label}\" />\n } @else {\n {{ column.label }}\n }\n </div>\n }\n\n @if (column.content; as content) {\n <div class=\"evo-table__data\">\n <ng-container *ngTemplateOutlet=\"content; context: {row: row, col: col, item: item}\" />\n </div>\n } @else {\n {{ column.formatter(row, col, column.prop !== undefined ? item[column.prop] : item, item) }}\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [".evo-table{color:#212121}@media (min-width: 768px){.evo-table{display:table;width:100%}}.evo-table__row{padding:8px}.evo-table__row:nth-child(2n){background-color:#f4f6f8}@media (min-width: 768px){.evo-table__row{display:table-row}.evo-table__row:hover{background-color:#fff8e6}.evo-table__row_head:hover{background:none}}.evo-table__cell{margin-bottom:20px}.evo-table__cell:last-child{margin-bottom:0}@media (min-width: 768px){.evo-table__cell{display:table-cell;height:48px;padding:0 8px;vertical-align:middle}}.evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap}@media (min-width: 768px){.evo-table__cell.text-right{text-align:right}}@media (min-width: 768px){.evo-table__cell.text-center{text-align:center}}.evo-table__sort{position:relative;display:inline-block;padding-right:20px;vertical-align:top;cursor:pointer}.evo-table__sort_up:after,.evo-table__sort_down:after{content:\"\";position:absolute;right:0;border:5px solid transparent}.evo-table__sort_up:after{top:4px;border-bottom-color:#212121}.evo-table__sort_down:after{top:8px;border-top-color:#212121}.evo-table__label{margin-bottom:4px;font-weight:600}.evo-table_row-clickable .evo-table__row{cursor:pointer}:host(.evo-table_mobile) .evo-table__row{padding:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__row{display:table-row}:host(.evo-table_mobile) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile) .evo-table__row_head:hover{background:none}}:host(.evo-table_mobile) .evo-table__cell{display:flex;margin-bottom:0;padding:13px 8px}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}}:host(.evo-table_mobile) .evo-table__label{width:50%;margin-bottom:0}@media (min-width: 768px){:host(.evo-table_mobile) .evo-table__label{width:auto;margin-bottom:4px}}:host(.evo-table_mobile-align_right) .evo-table__cell{justify-content:space-between}:host(.evo-table_mobile_short) .evo-table{display:table;width:100%}:host(.evo-table_mobile_short) .evo-table__row{display:table-row;padding:16px}:host(.evo-table_mobile_short) .evo-table__row:nth-child(2n){background-color:#f4f6f8}:host(.evo-table_mobile_short) .evo-table__row:hover{background-color:#fff8e6}:host(.evo-table_mobile_short) .evo-table__row_head:hover{background:none}:host(.evo-table_mobile_short) .evo-table__cell{display:table-cell;height:52px;padding:11px 16px;vertical-align:middle}:host(.evo-table_mobile_short) .evo-table__cell_head{height:auto;padding-top:0;padding-bottom:16px;font-weight:600;white-space:nowrap;border-top:none}:host(.evo-table_with-title) .evo-table__cell{font-weight:400}:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:600}@media (min-width: 768px){:host(.evo-table_with-title) .evo-table__cell:first-child{font-weight:400}}:host(.evo-table_with-title) .evo-table__cell:first-child .evo-table__label{display:none}:host(.evo-table_with-title) .evo-table__label{font-weight:400}\n"] }]
|
|
4691
4696
|
}], propDecorators: { data: [{
|
|
4692
4697
|
type: Input
|
|
4693
4698
|
}], showHeader: [{
|
|
@@ -4698,6 +4703,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImpo
|
|
|
4698
4703
|
type: Input
|
|
4699
4704
|
}], rowClasses: [{
|
|
4700
4705
|
type: Input
|
|
4706
|
+
}], rowTitle: [{
|
|
4707
|
+
type: Input
|
|
4701
4708
|
}], rowClick: [{
|
|
4702
4709
|
type: Output
|
|
4703
4710
|
}], columns: [{
|