ca-components 0.0.31 → 0.0.32
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/ca-search-multiple-states/ca-search-multiple-states.component.mjs +215 -49
- package/esm2022/lib/components/ca-search-multiple-states/models/chips.model.mjs +2 -0
- package/esm2022/lib/components/ca-search-multiple-states/models/grid-column.model.mjs +2 -0
- package/esm2022/lib/components/ca-search-multiple-states/models/tab-data.model.mjs +2 -0
- package/esm2022/lib/components/ca-search-multiple-states/utils/enums/chips-colors.enum.mjs +7 -0
- package/esm2022/lib/components/ca-search-multiple-states/utils/enums/keyboard-event-commands.enum.mjs +5 -0
- package/esm2022/lib/components/ca-search-multiple-states/utils/enums/search-count.enum.mjs +8 -0
- package/esm2022/lib/components/ca-search-multiple-states/utils/pipes/chip-class.pipe.mjs +25 -0
- package/esm2022/lib/components/ca-search-multiple-states/utils/services/search-multiple-states.service.mjs +28 -0
- package/esm2022/lib/services/truckassist-table.service.mjs +1 -1
- package/fesm2022/ca-components.mjs +264 -45
- package/fesm2022/ca-components.mjs.map +1 -1
- package/lib/components/ca-search-multiple-states/ca-search-multiple-states.component.d.ts +36 -19
- package/lib/components/ca-search-multiple-states/models/chips.model.d.ts +6 -0
- package/lib/components/ca-search-multiple-states/models/grid-column.model.d.ts +23 -0
- package/lib/components/ca-search-multiple-states/models/tab-data.model.d.ts +13 -0
- package/lib/components/ca-search-multiple-states/utils/enums/chips-colors.enum.d.ts +5 -0
- package/lib/components/ca-search-multiple-states/utils/enums/keyboard-event-commands.enum.d.ts +3 -0
- package/lib/components/ca-search-multiple-states/utils/enums/search-count.enum.d.ts +6 -0
- package/lib/components/ca-search-multiple-states/utils/pipes/chip-class.pipe.d.ts +9 -0
- package/lib/components/ca-search-multiple-states/utils/services/search-multiple-states.service.d.ts +11 -0
- package/package.json +1 -1
- package/src/assets/ca-components/svg/search-multiple-states/clear-search.svg +2 -2
- package/esm2022/lib/components/ca-search-multiple-states/utils/config/input-config.mjs +0 -9
- package/lib/components/ca-search-multiple-states/utils/config/input-config.d.ts +0 -2
|
@@ -1,24 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { SearchMultipleStatesRoutes } from '../ca-search-multiple-states/utils/svg-routes/search-multiple-states.routes';
|
|
3
|
-
import {
|
|
3
|
+
import { CaSearchMultipleStatesService } from './utils/services/search-multiple-states.service';
|
|
4
|
+
import { ChipClassPipe } from './utils/pipes/chip-class.pipe';
|
|
5
|
+
import { ChipsModel } from './models/chips.model';
|
|
6
|
+
import { TabData } from './models/tab-data.model';
|
|
4
7
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class CaSearchMultipleStatesComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
export declare class CaSearchMultipleStatesComponent implements OnInit, OnDestroy {
|
|
9
|
+
private searchMultipleStatesService;
|
|
10
|
+
chipClassPipe: ChipClassPipe;
|
|
11
|
+
tableSearchInput: ElementRef;
|
|
12
|
+
toolbarSearch?: boolean;
|
|
13
|
+
selectedTabData: TabData;
|
|
14
|
+
searchType: string;
|
|
15
|
+
chips: ChipsModel[];
|
|
16
|
+
openSearch: boolean;
|
|
17
|
+
searchText: string;
|
|
18
|
+
searchIsActive: boolean;
|
|
19
|
+
chipToDelete: number;
|
|
20
|
+
private chipsForHighlightSearch;
|
|
21
|
+
private typingTimeout;
|
|
22
|
+
constructor(searchMultipleStatesService: CaSearchMultipleStatesService, chipClassPipe: ChipClassPipe);
|
|
23
|
+
ngOnInit(): void;
|
|
24
|
+
toggleSearch(): void;
|
|
25
|
+
onTyping(event: MouseEvent | KeyboardEvent): void;
|
|
26
|
+
private isKeyboardEvent;
|
|
27
|
+
onEnter(): void;
|
|
28
|
+
private sendHighlightSearchOnTyping;
|
|
29
|
+
private sendHighlightSearchOnEnter;
|
|
30
|
+
handleClearClick(): void;
|
|
31
|
+
private checkChips;
|
|
32
|
+
onDeleteChip(index: number): void;
|
|
33
|
+
deleteAllChips(): void;
|
|
34
|
+
private getChipColor;
|
|
35
|
+
private getChipQuery;
|
|
21
36
|
getSvgPath(propertyName: keyof typeof SearchMultipleStatesRoutes): string;
|
|
37
|
+
trackByIdentity(index: number, chip: ChipsModel): number;
|
|
38
|
+
ngOnDestroy(): void;
|
|
22
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<CaSearchMultipleStatesComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CaSearchMultipleStatesComponent, "app-ca-search-multiple-states", never, {}
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CaSearchMultipleStatesComponent, "app-ca-search-multiple-states", never, { "toolbarSearch": { "alias": "toolbarSearch"; "required": false; }; "selectedTabData": { "alias": "selectedTabData"; "required": false; }; "searchType": { "alias": "searchType"; "required": false; }; }, {}, never, never, true, never>;
|
|
24
41
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface GridColumn {
|
|
2
|
+
avatar: null | string;
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
export: boolean;
|
|
5
|
+
field: string;
|
|
6
|
+
filter: string;
|
|
7
|
+
filterable: boolean;
|
|
8
|
+
hidden: boolean;
|
|
9
|
+
hoverTemplate: null | string;
|
|
10
|
+
index: number;
|
|
11
|
+
isActionColumn: boolean;
|
|
12
|
+
isNumeric: boolean;
|
|
13
|
+
isPined: boolean;
|
|
14
|
+
isSelectColumn: boolean;
|
|
15
|
+
name: string;
|
|
16
|
+
ngTemplate: string;
|
|
17
|
+
progress: null | string;
|
|
18
|
+
resizable: boolean;
|
|
19
|
+
sortable: boolean;
|
|
20
|
+
tableHeadTitle: string;
|
|
21
|
+
title: string;
|
|
22
|
+
width: number;
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GridColumn } from './grid-column.model';
|
|
2
|
+
export interface TabData {
|
|
3
|
+
extended: boolean;
|
|
4
|
+
field: string;
|
|
5
|
+
gridNameTitle: string;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
length: number;
|
|
8
|
+
stateName: string;
|
|
9
|
+
tableConfiguration: string;
|
|
10
|
+
title: string;
|
|
11
|
+
gridColumns: GridColumn;
|
|
12
|
+
data: any;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ChipClassPipe implements PipeTransform {
|
|
4
|
+
transform(i: number, chips: any[], chipToDelete: number): {
|
|
5
|
+
[key: string]: boolean;
|
|
6
|
+
};
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChipClassPipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ChipClassPipe, "chipClass", true>;
|
|
9
|
+
}
|
package/lib/components/ca-search-multiple-states/utils/services/search-multiple-states.service.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CaSearchMultipleStatesService {
|
|
3
|
+
private searchTableData;
|
|
4
|
+
currentSearchTableData: import("rxjs").Observable<any>;
|
|
5
|
+
sendCurrentSearchTableData(search: any): void;
|
|
6
|
+
private chipsForHighlightSearchToTable;
|
|
7
|
+
currentChipsForHighlightSearchToTable: import("rxjs").Observable<string[]>;
|
|
8
|
+
sendChipsForHighlightSearchToTable(chip: string[]): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CaSearchMultipleStatesService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CaSearchMultipleStatesService>;
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect
|
|
1
|
+
<svg class="d-flex" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="18" height="18" rx="1" fill="white" fill-opacity="0.7"/>
|
|
3
3
|
<path d="M10.8572 9.0001L13.6428 6.21429C13.807 6.05005 13.8992 5.82731 13.8992 5.59505C13.8992 5.3628 13.807 5.14005 13.6428 4.97581L13.0236 4.35657C12.8593 4.19235 12.6366 4.1001 12.4044 4.1001C12.1721 4.1001 11.9494 4.19235 11.7852 4.35657L9.0004 7.14237L6.21403 4.35657C6.04981 4.19235 5.82708 4.1001 5.59484 4.1001C5.3626 4.1001 5.13988 4.19235 4.97565 4.35657L4.35646 4.97581C4.19225 5.14005 4.10001 5.3628 4.10001 5.59505C4.10001 5.82731 4.19225 6.05005 4.35646 6.21429L7.14203 9.0001L4.35725 11.7859C4.19304 11.9501 4.1008 12.1729 4.1008 12.4051C4.1008 12.6374 4.19304 12.8601 4.35725 13.0244L4.97644 13.6436C5.14067 13.8078 5.3634 13.9001 5.59563 13.9001C5.82787 13.9001 6.0506 13.8078 6.21483 13.6436L9.0004 10.8578L11.786 13.6436C11.9502 13.8078 12.1729 13.9001 12.4052 13.9001C12.6374 13.9001 12.8601 13.8078 13.0244 13.6436L13.6436 13.0244C13.8078 12.8601 13.9 12.6374 13.9 12.4051C13.9 12.1729 13.8078 11.9501 13.6436 11.7859L10.8572 9.0001Z" fill="#1D1D1D"/>
|
|
4
4
|
</svg>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const inputConfig = {
|
|
2
|
-
name: 'search-multiple-states',
|
|
3
|
-
label: 'Find',
|
|
4
|
-
isDisabled: false,
|
|
5
|
-
type: 'search-multiple-states',
|
|
6
|
-
blackInput: true,
|
|
7
|
-
hideClear: true,
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2EtY29tcG9uZW50cy9zcmMvbGliL2NvbXBvbmVudHMvY2Etc2VhcmNoLW11bHRpcGxlLXN0YXRlcy91dGlscy9jb25maWcvaW5wdXQtY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sQ0FBQyxNQUFNLFdBQVcsR0FBYTtJQUNqQyxJQUFJLEVBQUUsd0JBQXdCO0lBQzlCLEtBQUssRUFBRSxNQUFNO0lBQ2IsVUFBVSxFQUFFLEtBQUs7SUFDakIsSUFBSSxFQUFFLHdCQUF3QjtJQUM5QixVQUFVLEVBQUUsSUFBSTtJQUNoQixTQUFTLEVBQUUsSUFBSTtDQUNsQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSUNhSW5wdXQgfSBmcm9tICcuLi8uLi8uLi9jYS1pbnB1dC9jb25maWcvY2EtaW5wdXQuY29uZmlnJztcblxuZXhwb3J0IGNvbnN0IGlucHV0Q29uZmlnOiBJQ2FJbnB1dCA9IHtcbiAgICBuYW1lOiAnc2VhcmNoLW11bHRpcGxlLXN0YXRlcycsXG4gICAgbGFiZWw6ICdGaW5kJyxcbiAgICBpc0Rpc2FibGVkOiBmYWxzZSxcbiAgICB0eXBlOiAnc2VhcmNoLW11bHRpcGxlLXN0YXRlcycsXG4gICAgYmxhY2tJbnB1dDogdHJ1ZSxcbiAgICBoaWRlQ2xlYXI6IHRydWUsXG59O1xuIl19
|