carriera-intern-components 1.1.26 → 1.1.27

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.
Files changed (23) hide show
  1. package/app/components/input/models/input.model.d.ts +1 -0
  2. package/app/components/list-contact-dropdown/list-contact-dropdown.component.d.ts +39 -0
  3. package/app/components/list-contact-dropdown/models/contact.interface.d.ts +20 -0
  4. package/app/components/list-contact-dropdown/pipes/contact-count.pipe.d.ts +8 -0
  5. package/app/components/list-contact-dropdown/pipes/contacts-height.pipe.d.ts +11 -0
  6. package/app/components/list-contact-dropdown/pipes/departments-height.pipe.d.ts +11 -0
  7. package/app/components/list-contact-dropdown/pipes/map-contacts.pipe.d.ts +8 -0
  8. package/app/components/rating_review/pipes/date-formating.pipe.d.ts +7 -0
  9. package/app/components/rating_review/rating-review/rating-review/rating-review.component.d.ts +41 -0
  10. package/app/components/rating_review/review-modal/review-modal.component.d.ts +4 -1
  11. package/app/components/rating_review/single-review/single-review.component.d.ts +17 -19
  12. package/app/utils/constants/input-character-sets.constants.d.ts +2 -2
  13. package/fesm2022/carriera-intern-components.mjs +523 -77
  14. package/fesm2022/carriera-intern-components.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/public/assets/icons/fuel-contact/cai-contact.svg +3 -0
  17. package/public/assets/icons/interaction/cai-dislike.svg +2 -2
  18. package/public/assets/icons/interaction/cai-like.svg +2 -2
  19. package/public/assets/json/icons.json +5 -1
  20. package/public-api.d.ts +2 -0
  21. package/src/styles/_variables.scss +3 -0
  22. package/src/styles/review_variables.scss +1 -0
  23. package/src/styles/tooltip.scss +3 -1
@@ -49,6 +49,7 @@ export interface CaiInputConfig {
49
49
  enabledCharacters?: string[];
50
50
  spacesAllowed?: number;
51
51
  toSlice?: number;
52
+ placeholderColor?: string;
52
53
  }
53
54
  export type CustomError = {
54
55
  name: string;
@@ -0,0 +1,39 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { UntypedFormGroup } from '@angular/forms';
3
+ import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap';
4
+ import { Contact } from './models/contact.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ListContactDropdownComponent {
7
+ private elementRef;
8
+ dropdown: NgbDropdown;
9
+ dropdownMenu: ElementRef<HTMLDivElement>;
10
+ constructor(elementRef: ElementRef);
11
+ onDocumentClick(event: Event): void;
12
+ id: import("@angular/core").InputSignal<string>;
13
+ contacts: import("@angular/core").InputSignal<Contact[]>;
14
+ onAdd: import("@angular/core").OutputEmitterRef<void>;
15
+ onDelete: import("@angular/core").OutputEmitterRef<void>;
16
+ onEdit: import("@angular/core").OutputEmitterRef<void>;
17
+ onOpen: import("@angular/core").OutputEmitterRef<void>;
18
+ onClose: import("@angular/core").OutputEmitterRef<void>;
19
+ closing: import("@angular/core").WritableSignal<boolean>;
20
+ open: import("@angular/core").WritableSignal<boolean>;
21
+ selectedIds: import("@angular/core").WritableSignal<{
22
+ departmentId: number;
23
+ contactId: number[];
24
+ }[]>;
25
+ form: UntypedFormGroup;
26
+ selectedContactIds(): number[];
27
+ closeDropdown(): void;
28
+ openDropdown(): void;
29
+ isDepartmentOpen(departmentId: number | null | undefined): boolean;
30
+ isContactOpen(contactId: number | null | undefined): boolean;
31
+ handleOpenDropdown(event: Event): void;
32
+ emitOnAdd(event: Event): void;
33
+ emitOnEdit(event: Event): void;
34
+ emitOnDelete(event: Event): void;
35
+ handleContactClick(event: Event, contactId: number): void;
36
+ handleDepartmentClick(event: Event, departmentId: number): void;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListContactDropdownComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListContactDropdownComponent, "cai-list-contact-dropdown", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "contacts": { "alias": "contacts"; "required": false; "isSignal": true; }; }, { "onAdd": "onAdd"; "onDelete": "onDelete"; "onEdit": "onEdit"; "onOpen": "onOpen"; "onClose": "onClose"; }, never, never, true, never>;
39
+ }
@@ -0,0 +1,20 @@
1
+ export interface Contact {
2
+ id?: number | null;
3
+ brokerId?: number | null;
4
+ shipperId?: number | null;
5
+ email?: string | null;
6
+ phone?: string | null;
7
+ contactName?: string | null;
8
+ extensionPhone?: string | null;
9
+ department?: Department | null;
10
+ }
11
+ export interface Department {
12
+ id?: number | null;
13
+ name?: string | null;
14
+ count?: number | null;
15
+ companyUsers?: any | null;
16
+ }
17
+ export interface ContactList {
18
+ department?: Department;
19
+ contacts?: Contact[];
20
+ }
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { ContactList } from '../models/contact.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ContactCountPipe implements PipeTransform {
5
+ transform(contactList: ContactList[]): number;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContactCountPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<ContactCountPipe, "contactCount", true>;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { ContactList } from '../models/contact.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ContactsHeightPipe implements PipeTransform {
5
+ transform(departmentId: number, contactList: ContactList, selectedIds: {
6
+ departmentId: number;
7
+ contactId: number[];
8
+ }[]): number;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContactsHeightPipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<ContactsHeightPipe, "contactsHeight", true>;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { ContactList } from '../models/contact.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DepartmentsHeightPipe implements PipeTransform {
5
+ transform(contactLists: ContactList[], selectedIds: {
6
+ departmentId: number;
7
+ contactId: number[];
8
+ }[]): number;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<DepartmentsHeightPipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<DepartmentsHeightPipe, "departmentsHeight", true>;
11
+ }
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { Contact, ContactList } from '../models/contact.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class MapContactsPipe implements PipeTransform {
5
+ transform(contacts: Contact[], searchValue: string | null): ContactList[];
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapContactsPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<MapContactsPipe, "mapContacts", true>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DateFormatingPipe implements PipeTransform {
4
+ transform(value: Date | string | number): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateFormatingPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<DateFormatingPipe, "dateFormating", true>;
7
+ }
@@ -0,0 +1,41 @@
1
+ import { SimpleChanges } from '@angular/core';
2
+ import { IReview } from '../../../../models/review.model';
3
+ import * as i0 from "@angular/core";
4
+ export declare class RatingReviewComponent {
5
+ ngOnInit(): void;
6
+ ngOnChanges(changes: SimpleChanges): void;
7
+ ratingReviews: IReview[];
8
+ modaltype: string;
9
+ presentReviews: IReview[];
10
+ currentType: string;
11
+ countLikes: number;
12
+ countDislikes: number;
13
+ countReviews: number;
14
+ onReturnMost(): string;
15
+ /**
16
+ * Emits an event when a review is successfully deleted.
17
+ * This event carries no data.
18
+ */
19
+ /**
20
+ * Initializes review data when the component is initialized or when the `reviews` input changes.
21
+ * It copies the original reviews array, resets counters, calculates new counts, and
22
+ * sets the `disabled` signal if a personal review already exists.
23
+ * @private
24
+ */
25
+ private initializeReviewsData;
26
+ /**
27
+ * Resets the counts for likes, dislikes, and written reviews to zero.
28
+ * @private
29
+ */
30
+ private resetCounts;
31
+ /**
32
+ * Iterates through the `reviews` array and calculates the total number of likes,
33
+ * dislikes, and written reviews (those with a non-empty `value`).
34
+ * @private
35
+ */
36
+ private calculateReviewCounts;
37
+ show: import("@angular/core").WritableSignal<boolean>;
38
+ onToggleShow(): void;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<RatingReviewComponent, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<RatingReviewComponent, "cai-rating-review", never, { "ratingReviews": { "alias": "ratingReviews"; "required": true; }; "modaltype": { "alias": "modaltype"; "required": true; }; }, {}, never, never, true, never>;
41
+ }
@@ -30,10 +30,13 @@ export declare class ReviewModalComponent implements OnInit, OnChanges {
30
30
  * This review is marked as "personal" and pre-filled with basic user data.
31
31
  */
32
32
  onAddReview(): void;
33
- getReview(ev: {
33
+ onEditedReview(ev: {
34
34
  review: IReview;
35
35
  edited: boolean;
36
36
  }): void;
37
+ onGetReview(ev: {
38
+ review: IReview;
39
+ }): void;
37
40
  /**
38
41
  * Initializes review data when the component is initialized or when the `reviews` input changes.
39
42
  * It copies the original reviews array, resets counters, calculates new counts, and
@@ -1,42 +1,40 @@
1
1
  import { IReview } from './../../../models/review.model';
2
- import { DatePipe } from '@angular/common';
3
2
  import { EventEmitter } from '@angular/core';
4
3
  import { ReviewType } from '../enums/review-type.enum';
4
+ import { DateFormatingPipe } from '../pipes/date-formating.pipe';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class SingleReviewComponent {
7
- private datePipe;
8
- constructor(datePipe: DatePipe);
7
+ private dateFormating;
8
+ constructor(dateFormating: DateFormatingPipe);
9
9
  ReviewType: typeof ReviewType;
10
- ngOnInit(): void;
11
- type: string;
12
- singleReview: IReview;
13
10
  newTime: import("@angular/core").WritableSignal<string>;
14
- deleteReview: EventEmitter<number>;
15
- currentRating: IReview['thumb'];
16
11
  currentContent: import("@angular/core").WritableSignal<string>;
17
- addRating: EventEmitter<{
18
- rating: IReview["thumb"];
19
- }>;
20
- confirmed: boolean;
21
- canceled: boolean;
12
+ expanded: import("@angular/core").WritableSignal<boolean>;
13
+ canExpand: import("@angular/core").WritableSignal<boolean>;
22
14
  editing: import("@angular/core").WritableSignal<boolean>;
23
- ratingMarked: import("@angular/core").WritableSignal<boolean>;
24
- onRate(prop: IReview['thumb']): void;
25
15
  edited: import("@angular/core").WritableSignal<boolean>;
26
- onEdit(): void;
16
+ confirmed: boolean;
17
+ canceled: boolean;
18
+ type: string;
19
+ singleReview: IReview;
20
+ deleteReview: EventEmitter<number>;
27
21
  onAddedReview: EventEmitter<{
28
22
  review: IReview;
23
+ }>;
24
+ onEditedReview: EventEmitter<{
25
+ review: IReview;
29
26
  edited: boolean;
30
27
  }>;
28
+ ngOnInit(): void;
29
+ onRate(prop: string): void;
30
+ onEdit(): void;
31
31
  onSaveChanges(): void;
32
32
  onChangeContent(event: Event): void;
33
33
  onDelete(): void;
34
- expanded: import("@angular/core").WritableSignal<boolean>;
35
- canExpand: import("@angular/core").WritableSignal<boolean>;
36
34
  onExpandToggle(): void;
37
35
  renderedContent: import("@angular/core").Signal<string>;
38
36
  onCancelReview(): void;
39
37
  limitLength(event: KeyboardEvent): void;
40
38
  static ɵfac: i0.ɵɵFactoryDeclaration<SingleReviewComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<SingleReviewComponent, "cai-single-review", never, { "type": { "alias": "type"; "required": true; }; "singleReview": { "alias": "singleReview"; "required": true; }; }, { "deleteReview": "deleteReview"; "addRating": "addRating"; "onAddedReview": "onAddedReview"; }, never, never, true, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<SingleReviewComponent, "cai-single-review", never, { "type": { "alias": "type"; "required": true; }; "singleReview": { "alias": "singleReview"; "required": true; }; }, { "deleteReview": "deleteReview"; "onAddedReview": "onAddedReview"; "onEditedReview": "onEditedReview"; }, never, never, true, never>;
42
40
  }
@@ -11,8 +11,8 @@ export declare const INPUT_CHARACTER_SETS: {
11
11
  readonly ALPHANUMERIC: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z")[];
12
12
  readonly ALPHANUMERIC_WITH_SPACES: string[];
13
13
  readonly EMAIL_SPECIAL: readonly ["@", ".", "-", "_", "+"];
14
- readonly EMAIL_CHARACTERS: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "." | "@" | "+" | "-" | "_")[];
14
+ readonly EMAIL_CHARACTERS: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "." | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "@" | "+" | "-" | "_")[];
15
15
  readonly SPECIAL_EXCEPT_NAME_FRIENDLY: ("*" | "." | "," | "!" | "?" | ";" | ":" | "@" | "#" | "$" | "%" | "&" | "+" | "-" | "=" | "_" | "|" | "~" | "`" | "^" | "<" | ">" | "/" | "\\" | "(" | ")" | "[" | "]" | "{" | "}" | "\"" | "'")[];
16
- readonly NAME_CHARACTER_EXCLUSIONS: ("0" | "1" | "2" | "3" | "4" | "5" | "*" | "6" | "7" | "8" | "9" | "." | "," | "!" | "?" | ";" | ":" | "@" | "#" | "$" | "%" | "&" | "+" | "-" | "=" | "_" | "|" | "~" | "`" | "^" | "<" | ">" | "/" | "\\" | "(" | ")" | "[" | "]" | "{" | "}" | "\"" | "'")[];
16
+ readonly NAME_CHARACTER_EXCLUSIONS: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "*" | "." | "," | "!" | "?" | ";" | ":" | "@" | "#" | "$" | "%" | "&" | "+" | "-" | "=" | "_" | "|" | "~" | "`" | "^" | "<" | ">" | "/" | "\\" | "(" | ")" | "[" | "]" | "{" | "}" | "\"" | "'")[];
17
17
  readonly SPECIAL: ("*" | "." | "," | "!" | "?" | ";" | ":" | "@" | "#" | "$" | "%" | "&" | "+" | "-" | "=" | "_" | "|" | "~" | "`" | "^" | "<" | ">" | "/" | "\\" | "(" | ")" | "[" | "]" | "{" | "}" | "\"" | "'")[];
18
18
  };