@acorex/components 7.24.4 → 17.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/common/lib/classes/datasource.class.d.ts +2 -0
- package/data-table/index.d.ts +3 -2
- package/data-table/lib/base-data-table.class.d.ts +25 -0
- package/data-table/lib/columns/row-command-column.component.d.ts +2 -2
- package/data-table/lib/data-table/data-table.component.d.ts +52 -0
- package/data-table/lib/data-table.module.d.ts +21 -18
- package/data-table/lib/{data-table.component.d.ts → infinite-scroll-data-table/infinite-scroll-data-table.component.d.ts} +8 -22
- package/esm2022/button/lib/button.component.mjs +2 -2
- package/esm2022/common/lib/classes/datasource.class.mjs +8 -2
- package/esm2022/common/lib/components/selection-base.component.class.mjs +12 -35
- package/esm2022/data-pager/lib/data-pager.component.mjs +7 -11
- package/esm2022/data-table/index.mjs +4 -3
- package/esm2022/data-table/lib/base-data-table.class.mjs +36 -0
- package/esm2022/data-table/lib/columns/row-command-column.component.mjs +57 -69
- package/esm2022/data-table/lib/columns/row-index-column.component.mjs +7 -21
- package/esm2022/data-table/lib/columns/row-select-column.component.mjs +6 -18
- package/esm2022/data-table/lib/data-table/data-table.component.mjs +233 -0
- package/esm2022/data-table/lib/data-table.module.mjs +24 -7
- package/esm2022/data-table/lib/infinite-scroll-data-table/infinite-scroll-data-table.component.mjs +272 -0
- package/esm2022/drawer/lib/drawer.component.mjs +2 -2
- package/esm2022/menu/lib/menu-item/menu-item.component.mjs +3 -3
- package/esm2022/menu/lib/menu.component.mjs +2 -2
- package/esm2022/otp/lib/otp.component.mjs +2 -2
- package/esm2022/phone-box/lib/phone-box.component.mjs +25 -42
- package/esm2022/phone-box/lib/phone-box.module.mjs +20 -3
- package/esm2022/select-box/lib/select-box.component.mjs +2 -2
- package/esm2022/text-area/lib/text-area.component.mjs +6 -22
- package/fesm2022/acorex-components-button.mjs +2 -2
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +18 -35
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +5 -9
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +684 -470
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +2 -2
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +4 -4
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +2 -2
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +45 -44
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +2 -2
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +5 -21
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/package.json +7 -13
- package/phone-box/lib/phone-box.component.d.ts +4 -13
- package/phone-box/lib/phone-box.module.d.ts +2 -1
- package/text-area/lib/text-area.component.d.ts +0 -1
- package/data-table-2/README.md +0 -3
- package/data-table-2/index.d.ts +0 -8
- package/data-table-2/lib/columns/data-table-column-resizable.directive.d.ts +0 -22
- package/data-table-2/lib/columns/data-table-column.d.ts +0 -22
- package/data-table-2/lib/columns/data-text-column.component.d.ts +0 -18
- package/data-table-2/lib/columns/row-command-column.component.d.ts +0 -40
- package/data-table-2/lib/columns/row-index-column.component.d.ts +0 -18
- package/data-table-2/lib/columns/row-select-column.component.d.ts +0 -14
- package/data-table-2/lib/data-table-2.component.d.ts +0 -61
- package/data-table-2/lib/data-table-2.module.d.ts +0 -24
- package/esm2022/data-table/lib/data-table.component.mjs +0 -290
- package/esm2022/data-table-2/acorex-components-data-table-2.mjs +0 -5
- package/esm2022/data-table-2/index.mjs +0 -9
- package/esm2022/data-table-2/lib/columns/data-table-column-resizable.directive.mjs +0 -59
- package/esm2022/data-table-2/lib/columns/data-table-column.mjs +0 -42
- package/esm2022/data-table-2/lib/columns/data-text-column.component.mjs +0 -81
- package/esm2022/data-table-2/lib/columns/row-command-column.component.mjs +0 -231
- package/esm2022/data-table-2/lib/columns/row-index-column.component.mjs +0 -71
- package/esm2022/data-table-2/lib/columns/row-select-column.component.mjs +0 -61
- package/esm2022/data-table-2/lib/data-table-2.component.mjs +0 -211
- package/esm2022/data-table-2/lib/data-table-2.module.mjs +0 -94
- package/fesm2022/acorex-components-data-table-2.mjs +0 -822
- package/fesm2022/acorex-components-data-table-2.mjs.map +0 -1
@@ -1,42 +0,0 @@
|
|
1
|
-
import { Injectable, Input, TemplateRef } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export class AXDataTableColumnComponent {
|
4
|
-
constructor() {
|
5
|
-
this.width = 'auto';
|
6
|
-
this.allowSorting = false;
|
7
|
-
this.allowResizing = false;
|
8
|
-
this.sortIndex = undefined;
|
9
|
-
this.sortOrder = undefined;
|
10
|
-
}
|
11
|
-
get cssClass() {
|
12
|
-
return null;
|
13
|
-
}
|
14
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDataTableColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
15
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDataTableColumnComponent }); }
|
16
|
-
}
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDataTableColumnComponent, decorators: [{
|
18
|
-
type: Injectable
|
19
|
-
}], propDecorators: { caption: [{
|
20
|
-
type: Input
|
21
|
-
}], width: [{
|
22
|
-
type: Input
|
23
|
-
}], fixed: [{
|
24
|
-
type: Input
|
25
|
-
}], stickyEnd: [{
|
26
|
-
type: Input
|
27
|
-
}], stickyStart: [{
|
28
|
-
type: Input
|
29
|
-
}], allowSorting: [{
|
30
|
-
type: Input
|
31
|
-
}], allowResizing: [{
|
32
|
-
type: Input
|
33
|
-
}], sortIndex: [{
|
34
|
-
type: Input
|
35
|
-
}], sortOrder: [{
|
36
|
-
type: Input
|
37
|
-
}], headerTemplate: [{
|
38
|
-
type: Input
|
39
|
-
}], cellTemplate: [{
|
40
|
-
type: Input
|
41
|
-
}] } });
|
42
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS10YWJsZS1jb2x1bW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvZGF0YS10YWJsZS0yL3NyYy9saWIvY29sdW1ucy9kYXRhLXRhYmxlLWNvbHVtbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBRy9ELE1BQU0sT0FBZ0IsMEJBQTBCO0lBRGhEO1FBTUUsVUFBSyxHQUFvQixNQUFNLENBQUM7UUFZaEMsaUJBQVksR0FBRyxLQUFLLENBQUM7UUFHckIsa0JBQWEsR0FBRyxLQUFLLENBQUM7UUFHdEIsY0FBUyxHQUF1QixTQUFTLENBQUM7UUFHMUMsY0FBUyxHQUE0QixTQUFTLENBQUM7S0FpQmhEO0lBSEMsSUFBSSxRQUFRO1FBQ1YsT0FBTyxJQUFJLENBQUM7SUFDZCxDQUFDOzhHQTFDbUIsMEJBQTBCO2tIQUExQiwwQkFBMEI7OzJGQUExQiwwQkFBMEI7a0JBRC9DLFVBQVU7OEJBR1QsT0FBTztzQkFETixLQUFLO2dCQUlOLEtBQUs7c0JBREosS0FBSztnQkFJTixLQUFLO3NCQURKLEtBQUs7Z0JBSU4sU0FBUztzQkFEUixLQUFLO2dCQUlOLFdBQVc7c0JBRFYsS0FBSztnQkFJTixZQUFZO3NCQURYLEtBQUs7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VGVtcGxhdGVSZWY8dW5rbm93bj47XG5cbiAgYWJzdHJhY3QgZ2V0IHRlbXBsYXRlKCk6IFRlbXBsYXRlUmVmPHVua25vd24+O1xuXG4gIGFic3RyYWN0IGdldCBsb2FkaW5nRW5hYmxlZCgpOiBib29sZWFuO1xuXG4gIGFic3RyYWN0IGdldCBuYW1lKCk6IHN0cmluZztcblxuICBnZXQgY3NzQ2xhc3MoKTogc3RyaW5nIHwgdW5kZWZpbmVkIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxufVxuIl19
|
@@ -1,81 +0,0 @@
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
2
|
-
import { AXFormatService } from '@acorex/core/format';
|
3
|
-
import { Memorize } from '@acorex/core/memorize';
|
4
|
-
import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewChild, ViewEncapsulation, inject, } from '@angular/core';
|
5
|
-
import { AXDataTableColumnComponent } from './data-table-column';
|
6
|
-
import * as i0 from "@angular/core";
|
7
|
-
export class AXDataTableTextColumnComponent extends AXDataTableColumnComponent {
|
8
|
-
constructor() {
|
9
|
-
super(...arguments);
|
10
|
-
this.wrapText = false;
|
11
|
-
this.formatService = inject(AXFormatService);
|
12
|
-
}
|
13
|
-
get template() {
|
14
|
-
return this._template;
|
15
|
-
}
|
16
|
-
get loadingEnabled() {
|
17
|
-
return true;
|
18
|
-
}
|
19
|
-
get name() {
|
20
|
-
return `cl-${this.dataField}`;
|
21
|
-
}
|
22
|
-
getDisplayText(rowData, dataField) {
|
23
|
-
const value = rowData[dataField];
|
24
|
-
return !this.format
|
25
|
-
? value
|
26
|
-
: this.formatService.format(value, this.format, this.formatOptions);
|
27
|
-
}
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDataTableTextColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
29
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: { width: "width", caption: "caption", headerTemplate: "headerTemplate", cellTemplate: "cellTemplate", allowSorting: "allowSorting", allowResizing: "allowResizing", fixed: "fixed", dataField: "dataField", wrapText: "wrapText", format: "format", formatOptions: "formatOptions" }, providers: [
|
30
|
-
{
|
31
|
-
provide: AXDataTableColumnComponent,
|
32
|
-
useExisting: AXDataTableTextColumnComponent,
|
33
|
-
},
|
34
|
-
], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: ` <ng-template let-row>
|
35
|
-
{{ getDisplayText(row.data, this.dataField) }}
|
36
|
-
</ng-template>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
37
|
-
}
|
38
|
-
__decorate([
|
39
|
-
Memorize(),
|
40
|
-
__metadata("design:type", Function),
|
41
|
-
__metadata("design:paramtypes", [Object, String]),
|
42
|
-
__metadata("design:returntype", String)
|
43
|
-
], AXDataTableTextColumnComponent.prototype, "getDisplayText", null);
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDataTableTextColumnComponent, decorators: [{
|
45
|
-
type: Component,
|
46
|
-
args: [{
|
47
|
-
selector: 'ax-text-column',
|
48
|
-
template: ` <ng-template let-row>
|
49
|
-
{{ getDisplayText(row.data, this.dataField) }}
|
50
|
-
</ng-template>`,
|
51
|
-
encapsulation: ViewEncapsulation.None,
|
52
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
53
|
-
providers: [
|
54
|
-
{
|
55
|
-
provide: AXDataTableColumnComponent,
|
56
|
-
useExisting: AXDataTableTextColumnComponent,
|
57
|
-
},
|
58
|
-
],
|
59
|
-
inputs: [
|
60
|
-
'width',
|
61
|
-
'caption',
|
62
|
-
'headerTemplate',
|
63
|
-
'cellTemplate',
|
64
|
-
'allowSorting',
|
65
|
-
'allowResizing',
|
66
|
-
'fixed',
|
67
|
-
],
|
68
|
-
}]
|
69
|
-
}], propDecorators: { dataField: [{
|
70
|
-
type: Input
|
71
|
-
}], wrapText: [{
|
72
|
-
type: Input
|
73
|
-
}], _template: [{
|
74
|
-
type: ViewChild,
|
75
|
-
args: [TemplateRef]
|
76
|
-
}], getDisplayText: [], format: [{
|
77
|
-
type: Input
|
78
|
-
}], formatOptions: [{
|
79
|
-
type: Input
|
80
|
-
}] } });
|
81
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS10ZXh0LWNvbHVtbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvZGF0YS10YWJsZS0yL3NyYy9saWIvY29sdW1ucy9kYXRhLXRleHQtY29sdW1uLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3RELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUNqRCxPQUFPLEVBQ0wsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxLQUFLLEVBQ0wsV0FBVyxFQUNYLFNBQVMsRUFDVCxpQkFBaUIsRUFDakIsTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSwwQkFBMEIsRUFBRSxNQUFNLHFCQUFxQixDQUFDOztBQTBCakUsTUFBTSxPQUFPLDhCQUErQixTQUFRLDBCQUEwQjtJQXZCOUU7O1FBNEJFLGFBQVEsR0FBRyxLQUFLLENBQUM7UUFpQlQsa0JBQWEsR0FBRyxNQUFNLENBQUMsZUFBZSxDQUFDLENBQUM7S0FtQmpEO0lBL0JDLElBQUksUUFBUTtRQ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blxuICBwcml2YXRlIGZvcm1hdFNlcnZpY2UgPSBpbmplY3QoQVhGb3JtYXRTZXJ2aWNlKTtcblxuICBATWVtb3JpemUoKVxuICBwcm90ZWN0ZWQgZ2V0RGlzcGxheVRleHQocm93RGF0YTogdW5rbm93biwgZGF0YUZpZWxkOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgIGNvbnN0IHZhbHVlID0gcm93RGF0YVtkYXRhRmllbGRdO1xuICAgIHJldHVybiAhdGhpcy5mb3JtYXRcbiAgICAgID8gdmFsdWVcbiAgICAgIDogdGhpcy5mb3JtYXRTZXJ2aWNlLmZvcm1hdChcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICB0aGlzLmZvcm1hdCBhcyBhbnksXG4gICAgICAgICAgdGhpcy5mb3JtYXRPcHRpb25zXG4gICAgICAgICk7XG4gIH1cblxuICBASW5wdXQoKVxuICBmb3JtYXQ6IHN0cmluZztcblxuICBASW5wdXQoKVxuICBmb3JtYXRPcHRpb25zOiBBWEZvcm1hdE9wdGlvbnM7XG59XG4iXX0=
|
@@ -1,231 +0,0 @@
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, TemplateRef, ViewChild, ViewEncapsulation, inject, } from '@angular/core';
|
2
|
-
import { AXDataTable2Component } from '../data-table-2.component';
|
3
|
-
import { AXDataTableColumnComponent } from './data-table-column';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
import * as i1 from "@acorex/components/loading";
|
6
|
-
import * as i2 from "@acorex/components/decorators";
|
7
|
-
import * as i3 from "@acorex/components/button";
|
8
|
-
import * as i4 from "@acorex/components/dropdown";
|
9
|
-
import * as i5 from "@acorex/components/common";
|
10
|
-
export class AXBaseRowCommandColumnComponent extends AXDataTableColumnComponent {
|
11
|
-
constructor() {
|
12
|
-
super(...arguments);
|
13
|
-
this.grid = inject(AXDataTable2Component);
|
14
|
-
this.cdr = inject(ChangeDetectorRef);
|
15
|
-
this.allowSorting = false;
|
16
|
-
this.onItemClick = new EventEmitter();
|
17
|
-
}
|
18
|
-
get loadingEnabled() {
|
19
|
-
return false;
|
20
|
-
}
|
21
|
-
get cssClass() {
|
22
|
-
return 'ax-command-column';
|
23
|
-
}
|
24
|
-
}
|
25
|
-
export class AXRowDropdownCommandColumnComponent extends AXBaseRowCommandColumnComponent {
|
26
|
-
constructor() {
|
27
|
-
super(...arguments);
|
28
|
-
this._items = [];
|
29
|
-
this.items = [];
|
30
|
-
}
|
31
|
-
get template() {
|
32
|
-
return this._template;
|
33
|
-
}
|
34
|
-
get name() {
|
35
|
-
return 'cl-dd-cmd';
|
36
|
-
}
|
37
|
-
async handleOnOpened(rowData) {
|
38
|
-
if (Array.isArray(this.items)) {
|
39
|
-
this._items = this.items;
|
40
|
-
}
|
41
|
-
else
|
42
|
-
typeof this.items == 'function';
|
43
|
-
{
|
44
|
-
const result = this['items'](rowData);
|
45
|
-
if (Array.isArray(result)) {
|
46
|
-
this._items = result;
|
47
|
-
}
|
48
|
-
else if (result instanceof Promise) {
|
49
|
-
this._items = await result;
|
50
|
-
}
|
51
|
-
}
|
52
|
-
this.cdr.detectChanges();
|
53
|
-
}
|
54
|
-
handleOnClosed() {
|
55
|
-
this._items = [];
|
56
|
-
}
|
57
|
-
handleOnItemClick(e, data) {
|
58
|
-
const args = {
|
59
|
-
component: this.grid,
|
60
|
-
isUserInteraction: true,
|
61
|
-
nativeEvent: e,
|
62
|
-
data,
|
63
|
-
name: e.name,
|
64
|
-
};
|
65
|
-
this.onItemClick.emit(args);
|
66
|
-
}
|
67
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRowDropdownCommandColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
68
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: { width: "width", caption: "caption", fixed: "fixed", items: "items" }, outputs: { onItemClick: "onItemClick" }, providers: [
|
69
|
-
{
|
70
|
-
provide: AXDataTableColumnComponent,
|
71
|
-
useExisting: AXRowDropdownCommandColumnComponent,
|
72
|
-
},
|
73
|
-
], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: ` <ng-template let-row>
|
74
|
-
@if (row.data) {
|
75
|
-
<div>
|
76
|
-
<button [axRipple]>
|
77
|
-
<ax-icon icon="ax-icon ax-icon-solid ax-icon-more-horizontal"></ax-icon>
|
78
|
-
<ax-dropdown-panel [adaptivityEnabled]="true" (onOpened)="handleOnOpened(row.data)" (onClosed)="handleOnClosed()">
|
79
|
-
@if (_items.length) {
|
80
|
-
<ax-button-item-list (onItemClick)="handleOnItemClick($event, row.data)" [items]="_items"> </ax-button-item-list>
|
81
|
-
} @else {
|
82
|
-
<div panel style="padding: 0.875rem;">
|
83
|
-
<ax-loading></ax-loading>
|
84
|
-
</div>
|
85
|
-
}
|
86
|
-
</ax-dropdown-panel>
|
87
|
-
</button>
|
88
|
-
</div>
|
89
|
-
}
|
90
|
-
<ng-template #loading>
|
91
|
-
<div panel style="padding: 0.875rem;">
|
92
|
-
<ax-loading></ax-loading>
|
93
|
-
</div>
|
94
|
-
</ng-template>
|
95
|
-
</ng-template>`, isInline: true, dependencies: [{ kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "directive", type: i5.AXRippleDirective, selector: "[axRipple]", inputs: ["axRipple", "axRippleColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
96
|
-
}
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRowDropdownCommandColumnComponent, decorators: [{
|
98
|
-
type: Component,
|
99
|
-
args: [{
|
100
|
-
selector: 'ax-dropdown-command-column',
|
101
|
-
template: ` <ng-template let-row>
|
102
|
-
@if (row.data) {
|
103
|
-
<div>
|
104
|
-
<button [axRipple]>
|
105
|
-
<ax-icon icon="ax-icon ax-icon-solid ax-icon-more-horizontal"></ax-icon>
|
106
|
-
<ax-dropdown-panel [adaptivityEnabled]="true" (onOpened)="handleOnOpened(row.data)" (onClosed)="handleOnClosed()">
|
107
|
-
@if (_items.length) {
|
108
|
-
<ax-button-item-list (onItemClick)="handleOnItemClick($event, row.data)" [items]="_items"> </ax-button-item-list>
|
109
|
-
} @else {
|
110
|
-
<div panel style="padding: 0.875rem;">
|
111
|
-
<ax-loading></ax-loading>
|
112
|
-
</div>
|
113
|
-
}
|
114
|
-
</ax-dropdown-panel>
|
115
|
-
</button>
|
116
|
-
</div>
|
117
|
-
}
|
118
|
-
<ng-template #loading>
|
119
|
-
<div panel style="padding: 0.875rem;">
|
120
|
-
<ax-loading></ax-loading>
|
121
|
-
</div>
|
122
|
-
</ng-template>
|
123
|
-
</ng-template>`,
|
124
|
-
encapsulation: ViewEncapsulation.None,
|
125
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
126
|
-
providers: [
|
127
|
-
{
|
128
|
-
provide: AXDataTableColumnComponent,
|
129
|
-
useExisting: AXRowDropdownCommandColumnComponent,
|
130
|
-
},
|
131
|
-
],
|
132
|
-
inputs: ['width', 'caption', 'fixed'],
|
133
|
-
outputs: ['onItemClick'],
|
134
|
-
}]
|
135
|
-
}], propDecorators: { _template: [{
|
136
|
-
type: ViewChild,
|
137
|
-
args: [TemplateRef]
|
138
|
-
}], items: [{
|
139
|
-
type: Input
|
140
|
-
}] } });
|
141
|
-
export class AXRowCommandColumnComponent extends AXBaseRowCommandColumnComponent {
|
142
|
-
constructor() {
|
143
|
-
super(...arguments);
|
144
|
-
this.items = [];
|
145
|
-
}
|
146
|
-
get template() {
|
147
|
-
return this._template;
|
148
|
-
}
|
149
|
-
get name() {
|
150
|
-
return 'cl-in-cmd';
|
151
|
-
}
|
152
|
-
getItems(rowData) {
|
153
|
-
if (Array.isArray(this.items)) {
|
154
|
-
return this.items;
|
155
|
-
}
|
156
|
-
else
|
157
|
-
typeof this.items == 'function';
|
158
|
-
{
|
159
|
-
return this.items(rowData);
|
160
|
-
}
|
161
|
-
return [];
|
162
|
-
}
|
163
|
-
handleOnItemClick(e, item, data) {
|
164
|
-
const args = {
|
165
|
-
component: this.grid,
|
166
|
-
isUserInteraction: true,
|
167
|
-
nativeEvent: e,
|
168
|
-
data,
|
169
|
-
name: item.name,
|
170
|
-
};
|
171
|
-
this.onItemClick.emit(args);
|
172
|
-
}
|
173
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRowCommandColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
174
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.2", type: AXRowCommandColumnComponent, selector: "ax-command-column", inputs: { width: "width", caption: "caption", fixed: "fixed", items: "items" }, outputs: { onItemClick: "onItemClick" }, providers: [
|
175
|
-
{
|
176
|
-
provide: AXDataTableColumnComponent,
|
177
|
-
useExisting: AXRowCommandColumnComponent,
|
178
|
-
},
|
179
|
-
], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: ` <ng-template let-row>
|
180
|
-
@if (row.data) {
|
181
|
-
@for (item of getItems(row.data); track $index) {
|
182
|
-
<button
|
183
|
-
[style.color]="'rgba(var(--ax-color-' + (item.color ?? 'primary)')"
|
184
|
-
[disabled]="item.disabled"
|
185
|
-
[class.ax-state-disabled]="item.disabled"
|
186
|
-
[axRipple]="!item.disabled"
|
187
|
-
(click)="handleOnItemClick($event, item, row.data)"
|
188
|
-
>
|
189
|
-
<ax-icon [icon]="item.icon"></ax-icon>
|
190
|
-
</button>
|
191
|
-
}
|
192
|
-
}
|
193
|
-
</ng-template>`, isInline: true, dependencies: [{ kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: i5.AXRippleDirective, selector: "[axRipple]", inputs: ["axRipple", "axRippleColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
194
|
-
}
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRowCommandColumnComponent, decorators: [{
|
196
|
-
type: Component,
|
197
|
-
args: [{
|
198
|
-
selector: 'ax-command-column',
|
199
|
-
template: ` <ng-template let-row>
|
200
|
-
@if (row.data) {
|
201
|
-
@for (item of getItems(row.data); track $index) {
|
202
|
-
<button
|
203
|
-
[style.color]="'rgba(var(--ax-color-' + (item.color ?? 'primary)')"
|
204
|
-
[disabled]="item.disabled"
|
205
|
-
[class.ax-state-disabled]="item.disabled"
|
206
|
-
[axRipple]="!item.disabled"
|
207
|
-
(click)="handleOnItemClick($event, item, row.data)"
|
208
|
-
>
|
209
|
-
<ax-icon [icon]="item.icon"></ax-icon>
|
210
|
-
</button>
|
211
|
-
}
|
212
|
-
}
|
213
|
-
</ng-template>`,
|
214
|
-
encapsulation: ViewEncapsulation.None,
|
215
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
216
|
-
providers: [
|
217
|
-
{
|
218
|
-
provide: AXDataTableColumnComponent,
|
219
|
-
useExisting: AXRowCommandColumnComponent,
|
220
|
-
},
|
221
|
-
],
|
222
|
-
inputs: ['width', 'caption', 'fixed'],
|
223
|
-
outputs: ['onItemClick'],
|
224
|
-
}]
|
225
|
-
}], propDecorators: { _template: [{
|
226
|
-
type: ViewChild,
|
227
|
-
args: [TemplateRef]
|
228
|
-
}], items: [{
|
229
|
-
type: Input
|
230
|
-
}] } });
|
231
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm93LWNvbW1hbmQtY29sdW1uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9kYXRhLXRhYmxlLTIvc3JjL2xpYi9jb2x1bW5zL3Jvdy1jb21tYW5kLWNvbHVtbi5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixpQkFBaUIsRUFDakIsU0FBUyxFQUNULFlBQVksRUFDWixLQUFLLEVBQ0wsV0FBVyxFQUNYLFNBQVMsRUFDVCxpQkFBaUIsRUFDakIsTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQ2xFLE9BQU8sRUFBRSwwQkFBMEIsRUFBRSxNQUFNLHFCQUFxQixDQUFDOzs7Ozs7O0FBTWpFLE1BQU0sT0FBZ0IsK0JBQWdDLFNBQVEsMEJBQTBCO0lBQXhGOztRQUNZLFNBQUksR0FBRyxNQUFNLENBQUMscUJBQXFCLENBQUMsQ0FBQztRQUNyQyxRQUFHLEdBQUcsTUFBTSxDQUFDLGlCQUFpQixDQUFDLENBQUM7UUFFakMsaUJBQVksR0FBRyxLQUFLLENBQUM7UUFVOUIsZ0JBQVcsR0FBNkMsSUFBSSxZQUFZLEVBQThCLENBQUM7SUFDekcsQ0FBQztJQVRDLElBQUksY0FBYztRQUNoQixPQUFPLEtBQUssQ0FBQztJQUNmLENBQUM7SUFFRCxJQUFhLFF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0sIGRhdGE6IHVua25vd24pIHtcbiAgICBjb25zdCBhcmdzOiBBWFJvd0NvbW1hbmRJdGVtQ2xpY2tFdmVudCA9IHtcbiAgICAgIGNvbXBvbmVudDogdGhpcy5ncmlkLFxuICAgICAgaXNVc2VySW50ZXJhY3Rpb246IHRydWUsXG4gICAgICBuYXRpdmVFdmVudDogZSxcbiAgICAgIGRhdGEsXG4gICAgICBuYW1lOiBpdGVtLm5hbWUsXG4gICAgfTtcbiAgICB0aGlzLm9uSXRlbUNsaWNrLmVtaXQoYXJncyk7XG4gIH1cbn1cbiJdfQ==
|
@@ -1,71 +0,0 @@
|
|
1
|
-
import { AXUnsubscriber } from '@acorex/core/utils';
|
2
|
-
import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewChild, ViewEncapsulation, inject } from '@angular/core';
|
3
|
-
import { AXDataTable2Component } from '../data-table-2.component';
|
4
|
-
import { AXDataTableColumnComponent } from './data-table-column';
|
5
|
-
import * as i0 from "@angular/core";
|
6
|
-
import * as i1 from "@angular/common";
|
7
|
-
import * as i2 from "@acorex/core/format";
|
8
|
-
export class AXRowIndexColumnComponent extends AXDataTableColumnComponent {
|
9
|
-
constructor() {
|
10
|
-
super(...arguments);
|
11
|
-
this.grid = inject(AXDataTable2Component);
|
12
|
-
this.unsubscriber = inject(AXUnsubscriber);
|
13
|
-
this.padZero = false;
|
14
|
-
this.formatCount = 1;
|
15
|
-
this.allowSorting = false;
|
16
|
-
}
|
17
|
-
get template() {
|
18
|
-
return this._template;
|
19
|
-
}
|
20
|
-
get name() {
|
21
|
-
return 'cl-inx';
|
22
|
-
}
|
23
|
-
ngOnInit() {
|
24
|
-
if (this.padZero) {
|
25
|
-
this.grid.dataSource.onChanged.pipe(this.unsubscriber.takeUntilDestroy).subscribe((c) => {
|
26
|
-
this.formatCount = c.totalCount.toString().length;
|
27
|
-
});
|
28
|
-
}
|
29
|
-
}
|
30
|
-
get loadingEnabled() {
|
31
|
-
return false;
|
32
|
-
}
|
33
|
-
get cssClass() {
|
34
|
-
return 'ax-index-column';
|
35
|
-
}
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRowIndexColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
37
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: AXRowIndexColumnComponent, selector: "ax-index-column", inputs: { width: "width", caption: "caption", fixed: "fixed", padZero: "padZero" }, providers: [
|
38
|
-
AXUnsubscriber,
|
39
|
-
{
|
40
|
-
provide: AXDataTableColumnComponent,
|
41
|
-
useExisting: AXRowIndexColumnComponent,
|
42
|
-
},
|
43
|
-
], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: ` <ng-template let-row>
|
44
|
-
{{ row.rowIndex + 1 | format: 'number' : { zeroPadLength: this.formatCount, thousandSeparator: false } | async }}
|
45
|
-
</ng-template>`, isInline: true, dependencies: [{ kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.AXFormatPipe, name: "format" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
46
|
-
}
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRowIndexColumnComponent, decorators: [{
|
48
|
-
type: Component,
|
49
|
-
args: [{
|
50
|
-
selector: 'ax-index-column',
|
51
|
-
template: ` <ng-template let-row>
|
52
|
-
{{ row.rowIndex + 1 | format: 'number' : { zeroPadLength: this.formatCount, thousandSeparator: false } | async }}
|
53
|
-
</ng-template>`,
|
54
|
-
encapsulation: ViewEncapsulation.None,
|
55
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
56
|
-
providers: [
|
57
|
-
AXUnsubscriber,
|
58
|
-
{
|
59
|
-
provide: AXDataTableColumnComponent,
|
60
|
-
useExisting: AXRowIndexColumnComponent,
|
61
|
-
},
|
62
|
-
],
|
63
|
-
inputs: ['width', 'caption', 'fixed'],
|
64
|
-
}]
|
65
|
-
}], propDecorators: { _template: [{
|
66
|
-
type: ViewChild,
|
67
|
-
args: [TemplateRef]
|
68
|
-
}], padZero: [{
|
69
|
-
type: Input
|
70
|
-
}] } });
|
71
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm93LWluZGV4LWNvbHVtbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvZGF0YS10YWJsZS0yL3NyYy9saWIvY29sdW1ucy9yb3ctaW5kZXgtY29sdW1uLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDcEQsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVUsV0FBVyxFQUFFLFNBQVMsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDckksT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDbEUsT0FBTyxFQUFFLDBCQUEwQixFQUFFLE1BQU0scUJBQXFCLENBQUM7Ozs7QUFrQmpFLE1BQU0sT0FBTyx5QkFBMEIsU0FBUSwwQkFBMEI7SUFoQnpFOztRQWlCVSxTQUFJLEdBQUcsTUFBTSxDQUFDLHFCQUFxQixDQUFDLENBQUM7UUFDckMsaUJBQVksR0FBRyxNQUFNLENBQUMsY0FBYyxDQUFDLENBQUM7UUFjOUMsWUFBTyxHQUFHLEtBQUssQ0FBQztRQUVOLGdCQUFXLEdBQUcsQ0FBQyxDQUFDO1FBVWpCLGlCQUFZLEdBQUcs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zLnVuc3Vic2NyaWJlci50YWtlVW50aWxEZXN0cm95KS5zdWJzY3JpYmUoKGMpID0+IHtcbiAgICAgICAgdGhpcy5mb3JtYXRDb3VudCA9IGMudG90YWxDb3VudC50b1N0cmluZygpLmxlbmd0aDtcbiAgICAgIH0pO1xuICAgIH1cbiAgfVxuXG4gIG92ZXJyaWRlIGFsbG93U29ydGluZyA9IGZhbHNlO1xuXG4gIGdldCBsb2FkaW5nRW5hYmxlZCgpOiBib29sZWFuIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBvdmVycmlkZSBnZXQgY3NzQ2xhc3MoKTogc3RyaW5nIHwgdW5kZWZpbmVkIHtcbiAgICByZXR1cm4gJ2F4LWluZGV4LWNvbHVtbic7XG4gIH1cbn1cbiJdfQ==
|
@@ -1,61 +0,0 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild, ViewEncapsulation, inject } from '@angular/core';
|
2
|
-
import { AXDataTable2Component } from '../data-table-2.component';
|
3
|
-
import { AXDataTableColumnComponent } from './data-table-column';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
export class AXRowSelectColumnComponent extends AXDataTableColumnComponent {
|
6
|
-
constructor() {
|
7
|
-
super(...arguments);
|
8
|
-
this.grid = inject(AXDataTable2Component);
|
9
|
-
}
|
10
|
-
get template() {
|
11
|
-
return this._template;
|
12
|
-
}
|
13
|
-
get name() {
|
14
|
-
return 'cl-select';
|
15
|
-
}
|
16
|
-
isSelected(item) {
|
17
|
-
return item != null && this.grid.selectedRows.includes(item);
|
18
|
-
}
|
19
|
-
handleChange(item) {
|
20
|
-
if (this.isSelected(item)) {
|
21
|
-
this.grid.unSelectRows(item);
|
22
|
-
}
|
23
|
-
else {
|
24
|
-
this.grid.selectRows(item);
|
25
|
-
}
|
26
|
-
}
|
27
|
-
get loadingEnabled() {
|
28
|
-
return false;
|
29
|
-
}
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRowSelectColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
31
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.2", type: AXRowSelectColumnComponent, selector: "ax-select-column", inputs: { width: "width", caption: "caption", fixed: "fixed" }, providers: [
|
32
|
-
{
|
33
|
-
provide: AXDataTableColumnComponent,
|
34
|
-
useExisting: AXRowSelectColumnComponent,
|
35
|
-
},
|
36
|
-
], viewQueries: [{ propertyName: "_template", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: ` <ng-template let-row>
|
37
|
-
<input class="ax-checkbox" type="checkbox" [disabled]="!row.data" (change)="handleChange(row.data)" [checked]="isSelected(row.data)" />
|
38
|
-
</ng-template>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
39
|
-
}
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXRowSelectColumnComponent, decorators: [{
|
41
|
-
type: Component,
|
42
|
-
args: [{
|
43
|
-
selector: 'ax-select-column',
|
44
|
-
template: ` <ng-template let-row>
|
45
|
-
<input class="ax-checkbox" type="checkbox" [disabled]="!row.data" (change)="handleChange(row.data)" [checked]="isSelected(row.data)" />
|
46
|
-
</ng-template>`,
|
47
|
-
encapsulation: ViewEncapsulation.None,
|
48
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
49
|
-
providers: [
|
50
|
-
{
|
51
|
-
provide: AXDataTableColumnComponent,
|
52
|
-
useExisting: AXRowSelectColumnComponent,
|
53
|
-
},
|
54
|
-
],
|
55
|
-
inputs: ['width', 'caption', 'fixed'],
|
56
|
-
}]
|
57
|
-
}], propDecorators: { _template: [{
|
58
|
-
type: ViewChild,
|
59
|
-
args: [TemplateRef]
|
60
|
-
}] } });
|
61
|
-
//# sourceMappingURL=data:application/json;base64,e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