robbyson-frontend-library 1.0.93 → 1.0.94

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 (31) hide show
  1. package/dist/constants/index.js +1 -1
  2. package/dist/constants/result-level.constants.js +1 -11
  3. package/dist/index.js +0 -1
  4. package/dist/models/theme-base.js +0 -1
  5. package/dist/states/index.js +0 -1
  6. package/dist/utils/build-error/buildError.util.js +3 -1
  7. package/dist/utils/robbyson-navigate.js +3 -0
  8. package/package.json +1 -1
  9. package/src/constants/index.ts +1 -1
  10. package/src/constants/result-level.constants.ts +2 -14
  11. package/src/index.ts +0 -1
  12. package/src/models/index.d.ts +1 -2
  13. package/src/models/theme-base.ts +0 -1
  14. package/src/models/user-session.model.ts +2 -0
  15. package/src/repositories/configuration.repository.interface.ts +1 -0
  16. package/src/repositories/index.d.ts +0 -1
  17. package/src/services/authentication.service.interface.ts +1 -1
  18. package/src/services/configuration.service.interface.ts +3 -0
  19. package/src/services/index.d.ts +1 -1
  20. package/src/states/index.ts +0 -1
  21. package/src/states/main-container/app.state.interface.ts +1 -2
  22. package/src/utils/build-error/buildError.util.ts +11 -5
  23. package/src/utils/robbyson-navigate.ts +4 -0
  24. package/dist/models/retrospective.model.js +0 -24
  25. package/dist/services/retrospective.service.interface.js +0 -1
  26. package/dist/states/retrospective-container/retrospective.state.interface.js +0 -1
  27. package/src/models/retrospective.model.ts +0 -120
  28. package/src/repositories/retrospective.repository.interface.ts +0 -12
  29. package/src/services/retrospective.service.interface.ts +0 -17
  30. package/src/states/retrospective-container/retrospective.state.interface.ts +0 -5
  31. /package/dist/{repositories/retrospective.repository.interface.js → services/configuration.service.interface.js} +0 -0
@@ -6,7 +6,7 @@ export * from "./user-metadata.constants";
6
6
  export * from "./tree.constants";
7
7
  export * as UploadConstants from "./upload.constants";
8
8
  export * as CampaignConstants from "./campaign.constants";
9
+ export * as ResultsConstants from "./result-level.constants";
9
10
  export * as AuthenticationConstants from "./authentication.constants";
10
11
  export * as AngelFriendConstants from "./angel-friend.constants";
11
12
  export * from "./sounds.constants";
12
- export * from "./result-level.constants";
@@ -1,4 +1,3 @@
1
- var _a;
2
1
  export var RESULT_LEVEL;
3
2
  (function (RESULT_LEVEL) {
4
3
  RESULT_LEVEL[RESULT_LEVEL["ESTRELA"] = 0] = "ESTRELA";
@@ -6,13 +5,4 @@ export var RESULT_LEVEL;
6
5
  RESULT_LEVEL[RESULT_LEVEL["AGUIA"] = 2] = "AGUIA";
7
6
  RESULT_LEVEL[RESULT_LEVEL["MONTANHA"] = 3] = "MONTANHA";
8
7
  })(RESULT_LEVEL || (RESULT_LEVEL = {}));
9
- export var RESULT_LEVEL_LABEL = (_a = {},
10
- _a[RESULT_LEVEL.ESTRELA] = "Estrela",
11
- _a[RESULT_LEVEL.NUVEM] = "Nuvem",
12
- _a[RESULT_LEVEL.AGUIA] = "Águia",
13
- _a[RESULT_LEVEL.MONTANHA] = "Montanha",
14
- _a);
15
- export var ResultsConstants = {
16
- RESULT_LEVEL: RESULT_LEVEL,
17
- RESULT_LEVEL_LABEL: RESULT_LEVEL_LABEL,
18
- };
8
+ ;
package/dist/index.js CHANGED
@@ -32,7 +32,6 @@ export * from "./models/market-trade-product.model";
32
32
  export * from "./models/user.model";
33
33
  export * from "./models/user-list-filter.model";
34
34
  export * from "./models/locale.model";
35
- export * from "./models/retrospective.model";
36
35
  // Repositories
37
36
  export * from "./repositories/base.repository";
38
37
  // Components
@@ -272,7 +272,6 @@ export var ICON_HANDLES = [
272
272
  "portal-dashboard-bold",
273
273
  "market-order-bold",
274
274
  "market-order-thin",
275
- "retrospective-bold"
276
275
  ];
277
276
  var ThemeBaseRect = /** @class */ (function () {
278
277
  function ThemeBaseRect() {
@@ -11,4 +11,3 @@ export * from "./meetings-container/meetings-app.state.interface";
11
11
  export * from "./quiz-container/quiz-app.state.interface";
12
12
  export * from "./angel-friend-container/angel-friend.state.interface";
13
13
  export * from "./profile-container/profile-app.state.interface";
14
- export * from "./retrospective-container/retrospective.state.interface";
@@ -4,7 +4,9 @@ var BuildError = /** @class */ (function () {
4
4
  }
5
5
  BuildError.buildError = function (error) {
6
6
  error.data.forEach(function (err) {
7
- return toast.error(err.text);
7
+ return toast.error(err.text, {
8
+ role: "alert",
9
+ });
8
10
  });
9
11
  return error;
10
12
  };
@@ -27,6 +27,9 @@ var RobbysonNavigate = /** @class */ (function () {
27
27
  RobbysonNavigate.openInNewTab = function (url) {
28
28
  window.open(url, '_blank');
29
29
  };
30
+ RobbysonNavigate.open = function (url) {
31
+ window.open(url, "_self");
32
+ };
30
33
  RobbysonNavigate.go = function (delta) {
31
34
  RobbysonNavigate._globalStore = GlobalStore.Get();
32
35
  RobbysonNavigate._globalState =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robbyson-frontend-library",
3
- "version": "1.0.93",
3
+ "version": "1.0.94",
4
4
  "description": "Robbyson frontend Library",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT",
@@ -6,7 +6,7 @@ export * from "./user-metadata.constants";
6
6
  export * from "./tree.constants";
7
7
  export * as UploadConstants from "./upload.constants";
8
8
  export * as CampaignConstants from "./campaign.constants";
9
+ export * as ResultsConstants from "./result-level.constants";
9
10
  export * as AuthenticationConstants from "./authentication.constants";
10
11
  export * as AngelFriendConstants from "./angel-friend.constants";
11
12
  export * from "./sounds.constants";
12
- export * from "./result-level.constants";
@@ -2,17 +2,5 @@ export enum RESULT_LEVEL {
2
2
  ESTRELA = 0,
3
3
  NUVEM = 1,
4
4
  AGUIA = 2,
5
- MONTANHA = 3,
6
- }
7
-
8
- export const RESULT_LEVEL_LABEL: { [key: number]: string } = {
9
- [RESULT_LEVEL.ESTRELA]: "Estrela",
10
- [RESULT_LEVEL.NUVEM]: "Nuvem",
11
- [RESULT_LEVEL.AGUIA]: "Águia",
12
- [RESULT_LEVEL.MONTANHA]: "Montanha",
13
- };
14
-
15
- export const ResultsConstants = {
16
- RESULT_LEVEL,
17
- RESULT_LEVEL_LABEL,
18
- }
5
+ MONTANHA = 3
6
+ };
package/src/index.ts CHANGED
@@ -34,7 +34,6 @@ export * from "./models/market-trade-product.model";
34
34
  export * from "./models/user.model";
35
35
  export * from "./models/user-list-filter.model";
36
36
  export * from "./models/locale.model";
37
- export * from "./models/retrospective.model";
38
37
 
39
38
  // Repositories
40
39
  export * from "./repositories/base.repository";
@@ -76,5 +76,4 @@ export * from "./portal-dashboard.model";
76
76
  export * from "./portal-dashboard-embedded.model";
77
77
  export * from "./locale.model";
78
78
  export * from "./contractor-password-length.model";
79
- export * from "./contractor-info.model";
80
- export * from "./retrospective.model";
79
+ export * from "./contractor-info.model";
@@ -358,7 +358,6 @@ export const ICON_HANDLES = [
358
358
  "portal-dashboard-bold",
359
359
  "market-order-bold",
360
360
  "market-order-thin",
361
- "retrospective-bold"
362
361
  ] as const;
363
362
 
364
363
  export type IconHandle = (typeof ICON_HANDLES)[number];
@@ -66,6 +66,7 @@ export class UserSessionModel extends BaseRepositoryModel {
66
66
  _id: number;
67
67
  active: boolean;
68
68
  authRoute: string;
69
+ authSignoutRoute: string;
69
70
  closingDay: number;
70
71
  coins_indicator_id: number;
71
72
  enableEAD: boolean;
@@ -86,6 +87,7 @@ export class UserSessionModel extends BaseRepositoryModel {
86
87
  passwordExpirationDays?: number;
87
88
  usesSpeedTest: boolean;
88
89
  sessionTime?: boolean;
90
+ usingExternalAuth?: boolean;
89
91
  };
90
92
  ClienteRobbyson: {
91
93
  // @TODO: Merge it with contractor
@@ -1,4 +1,5 @@
1
1
  export interface IConfigurationRepository {
2
2
  getApiURL(): string;
3
3
  getWsURL(): string;
4
+ getBaseUrl(): string;
4
5
  }
@@ -34,4 +34,3 @@ export * from "./portal-dashboard.repository.interface";
34
34
  export * from "./socket.repository.interface";
35
35
  export * from "./sounds.repository.interface";
36
36
  export * from "./contractor.repository.interface";
37
- export * from "./retrospective.repository.interface";
@@ -53,7 +53,7 @@ export interface IAuthenticationService {
53
53
  getUserSession(): UserSessionModel | undefined;
54
54
  ipWhiteList(): boolean;
55
55
  clearIpWhiteList(): void;
56
- logout(): void;
56
+ logout(): Promise<void>;
57
57
  getRecaptchaWhiteListed(): Promise<void>;
58
58
  getUserToRegister(params: {
59
59
  identification: string;
@@ -0,0 +1,3 @@
1
+ export interface IConfigurationService {
2
+ getBaseUrl(): string;
3
+ }
@@ -33,5 +33,5 @@ export * from "./user-metadata.service.interface";
33
33
  export * from "./permission.service.interface";
34
34
  export * from "./module.service.interface";
35
35
  export * from "./portal-dashboard.service.interface";
36
+ export * from "./configuration.service.interface";
36
37
  export * from "./contractor.service.interface";
37
- export * from "./retrospective.service.interface";
@@ -11,4 +11,3 @@ export * from "./meetings-container/meetings-app.state.interface";
11
11
  export * from "./quiz-container/quiz-app.state.interface";
12
12
  export * from "./angel-friend-container/angel-friend.state.interface";
13
13
  export * from "./profile-container/profile-app.state.interface";
14
- export * from "./retrospective-container/retrospective.state.interface";
@@ -1,6 +1,7 @@
1
1
  /// <reference types="redux-persist" />
2
2
  import { IRootApp } from "./root-app.state.interface";
3
3
  import { ITreeApp } from "./tree-app.state.interface";
4
+ import { persistReducer } from "redux-persist";
4
5
  import { PersistPartial } from "redux-persist/es/persistReducer";
5
6
  import { INotificationApp } from "./notification-app.state.interface";
6
7
  import { IChatApp } from "../chat-container/chat-app.state.interface";
@@ -11,7 +12,6 @@ import { IMeetingsAppState } from "../meetings-container/meetings-app.state.inte
11
12
  import { IQuizApp } from "../quiz-container/quiz-app.state.interface";
12
13
  import { IAngelFriendApp } from "../angel-friend-container/angel-friend.state.interface";
13
14
  import { IProfileApp } from "../profile-container/profile-app.state.interface";
14
- import { IRetrospectiveApp } from "../retrospective-container/retrospective.state.interface";
15
15
 
16
16
  export interface IAppState {
17
17
  RootApp: IRootApp & PersistPartial;
@@ -25,5 +25,4 @@ export interface IAppState {
25
25
  QuizApp: IQuizApp & PersistPartial;
26
26
  AngelFriendApp: IAngelFriendApp & PersistPartial;
27
27
  ProfileApp: IProfileApp & PersistPartial;
28
- RetrospectiveApp: IRetrospectiveApp & PersistPartial;
29
28
  }
@@ -1,11 +1,17 @@
1
1
  import { toast } from "react-toastify";
2
- import { ResponseStatusLogMessages, RobbysonResponseError } from "../../factories";
2
+ import {
3
+ ResponseStatusLogMessages,
4
+ RobbysonResponseError,
5
+ } from "../../factories";
3
6
 
4
- export class BuildError {
5
-
6
- public static buildError(error: RobbysonResponseError): RobbysonResponseError {
7
+ export class BuildError {
8
+ public static buildError(
9
+ error: RobbysonResponseError
10
+ ): RobbysonResponseError {
7
11
  error.data.forEach((err: ResponseStatusLogMessages) => {
8
- return toast.error(err.text);
12
+ return toast.error(err.text, {
13
+ role: "alert",
14
+ });
9
15
  });
10
16
 
11
17
  return error;
@@ -23,6 +23,10 @@ export class RobbysonNavigate {
23
23
  window.open(url, '_blank')
24
24
  }
25
25
 
26
+ static open(url: string): void {
27
+ window.open(url, "_self");
28
+ }
29
+
26
30
  static go(delta: number) {
27
31
  RobbysonNavigate._globalStore = GlobalStore.Get();
28
32
  RobbysonNavigate._globalState =
@@ -1,24 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import { BaseRepositoryModel } from "./base.repository.model";
17
- var RetrospectiveModel = /** @class */ (function (_super) {
18
- __extends(RetrospectiveModel, _super);
19
- function RetrospectiveModel() {
20
- return _super !== null && _super.apply(this, arguments) || this;
21
- }
22
- return RetrospectiveModel;
23
- }(BaseRepositoryModel));
24
- export { RetrospectiveModel };
@@ -1 +0,0 @@
1
- export {};
@@ -1,120 +0,0 @@
1
- import { BaseRepositoryModel } from "./base.repository.model";
2
-
3
- export class RetrospectiveModel extends BaseRepositoryModel {
4
- id: string;
5
- _id: string;
6
- name: string;
7
- level_1: boolean;
8
- review_features: ReviewFeatures;
9
- year: number;
10
- show: boolean;
11
- feedback: {
12
- suggestion?: string;
13
- rating_stars?: number;
14
- };
15
- }
16
-
17
- interface ReviewFeatures {
18
- // Early years
19
- name: string;
20
- read: boolean;
21
- topMoodPerc: number;
22
- numTopMood: number;
23
- okMoodPerc: number;
24
- numOkMood: number;
25
- loginCount: number;
26
- topDaysInARow: number;
27
- earnedCoins: number;
28
- transactionsCount: number;
29
- raffleTransactions: number;
30
- physicalTransactions: number;
31
- benefitsTransactions: number;
32
- avatarTransactions: number;
33
- starredItemsCount: number;
34
- joinedChallenges: number;
35
- achievedChallenges: number;
36
- mostProfitableOnChallengesIndicator: string;
37
- chatbotQuestions: number;
38
- chatConversations: number;
39
- accessRate: number;
40
- collabTopMoodPerc: number;
41
- collabOkMoodPerc: number;
42
- teamJoinedChallenges: number;
43
- teamAchievedChallenges: number;
44
- bestCollaborator: string;
45
- loginPercentage: number;
46
- star_days: number;
47
- spendCoins: number;
48
- answeredQuestionnaires: number;
49
- chatbotMostAskedContext: string;
50
- robbysonMessages: number;
51
-
52
- mostReceivedNotification: string;
53
- exchangedGroupChat: number;
54
- exchangedMessages: number;
55
- godfatherCount: number;
56
- godsonCount: number;
57
- godfatherName: string;
58
- eadStarted: number;
59
- transactionsTeamCount: number;
60
- qtyBestCollaborator: number;
61
- bestIndicator: number;
62
- bestIndicatorValue: number;
63
- bestPrimaryAttribute: string;
64
- angelFriendTeamCount: number;
65
- maxEarnedCoinsIndicator: Array<string>;
66
-
67
- // 2022
68
- daysSinceInitDate: number;
69
- team_earned_coins: number;
70
- team_spent_coins: number;
71
- team_happiest_day_of_week: string;
72
- team_happiest_collaborator: string;
73
- collaborator_with_most_access: string;
74
- team_best_collaborators: string[];
75
- team_exchanged_products_count: number;
76
- team_benefits_count: number;
77
- team_avatar_count: number;
78
- team_physical_count: number;
79
- team_raffle_count: number;
80
- team_godfather_count: number;
81
- team_godson_count: number;
82
- team_recurrent_star_count: number;
83
- team_best_month: number;
84
- earned_coins: number;
85
- tips_count: number;
86
- spent_coins: number;
87
- total_received_notifications: number;
88
- happiest_day_of_week: string;
89
- most_valuable_indicator: string;
90
- most_important_indicator: string;
91
- top_exchanged_products: string[];
92
- exchanged_messages: number;
93
- top_mood_perc: number;
94
- top_mood_count: number;
95
-
96
- // 2023
97
- total_coin_in_star_level: number;
98
- indicator_with_most_coin_in_star_level: number;
99
- godfather_count: (string | number)[];
100
- count_indicators_in_challenge: number;
101
- coins_in_indicators_challenge: number;
102
- team_exchanged_messages: number;
103
- top_5_exchanged_products: string[];
104
- top_n_collaborator_with_most_access: string[];
105
- godfather_coins: number;
106
- godson_coins: number;
107
- godson_count: (string | number)[];
108
-
109
- //2024
110
- exchanged_products_count: number;
111
- star_days_count: number;
112
- star_days_coins_perc: number;
113
- star_days_coins: number;
114
- coins_of_most_valuable_indicator: number;
115
- team_best_month_goal_achieved: number;
116
- team_group_distribution: Record<number, number>;
117
- top_type_exchanged_products: string;
118
- exchanged_coins_of_top_type_products: number;
119
- group_distribution: Record<number, number>;
120
- }
@@ -1,12 +0,0 @@
1
- import { RetrospectiveModel } from "../models";
2
-
3
- export interface IRetrospectiveRepository {
4
- getRetrospective(): Promise<RetrospectiveModel>;
5
- sendRating(retroId: string, rating: number, token: string): Promise<void>;
6
- sendSuggestion(
7
- retroId: string,
8
- suggestion: string,
9
- token: string
10
- ): Promise<void>;
11
- getToken(): Promise<string>;
12
- }
@@ -1,17 +0,0 @@
1
- import { RetrospectiveModel } from "../models";
2
-
3
- export interface IRetrospectiveService {
4
- handleGetRetrospective(): Promise<void>;
5
- setRetrospective(): Promise<void>;
6
- getRetrospectiveData(): RetrospectiveModel;
7
- shouldShowRetrospective(retrospective?: RetrospectiveModel): boolean;
8
- sendRating(retroId: string, rating: number, token: string): Promise<void>;
9
- sendSuggestion(
10
- retroId: string,
11
- suggestion: string,
12
- token: string
13
- ): Promise<void>;
14
- getToken(): Promise<string>;
15
- setRetrospectiveSuggestion(suggestion: string): void;
16
- setRetrospectiveRating(rating: number): void;
17
- }
@@ -1,5 +0,0 @@
1
- import { RetrospectiveModel } from "../../models";
2
-
3
- export interface IRetrospectiveApp {
4
- retrospectiveData?: RetrospectiveModel | null;
5
- }