robbyson-frontend-library 1.0.20 → 1.0.21

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.
@@ -7,6 +7,14 @@ export var UnitType;
7
7
  UnitType["MINUTES"] = "minutes";
8
8
  UnitType["SECONDS"] = "seconds";
9
9
  })(UnitType || (UnitType = {}));
10
+ export var IWeightConditionTypes;
11
+ (function (IWeightConditionTypes) {
12
+ IWeightConditionTypes["EQUAL"] = "equal";
13
+ IWeightConditionTypes["BIGGER_OR_EQUAL"] = "bigger_or_equal";
14
+ IWeightConditionTypes["LESS_OR_EQUAL"] = "less_or_equal";
15
+ IWeightConditionTypes["BIGGER"] = "bigger";
16
+ IWeightConditionTypes["LESS"] = "less";
17
+ })(IWeightConditionTypes || (IWeightConditionTypes = {}));
10
18
  export var TypeReferenceEnum;
11
19
  (function (TypeReferenceEnum) {
12
20
  TypeReferenceEnum["monthly"] = "M";
package/index.d.ts CHANGED
@@ -84,3 +84,4 @@ export * from "./src/components/balance-sidebar";
84
84
  export * from "./src/components/full-balance-page";
85
85
  export * from "./src/components/guard-module";
86
86
  export * from "./src/components/guard-permission";
87
+ export * from "./src/components/favorite-button";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robbyson-frontend-library",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Robbyson frontend Library",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT",
@@ -0,0 +1,9 @@
1
+ import { IBaseComponentProp } from "../base-component.prop.interface";
2
+ import {IToggleIconButtonProps} from "../toggle-icon-button/toggle-icon-button.interface";
3
+
4
+ export interface IFavoriteButtonProps<T>extends React.ButtonHTMLAttributes<T>,IBaseComponentProp, IToggleIconButtonProps<T> {
5
+ }
6
+
7
+ export interface IFavoriteButtonState {
8
+
9
+ }
@@ -0,0 +1,9 @@
1
+ ///<reference types="react" />
2
+ ///<reference types="robbyson-frontend-library" />
3
+
4
+ declare module 'styleguide/FavoriteButton' {
5
+ import { IFavoriteButtonProps } from "robbyson-frontend-library";
6
+ const FavoriteButton: React.ComponentType<IFavoriteButtonProps>;
7
+
8
+ export default FavoriteButton;
9
+ }
@@ -0,0 +1 @@
1
+ export * from './favorite-button.interface';
@@ -1,11 +1,17 @@
1
- import { ContractorModel, UserSessionModel } from "../../models";
1
+ import { IWeightConditionTypes } from "../../types";
2
+ import { UserSessionModel } from "../../models";
2
3
  import { IBaseComponentProp } from "../base-component.prop.interface";
3
4
 
4
5
  export interface IGuardPermissionProps extends IBaseComponentProp{
5
- moduleHandle: string;
6
+ moduleHandle: string | undefined;
6
7
  permissionHandles: string[];
7
8
  children: React.ReactNode;
9
+ checkWeight?: boolean;
10
+ weight?: number;
11
+ redirect?:boolean
12
+ condition?: IWeightConditionTypes
8
13
  }
14
+
9
15
  export interface IGuardPermissionState {
10
16
  hasPermission: boolean;
11
17
  roleship: UserSessionModel["permissions"] | undefined;
@@ -11,7 +11,7 @@ export interface IHeaderContextMenuProps extends IBaseComponentProp {
11
11
  activeTab?: TabKey;
12
12
  selectedMonth?: Date | null;
13
13
  textBreakpointsClasses?: HeaderTextBreakpointsClasses;
14
- onButtonClick?: (buttonName: IHeaderContextMenuButtons) => void;
14
+ onButtonClick?: (buttonName: IHeaderContextMenuButtons, linkTo?: string) => void;
15
15
  }
16
16
 
17
17
  export type HeaderTextBreakpointsClasses = Partial<{
@@ -1,3 +1,5 @@
1
+ import { IWeightConditionTypes } from "../types";
2
+
1
3
  export type MenuItem = {
2
4
  captionLocale: string;
3
5
  iconHandle: string;
@@ -5,6 +7,11 @@ export type MenuItem = {
5
7
  module?: string;
6
8
  disabled?: boolean;
7
9
  matchPath?: string;
10
+ permissionsModule?: string[];
11
+ permissionsUser?: string[];
12
+ checkWeight?: boolean;
13
+ weight?: number;
14
+ condition?: IWeightConditionTypes
8
15
  }
9
16
 
10
17
  export interface IMenuProps {
@@ -8,7 +8,7 @@ export interface IQuizRepository {
8
8
  quizId: string,
9
9
  body: QuizDTO.QuestionAnswerDTO
10
10
  ): Promise<void>;
11
- getQuizzesToBeAnsweredLater(): Promise<QuizModel[]>;
11
+ getQuizzesToBeAnsweredLater(): Promise<QuizAnsweredModel[]>;
12
12
  getNotAnsweredQuizzes(): Promise<QuizNotAnsweredModel[]>;
13
13
  getAnsweredQuizzes(): Promise<QuizAnsweredModel[]>;
14
- }
14
+ }
@@ -8,9 +8,9 @@ export interface IQuizService {
8
8
  quizId: string,
9
9
  body: QuizDTO.QuestionAnswerDTO
10
10
  ): Promise<void>;
11
- getQuizzesToBeAnsweredLater(): Promise<QuizModel[]>;
11
+ getQuizzesToBeAnsweredLater(): Promise<QuizAnsweredModel[]>;
12
12
  getNotAnsweredQuizzes(): Promise<QuizNotAnsweredModel[]>;
13
13
  getAnsweredQuizzes(): Promise<QuizAnsweredModel[]>;
14
14
  getNotAnsweredQuizzesCount(): number;
15
- getHistory(): Promise<[QuizModel[], QuizAnsweredModel[]]>;
15
+ getHistory(): Promise<[QuizAnsweredModel[], QuizAnsweredModel[]]>;
16
16
  }
@@ -116,6 +116,8 @@ export interface ITreeApp {
116
116
  };
117
117
  breadcrumb: [];
118
118
  userCurrentSelected: {
119
+ id?: string;
120
+ name: string;
119
121
  identification?: string;
120
122
  uniqueId: string;
121
123
  indicatorId: string;
@@ -7,6 +7,13 @@ export enum UnitType {
7
7
  MINUTES = 'minutes',
8
8
  SECONDS = 'seconds',
9
9
  }
10
+ export enum IWeightConditionTypes {
11
+ EQUAL= "equal",
12
+ BIGGER_OR_EQUAL= "bigger_or_equal",
13
+ LESS_OR_EQUAL= "less_or_equal",
14
+ BIGGER= "bigger",
15
+ LESS= "less",
16
+ }
10
17
 
11
18
  type User = {
12
19
  _id: number;