robbyson-frontend-library 1.0.24 → 1.0.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.
@@ -60,10 +60,11 @@ var BaseAppPage = /** @class */ (function (_super) {
60
60
  BaseAppPage.prototype.render = function () {
61
61
  var _this = this;
62
62
  QueryParamsFactory.validate(this.paramsValidValues, this.paramsDefaultValues);
63
+ var isOperacaoPage = RobbysonNavigate.getPathname().endsWith('/operacao/');
63
64
  return (React.createElement(PageContainer, null,
64
65
  React.createElement(Header, null,
65
66
  React.createElement("div", null,
66
- React.createElement(LeftArrowLarge, { src: this._themeService.getIconAssetUrl("left-arrow-large"), onClick: function () { return _this.redirect(); } }),
67
+ !isOperacaoPage && (React.createElement(LeftArrowLarge, { src: this._themeService.getIconAssetUrl("left-arrow-large"), onClick: function () { return _this.redirect(); } })),
67
68
  React.createElement(Title, null, this.translate(this.headerLocale))),
68
69
  React.createElement(ContextMenu, { className: "body-2-book" }, this.contextMenu())),
69
70
  React.createElement(Content, { customHeight: this.customHeight }, this.renderPage())));
@@ -7,7 +7,7 @@ import styled from "styled-components";
7
7
  import SVG from "react-inlinesvg";
8
8
  var SIDEBAR_WIDTH = 72;
9
9
  export var SidebarPadding = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding-left: calc(", "px + 55px);\n height: calc(100vh + 8px);\n"], ["\n padding-left: calc(", "px + 55px);\n height: calc(100vh + 8px);\n"])), SIDEBAR_WIDTH);
10
- export var PageContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 32px 55px 47px calc(", "px + 55px);\n\n background: var(--solid-background);\n height: 100%;\n @media (max-width: ", "px) {\n padding: 32px 24px;\n }\n\n @media (max-width: ", "px) {\n padding: 24px 16px;\n }\n"], ["\n padding: 32px 55px 47px calc(", "px + 55px);\n\n background: var(--solid-background);\n height: 100%;\n @media (max-width: ", "px) {\n padding: 32px 24px;\n }\n\n @media (max-width: ", "px) {\n padding: 24px 16px;\n }\n"])), SIDEBAR_WIDTH, LayoutDimensions.width.horizontalIpadMini, LayoutDimensions.width.mobile);
10
+ export var PageContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 32px 55px 47px calc(", "px + 55px);\n overflow: hidden;\n background: var(--solid-background);\n height: 100%;\n @media (max-width: ", "px) {\n padding: 32px 24px;\n }\n\n @media (max-width: ", "px) {\n padding: 24px 16px;\n }\n"], ["\n padding: 32px 55px 47px calc(", "px + 55px);\n overflow: hidden;\n background: var(--solid-background);\n height: 100%;\n @media (max-width: ", "px) {\n padding: 32px 24px;\n }\n\n @media (max-width: ", "px) {\n padding: 24px 16px;\n }\n"])), SIDEBAR_WIDTH, LayoutDimensions.width.horizontalIpadMini, LayoutDimensions.width.mobile);
11
11
  export var Header = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex !important;\n flex-direction: row !important;\n justify-content: space-between !important;\n align-items: center !important;\n gap: 16px !important;\n\n @media (max-width: ", "px) {\n flex-direction: column !important;\n align-items: flex-start !important;\n margin-bottom: 16px;\n }\n\n & > div {\n display: flex;\n align-items: center;\n }\n\n svg {\n cursor: pointer;\n }\n"], ["\n display: flex !important;\n flex-direction: row !important;\n justify-content: space-between !important;\n align-items: center !important;\n gap: 16px !important;\n\n @media (max-width: ", "px) {\n flex-direction: column !important;\n align-items: flex-start !important;\n margin-bottom: 16px;\n }\n\n & > div {\n display: flex;\n align-items: center;\n }\n\n svg {\n cursor: pointer;\n }\n"])), LayoutDimensions.width.horizontalIpadMini);
12
12
  export var ContextMenu = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n -ms-overflow-style: none;\n scrollbar-width: none;\n overflow-y: scroll;\n &::-webkit-scrollbar {\n display: none;\n }\n @media (max-width: ", "px) {\n width: 100%;\n }\n"], ["\n -ms-overflow-style: none;\n scrollbar-width: none;\n overflow-y: scroll;\n &::-webkit-scrollbar {\n display: none;\n }\n @media (max-width: ", "px) {\n width: 100%;\n }\n"])), LayoutDimensions.width.horizontalIpadMini);
13
13
  export var Title = styled.h4(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-left: 12px;\n\n @media (max-width: ", "px) {\n margin-left: 40px;\n }\n"], ["\n margin-left: 12px;\n\n @media (max-width: ", "px) {\n margin-left: 40px;\n }\n"])), LayoutDimensions.width.horizontalIpadMini);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robbyson-frontend-library",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Robbyson frontend Library",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT",
@@ -9,6 +9,7 @@ export interface IHeaderContextMenuProps extends IBaseComponentProp {
9
9
  calendarHideTabs?: boolean;
10
10
  activeTab?: TabKey;
11
11
  selectedMonth?: Date | null;
12
+ showCalendar?: boolean;
12
13
  textBreakpointsClasses?: HeaderTextBreakpointsClasses;
13
14
  onButtonClick?: (
14
15
  buttonName: IHeaderContextMenuButtons,
@@ -53,16 +53,20 @@ export abstract class BaseAppPage<T, T1> extends React.Component<T, T1> {
53
53
  this.paramsValidValues,
54
54
  this.paramsDefaultValues
55
55
  );
56
+ const isOperacaoPage = RobbysonNavigate.getPathname().endsWith('/operacao/');
56
57
  return (
57
58
  <PageContainer>
58
59
  <Header>
59
60
  <div>
60
- <LeftArrowLarge
61
- src={this._themeService.getIconAssetUrl(
62
- "left-arrow-large"
63
- )}
64
- onClick={() => this.redirect()}
65
- />
61
+ {!isOperacaoPage && (
62
+
63
+ <LeftArrowLarge
64
+ src={this._themeService.getIconAssetUrl(
65
+ "left-arrow-large"
66
+ )}
67
+ onClick={() => this.redirect()}
68
+ />
69
+ )}
66
70
  <Title>{this.translate(this.headerLocale)}</Title>
67
71
  </div>
68
72
 
@@ -11,7 +11,7 @@ export const SidebarPadding = styled.div`
11
11
 
12
12
  export const PageContainer = styled.div`
13
13
  padding: 32px 55px 47px calc(${SIDEBAR_WIDTH}px + 55px);
14
-
14
+ overflow: hidden;
15
15
  background: var(--solid-background);
16
16
  height: 100%;
17
17
  @media (max-width: ${LayoutDimensions.width.horizontalIpadMini}px) {
@@ -17,6 +17,7 @@ interface Header {
17
17
  iconHandle: IconHandle;
18
18
  };
19
19
  element?: (props: any) => React.ReactNode;
20
+ onClickHeader?: () => void;
20
21
  isReactElement?: boolean;
21
22
  color: string;
22
23
  columnColor: string;
@@ -13,7 +13,7 @@ interface IHierarchyLevelPermission {
13
13
  import { BaseRepositoryModel } from "./base.repository.model";
14
14
 
15
15
  export class HierarchyLevelModel extends BaseRepositoryModel {
16
- date: Date;
16
+ date: string;
17
17
  description: string;
18
18
  name: string;
19
19
  permission: IHierarchyLevelPermission[];
@@ -2,8 +2,8 @@ import { BaseRepositoryModel } from "./base.repository.model";
2
2
  import { IconHandle } from "./theme-base";
3
3
 
4
4
  export interface IHumorFrases {
5
- _id: string,
6
- texto: string
5
+ _id: string;
6
+ texto: string;
7
7
  }
8
8
 
9
9
  export interface IHumorMotives {
@@ -1,15 +1,17 @@
1
1
  import { BaseRepositoryModel } from "./base.repository.model";
2
2
 
3
3
  export interface IRegistersHumor {
4
- tipoHumor: number,
4
+ tipoHumor: number;
5
5
  humor: {
6
- _id: string,
7
- descricao: string,
8
- },
9
- motivo: {
10
- descricao: string
11
- } | {}
12
- dataHoraCriacao: Date,
6
+ _id: string;
7
+ descricao: string;
8
+ };
9
+ motivo:
10
+ | {
11
+ descricao: string;
12
+ }
13
+ | {};
14
+ dataHoraCriacao: Date;
13
15
  }
14
16
 
15
17
  export class HumorRegisterModel extends BaseRepositoryModel {
@@ -19,10 +21,10 @@ export class HumorRegisterModel extends BaseRepositoryModel {
19
21
  }
20
22
 
21
23
  export class HumorRegisterResponseModel extends BaseRepositoryModel {
22
- _id?:string;
24
+ _id?: string;
23
25
  n: number;
24
26
  nModified: number;
25
- ok:number
27
+ ok: number;
26
28
  }
27
29
  export class HumorLastModel extends BaseRepositoryModel {
28
30
  _id: string;
@@ -30,6 +32,3 @@ export class HumorLastModel extends BaseRepositoryModel {
30
32
  registros: IRegistersHumor[];
31
33
  __v: number;
32
34
  }
33
-
34
-
35
-
@@ -24,7 +24,7 @@ export class ResultModel extends BaseRepositoryModel {
24
24
  };
25
25
  earned: number;
26
26
  maxToEarn: number;
27
- lastDate: Date;
27
+ lastDate: Date | null;
28
28
  groupIndex: number;
29
29
  date: string;
30
30
  days?: ResultModel[];
@@ -22,7 +22,7 @@ export interface ITreeRepository {
22
22
  ): Promise<TreeReportPerformanceModel[]>;
23
23
  getIndicators({
24
24
  params,
25
- }: TreeDTO.IGetIndicatorsTreeDTO): Promise<Array<TreeIndicatorModel>>;
25
+ }: TreeDTO.IGetIndicatorsTreeDTO): Promise<TreeDTO.IResponseIndicatorsTreeDTO>;
26
26
  getAttributes({
27
27
  params,
28
28
  }: TreeDTO.IGetAttributesTreeDTO): Promise<TreeAttributeModel[]>;
@@ -1,2 +1,18 @@
1
1
  export interface IHierarchySetHierarchy {
2
+ _id: string;
3
+ date: string;
4
+ name: string;
5
+ description: string;
6
+ weight: number;
7
+ permission: {
8
+ application: {
9
+ _id: number;
10
+ description: string;
11
+ };
12
+ _id: string;
13
+ send: boolean;
14
+ receive: boolean;
15
+ create_groups: boolean;
16
+ send_parent_immediate: boolean;
17
+ }[];
2
18
  }
@@ -9,31 +9,35 @@ export interface IGetIndicatorsTreeDTO {
9
9
  dadosAnterioresSeVazio: boolean;
10
10
  };
11
11
  }
12
+ export interface IResponseIndicatorsTreeDTO {
13
+ reference: string;
14
+ indicators: TreeIndicatorModel[];
15
+ }
12
16
 
13
17
  export interface IBreadcrumbData {
14
18
  name?: string;
15
- role?: string;
19
+ role?: string;
16
20
  group?: number;
17
21
  _id?: string;
18
22
  cpf?: string;
19
23
  }
20
- export interface IRecursionFindByUniqueId{
24
+ export interface IRecursionFindByUniqueId {
21
25
  parent: TreeModel["data"];
22
26
  uniqueIdList?: string[];
23
27
  index: number;
24
28
  breadcrumbData: IBreadcrumbData[];
25
29
  minLevel: string;
26
30
  }
27
- export interface IHandleBreadCrumbTreeDTO{
28
- uniqueId : string;
31
+ export interface IHandleBreadCrumbTreeDTO {
32
+ uniqueId: string;
29
33
  }
30
- export interface IHandleSearchTreeDTO{
31
- text : string;
34
+ export interface IHandleSearchTreeDTO {
35
+ text: string;
32
36
  }
33
37
 
34
38
  export interface IGetDataTreeServiceDTO {
35
- typeReference : string;
36
- reference : string;
39
+ typeReference: string;
40
+ reference: string;
37
41
  }
38
42
 
39
43
  export interface IGetAttributesTreeDTO {
@@ -119,7 +123,7 @@ export interface IGroupByAttributesTreeDTO {
119
123
  object: {
120
124
  [key: string]: {
121
125
  [key: string]: boolean;
122
- }
126
+ };
123
127
  };
124
128
  selectedAttributes: {
125
129
  [key: string]: string[];
@@ -191,38 +195,38 @@ export interface IGetProfileTreeDTO {
191
195
  };
192
196
  }
193
197
 
194
- export interface IFavoriteIndicatorTreeDTO{
198
+ export interface IFavoriteIndicatorTreeDTO {
195
199
  identification: string;
196
200
  indicatorId: string;
197
201
  favorite: boolean;
198
202
  }
199
- export interface IGetSimulationTreeDTO{
203
+ export interface IGetSimulationTreeDTO {
200
204
  _id: string;
201
205
  cpf: string;
202
206
  }
203
207
 
204
- export interface IGetSimulatedResultsTreeDTO{
208
+ export interface IGetSimulatedResultsTreeDTO {
205
209
  nodeId: string;
206
210
  _id?: string;
207
211
  }
208
- export interface IGetResultsToExportTreeDTO{
212
+ export interface IGetResultsToExportTreeDTO {
209
213
  nodeId?: string;
210
214
  simulationId: string;
211
215
  }
212
216
 
213
- export interface ISelectedDateTreeDTO{
217
+ export interface ISelectedDateTreeDTO {
214
218
  date: {
215
219
  selectedDate?: Date | null;
216
220
  selectedMonth?: Date | null;
217
- selectedWeek?: Week,
218
- }
221
+ selectedWeek?: Week;
222
+ };
219
223
  }
220
- export interface ISetBreadcrumpTreeDTO{
224
+ export interface ISetBreadcrumpTreeDTO {
221
225
  name?: string;
222
- role?:string,
223
- group?: number
224
- _id?: string,
225
- cpf?: string,
226
+ role?: string;
227
+ group?: number;
228
+ _id?: string;
229
+ cpf?: string;
226
230
  }
227
231
  interface IGroupList {
228
232
  name: string;
@@ -234,10 +238,10 @@ interface IGroupList {
234
238
  }
235
239
 
236
240
  export interface ISetGroups {
237
- list: IGroupList[],
238
- count: number
241
+ list: IGroupList[];
242
+ count: number;
239
243
  }
240
244
 
241
245
  export interface ISelectedGroups {
242
- [index:number]: boolean;
243
- }
246
+ [index: number]: boolean;
247
+ }
@@ -13,6 +13,7 @@ export interface IQuizService {
13
13
  getAnsweredQuizzes(): Promise<QuizAnsweredModel[]>;
14
14
  getNotAnsweredQuizzesCount(): number;
15
15
  getHistory(): Promise<[QuizAnsweredModel[], QuizAnsweredModel[]]>;
16
- getQuizErrorIds(): string[];
17
- setQuizErrorId(id: string): void;
16
+ handleNotAnsweredQuiz(quizId?: string): Promise<boolean>;
17
+ setQuiz(quiz: QuizModel): void;
18
+ getQuiz(quizId: string): QuizModel | null;
18
19
  }
@@ -57,13 +57,6 @@ export interface ITreeService {
57
57
  breadcrumbData: TreeDTO.IBreadcrumbData[];
58
58
  minLevel: string;
59
59
  }): [TreeModel["data"], TreeDTO.IBreadcrumbData[]];
60
- // TODO : Integração Broadcast
61
- // recursionFindByGroup(
62
- // params: TreeDTO.IGetIndicatorsTreeDTO
63
- // ): Promise<TreeReportPerformanceModel[]>;
64
- getIndicators(
65
- params: TreeDTO.IGetIndicatorsTreeDTO
66
- ): Promise<TreeIndicatorModel[]>;
67
60
  getDataTree(params: TreeDTO.IGetDataTreeDTO): Promise<void>;
68
61
  getSimulations(userId: number | undefined): Promise<void>;
69
62
  getGraphData(simulationId?: string): Promise<void>;
@@ -17,8 +17,6 @@ export interface IRootApp {
17
17
  isTabletOrMobile: boolean;
18
18
  currentLocale?: any;
19
19
  currentTheme: ThemeBase;
20
- notAnsweredQuizzesCount?: number;
21
- quizErrorIds?: string[];
22
20
  isDefaultTheme: boolean;
23
21
  apisUrls: {
24
22
  private: string;
@@ -1,4 +1,8 @@
1
+ import { QuizModel } from "../../models";
2
+
1
3
  export interface IQuizApp {
2
4
  notAnsweredQuizzesCount: number;
5
+ notAnsweredQuizIds: string[];
3
6
  quizErrorIds: string[];
7
+ quiz: QuizModel;
4
8
  }