@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
@@ -43,6 +43,7 @@ export interface AXDataSourceChangedEvent<T = unknown> {
|
|
43
43
|
}
|
44
44
|
export declare class AXDataSource<T = unknown> {
|
45
45
|
config: AXDataSourceConfig<T>;
|
46
|
+
useCache: boolean;
|
46
47
|
private _totalCount;
|
47
48
|
get totalCount(): number;
|
48
49
|
get totalPages(): number;
|
@@ -63,6 +64,7 @@ export declare class AXDataSource<T = unknown> {
|
|
63
64
|
private load;
|
64
65
|
private setLoadingState;
|
65
66
|
setPage(page: number): void;
|
67
|
+
setPageSize(pageSize: number): void;
|
66
68
|
filter(value: AXDataSourceFilterOption): void;
|
67
69
|
sort(...value: AXDataSourceSortOption[]): void;
|
68
70
|
clearFilter(): void;
|
package/data-table/index.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
export * from './lib/columns/data-table-column';
|
2
|
+
export * from './lib/columns/data-table-column-resizable.directive';
|
2
3
|
export * from './lib/columns/data-text-column.component';
|
3
4
|
export * from './lib/columns/row-command-column.component';
|
4
5
|
export * from './lib/columns/row-index-column.component';
|
5
6
|
export * from './lib/columns/row-select-column.component';
|
6
|
-
export * from './lib/columns/data-table-column-resizable.directive';
|
7
|
-
export * from './lib/data-table.component';
|
8
7
|
export * from './lib/data-table.module';
|
8
|
+
export * from './lib/data-table/data-table.component';
|
9
|
+
export * from './lib/infinite-scroll-data-table/infinite-scroll-data-table.component';
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { AXDataSource, AXEvent, MXBaseComponent } from '@acorex/components/common';
|
2
|
+
import { EventEmitter } from '@angular/core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export interface AXDataTableScrollIndexChanged extends AXEvent {
|
5
|
+
index: number;
|
6
|
+
}
|
7
|
+
export interface AXDataTableRowClick extends AXEvent {
|
8
|
+
data?: any;
|
9
|
+
}
|
10
|
+
export interface AXColumnsOrderChangedEvent extends AXEvent {
|
11
|
+
data?: any;
|
12
|
+
}
|
13
|
+
export interface AXDataTableRowDbClick extends AXDataTableRowClick {
|
14
|
+
}
|
15
|
+
export declare abstract class AXBaseDataTable extends MXBaseComponent {
|
16
|
+
dataSource: AXDataSource<unknown>;
|
17
|
+
selectedRowsChange: EventEmitter<unknown[]>;
|
18
|
+
private _selectedRows;
|
19
|
+
get selectedRows(): unknown[];
|
20
|
+
set selectedRows(v: unknown[]);
|
21
|
+
selectRows(...rows: unknown[]): void;
|
22
|
+
unSelectRows(...rows: unknown[]): void;
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXBaseDataTable, never>;
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXBaseDataTable>;
|
25
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { AXButtonItemComponent, AXButtonItemListItem } from '@acorex/components/button';
|
2
2
|
import { AXButtonClickEvent, AXItemClickEvent } from '@acorex/components/common';
|
3
3
|
import { ChangeDetectorRef, EventEmitter, TemplateRef } from '@angular/core';
|
4
|
-
import {
|
4
|
+
import { AXBaseDataTable } from '../base-data-table.class';
|
5
5
|
import { AXDataTableColumnComponent } from './data-table-column';
|
6
6
|
import * as i0 from "@angular/core";
|
7
7
|
export interface AXRowCommandItem extends AXButtonItemListItem {
|
@@ -9,7 +9,7 @@ export interface AXRowCommandItem extends AXButtonItemListItem {
|
|
9
9
|
export interface AXRowCommandItemClickEvent extends AXButtonClickEvent {
|
10
10
|
}
|
11
11
|
export declare abstract class AXBaseRowCommandColumnComponent extends AXDataTableColumnComponent {
|
12
|
-
protected grid:
|
12
|
+
protected grid: AXBaseDataTable;
|
13
13
|
protected cdr: ChangeDetectorRef;
|
14
14
|
allowSorting: boolean;
|
15
15
|
get loadingEnabled(): boolean;
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import { AXDataPagerChangedEvent } from '@acorex/components/data-pager';
|
2
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
3
|
+
import { AfterViewInit, EventEmitter, OnInit, QueryList, TemplateRef, WritableSignal } from '@angular/core';
|
4
|
+
import { AXBaseDataTable, AXColumnsOrderChangedEvent, AXDataTableRowClick, AXDataTableRowDbClick } from '../base-data-table.class';
|
5
|
+
import { AXDataTableColumnComponent } from '../columns/data-table-column';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
export declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, AfterViewInit {
|
8
|
+
onColumnsOrderChanged: EventEmitter<AXColumnsOrderChangedEvent>;
|
9
|
+
protected displayedRows: WritableSignal<any[]>;
|
10
|
+
protected page: WritableSignal<number>;
|
11
|
+
protected pageSize: WritableSignal<number>;
|
12
|
+
protected columnsList: WritableSignal<any[]>;
|
13
|
+
protected columns: QueryList<AXDataTableColumnComponent>;
|
14
|
+
ngAfterViewInit(): void;
|
15
|
+
protected drop(event: CdkDragDrop<any, any, any>): void;
|
16
|
+
ngOnInit(): void;
|
17
|
+
rowTemplate?: TemplateRef<unknown>;
|
18
|
+
emptyTemplate?: TemplateRef<unknown>;
|
19
|
+
showHeader: boolean;
|
20
|
+
fixedHeader: boolean;
|
21
|
+
itemHeight: number | 'auto';
|
22
|
+
fetchDataMode: 'auto' | 'manual';
|
23
|
+
loading: {
|
24
|
+
enabled: boolean;
|
25
|
+
animation: boolean;
|
26
|
+
loadingTemplate?: TemplateRef<unknown>;
|
27
|
+
};
|
28
|
+
private _focusedRow;
|
29
|
+
get focusedRow(): unknown;
|
30
|
+
set focusedRow(v: unknown);
|
31
|
+
protected isLoading: WritableSignal<boolean>;
|
32
|
+
protected hasItems: boolean;
|
33
|
+
protected totalRows: number;
|
34
|
+
protected currentPage: number;
|
35
|
+
protected totalPages: number;
|
36
|
+
protected startRowIndex: number;
|
37
|
+
private lastIndex;
|
38
|
+
focusedRowChange: EventEmitter<unknown>;
|
39
|
+
onRowClick: EventEmitter<AXDataTableRowClick>;
|
40
|
+
onRowDbClick: EventEmitter<AXDataTableRowDbClick>;
|
41
|
+
private clickSubject;
|
42
|
+
protected handleRowClick(event: MouseEvent, item: unknown): void;
|
43
|
+
private handleRowSingleClick;
|
44
|
+
protected onPageChanged(event: AXDataPagerChangedEvent): void;
|
45
|
+
protected handleRowDoubleClick(e: MouseEvent, item: unknown): void;
|
46
|
+
handleColumnClick(e: MouseEvent, column: AXDataTableColumnComponent): void;
|
47
|
+
protected getSort(column: AXDataTableColumnComponent): string | undefined;
|
48
|
+
refresh(): void;
|
49
|
+
private calculateStickyColumnsPositions;
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXDataTableComponent, never>;
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXDataTableComponent, "ax-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "fixedHeader": { "alias": "fixedHeader"; "required": false; }; "itemHeight": { "alias": "itemHeight"; "required": false; }; "fetchDataMode": { "alias": "fetchDataMode"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "focusedRow": { "alias": "focusedRow"; "required": false; }; }, { "onColumnsOrderChanged": "onColumnsOrderChanged"; "focusedRowChange": "focusedRowChange"; "onRowClick": "onRowClick"; "onRowDbClick": "onRowDbClick"; }, ["columns"], ["ax-header", "ax-footer"], false, never>;
|
52
|
+
}
|
@@ -1,23 +1,26 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
|
-
import * as i1 from "./data-table.component";
|
3
|
-
import * as i2 from "./
|
4
|
-
import * as i3 from "./columns/
|
5
|
-
import * as i4 from "./columns/row-
|
6
|
-
import * as i5 from "./columns/row-
|
7
|
-
import * as i6 from "./columns/
|
8
|
-
import * as i7 from "
|
9
|
-
import * as i8 from "@
|
10
|
-
import * as i9 from "@
|
11
|
-
import * as i10 from "@
|
12
|
-
import * as i11 from "@acorex/
|
13
|
-
import * as i12 from "@acorex/components/
|
14
|
-
import * as i13 from "@acorex/components/
|
15
|
-
import * as i14 from "@acorex/components/
|
16
|
-
import * as i15 from "@acorex/components/
|
17
|
-
import * as i16 from "@acorex/components/
|
18
|
-
import * as i17 from "@acorex/
|
2
|
+
import * as i1 from "./infinite-scroll-data-table/infinite-scroll-data-table.component";
|
3
|
+
import * as i2 from "./data-table/data-table.component";
|
4
|
+
import * as i3 from "./columns/data-text-column.component";
|
5
|
+
import * as i4 from "./columns/row-index-column.component";
|
6
|
+
import * as i5 from "./columns/row-select-column.component";
|
7
|
+
import * as i6 from "./columns/row-command-column.component";
|
8
|
+
import * as i7 from "./columns/data-table-column-resizable.directive";
|
9
|
+
import * as i8 from "@angular/common";
|
10
|
+
import * as i9 from "@acorex/components/common";
|
11
|
+
import * as i10 from "@angular/cdk/scrolling";
|
12
|
+
import * as i11 from "@acorex/core/translation";
|
13
|
+
import * as i12 from "@acorex/components/result";
|
14
|
+
import * as i13 from "@acorex/components/loading";
|
15
|
+
import * as i14 from "@acorex/components/decorators";
|
16
|
+
import * as i15 from "@acorex/components/skeleton";
|
17
|
+
import * as i16 from "@acorex/components/button";
|
18
|
+
import * as i17 from "@acorex/components/dropdown";
|
19
|
+
import * as i18 from "@acorex/core/format";
|
20
|
+
import * as i19 from "@acorex/components/data-pager";
|
21
|
+
import * as i20 from "@angular/cdk/drag-drop";
|
19
22
|
export declare class AXDataTableModule {
|
20
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXDataTableModule, never>;
|
21
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AXDataTableModule, [typeof i1.
|
24
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXDataTableModule, [typeof i1.AXInfiniteScrollDataTableComponent, typeof i2.AXDataTableComponent, typeof i3.AXDataTableTextColumnComponent, typeof i4.AXRowIndexColumnComponent, typeof i5.AXRowSelectColumnComponent, typeof i6.AXRowCommandColumnComponent, typeof i6.AXRowDropdownCommandColumnComponent, typeof i7.AXDataTableColumnResizableDirective], [typeof i8.CommonModule, typeof i9.AXCommonModule, typeof i10.ScrollingModule, typeof i11.AXTranslationModule, typeof i12.AXResultModule, typeof i13.AXLoadingModule, typeof i14.AXDecoratorModule, typeof i15.AXSkeletonModule, typeof i16.AXButtonModule, typeof i17.AXDropdownModule, typeof i18.AXFormatModule, typeof i9.AXRippleDirective, typeof i19.AXDataPagerModule, typeof i20.CdkDropList, typeof i20.CdkDrag, typeof i20.CdkDragPlaceholder, typeof i20.CdkDragHandle], [typeof i1.AXInfiniteScrollDataTableComponent, typeof i2.AXDataTableComponent, typeof i3.AXDataTableTextColumnComponent, typeof i4.AXRowIndexColumnComponent, typeof i5.AXRowSelectColumnComponent, typeof i6.AXRowCommandColumnComponent, typeof i6.AXRowDropdownCommandColumnComponent, typeof i7.AXDataTableColumnResizableDirective]>;
|
22
25
|
static ɵinj: i0.ɵɵInjectorDeclaration<AXDataTableModule>;
|
23
26
|
}
|
@@ -1,16 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
import { DoCheck, ElementRef, EventEmitter, OnInit, QueryList, TemplateRef } from '@angular/core';
|
3
|
-
import {
|
1
|
+
import { AXListDataSource, AXValueChangedEvent } from '@acorex/components/common';
|
2
|
+
import { DoCheck, ElementRef, EventEmitter, OnInit, QueryList, TemplateRef, WritableSignal } from '@angular/core';
|
3
|
+
import { AXBaseDataTable, AXDataTableRowClick, AXDataTableRowDbClick, AXDataTableScrollIndexChanged } from '../base-data-table.class';
|
4
|
+
import { AXDataTableColumnComponent } from '../columns/data-table-column';
|
4
5
|
import * as i0 from "@angular/core";
|
5
|
-
export
|
6
|
-
index: number;
|
7
|
-
}
|
8
|
-
export interface AXDataTableRowClick extends AXEvent {
|
9
|
-
data?: any;
|
10
|
-
}
|
11
|
-
export interface AXDataTableRowDbClick extends AXDataTableRowClick {
|
12
|
-
}
|
13
|
-
export declare class AXDataTableComponent extends MXBaseComponent implements OnInit, DoCheck {
|
6
|
+
export declare class AXInfiniteScrollDataTableComponent extends AXBaseDataTable implements OnInit, DoCheck {
|
14
7
|
private ngZone;
|
15
8
|
protected columns: QueryList<AXDataTableColumnComponent>;
|
16
9
|
protected startFixedColumn(): AXDataTableColumnComponent[];
|
@@ -26,14 +19,13 @@ export declare class AXDataTableComponent extends MXBaseComponent implements OnI
|
|
26
19
|
emptyTemplate?: TemplateRef<unknown>;
|
27
20
|
showHeader: boolean;
|
28
21
|
fetchDataMode: 'auto' | 'manual';
|
29
|
-
dataSource: AXDataSource<unknown>;
|
30
22
|
loading: {
|
31
23
|
enabled: boolean;
|
32
24
|
animation: boolean;
|
33
25
|
loadingTemplate?: TemplateRef<unknown>;
|
34
26
|
};
|
35
27
|
protected listDataSource: AXListDataSource<unknown>;
|
36
|
-
protected isLoading: boolean
|
28
|
+
protected isLoading: WritableSignal<boolean>;
|
37
29
|
protected hasItems: boolean;
|
38
30
|
protected totalRows: number;
|
39
31
|
protected currentPage: number;
|
@@ -44,12 +36,6 @@ export declare class AXDataTableComponent extends MXBaseComponent implements OnI
|
|
44
36
|
private _focusedRow;
|
45
37
|
get focusedRow(): unknown;
|
46
38
|
set focusedRow(v: unknown);
|
47
|
-
selectedRowsChange: EventEmitter<unknown[]>;
|
48
|
-
private _selectedRows;
|
49
|
-
get selectedRows(): unknown[];
|
50
|
-
set selectedRows(v: unknown[]);
|
51
|
-
selectRows(...rows: unknown[]): void;
|
52
|
-
unSelectRows(...rows: unknown[]): void;
|
53
39
|
itemHeight: number | 'auto';
|
54
40
|
protected width: string;
|
55
41
|
protected height: string;
|
@@ -75,6 +61,6 @@ export declare class AXDataTableComponent extends MXBaseComponent implements OnI
|
|
75
61
|
handleColumnClick(e: MouseEvent, column: AXDataTableColumnComponent): void;
|
76
62
|
protected getSort(column: AXDataTableColumnComponent): string | undefined;
|
77
63
|
protected _handleOnScroll(): void;
|
78
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
79
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXInfiniteScrollDataTableComponent, never>;
|
65
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXInfiniteScrollDataTableComponent, "ax-infinite-scroll-data-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "fetchDataMode": { "alias": "fetchDataMode"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "focusedRow": { "alias": "focusedRow"; "required": false; }; "itemHeight": { "alias": "itemHeight"; "required": false; }; }, { "onPageChanged": "onPageChanged"; "onRowClick": "onRowClick"; "onRowDbClick": "onRowDbClick"; "focusedRowChange": "focusedRowChange"; "onScrolledIndexChanged": "onScrolledIndexChanged"; }, ["columns"], ["ax-header", "ax-footer"], false, never>;
|
80
66
|
}
|
@@ -62,7 +62,7 @@ export class AXButtonComponent extends MXButtonBaseComponent {
|
|
62
62
|
{ provide: AXComponent, useExisting: AXButtonComponent },
|
63
63
|
{ provide: AXButtonItemComponent, useExisting: AXButtonComponent },
|
64
64
|
{ provide: AXFocusableComponent, useExisting: AXButtonComponent },
|
65
|
-
], usesInheritance: true, ngImport: i0, template: "<button [axRipple] [disabled]=\"disabled\" [attr.tabindex]=\"tabIndex\" (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\" (click)=\"_handleClick($event)\" [attr.type]=\"type\">\n <ng-content select=\"ax-prefix, ax-loading, ax-loading-spinner, ax-icon\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n\n @if(text){\n <span class=\"ax-button-text\">{{ text }}</span>\n }\n\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-dropdown-panel\"> </ng-content>\n <ng-content select=\".tab-content\"> </ng-content>\n</button>", styles: ["ax-button{position:relative;display:inline-flex;height:var(--ax-size-default);cursor:pointer;align-items:center;justify-content:center;border-radius:var(--ax-rounded-border-default);font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-button.ax-xs{font-size:.75rem;line-height:1rem}ax-button.ax-xs>button{padding-left:.25rem;padding-right:.25rem}ax-button.ax-sm>button{padding-left:.5rem;padding-right:.5rem}ax-button.ax-sm,ax-button.ax-md{font-size:.875rem;line-height:1.25rem}ax-button.ax-lg{font-size:1rem;line-height:1.25rem}ax-button.ax-lg>button{padding-left:1.5rem;padding-right:1.5rem}ax-button.ax-xl{font-size:1.125rem;line-height:1.75rem}ax-button.ax-xl>button{padding-left:2rem;padding-right:2rem}ax-button.ax-xl.ax-button-icon{font-size:1.5rem}ax-button.ax-xs.ax-button-icon,ax-button.ax-sm.ax-button-icon{font-size:1rem}ax-button.ax-button-icon{height:var(--ax-size-default);width:var(--ax-size-default);font-size:1.25rem}ax-button.ax-state-disabled,ax-button.ax-state-loading{opacity:.5}ax-button.ax-state-disabled>button,ax-button.ax-state-loading>button{cursor:not-allowed}ax-button>button{position:relative;display:inline-flex;height:100%;width:100%;align-items:center;justify-content:center;overflow:hidden;border-radius:var(--ax-rounded-border-default);padding-left:1rem;padding-right:1rem;outline-color:transparent}ax-button>button.ax-state-focus:focus,ax-button>button:focus-visible{outline-width:2px;outline-offset:2px;outline-color:#000}ax-button>button .ax-button-text{white-space:nowrap;padding-left:.5rem;padding-right:.5rem;font-weight:500;line-height:1}ax-button ax-button-item.ax-divided{border-bottom-width:1px!important;border-color:rgba(var(--ax-color-border-default))!important}\n"], dependencies: [{ kind: "directive", type: i1.AXRippleDirective, selector: "[axRipple]", inputs: ["axRipple", "axRippleColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
65
|
+
], usesInheritance: true, ngImport: i0, template: "<button [axRipple] [disabled]=\"disabled\" [attr.tabindex]=\"tabIndex\" (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\" (click)=\"_handleClick($event)\" [attr.type]=\"type\">\n <ng-content select=\"ax-prefix, ax-loading, ax-loading-spinner, ax-icon\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n\n @if(text){\n <span class=\"ax-button-text\">{{ text }}</span>\n }\n\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-dropdown-panel\"> </ng-content>\n <ng-content select=\".tab-content\"> </ng-content>\n</button>", styles: ["ax-button{position:relative;display:inline-flex;height:var(--ax-size-default);cursor:pointer;align-items:center;justify-content:center;border-radius:var(--ax-rounded-border-default);font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-button.ax-xs{font-size:.75rem;line-height:1rem}ax-button.ax-xs>button{padding-left:.25rem;padding-right:.25rem}ax-button.ax-sm>button{padding-left:.5rem;padding-right:.5rem}ax-button.ax-sm,ax-button.ax-md{font-size:.875rem;line-height:1.25rem}ax-button.ax-lg{font-size:1rem;line-height:1.25rem}ax-button.ax-lg>button{padding-left:1.5rem;padding-right:1.5rem}ax-button.ax-xl{font-size:1.125rem;line-height:1.75rem}ax-button.ax-xl>button{padding-left:2rem;padding-right:2rem}ax-button.ax-xl.ax-button-icon{font-size:1.5rem}ax-button.ax-xs.ax-button-icon,ax-button.ax-sm.ax-button-icon{font-size:1rem}ax-button.ax-button-icon{height:var(--ax-size-default);width:var(--ax-size-default);font-size:1.25rem}ax-button.ax-state-disabled,ax-button.ax-state-loading{opacity:.5}ax-button.ax-state-disabled>button,ax-button.ax-state-loading>button{cursor:not-allowed}ax-button>button{position:relative;display:inline-flex;height:100%;width:100%;align-items:center;justify-content:center;overflow:hidden;border-radius:var(--ax-rounded-border-default);padding-left:1rem;padding-right:1rem;outline-color:transparent}ax-button>button.ax-state-focus:focus,ax-button>button:focus-visible{outline-width:2px;outline-offset:2px;outline-color:#000;border-radius:inherit}ax-button>button .ax-button-text{white-space:nowrap;padding-left:.5rem;padding-right:.5rem;font-weight:500;line-height:1}ax-button ax-button-item.ax-divided{border-bottom-width:1px!important;border-color:rgba(var(--ax-color-border-default))!important}\n"], dependencies: [{ kind: "directive", type: i1.AXRippleDirective, selector: "[axRipple]", inputs: ["axRipple", "axRippleColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
66
66
|
}
|
67
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXButtonComponent, decorators: [{
|
68
68
|
type: Component,
|
@@ -88,7 +88,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
|
|
88
88
|
{ provide: AXComponent, useExisting: AXButtonComponent },
|
89
89
|
{ provide: AXButtonItemComponent, useExisting: AXButtonComponent },
|
90
90
|
{ provide: AXFocusableComponent, useExisting: AXButtonComponent },
|
91
|
-
], template: "<button [axRipple] [disabled]=\"disabled\" [attr.tabindex]=\"tabIndex\" (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\" (click)=\"_handleClick($event)\" [attr.type]=\"type\">\n <ng-content select=\"ax-prefix, ax-loading, ax-loading-spinner, ax-icon\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n\n @if(text){\n <span class=\"ax-button-text\">{{ text }}</span>\n }\n\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-dropdown-panel\"> </ng-content>\n <ng-content select=\".tab-content\"> </ng-content>\n</button>", styles: ["ax-button{position:relative;display:inline-flex;height:var(--ax-size-default);cursor:pointer;align-items:center;justify-content:center;border-radius:var(--ax-rounded-border-default);font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-button.ax-xs{font-size:.75rem;line-height:1rem}ax-button.ax-xs>button{padding-left:.25rem;padding-right:.25rem}ax-button.ax-sm>button{padding-left:.5rem;padding-right:.5rem}ax-button.ax-sm,ax-button.ax-md{font-size:.875rem;line-height:1.25rem}ax-button.ax-lg{font-size:1rem;line-height:1.25rem}ax-button.ax-lg>button{padding-left:1.5rem;padding-right:1.5rem}ax-button.ax-xl{font-size:1.125rem;line-height:1.75rem}ax-button.ax-xl>button{padding-left:2rem;padding-right:2rem}ax-button.ax-xl.ax-button-icon{font-size:1.5rem}ax-button.ax-xs.ax-button-icon,ax-button.ax-sm.ax-button-icon{font-size:1rem}ax-button.ax-button-icon{height:var(--ax-size-default);width:var(--ax-size-default);font-size:1.25rem}ax-button.ax-state-disabled,ax-button.ax-state-loading{opacity:.5}ax-button.ax-state-disabled>button,ax-button.ax-state-loading>button{cursor:not-allowed}ax-button>button{position:relative;display:inline-flex;height:100%;width:100%;align-items:center;justify-content:center;overflow:hidden;border-radius:var(--ax-rounded-border-default);padding-left:1rem;padding-right:1rem;outline-color:transparent}ax-button>button.ax-state-focus:focus,ax-button>button:focus-visible{outline-width:2px;outline-offset:2px;outline-color:#000}ax-button>button .ax-button-text{white-space:nowrap;padding-left:.5rem;padding-right:.5rem;font-weight:500;line-height:1}ax-button ax-button-item.ax-divided{border-bottom-width:1px!important;border-color:rgba(var(--ax-color-border-default))!important}\n"] }]
|
91
|
+
], template: "<button [axRipple] [disabled]=\"disabled\" [attr.tabindex]=\"tabIndex\" (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\" (click)=\"_handleClick($event)\" [attr.type]=\"type\">\n <ng-content select=\"ax-prefix, ax-loading, ax-loading-spinner, ax-icon\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n\n @if(text){\n <span class=\"ax-button-text\">{{ text }}</span>\n }\n\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-dropdown-panel\"> </ng-content>\n <ng-content select=\".tab-content\"> </ng-content>\n</button>", styles: ["ax-button{position:relative;display:inline-flex;height:var(--ax-size-default);cursor:pointer;align-items:center;justify-content:center;border-radius:var(--ax-rounded-border-default);font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-button.ax-xs{font-size:.75rem;line-height:1rem}ax-button.ax-xs>button{padding-left:.25rem;padding-right:.25rem}ax-button.ax-sm>button{padding-left:.5rem;padding-right:.5rem}ax-button.ax-sm,ax-button.ax-md{font-size:.875rem;line-height:1.25rem}ax-button.ax-lg{font-size:1rem;line-height:1.25rem}ax-button.ax-lg>button{padding-left:1.5rem;padding-right:1.5rem}ax-button.ax-xl{font-size:1.125rem;line-height:1.75rem}ax-button.ax-xl>button{padding-left:2rem;padding-right:2rem}ax-button.ax-xl.ax-button-icon{font-size:1.5rem}ax-button.ax-xs.ax-button-icon,ax-button.ax-sm.ax-button-icon{font-size:1rem}ax-button.ax-button-icon{height:var(--ax-size-default);width:var(--ax-size-default);font-size:1.25rem}ax-button.ax-state-disabled,ax-button.ax-state-loading{opacity:.5}ax-button.ax-state-disabled>button,ax-button.ax-state-loading>button{cursor:not-allowed}ax-button>button{position:relative;display:inline-flex;height:100%;width:100%;align-items:center;justify-content:center;overflow:hidden;border-radius:var(--ax-rounded-border-default);padding-left:1rem;padding-right:1rem;outline-color:transparent}ax-button>button.ax-state-focus:focus,ax-button>button:focus-visible{outline-width:2px;outline-offset:2px;outline-color:#000;border-radius:inherit}ax-button>button .ax-button-text{white-space:nowrap;padding-left:.5rem;padding-right:.5rem;font-weight:500;line-height:1}ax-button ax-button-item.ax-divided{border-bottom-width:1px!important;border-color:rgba(var(--ax-color-border-default))!important}\n"] }]
|
92
92
|
}], propDecorators: { type: [{
|
93
93
|
type: Input
|
94
94
|
}], __hostClass: [{
|
@@ -23,6 +23,7 @@ export class AXDataSource {
|
|
23
23
|
return this._isLoading;
|
24
24
|
}
|
25
25
|
constructor(config) {
|
26
|
+
this.useCache = true;
|
26
27
|
this._totalCount = 0;
|
27
28
|
this._items = [];
|
28
29
|
this.fetchedPages = new Set();
|
@@ -38,11 +39,12 @@ export class AXDataSource {
|
|
38
39
|
}
|
39
40
|
load() {
|
40
41
|
const page = this._page;
|
41
|
-
if (this.fetchedPages.has(page)) {
|
42
|
+
if (this.fetchedPages.has(page) && this.useCache) {
|
42
43
|
return;
|
43
44
|
}
|
44
45
|
this.setLoadingState(true);
|
45
46
|
this.fetchedPages.add(page);
|
47
|
+
this._query.take = this.config.pageSize;
|
46
48
|
this._query.skip = page * this.config.pageSize;
|
47
49
|
this.config
|
48
50
|
.load({ ...this._query })
|
@@ -76,6 +78,10 @@ export class AXDataSource {
|
|
76
78
|
this.load();
|
77
79
|
}
|
78
80
|
}
|
81
|
+
setPageSize(pageSize) {
|
82
|
+
this.config.pageSize = pageSize;
|
83
|
+
this.load();
|
84
|
+
}
|
79
85
|
filter(value) {
|
80
86
|
this._query.filter = value;
|
81
87
|
}
|
@@ -124,4 +130,4 @@ export function convertArrayToDataSource(items, options = { key: 'id', pageSize:
|
|
124
130
|
};
|
125
131
|
return new AXDataSource(config);
|
126
132
|
}
|
127
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YXNvdXJjZS5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9jb21tb24vc3JjL2xpYi9jbGFzc2VzL2RhdGFzb3VyY2UuY2xhc3MudHMiXSwibmFtZXMiOltdLCJtYXBw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JiYgY1t0aGlzLmNvbmZpZy5rZXldID09IGtleSkpO1xuICAgIGlmIChmcm9tQ2FjaGUpIHJldHVybiBmcm9tQ2FjaGU7XG4gICAgcmV0dXJuIHRoaXMuY29uZmlnLmJ5S2V5ID8gdGhpcy5jb25maWcuYnlLZXkoa2V5KSA6IG51bGw7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGNvbnZlcnRBcnJheVRvRGF0YVNvdXJjZTxUPihcbiAgaXRlbXM6IFRbXSxcbiAgb3B0aW9uczogeyBrZXk6IHN0cmluZzsgcGFnZVNpemU6IG51bWJlciB9ID0geyBrZXk6ICdpZCcsIHBhZ2VTaXplOiAxMDAgfSxcbik6IEFYRGF0YVNvdXJjZSB7XG4gIGNvbnN0IGNvbmZpZzogQVhEYXRhU291cmNlQ29uZmlnID0ge1xuICAgIGtleTogb3B0aW9ucy5rZXksXG4gICAgcGFnZVNpemU6IG9wdGlvbnMucGFnZVNpemUsXG4gICAgbG9hZDogKGU6IEFYRGF0YVNvdXJjZVF1ZXJ5KSA9PiB7XG4gICAgICBjb25zdCByZXN1bHQgPSBlLmZpbHRlciA/IGZpbHRlcihpdGVtcywgZS5maWx0ZXIpIDogaXRlbXM7XG4gICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKHtcbiAgICAgICAgaXRlbXM6IHJlc3VsdC5zbGljZShlLnNraXAsIGUuc2tpcCArIGUudGFrZSksXG4gICAgICAgIHRvdGFsOiByZXN1bHQubGVuZ3RoLFxuICAgICAgfSk7XG4gICAgfSxcbiAgICBieUtleTogKHY6IHVua25vd24pID0+IFByb21pc2UucmVzb2x2ZTxUPihpdGVtcy5maW5kKChjKSA9PiBjW29wdGlvbnMua2V5XSA9PSB2KSksXG4gIH07XG4gIHJldHVybiBuZXcgQVhEYXRhU291cmNlKGNvbmZpZyk7XG59XG4iXX0=
|
@@ -70,15 +70,11 @@ export class MXSelectionValueComponent extends MXValueComponent {
|
|
70
70
|
if (value == null || (isArray && value.length == 0)) {
|
71
71
|
return this.multiple ? [] : null;
|
72
72
|
}
|
73
|
-
const normalizedItems = isArray
|
74
|
-
? this.normalizeItemsList(value, true)
|
75
|
-
: this.normalizeItemsList([value], true);
|
73
|
+
const normalizedItems = isArray ? this.normalizeItemsList(value, true) : this.normalizeItemsList([value], true);
|
76
74
|
if (normalizedItems.length == 0) {
|
77
75
|
return this.multiple ? [] : null;
|
78
76
|
}
|
79
|
-
const result = this.multiple
|
80
|
-
? normalizedItems.map((c) => c[this.valueField])
|
81
|
-
: normalizedItems[0][this.valueField];
|
77
|
+
const result = this.multiple ? normalizedItems.map((c) => c[this.valueField]) : normalizedItems[0][this.valueField];
|
82
78
|
return result;
|
83
79
|
}
|
84
80
|
emitOnValueChangedEvent(oldValue, newValue) {
|
@@ -88,9 +84,7 @@ export class MXSelectionValueComponent extends MXValueComponent {
|
|
88
84
|
normalizeItemsList(items, findBykey = false) {
|
89
85
|
if (items == null)
|
90
86
|
return [];
|
91
|
-
return items
|
92
|
-
.filter((c) => c != null)
|
93
|
-
.map((i) => this.normalizeItem(i, findBykey));
|
87
|
+
return items.filter((c) => c != null).map((i) => this.normalizeItem(i, findBykey));
|
94
88
|
}
|
95
89
|
normalizeItem(item, findBykey = false) {
|
96
90
|
const complex = typeof item == 'object';
|
@@ -98,8 +92,7 @@ export class MXSelectionValueComponent extends MXValueComponent {
|
|
98
92
|
const cacheKey = `k-${key}`;
|
99
93
|
const hasText = !complex || item[this.textField] != null;
|
100
94
|
//
|
101
|
-
if (this.dataService.cacheList[cacheKey] &&
|
102
|
-
this.dataService.cacheList[cacheKey][this.textField])
|
95
|
+
if (this.dataService.cacheList[cacheKey] && this.dataService.cacheList[cacheKey][this.textField])
|
103
96
|
return this.dataService.cacheList[cacheKey];
|
104
97
|
//
|
105
98
|
const obj = {};
|
@@ -129,9 +122,7 @@ export class MXSelectionValueComponent extends MXValueComponent {
|
|
129
122
|
});
|
130
123
|
}
|
131
124
|
else if (existsItem) {
|
132
|
-
obj[this.valueField] = complex
|
133
|
-
? existsItem[this.valueField]
|
134
|
-
: existsItem;
|
125
|
+
obj[this.valueField] = complex ? existsItem[this.valueField] : existsItem;
|
135
126
|
}
|
136
127
|
else {
|
137
128
|
obj[this.valueField] = complex ? item[this.valueField] : item;
|
@@ -141,11 +132,7 @@ export class MXSelectionValueComponent extends MXValueComponent {
|
|
141
132
|
return obj;
|
142
133
|
}
|
143
134
|
_normalizeSelectedItems() {
|
144
|
-
const values = Array.isArray(this.value)
|
145
|
-
? this.value
|
146
|
-
: this.value != null
|
147
|
-
? [this.value]
|
148
|
-
: [];
|
135
|
+
const values = Array.isArray(this.value) ? this.value : this.value != null ? [this.value] : [];
|
149
136
|
this.dataService.selectedItems = values.map((v) => this.normalizeItem(v));
|
150
137
|
}
|
151
138
|
unselectItems(...items) {
|
@@ -153,20 +140,14 @@ export class MXSelectionValueComponent extends MXValueComponent {
|
|
153
140
|
this.commitValue([], true);
|
154
141
|
return;
|
155
142
|
}
|
156
|
-
const normalizeItems = Array.isArray(items)
|
157
|
-
? this.normalizeItemsList(items)
|
158
|
-
: [this.normalizeItem(items)];
|
143
|
+
const normalizeItems = Array.isArray(items) ? this.normalizeItemsList(items) : [this.normalizeItem(items)];
|
159
144
|
const newSelectedItems = this.selectedItems.filter((i) => !normalizeItems.some((n) => n[this.valueField] == i[this.valueField]));
|
160
145
|
this.commitValue(newSelectedItems, true);
|
161
146
|
}
|
162
147
|
selectItems(...items) {
|
163
148
|
if (items && items.length) {
|
164
|
-
let newSelectedItems = Array.isArray(this.value)
|
165
|
-
|
166
|
-
: [this.value];
|
167
|
-
const normalizeItems = Array.isArray(items)
|
168
|
-
? this.normalizeItemsList(items)
|
169
|
-
: [this.normalizeItem(items)];
|
149
|
+
let newSelectedItems = Array.isArray(this.value) ? this.value : [this.value];
|
150
|
+
const normalizeItems = Array.isArray(items) ? this.normalizeItemsList(items) : [this.normalizeItem(items)];
|
170
151
|
if (this.multiple) {
|
171
152
|
newSelectedItems = [...newSelectedItems, ...normalizeItems];
|
172
153
|
}
|
@@ -179,9 +160,7 @@ export class MXSelectionValueComponent extends MXValueComponent {
|
|
179
160
|
toggleSelect(...items) {
|
180
161
|
items?.forEach((item) => {
|
181
162
|
if (this.multiple) {
|
182
|
-
this.isItemSelected(item)
|
183
|
-
? this.unselectItems(item)
|
184
|
-
: this.selectItems(item);
|
163
|
+
this.isItemSelected(item) ? this.unselectItems(item) : this.selectItems(item);
|
185
164
|
}
|
186
165
|
else {
|
187
166
|
this.selectItems(item);
|
@@ -194,9 +173,7 @@ export class MXSelectionValueComponent extends MXValueComponent {
|
|
194
173
|
isItemDisabled(item) {
|
195
174
|
return (this.disabled ||
|
196
175
|
coerceBooleanProperty(item[this.disabledField]) === true ||
|
197
|
-
(this.disabledCallback
|
198
|
-
? this.disabledCallback({ item, index: -1 })
|
199
|
-
: false));
|
176
|
+
(this.disabledCallback ? this.disabledCallback({ item, index: -1 }) : false));
|
200
177
|
}
|
201
178
|
getDisplayText(item) {
|
202
179
|
const normalizeItem = this.normalizeItem(item);
|
@@ -216,4 +193,4 @@ export class MXSelectionValueComponent extends MXValueComponent {
|
|
216
193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: MXSelectionValueComponent, decorators: [{
|
217
194
|
type: Injectable
|
218
195
|
}] });
|
219
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0aW9uLWJhc2UuY29tcG9uZW50LmNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL2NvbW1vbi9zcmMvbGliL2NvbXBvbmVudHMvc2VsZWN0aW9uLWJhc2UuY29tcG9uZW50LmNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLHV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