carriera-intern-components 0.0.96 → 0.0.98
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/app/{directives → components/input/directives}/number-format.directive.d.ts +5 -1
- package/app/components/input/input.component.d.ts +36 -35
- package/app/components/input/models/dropdown.model.d.ts +194 -0
- package/app/components/input/models/index.d.ts +1 -1
- package/app/components/input/models/input.model.d.ts +10 -89
- package/app/components/input/pipes/filter-by-search.pipe.d.ts +2 -2
- package/fesm2022/carriera-intern-components.mjs +339 -252
- package/fesm2022/carriera-intern-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public/assets/icons/load/cai-weight.svg +3 -0
- package/public/assets/json/icons.json +4 -0
- package/app/components/input/models/dispatch.model.d.ts +0 -86
- /package/app/{directives → components/input/directives}/password.directive.d.ts +0 -0
|
@@ -7,6 +7,10 @@ export declare class NumberFormatDirective implements OnInit {
|
|
|
7
7
|
* Defaults to true, meaning formatting is active by default.
|
|
8
8
|
*/
|
|
9
9
|
appNumberFormat: import("@angular/core").InputSignal<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
max: import("@angular/core").InputSignal<number | undefined>;
|
|
10
14
|
/**
|
|
11
15
|
* Stores the unformatted, "real" numeric value of the input.
|
|
12
16
|
* This is the value that should be used for calculations or form submissions,
|
|
@@ -101,5 +105,5 @@ export declare class NumberFormatDirective implements OnInit {
|
|
|
101
105
|
*/
|
|
102
106
|
setRealValue(value: string): void;
|
|
103
107
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberFormatDirective, never>;
|
|
104
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NumberFormatDirective, "[appNumberFormat]", never, { "appNumberFormat": { "alias": "appNumberFormat"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
108
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NumberFormatDirective, "[appNumberFormat]", never, { "appNumberFormat": { "alias": "appNumberFormat"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
105
109
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
3
|
-
import { PasswordDirective } from '
|
|
4
|
-
import { NumberFormatDirective } from '
|
|
3
|
+
import { PasswordDirective } from './directives/password.directive';
|
|
4
|
+
import { NumberFormatDirective } from './directives/number-format.directive';
|
|
5
5
|
import { MaskDirective } from './directives/mask.directive';
|
|
6
6
|
import { NgbPopover } from '@ng-bootstrap/ng-bootstrap';
|
|
7
|
-
import { Bank, Broker, CaiInputConfig, Contact,
|
|
8
|
-
import { Dispatch, DispatchBoard } from './models';
|
|
7
|
+
import { Bank, Broker, CaiInputConfig, Contact, Dispatcher, DropdownOption, LabelColor, LabelOption, Shipper, Dispatch, DropdownArrays, DropdownOptions, TruckType, TrailerType } from './models';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
9
|
/**
|
|
11
10
|
* This component is a generic input component that can be used to create various types of inputs.
|
|
@@ -28,17 +27,19 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
28
27
|
- `reveal`: For password inputs, the number of characters to reveal from the end.
|
|
29
28
|
- `icon`: Name of an icon to display (e.g., `'cai-email'`).
|
|
30
29
|
- `iconColor`: Color of the displayed icon (e.g., `'#FF0000'`).
|
|
31
|
-
- `dropdown`: If `true`, the input is associated with a dropdown menu, can also have `'dispatch'`, `'ftl-dispatch'`, `'broker'`, `'contact'`, `'shipper'` or `'label'` variants.
|
|
32
|
-
- `options`: An array of options for the dropdown can be of type `DropdownOption[]` | `LabelOption[]` | `DispatchBoard[]` | `Broker[]` | `DepartmentContactsPair[]` | `Shipper[]` | `Bank[]`.
|
|
30
|
+
- `dropdown`: If `true`, the input is associated with a dropdown menu, can also have `'dispatch'`, `'ftl-dispatch'`, `'broker'`, `'contact'`, `'shipper'`, `'dispatcher'` or `'label'` variants.
|
|
31
|
+
- `options`: An array of options for the dropdown can be of type `DropdownOption[]` | `LabelOption[]` | `DispatchBoard[]` | `Broker[]` | `DepartmentContactsPair[]` | `Shipper[]` | `Bank[]` | `Dispatcher[]`.
|
|
33
32
|
- `labelColors`: An array of label colors for the label picker.
|
|
34
33
|
- `search`: Enables search within the dropdown.
|
|
35
34
|
- `add`: Enables 'add new' functionality in the dropdown.
|
|
36
35
|
- `placeholderBehavior`: Defines placeholder animation (`'dynamic'` , `'fade'`, `'static'`).
|
|
36
|
+
- `errorBehavior`: Defines error animation (`'static'`, `'dynamic'`, `'floating'`).
|
|
37
37
|
- `label`: An `aria-label` for accessibility.
|
|
38
|
-
- `list`: If `true`, the input
|
|
38
|
+
- `list`: If `true`, the input has no validation, no background and no separators for icons
|
|
39
39
|
- `mask`: A pattern string for input masking (e.g., `'(000) 000-0000'`).
|
|
40
40
|
- `min`: Minimum value for number inputs.
|
|
41
|
-
- `max`: Maximum value for number inputs or maximum length for text inputs.
|
|
41
|
+
- `max`: Maximum value for number inputs (e.g., `999` meaning 3 characters) or maximum length for text inputs in characters.
|
|
42
|
+
- `textTransform`: Text transformation for text inputs (`'capitalize'`, `'uppercase'`, `'lowercase'`).
|
|
42
43
|
- `step`: Step value for number inputs. Can also be `automatic` for automatic step calculation.
|
|
43
44
|
- `withButtons`: If `true`, adds increment/decrement buttons for number inputs.
|
|
44
45
|
- `autocomplete`: The HTML `autocomplete` attribute.
|
|
@@ -47,12 +48,13 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
47
48
|
- `optionValue`: The key of the option to use in the formControl for the selected option in the dropdown.
|
|
48
49
|
- `optionLabel`: The key of the option to use as the label in the dropdown.
|
|
49
50
|
- `subContent`: An optional slot for additional content to be displayed next to the content the user is entering. (ex. lbs, months, etc.)
|
|
51
|
+
- `removable`: If `true`, displays `cai-delete` icon over clear button.
|
|
50
52
|
*/
|
|
51
53
|
config: import("@angular/core").InputSignal<CaiInputConfig>;
|
|
52
54
|
/**
|
|
53
55
|
* Input property to hold the dropdown options.
|
|
54
56
|
*/
|
|
55
|
-
options: import("@angular/core").InputSignal<
|
|
57
|
+
options: import("@angular/core").InputSignal<DropdownArrays>;
|
|
56
58
|
/**
|
|
57
59
|
* Input property to hold the label colors for the label picker.
|
|
58
60
|
*/
|
|
@@ -72,19 +74,15 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
72
74
|
/**
|
|
73
75
|
* A signal that holds the locally added options.
|
|
74
76
|
*/
|
|
75
|
-
localOptions: import("@angular/core").WritableSignal<
|
|
77
|
+
localOptions: import("@angular/core").WritableSignal<DropdownArrays>;
|
|
76
78
|
/**
|
|
77
79
|
* A signal that holds the currently selected option from the dropdown.
|
|
78
80
|
*/
|
|
79
|
-
selectedOption: import("@angular/core").WritableSignal<
|
|
81
|
+
selectedOption: import("@angular/core").WritableSignal<DropdownOptions | null>;
|
|
80
82
|
/**
|
|
81
83
|
* A signal that indicates whether a new option is being added.
|
|
82
84
|
*/
|
|
83
85
|
isAdding: import("@angular/core").WritableSignal<boolean>;
|
|
84
|
-
/**
|
|
85
|
-
* A signal that holds the currently selected label from the label picker.
|
|
86
|
-
*/
|
|
87
|
-
selectedLabel: import("@angular/core").WritableSignal<LabelOption | null>;
|
|
88
86
|
/**
|
|
89
87
|
* A signal that holds the currently selected color from the label picker.
|
|
90
88
|
*/
|
|
@@ -93,24 +91,7 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
93
91
|
/**
|
|
94
92
|
* A signal that holds the currently selected dispatch board from the dispatch board picker.
|
|
95
93
|
*/
|
|
96
|
-
selectedDispatch: import("@angular/core").WritableSignal<Dispatch | null>;
|
|
97
94
|
foldedBoards: import("@angular/core").WritableSignal<number[]>;
|
|
98
|
-
/**
|
|
99
|
-
* A signal that holds the currently selected broker from the broker picker.
|
|
100
|
-
*/
|
|
101
|
-
selectedBroker: import("@angular/core").WritableSignal<Broker | null>;
|
|
102
|
-
/**
|
|
103
|
-
* A signal that holds the currently selected contact from the contact picker.
|
|
104
|
-
*/
|
|
105
|
-
selectedContact: import("@angular/core").WritableSignal<Contact | null>;
|
|
106
|
-
/**
|
|
107
|
-
* A signal that holds the currently selected shipper from the shipper picker.
|
|
108
|
-
*/
|
|
109
|
-
selectedShipper: import("@angular/core").WritableSignal<Shipper | null>;
|
|
110
|
-
/**
|
|
111
|
-
* A signal that holds the currently selected bank from the bank picker.
|
|
112
|
-
*/
|
|
113
|
-
selectedBank: import("@angular/core").WritableSignal<Bank | null>;
|
|
114
95
|
/**
|
|
115
96
|
* A computed signal that indicates whether the placeholder selected option should be shown.
|
|
116
97
|
*/
|
|
@@ -119,7 +100,7 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
119
100
|
* A computed signal that dynamically calculates the step value for number inputs.
|
|
120
101
|
*/
|
|
121
102
|
step: import("@angular/core").Signal<number>;
|
|
122
|
-
combinedOptions: import("@angular/core").Signal<
|
|
103
|
+
combinedOptions: import("@angular/core").Signal<DropdownArrays>;
|
|
123
104
|
dispatchCount: import("@angular/core").Signal<number>;
|
|
124
105
|
/**
|
|
125
106
|
* An output signal that emits the value of the added option.
|
|
@@ -133,6 +114,10 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
133
114
|
* An output signal that emits the `optionValue` or `id` of the changed dropdown option.
|
|
134
115
|
*/
|
|
135
116
|
onSelectionChange: import("@angular/core").OutputEmitterRef<any>;
|
|
117
|
+
/**
|
|
118
|
+
* An output signal that emits when the user clicks on the "CLEAR" button.
|
|
119
|
+
*/
|
|
120
|
+
onClear: import("@angular/core").OutputEmitterRef<void>;
|
|
136
121
|
inputRef: ElementRef<HTMLInputElement>;
|
|
137
122
|
dropdown: NgbPopover;
|
|
138
123
|
PasswordDirective: PasswordDirective;
|
|
@@ -146,12 +131,18 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
146
131
|
contactRef: any;
|
|
147
132
|
shipperRef: any;
|
|
148
133
|
bankRef: any;
|
|
134
|
+
dispatcherRef: any;
|
|
135
|
+
truckRef: any;
|
|
136
|
+
trailerRef: any;
|
|
149
137
|
selectedDispatchRef: any;
|
|
150
138
|
selectedLabelRef: any;
|
|
151
139
|
selectedBrokerRef: any;
|
|
152
140
|
selectedContactRef: any;
|
|
153
141
|
selectedShipperRef: any;
|
|
154
142
|
selectedBankRef: any;
|
|
143
|
+
selectedDispatcherRef: any;
|
|
144
|
+
selectedTruckRef: any;
|
|
145
|
+
selectedTrailerRef: any;
|
|
155
146
|
/**
|
|
156
147
|
* Constructor for the InputComponent.
|
|
157
148
|
* It injects NgControl to integrate with Angular's forms API.
|
|
@@ -241,7 +232,7 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
241
232
|
* @param option - The selected option.
|
|
242
233
|
* @param event - The MouseEvent that initiated the selection action.
|
|
243
234
|
*/
|
|
244
|
-
handleOption(option:
|
|
235
|
+
handleOption(option: DropdownOptions): void;
|
|
245
236
|
/**
|
|
246
237
|
* Adds a new option to the dropdown.
|
|
247
238
|
* @param option - The option to add.
|
|
@@ -259,6 +250,16 @@ export declare class InputComponent implements ControlValueAccessor {
|
|
|
259
250
|
activePercentageOfPaid: number;
|
|
260
251
|
status: string | null;
|
|
261
252
|
};
|
|
253
|
+
castAsDispatch(value: unknown): Dispatch | null;
|
|
254
|
+
castAsLabelOption(value: unknown): LabelOption | null;
|
|
255
|
+
castAsBroker(value: unknown): Broker | null;
|
|
256
|
+
castAsContact(value: unknown): Contact | null;
|
|
257
|
+
castAsShipper(value: unknown): Shipper | null;
|
|
258
|
+
castAsBank(value: unknown): Bank | null;
|
|
259
|
+
castAsDispatcher(value: unknown): Dispatcher | null;
|
|
260
|
+
castAsDropdownOption(value: unknown): DropdownOption | null;
|
|
261
|
+
castAsTruckOption(value: unknown): TruckType | null;
|
|
262
|
+
castAsTrailerOption(value: unknown): TrailerType | null;
|
|
262
263
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, [{ optional: true; self: true; }]>;
|
|
263
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "cai-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "labelColors": { "alias": "labelColors"; "required": false; "isSignal": true; }; }, { "onOptionAdded": "onOptionAdded"; "onAdd": "onAdd"; "onSelectionChange": "onSelectionChange"; }, never, never, true, never>;
|
|
264
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "cai-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "labelColors": { "alias": "labelColors"; "required": false; "isSignal": true; }; }, { "onOptionAdded": "onOptionAdded"; "onAdd": "onAdd"; "onSelectionChange": "onSelectionChange"; "onClear": "onClear"; }, never, never, true, never>;
|
|
264
265
|
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { AvatarColor, AvatarFile } from '../../avatar/models';
|
|
2
|
+
export type DropdownOption = {
|
|
3
|
+
id?: number;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export type Dispatch = {
|
|
7
|
+
id: number;
|
|
8
|
+
dispatchBoardId: number;
|
|
9
|
+
dispatcherId: number;
|
|
10
|
+
truck: Truck;
|
|
11
|
+
trailer?: Trailer | null;
|
|
12
|
+
driver: Driver;
|
|
13
|
+
coDriver?: Driver | null;
|
|
14
|
+
payType: string;
|
|
15
|
+
status?: Status | null;
|
|
16
|
+
currentLocationCoordinates?: {
|
|
17
|
+
latitude: number;
|
|
18
|
+
longitude: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type DispatchBoard = {
|
|
22
|
+
teamBoard: boolean;
|
|
23
|
+
id: number;
|
|
24
|
+
dispatcher: string | null;
|
|
25
|
+
count: number;
|
|
26
|
+
dispatches: Dispatch[];
|
|
27
|
+
};
|
|
28
|
+
export type Driver = {
|
|
29
|
+
id: number;
|
|
30
|
+
firstName: string;
|
|
31
|
+
lastName: string;
|
|
32
|
+
owner?: boolean | null;
|
|
33
|
+
avatarFile?: AvatarFile | null;
|
|
34
|
+
colorFlag?: AvatarColor | null;
|
|
35
|
+
status?: number;
|
|
36
|
+
address: string | null;
|
|
37
|
+
payType: {
|
|
38
|
+
name: string;
|
|
39
|
+
id: number;
|
|
40
|
+
};
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
};
|
|
43
|
+
export type Truck = {
|
|
44
|
+
id: number;
|
|
45
|
+
truckNumber: string;
|
|
46
|
+
status: number;
|
|
47
|
+
owner: string;
|
|
48
|
+
color: TruckColor;
|
|
49
|
+
truckType: TruckType;
|
|
50
|
+
truckMakeName?: string | null;
|
|
51
|
+
model?: string | null;
|
|
52
|
+
year: number;
|
|
53
|
+
};
|
|
54
|
+
export type TruckColor = {
|
|
55
|
+
id: number;
|
|
56
|
+
companyId?: number | null;
|
|
57
|
+
name: string;
|
|
58
|
+
code: string;
|
|
59
|
+
};
|
|
60
|
+
export type TruckType = {
|
|
61
|
+
id: number;
|
|
62
|
+
companyId?: number | null;
|
|
63
|
+
name: string;
|
|
64
|
+
logoName: string;
|
|
65
|
+
};
|
|
66
|
+
export type Trailer = {
|
|
67
|
+
id: number;
|
|
68
|
+
trailerNumber: string;
|
|
69
|
+
status: number;
|
|
70
|
+
owner: string | null;
|
|
71
|
+
trailerType: TrailerType;
|
|
72
|
+
trailerMakeName?: string | null;
|
|
73
|
+
model?: string | null;
|
|
74
|
+
year: number;
|
|
75
|
+
};
|
|
76
|
+
export type TrailerType = {
|
|
77
|
+
id: number;
|
|
78
|
+
companyId?: number | null;
|
|
79
|
+
name: string;
|
|
80
|
+
logoName: string;
|
|
81
|
+
hasVolume?: boolean | null;
|
|
82
|
+
};
|
|
83
|
+
export type Status = {
|
|
84
|
+
statusValue: {
|
|
85
|
+
name: string;
|
|
86
|
+
id: number;
|
|
87
|
+
};
|
|
88
|
+
statusString: string;
|
|
89
|
+
statusCheckInNumber: string;
|
|
90
|
+
};
|
|
91
|
+
export type LabelOption = {
|
|
92
|
+
id?: number;
|
|
93
|
+
name?: string | null;
|
|
94
|
+
colorId?: number;
|
|
95
|
+
color?: string | null;
|
|
96
|
+
code?: string | null;
|
|
97
|
+
hoverCode?: string | null;
|
|
98
|
+
count?: number;
|
|
99
|
+
createdAt?: string;
|
|
100
|
+
updatedAt?: string;
|
|
101
|
+
};
|
|
102
|
+
export type LabelColor = {
|
|
103
|
+
id?: number;
|
|
104
|
+
name?: string | null;
|
|
105
|
+
code?: string | null;
|
|
106
|
+
hoverCode?: string | null;
|
|
107
|
+
count?: number;
|
|
108
|
+
};
|
|
109
|
+
export type Broker = {
|
|
110
|
+
id?: number;
|
|
111
|
+
businessName?: string | null;
|
|
112
|
+
availableCredit?: number | null;
|
|
113
|
+
creditLimit?: number | null;
|
|
114
|
+
availableCreditType?: any | null;
|
|
115
|
+
payTerm?: any | null;
|
|
116
|
+
dnu?: boolean;
|
|
117
|
+
ban?: boolean;
|
|
118
|
+
status?: number;
|
|
119
|
+
loadsCount?: number;
|
|
120
|
+
revenue?: number | null;
|
|
121
|
+
};
|
|
122
|
+
export type DepartmentContactsPair = {
|
|
123
|
+
department?: Department;
|
|
124
|
+
contacts?: Contact[];
|
|
125
|
+
};
|
|
126
|
+
export type Department = {
|
|
127
|
+
id?: number;
|
|
128
|
+
name?: string | null;
|
|
129
|
+
count?: number;
|
|
130
|
+
companyUsers?: any | null;
|
|
131
|
+
};
|
|
132
|
+
export type Contact = {
|
|
133
|
+
id?: number;
|
|
134
|
+
brokerId?: number;
|
|
135
|
+
shipperId?: number;
|
|
136
|
+
phone?: string | null;
|
|
137
|
+
contactName?: string | null;
|
|
138
|
+
extensionPhone?: string | null;
|
|
139
|
+
};
|
|
140
|
+
export type Shipper = {
|
|
141
|
+
id?: number;
|
|
142
|
+
businessName?: string | null;
|
|
143
|
+
status?: number | null;
|
|
144
|
+
address?: Address | null;
|
|
145
|
+
longitude?: number | null;
|
|
146
|
+
latitude?: number | null;
|
|
147
|
+
receivingFrom?: string | null;
|
|
148
|
+
receivingTo?: string | null;
|
|
149
|
+
shippingFrom?: string | null;
|
|
150
|
+
shippingTo?: string | null;
|
|
151
|
+
receivingOpenTwentyFourHours?: boolean;
|
|
152
|
+
shippingOpenTwentyFourHours?: boolean;
|
|
153
|
+
pickupCount?: number;
|
|
154
|
+
deliveryCount?: number;
|
|
155
|
+
};
|
|
156
|
+
export type Address = {
|
|
157
|
+
city?: string | null;
|
|
158
|
+
state?: string | null;
|
|
159
|
+
county?: string | null;
|
|
160
|
+
address?: string | null;
|
|
161
|
+
street?: string | null;
|
|
162
|
+
streetNumber?: string | null;
|
|
163
|
+
country?: string | null;
|
|
164
|
+
zipCode?: string | null;
|
|
165
|
+
stateShortName?: string | null;
|
|
166
|
+
addressUnit?: string | null;
|
|
167
|
+
};
|
|
168
|
+
export type Bank = {
|
|
169
|
+
id?: number;
|
|
170
|
+
name?: string | null;
|
|
171
|
+
logoName?: string | null;
|
|
172
|
+
createdAt?: string;
|
|
173
|
+
updatedAt?: string;
|
|
174
|
+
};
|
|
175
|
+
export type Dispatcher = {
|
|
176
|
+
id: number;
|
|
177
|
+
userId: number | null;
|
|
178
|
+
fullName: string;
|
|
179
|
+
avatarFile: AvatarFile | null;
|
|
180
|
+
departmentId: number | null;
|
|
181
|
+
};
|
|
182
|
+
export type TruckOption = {
|
|
183
|
+
id: number;
|
|
184
|
+
companyId?: number | null;
|
|
185
|
+
name: string;
|
|
186
|
+
logoName: string;
|
|
187
|
+
};
|
|
188
|
+
export type TrailerOption = {
|
|
189
|
+
id: number;
|
|
190
|
+
companyId?: number | null;
|
|
191
|
+
name: string;
|
|
192
|
+
logoName: string;
|
|
193
|
+
hasVolume?: boolean | null;
|
|
194
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './input.model';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './dropdown.model';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Bank, Broker, Contact, DepartmentContactsPair, Dispatch, DispatchBoard, Dispatcher, DropdownOption, LabelOption, Shipper, TrailerOption, TruckOption } from './dropdown.model';
|
|
1
2
|
export interface CaiInputConfig {
|
|
2
3
|
type?: 'text' | 'password' | 'number';
|
|
3
4
|
name?: string;
|
|
@@ -7,11 +8,13 @@ export interface CaiInputConfig {
|
|
|
7
8
|
reveal?: number;
|
|
8
9
|
icon?: string | null;
|
|
9
10
|
iconColor?: string;
|
|
10
|
-
dropdown?: boolean |
|
|
11
|
+
dropdown?: boolean | DropdownType;
|
|
11
12
|
search?: boolean;
|
|
12
13
|
add?: boolean;
|
|
13
14
|
subcontent?: string;
|
|
15
|
+
textTransform?: 'capitalize' | 'uppercase' | 'lowercase';
|
|
14
16
|
placeholderBehavior?: 'dynamic' | 'fade' | 'static';
|
|
17
|
+
errorBehavior?: 'dynamic' | 'static' | 'floating';
|
|
15
18
|
label?: string;
|
|
16
19
|
mask?: string;
|
|
17
20
|
min?: number;
|
|
@@ -24,92 +27,10 @@ export interface CaiInputConfig {
|
|
|
24
27
|
passwordRequirements?: boolean;
|
|
25
28
|
optionValue?: string;
|
|
26
29
|
optionLabel?: string;
|
|
30
|
+
removable?: boolean;
|
|
27
31
|
}
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export type
|
|
33
|
-
id?: number;
|
|
34
|
-
name?: string | null;
|
|
35
|
-
colorId?: number;
|
|
36
|
-
color?: string | null;
|
|
37
|
-
code?: string | null;
|
|
38
|
-
hoverCode?: string | null;
|
|
39
|
-
count?: number;
|
|
40
|
-
createdAt?: string;
|
|
41
|
-
updatedAt?: string;
|
|
42
|
-
};
|
|
43
|
-
export type LabelColor = {
|
|
44
|
-
id?: number;
|
|
45
|
-
name?: string | null;
|
|
46
|
-
code?: string | null;
|
|
47
|
-
hoverCode?: string | null;
|
|
48
|
-
count?: number;
|
|
49
|
-
};
|
|
50
|
-
export type Broker = {
|
|
51
|
-
id?: number;
|
|
52
|
-
businessName?: string | null;
|
|
53
|
-
availableCredit?: number | null;
|
|
54
|
-
creditLimit?: number | null;
|
|
55
|
-
availableCreditType?: any | null;
|
|
56
|
-
payTerm?: any | null;
|
|
57
|
-
dnu?: boolean;
|
|
58
|
-
ban?: boolean;
|
|
59
|
-
status?: number;
|
|
60
|
-
loadsCount?: number;
|
|
61
|
-
revenue?: number | null;
|
|
62
|
-
};
|
|
63
|
-
export type DepartmentContactsPair = {
|
|
64
|
-
department?: Department;
|
|
65
|
-
contacts?: Contact[];
|
|
66
|
-
};
|
|
67
|
-
export type Department = {
|
|
68
|
-
id?: number;
|
|
69
|
-
name?: string | null;
|
|
70
|
-
count?: number;
|
|
71
|
-
companyUsers?: any | null;
|
|
72
|
-
};
|
|
73
|
-
export type Contact = {
|
|
74
|
-
id?: number;
|
|
75
|
-
brokerId?: number;
|
|
76
|
-
shipperId?: number;
|
|
77
|
-
phone?: string | null;
|
|
78
|
-
contactName?: string | null;
|
|
79
|
-
extensionPhone?: string | null;
|
|
80
|
-
};
|
|
81
|
-
export type Shipper = {
|
|
82
|
-
id?: number;
|
|
83
|
-
businessName?: string | null;
|
|
84
|
-
status?: number | null;
|
|
85
|
-
address?: Address | null;
|
|
86
|
-
longitude?: number | null;
|
|
87
|
-
latitude?: number | null;
|
|
88
|
-
receivingFrom?: string | null;
|
|
89
|
-
receivingTo?: string | null;
|
|
90
|
-
shippingFrom?: string | null;
|
|
91
|
-
shippingTo?: string | null;
|
|
92
|
-
receivingOpenTwentyFourHours?: boolean;
|
|
93
|
-
shippingOpenTwentyFourHours?: boolean;
|
|
94
|
-
pickupCount?: number;
|
|
95
|
-
deliveryCount?: number;
|
|
96
|
-
};
|
|
97
|
-
export type Address = {
|
|
98
|
-
city?: string | null;
|
|
99
|
-
state?: string | null;
|
|
100
|
-
county?: string | null;
|
|
101
|
-
address?: string | null;
|
|
102
|
-
street?: string | null;
|
|
103
|
-
streetNumber?: string | null;
|
|
104
|
-
country?: string | null;
|
|
105
|
-
zipCode?: string | null;
|
|
106
|
-
stateShortName?: string | null;
|
|
107
|
-
addressUnit?: string | null;
|
|
108
|
-
};
|
|
109
|
-
export type Bank = {
|
|
110
|
-
id?: number;
|
|
111
|
-
name?: string | null;
|
|
112
|
-
logoName?: string | null;
|
|
113
|
-
createdAt?: string;
|
|
114
|
-
updatedAt?: string;
|
|
115
|
-
};
|
|
32
|
+
export declare const DropdownTypes: readonly ["dispatch", "ftl-dispatch", "label", "broker", "contact", "shipper", "bank", "dispatcher", "truck", "trailer"];
|
|
33
|
+
export type DropdownType = (typeof DropdownTypes)[number];
|
|
34
|
+
export type DropdownArrays = DropdownOption[] | LabelOption[] | Broker[] | DispatchBoard[] | DepartmentContactsPair[] | Shipper[] | Dispatch[] | Bank[] | Dispatcher[] | TruckOption[] | TrailerOption[];
|
|
35
|
+
export type DropdownOptions = DropdownOption | LabelOption | Broker | Contact | Shipper | Dispatch | Bank | Dispatcher | TruckOption | TrailerOption;
|
|
36
|
+
export type DropdownKeys = DropdownOption[keyof DropdownOption] | LabelOption[keyof LabelOption] | Dispatch[keyof Dispatch] | Broker[keyof Broker] | Contact[keyof Contact] | Shipper[keyof Shipper] | Bank[keyof Bank] | Dispatcher[keyof Dispatcher] | TruckOption[keyof TruckOption] | TrailerOption[keyof TrailerOption];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { CaiInputConfig, DropdownArrays } from '../models';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class FilterBySearchPipe implements PipeTransform {
|
|
5
5
|
hasProperty<T extends object>(obj: T, prop: PropertyKey): prop is keyof T;
|
|
6
|
-
transform(options:
|
|
6
|
+
transform(options: DropdownArrays, value: string | undefined | null, type: CaiInputConfig['dropdown'], shouldSearch?: boolean, foldedBoards?: number[], label?: string): any[];
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterBySearchPipe, never>;
|
|
8
8
|
static ɵpipe: i0.ɵɵPipeDeclaration<FilterBySearchPipe, "filterBySearch", true>;
|
|
9
9
|
}
|