carriera-intern-components 1.1.24 → 1.1.25
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/components/copy/copy.component.d.ts +2 -1
- package/app/components/input/input.component.d.ts +1 -0
- package/app/components/input/models/input.model.d.ts +1 -0
- package/app/components/input/pipes/clear-tooltip.pipe.d.ts +7 -0
- package/app/components/input/pipes/slice-input.pipe.d.ts +7 -0
- package/app/components/rating_review/enums/review-type.enum.d.ts +5 -0
- package/app/components/rating_review/review-modal/review-modal.component.d.ts +95 -0
- package/app/components/rating_review/single-review/single-review.component.d.ts +42 -0
- package/app/models/review.model.d.ts +27 -0
- package/app/utils/constants/input-character-sets.constants.d.ts +1 -1
- package/fesm2022/carriera-intern-components.mjs +464 -9
- package/fesm2022/carriera-intern-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public/assets/icons/general/cai-sort-descending.svg +4 -0
- package/public/assets/json/icons.json +4 -0
- package/public-api.d.ts +1 -0
- package/src/styles/tooltip.scss +12 -0
- /package/app/components/input/pipes/{highlight-search.d.ts → highlight-search.pipe.d.ts} +0 -0
|
@@ -12,6 +12,7 @@ export declare class CopyComponent {
|
|
|
12
12
|
iconSize: import("@angular/core").InputSignal<number>;
|
|
13
13
|
iconColor: import("@angular/core").InputSignal<string | null>;
|
|
14
14
|
tooltipClass: import("@angular/core").InputSignal<string | null>;
|
|
15
|
+
inverse: import("@angular/core").InputSignal<boolean>;
|
|
15
16
|
copied: import("@angular/core").WritableSignal<boolean>;
|
|
16
17
|
eGeneralActions: typeof eGeneralActions;
|
|
17
18
|
eAlignment: typeof eAlignment;
|
|
@@ -19,5 +20,5 @@ export declare class CopyComponent {
|
|
|
19
20
|
onCopy(event: MouseEvent): void;
|
|
20
21
|
resetCopied(): void;
|
|
21
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<CopyComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CopyComponent, "cai-copy", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "copyTooltip": { "alias": "copyTooltip"; "required": false; "isSignal": true; }; "copyArea": { "alias": "copyArea"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; "iconColor": { "alias": "iconColor"; "required": false; "isSignal": true; }; "tooltipClass": { "alias": "tooltipClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CopyComponent, "cai-copy", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "copyTooltip": { "alias": "copyTooltip"; "required": false; "isSignal": true; }; "copyArea": { "alias": "copyArea"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; "iconColor": { "alias": "iconColor"; "required": false; "isSignal": true; }; "tooltipClass": { "alias": "tooltipClass"; "required": false; "isSignal": true; }; "inverse": { "alias": "inverse"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
23
24
|
}
|
|
@@ -389,6 +389,7 @@ export declare class InputComponent implements ControlValueAccessor, AfterViewIn
|
|
|
389
389
|
* Emits an event that parent components can listen to for loading more data
|
|
390
390
|
*/
|
|
391
391
|
onDropdownScrolledToBottom(isGroup?: boolean): void;
|
|
392
|
+
onDropdownBackgroundClick(event: MouseEvent): void;
|
|
392
393
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, [{ optional: true; self: true; }, null]>;
|
|
393
394
|
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; }; "preselectedOptions": { "alias": "preselectedOptions"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "labelColors": { "alias": "labelColors"; "required": false; "isSignal": true; }; "hideValidation": { "alias": "hideValidation"; "required": false; "isSignal": true; }; "showNoResults": { "alias": "showNoResults"; "required": false; "isSignal": true; }; "preselectedUnit": { "alias": "preselectedUnit"; "required": false; "isSignal": true; }; }, { "onBlur": "onBlur"; "onFocused": "onFocused"; "onValueChange": "onValueChange"; "onOptionAdded": "onOptionAdded"; "onAdd": "onAdd"; "onSelectionChange": "onSelectionChange"; "onSelectedObject": "onSelectedObject"; "onSelectedGroup": "onSelectedGroup"; "onClear": "onClear"; "onAutofill": "onAutofill"; "onScrolledToBottom": "onScrolledToBottom"; "onScrolledToBottomGroup": "onScrolledToBottomGroup"; "onSearch": "onSearch"; }, never, never, true, never>;
|
|
394
395
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ClearTooltipPipe implements PipeTransform {
|
|
4
|
+
transform(hasText: boolean, isAdding: boolean, isEdit: boolean, placeholderBehavior: string, multiple: boolean): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClearTooltipPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ClearTooltipPipe, "clearTooltip", true>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SliceInputPipe implements PipeTransform {
|
|
4
|
+
transform(input: string, toSlice: number): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SliceInputPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SliceInputPipe, "sliceInput", true>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { IReview } from './../../../models/review.model';
|
|
2
|
+
import { OnInit, OnChanges, SimpleChanges, EventEmitter } from '@angular/core';
|
|
3
|
+
import { ReviewType } from '../enums/review-type.enum';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ReviewModalComponent implements OnInit, OnChanges {
|
|
6
|
+
ReviewType: typeof ReviewType;
|
|
7
|
+
ngOnInit(): void;
|
|
8
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
9
|
+
ratingReviews: IReview[];
|
|
10
|
+
modaltype: string;
|
|
11
|
+
presentReviews: IReview[];
|
|
12
|
+
testReview: IReview;
|
|
13
|
+
currentType: string;
|
|
14
|
+
countLikes: number;
|
|
15
|
+
countDislikes: number;
|
|
16
|
+
countReviews: number;
|
|
17
|
+
onReturnMost(): string;
|
|
18
|
+
activeLikes: import("@angular/core").WritableSignal<boolean>;
|
|
19
|
+
activeDislikes: import("@angular/core").WritableSignal<boolean>;
|
|
20
|
+
activeReviews: import("@angular/core").WritableSignal<boolean>;
|
|
21
|
+
disabled: import("@angular/core").WritableSignal<boolean>;
|
|
22
|
+
addingReview: import("@angular/core").WritableSignal<boolean>;
|
|
23
|
+
/**
|
|
24
|
+
* Emits an event when a review is successfully deleted.
|
|
25
|
+
* This event carries no data.
|
|
26
|
+
*/
|
|
27
|
+
reviewDeleted: EventEmitter<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Adds a new empty review to the `presentReviews` list and sets `addingReview` to `true`.
|
|
30
|
+
* This review is marked as "personal" and pre-filled with basic user data.
|
|
31
|
+
*/
|
|
32
|
+
onAddReview(): void;
|
|
33
|
+
getReview(ev: {
|
|
34
|
+
review: IReview;
|
|
35
|
+
edited: boolean;
|
|
36
|
+
}): void;
|
|
37
|
+
/**
|
|
38
|
+
* Initializes review data when the component is initialized or when the `reviews` input changes.
|
|
39
|
+
* It copies the original reviews array, resets counters, calculates new counts, and
|
|
40
|
+
* sets the `disabled` signal if a personal review already exists.
|
|
41
|
+
* @private
|
|
42
|
+
*/
|
|
43
|
+
private initializeReviewsData;
|
|
44
|
+
/**
|
|
45
|
+
* Resets the counts for likes, dislikes, and written reviews to zero.
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
private resetCounts;
|
|
49
|
+
/**
|
|
50
|
+
* Iterates through the `reviews` array and calculates the total number of likes,
|
|
51
|
+
* dislikes, and written reviews (those with a non-empty `value`).
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
54
|
+
private calculateReviewCounts;
|
|
55
|
+
currentActiveFilter: string;
|
|
56
|
+
onSwitchActive(value: string): void;
|
|
57
|
+
/**
|
|
58
|
+
* Changes the displayed reviews in `presentReviews` based on the selected type.
|
|
59
|
+
* It filters the original `reviews` array to show only likes, dislikes,
|
|
60
|
+
* written reviews, or all reviews.
|
|
61
|
+
* @param type The type of reviews to display: 'likes', 'dislikes', 'reviews' (only written), or 'all'.
|
|
62
|
+
*/
|
|
63
|
+
onChangePresentReviews(type: 'likes' | 'dislikes' | 'reviews' | 'all' | 'rating'): void;
|
|
64
|
+
/**
|
|
65
|
+
* Updates the value and edit time of an existing review in the `presentReviews` list.
|
|
66
|
+
* Sets the `edited` flag to `true` for the modified review.
|
|
67
|
+
* @param updatedData An object containing the review's ID, the new text value, and the new edit time.
|
|
68
|
+
*/
|
|
69
|
+
onChangeValue(updatedData: {
|
|
70
|
+
id: number;
|
|
71
|
+
value: string;
|
|
72
|
+
newTime: string;
|
|
73
|
+
}): void;
|
|
74
|
+
/**
|
|
75
|
+
* Initiates the review deletion process.
|
|
76
|
+
* Currently, it logs a message to the console and emits the `reviewDeleted` event.
|
|
77
|
+
* The logic for actual removal from `presentReviews` is commented out.
|
|
78
|
+
* @param id The ID of the review to be deleted.
|
|
79
|
+
*/
|
|
80
|
+
onDeleteReview(id: number): void;
|
|
81
|
+
activeFilter: string;
|
|
82
|
+
/**
|
|
83
|
+
* Switches active state of an filter button.
|
|
84
|
+
* Initial state is all which selects all present reviews.
|
|
85
|
+
* @param value The value of selected filter.
|
|
86
|
+
*/
|
|
87
|
+
setActiveFilter(value: string): void;
|
|
88
|
+
personalReviewSet: boolean;
|
|
89
|
+
activeInput: boolean;
|
|
90
|
+
toggleActiveInput(): void;
|
|
91
|
+
hasPersonalReview: boolean;
|
|
92
|
+
onCheckPersonal(): void;
|
|
93
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReviewModalComponent, never>;
|
|
94
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReviewModalComponent, "cai-review-modal", never, { "ratingReviews": { "alias": "ratingReviews"; "required": true; }; "modaltype": { "alias": "modaltype"; "required": true; }; }, { "reviewDeleted": "reviewDeleted"; }, never, never, true, never>;
|
|
95
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IReview } from './../../../models/review.model';
|
|
2
|
+
import { DatePipe } from '@angular/common';
|
|
3
|
+
import { EventEmitter } from '@angular/core';
|
|
4
|
+
import { ReviewType } from '../enums/review-type.enum';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SingleReviewComponent {
|
|
7
|
+
private datePipe;
|
|
8
|
+
constructor(datePipe: DatePipe);
|
|
9
|
+
ReviewType: typeof ReviewType;
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
type: string;
|
|
12
|
+
singleReview: IReview;
|
|
13
|
+
newTime: import("@angular/core").WritableSignal<string>;
|
|
14
|
+
deleteReview: EventEmitter<number>;
|
|
15
|
+
currentRating: IReview['thumb'];
|
|
16
|
+
currentContent: import("@angular/core").WritableSignal<string>;
|
|
17
|
+
addRating: EventEmitter<{
|
|
18
|
+
rating: IReview["thumb"];
|
|
19
|
+
}>;
|
|
20
|
+
confirmed: boolean;
|
|
21
|
+
canceled: boolean;
|
|
22
|
+
editing: import("@angular/core").WritableSignal<boolean>;
|
|
23
|
+
ratingMarked: import("@angular/core").WritableSignal<boolean>;
|
|
24
|
+
onRate(prop: IReview['thumb']): void;
|
|
25
|
+
edited: import("@angular/core").WritableSignal<boolean>;
|
|
26
|
+
onEdit(): void;
|
|
27
|
+
onAddedReview: EventEmitter<{
|
|
28
|
+
review: IReview;
|
|
29
|
+
edited: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
onSaveChanges(): void;
|
|
32
|
+
onChangeContent(event: Event): void;
|
|
33
|
+
onDelete(): void;
|
|
34
|
+
expanded: import("@angular/core").WritableSignal<boolean>;
|
|
35
|
+
canExpand: import("@angular/core").WritableSignal<boolean>;
|
|
36
|
+
onExpandToggle(): void;
|
|
37
|
+
renderedContent: import("@angular/core").Signal<string>;
|
|
38
|
+
onCancelReview(): void;
|
|
39
|
+
limitLength(event: KeyboardEvent): void;
|
|
40
|
+
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>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Driver, Size } from '../components/avatar/models';
|
|
2
|
+
export interface IReview {
|
|
3
|
+
ratingId: number | null;
|
|
4
|
+
thumb: string | null;
|
|
5
|
+
reviewId: number;
|
|
6
|
+
comment: string;
|
|
7
|
+
isEdited: boolean;
|
|
8
|
+
companyUser: CompanyUser;
|
|
9
|
+
companyUserId: number;
|
|
10
|
+
isItCurrentCompanyUser: boolean;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CompanyUser {
|
|
15
|
+
id: number;
|
|
16
|
+
userId: number;
|
|
17
|
+
fullName: string;
|
|
18
|
+
avatarFile: AvatarTest;
|
|
19
|
+
departmentId: number;
|
|
20
|
+
}
|
|
21
|
+
interface AvatarTest {
|
|
22
|
+
driver: Driver;
|
|
23
|
+
size: Size;
|
|
24
|
+
rounded: boolean;
|
|
25
|
+
inverse: boolean;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -13,6 +13,6 @@ export declare const INPUT_CHARACTER_SETS: {
|
|
|
13
13
|
readonly EMAIL_SPECIAL: readonly ["@", ".", "-", "_", "+"];
|
|
14
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" | "
|
|
16
|
+
readonly NAME_CHARACTER_EXCLUSIONS: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "*" | "." | "," | "!" | "?" | ";" | ":" | "@" | "#" | "$" | "%" | "&" | "+" | "-" | "=" | "_" | "|" | "~" | "`" | "^" | "<" | ">" | "/" | "\\" | "(" | ")" | "[" | "]" | "{" | "}" | "\"" | "'")[];
|
|
17
17
|
readonly SPECIAL: ("*" | "." | "," | "!" | "?" | ";" | ":" | "@" | "#" | "$" | "%" | "&" | "+" | "-" | "=" | "_" | "|" | "~" | "`" | "^" | "<" | ">" | "/" | "\\" | "(" | ")" | "[" | "]" | "{" | "}" | "\"" | "'")[];
|
|
18
18
|
};
|